From de40f3be3f08487937525c2ef096dad665dda61d Mon Sep 17 00:00:00 2001 From: dartraiden Date: Sat, 14 Jan 2023 01:30:59 +0300 Subject: Convert sources to CR+LF --- bin15/mir_full.sln | 4356 +++--- bin15/mir_icons.sln | 660 +- bin15/tdlib.sln | 162 +- bin16/mir_full.sln | 4356 +++--- bin16/mir_icons.sln | 660 +- bin16/tdlib.sln | 162 +- bin17/mir_full.sln | 4356 +++--- bin17/mir_icons.sln | 660 +- bin17/tdlib.sln | 162 +- include/m_database.h | 1598 +-- include/m_db_int.h | 814 +- include/m_gui.h | 3212 ++--- libs/hunspell/src/phonet.c++ | 540 +- plugins/DbChecker/src/worker.cpp | 346 +- plugins/Dbx_sqlite/src/dbcheck.cpp | 220 +- plugins/Dbx_sqlite/src/dbcontacts.cpp | 226 +- plugins/Dbx_sqlite/src/dbevents.cpp | 1398 +- plugins/Dbx_sqlite/src/dbintf.cpp | 482 +- plugins/Dbx_sqlite/src/dbintf.h | 376 +- plugins/Dbx_sqlite/src/dbsettings.cpp | 450 +- plugins/HTTPServer/docs/data/HTTPMimeTypes | 950 +- plugins/HTTPServer/src/MimeHandling.h | 82 +- plugins/MirOTR/Libgcrypt/doc/gcrypt.info | 13678 +++++++++---------- plugins/TabSRMM/docs/readme.txt | 34 +- plugins/TabSRMM/src/sendqueue.cpp | 1206 +- plugins/WinterSpeak/src/Observer.h | 20 +- protocols/Discord/CMakeLists.txt | 8 +- protocols/Discord/discord.vcxproj | 130 +- protocols/Discord/discord.vcxproj.filters | 144 +- protocols/Discord/proto_discord/CMakeLists.txt | 2 +- .../Discord/proto_discord/Proto_Discord.vcxproj | 66 +- .../proto_discord/Proto_Discord.vcxproj.filters | 26 +- .../Discord/proto_discord/res/Proto_Discord.rc | 148 +- protocols/Discord/proto_discord/src/resource.h | 46 +- protocols/Discord/res/discord.rc | 318 +- protocols/Discord/res/version.rc | 18 +- protocols/Discord/src/avatars.cpp | 410 +- protocols/Discord/src/connection.cpp | 246 +- protocols/Discord/src/dispatch.cpp | 1184 +- protocols/Discord/src/gateway.cpp | 692 +- protocols/Discord/src/groupchat.cpp | 470 +- protocols/Discord/src/guilds.cpp | 826 +- protocols/Discord/src/http.cpp | 310 +- protocols/Discord/src/main.cpp | 142 +- protocols/Discord/src/menus.cpp | 344 +- protocols/Discord/src/options.cpp | 200 +- protocols/Discord/src/proto.cpp | 1536 +-- protocols/Discord/src/proto.h | 952 +- protocols/Discord/src/resource.h | 60 +- protocols/Discord/src/server.cpp | 614 +- protocols/Discord/src/stdafx.cxx | 34 +- protocols/Discord/src/stdafx.h | 160 +- protocols/Discord/src/utils.cpp | 752 +- protocols/Discord/src/version.h | 26 +- protocols/Discord/src/voice.cpp | 232 +- protocols/Sametime/src/meanwhile/src/mw_error.h | 408 +- protocols/Steam/src/api/enums.h | 176 +- protocols/Steam/src/steam_proto.cpp | 708 +- protocols/Telegram/.gitignore | 2 +- protocols/Telegram/Telegram.vcxproj | 134 +- protocols/Telegram/Telegram.vcxproj.filters | 118 +- protocols/Telegram/proto_telegram/CMakeLists.txt | 2 +- .../Telegram/proto_telegram/Proto_Telegram.vcxproj | 66 +- .../proto_telegram/Proto_Telegram.vcxproj.filters | 26 +- .../Telegram/proto_telegram/res/Proto_Telegram.rc | 142 +- protocols/Telegram/proto_telegram/src/resource.h | 38 +- protocols/Telegram/res/resource.rc | 308 +- protocols/Telegram/res/telegram.ico | Bin 3638 -> 3640 bytes protocols/Telegram/src/auth.cpp | 252 +- protocols/Telegram/src/avatars.cpp | 190 +- protocols/Telegram/src/main.cpp | 104 +- protocols/Telegram/src/mt_proto.cpp | 396 +- protocols/Telegram/src/mt_proto.h | 418 +- protocols/Telegram/src/options.cpp | 164 +- protocols/Telegram/src/resource.h | 50 +- protocols/Telegram/src/server.cpp | 838 +- protocols/Telegram/src/stdafx.cxx | 36 +- protocols/Telegram/src/stdafx.h | 94 +- protocols/Telegram/src/utils.cpp | 252 +- protocols/Telegram/src/utils.h | 6 +- protocols/Telegram/tdlib/tdactor.vcxproj | 148 +- protocols/Telegram/tdlib/tdactor.vcxproj.filters | 118 +- protocols/Telegram/tdlib/tdcore.vcxproj | 596 +- protocols/Telegram/tdlib/tdcore.vcxproj.filters | 500 +- protocols/Telegram/tdlib/tddb.vcxproj | 174 +- protocols/Telegram/tdlib/tddb.vcxproj.filters | 78 +- protocols/Telegram/tdlib/tdlib.vcxproj | 1212 +- protocols/Telegram/tdlib/tdlib.vcxproj.filters | 3310 ++--- protocols/Telegram/tdlib/tdnet.vcxproj | 176 +- protocols/Telegram/tdlib/tdnet.vcxproj.filters | 80 +- protocols/Telegram/tdlib/tdutils.vcxproj | 584 +- protocols/Telegram/tdlib/tdutils.vcxproj.filters | 508 +- protocols/WhatsApp/src/appsync.cpp | 644 +- protocols/WhatsApp/src/chats.cpp | 376 +- protocols/WhatsApp/src/proto.cpp | 616 +- protocols/WhatsApp/src/proto.h | 1016 +- protocols/WhatsApp/src/server.cpp | 836 +- protocols/YAMN/YAMN.vcxproj | 192 +- protocols/YAMN/YAMN.vcxproj.filters | 238 +- protocols/YAMN/res/YAMN.rc | 610 +- protocols/YAMN/src/account.cpp | 2102 +-- protocols/YAMN/src/browser/badconnect.cpp | 502 +- protocols/YAMN/src/browser/browser.h | 76 +- protocols/YAMN/src/browser/mailbrowser.cpp | 4494 +++--- protocols/YAMN/src/debug.cpp | 220 +- protocols/YAMN/src/debug.h | 100 +- protocols/YAMN/src/filterplugin.cpp | 338 +- protocols/YAMN/src/mails/decode.cpp | 1068 +- protocols/YAMN/src/mails/mails.cpp | 946 +- protocols/YAMN/src/mails/mime.cpp | 1390 +- protocols/YAMN/src/main.cpp | 648 +- protocols/YAMN/src/main.h | 74 +- protocols/YAMN/src/proto/netlib.cpp | 464 +- protocols/YAMN/src/proto/pop3/pop3.cpp | 688 +- protocols/YAMN/src/proto/pop3/pop3comm.cpp | 2658 ++-- protocols/YAMN/src/proto/pop3/pop3opt.cpp | 2274 +-- protocols/YAMN/src/protoplugin.cpp | 344 +- protocols/YAMN/src/resource.h | 222 +- protocols/YAMN/src/services.cpp | 756 +- protocols/YAMN/src/stdafx.h | 506 +- protocols/YAMN/src/synchro.cpp | 630 +- protocols/YAMN/src/yamn.cpp | 460 +- src/mir_app/src/MDatabaseCommon.cpp | 1322 +- src/mir_core/src/Windows/CCtrlTreeOpts.cpp | 418 +- src/mir_core/src/Windows/CCtrlTreeView.cpp | 1600 +-- src/mir_core/src/Windows/miranda.cpp | 812 +- src/mir_core/src/db.cpp | 1152 +- 127 files changed, 47233 insertions(+), 47233 deletions(-) diff --git a/bin15/mir_full.sln b/bin15/mir_full.sln index d8e5104b0e..7c0ce6f902 100644 --- a/bin15/mir_full.sln +++ b/bin15/mir_full.sln @@ -1,2178 +1,2178 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2036 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Miranda", "..\src\miranda32\miranda32.vcxproj", "{F9916510-9055-4C9F-997A-3755DEC1511B}" - ProjectSection(ProjectDependencies) = postProject - {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {538E451F-E667-4D07-BCE6-976ECC7BB8D1} - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_core", "..\src\mir_core\mir_core.vcxproj", "{D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_app", "..\src\mir_app\mir_app.vcxproj", "{538E451F-E667-4D07-BCE6-976ECC7BB8D1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjson", "..\libs\libjson\libjson.vcxproj", "{F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AVS", "..\plugins\AVS\avs.vcxproj", "{7711F563-6473-4ABD-B5E3-477CE8384AD6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zlib", "..\libs\zlib\zlib.vcxproj", "{E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Import", "..\plugins\Import\import.vcxproj", "{9299B507-1AF9-4C93-9560-5F637D1E0C9E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mmap", "..\plugins\Db3x_mmap\db3x_mmap.vcxproj", "{20D781FB-4A20-4B75-B863-304A47182966}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scriver", "..\plugins\Scriver\scriver.vcxproj", "{B8928210-546C-4AE3-956B-E2B724E6B8E5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM", "..\plugins\TabSRMM\tabsrmm.vcxproj", "{99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GG", "..\protocols\Gadu-Gadu\gadugadu.vcxproj", "{6DA1396F-2A44-4D5C-8442-012F71006217}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IRC", "..\protocols\IRCG\IRC.vcxproj", "{3A12F777-56A8-42EC-BD17-8F325524241E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Jabber", "..\protocols\JabberG\jabber.vcxproj", "{33276462-8313-4192-8306-13717ECCA60A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_nicer", "..\plugins\Clist_nicer\clist_nicer.vcxproj", "{3C42510C-A29E-4A53-899C-203BFA874E0B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cln_skinedit", "..\plugins\Cln_skinedit\skinedit.vcxproj", "{987F026D-EB1F-4013-ADA8-2406ACCDA526}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\AuthState\authstate.vcxproj", "{DB315D7D-00BB-43B2-93A6-0430CA2B9F28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "..\plugins\Console\Console.vcxproj", "{A231E008-2D1A-4F24-95DD-59F56F85A499}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Contacts", "..\plugins\ContactsPlus\contacts.vcxproj", "{F4F2FD25-1553-FB72-F695-0701D20C3168}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Flags", "..\plugins\CountryFlags\flags.vcxproj", "{B4361FA0-4073-4B60-EE72-F5C08E6EDF61}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSList", "..\plugins\CSList\cslist.vcxproj", "{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Db_autobackups", "..\plugins\Db_autobackups\db_autobackups.vcxproj", "{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FavContacts", "..\plugins\FavContacts\favcontacts.vcxproj", "{2D0B4CB0-3ACA-4612-B745-FF3050E1500A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FltContacts", "..\plugins\FloatingContacts\FltCont.vcxproj", "{9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folders", "..\plugins\Folders\folders.vcxproj", "{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LinkList", "..\plugins\HistoryLinkListPlus\linklist.vcxproj", "{850EC838-0EAD-45EB-6F1B-16DC90DCE18D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistorySweeperLight", "..\plugins\HistorySweeperLight\historysweeperlight.vcxproj", "{9DE1F0B0-B9D1-4681-82E7-13CC3E047445}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEView", "..\plugins\IEView\ieview.vcxproj", "{B988F96C-F87A-484C-AB15-D0674B22F291}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IgnoreState", "..\plugins\IgnoreState\ignore.vcxproj", "{214F211F-1A2B-4F79-8993-B8DEE2EF7441}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MenuEx", "..\plugins\MenuItemEx\menuex.vcxproj", "{210DD88D-649B-4695-8C5F-898A4F60A8CE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libTextControl", "..\libs\mTextControl\mtextcontrol.vcxproj", "{E26D2311-C164-48CF-BA24-5CEDA873D1B2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewXstatusNotify", "..\plugins\NewXstatusNotify\NewXstatusNotify.vcxproj", "{D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Nudge", "..\plugins\Nudge\nudge.vcxproj", "{8190CFAA-3B73-43D8-9101-8368E21F1864}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PopupPlus", "..\plugins\Popup\Popup.vcxproj", "{726460C7-E1F1-4C37-B64F-DA8A8DD26D70}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickMessages", "..\plugins\QuickMessages\quickmessages.vcxproj", "{DD76B998-ED0D-4BFD-9660-3ADC3A334872}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickReplies", "..\plugins\QuickReplies\quickreplies.vcxproj", "{27CA5499-B3F2-4FB6-8414-651819B0B96C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Rate", "..\plugins\Rate\rate.vcxproj", "{C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM", "..\plugins\SecureIM\secureim_15.vcxproj", "{4ADADECA-99D7-410D-8127-CB27210DCC6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SeenPlugin", "..\plugins\SeenPlugin\seenplugin.vcxproj", "{EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sessions", "..\plugins\Sessions\Sessions.vcxproj", "{37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleAR", "..\plugins\SimpleAR\SimpleAR.vcxproj", "{06C44834-7B7A-4074-A6D8-7F163B3FF707}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SmileyAdd", "..\plugins\SmileyAdd\SmileyAdd.vcxproj", "{5BBA7E51-B494-4462-BC4F-1AE5F57F9857}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SplashScreen", "..\plugins\SplashScreen\splashscreen.vcxproj", "{5A6095F4-B037-4DA8-8410-8004A90C961A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpam", "..\plugins\StopSpamPlus\stopspam.vcxproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tipper", "..\plugins\TipperYM\tipper_ym.vcxproj", "{2C818919-A38F-44FF-BD91-A6A204AC592A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TooltipNotify", "..\plugins\TooltipNotify\ttnotify.vcxproj", "{1948EAEA-4C25-4F6B-AD9E-5891F656EADA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TranslitSwitcher", "..\plugins\TranslitSwitcher\TranslitSwitcher.vcxproj", "{82F96271-4136-4B0E-AB6F-040DE7A4DD1E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserGuide", "..\plugins\UserGuide\UserGuide.vcxproj", "{92E3BDEE-DD17-4619-AD61-70C0ADE04217}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx", "..\plugins\UserInfoEx\UInfoEx.vcxproj", "{AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Variables", "..\plugins\Variables\Variables.vcxproj", "{3038EF69-85BE-4D92-9864-CD6A5EBB558A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhenWasIt", "..\plugins\WhenWasIt\WhenWasIt.vcxproj", "{63E05ECA-0A63-479E-86BD-2CAF53869BDA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker", "..\plugins\SpellChecker\spellchecker.vcxproj", "{5DB86086-10E9-42E7-AC90-503D2678C2A2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Alarms", "..\plugins\Alarms\alarms.vcxproj", "{5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroNotify", "..\plugins\ZeroNotification\Zero Notification.vcxproj", "{E37561EB-B9C5-4215-9FF9-DB559916FBA2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardNotify", "..\plugins\KeyboardNotify\KeyboardNotify.vcxproj", "{A9265E36-7F2D-440C-BF3E-F447FDB6200F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AddContactPlus", "..\plugins\AddContactPlus\addcontactplus.vcxproj", "{253ADD1D-F7C9-4643-A957-51BFCD61A5D2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleStatusMsg", "..\plugins\SimpleStatusMsg\simplestatusmsg.vcxproj", "{D3D80E27-D099-41EC-AFB2-A891A33F1608}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClientChangeNotify", "..\plugins\ClientChangeNotify\ClientChangeNotify.vcxproj", "{6A1969EA-9657-4828-93E0-8D21A970F868}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ListeningTo", "..\plugins\ListeningTo\listeningto.vcxproj", "{5FAA475D-0593-454F-8601-0D7150DCA4A0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Omegle", "..\protocols\Omegle\omegle.vcxproj", "{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugins\RecentContacts\RecentContacts.vcxproj", "{07137F45-8B5F-4561-BEC8-B883E9123785}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EkHtml", "..\plugins\MirOTR\ekhtml\ekhtml_15.vcxproj", "{2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Libgcrypt", "..\plugins\MirOTR\Libgcrypt\Libgcrypt_15.vcxproj", "{40FE7861-E54E-4DA9-BE4D-A5178014E477}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libotr", "..\plugins\MirOTR\libotr\libotr_15.vcxproj", "{1423FC8F-AA52-4562-8275-4BF0838CA378}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirOTR", "..\plugins\MirOTR\MirOTR_15.vcxproj", "{53F841E8-284F-4545-9176-B131896E43F8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewEventNotify", "..\plugins\NewEventNotify\neweventnotify.vcxproj", "{2E0A2793-94C3-82E7-2AB0-FD421816CFBF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhoUsesMyFiles", "..\plugins\WhoUsesMyFiles\wumf.vcxproj", "{F29CCB9B-79CF-4341-AA05-3626A036D3E3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CryptoPP", "..\plugins\CryptoPP\cryptopp_15.vcxproj", "{4AC1E062-0236-4E49-AA04-F732043D2DCF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cryptlib", "..\plugins\CryptoPP\crypto\cryptlib_15.vcxproj", "{290C5ED4-71A7-4040-AD26-4820CF7A9E60}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserInfo", "..\src\core\stduserinfo\stduserinfo.vcxproj", "{1C856B14-54CD-4D07-B18B-5F7DB073AB51}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdEmail", "..\src\core\stdemail\stdemail.vcxproj", "{A5B558C6-C767-11E1-A335-F6EB6188709B}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdFile", "..\src\core\stdfile\stdfile.vcxproj", "{6022990D-3FD5-46A9-8AB5-E444C51646F3}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAutoAway", "..\src\core\stdautoaway\stdautoaway.vcxproj", "{A8F23706-E590-4A87-96CC-5F8E5082503F}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUIHist", "..\src\core\stduihist\stduihist.vcxproj", "{DADAC956-3A54-440A-8B56-A07234DEE861}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserOnline", "..\src\core\stduseronline\stduseronline.vcxproj", "{D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAway", "..\src\core\stdaway\stdaway.vcxproj", "{C14D6E0D-810E-4599-A6E0-17298AFA0501}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdClist", "..\src\core\stdclist\stdclist.vcxproj", "{E71C1722-A41D-4475-87F4-29961A3654BB}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdMsg", "..\src\core\stdmsg\stdmsg.vcxproj", "{F47EAB99-C78F-4A92-87D5-B0E16FE5A133}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdCrypt", "..\src\core\stdcrypt\stdcrypt.vcxproj", "{8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmdLine", "..\plugins\CmdLine\CmdLine.vcxproj", "{73BA9CA5-640D-4F30-A157-A73557A25F98}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MimCmd", "..\plugins\MimCmd\MimCmd.vcxproj", "{1E3BB48A-FFBC-4A03-8C43-9124A484BE51}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTPFile", "..\plugins\FTPFileYM\ftpfile.vcxproj", "{73482497-9F57-4819-A9AB-5D841A9F072D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PasteIt", "..\plugins\PasteIt\PasteIt.vcxproj", "{BAEBC482-CDA9-4053-A7D0-08222E85118E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendScreenshotPlus\SendSS.vcxproj", "{CEAD8BCF-1F22-4E00-9F6D-E33405B00552}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenFolder", "..\plugins\OpenFolder\openFolder.vcxproj", "{8D233B9A-2744-4B62-94FC-7872FDDA4683}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyDetails", "..\plugins\MyDetails\mydetails.vcxproj", "{A4855451-6447-437C-B024-B36C3C7901EA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Msg_Export", "..\plugins\Msg_Export\msg_export.vcxproj", "{4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpamMod", "..\plugins\StopSpamMod\stopspam_mod.vcxproj", "{0FF6989B-880A-4C3F-B69D-AFF93296044D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Watrack_MPD", "..\plugins\watrack_mpd\watrack_mpd.vcxproj", "{A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginUpdater", "..\plugins\PluginUpdater\PluginUpdater.vcxproj", "{21F6C0E4-DD1A-49E6-82FD-64574BB902BD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PManagerEx", "..\plugins\ProfileManager\pmanagerEx.vcxproj", "{728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Restart", "..\plugins\Restart\Restart.vcxproj", "{18195F68-A747-8643-050C-C5101DA658FD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrafficCounter", "..\plugins\TrafficCounter\TrafficCounter.vcxproj", "{885010EA-D008-4E38-85D4-487693F0BA00}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackUpdater", "..\plugins\PackUpdater\PackUpdater.vcxproj", "{20413125-4D68-4751-8062-DDA026DDABF1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickContacts", "..\plugins\QuickContacts\quickcontacts.vcxproj", "{7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MobileState", "..\plugins\MobileState\mobilestate.vcxproj", "{AE677E3A-DAC5-42FD-8762-47370C57639B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NoHistory", "..\plugins\NoHistory\NoHistory.vcxproj", "{ABF05E2C-C335-4BD1-8C3E-4C63285362CF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YAMN", "..\protocols\YAMN\YAMN.vcxproj", "{C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewsAggregator", "..\protocols\NewsAggregator\NewsAggregator.vcxproj", "{6DE11A47-2268-4B08-8DE5-15A1705FCE28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CurrencyRates", "..\protocols\CurrencyRates\Forex.vcxproj", "{C619A811-8023-4441-B3D7-785388A09DF0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Weather", "..\protocols\Weather\weather.vcxproj", "{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ping", "..\plugins\Ping\ping.vcxproj", "{F31BD1B6-EE9D-4F76-A047-F8AEADC26086}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fingerprint", "..\plugins\FingerprintNG\fingerprint_ng.vcxproj", "{AF7D71D4-19B7-42B8-91DD-701F155AC4AE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssocMgr", "..\plugins\AssocMgr\assocmgr.vcxproj", "{B57D997C-73E1-D5F7-ECCA-C204345C04A3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoRun", "..\plugins\AutoRun\autorun.vcxproj", "{00037ACC-F32D-4B5F-93A8-3CF0E277E377}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoShutdown", "..\plugins\AutoShutdown\shutdown.vcxproj", "{3F8EF54D-0593-4048-B0E5-C938F99B29F3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AvatarHistory", "..\plugins\AvatarHistory\AvatarHistory.vcxproj", "{9D702039-F4A9-4978-92B3-3615E5C44BEE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicHistory", "..\plugins\BasicHistory\BasicHistory.vcxproj", "{155211F8-08E1-4864-A3B8-9F04F4270360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BASS_interface", "..\plugins\BASS_interface\Bass_interface.vcxproj", "{3933E789-D185-41DC-8169-9FF4365B6015}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_blind", "..\plugins\Clist_blind\Clist_blind.vcxproj", "{2E15C462-A150-4A37-ACD6-FBAECF1724F5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartPosition", "..\plugins\StartPosition\StartPosition.vcxproj", "{046C5F80-ABE5-488F-BFC8-B024D4AACC8C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HTTPServer", "..\plugins\HTTPServer\HTTPServer_15.vcxproj", "{F7A70398-AFA0-4A58-B645-85268F9517DE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pu_stub", "..\plugins\PluginUpdater\pu_stub\pu_stub.vcxproj", "{121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotifyAnything", "..\plugins\NotifyAnything\NotifyAnything.vcxproj", "{F5E3FAFE-B650-4736-8D27-FA53866668C6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "..\libs\libcurl\libcurl.vcxproj", "{01F9E227-06F5-4BED-907F-402CA7DFAFE6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusChange", "..\plugins\StatusChange\StatusChange.vcxproj", "{D09881C7-E189-49AD-919E-F64355F8EFD0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyPounce", "..\plugins\BuddyPounce\buddypounce.vcxproj", "{FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MsgPopup", "..\plugins\MsgPopup\MsgPopup.vcxproj", "{1E702CF1-E52F-49F8-915A-FCBBCE554774}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NimContact", "..\protocols\Non-IM Contact\nimcontact.vcxproj", "{A556E0B5-73A1-4676-BA1F-133820DE7D5A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XSoundNotify", "..\plugins\XSoundNotify\XSoundNotify.vcxproj", "{5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YARelay", "..\plugins\YARelay\YARelay.vcxproj", "{AA5CA2D0-F096-4001-B1B6-439C7FC11E77}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeStatusChange", "..\plugins\SkypeStatusChange\SkypeStatusChange.vcxproj", "{10F78F26-2B20-4158-869F-CB29533B4C2C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wbOSD", "..\plugins\wbOSD\wbOSD.vcxproj", "{DA450122-7F0B-45DA-9EAA-421887AD8450}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "New_GPG", "..\plugins\New_GPG\new_gpg.vcxproj", "{F29D0C8D-141A-43CF-86B2-34A04653F8D4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spamotron", "..\plugins\Spamotron\Spamotron.vcxproj", "{DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LotusNotify", "..\protocols\LotusNotify\LotusNotify.vcxproj", "{0E046380-14CA-4C23-A807-8C678519A605}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirFox", "..\plugins\MirFox\MirFoxNG_15.vcxproj", "{3E9DA555-4C7B-463C-AD5C-214073DE29D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConnectionNotify", "..\protocols\ConnectionNotify\ConnectionNotify.vcxproj", "{3C83B0AB-9739-41C1-A127-ED7DB9551F76}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Exchange", "..\plugins\Exchange\Exchange.vcxproj", "{F462FDA1-BDCD-49B2-B996-D7DE71D07393}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebView", "..\protocols\WebView\webview.vcxproj", "{475ED6ED-C311-4188-ACB2-1C41830B22EE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShlExt", "..\plugins\ShellExt\shellext.vcxproj", "{B27B85B5-0EF1-496D-99D7-0702A98A342A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinterSpeak", "..\plugins\WinterSpeak\WinterSpeak.vcxproj", "{A44F96D0-A850-4A67-9570-0E9298A16E40}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKontakte", "..\protocols\VKontakte\vk.vcxproj", "{BF6E1942-7E42-4564-9DF5-FD0A00D71173}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartupSilence", "..\plugins\StartupSilence\StartupSilence.vcxproj", "{7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirandaG15", "..\plugins\MirandaG15\MirandaG15.vcxproj", "{8ACA3C8B-BDFA-47B2-8578-069555BA05B3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RemovePersonalSettings", "..\plugins\RemovePersonalSettings\rps.vcxproj", "{0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewAwaySys", "..\plugins\NewAwaySysMod\NewAwaySys.vcxproj", "{6A516E27-AC50-5374-756B-A1558DB2EFA9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryStats", "..\plugins\HistoryStats\historystats.vcxproj", "{B5BCDC2F-81FC-4324-90C6-E5540A225EFF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sametime", "..\protocols\Sametime\sametime.vcxproj", "{BE22A21F-73B7-453F-86A0-B867F0056490}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glib", "..\protocols\Sametime\src\glib\glib_15.vcxproj", "{12BCA020-EABF-429E-876A-A476BC9C10C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GmailNotifier", "..\protocols\GmailNotifier\GmailNotifier.vcxproj", "{EDAAD28B-505B-4969-A8BB-97EAE818DEEA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Pcre16", "..\libs\Pcre16\pcre16.vcxproj", "{6124E997-426E-4A0B-9617-D6D577D5E7D7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEHistory", "..\plugins\IEHistory\IEHistory.vcxproj", "{7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dummy", "..\protocols\Dummy\dummy.vcxproj", "{D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Steam", "..\protocols\Steam\Steam.vcxproj", "{8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HwHotKeys", "..\plugins\HwHotKeys\HwHotKeys.vcxproj", "{639E2B3A-64F2-4152-B5BB-12468E5D60B6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeWeb", "..\protocols\SkypeWeb\SkypeWeb.vcxproj", "{66A9BDEB-150F-45DC-B20F-9892C0B43834}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tox", "..\protocols\Tox\Tox.vcxproj", "{BCFAB658-326E-466D-995B-E76636C1DEA4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinecraftDynmap", "..\protocols\MinecraftDynmap\MinecraftDynmap.vcxproj", "{B4327D10-ACDC-4C12-9555-749DD49A7BB0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroSwitch", "..\plugins\ZeroSwitch\ZeroSwitch.vcxproj", "{D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MessageState", "..\plugins\MessageState\MessageState.vcxproj", "{D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirLua", "..\plugins\MirLua\MirLua.vcxproj", "{27D41D81-991F-4DC6-8749-B0321C87E694}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toaster", "..\plugins\Toaster\Toaster.vcxproj", "{1FDBD8F0-3929-41BC-92D1-020779460769}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\libs\liblua\liblua.vcxproj", "{BD291BF0-D804-4818-8311-DE871E6BCEAA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winapi", "..\plugins\MirLua\Modules\WinAPI\WinAPI.vcxproj", "{045BAC91-34D1-4B43-B52B-566801BE7F85}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hunspell", "..\libs\hunspell\hunspell.vcxproj", "{B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_popup", "..\plugins\MirLua\Modules\m_popup\m_popup.vcxproj", "{D5C9CA74-4E25-478A-B890-75EB13E6DB1C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_variables", "..\plugins\MirLua\Modules\m_variables\m_variables.vcxproj", "{E604CD58-4579-4F69-9D6A-2605FD7CF716}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusManager", "..\plugins\StatusManager\StatusManager.vcxproj", "{D2EF305F-5255-49E8-A738-D4206D62D2B8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CloudFile", "..\protocols\CloudFile\CloudFile.vcxproj", "{E876FE63-0701-4CDA-BED5-7C73A379C1D1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_schedule", "..\plugins\MirLua\Modules\m_schedule\m_schedule.vcxproj", "{FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_toptoolbar", "..\plugins\MirLua\Modules\m_toptoolbar\m_toptoolbar.vcxproj", "{277E433F-7D71-4247-8AAA-CC5FB1AA7A67}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsSingleWindow", "..\plugins\AsSingleWindow\AsSingleWindow.vcxproj", "{CE6A5A24-EA88-4E67-BDF2-22517528E43F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "..\libs\sqlite3\sqlite3.vcxproj", "{0C02E395-E73F-47E3-8B95-B7924C0C7A6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsodium", "..\libs\libsodium\libsodium.vcxproj", "{A185B162-6CB6-4502-B03F-B56F7699A8D9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads", "..\libs\pthreads\pthreads.vcxproj", "{E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtox", "..\protocols\Tox\libtox\libtox.vcxproj", "{A21C50CD-28A6-481A-A12B-47189FE66641}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileAsMessage", "..\plugins\FileAsMessage\fileecho.vcxproj", "{D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EmLanProto", "..\protocols\EmLanProto\emlanproto.vcxproj", "{2115FEBC-1EC4-4F95-A058-A523ED5295A4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mdbx", "..\plugins\Dbx_mdbx\dbx_mdbx.vcxproj", "{E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQCorp", "..\protocols\ICQCorp\ICQCorp.vcxproj", "{AD0D0500-CE7D-417D-9C36-3620D56CA6D4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeImage", "..\libs\freeimage\freeimage.vcxproj", "{5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MagneticWindows", "..\plugins\MagneticWindows\MagneticWindows.vcxproj", "{7DC23E4E-2448-4811-AABD-F5D069F6E74A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Protocols", "Protocols", "{A035B524-0F2D-45D0-BCF2-3C20279C77E2}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{E7FB43FB-3563-4568-8846-A88FC37449BF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{37EDFBEA-8446-4BF3-9F2E-655908CDFB62}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua", "Lua", "{329B4E94-C846-4C78-AFD5-8B6B839DCCE1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{F13387B0-1C74-48EC-9AEC-65E3B9DE29E4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Message edtors", "Message edtors", "{D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Contact lists", "Contact lists", "{F9C41695-3353-4564-A154-58106829B19C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Encryption", "Encryption", "{30218E20-9E62-4027-BB87-2627B17F6CA3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notifications", "Notifications", "{703CFA44-C8E8-4547-B597-AE239F4F6DD9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProxySwitch", "..\plugins\ProxySwitch\ProxySwitch.vcxproj", "{7446276D-5845-4258-A245-83D1D4D3CEC3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_sqlite", "..\plugins\Dbx_sqlite\dbx_sqlite.vcxproj", "{B3494FED-FB8C-43F4-B341-F26A3460203B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQ", "..\protocols\ICQ-WIM\ICQ-WIM.vcxproj", "{EFB2355B-82B3-4759-B7D8-95F8E9506291}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh2", "..\libs\libssh2\libssh2.vcxproj", "{B3BC3949-6949-41DE-94BF-B112FBFB1A84}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdPopup", "..\src\core\stdpopup\stdpopup.vcxproj", "{713067DF-65EE-480B-A000-B2A323495F16}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotesReminders", "..\plugins\NotesAndReminders\NotesReminders.vcxproj", "{EEB57129-946C-4B98-8856-FDA501AE2A5E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsignal", "..\libs\libsignal\libsignal.vcxproj", "{620E0BE7-3763-4F35-9DBD-4770104E269C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Facebook", "..\protocols\Facebook\facebook.vcxproj", "{86033E58-A1E3-43AD-AE8E-305E15E72A91}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewStory", "..\plugins\NewStory\NewStory.vcxproj", "{A7FAD273-8C71-4D72-A84F-2D160F2DC589}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbChecker", "..\plugins\DbChecker\dbchecker.vcxproj", "{A2E9DA24-95E4-4414-94AF-488A382E276A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickSearch", "..\plugins\QuickSearch\quicksearch.vcxproj", "{3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmdbx", "..\libs\libmdbx\libmdbx.vcxproj", "{6D19209B-ECE7-4B9C-941C-0AA2B484F199}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoiceService", "..\plugins\VoiceService\VoiceService.vcxproj", "{48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libqrencode", "..\libs\libqrencode\libqrencode.vcxproj", "{4D3554DE-6E14-4F94-A909-A4B19151A47E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhatsApp", "..\protocols\WhatsApp\WhatsApp.vcxproj", "{13E796AD-BEA4-4213-A1B8-E18E2397E544}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Telegram", "..\protocols\Telegram\Telegram.vcxproj", "{AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.ActiveCfg = Debug|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.Build.0 = Debug|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.ActiveCfg = Debug|x64 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.Build.0 = Debug|x64 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.ActiveCfg = Release|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.Build.0 = Release|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.ActiveCfg = Release|x64 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.Build.0 = Release|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.ActiveCfg = Debug|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.Build.0 = Debug|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.ActiveCfg = Debug|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.Build.0 = Debug|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.ActiveCfg = Release|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.Build.0 = Release|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.ActiveCfg = Release|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.Build.0 = Release|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.ActiveCfg = Debug|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.Build.0 = Debug|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.ActiveCfg = Debug|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.Build.0 = Debug|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.ActiveCfg = Release|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.Build.0 = Release|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.ActiveCfg = Release|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.Build.0 = Release|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.ActiveCfg = Debug|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.Build.0 = Debug|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.ActiveCfg = Debug|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.Build.0 = Debug|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.ActiveCfg = Release|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.Build.0 = Release|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.ActiveCfg = Release|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.Build.0 = Release|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.ActiveCfg = Debug|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.Build.0 = Debug|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.ActiveCfg = Debug|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.Build.0 = Debug|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.ActiveCfg = Release|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.Build.0 = Release|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.ActiveCfg = Release|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.Build.0 = Release|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.ActiveCfg = Debug|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.Build.0 = Debug|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.ActiveCfg = Debug|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.Build.0 = Debug|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.ActiveCfg = Release|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.Build.0 = Release|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.ActiveCfg = Release|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.Build.0 = Release|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.ActiveCfg = Debug|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.Build.0 = Debug|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.ActiveCfg = Debug|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.Build.0 = Debug|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.ActiveCfg = Release|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.Build.0 = Release|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.ActiveCfg = Release|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.Build.0 = Release|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.ActiveCfg = Debug|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.Build.0 = Debug|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.ActiveCfg = Debug|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.Build.0 = Debug|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.ActiveCfg = Release|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.Build.0 = Release|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.ActiveCfg = Release|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.Build.0 = Release|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.ActiveCfg = Debug|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.Build.0 = Debug|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.ActiveCfg = Debug|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.Build.0 = Debug|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.ActiveCfg = Release|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.Build.0 = Release|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.ActiveCfg = Release|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.Build.0 = Release|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.ActiveCfg = Debug|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.Build.0 = Debug|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.ActiveCfg = Debug|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.Build.0 = Debug|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.ActiveCfg = Release|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.Build.0 = Release|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.ActiveCfg = Release|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.Build.0 = Release|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.Build.0 = Debug|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.ActiveCfg = Debug|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.Build.0 = Debug|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.ActiveCfg = Release|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.Build.0 = Release|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.ActiveCfg = Release|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.Build.0 = Release|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.ActiveCfg = Debug|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.Build.0 = Debug|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.ActiveCfg = Debug|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.Build.0 = Debug|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.ActiveCfg = Release|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.Build.0 = Release|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.ActiveCfg = Release|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.Build.0 = Release|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.ActiveCfg = Debug|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.Build.0 = Debug|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.ActiveCfg = Debug|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.Build.0 = Debug|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.ActiveCfg = Release|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.Build.0 = Release|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.ActiveCfg = Release|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.Build.0 = Release|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.Build.0 = Debug|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.ActiveCfg = Debug|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.Build.0 = Debug|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.ActiveCfg = Release|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.Build.0 = Release|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.ActiveCfg = Release|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.Build.0 = Release|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.ActiveCfg = Debug|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.Build.0 = Debug|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.ActiveCfg = Debug|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.Build.0 = Debug|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.ActiveCfg = Release|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.Build.0 = Release|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.ActiveCfg = Release|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.Build.0 = Release|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.ActiveCfg = Debug|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.Build.0 = Debug|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.ActiveCfg = Debug|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.Build.0 = Debug|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.ActiveCfg = Release|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.Build.0 = Release|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.ActiveCfg = Release|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.Build.0 = Release|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.ActiveCfg = Debug|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.Build.0 = Debug|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.ActiveCfg = Debug|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.Build.0 = Debug|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.ActiveCfg = Release|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.Build.0 = Release|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.ActiveCfg = Release|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.Build.0 = Release|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.ActiveCfg = Debug|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.Build.0 = Debug|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.ActiveCfg = Debug|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.Build.0 = Debug|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.ActiveCfg = Release|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.Build.0 = Release|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.ActiveCfg = Release|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.Build.0 = Release|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.Build.0 = Debug|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.ActiveCfg = Debug|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.Build.0 = Debug|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.ActiveCfg = Release|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.Build.0 = Release|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.ActiveCfg = Release|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.Build.0 = Release|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.ActiveCfg = Debug|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.Build.0 = Debug|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.ActiveCfg = Debug|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.Build.0 = Debug|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.ActiveCfg = Release|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.Build.0 = Release|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.ActiveCfg = Release|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.Build.0 = Release|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.Build.0 = Debug|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.ActiveCfg = Debug|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.Build.0 = Debug|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.ActiveCfg = Release|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.Build.0 = Release|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.ActiveCfg = Release|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.Build.0 = Release|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.ActiveCfg = Debug|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.Build.0 = Debug|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.ActiveCfg = Debug|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.Build.0 = Debug|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.ActiveCfg = Release|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.Build.0 = Release|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.ActiveCfg = Release|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.Build.0 = Release|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.ActiveCfg = Debug|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.Build.0 = Debug|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.ActiveCfg = Debug|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.Build.0 = Debug|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.ActiveCfg = Release|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.Build.0 = Release|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.ActiveCfg = Release|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.Build.0 = Release|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.ActiveCfg = Debug|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.Build.0 = Debug|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.ActiveCfg = Debug|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.Build.0 = Debug|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.ActiveCfg = Release|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.Build.0 = Release|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.ActiveCfg = Release|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.Build.0 = Release|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.Build.0 = Debug|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.ActiveCfg = Debug|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.Build.0 = Debug|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.ActiveCfg = Release|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.Build.0 = Release|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.ActiveCfg = Release|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.Build.0 = Release|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.ActiveCfg = Debug|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.Build.0 = Debug|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.ActiveCfg = Debug|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.Build.0 = Debug|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.ActiveCfg = Release|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.Build.0 = Release|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.ActiveCfg = Release|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.Build.0 = Release|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.Build.0 = Debug|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.ActiveCfg = Debug|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.Build.0 = Debug|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.ActiveCfg = Release|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.Build.0 = Release|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.ActiveCfg = Release|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.Build.0 = Release|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.ActiveCfg = Debug|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.Build.0 = Debug|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.ActiveCfg = Debug|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.Build.0 = Debug|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.ActiveCfg = Release|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.Build.0 = Release|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.ActiveCfg = Release|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.Build.0 = Release|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.Build.0 = Debug|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.ActiveCfg = Debug|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.Build.0 = Debug|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.ActiveCfg = Release|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.Build.0 = Release|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.ActiveCfg = Release|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.Build.0 = Release|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.ActiveCfg = Debug|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.Build.0 = Debug|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.ActiveCfg = Debug|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.Build.0 = Debug|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.ActiveCfg = Release|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.Build.0 = Release|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.ActiveCfg = Release|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.Build.0 = Release|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.ActiveCfg = Debug|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.Build.0 = Debug|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.ActiveCfg = Debug|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.Build.0 = Debug|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.ActiveCfg = Release|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.Build.0 = Release|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.ActiveCfg = Release|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.Build.0 = Release|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.Build.0 = Debug|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.ActiveCfg = Debug|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.Build.0 = Debug|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.ActiveCfg = Release|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.Build.0 = Release|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.ActiveCfg = Release|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.Build.0 = Release|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.Build.0 = Debug|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.ActiveCfg = Debug|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.Build.0 = Debug|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.ActiveCfg = Release|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.Build.0 = Release|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.ActiveCfg = Release|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.Build.0 = Release|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.ActiveCfg = Debug|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.Build.0 = Debug|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.ActiveCfg = Debug|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.Build.0 = Debug|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.ActiveCfg = Release|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.Build.0 = Release|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.ActiveCfg = Release|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.Build.0 = Release|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.ActiveCfg = Debug|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.Build.0 = Debug|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.ActiveCfg = Debug|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.Build.0 = Debug|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.ActiveCfg = Release|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.Build.0 = Release|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.ActiveCfg = Release|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.Build.0 = Release|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.ActiveCfg = Debug|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.Build.0 = Debug|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.ActiveCfg = Debug|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.Build.0 = Debug|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.ActiveCfg = Release|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.Build.0 = Release|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.ActiveCfg = Release|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.Build.0 = Release|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.Build.0 = Debug|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.ActiveCfg = Debug|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.Build.0 = Debug|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.ActiveCfg = Release|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.Build.0 = Release|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.ActiveCfg = Release|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.Build.0 = Release|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.ActiveCfg = Debug|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.Build.0 = Debug|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.ActiveCfg = Debug|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.Build.0 = Debug|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.ActiveCfg = Release|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.Build.0 = Release|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.ActiveCfg = Release|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.Build.0 = Release|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.ActiveCfg = Debug|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.Build.0 = Debug|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.ActiveCfg = Debug|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.Build.0 = Debug|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.ActiveCfg = Release|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.Build.0 = Release|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.ActiveCfg = Release|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.Build.0 = Release|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.Build.0 = Debug|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.ActiveCfg = Debug|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.Build.0 = Debug|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.ActiveCfg = Release|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.Build.0 = Release|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.ActiveCfg = Release|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.Build.0 = Release|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.ActiveCfg = Debug|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.Build.0 = Debug|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.ActiveCfg = Debug|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.Build.0 = Debug|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.ActiveCfg = Release|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.Build.0 = Release|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.ActiveCfg = Release|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.Build.0 = Release|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.ActiveCfg = Debug|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.Build.0 = Debug|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.ActiveCfg = Debug|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.Build.0 = Debug|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.ActiveCfg = Release|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.Build.0 = Release|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.ActiveCfg = Release|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.Build.0 = Release|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.ActiveCfg = Debug|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.Build.0 = Debug|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.ActiveCfg = Debug|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.Build.0 = Debug|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.ActiveCfg = Release|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.Build.0 = Release|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.ActiveCfg = Release|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.Build.0 = Release|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.ActiveCfg = Debug|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.Build.0 = Debug|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.ActiveCfg = Debug|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.Build.0 = Debug|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.ActiveCfg = Release|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.Build.0 = Release|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.ActiveCfg = Release|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.Build.0 = Release|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.ActiveCfg = Debug|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.Build.0 = Debug|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.ActiveCfg = Debug|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.Build.0 = Debug|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.ActiveCfg = Release|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.Build.0 = Release|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.ActiveCfg = Release|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.Build.0 = Release|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.ActiveCfg = Debug|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.Build.0 = Debug|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.ActiveCfg = Release|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.Build.0 = Release|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.Build.0 = Debug|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.ActiveCfg = Debug|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.Build.0 = Debug|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.ActiveCfg = Release|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.Build.0 = Release|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.ActiveCfg = Release|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.Build.0 = Release|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.ActiveCfg = Debug|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.Build.0 = Debug|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.ActiveCfg = Debug|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.Build.0 = Debug|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.ActiveCfg = Release|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.Build.0 = Release|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.ActiveCfg = Release|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.Build.0 = Release|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.ActiveCfg = Debug|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.Build.0 = Debug|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.ActiveCfg = Debug|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.Build.0 = Debug|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.ActiveCfg = Release|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.Build.0 = Release|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.ActiveCfg = Release|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.Build.0 = Release|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.ActiveCfg = Debug|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.Build.0 = Debug|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.ActiveCfg = Debug|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.Build.0 = Debug|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.ActiveCfg = Release|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.Build.0 = Release|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.ActiveCfg = Release|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.Build.0 = Release|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.Build.0 = Debug|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.ActiveCfg = Debug|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.Build.0 = Debug|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.ActiveCfg = Release|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.Build.0 = Release|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.ActiveCfg = Release|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.Build.0 = Release|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.ActiveCfg = Debug|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.Build.0 = Debug|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.ActiveCfg = Debug|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.Build.0 = Debug|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.ActiveCfg = Release|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.Build.0 = Release|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.ActiveCfg = Release|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.Build.0 = Release|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.ActiveCfg = Debug|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.Build.0 = Debug|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.ActiveCfg = Debug|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.Build.0 = Debug|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.ActiveCfg = Release|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.Build.0 = Release|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.ActiveCfg = Release|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.Build.0 = Release|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.ActiveCfg = Debug|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.Build.0 = Debug|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.ActiveCfg = Debug|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.Build.0 = Debug|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.ActiveCfg = Release|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.Build.0 = Release|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.ActiveCfg = Release|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.Build.0 = Release|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.Build.0 = Debug|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.ActiveCfg = Debug|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.Build.0 = Debug|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.ActiveCfg = Release|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.Build.0 = Release|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.ActiveCfg = Release|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.Build.0 = Release|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.Build.0 = Debug|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.ActiveCfg = Debug|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.Build.0 = Debug|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.ActiveCfg = Release|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.Build.0 = Release|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.ActiveCfg = Release|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.Build.0 = Release|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.ActiveCfg = Debug|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.Build.0 = Debug|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.ActiveCfg = Debug|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.Build.0 = Debug|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.ActiveCfg = Release|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.Build.0 = Release|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.ActiveCfg = Release|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.Build.0 = Release|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.ActiveCfg = Debug|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.Build.0 = Debug|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.ActiveCfg = Debug|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.Build.0 = Debug|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.ActiveCfg = Release|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.Build.0 = Release|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.ActiveCfg = Release|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.Build.0 = Release|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.ActiveCfg = Debug|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.Build.0 = Debug|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.ActiveCfg = Debug|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.Build.0 = Debug|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.ActiveCfg = Release|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.Build.0 = Release|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.ActiveCfg = Release|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.Build.0 = Release|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.ActiveCfg = Debug|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.Build.0 = Debug|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.ActiveCfg = Debug|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.Build.0 = Debug|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.ActiveCfg = Release|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.Build.0 = Release|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.ActiveCfg = Release|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.Build.0 = Release|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.Build.0 = Debug|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.ActiveCfg = Debug|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.Build.0 = Debug|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.ActiveCfg = Release|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.Build.0 = Release|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.ActiveCfg = Release|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.Build.0 = Release|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.Build.0 = Debug|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.ActiveCfg = Debug|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.Build.0 = Debug|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.ActiveCfg = Release|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.Build.0 = Release|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.ActiveCfg = Release|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.Build.0 = Release|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.ActiveCfg = Debug|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.Build.0 = Debug|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.ActiveCfg = Debug|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.Build.0 = Debug|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.ActiveCfg = Release|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.Build.0 = Release|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.ActiveCfg = Release|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.Build.0 = Release|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.ActiveCfg = Debug|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.Build.0 = Debug|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.ActiveCfg = Debug|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.Build.0 = Debug|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.ActiveCfg = Release|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.Build.0 = Release|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.ActiveCfg = Release|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.Build.0 = Release|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.Build.0 = Debug|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.ActiveCfg = Debug|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.Build.0 = Debug|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.ActiveCfg = Release|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.Build.0 = Release|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.ActiveCfg = Release|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.Build.0 = Release|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.Build.0 = Debug|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.ActiveCfg = Debug|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.Build.0 = Debug|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.ActiveCfg = Release|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.Build.0 = Release|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.ActiveCfg = Release|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.Build.0 = Release|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.ActiveCfg = Debug|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.Build.0 = Debug|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.ActiveCfg = Debug|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.Build.0 = Debug|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.ActiveCfg = Release|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.Build.0 = Release|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.ActiveCfg = Release|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.Build.0 = Release|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.Build.0 = Debug|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.ActiveCfg = Debug|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.Build.0 = Debug|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.ActiveCfg = Release|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.Build.0 = Release|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.ActiveCfg = Release|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.Build.0 = Release|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.Build.0 = Debug|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.ActiveCfg = Debug|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.Build.0 = Debug|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.ActiveCfg = Release|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.Build.0 = Release|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.ActiveCfg = Release|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.Build.0 = Release|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.ActiveCfg = Debug|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.Build.0 = Debug|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.ActiveCfg = Debug|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.Build.0 = Debug|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.ActiveCfg = Release|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.Build.0 = Release|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.ActiveCfg = Release|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.Build.0 = Release|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.ActiveCfg = Debug|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.Build.0 = Debug|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.ActiveCfg = Debug|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.Build.0 = Debug|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.ActiveCfg = Release|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.Build.0 = Release|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.ActiveCfg = Release|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.Build.0 = Release|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.ActiveCfg = Debug|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.Build.0 = Debug|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.ActiveCfg = Debug|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.Build.0 = Debug|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.ActiveCfg = Release|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.Build.0 = Release|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.ActiveCfg = Release|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.Build.0 = Release|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.ActiveCfg = Debug|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.Build.0 = Debug|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.ActiveCfg = Debug|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.Build.0 = Debug|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.ActiveCfg = Release|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.Build.0 = Release|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.ActiveCfg = Release|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.Build.0 = Release|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.ActiveCfg = Debug|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.Build.0 = Debug|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.ActiveCfg = Debug|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.Build.0 = Debug|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.ActiveCfg = Release|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.Build.0 = Release|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.ActiveCfg = Release|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.Build.0 = Release|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.ActiveCfg = Debug|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.Build.0 = Debug|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.ActiveCfg = Debug|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.Build.0 = Debug|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.ActiveCfg = Release|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.Build.0 = Release|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.ActiveCfg = Release|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.Build.0 = Release|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.ActiveCfg = Debug|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.Build.0 = Debug|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.ActiveCfg = Debug|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.Build.0 = Debug|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.ActiveCfg = Release|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.Build.0 = Release|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.ActiveCfg = Release|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.Build.0 = Release|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.ActiveCfg = Debug|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.Build.0 = Debug|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.ActiveCfg = Debug|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.Build.0 = Debug|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.ActiveCfg = Release|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.Build.0 = Release|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.ActiveCfg = Release|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.Build.0 = Release|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.ActiveCfg = Debug|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.Build.0 = Debug|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.ActiveCfg = Debug|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.Build.0 = Debug|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.ActiveCfg = Release|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.Build.0 = Release|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.ActiveCfg = Release|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.Build.0 = Release|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.Build.0 = Debug|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.ActiveCfg = Debug|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.Build.0 = Debug|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.ActiveCfg = Release|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.Build.0 = Release|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.ActiveCfg = Release|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.Build.0 = Release|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.ActiveCfg = Debug|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.Build.0 = Debug|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.ActiveCfg = Debug|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.Build.0 = Debug|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.ActiveCfg = Release|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.Build.0 = Release|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.ActiveCfg = Release|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.Build.0 = Release|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.ActiveCfg = Debug|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.Build.0 = Debug|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.ActiveCfg = Debug|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.Build.0 = Debug|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.ActiveCfg = Release|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.Build.0 = Release|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.ActiveCfg = Release|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.Build.0 = Release|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.ActiveCfg = Debug|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.Build.0 = Debug|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.ActiveCfg = Debug|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.Build.0 = Debug|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.ActiveCfg = Release|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.Build.0 = Release|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.ActiveCfg = Release|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.Build.0 = Release|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.ActiveCfg = Debug|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.Build.0 = Debug|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.ActiveCfg = Debug|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.Build.0 = Debug|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.ActiveCfg = Release|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.Build.0 = Release|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.ActiveCfg = Release|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.Build.0 = Release|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.ActiveCfg = Debug|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.Build.0 = Debug|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.ActiveCfg = Debug|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.Build.0 = Debug|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.ActiveCfg = Release|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.Build.0 = Release|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.ActiveCfg = Release|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.Build.0 = Release|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.ActiveCfg = Debug|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.Build.0 = Debug|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.ActiveCfg = Debug|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.Build.0 = Debug|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.ActiveCfg = Release|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.Build.0 = Release|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.ActiveCfg = Release|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.Build.0 = Release|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.ActiveCfg = Debug|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.Build.0 = Debug|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.ActiveCfg = Debug|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.Build.0 = Debug|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.ActiveCfg = Release|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.Build.0 = Release|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.ActiveCfg = Release|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.Build.0 = Release|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.ActiveCfg = Debug|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.Build.0 = Debug|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.ActiveCfg = Debug|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.Build.0 = Debug|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.ActiveCfg = Release|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.Build.0 = Release|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.ActiveCfg = Release|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.Build.0 = Release|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.ActiveCfg = Debug|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.Build.0 = Debug|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.ActiveCfg = Debug|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.Build.0 = Debug|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.ActiveCfg = Release|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.Build.0 = Release|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.ActiveCfg = Release|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.Build.0 = Release|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.ActiveCfg = Debug|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.Build.0 = Debug|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.ActiveCfg = Debug|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.Build.0 = Debug|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.ActiveCfg = Release|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.Build.0 = Release|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.ActiveCfg = Release|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.Build.0 = Release|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.ActiveCfg = Debug|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.Build.0 = Debug|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.ActiveCfg = Debug|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.Build.0 = Debug|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.ActiveCfg = Release|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.Build.0 = Release|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.ActiveCfg = Release|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.Build.0 = Release|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.ActiveCfg = Debug|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.Build.0 = Debug|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.ActiveCfg = Debug|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.Build.0 = Debug|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.ActiveCfg = Release|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.Build.0 = Release|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.ActiveCfg = Release|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.Build.0 = Release|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.ActiveCfg = Debug|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.Build.0 = Debug|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.ActiveCfg = Debug|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.Build.0 = Debug|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.ActiveCfg = Release|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.Build.0 = Release|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.ActiveCfg = Release|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.Build.0 = Release|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.ActiveCfg = Debug|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.Build.0 = Debug|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.ActiveCfg = Debug|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.Build.0 = Debug|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.ActiveCfg = Release|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.Build.0 = Release|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.ActiveCfg = Release|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.Build.0 = Release|x64 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.ActiveCfg = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.Build.0 = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.ActiveCfg = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.Build.0 = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.ActiveCfg = Release|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.Build.0 = Release|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.ActiveCfg = Release|x64 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.Build.0 = Release|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.ActiveCfg = Debug|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.Build.0 = Debug|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.ActiveCfg = Debug|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.Build.0 = Debug|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.ActiveCfg = Release|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.Build.0 = Release|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.ActiveCfg = Release|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.Build.0 = Release|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.ActiveCfg = Debug|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.Build.0 = Debug|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.ActiveCfg = Debug|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.Build.0 = Debug|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.ActiveCfg = Release|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.Build.0 = Release|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.ActiveCfg = Release|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.Build.0 = Release|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.ActiveCfg = Debug|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.Build.0 = Debug|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.ActiveCfg = Debug|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.Build.0 = Debug|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.ActiveCfg = Release|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.Build.0 = Release|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.ActiveCfg = Release|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.Build.0 = Release|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.Build.0 = Debug|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.ActiveCfg = Debug|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.Build.0 = Debug|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.ActiveCfg = Release|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.Build.0 = Release|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.ActiveCfg = Release|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.Build.0 = Release|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.Build.0 = Debug|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.ActiveCfg = Debug|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.Build.0 = Debug|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.ActiveCfg = Release|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.Build.0 = Release|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.ActiveCfg = Release|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.Build.0 = Release|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.ActiveCfg = Debug|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.Build.0 = Debug|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.ActiveCfg = Debug|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.Build.0 = Debug|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.ActiveCfg = Release|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.Build.0 = Release|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.ActiveCfg = Release|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.Build.0 = Release|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.ActiveCfg = Debug|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.Build.0 = Debug|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.ActiveCfg = Debug|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.Build.0 = Debug|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.ActiveCfg = Release|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.Build.0 = Release|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.ActiveCfg = Release|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.Build.0 = Release|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.ActiveCfg = Debug|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.Build.0 = Debug|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.ActiveCfg = Debug|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.Build.0 = Debug|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.ActiveCfg = Release|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.Build.0 = Release|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.ActiveCfg = Release|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.Build.0 = Release|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.ActiveCfg = Debug|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.Build.0 = Debug|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.ActiveCfg = Debug|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.Build.0 = Debug|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.ActiveCfg = Release|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.Build.0 = Release|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.ActiveCfg = Release|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.Build.0 = Release|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.ActiveCfg = Debug|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.Build.0 = Debug|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.ActiveCfg = Debug|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.Build.0 = Debug|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.ActiveCfg = Release|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.Build.0 = Release|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.ActiveCfg = Release|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.Build.0 = Release|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.Build.0 = Debug|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.ActiveCfg = Debug|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.Build.0 = Debug|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.ActiveCfg = Release|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.Build.0 = Release|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.ActiveCfg = Release|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.Build.0 = Release|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.ActiveCfg = Debug|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.Build.0 = Debug|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.ActiveCfg = Debug|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.Build.0 = Debug|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.ActiveCfg = Release|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.Build.0 = Release|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.ActiveCfg = Release|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.Build.0 = Release|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.ActiveCfg = Debug|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.Build.0 = Debug|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.ActiveCfg = Debug|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.Build.0 = Debug|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.ActiveCfg = Release|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.Build.0 = Release|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.ActiveCfg = Release|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.Build.0 = Release|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.Build.0 = Debug|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.ActiveCfg = Debug|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.Build.0 = Debug|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.ActiveCfg = Release|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.Build.0 = Release|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.ActiveCfg = Release|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.Build.0 = Release|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.Build.0 = Debug|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.ActiveCfg = Debug|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.Build.0 = Debug|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.ActiveCfg = Release|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.Build.0 = Release|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.ActiveCfg = Release|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.Build.0 = Release|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.Build.0 = Debug|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.ActiveCfg = Debug|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.Build.0 = Debug|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.ActiveCfg = Release|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.Build.0 = Release|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.ActiveCfg = Release|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.Build.0 = Release|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.ActiveCfg = Debug|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.Build.0 = Debug|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.ActiveCfg = Debug|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.Build.0 = Debug|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.ActiveCfg = Release|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.Build.0 = Release|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.ActiveCfg = Release|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.Build.0 = Release|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.ActiveCfg = Debug|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.Build.0 = Debug|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.ActiveCfg = Debug|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.Build.0 = Debug|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.ActiveCfg = Release|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.Build.0 = Release|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.ActiveCfg = Release|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.Build.0 = Release|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.ActiveCfg = Debug|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.Build.0 = Debug|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.ActiveCfg = Debug|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.Build.0 = Debug|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.ActiveCfg = Release|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.Build.0 = Release|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.ActiveCfg = Release|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.Build.0 = Release|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.ActiveCfg = Debug|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.Build.0 = Debug|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.ActiveCfg = Debug|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.Build.0 = Debug|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.ActiveCfg = Release|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.Build.0 = Release|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.ActiveCfg = Release|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.Build.0 = Release|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.Build.0 = Debug|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.ActiveCfg = Debug|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.Build.0 = Debug|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.ActiveCfg = Release|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.Build.0 = Release|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.ActiveCfg = Release|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.Build.0 = Release|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.ActiveCfg = Debug|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.Build.0 = Debug|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.ActiveCfg = Debug|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.Build.0 = Debug|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.ActiveCfg = Release|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.Build.0 = Release|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.ActiveCfg = Release|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.Build.0 = Release|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.ActiveCfg = Debug|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.Build.0 = Debug|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.ActiveCfg = Debug|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.Build.0 = Debug|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.ActiveCfg = Release|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.Build.0 = Release|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.ActiveCfg = Release|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.Build.0 = Release|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.ActiveCfg = Debug|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.Build.0 = Debug|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.ActiveCfg = Debug|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.Build.0 = Debug|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.ActiveCfg = Release|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.Build.0 = Release|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.ActiveCfg = Release|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.Build.0 = Release|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.ActiveCfg = Debug|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.Build.0 = Debug|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.ActiveCfg = Debug|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.Build.0 = Debug|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.ActiveCfg = Release|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.Build.0 = Release|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.ActiveCfg = Release|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.Build.0 = Release|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.Build.0 = Debug|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.ActiveCfg = Debug|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.Build.0 = Debug|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.ActiveCfg = Release|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.Build.0 = Release|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.ActiveCfg = Release|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.Build.0 = Release|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.Build.0 = Debug|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.ActiveCfg = Debug|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.Build.0 = Debug|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.ActiveCfg = Release|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.Build.0 = Release|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.ActiveCfg = Release|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.Build.0 = Release|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.ActiveCfg = Debug|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.Build.0 = Debug|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.ActiveCfg = Debug|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.Build.0 = Debug|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.ActiveCfg = Release|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.Build.0 = Release|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.ActiveCfg = Release|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.Build.0 = Release|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.Build.0 = Debug|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.ActiveCfg = Debug|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.Build.0 = Debug|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.ActiveCfg = Release|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.Build.0 = Release|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.ActiveCfg = Release|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.Build.0 = Release|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.ActiveCfg = Debug|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.Build.0 = Debug|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.ActiveCfg = Debug|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.Build.0 = Debug|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.ActiveCfg = Release|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.Build.0 = Release|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.ActiveCfg = Release|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.Build.0 = Release|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.ActiveCfg = Debug|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.Build.0 = Debug|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.ActiveCfg = Debug|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.Build.0 = Debug|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.ActiveCfg = Release|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.Build.0 = Release|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.ActiveCfg = Release|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.Build.0 = Release|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.ActiveCfg = Debug|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.Build.0 = Debug|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.ActiveCfg = Debug|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.Build.0 = Debug|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.ActiveCfg = Release|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.Build.0 = Release|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.ActiveCfg = Release|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.Build.0 = Release|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.ActiveCfg = Debug|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.Build.0 = Debug|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.ActiveCfg = Debug|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.Build.0 = Debug|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.ActiveCfg = Release|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.Build.0 = Release|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.ActiveCfg = Release|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.Build.0 = Release|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.ActiveCfg = Debug|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.Build.0 = Debug|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.ActiveCfg = Debug|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.Build.0 = Debug|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.ActiveCfg = Release|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.Build.0 = Release|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.ActiveCfg = Release|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.Build.0 = Release|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.ActiveCfg = Debug|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.Build.0 = Debug|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.ActiveCfg = Debug|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.Build.0 = Debug|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.ActiveCfg = Release|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.Build.0 = Release|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.ActiveCfg = Release|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.Build.0 = Release|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.Build.0 = Debug|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.ActiveCfg = Debug|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.Build.0 = Debug|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.ActiveCfg = Release|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.Build.0 = Release|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.ActiveCfg = Release|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.Build.0 = Release|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.ActiveCfg = Debug|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.Build.0 = Debug|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.ActiveCfg = Debug|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.Build.0 = Debug|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.ActiveCfg = Release|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.Build.0 = Release|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.ActiveCfg = Release|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.Build.0 = Release|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.Build.0 = Debug|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.ActiveCfg = Debug|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.Build.0 = Debug|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.ActiveCfg = Release|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.Build.0 = Release|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.ActiveCfg = Release|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.Build.0 = Release|x64 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.ActiveCfg = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.Build.0 = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.ActiveCfg = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.Build.0 = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.ActiveCfg = Release|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.Build.0 = Release|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.ActiveCfg = Release|x64 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.Build.0 = Release|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.ActiveCfg = Debug|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.Build.0 = Debug|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.ActiveCfg = Debug|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.Build.0 = Debug|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.ActiveCfg = Release|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.Build.0 = Release|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.ActiveCfg = Release|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.Build.0 = Release|x64 - {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.Build.0 = Debug|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Debug|x64.ActiveCfg = Debug|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.ActiveCfg = Release|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.Build.0 = Release|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Release|x64.ActiveCfg = Release|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.Build.0 = Debug|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.ActiveCfg = Debug|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.Build.0 = Debug|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.ActiveCfg = Release|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.Build.0 = Release|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.ActiveCfg = Release|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.Build.0 = Release|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.Build.0 = Debug|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.ActiveCfg = Debug|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.Build.0 = Debug|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.ActiveCfg = Release|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.Build.0 = Release|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.ActiveCfg = Release|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.Build.0 = Release|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.ActiveCfg = Debug|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.Build.0 = Debug|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.ActiveCfg = Debug|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.Build.0 = Debug|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.ActiveCfg = Release|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.Build.0 = Release|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.ActiveCfg = Release|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.Build.0 = Release|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.ActiveCfg = Debug|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.Build.0 = Debug|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.ActiveCfg = Debug|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.Build.0 = Debug|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.ActiveCfg = Release|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.Build.0 = Release|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.ActiveCfg = Release|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.Build.0 = Release|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.ActiveCfg = Debug|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.Build.0 = Debug|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.ActiveCfg = Debug|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.Build.0 = Debug|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.ActiveCfg = Release|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.Build.0 = Release|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.ActiveCfg = Release|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.Build.0 = Release|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.ActiveCfg = Debug|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.Build.0 = Debug|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.ActiveCfg = Debug|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.Build.0 = Debug|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.ActiveCfg = Release|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.Build.0 = Release|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.ActiveCfg = Release|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.Build.0 = Release|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.Build.0 = Debug|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.ActiveCfg = Debug|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.Build.0 = Debug|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.ActiveCfg = Release|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.Build.0 = Release|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.ActiveCfg = Release|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.Build.0 = Release|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.Build.0 = Debug|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.ActiveCfg = Debug|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.Build.0 = Debug|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.ActiveCfg = Release|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.Build.0 = Release|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.ActiveCfg = Release|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.Build.0 = Release|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.ActiveCfg = Debug|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.Build.0 = Debug|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.ActiveCfg = Debug|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.Build.0 = Debug|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.ActiveCfg = Release|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.Build.0 = Release|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.ActiveCfg = Release|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.Build.0 = Release|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.ActiveCfg = Debug|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.Build.0 = Debug|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.ActiveCfg = Debug|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.Build.0 = Debug|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.ActiveCfg = Release|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.Build.0 = Release|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.ActiveCfg = Release|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.Build.0 = Release|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.ActiveCfg = Debug|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.Build.0 = Debug|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.ActiveCfg = Debug|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.Build.0 = Debug|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.ActiveCfg = Release|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.Build.0 = Release|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.ActiveCfg = Release|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.Build.0 = Release|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.ActiveCfg = Debug|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.Build.0 = Debug|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.ActiveCfg = Debug|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.Build.0 = Debug|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.ActiveCfg = Release|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.Build.0 = Release|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.ActiveCfg = Release|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.Build.0 = Release|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.ActiveCfg = Debug|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.Build.0 = Debug|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.ActiveCfg = Debug|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.Build.0 = Debug|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.ActiveCfg = Release|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.Build.0 = Release|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.ActiveCfg = Release|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.Build.0 = Release|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.Build.0 = Debug|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.ActiveCfg = Debug|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.Build.0 = Debug|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.ActiveCfg = Release|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.Build.0 = Release|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.ActiveCfg = Release|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.Build.0 = Release|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.ActiveCfg = Debug|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.Build.0 = Debug|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.ActiveCfg = Debug|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.Build.0 = Debug|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.ActiveCfg = Release|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.Build.0 = Release|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.ActiveCfg = Release|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.Build.0 = Release|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.ActiveCfg = Debug|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.Build.0 = Debug|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.ActiveCfg = Debug|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.Build.0 = Debug|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.ActiveCfg = Release|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.Build.0 = Release|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.ActiveCfg = Release|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.Build.0 = Release|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.ActiveCfg = Debug|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.Build.0 = Debug|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.ActiveCfg = Debug|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.Build.0 = Debug|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.ActiveCfg = Release|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.Build.0 = Release|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.ActiveCfg = Release|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.Build.0 = Release|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.ActiveCfg = Debug|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.Build.0 = Debug|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.ActiveCfg = Debug|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.Build.0 = Debug|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.ActiveCfg = Release|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.Build.0 = Release|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.ActiveCfg = Release|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.Build.0 = Release|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.ActiveCfg = Debug|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.Build.0 = Debug|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.ActiveCfg = Debug|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.Build.0 = Debug|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.ActiveCfg = Release|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.Build.0 = Release|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.ActiveCfg = Release|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.Build.0 = Release|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.ActiveCfg = Debug|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.Build.0 = Debug|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.ActiveCfg = Debug|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.Build.0 = Debug|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.ActiveCfg = Release|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.Build.0 = Release|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.ActiveCfg = Release|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.Build.0 = Release|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.ActiveCfg = Debug|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.Build.0 = Debug|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.ActiveCfg = Debug|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.Build.0 = Debug|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.ActiveCfg = Release|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.Build.0 = Release|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.ActiveCfg = Release|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.Build.0 = Release|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.ActiveCfg = Debug|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.Build.0 = Debug|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.ActiveCfg = Debug|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.Build.0 = Debug|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.ActiveCfg = Release|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.Build.0 = Release|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.ActiveCfg = Release|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.Build.0 = Release|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.ActiveCfg = Debug|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.Build.0 = Debug|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.ActiveCfg = Debug|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.Build.0 = Debug|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.ActiveCfg = Release|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.Build.0 = Release|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.ActiveCfg = Release|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.Build.0 = Release|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.Build.0 = Debug|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.ActiveCfg = Debug|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.Build.0 = Debug|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.ActiveCfg = Release|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.Build.0 = Release|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.ActiveCfg = Release|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.Build.0 = Release|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.Build.0 = Debug|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.ActiveCfg = Debug|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.Build.0 = Debug|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.ActiveCfg = Release|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.Build.0 = Release|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.ActiveCfg = Release|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.Build.0 = Release|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.ActiveCfg = Debug|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.Build.0 = Debug|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.ActiveCfg = Debug|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.Build.0 = Debug|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.ActiveCfg = Release|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.Build.0 = Release|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.ActiveCfg = Release|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.Build.0 = Release|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.ActiveCfg = Debug|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.Build.0 = Debug|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.ActiveCfg = Debug|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.Build.0 = Debug|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.ActiveCfg = Release|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.Build.0 = Release|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.ActiveCfg = Release|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.Build.0 = Release|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.Build.0 = Debug|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.ActiveCfg = Debug|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.Build.0 = Debug|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.ActiveCfg = Release|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.Build.0 = Release|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.ActiveCfg = Release|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.Build.0 = Release|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.ActiveCfg = Debug|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.Build.0 = Debug|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.ActiveCfg = Debug|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.Build.0 = Debug|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.ActiveCfg = Release|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.Build.0 = Release|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.ActiveCfg = Release|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.Build.0 = Release|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.Build.0 = Debug|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.ActiveCfg = Debug|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.Build.0 = Debug|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.ActiveCfg = Release|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.Build.0 = Release|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.ActiveCfg = Release|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.Build.0 = Release|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.ActiveCfg = Debug|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.Build.0 = Debug|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.ActiveCfg = Debug|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.Build.0 = Debug|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.ActiveCfg = Release|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.Build.0 = Release|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.ActiveCfg = Release|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.Build.0 = Release|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.ActiveCfg = Debug|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.Build.0 = Debug|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.ActiveCfg = Debug|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.Build.0 = Debug|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.ActiveCfg = Release|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.Build.0 = Release|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.ActiveCfg = Release|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.Build.0 = Release|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.ActiveCfg = Debug|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.Build.0 = Debug|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.ActiveCfg = Debug|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.Build.0 = Debug|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.ActiveCfg = Release|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.Build.0 = Release|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.ActiveCfg = Release|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.Build.0 = Release|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.ActiveCfg = Debug|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.Build.0 = Debug|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.ActiveCfg = Debug|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.Build.0 = Debug|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.ActiveCfg = Release|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.Build.0 = Release|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.ActiveCfg = Release|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.Build.0 = Release|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.Build.0 = Debug|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.ActiveCfg = Debug|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.Build.0 = Debug|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.ActiveCfg = Release|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.Build.0 = Release|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.ActiveCfg = Release|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.Build.0 = Release|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.ActiveCfg = Debug|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.Build.0 = Debug|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.ActiveCfg = Debug|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.Build.0 = Debug|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.ActiveCfg = Release|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.Build.0 = Release|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.ActiveCfg = Release|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.Build.0 = Release|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.ActiveCfg = Debug|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.Build.0 = Debug|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.ActiveCfg = Debug|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.Build.0 = Debug|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.ActiveCfg = Release|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.Build.0 = Release|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.ActiveCfg = Release|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.Build.0 = Release|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.Build.0 = Debug|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.ActiveCfg = Debug|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.Build.0 = Debug|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.ActiveCfg = Release|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.Build.0 = Release|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.ActiveCfg = Release|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.Build.0 = Release|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.Build.0 = Debug|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.ActiveCfg = Debug|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.Build.0 = Debug|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.ActiveCfg = Release|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.Build.0 = Release|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.ActiveCfg = Release|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.Build.0 = Release|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.ActiveCfg = Debug|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.Build.0 = Debug|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.ActiveCfg = Debug|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.Build.0 = Debug|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.ActiveCfg = Release|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.Build.0 = Release|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.ActiveCfg = Release|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.Build.0 = Release|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.ActiveCfg = Debug|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.Build.0 = Debug|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.ActiveCfg = Debug|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.Build.0 = Debug|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.ActiveCfg = Release|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.Build.0 = Release|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.ActiveCfg = Release|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.Build.0 = Release|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.Build.0 = Debug|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.ActiveCfg = Debug|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.Build.0 = Debug|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.ActiveCfg = Release|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.Build.0 = Release|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.ActiveCfg = Release|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.Build.0 = Release|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.ActiveCfg = Debug|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.Build.0 = Debug|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.ActiveCfg = Debug|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.Build.0 = Debug|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.ActiveCfg = Release|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.Build.0 = Release|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.ActiveCfg = Release|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.Build.0 = Release|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.ActiveCfg = Debug|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.Build.0 = Debug|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.ActiveCfg = Debug|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.Build.0 = Debug|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.ActiveCfg = Release|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.Build.0 = Release|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.ActiveCfg = Release|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.Build.0 = Release|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.Build.0 = Debug|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.ActiveCfg = Debug|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.Build.0 = Debug|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.ActiveCfg = Release|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.Build.0 = Release|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.ActiveCfg = Release|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.Build.0 = Release|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.Build.0 = Debug|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.ActiveCfg = Debug|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.Build.0 = Debug|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.ActiveCfg = Release|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.Build.0 = Release|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.ActiveCfg = Release|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.Build.0 = Release|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.ActiveCfg = Debug|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.Build.0 = Debug|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.ActiveCfg = Debug|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.Build.0 = Debug|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.ActiveCfg = Release|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.Build.0 = Release|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.ActiveCfg = Release|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.Build.0 = Release|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.ActiveCfg = Debug|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.Build.0 = Debug|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.ActiveCfg = Debug|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.Build.0 = Debug|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.ActiveCfg = Release|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.Build.0 = Release|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.ActiveCfg = Release|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.Build.0 = Release|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.Build.0 = Debug|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.ActiveCfg = Debug|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.Build.0 = Debug|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.ActiveCfg = Release|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.Build.0 = Release|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.ActiveCfg = Release|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.Build.0 = Release|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.ActiveCfg = Debug|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.Build.0 = Debug|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.ActiveCfg = Debug|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.Build.0 = Debug|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.ActiveCfg = Release|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.Build.0 = Release|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.ActiveCfg = Release|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.Build.0 = Release|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.Build.0 = Debug|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.ActiveCfg = Debug|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.Build.0 = Debug|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.ActiveCfg = Release|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.Build.0 = Release|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.ActiveCfg = Release|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.Build.0 = Release|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.ActiveCfg = Debug|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.Build.0 = Debug|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.ActiveCfg = Debug|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.Build.0 = Debug|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.ActiveCfg = Release|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.Build.0 = Release|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.ActiveCfg = Release|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.Build.0 = Release|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.ActiveCfg = Debug|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.Build.0 = Debug|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.ActiveCfg = Debug|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.Build.0 = Debug|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.ActiveCfg = Release|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.Build.0 = Release|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.ActiveCfg = Release|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.Build.0 = Release|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.ActiveCfg = Debug|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.Build.0 = Debug|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.ActiveCfg = Debug|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.Build.0 = Debug|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.ActiveCfg = Release|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.Build.0 = Release|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.ActiveCfg = Release|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.Build.0 = Release|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.ActiveCfg = Debug|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.Build.0 = Debug|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.ActiveCfg = Debug|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.Build.0 = Debug|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.ActiveCfg = Release|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.Build.0 = Release|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.ActiveCfg = Release|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.Build.0 = Release|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.ActiveCfg = Debug|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.Build.0 = Debug|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.ActiveCfg = Debug|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.Build.0 = Debug|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.ActiveCfg = Release|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.Build.0 = Release|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.ActiveCfg = Release|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.Build.0 = Release|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.ActiveCfg = Debug|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.Build.0 = Debug|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.ActiveCfg = Debug|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.Build.0 = Debug|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.ActiveCfg = Release|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.Build.0 = Release|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.ActiveCfg = Release|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.Build.0 = Release|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.Build.0 = Debug|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.ActiveCfg = Debug|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.Build.0 = Debug|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.ActiveCfg = Release|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.Build.0 = Release|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.ActiveCfg = Release|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.Build.0 = Release|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.ActiveCfg = Debug|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.Build.0 = Debug|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.ActiveCfg = Debug|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.Build.0 = Debug|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.ActiveCfg = Release|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.Build.0 = Release|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.ActiveCfg = Release|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.Build.0 = Release|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.ActiveCfg = Debug|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.Build.0 = Debug|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.ActiveCfg = Debug|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.Build.0 = Debug|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.ActiveCfg = Release|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.Build.0 = Release|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.ActiveCfg = Release|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.Build.0 = Release|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.ActiveCfg = Debug|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.Build.0 = Debug|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.ActiveCfg = Debug|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.Build.0 = Debug|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.ActiveCfg = Release|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.Build.0 = Release|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.ActiveCfg = Release|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.Build.0 = Release|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.ActiveCfg = Debug|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.Build.0 = Debug|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.ActiveCfg = Debug|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.Build.0 = Debug|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.ActiveCfg = Release|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.Build.0 = Release|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.ActiveCfg = Release|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.Build.0 = Release|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.ActiveCfg = Debug|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.Build.0 = Debug|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.ActiveCfg = Debug|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.Build.0 = Debug|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.ActiveCfg = Release|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.Build.0 = Release|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.ActiveCfg = Release|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {F9916510-9055-4C9F-997A-3755DEC1511B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {9299B507-1AF9-4C93-9560-5F637D1E0C9E} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {20D781FB-4A20-4B75-B863-304A47182966} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {B8928210-546C-4AE3-956B-E2B724E6B8E5} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {6DA1396F-2A44-4D5C-8442-012F71006217} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {3A12F777-56A8-42EC-BD17-8F325524241E} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {33276462-8313-4192-8306-13717ECCA60A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {3C42510C-A29E-4A53-899C-203BFA874E0B} = {F9C41695-3353-4564-A154-58106829B19C} - {987F026D-EB1F-4013-ADA8-2406ACCDA526} = {F9C41695-3353-4564-A154-58106829B19C} - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28} = {F9C41695-3353-4564-A154-58106829B19C} - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61} = {F9C41695-3353-4564-A154-58106829B19C} - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3} = {F9C41695-3353-4564-A154-58106829B19C} - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A} = {F9C41695-3353-4564-A154-58106829B19C} - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856} = {F9C41695-3353-4564-A154-58106829B19C} - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {B988F96C-F87A-484C-AB15-D0674B22F291} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {214F211F-1A2B-4F79-8993-B8DEE2EF7441} = {F9C41695-3353-4564-A154-58106829B19C} - {210DD88D-649B-4695-8C5F-898A4F60A8CE} = {F9C41695-3353-4564-A154-58106829B19C} - {E26D2311-C164-48CF-BA24-5CEDA873D1B2} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {DD76B998-ED0D-4BFD-9660-3ADC3A334872} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {27CA5499-B3F2-4FB6-8414-651819B0B96C} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5} = {F9C41695-3353-4564-A154-58106829B19C} - {4ADADECA-99D7-410D-8127-CB27210DCC6A} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {E37561EB-B9C5-4215-9FF9-DB559916FBA2} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {A9265E36-7F2D-440C-BF3E-F447FDB6200F} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {6A1969EA-9657-4828-93E0-8D21A970F868} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {07137F45-8B5F-4561-BEC8-B883E9123785} = {F9C41695-3353-4564-A154-58106829B19C} - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {ECE691D0-BFB3-483B-A699-084269EFCE89} = {F9C41695-3353-4564-A154-58106829B19C} - {0BB52326-02D5-4698-A180-24078DA5DA0E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {D9057E63-AAAA-4FE7-800A-20C02F4761F3} = {F9C41695-3353-4564-A154-58106829B19C} - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {40FE7861-E54E-4DA9-BE4D-A5178014E477} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {1423FC8F-AA52-4562-8275-4BF0838CA378} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {53F841E8-284F-4545-9176-B131896E43F8} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {4AC1E062-0236-4E49-AA04-F732043D2DCF} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {290C5ED4-71A7-4040-AD26-4820CF7A9E60} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {1C856B14-54CD-4D07-B18B-5F7DB073AB51} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {A5B558C6-C767-11E1-A335-F6EB6188709B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {6022990D-3FD5-46A9-8AB5-E444C51646F3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {A8F23706-E590-4A87-96CC-5F8E5082503F} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {DADAC956-3A54-440A-8B56-A07234DEE861} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {C14D6E0D-810E-4599-A6E0-17298AFA0501} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {E71C1722-A41D-4475-87F4-29961A3654BB} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {9C6040B8-1173-40FA-A3DB-DE044CCD8250} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {576EEEFD-E423-482B-879A-F0515D40B8E1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {A4855451-6447-437C-B024-B36C3C7901EA} = {F9C41695-3353-4564-A154-58106829B19C} - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {AE677E3A-DAC5-42FD-8762-47370C57639B} = {F9C41695-3353-4564-A154-58106829B19C} - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {6DE11A47-2268-4B08-8DE5-15A1705FCE28} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {C619A811-8023-4441-B3D7-785388A09DF0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE} = {F9C41695-3353-4564-A154-58106829B19C} - {155211F8-08E1-4864-A3B8-9F04F4270360} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {2E15C462-A150-4A37-ACD6-FBAECF1724F5} = {F9C41695-3353-4564-A154-58106829B19C} - {F5E3FAFE-B650-4736-8D27-FA53866668C6} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {01F9E227-06F5-4BED-907F-402CA7DFAFE6} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {A556E0B5-73A1-4676-BA1F-133820DE7D5A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {F29D0C8D-141A-43CF-86B2-34A04653F8D4} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {0E046380-14CA-4C23-A807-8C678519A605} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {3C83B0AB-9739-41C1-A127-ED7DB9551F76} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {475ED6ED-C311-4188-ACB2-1C41830B22EE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {BF6E1942-7E42-4564-9DF5-FD0A00D71173} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {BE22A21F-73B7-453F-86A0-B867F0056490} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {12BCA020-EABF-429E-876A-A476BC9C10C0} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {6124E997-426E-4A0B-9617-D6D577D5E7D7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {66A9BDEB-150F-45DC-B20F-9892C0B43834} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {BCFAB658-326E-466D-995B-E76636C1DEA4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {B4327D10-ACDC-4C12-9555-749DD49A7BB0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {27D41D81-991F-4DC6-8749-B0321C87E694} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {BD291BF0-D804-4818-8311-DE871E6BCEAA} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {045BAC91-34D1-4B43-B52B-566801BE7F85} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {E604CD58-4579-4F69-9D6A-2605FD7CF716} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {E876FE63-0701-4CDA-BED5-7C73A379C1D1} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {CE6A5A24-EA88-4E67-BDF2-22517528E43F} = {F9C41695-3353-4564-A154-58106829B19C} - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {A185B162-6CB6-4502-B03F-B56F7699A8D9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {A21C50CD-28A6-481A-A12B-47189FE66641} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {2115FEBC-1EC4-4F95-A058-A523ED5295A4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {7DC23E4E-2448-4811-AABD-F5D069F6E74A} = {F9C41695-3353-4564-A154-58106829B19C} - {B3494FED-FB8C-43F4-B341-F26A3460203B} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {EFB2355B-82B3-4759-B7D8-95F8E9506291} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {B3BC3949-6949-41DE-94BF-B112FBFB1A84} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {713067DF-65EE-480B-A000-B2A323495F16} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {620E0BE7-3763-4F35-9DBD-4770104E269C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {86033E58-A1E3-43AD-AE8E-305E15E72A91} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {A7FAD273-8C71-4D72-A84F-2D160F2DC589} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {A2E9DA24-95E4-4414-94AF-488A382E276A} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {6D19209B-ECE7-4B9C-941C-0AA2B484F199} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A} = {F9C41695-3353-4564-A154-58106829B19C} - {4D3554DE-6E14-4F94-A909-A4B19151A47E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {13E796AD-BEA4-4213-A1B8-E18E2397E544} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {29A0C2A8-07A4-4A8B-8BED-8F7D024013D6} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2036 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Miranda", "..\src\miranda32\miranda32.vcxproj", "{F9916510-9055-4C9F-997A-3755DEC1511B}" + ProjectSection(ProjectDependencies) = postProject + {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {538E451F-E667-4D07-BCE6-976ECC7BB8D1} + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_core", "..\src\mir_core\mir_core.vcxproj", "{D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_app", "..\src\mir_app\mir_app.vcxproj", "{538E451F-E667-4D07-BCE6-976ECC7BB8D1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjson", "..\libs\libjson\libjson.vcxproj", "{F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AVS", "..\plugins\AVS\avs.vcxproj", "{7711F563-6473-4ABD-B5E3-477CE8384AD6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zlib", "..\libs\zlib\zlib.vcxproj", "{E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Import", "..\plugins\Import\import.vcxproj", "{9299B507-1AF9-4C93-9560-5F637D1E0C9E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mmap", "..\plugins\Db3x_mmap\db3x_mmap.vcxproj", "{20D781FB-4A20-4B75-B863-304A47182966}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scriver", "..\plugins\Scriver\scriver.vcxproj", "{B8928210-546C-4AE3-956B-E2B724E6B8E5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM", "..\plugins\TabSRMM\tabsrmm.vcxproj", "{99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GG", "..\protocols\Gadu-Gadu\gadugadu.vcxproj", "{6DA1396F-2A44-4D5C-8442-012F71006217}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IRC", "..\protocols\IRCG\IRC.vcxproj", "{3A12F777-56A8-42EC-BD17-8F325524241E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Jabber", "..\protocols\JabberG\jabber.vcxproj", "{33276462-8313-4192-8306-13717ECCA60A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_nicer", "..\plugins\Clist_nicer\clist_nicer.vcxproj", "{3C42510C-A29E-4A53-899C-203BFA874E0B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cln_skinedit", "..\plugins\Cln_skinedit\skinedit.vcxproj", "{987F026D-EB1F-4013-ADA8-2406ACCDA526}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\AuthState\authstate.vcxproj", "{DB315D7D-00BB-43B2-93A6-0430CA2B9F28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "..\plugins\Console\Console.vcxproj", "{A231E008-2D1A-4F24-95DD-59F56F85A499}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Contacts", "..\plugins\ContactsPlus\contacts.vcxproj", "{F4F2FD25-1553-FB72-F695-0701D20C3168}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Flags", "..\plugins\CountryFlags\flags.vcxproj", "{B4361FA0-4073-4B60-EE72-F5C08E6EDF61}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSList", "..\plugins\CSList\cslist.vcxproj", "{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Db_autobackups", "..\plugins\Db_autobackups\db_autobackups.vcxproj", "{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FavContacts", "..\plugins\FavContacts\favcontacts.vcxproj", "{2D0B4CB0-3ACA-4612-B745-FF3050E1500A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FltContacts", "..\plugins\FloatingContacts\FltCont.vcxproj", "{9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folders", "..\plugins\Folders\folders.vcxproj", "{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LinkList", "..\plugins\HistoryLinkListPlus\linklist.vcxproj", "{850EC838-0EAD-45EB-6F1B-16DC90DCE18D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistorySweeperLight", "..\plugins\HistorySweeperLight\historysweeperlight.vcxproj", "{9DE1F0B0-B9D1-4681-82E7-13CC3E047445}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEView", "..\plugins\IEView\ieview.vcxproj", "{B988F96C-F87A-484C-AB15-D0674B22F291}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IgnoreState", "..\plugins\IgnoreState\ignore.vcxproj", "{214F211F-1A2B-4F79-8993-B8DEE2EF7441}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MenuEx", "..\plugins\MenuItemEx\menuex.vcxproj", "{210DD88D-649B-4695-8C5F-898A4F60A8CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libTextControl", "..\libs\mTextControl\mtextcontrol.vcxproj", "{E26D2311-C164-48CF-BA24-5CEDA873D1B2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewXstatusNotify", "..\plugins\NewXstatusNotify\NewXstatusNotify.vcxproj", "{D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Nudge", "..\plugins\Nudge\nudge.vcxproj", "{8190CFAA-3B73-43D8-9101-8368E21F1864}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PopupPlus", "..\plugins\Popup\Popup.vcxproj", "{726460C7-E1F1-4C37-B64F-DA8A8DD26D70}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickMessages", "..\plugins\QuickMessages\quickmessages.vcxproj", "{DD76B998-ED0D-4BFD-9660-3ADC3A334872}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickReplies", "..\plugins\QuickReplies\quickreplies.vcxproj", "{27CA5499-B3F2-4FB6-8414-651819B0B96C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Rate", "..\plugins\Rate\rate.vcxproj", "{C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM", "..\plugins\SecureIM\secureim_15.vcxproj", "{4ADADECA-99D7-410D-8127-CB27210DCC6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SeenPlugin", "..\plugins\SeenPlugin\seenplugin.vcxproj", "{EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sessions", "..\plugins\Sessions\Sessions.vcxproj", "{37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleAR", "..\plugins\SimpleAR\SimpleAR.vcxproj", "{06C44834-7B7A-4074-A6D8-7F163B3FF707}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SmileyAdd", "..\plugins\SmileyAdd\SmileyAdd.vcxproj", "{5BBA7E51-B494-4462-BC4F-1AE5F57F9857}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SplashScreen", "..\plugins\SplashScreen\splashscreen.vcxproj", "{5A6095F4-B037-4DA8-8410-8004A90C961A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpam", "..\plugins\StopSpamPlus\stopspam.vcxproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tipper", "..\plugins\TipperYM\tipper_ym.vcxproj", "{2C818919-A38F-44FF-BD91-A6A204AC592A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TooltipNotify", "..\plugins\TooltipNotify\ttnotify.vcxproj", "{1948EAEA-4C25-4F6B-AD9E-5891F656EADA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TranslitSwitcher", "..\plugins\TranslitSwitcher\TranslitSwitcher.vcxproj", "{82F96271-4136-4B0E-AB6F-040DE7A4DD1E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserGuide", "..\plugins\UserGuide\UserGuide.vcxproj", "{92E3BDEE-DD17-4619-AD61-70C0ADE04217}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx", "..\plugins\UserInfoEx\UInfoEx.vcxproj", "{AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Variables", "..\plugins\Variables\Variables.vcxproj", "{3038EF69-85BE-4D92-9864-CD6A5EBB558A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhenWasIt", "..\plugins\WhenWasIt\WhenWasIt.vcxproj", "{63E05ECA-0A63-479E-86BD-2CAF53869BDA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker", "..\plugins\SpellChecker\spellchecker.vcxproj", "{5DB86086-10E9-42E7-AC90-503D2678C2A2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Alarms", "..\plugins\Alarms\alarms.vcxproj", "{5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroNotify", "..\plugins\ZeroNotification\Zero Notification.vcxproj", "{E37561EB-B9C5-4215-9FF9-DB559916FBA2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardNotify", "..\plugins\KeyboardNotify\KeyboardNotify.vcxproj", "{A9265E36-7F2D-440C-BF3E-F447FDB6200F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AddContactPlus", "..\plugins\AddContactPlus\addcontactplus.vcxproj", "{253ADD1D-F7C9-4643-A957-51BFCD61A5D2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleStatusMsg", "..\plugins\SimpleStatusMsg\simplestatusmsg.vcxproj", "{D3D80E27-D099-41EC-AFB2-A891A33F1608}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClientChangeNotify", "..\plugins\ClientChangeNotify\ClientChangeNotify.vcxproj", "{6A1969EA-9657-4828-93E0-8D21A970F868}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ListeningTo", "..\plugins\ListeningTo\listeningto.vcxproj", "{5FAA475D-0593-454F-8601-0D7150DCA4A0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Omegle", "..\protocols\Omegle\omegle.vcxproj", "{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugins\RecentContacts\RecentContacts.vcxproj", "{07137F45-8B5F-4561-BEC8-B883E9123785}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EkHtml", "..\plugins\MirOTR\ekhtml\ekhtml_15.vcxproj", "{2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Libgcrypt", "..\plugins\MirOTR\Libgcrypt\Libgcrypt_15.vcxproj", "{40FE7861-E54E-4DA9-BE4D-A5178014E477}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libotr", "..\plugins\MirOTR\libotr\libotr_15.vcxproj", "{1423FC8F-AA52-4562-8275-4BF0838CA378}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirOTR", "..\plugins\MirOTR\MirOTR_15.vcxproj", "{53F841E8-284F-4545-9176-B131896E43F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewEventNotify", "..\plugins\NewEventNotify\neweventnotify.vcxproj", "{2E0A2793-94C3-82E7-2AB0-FD421816CFBF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhoUsesMyFiles", "..\plugins\WhoUsesMyFiles\wumf.vcxproj", "{F29CCB9B-79CF-4341-AA05-3626A036D3E3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CryptoPP", "..\plugins\CryptoPP\cryptopp_15.vcxproj", "{4AC1E062-0236-4E49-AA04-F732043D2DCF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cryptlib", "..\plugins\CryptoPP\crypto\cryptlib_15.vcxproj", "{290C5ED4-71A7-4040-AD26-4820CF7A9E60}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserInfo", "..\src\core\stduserinfo\stduserinfo.vcxproj", "{1C856B14-54CD-4D07-B18B-5F7DB073AB51}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdEmail", "..\src\core\stdemail\stdemail.vcxproj", "{A5B558C6-C767-11E1-A335-F6EB6188709B}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdFile", "..\src\core\stdfile\stdfile.vcxproj", "{6022990D-3FD5-46A9-8AB5-E444C51646F3}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAutoAway", "..\src\core\stdautoaway\stdautoaway.vcxproj", "{A8F23706-E590-4A87-96CC-5F8E5082503F}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUIHist", "..\src\core\stduihist\stduihist.vcxproj", "{DADAC956-3A54-440A-8B56-A07234DEE861}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserOnline", "..\src\core\stduseronline\stduseronline.vcxproj", "{D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAway", "..\src\core\stdaway\stdaway.vcxproj", "{C14D6E0D-810E-4599-A6E0-17298AFA0501}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdClist", "..\src\core\stdclist\stdclist.vcxproj", "{E71C1722-A41D-4475-87F4-29961A3654BB}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdMsg", "..\src\core\stdmsg\stdmsg.vcxproj", "{F47EAB99-C78F-4A92-87D5-B0E16FE5A133}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdCrypt", "..\src\core\stdcrypt\stdcrypt.vcxproj", "{8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmdLine", "..\plugins\CmdLine\CmdLine.vcxproj", "{73BA9CA5-640D-4F30-A157-A73557A25F98}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MimCmd", "..\plugins\MimCmd\MimCmd.vcxproj", "{1E3BB48A-FFBC-4A03-8C43-9124A484BE51}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTPFile", "..\plugins\FTPFileYM\ftpfile.vcxproj", "{73482497-9F57-4819-A9AB-5D841A9F072D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PasteIt", "..\plugins\PasteIt\PasteIt.vcxproj", "{BAEBC482-CDA9-4053-A7D0-08222E85118E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendScreenshotPlus\SendSS.vcxproj", "{CEAD8BCF-1F22-4E00-9F6D-E33405B00552}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenFolder", "..\plugins\OpenFolder\openFolder.vcxproj", "{8D233B9A-2744-4B62-94FC-7872FDDA4683}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyDetails", "..\plugins\MyDetails\mydetails.vcxproj", "{A4855451-6447-437C-B024-B36C3C7901EA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Msg_Export", "..\plugins\Msg_Export\msg_export.vcxproj", "{4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpamMod", "..\plugins\StopSpamMod\stopspam_mod.vcxproj", "{0FF6989B-880A-4C3F-B69D-AFF93296044D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Watrack_MPD", "..\plugins\watrack_mpd\watrack_mpd.vcxproj", "{A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginUpdater", "..\plugins\PluginUpdater\PluginUpdater.vcxproj", "{21F6C0E4-DD1A-49E6-82FD-64574BB902BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PManagerEx", "..\plugins\ProfileManager\pmanagerEx.vcxproj", "{728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Restart", "..\plugins\Restart\Restart.vcxproj", "{18195F68-A747-8643-050C-C5101DA658FD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrafficCounter", "..\plugins\TrafficCounter\TrafficCounter.vcxproj", "{885010EA-D008-4E38-85D4-487693F0BA00}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackUpdater", "..\plugins\PackUpdater\PackUpdater.vcxproj", "{20413125-4D68-4751-8062-DDA026DDABF1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickContacts", "..\plugins\QuickContacts\quickcontacts.vcxproj", "{7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MobileState", "..\plugins\MobileState\mobilestate.vcxproj", "{AE677E3A-DAC5-42FD-8762-47370C57639B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NoHistory", "..\plugins\NoHistory\NoHistory.vcxproj", "{ABF05E2C-C335-4BD1-8C3E-4C63285362CF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YAMN", "..\protocols\YAMN\YAMN.vcxproj", "{C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewsAggregator", "..\protocols\NewsAggregator\NewsAggregator.vcxproj", "{6DE11A47-2268-4B08-8DE5-15A1705FCE28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CurrencyRates", "..\protocols\CurrencyRates\Forex.vcxproj", "{C619A811-8023-4441-B3D7-785388A09DF0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Weather", "..\protocols\Weather\weather.vcxproj", "{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ping", "..\plugins\Ping\ping.vcxproj", "{F31BD1B6-EE9D-4F76-A047-F8AEADC26086}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fingerprint", "..\plugins\FingerprintNG\fingerprint_ng.vcxproj", "{AF7D71D4-19B7-42B8-91DD-701F155AC4AE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssocMgr", "..\plugins\AssocMgr\assocmgr.vcxproj", "{B57D997C-73E1-D5F7-ECCA-C204345C04A3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoRun", "..\plugins\AutoRun\autorun.vcxproj", "{00037ACC-F32D-4B5F-93A8-3CF0E277E377}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoShutdown", "..\plugins\AutoShutdown\shutdown.vcxproj", "{3F8EF54D-0593-4048-B0E5-C938F99B29F3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AvatarHistory", "..\plugins\AvatarHistory\AvatarHistory.vcxproj", "{9D702039-F4A9-4978-92B3-3615E5C44BEE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicHistory", "..\plugins\BasicHistory\BasicHistory.vcxproj", "{155211F8-08E1-4864-A3B8-9F04F4270360}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BASS_interface", "..\plugins\BASS_interface\Bass_interface.vcxproj", "{3933E789-D185-41DC-8169-9FF4365B6015}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_blind", "..\plugins\Clist_blind\Clist_blind.vcxproj", "{2E15C462-A150-4A37-ACD6-FBAECF1724F5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartPosition", "..\plugins\StartPosition\StartPosition.vcxproj", "{046C5F80-ABE5-488F-BFC8-B024D4AACC8C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HTTPServer", "..\plugins\HTTPServer\HTTPServer_15.vcxproj", "{F7A70398-AFA0-4A58-B645-85268F9517DE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pu_stub", "..\plugins\PluginUpdater\pu_stub\pu_stub.vcxproj", "{121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotifyAnything", "..\plugins\NotifyAnything\NotifyAnything.vcxproj", "{F5E3FAFE-B650-4736-8D27-FA53866668C6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "..\libs\libcurl\libcurl.vcxproj", "{01F9E227-06F5-4BED-907F-402CA7DFAFE6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusChange", "..\plugins\StatusChange\StatusChange.vcxproj", "{D09881C7-E189-49AD-919E-F64355F8EFD0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyPounce", "..\plugins\BuddyPounce\buddypounce.vcxproj", "{FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MsgPopup", "..\plugins\MsgPopup\MsgPopup.vcxproj", "{1E702CF1-E52F-49F8-915A-FCBBCE554774}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NimContact", "..\protocols\Non-IM Contact\nimcontact.vcxproj", "{A556E0B5-73A1-4676-BA1F-133820DE7D5A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XSoundNotify", "..\plugins\XSoundNotify\XSoundNotify.vcxproj", "{5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YARelay", "..\plugins\YARelay\YARelay.vcxproj", "{AA5CA2D0-F096-4001-B1B6-439C7FC11E77}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeStatusChange", "..\plugins\SkypeStatusChange\SkypeStatusChange.vcxproj", "{10F78F26-2B20-4158-869F-CB29533B4C2C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wbOSD", "..\plugins\wbOSD\wbOSD.vcxproj", "{DA450122-7F0B-45DA-9EAA-421887AD8450}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "New_GPG", "..\plugins\New_GPG\new_gpg.vcxproj", "{F29D0C8D-141A-43CF-86B2-34A04653F8D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spamotron", "..\plugins\Spamotron\Spamotron.vcxproj", "{DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LotusNotify", "..\protocols\LotusNotify\LotusNotify.vcxproj", "{0E046380-14CA-4C23-A807-8C678519A605}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirFox", "..\plugins\MirFox\MirFoxNG_15.vcxproj", "{3E9DA555-4C7B-463C-AD5C-214073DE29D6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConnectionNotify", "..\protocols\ConnectionNotify\ConnectionNotify.vcxproj", "{3C83B0AB-9739-41C1-A127-ED7DB9551F76}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Exchange", "..\plugins\Exchange\Exchange.vcxproj", "{F462FDA1-BDCD-49B2-B996-D7DE71D07393}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebView", "..\protocols\WebView\webview.vcxproj", "{475ED6ED-C311-4188-ACB2-1C41830B22EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShlExt", "..\plugins\ShellExt\shellext.vcxproj", "{B27B85B5-0EF1-496D-99D7-0702A98A342A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinterSpeak", "..\plugins\WinterSpeak\WinterSpeak.vcxproj", "{A44F96D0-A850-4A67-9570-0E9298A16E40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKontakte", "..\protocols\VKontakte\vk.vcxproj", "{BF6E1942-7E42-4564-9DF5-FD0A00D71173}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartupSilence", "..\plugins\StartupSilence\StartupSilence.vcxproj", "{7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirandaG15", "..\plugins\MirandaG15\MirandaG15.vcxproj", "{8ACA3C8B-BDFA-47B2-8578-069555BA05B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RemovePersonalSettings", "..\plugins\RemovePersonalSettings\rps.vcxproj", "{0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewAwaySys", "..\plugins\NewAwaySysMod\NewAwaySys.vcxproj", "{6A516E27-AC50-5374-756B-A1558DB2EFA9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryStats", "..\plugins\HistoryStats\historystats.vcxproj", "{B5BCDC2F-81FC-4324-90C6-E5540A225EFF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sametime", "..\protocols\Sametime\sametime.vcxproj", "{BE22A21F-73B7-453F-86A0-B867F0056490}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glib", "..\protocols\Sametime\src\glib\glib_15.vcxproj", "{12BCA020-EABF-429E-876A-A476BC9C10C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GmailNotifier", "..\protocols\GmailNotifier\GmailNotifier.vcxproj", "{EDAAD28B-505B-4969-A8BB-97EAE818DEEA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Pcre16", "..\libs\Pcre16\pcre16.vcxproj", "{6124E997-426E-4A0B-9617-D6D577D5E7D7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEHistory", "..\plugins\IEHistory\IEHistory.vcxproj", "{7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dummy", "..\protocols\Dummy\dummy.vcxproj", "{D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Steam", "..\protocols\Steam\Steam.vcxproj", "{8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HwHotKeys", "..\plugins\HwHotKeys\HwHotKeys.vcxproj", "{639E2B3A-64F2-4152-B5BB-12468E5D60B6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeWeb", "..\protocols\SkypeWeb\SkypeWeb.vcxproj", "{66A9BDEB-150F-45DC-B20F-9892C0B43834}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tox", "..\protocols\Tox\Tox.vcxproj", "{BCFAB658-326E-466D-995B-E76636C1DEA4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinecraftDynmap", "..\protocols\MinecraftDynmap\MinecraftDynmap.vcxproj", "{B4327D10-ACDC-4C12-9555-749DD49A7BB0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroSwitch", "..\plugins\ZeroSwitch\ZeroSwitch.vcxproj", "{D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MessageState", "..\plugins\MessageState\MessageState.vcxproj", "{D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirLua", "..\plugins\MirLua\MirLua.vcxproj", "{27D41D81-991F-4DC6-8749-B0321C87E694}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toaster", "..\plugins\Toaster\Toaster.vcxproj", "{1FDBD8F0-3929-41BC-92D1-020779460769}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\libs\liblua\liblua.vcxproj", "{BD291BF0-D804-4818-8311-DE871E6BCEAA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winapi", "..\plugins\MirLua\Modules\WinAPI\WinAPI.vcxproj", "{045BAC91-34D1-4B43-B52B-566801BE7F85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hunspell", "..\libs\hunspell\hunspell.vcxproj", "{B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_popup", "..\plugins\MirLua\Modules\m_popup\m_popup.vcxproj", "{D5C9CA74-4E25-478A-B890-75EB13E6DB1C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_variables", "..\plugins\MirLua\Modules\m_variables\m_variables.vcxproj", "{E604CD58-4579-4F69-9D6A-2605FD7CF716}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusManager", "..\plugins\StatusManager\StatusManager.vcxproj", "{D2EF305F-5255-49E8-A738-D4206D62D2B8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CloudFile", "..\protocols\CloudFile\CloudFile.vcxproj", "{E876FE63-0701-4CDA-BED5-7C73A379C1D1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_schedule", "..\plugins\MirLua\Modules\m_schedule\m_schedule.vcxproj", "{FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_toptoolbar", "..\plugins\MirLua\Modules\m_toptoolbar\m_toptoolbar.vcxproj", "{277E433F-7D71-4247-8AAA-CC5FB1AA7A67}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsSingleWindow", "..\plugins\AsSingleWindow\AsSingleWindow.vcxproj", "{CE6A5A24-EA88-4E67-BDF2-22517528E43F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "..\libs\sqlite3\sqlite3.vcxproj", "{0C02E395-E73F-47E3-8B95-B7924C0C7A6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsodium", "..\libs\libsodium\libsodium.vcxproj", "{A185B162-6CB6-4502-B03F-B56F7699A8D9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads", "..\libs\pthreads\pthreads.vcxproj", "{E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtox", "..\protocols\Tox\libtox\libtox.vcxproj", "{A21C50CD-28A6-481A-A12B-47189FE66641}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileAsMessage", "..\plugins\FileAsMessage\fileecho.vcxproj", "{D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EmLanProto", "..\protocols\EmLanProto\emlanproto.vcxproj", "{2115FEBC-1EC4-4F95-A058-A523ED5295A4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mdbx", "..\plugins\Dbx_mdbx\dbx_mdbx.vcxproj", "{E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQCorp", "..\protocols\ICQCorp\ICQCorp.vcxproj", "{AD0D0500-CE7D-417D-9C36-3620D56CA6D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeImage", "..\libs\freeimage\freeimage.vcxproj", "{5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MagneticWindows", "..\plugins\MagneticWindows\MagneticWindows.vcxproj", "{7DC23E4E-2448-4811-AABD-F5D069F6E74A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Protocols", "Protocols", "{A035B524-0F2D-45D0-BCF2-3C20279C77E2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{E7FB43FB-3563-4568-8846-A88FC37449BF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{37EDFBEA-8446-4BF3-9F2E-655908CDFB62}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua", "Lua", "{329B4E94-C846-4C78-AFD5-8B6B839DCCE1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{F13387B0-1C74-48EC-9AEC-65E3B9DE29E4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Message edtors", "Message edtors", "{D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Contact lists", "Contact lists", "{F9C41695-3353-4564-A154-58106829B19C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Encryption", "Encryption", "{30218E20-9E62-4027-BB87-2627B17F6CA3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notifications", "Notifications", "{703CFA44-C8E8-4547-B597-AE239F4F6DD9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProxySwitch", "..\plugins\ProxySwitch\ProxySwitch.vcxproj", "{7446276D-5845-4258-A245-83D1D4D3CEC3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_sqlite", "..\plugins\Dbx_sqlite\dbx_sqlite.vcxproj", "{B3494FED-FB8C-43F4-B341-F26A3460203B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQ", "..\protocols\ICQ-WIM\ICQ-WIM.vcxproj", "{EFB2355B-82B3-4759-B7D8-95F8E9506291}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh2", "..\libs\libssh2\libssh2.vcxproj", "{B3BC3949-6949-41DE-94BF-B112FBFB1A84}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdPopup", "..\src\core\stdpopup\stdpopup.vcxproj", "{713067DF-65EE-480B-A000-B2A323495F16}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotesReminders", "..\plugins\NotesAndReminders\NotesReminders.vcxproj", "{EEB57129-946C-4B98-8856-FDA501AE2A5E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsignal", "..\libs\libsignal\libsignal.vcxproj", "{620E0BE7-3763-4F35-9DBD-4770104E269C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Facebook", "..\protocols\Facebook\facebook.vcxproj", "{86033E58-A1E3-43AD-AE8E-305E15E72A91}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewStory", "..\plugins\NewStory\NewStory.vcxproj", "{A7FAD273-8C71-4D72-A84F-2D160F2DC589}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbChecker", "..\plugins\DbChecker\dbchecker.vcxproj", "{A2E9DA24-95E4-4414-94AF-488A382E276A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickSearch", "..\plugins\QuickSearch\quicksearch.vcxproj", "{3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmdbx", "..\libs\libmdbx\libmdbx.vcxproj", "{6D19209B-ECE7-4B9C-941C-0AA2B484F199}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoiceService", "..\plugins\VoiceService\VoiceService.vcxproj", "{48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libqrencode", "..\libs\libqrencode\libqrencode.vcxproj", "{4D3554DE-6E14-4F94-A909-A4B19151A47E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhatsApp", "..\protocols\WhatsApp\WhatsApp.vcxproj", "{13E796AD-BEA4-4213-A1B8-E18E2397E544}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Telegram", "..\protocols\Telegram\Telegram.vcxproj", "{AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.ActiveCfg = Debug|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.Build.0 = Debug|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.ActiveCfg = Debug|x64 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.Build.0 = Debug|x64 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.ActiveCfg = Release|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.Build.0 = Release|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.ActiveCfg = Release|x64 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.Build.0 = Release|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.Build.0 = Debug|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.ActiveCfg = Debug|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.Build.0 = Debug|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.ActiveCfg = Release|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.Build.0 = Release|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.ActiveCfg = Release|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.Build.0 = Release|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.Build.0 = Debug|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.ActiveCfg = Debug|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.Build.0 = Debug|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.ActiveCfg = Release|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.Build.0 = Release|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.ActiveCfg = Release|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.Build.0 = Release|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.ActiveCfg = Debug|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.Build.0 = Debug|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.ActiveCfg = Debug|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.Build.0 = Debug|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.ActiveCfg = Release|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.Build.0 = Release|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.ActiveCfg = Release|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.Build.0 = Release|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.ActiveCfg = Debug|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.Build.0 = Debug|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.ActiveCfg = Debug|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.Build.0 = Debug|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.ActiveCfg = Release|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.Build.0 = Release|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.ActiveCfg = Release|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.Build.0 = Release|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.ActiveCfg = Debug|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.Build.0 = Debug|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.ActiveCfg = Debug|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.Build.0 = Debug|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.ActiveCfg = Release|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.Build.0 = Release|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.ActiveCfg = Release|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.Build.0 = Release|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.Build.0 = Debug|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.ActiveCfg = Debug|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.Build.0 = Debug|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.ActiveCfg = Release|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.Build.0 = Release|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.ActiveCfg = Release|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.Build.0 = Release|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.ActiveCfg = Debug|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.Build.0 = Debug|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.ActiveCfg = Debug|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.Build.0 = Debug|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.ActiveCfg = Release|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.Build.0 = Release|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.ActiveCfg = Release|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.Build.0 = Release|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.ActiveCfg = Debug|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.Build.0 = Debug|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.ActiveCfg = Debug|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.Build.0 = Debug|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.ActiveCfg = Release|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.Build.0 = Release|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.ActiveCfg = Release|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.Build.0 = Release|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.ActiveCfg = Debug|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.Build.0 = Debug|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.ActiveCfg = Debug|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.Build.0 = Debug|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.ActiveCfg = Release|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.Build.0 = Release|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.ActiveCfg = Release|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.Build.0 = Release|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.Build.0 = Debug|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.ActiveCfg = Debug|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.Build.0 = Debug|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.ActiveCfg = Release|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.Build.0 = Release|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.ActiveCfg = Release|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.Build.0 = Release|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.Build.0 = Debug|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.ActiveCfg = Debug|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.Build.0 = Debug|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.ActiveCfg = Release|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.Build.0 = Release|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.ActiveCfg = Release|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.Build.0 = Release|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.ActiveCfg = Debug|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.Build.0 = Debug|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.ActiveCfg = Debug|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.Build.0 = Debug|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.ActiveCfg = Release|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.Build.0 = Release|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.ActiveCfg = Release|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.Build.0 = Release|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.Build.0 = Debug|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.ActiveCfg = Debug|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.Build.0 = Debug|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.ActiveCfg = Release|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.Build.0 = Release|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.ActiveCfg = Release|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.Build.0 = Release|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.ActiveCfg = Debug|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.Build.0 = Debug|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.ActiveCfg = Debug|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.Build.0 = Debug|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.ActiveCfg = Release|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.Build.0 = Release|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.ActiveCfg = Release|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.Build.0 = Release|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.ActiveCfg = Debug|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.Build.0 = Debug|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.ActiveCfg = Debug|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.Build.0 = Debug|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.ActiveCfg = Release|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.Build.0 = Release|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.ActiveCfg = Release|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.Build.0 = Release|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.ActiveCfg = Debug|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.Build.0 = Debug|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.ActiveCfg = Debug|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.Build.0 = Debug|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.ActiveCfg = Release|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.Build.0 = Release|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.ActiveCfg = Release|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.Build.0 = Release|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.ActiveCfg = Debug|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.Build.0 = Debug|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.ActiveCfg = Debug|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.Build.0 = Debug|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.ActiveCfg = Release|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.Build.0 = Release|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.ActiveCfg = Release|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.Build.0 = Release|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.Build.0 = Debug|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.ActiveCfg = Debug|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.Build.0 = Debug|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.ActiveCfg = Release|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.Build.0 = Release|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.ActiveCfg = Release|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.Build.0 = Release|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.ActiveCfg = Debug|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.Build.0 = Debug|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.ActiveCfg = Debug|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.Build.0 = Debug|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.ActiveCfg = Release|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.Build.0 = Release|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.ActiveCfg = Release|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.Build.0 = Release|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.Build.0 = Debug|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.ActiveCfg = Debug|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.Build.0 = Debug|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.ActiveCfg = Release|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.Build.0 = Release|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.ActiveCfg = Release|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.Build.0 = Release|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.Build.0 = Debug|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.ActiveCfg = Debug|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.Build.0 = Debug|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.ActiveCfg = Release|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.Build.0 = Release|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.ActiveCfg = Release|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.Build.0 = Release|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.Build.0 = Debug|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.ActiveCfg = Debug|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.Build.0 = Debug|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.ActiveCfg = Release|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.Build.0 = Release|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.ActiveCfg = Release|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.Build.0 = Release|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.ActiveCfg = Debug|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.Build.0 = Debug|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.ActiveCfg = Debug|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.Build.0 = Debug|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.ActiveCfg = Release|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.Build.0 = Release|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.ActiveCfg = Release|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.Build.0 = Release|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.ActiveCfg = Debug|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.Build.0 = Debug|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.ActiveCfg = Debug|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.Build.0 = Debug|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.ActiveCfg = Release|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.Build.0 = Release|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.ActiveCfg = Release|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.Build.0 = Release|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.ActiveCfg = Debug|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.Build.0 = Debug|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.ActiveCfg = Debug|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.Build.0 = Debug|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.ActiveCfg = Release|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.Build.0 = Release|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.ActiveCfg = Release|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.Build.0 = Release|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.Build.0 = Debug|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.ActiveCfg = Debug|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.Build.0 = Debug|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.ActiveCfg = Release|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.Build.0 = Release|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.ActiveCfg = Release|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.Build.0 = Release|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.ActiveCfg = Debug|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.Build.0 = Debug|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.ActiveCfg = Debug|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.Build.0 = Debug|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.ActiveCfg = Release|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.Build.0 = Release|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.ActiveCfg = Release|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.Build.0 = Release|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.ActiveCfg = Debug|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.Build.0 = Debug|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.ActiveCfg = Debug|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.Build.0 = Debug|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.ActiveCfg = Release|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.Build.0 = Release|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.ActiveCfg = Release|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.Build.0 = Release|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.ActiveCfg = Debug|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.Build.0 = Debug|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.ActiveCfg = Debug|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.Build.0 = Debug|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.ActiveCfg = Release|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.Build.0 = Release|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.ActiveCfg = Release|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.Build.0 = Release|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.ActiveCfg = Debug|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.Build.0 = Debug|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.ActiveCfg = Debug|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.Build.0 = Debug|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.ActiveCfg = Release|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.Build.0 = Release|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.ActiveCfg = Release|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.Build.0 = Release|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.Build.0 = Debug|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.ActiveCfg = Debug|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.Build.0 = Debug|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.ActiveCfg = Release|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.Build.0 = Release|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.ActiveCfg = Release|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.Build.0 = Release|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.ActiveCfg = Debug|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.Build.0 = Debug|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.ActiveCfg = Debug|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.Build.0 = Debug|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.ActiveCfg = Release|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.Build.0 = Release|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.ActiveCfg = Release|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.Build.0 = Release|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.ActiveCfg = Debug|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.Build.0 = Debug|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.ActiveCfg = Debug|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.Build.0 = Debug|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.ActiveCfg = Release|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.Build.0 = Release|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.ActiveCfg = Release|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.Build.0 = Release|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.ActiveCfg = Debug|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.Build.0 = Debug|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.ActiveCfg = Debug|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.Build.0 = Debug|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.ActiveCfg = Release|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.Build.0 = Release|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.ActiveCfg = Release|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.Build.0 = Release|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.ActiveCfg = Debug|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.Build.0 = Debug|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.ActiveCfg = Debug|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.Build.0 = Debug|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.ActiveCfg = Release|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.Build.0 = Release|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.ActiveCfg = Release|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.Build.0 = Release|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.Build.0 = Debug|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.ActiveCfg = Debug|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.Build.0 = Debug|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.ActiveCfg = Release|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.Build.0 = Release|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.ActiveCfg = Release|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.Build.0 = Release|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.ActiveCfg = Debug|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.Build.0 = Debug|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.ActiveCfg = Debug|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.Build.0 = Debug|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.ActiveCfg = Release|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.Build.0 = Release|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.ActiveCfg = Release|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.Build.0 = Release|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.ActiveCfg = Debug|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.Build.0 = Debug|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.ActiveCfg = Debug|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.Build.0 = Debug|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.ActiveCfg = Release|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.Build.0 = Release|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.ActiveCfg = Release|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.Build.0 = Release|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.Build.0 = Debug|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.ActiveCfg = Debug|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.Build.0 = Debug|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.ActiveCfg = Release|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.Build.0 = Release|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.ActiveCfg = Release|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.Build.0 = Release|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.Build.0 = Debug|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.ActiveCfg = Debug|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.Build.0 = Debug|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.ActiveCfg = Release|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.Build.0 = Release|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.ActiveCfg = Release|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.Build.0 = Release|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.Build.0 = Debug|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.ActiveCfg = Debug|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.Build.0 = Debug|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.ActiveCfg = Release|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.Build.0 = Release|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.ActiveCfg = Release|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.Build.0 = Release|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.ActiveCfg = Debug|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.Build.0 = Debug|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.ActiveCfg = Debug|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.Build.0 = Debug|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.ActiveCfg = Release|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.Build.0 = Release|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.ActiveCfg = Release|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.Build.0 = Release|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.ActiveCfg = Debug|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.Build.0 = Debug|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.ActiveCfg = Debug|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.Build.0 = Debug|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.ActiveCfg = Release|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.Build.0 = Release|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.ActiveCfg = Release|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.Build.0 = Release|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.Build.0 = Debug|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.ActiveCfg = Debug|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.Build.0 = Debug|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.ActiveCfg = Release|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.Build.0 = Release|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.ActiveCfg = Release|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.Build.0 = Release|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.ActiveCfg = Debug|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.Build.0 = Debug|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.ActiveCfg = Release|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.Build.0 = Release|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.Build.0 = Debug|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.ActiveCfg = Debug|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.Build.0 = Debug|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.ActiveCfg = Release|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.Build.0 = Release|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.ActiveCfg = Release|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.Build.0 = Release|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.ActiveCfg = Debug|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.Build.0 = Debug|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.ActiveCfg = Debug|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.Build.0 = Debug|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.ActiveCfg = Release|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.Build.0 = Release|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.ActiveCfg = Release|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.Build.0 = Release|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.ActiveCfg = Debug|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.Build.0 = Debug|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.ActiveCfg = Debug|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.Build.0 = Debug|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.ActiveCfg = Release|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.Build.0 = Release|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.ActiveCfg = Release|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.Build.0 = Release|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.ActiveCfg = Debug|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.Build.0 = Debug|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.ActiveCfg = Debug|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.Build.0 = Debug|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.ActiveCfg = Release|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.Build.0 = Release|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.ActiveCfg = Release|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.Build.0 = Release|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.Build.0 = Debug|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.ActiveCfg = Debug|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.Build.0 = Debug|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.ActiveCfg = Release|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.Build.0 = Release|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.ActiveCfg = Release|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.Build.0 = Release|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.ActiveCfg = Debug|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.Build.0 = Debug|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.ActiveCfg = Debug|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.Build.0 = Debug|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.ActiveCfg = Release|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.Build.0 = Release|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.ActiveCfg = Release|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.Build.0 = Release|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.ActiveCfg = Debug|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.Build.0 = Debug|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.ActiveCfg = Debug|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.Build.0 = Debug|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.ActiveCfg = Release|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.Build.0 = Release|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.ActiveCfg = Release|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.Build.0 = Release|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.ActiveCfg = Debug|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.Build.0 = Debug|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.ActiveCfg = Debug|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.Build.0 = Debug|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.ActiveCfg = Release|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.Build.0 = Release|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.ActiveCfg = Release|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.Build.0 = Release|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.Build.0 = Debug|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.ActiveCfg = Debug|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.Build.0 = Debug|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.ActiveCfg = Release|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.Build.0 = Release|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.ActiveCfg = Release|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.Build.0 = Release|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.ActiveCfg = Debug|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.Build.0 = Debug|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.ActiveCfg = Debug|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.Build.0 = Debug|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.ActiveCfg = Release|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.Build.0 = Release|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.ActiveCfg = Release|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.Build.0 = Release|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.ActiveCfg = Debug|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.Build.0 = Debug|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.ActiveCfg = Debug|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.Build.0 = Debug|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.ActiveCfg = Release|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.Build.0 = Release|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.ActiveCfg = Release|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.Build.0 = Release|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.ActiveCfg = Debug|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.Build.0 = Debug|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.ActiveCfg = Debug|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.Build.0 = Debug|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.ActiveCfg = Release|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.Build.0 = Release|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.ActiveCfg = Release|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.Build.0 = Release|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.Build.0 = Debug|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.ActiveCfg = Debug|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.Build.0 = Debug|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.ActiveCfg = Release|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.Build.0 = Release|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.ActiveCfg = Release|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.Build.0 = Release|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.Build.0 = Debug|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.ActiveCfg = Debug|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.Build.0 = Debug|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.ActiveCfg = Release|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.Build.0 = Release|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.ActiveCfg = Release|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.Build.0 = Release|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.ActiveCfg = Debug|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.Build.0 = Debug|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.ActiveCfg = Debug|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.Build.0 = Debug|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.ActiveCfg = Release|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.Build.0 = Release|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.ActiveCfg = Release|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.Build.0 = Release|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.ActiveCfg = Debug|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.Build.0 = Debug|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.ActiveCfg = Debug|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.Build.0 = Debug|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.ActiveCfg = Release|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.Build.0 = Release|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.ActiveCfg = Release|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.Build.0 = Release|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.ActiveCfg = Debug|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.Build.0 = Debug|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.ActiveCfg = Debug|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.Build.0 = Debug|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.ActiveCfg = Release|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.Build.0 = Release|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.ActiveCfg = Release|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.Build.0 = Release|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.ActiveCfg = Debug|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.Build.0 = Debug|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.ActiveCfg = Debug|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.Build.0 = Debug|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.ActiveCfg = Release|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.Build.0 = Release|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.ActiveCfg = Release|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.Build.0 = Release|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.Build.0 = Debug|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.ActiveCfg = Debug|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.Build.0 = Debug|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.ActiveCfg = Release|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.Build.0 = Release|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.ActiveCfg = Release|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.Build.0 = Release|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.ActiveCfg = Debug|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.Build.0 = Debug|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.ActiveCfg = Debug|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.Build.0 = Debug|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.ActiveCfg = Release|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.Build.0 = Release|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.ActiveCfg = Release|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.Build.0 = Release|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.ActiveCfg = Debug|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.Build.0 = Debug|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.ActiveCfg = Debug|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.Build.0 = Debug|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.ActiveCfg = Release|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.Build.0 = Release|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.ActiveCfg = Release|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.Build.0 = Release|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.Build.0 = Debug|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.ActiveCfg = Debug|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.Build.0 = Debug|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.ActiveCfg = Release|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.Build.0 = Release|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.ActiveCfg = Release|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.Build.0 = Release|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.Build.0 = Debug|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.ActiveCfg = Debug|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.Build.0 = Debug|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.ActiveCfg = Release|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.Build.0 = Release|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.ActiveCfg = Release|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.Build.0 = Release|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.ActiveCfg = Debug|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.Build.0 = Debug|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.ActiveCfg = Debug|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.Build.0 = Debug|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.ActiveCfg = Release|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.Build.0 = Release|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.ActiveCfg = Release|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.Build.0 = Release|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.ActiveCfg = Debug|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.Build.0 = Debug|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.ActiveCfg = Debug|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.Build.0 = Debug|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.ActiveCfg = Release|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.Build.0 = Release|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.ActiveCfg = Release|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.Build.0 = Release|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.Build.0 = Debug|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.ActiveCfg = Debug|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.Build.0 = Debug|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.ActiveCfg = Release|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.Build.0 = Release|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.ActiveCfg = Release|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.Build.0 = Release|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.Build.0 = Debug|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.ActiveCfg = Debug|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.Build.0 = Debug|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.ActiveCfg = Release|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.Build.0 = Release|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.ActiveCfg = Release|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.Build.0 = Release|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.Build.0 = Debug|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.ActiveCfg = Debug|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.Build.0 = Debug|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.ActiveCfg = Release|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.Build.0 = Release|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.ActiveCfg = Release|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.Build.0 = Release|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.ActiveCfg = Debug|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.Build.0 = Debug|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.ActiveCfg = Debug|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.Build.0 = Debug|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.ActiveCfg = Release|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.Build.0 = Release|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.ActiveCfg = Release|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.Build.0 = Release|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.ActiveCfg = Debug|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.Build.0 = Debug|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.ActiveCfg = Debug|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.Build.0 = Debug|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.ActiveCfg = Release|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.Build.0 = Release|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.ActiveCfg = Release|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.Build.0 = Release|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.ActiveCfg = Debug|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.Build.0 = Debug|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.ActiveCfg = Debug|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.Build.0 = Debug|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.ActiveCfg = Release|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.Build.0 = Release|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.ActiveCfg = Release|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.Build.0 = Release|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.ActiveCfg = Debug|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.Build.0 = Debug|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.ActiveCfg = Debug|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.Build.0 = Debug|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.ActiveCfg = Release|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.Build.0 = Release|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.ActiveCfg = Release|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.Build.0 = Release|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.Build.0 = Debug|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.ActiveCfg = Debug|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.Build.0 = Debug|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.ActiveCfg = Release|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.Build.0 = Release|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.ActiveCfg = Release|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.Build.0 = Release|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.Build.0 = Debug|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.ActiveCfg = Debug|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.Build.0 = Debug|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.ActiveCfg = Release|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.Build.0 = Release|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.ActiveCfg = Release|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.Build.0 = Release|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.ActiveCfg = Debug|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.Build.0 = Debug|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.ActiveCfg = Debug|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.Build.0 = Debug|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.ActiveCfg = Release|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.Build.0 = Release|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.ActiveCfg = Release|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.Build.0 = Release|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.ActiveCfg = Debug|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.Build.0 = Debug|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.ActiveCfg = Debug|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.Build.0 = Debug|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.ActiveCfg = Release|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.Build.0 = Release|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.ActiveCfg = Release|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.Build.0 = Release|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.ActiveCfg = Debug|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.Build.0 = Debug|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.ActiveCfg = Debug|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.Build.0 = Debug|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.ActiveCfg = Release|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.Build.0 = Release|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.ActiveCfg = Release|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.Build.0 = Release|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.ActiveCfg = Debug|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.Build.0 = Debug|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.ActiveCfg = Debug|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.Build.0 = Debug|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.ActiveCfg = Release|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.Build.0 = Release|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.ActiveCfg = Release|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.Build.0 = Release|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.ActiveCfg = Debug|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.Build.0 = Debug|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.ActiveCfg = Debug|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.Build.0 = Debug|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.ActiveCfg = Release|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.Build.0 = Release|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.ActiveCfg = Release|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.Build.0 = Release|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.ActiveCfg = Debug|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.Build.0 = Debug|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.ActiveCfg = Debug|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.Build.0 = Debug|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.ActiveCfg = Release|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.Build.0 = Release|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.ActiveCfg = Release|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.Build.0 = Release|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.ActiveCfg = Debug|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.Build.0 = Debug|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.ActiveCfg = Debug|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.Build.0 = Debug|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.ActiveCfg = Release|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.Build.0 = Release|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.ActiveCfg = Release|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.Build.0 = Release|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.Build.0 = Debug|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.ActiveCfg = Debug|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.Build.0 = Debug|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.ActiveCfg = Release|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.Build.0 = Release|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.ActiveCfg = Release|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.Build.0 = Release|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.ActiveCfg = Debug|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.Build.0 = Debug|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.ActiveCfg = Debug|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.Build.0 = Debug|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.ActiveCfg = Release|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.Build.0 = Release|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.ActiveCfg = Release|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.Build.0 = Release|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.ActiveCfg = Debug|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.Build.0 = Debug|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.ActiveCfg = Debug|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.Build.0 = Debug|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.ActiveCfg = Release|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.Build.0 = Release|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.ActiveCfg = Release|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.Build.0 = Release|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.ActiveCfg = Debug|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.Build.0 = Debug|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.ActiveCfg = Debug|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.Build.0 = Debug|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.ActiveCfg = Release|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.Build.0 = Release|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.ActiveCfg = Release|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.Build.0 = Release|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.ActiveCfg = Debug|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.Build.0 = Debug|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.ActiveCfg = Debug|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.Build.0 = Debug|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.ActiveCfg = Release|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.Build.0 = Release|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.ActiveCfg = Release|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.Build.0 = Release|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.Build.0 = Debug|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.ActiveCfg = Debug|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.Build.0 = Debug|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.ActiveCfg = Release|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.Build.0 = Release|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.ActiveCfg = Release|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.Build.0 = Release|x64 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.ActiveCfg = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.Build.0 = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.ActiveCfg = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.Build.0 = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.ActiveCfg = Release|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.Build.0 = Release|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.ActiveCfg = Release|x64 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.Build.0 = Release|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.ActiveCfg = Debug|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.Build.0 = Debug|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.ActiveCfg = Debug|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.Build.0 = Debug|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.ActiveCfg = Release|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.Build.0 = Release|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.ActiveCfg = Release|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.Build.0 = Release|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.ActiveCfg = Debug|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.Build.0 = Debug|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.ActiveCfg = Debug|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.Build.0 = Debug|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.ActiveCfg = Release|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.Build.0 = Release|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.ActiveCfg = Release|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.Build.0 = Release|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.ActiveCfg = Debug|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.Build.0 = Debug|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.ActiveCfg = Debug|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.Build.0 = Debug|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.ActiveCfg = Release|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.Build.0 = Release|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.ActiveCfg = Release|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.Build.0 = Release|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.Build.0 = Debug|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.ActiveCfg = Debug|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.Build.0 = Debug|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.ActiveCfg = Release|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.Build.0 = Release|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.ActiveCfg = Release|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.Build.0 = Release|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.Build.0 = Debug|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.ActiveCfg = Debug|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.Build.0 = Debug|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.ActiveCfg = Release|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.Build.0 = Release|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.ActiveCfg = Release|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.Build.0 = Release|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.ActiveCfg = Debug|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.Build.0 = Debug|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.ActiveCfg = Debug|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.Build.0 = Debug|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.ActiveCfg = Release|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.Build.0 = Release|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.ActiveCfg = Release|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.Build.0 = Release|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.ActiveCfg = Debug|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.Build.0 = Debug|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.ActiveCfg = Debug|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.Build.0 = Debug|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.ActiveCfg = Release|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.Build.0 = Release|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.ActiveCfg = Release|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.Build.0 = Release|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.ActiveCfg = Debug|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.Build.0 = Debug|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.ActiveCfg = Debug|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.Build.0 = Debug|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.ActiveCfg = Release|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.Build.0 = Release|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.ActiveCfg = Release|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.Build.0 = Release|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.ActiveCfg = Debug|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.Build.0 = Debug|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.ActiveCfg = Debug|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.Build.0 = Debug|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.ActiveCfg = Release|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.Build.0 = Release|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.ActiveCfg = Release|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.Build.0 = Release|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.ActiveCfg = Debug|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.Build.0 = Debug|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.ActiveCfg = Debug|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.Build.0 = Debug|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.ActiveCfg = Release|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.Build.0 = Release|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.ActiveCfg = Release|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.Build.0 = Release|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.Build.0 = Debug|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.ActiveCfg = Debug|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.Build.0 = Debug|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.ActiveCfg = Release|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.Build.0 = Release|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.ActiveCfg = Release|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.Build.0 = Release|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.ActiveCfg = Debug|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.Build.0 = Debug|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.ActiveCfg = Debug|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.Build.0 = Debug|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.ActiveCfg = Release|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.Build.0 = Release|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.ActiveCfg = Release|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.Build.0 = Release|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.ActiveCfg = Debug|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.Build.0 = Debug|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.ActiveCfg = Debug|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.Build.0 = Debug|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.ActiveCfg = Release|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.Build.0 = Release|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.ActiveCfg = Release|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.Build.0 = Release|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.Build.0 = Debug|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.ActiveCfg = Debug|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.Build.0 = Debug|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.ActiveCfg = Release|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.Build.0 = Release|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.ActiveCfg = Release|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.Build.0 = Release|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.ActiveCfg = Debug|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.Build.0 = Debug|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.ActiveCfg = Debug|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.Build.0 = Debug|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.ActiveCfg = Release|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.Build.0 = Release|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.ActiveCfg = Release|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.Build.0 = Release|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.Build.0 = Debug|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.ActiveCfg = Debug|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.Build.0 = Debug|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.ActiveCfg = Release|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.Build.0 = Release|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.ActiveCfg = Release|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.Build.0 = Release|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.ActiveCfg = Debug|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.Build.0 = Debug|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.ActiveCfg = Debug|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.Build.0 = Debug|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.ActiveCfg = Release|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.Build.0 = Release|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.ActiveCfg = Release|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.Build.0 = Release|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.ActiveCfg = Debug|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.Build.0 = Debug|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.ActiveCfg = Debug|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.Build.0 = Debug|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.ActiveCfg = Release|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.Build.0 = Release|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.ActiveCfg = Release|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.Build.0 = Release|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.ActiveCfg = Debug|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.Build.0 = Debug|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.ActiveCfg = Debug|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.Build.0 = Debug|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.ActiveCfg = Release|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.Build.0 = Release|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.ActiveCfg = Release|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.Build.0 = Release|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.ActiveCfg = Debug|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.Build.0 = Debug|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.ActiveCfg = Debug|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.Build.0 = Debug|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.ActiveCfg = Release|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.Build.0 = Release|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.ActiveCfg = Release|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.Build.0 = Release|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.Build.0 = Debug|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.ActiveCfg = Debug|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.Build.0 = Debug|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.ActiveCfg = Release|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.Build.0 = Release|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.ActiveCfg = Release|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.Build.0 = Release|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.ActiveCfg = Debug|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.Build.0 = Debug|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.ActiveCfg = Debug|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.Build.0 = Debug|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.ActiveCfg = Release|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.Build.0 = Release|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.ActiveCfg = Release|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.Build.0 = Release|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.ActiveCfg = Debug|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.Build.0 = Debug|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.ActiveCfg = Debug|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.Build.0 = Debug|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.ActiveCfg = Release|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.Build.0 = Release|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.ActiveCfg = Release|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.Build.0 = Release|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.ActiveCfg = Debug|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.Build.0 = Debug|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.ActiveCfg = Debug|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.Build.0 = Debug|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.ActiveCfg = Release|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.Build.0 = Release|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.ActiveCfg = Release|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.Build.0 = Release|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.Build.0 = Debug|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.ActiveCfg = Debug|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.Build.0 = Debug|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.ActiveCfg = Release|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.Build.0 = Release|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.ActiveCfg = Release|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.Build.0 = Release|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.ActiveCfg = Debug|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.Build.0 = Debug|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.ActiveCfg = Debug|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.Build.0 = Debug|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.ActiveCfg = Release|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.Build.0 = Release|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.ActiveCfg = Release|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.Build.0 = Release|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.Build.0 = Debug|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.ActiveCfg = Debug|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.Build.0 = Debug|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.ActiveCfg = Release|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.Build.0 = Release|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.ActiveCfg = Release|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.Build.0 = Release|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.ActiveCfg = Debug|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.Build.0 = Debug|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.ActiveCfg = Debug|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.Build.0 = Debug|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.ActiveCfg = Release|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.Build.0 = Release|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.ActiveCfg = Release|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.Build.0 = Release|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.ActiveCfg = Debug|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.Build.0 = Debug|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.ActiveCfg = Debug|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.Build.0 = Debug|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.ActiveCfg = Release|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.Build.0 = Release|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.ActiveCfg = Release|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.Build.0 = Release|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.Build.0 = Debug|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.ActiveCfg = Debug|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.Build.0 = Debug|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.ActiveCfg = Release|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.Build.0 = Release|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.ActiveCfg = Release|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.Build.0 = Release|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.ActiveCfg = Debug|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.Build.0 = Debug|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.ActiveCfg = Debug|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.Build.0 = Debug|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.ActiveCfg = Release|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.Build.0 = Release|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.ActiveCfg = Release|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.Build.0 = Release|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.Build.0 = Debug|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.ActiveCfg = Debug|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.Build.0 = Debug|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.ActiveCfg = Release|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.Build.0 = Release|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.ActiveCfg = Release|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.Build.0 = Release|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.Build.0 = Debug|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.ActiveCfg = Debug|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.Build.0 = Debug|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.ActiveCfg = Release|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.Build.0 = Release|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.ActiveCfg = Release|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.Build.0 = Release|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.ActiveCfg = Debug|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.Build.0 = Debug|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.ActiveCfg = Debug|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.Build.0 = Debug|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.ActiveCfg = Release|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.Build.0 = Release|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.ActiveCfg = Release|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.Build.0 = Release|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.Build.0 = Debug|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.ActiveCfg = Debug|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.Build.0 = Debug|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.ActiveCfg = Release|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.Build.0 = Release|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.ActiveCfg = Release|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.Build.0 = Release|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.Build.0 = Debug|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.ActiveCfg = Debug|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.Build.0 = Debug|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.ActiveCfg = Release|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.Build.0 = Release|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.ActiveCfg = Release|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.Build.0 = Release|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.ActiveCfg = Debug|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.Build.0 = Debug|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.ActiveCfg = Debug|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.Build.0 = Debug|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.ActiveCfg = Release|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.Build.0 = Release|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.ActiveCfg = Release|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.Build.0 = Release|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.Build.0 = Debug|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.ActiveCfg = Debug|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.Build.0 = Debug|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.ActiveCfg = Release|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.Build.0 = Release|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.ActiveCfg = Release|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.Build.0 = Release|x64 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.Build.0 = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.ActiveCfg = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.Build.0 = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.ActiveCfg = Release|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.Build.0 = Release|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.ActiveCfg = Release|x64 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.Build.0 = Release|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.ActiveCfg = Debug|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.Build.0 = Debug|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.ActiveCfg = Debug|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.Build.0 = Debug|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.ActiveCfg = Release|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.Build.0 = Release|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.ActiveCfg = Release|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.Build.0 = Release|x64 + {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.ActiveCfg = Debug|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.Build.0 = Debug|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Debug|x64.ActiveCfg = Debug|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.ActiveCfg = Release|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.Build.0 = Release|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Release|x64.ActiveCfg = Release|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.Build.0 = Debug|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.ActiveCfg = Debug|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.Build.0 = Debug|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.ActiveCfg = Release|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.Build.0 = Release|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.ActiveCfg = Release|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.Build.0 = Release|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.Build.0 = Debug|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.ActiveCfg = Debug|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.Build.0 = Debug|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.ActiveCfg = Release|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.Build.0 = Release|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.ActiveCfg = Release|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.Build.0 = Release|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.ActiveCfg = Debug|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.Build.0 = Debug|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.ActiveCfg = Debug|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.Build.0 = Debug|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.ActiveCfg = Release|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.Build.0 = Release|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.ActiveCfg = Release|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.Build.0 = Release|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.Build.0 = Debug|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.ActiveCfg = Debug|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.Build.0 = Debug|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.ActiveCfg = Release|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.Build.0 = Release|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.ActiveCfg = Release|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.Build.0 = Release|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.ActiveCfg = Debug|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.Build.0 = Debug|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.ActiveCfg = Debug|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.Build.0 = Debug|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.ActiveCfg = Release|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.Build.0 = Release|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.ActiveCfg = Release|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.Build.0 = Release|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.ActiveCfg = Debug|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.Build.0 = Debug|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.ActiveCfg = Debug|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.Build.0 = Debug|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.ActiveCfg = Release|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.Build.0 = Release|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.ActiveCfg = Release|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.Build.0 = Release|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.ActiveCfg = Debug|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.Build.0 = Debug|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.ActiveCfg = Debug|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.Build.0 = Debug|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.ActiveCfg = Release|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.Build.0 = Release|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.ActiveCfg = Release|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.Build.0 = Release|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.Build.0 = Debug|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.ActiveCfg = Debug|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.Build.0 = Debug|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.ActiveCfg = Release|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.Build.0 = Release|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.ActiveCfg = Release|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.Build.0 = Release|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.Build.0 = Debug|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.ActiveCfg = Debug|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.Build.0 = Debug|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.ActiveCfg = Release|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.Build.0 = Release|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.ActiveCfg = Release|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.Build.0 = Release|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.ActiveCfg = Debug|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.Build.0 = Debug|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.ActiveCfg = Debug|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.Build.0 = Debug|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.ActiveCfg = Release|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.Build.0 = Release|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.ActiveCfg = Release|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.Build.0 = Release|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.Build.0 = Debug|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.ActiveCfg = Debug|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.Build.0 = Debug|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.ActiveCfg = Release|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.Build.0 = Release|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.ActiveCfg = Release|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.Build.0 = Release|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.ActiveCfg = Debug|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.Build.0 = Debug|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.ActiveCfg = Debug|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.Build.0 = Debug|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.ActiveCfg = Release|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.Build.0 = Release|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.ActiveCfg = Release|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.Build.0 = Release|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.ActiveCfg = Debug|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.Build.0 = Debug|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.ActiveCfg = Debug|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.Build.0 = Debug|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.ActiveCfg = Release|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.Build.0 = Release|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.ActiveCfg = Release|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.Build.0 = Release|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.Build.0 = Debug|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.ActiveCfg = Debug|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.Build.0 = Debug|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.ActiveCfg = Release|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.Build.0 = Release|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.ActiveCfg = Release|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.Build.0 = Release|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.ActiveCfg = Debug|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.Build.0 = Debug|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.ActiveCfg = Debug|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.Build.0 = Debug|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.ActiveCfg = Release|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.Build.0 = Release|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.ActiveCfg = Release|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.Build.0 = Release|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.Build.0 = Debug|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.ActiveCfg = Debug|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.Build.0 = Debug|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.ActiveCfg = Release|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.Build.0 = Release|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.ActiveCfg = Release|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.Build.0 = Release|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.ActiveCfg = Debug|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.Build.0 = Debug|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.ActiveCfg = Debug|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.Build.0 = Debug|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.ActiveCfg = Release|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.Build.0 = Release|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.ActiveCfg = Release|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.Build.0 = Release|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.Build.0 = Debug|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.ActiveCfg = Debug|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.Build.0 = Debug|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.ActiveCfg = Release|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.Build.0 = Release|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.ActiveCfg = Release|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.Build.0 = Release|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.ActiveCfg = Debug|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.Build.0 = Debug|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.ActiveCfg = Debug|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.Build.0 = Debug|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.ActiveCfg = Release|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.Build.0 = Release|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.ActiveCfg = Release|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.Build.0 = Release|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.ActiveCfg = Debug|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.Build.0 = Debug|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.ActiveCfg = Debug|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.Build.0 = Debug|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.ActiveCfg = Release|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.Build.0 = Release|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.ActiveCfg = Release|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.Build.0 = Release|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.ActiveCfg = Debug|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.Build.0 = Debug|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.ActiveCfg = Debug|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.Build.0 = Debug|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.ActiveCfg = Release|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.Build.0 = Release|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.ActiveCfg = Release|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.Build.0 = Release|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.Build.0 = Debug|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.ActiveCfg = Debug|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.Build.0 = Debug|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.ActiveCfg = Release|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.Build.0 = Release|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.ActiveCfg = Release|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.Build.0 = Release|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.Build.0 = Debug|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.ActiveCfg = Debug|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.Build.0 = Debug|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.ActiveCfg = Release|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.Build.0 = Release|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.ActiveCfg = Release|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.Build.0 = Release|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.Build.0 = Debug|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.ActiveCfg = Debug|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.Build.0 = Debug|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.ActiveCfg = Release|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.Build.0 = Release|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.ActiveCfg = Release|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.Build.0 = Release|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.Build.0 = Debug|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.ActiveCfg = Debug|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.Build.0 = Debug|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.ActiveCfg = Release|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.Build.0 = Release|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.ActiveCfg = Release|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.Build.0 = Release|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.ActiveCfg = Debug|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.Build.0 = Debug|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.ActiveCfg = Debug|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.Build.0 = Debug|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.ActiveCfg = Release|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.Build.0 = Release|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.ActiveCfg = Release|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.Build.0 = Release|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.ActiveCfg = Debug|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.Build.0 = Debug|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.ActiveCfg = Debug|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.Build.0 = Debug|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.ActiveCfg = Release|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.Build.0 = Release|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.ActiveCfg = Release|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.Build.0 = Release|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.ActiveCfg = Debug|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.Build.0 = Debug|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.ActiveCfg = Debug|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.Build.0 = Debug|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.ActiveCfg = Release|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.Build.0 = Release|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.ActiveCfg = Release|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.Build.0 = Release|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.ActiveCfg = Debug|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.Build.0 = Debug|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.ActiveCfg = Debug|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.Build.0 = Debug|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.ActiveCfg = Release|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.Build.0 = Release|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.ActiveCfg = Release|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.Build.0 = Release|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.Build.0 = Debug|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.ActiveCfg = Debug|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.Build.0 = Debug|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.ActiveCfg = Release|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.Build.0 = Release|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.ActiveCfg = Release|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.Build.0 = Release|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.ActiveCfg = Debug|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.Build.0 = Debug|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.ActiveCfg = Debug|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.Build.0 = Debug|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.ActiveCfg = Release|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.Build.0 = Release|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.ActiveCfg = Release|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.Build.0 = Release|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.ActiveCfg = Debug|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.Build.0 = Debug|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.ActiveCfg = Debug|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.Build.0 = Debug|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.ActiveCfg = Release|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.Build.0 = Release|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.ActiveCfg = Release|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.Build.0 = Release|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.ActiveCfg = Debug|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.Build.0 = Debug|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.ActiveCfg = Debug|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.Build.0 = Debug|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.ActiveCfg = Release|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.Build.0 = Release|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.ActiveCfg = Release|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.Build.0 = Release|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.Build.0 = Debug|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.ActiveCfg = Debug|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.Build.0 = Debug|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.ActiveCfg = Release|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.Build.0 = Release|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.ActiveCfg = Release|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.Build.0 = Release|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.Build.0 = Debug|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.ActiveCfg = Debug|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.Build.0 = Debug|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.ActiveCfg = Release|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.Build.0 = Release|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.ActiveCfg = Release|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.Build.0 = Release|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.ActiveCfg = Debug|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.Build.0 = Debug|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.ActiveCfg = Debug|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.Build.0 = Debug|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.ActiveCfg = Release|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.Build.0 = Release|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.ActiveCfg = Release|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.Build.0 = Release|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.ActiveCfg = Debug|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.Build.0 = Debug|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.ActiveCfg = Debug|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.Build.0 = Debug|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.ActiveCfg = Release|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.Build.0 = Release|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.ActiveCfg = Release|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.Build.0 = Release|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.Build.0 = Debug|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.ActiveCfg = Debug|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.Build.0 = Debug|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.ActiveCfg = Release|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.Build.0 = Release|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.ActiveCfg = Release|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.Build.0 = Release|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.ActiveCfg = Debug|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.Build.0 = Debug|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.ActiveCfg = Debug|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.Build.0 = Debug|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.ActiveCfg = Release|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.Build.0 = Release|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.ActiveCfg = Release|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.Build.0 = Release|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.Build.0 = Debug|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.ActiveCfg = Debug|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.Build.0 = Debug|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.ActiveCfg = Release|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.Build.0 = Release|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.ActiveCfg = Release|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.Build.0 = Release|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.ActiveCfg = Debug|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.Build.0 = Debug|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.ActiveCfg = Debug|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.Build.0 = Debug|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.ActiveCfg = Release|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.Build.0 = Release|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.ActiveCfg = Release|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.Build.0 = Release|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.ActiveCfg = Debug|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.Build.0 = Debug|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.ActiveCfg = Debug|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.Build.0 = Debug|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.ActiveCfg = Release|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.Build.0 = Release|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.ActiveCfg = Release|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.Build.0 = Release|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.ActiveCfg = Debug|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.Build.0 = Debug|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.ActiveCfg = Debug|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.Build.0 = Debug|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.ActiveCfg = Release|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.Build.0 = Release|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.ActiveCfg = Release|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.Build.0 = Release|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.Build.0 = Debug|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.ActiveCfg = Debug|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.Build.0 = Debug|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.ActiveCfg = Release|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.Build.0 = Release|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.ActiveCfg = Release|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.Build.0 = Release|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.Build.0 = Debug|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.ActiveCfg = Debug|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.Build.0 = Debug|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.ActiveCfg = Release|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.Build.0 = Release|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.ActiveCfg = Release|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.Build.0 = Release|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.ActiveCfg = Debug|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.Build.0 = Debug|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.ActiveCfg = Debug|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.Build.0 = Debug|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.ActiveCfg = Release|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.Build.0 = Release|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.ActiveCfg = Release|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.Build.0 = Release|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.ActiveCfg = Debug|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.Build.0 = Debug|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.ActiveCfg = Debug|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.Build.0 = Debug|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.ActiveCfg = Release|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.Build.0 = Release|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.ActiveCfg = Release|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.Build.0 = Release|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.ActiveCfg = Debug|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.Build.0 = Debug|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.ActiveCfg = Debug|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.Build.0 = Debug|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.ActiveCfg = Release|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.Build.0 = Release|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.ActiveCfg = Release|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.Build.0 = Release|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.Build.0 = Debug|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.ActiveCfg = Debug|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.Build.0 = Debug|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.ActiveCfg = Release|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.Build.0 = Release|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.ActiveCfg = Release|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.Build.0 = Release|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.ActiveCfg = Debug|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.Build.0 = Debug|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.ActiveCfg = Debug|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.Build.0 = Debug|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.ActiveCfg = Release|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.Build.0 = Release|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.ActiveCfg = Release|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.Build.0 = Release|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.Build.0 = Debug|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.ActiveCfg = Debug|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.Build.0 = Debug|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.ActiveCfg = Release|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.Build.0 = Release|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.ActiveCfg = Release|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.Build.0 = Release|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.ActiveCfg = Debug|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.Build.0 = Debug|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.ActiveCfg = Debug|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.Build.0 = Debug|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.ActiveCfg = Release|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.Build.0 = Release|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.ActiveCfg = Release|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.Build.0 = Release|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.ActiveCfg = Debug|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.Build.0 = Debug|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.ActiveCfg = Debug|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.Build.0 = Debug|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.ActiveCfg = Release|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.Build.0 = Release|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.ActiveCfg = Release|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.Build.0 = Release|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.ActiveCfg = Debug|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.Build.0 = Debug|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.ActiveCfg = Debug|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.Build.0 = Debug|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.ActiveCfg = Release|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.Build.0 = Release|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.ActiveCfg = Release|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.Build.0 = Release|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.ActiveCfg = Debug|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.Build.0 = Debug|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.ActiveCfg = Debug|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.Build.0 = Debug|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.ActiveCfg = Release|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.Build.0 = Release|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.ActiveCfg = Release|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.Build.0 = Release|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.Build.0 = Debug|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.ActiveCfg = Debug|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.Build.0 = Debug|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.ActiveCfg = Release|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.Build.0 = Release|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.ActiveCfg = Release|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.Build.0 = Release|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.ActiveCfg = Debug|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.Build.0 = Debug|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.ActiveCfg = Debug|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.Build.0 = Debug|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.ActiveCfg = Release|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.Build.0 = Release|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.ActiveCfg = Release|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.Build.0 = Release|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.Build.0 = Debug|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.ActiveCfg = Debug|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.Build.0 = Debug|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.ActiveCfg = Release|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.Build.0 = Release|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.ActiveCfg = Release|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.Build.0 = Release|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.ActiveCfg = Debug|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.Build.0 = Debug|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.ActiveCfg = Debug|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.Build.0 = Debug|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.ActiveCfg = Release|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.Build.0 = Release|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.ActiveCfg = Release|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.Build.0 = Release|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.ActiveCfg = Debug|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.Build.0 = Debug|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.ActiveCfg = Debug|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.Build.0 = Debug|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.ActiveCfg = Release|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.Build.0 = Release|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.ActiveCfg = Release|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.Build.0 = Release|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.Build.0 = Debug|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.ActiveCfg = Debug|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.Build.0 = Debug|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.ActiveCfg = Release|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.Build.0 = Release|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.ActiveCfg = Release|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.Build.0 = Release|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.ActiveCfg = Debug|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.Build.0 = Debug|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.ActiveCfg = Debug|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.Build.0 = Debug|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.ActiveCfg = Release|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.Build.0 = Release|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.ActiveCfg = Release|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.Build.0 = Release|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.ActiveCfg = Debug|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.Build.0 = Debug|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.ActiveCfg = Debug|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.Build.0 = Debug|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.ActiveCfg = Release|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.Build.0 = Release|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.ActiveCfg = Release|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F9916510-9055-4C9F-997A-3755DEC1511B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {9299B507-1AF9-4C93-9560-5F637D1E0C9E} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {20D781FB-4A20-4B75-B863-304A47182966} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {B8928210-546C-4AE3-956B-E2B724E6B8E5} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {6DA1396F-2A44-4D5C-8442-012F71006217} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {3A12F777-56A8-42EC-BD17-8F325524241E} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {33276462-8313-4192-8306-13717ECCA60A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {3C42510C-A29E-4A53-899C-203BFA874E0B} = {F9C41695-3353-4564-A154-58106829B19C} + {987F026D-EB1F-4013-ADA8-2406ACCDA526} = {F9C41695-3353-4564-A154-58106829B19C} + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28} = {F9C41695-3353-4564-A154-58106829B19C} + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61} = {F9C41695-3353-4564-A154-58106829B19C} + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3} = {F9C41695-3353-4564-A154-58106829B19C} + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A} = {F9C41695-3353-4564-A154-58106829B19C} + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856} = {F9C41695-3353-4564-A154-58106829B19C} + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {B988F96C-F87A-484C-AB15-D0674B22F291} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {214F211F-1A2B-4F79-8993-B8DEE2EF7441} = {F9C41695-3353-4564-A154-58106829B19C} + {210DD88D-649B-4695-8C5F-898A4F60A8CE} = {F9C41695-3353-4564-A154-58106829B19C} + {E26D2311-C164-48CF-BA24-5CEDA873D1B2} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {DD76B998-ED0D-4BFD-9660-3ADC3A334872} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {27CA5499-B3F2-4FB6-8414-651819B0B96C} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5} = {F9C41695-3353-4564-A154-58106829B19C} + {4ADADECA-99D7-410D-8127-CB27210DCC6A} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {E37561EB-B9C5-4215-9FF9-DB559916FBA2} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {A9265E36-7F2D-440C-BF3E-F447FDB6200F} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {6A1969EA-9657-4828-93E0-8D21A970F868} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {07137F45-8B5F-4561-BEC8-B883E9123785} = {F9C41695-3353-4564-A154-58106829B19C} + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {ECE691D0-BFB3-483B-A699-084269EFCE89} = {F9C41695-3353-4564-A154-58106829B19C} + {0BB52326-02D5-4698-A180-24078DA5DA0E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {D9057E63-AAAA-4FE7-800A-20C02F4761F3} = {F9C41695-3353-4564-A154-58106829B19C} + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {40FE7861-E54E-4DA9-BE4D-A5178014E477} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {1423FC8F-AA52-4562-8275-4BF0838CA378} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {53F841E8-284F-4545-9176-B131896E43F8} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {4AC1E062-0236-4E49-AA04-F732043D2DCF} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {290C5ED4-71A7-4040-AD26-4820CF7A9E60} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {1C856B14-54CD-4D07-B18B-5F7DB073AB51} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {A5B558C6-C767-11E1-A335-F6EB6188709B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {6022990D-3FD5-46A9-8AB5-E444C51646F3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {A8F23706-E590-4A87-96CC-5F8E5082503F} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {DADAC956-3A54-440A-8B56-A07234DEE861} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {C14D6E0D-810E-4599-A6E0-17298AFA0501} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {E71C1722-A41D-4475-87F4-29961A3654BB} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {9C6040B8-1173-40FA-A3DB-DE044CCD8250} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {576EEEFD-E423-482B-879A-F0515D40B8E1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {A4855451-6447-437C-B024-B36C3C7901EA} = {F9C41695-3353-4564-A154-58106829B19C} + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {AE677E3A-DAC5-42FD-8762-47370C57639B} = {F9C41695-3353-4564-A154-58106829B19C} + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {6DE11A47-2268-4B08-8DE5-15A1705FCE28} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {C619A811-8023-4441-B3D7-785388A09DF0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE} = {F9C41695-3353-4564-A154-58106829B19C} + {155211F8-08E1-4864-A3B8-9F04F4270360} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {2E15C462-A150-4A37-ACD6-FBAECF1724F5} = {F9C41695-3353-4564-A154-58106829B19C} + {F5E3FAFE-B650-4736-8D27-FA53866668C6} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {01F9E227-06F5-4BED-907F-402CA7DFAFE6} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {A556E0B5-73A1-4676-BA1F-133820DE7D5A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {F29D0C8D-141A-43CF-86B2-34A04653F8D4} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {0E046380-14CA-4C23-A807-8C678519A605} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {3C83B0AB-9739-41C1-A127-ED7DB9551F76} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {475ED6ED-C311-4188-ACB2-1C41830B22EE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {BF6E1942-7E42-4564-9DF5-FD0A00D71173} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {BE22A21F-73B7-453F-86A0-B867F0056490} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {12BCA020-EABF-429E-876A-A476BC9C10C0} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {6124E997-426E-4A0B-9617-D6D577D5E7D7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {66A9BDEB-150F-45DC-B20F-9892C0B43834} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {BCFAB658-326E-466D-995B-E76636C1DEA4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {B4327D10-ACDC-4C12-9555-749DD49A7BB0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {27D41D81-991F-4DC6-8749-B0321C87E694} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {BD291BF0-D804-4818-8311-DE871E6BCEAA} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {045BAC91-34D1-4B43-B52B-566801BE7F85} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {E604CD58-4579-4F69-9D6A-2605FD7CF716} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {E876FE63-0701-4CDA-BED5-7C73A379C1D1} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {CE6A5A24-EA88-4E67-BDF2-22517528E43F} = {F9C41695-3353-4564-A154-58106829B19C} + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {A185B162-6CB6-4502-B03F-B56F7699A8D9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {A21C50CD-28A6-481A-A12B-47189FE66641} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {2115FEBC-1EC4-4F95-A058-A523ED5295A4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {7DC23E4E-2448-4811-AABD-F5D069F6E74A} = {F9C41695-3353-4564-A154-58106829B19C} + {B3494FED-FB8C-43F4-B341-F26A3460203B} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {EFB2355B-82B3-4759-B7D8-95F8E9506291} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {B3BC3949-6949-41DE-94BF-B112FBFB1A84} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {713067DF-65EE-480B-A000-B2A323495F16} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {620E0BE7-3763-4F35-9DBD-4770104E269C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {86033E58-A1E3-43AD-AE8E-305E15E72A91} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {A7FAD273-8C71-4D72-A84F-2D160F2DC589} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {A2E9DA24-95E4-4414-94AF-488A382E276A} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {6D19209B-ECE7-4B9C-941C-0AA2B484F199} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A} = {F9C41695-3353-4564-A154-58106829B19C} + {4D3554DE-6E14-4F94-A909-A4B19151A47E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {13E796AD-BEA4-4213-A1B8-E18E2397E544} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {29A0C2A8-07A4-4A8B-8BED-8F7D024013D6} + EndGlobalSection +EndGlobal diff --git a/bin15/mir_icons.sln b/bin15/mir_icons.sln index 59d7581c7e..2fabdbffa2 100644 --- a/bin15/mir_icons.sln +++ b/bin15/mir_icons.sln @@ -1,330 +1,330 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27004.2010 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toolbar_icons", "..\plugins\Clist_modern\icons_pack\Toolbar_icons.vcxproj", "{796B43EF-DACE-4145-8571-31886F45A2C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM_icons", "..\plugins\SecureIM\SecureIM_icons\secureim_icons.vcxproj", "{3FAB6AC7-6B7F-4779-B519-34E8035074A4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker_Flags", "..\plugins\SpellChecker\Flags\spellchecker_flags.vcxproj", "{3B8B2642-716E-437C-B341-279B08FDC2C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx_icons", "..\plugins\UserInfoEx\IconPacks\default\icons_default_15.vcxproj", "{AA542F66-FF66-498A-ADBE-0BB9103ECD0A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_IRC", "..\protocols\IRCG\proto_irc\Proto_IRC.vcxproj", "{DD667247-3712-4355-9774-7E6ACAF2275E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Jabber", "..\protocols\JabberG\proto_jabber\Proto_Jabber.vcxproj", "{1AA0A504-0644-4F00-A1AD-F55D69E50DD0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_GG", "..\protocols\Gadu-Gadu\proto_gg\Proto_GG.vcxproj", "{33912E32-3B68-4E2C-82AE-64C06EE987A7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Twitter", "..\protocols\Twitter\proto_twitter\Proto_Twitter.vcxproj", "{A82C682E-8596-4DCA-98A6-50436194714B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xStatus_Jabber", "..\protocols\JabberG\jabber_xstatus\xStatus_Jabber.vcxproj", "{6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryPP_icons", "..\plugins\HistoryPlusPlus\historypp_icons\HistoryPP_icons.vcxproj", "{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Omegle", "..\protocols\Omegle\proto_omegle\omegle_icons.vcxproj", "{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM_icons", "..\plugins\TabSRMM\TabSRMM_icons\NOVA\ICONS_NOVA_15.vcxproj", "{F553F140-B7D3-4984-90B1-00D4831B8A6E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_mRadio", "..\plugins\mRadio\proto_mradio\Proto_mRadio.vcxproj", "{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_NewsAggregator", "..\protocols\NewsAggregator\proto_newsaggregator\Proto_NewsAggregator.vcxproj", "{B97882DC-7462-41DB-A390-BDFCE5295265}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_CurrencyRates", "..\protocols\CurrencyRates\proto_CurrencyRates\proto_CurrencyRates.vcxproj", "{5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Weather", "..\protocols\Weather\proto_weather\proto_weather.vcxproj", "{B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_YAMN", "..\protocols\YAMN\proto_yamn\proto_YAMN.vcxproj", "{C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fp_icons", "..\plugins\FingerprintNG\iconpacks\fp_icons.vcxproj", "{7F854B13-37EA-4956-BAEE-9715AE9F4579}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_VKontakte", "..\protocols\VKontakte\proto_vkontakte\Proto_VKontakte.vcxproj", "{5F8495EF-0765-4E03-905D-639BDBF05B4F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Sametime", "..\protocols\Sametime\proto_sametime\Proto_Sametime.vcxproj", "{217C99B1-0D5E-4A85-A84F-836FCA167B25}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MetaContacts", "..\src\icons\proto_metacontacts\Proto_MetaContacts.vcxproj", "{793B6174-89B0-4682-A957-A32BE7F61502}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Dummy", "..\protocols\Dummy\proto_dummy\Proto_Dummy.vcxproj", "{018F801B-E80F-4E49-A640-E30BC445E74A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Steam", "..\protocols\Steam\proto_steam\Proto_Steam.vcxproj", "{523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Skype", "..\protocols\SkypeWeb\proto_skype\Proto_Skype.vcxproj", "{DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Tox", "..\protocols\Tox\proto_tox\Proto_Tox.vcxproj", "{129A4E61-E476-45E8-BD50-5E03BA80E9AD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MinecraftDynmap", "..\protocols\MinecraftDynmap\proto_minecraftdynmap\minecraftdynmap_icons.vcxproj", "{178045D7-C0F4-4931-9F40-AB1B2A175092}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_ICQ", "..\protocols\ICQ-WIM\proto_icq\Proto_ICQ.vcxproj", "{DB3B0449-E576-4BBB-8B08-AB9E914D39CA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MRA", "..\protocols\ICQ-WIM\proto_mra\Proto_MRA.vcxproj", "{38BF6F63-58E7-442D-A7E8-B4BD57D224E2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Facebook", "..\protocols\Facebook\proto_facebook\Proto_Facebook.vcxproj", "{44298314-7DD4-4EF7-B576-30E503257223}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_WhatsApp", "..\protocols\WhatsApp\proto_whatsapp\Proto_WhatsApp.vcxproj", "{64A2B403-90AF-4CF8-BC69-4E8D33872D64}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Telegram", "..\protocols\Telegram\proto_telegram\Proto_Telegram.vcxproj", "{129A4E61-45E8-E476-BD50-5E03BA80E9AD}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.Build.0 = Debug|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.ActiveCfg = Debug|x64 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.Build.0 = Debug|x64 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.ActiveCfg = Release|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.Build.0 = Release|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.ActiveCfg = Release|x64 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.Build.0 = Release|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.ActiveCfg = Debug|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.Build.0 = Debug|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.ActiveCfg = Debug|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.Build.0 = Debug|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.ActiveCfg = Release|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.Build.0 = Release|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.ActiveCfg = Release|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.Build.0 = Release|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.Build.0 = Debug|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.ActiveCfg = Debug|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.Build.0 = Debug|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.ActiveCfg = Release|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.Build.0 = Release|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.ActiveCfg = Release|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.Build.0 = Release|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.Build.0 = Debug|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.ActiveCfg = Debug|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.Build.0 = Debug|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.ActiveCfg = Release|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.Build.0 = Release|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.ActiveCfg = Release|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.Build.0 = Release|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.Build.0 = Debug|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.ActiveCfg = Debug|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.Build.0 = Debug|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.ActiveCfg = Release|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.Build.0 = Release|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.ActiveCfg = Release|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.Build.0 = Release|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.Build.0 = Debug|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.ActiveCfg = Debug|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.Build.0 = Debug|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.ActiveCfg = Release|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.Build.0 = Release|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.ActiveCfg = Release|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.Build.0 = Release|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.ActiveCfg = Debug|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.Build.0 = Debug|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.ActiveCfg = Debug|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.Build.0 = Debug|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.ActiveCfg = Release|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.Build.0 = Release|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.ActiveCfg = Release|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.Build.0 = Release|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.ActiveCfg = Debug|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.Build.0 = Debug|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.ActiveCfg = Debug|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.Build.0 = Debug|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.ActiveCfg = Release|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.Build.0 = Release|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.ActiveCfg = Release|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.Build.0 = Release|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.ActiveCfg = Debug|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.Build.0 = Debug|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.ActiveCfg = Debug|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.Build.0 = Debug|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.ActiveCfg = Release|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.Build.0 = Release|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.ActiveCfg = Release|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.Build.0 = Release|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.Build.0 = Debug|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.ActiveCfg = Debug|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.Build.0 = Debug|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.ActiveCfg = Release|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.Build.0 = Release|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.ActiveCfg = Release|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.Build.0 = Release|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.ActiveCfg = Debug|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.Build.0 = Debug|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.ActiveCfg = Debug|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.Build.0 = Debug|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.ActiveCfg = Release|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.Build.0 = Release|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.ActiveCfg = Release|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.Build.0 = Release|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.Build.0 = Debug|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.ActiveCfg = Debug|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.Build.0 = Debug|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.ActiveCfg = Release|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.Build.0 = Release|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.ActiveCfg = Release|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.Build.0 = Release|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.ActiveCfg = Debug|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.Build.0 = Debug|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.ActiveCfg = Debug|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.Build.0 = Debug|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.ActiveCfg = Release|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.Build.0 = Release|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.ActiveCfg = Release|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.Build.0 = Release|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.ActiveCfg = Debug|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.Build.0 = Debug|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.ActiveCfg = Debug|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.Build.0 = Debug|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.ActiveCfg = Release|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.Build.0 = Release|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.ActiveCfg = Release|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.Build.0 = Release|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.ActiveCfg = Debug|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.Build.0 = Debug|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.ActiveCfg = Debug|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.Build.0 = Debug|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.ActiveCfg = Release|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.Build.0 = Release|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.ActiveCfg = Release|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.Build.0 = Release|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.Build.0 = Debug|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.ActiveCfg = Debug|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.Build.0 = Debug|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.ActiveCfg = Release|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.Build.0 = Release|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.ActiveCfg = Release|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.Build.0 = Release|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.ActiveCfg = Debug|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.Build.0 = Debug|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.ActiveCfg = Debug|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.Build.0 = Debug|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.ActiveCfg = Release|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.Build.0 = Release|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.ActiveCfg = Release|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.Build.0 = Release|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.ActiveCfg = Debug|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.Build.0 = Debug|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.ActiveCfg = Debug|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.Build.0 = Debug|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.ActiveCfg = Release|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.Build.0 = Release|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.ActiveCfg = Release|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.Build.0 = Release|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.Build.0 = Debug|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.ActiveCfg = Debug|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.Build.0 = Debug|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.ActiveCfg = Release|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.Build.0 = Release|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.ActiveCfg = Release|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.Build.0 = Release|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.ActiveCfg = Debug|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.Build.0 = Debug|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.ActiveCfg = Debug|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.Build.0 = Debug|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.ActiveCfg = Release|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.Build.0 = Release|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.ActiveCfg = Release|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.Build.0 = Release|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.ActiveCfg = Debug|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.Build.0 = Debug|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.ActiveCfg = Debug|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.Build.0 = Debug|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.ActiveCfg = Release|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.Build.0 = Release|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.ActiveCfg = Release|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.Build.0 = Release|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.ActiveCfg = Debug|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.Build.0 = Debug|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.ActiveCfg = Debug|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.Build.0 = Debug|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.ActiveCfg = Release|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.Build.0 = Release|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.ActiveCfg = Release|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.Build.0 = Release|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.ActiveCfg = Debug|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.Build.0 = Debug|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.ActiveCfg = Debug|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.Build.0 = Debug|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.ActiveCfg = Release|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.Build.0 = Release|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.ActiveCfg = Release|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.Build.0 = Release|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.Build.0 = Debug|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.ActiveCfg = Debug|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.Build.0 = Debug|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.ActiveCfg = Release|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.Build.0 = Release|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.ActiveCfg = Release|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.Build.0 = Release|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.ActiveCfg = Debug|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.Build.0 = Debug|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.ActiveCfg = Debug|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.Build.0 = Debug|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.ActiveCfg = Release|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.Build.0 = Release|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.ActiveCfg = Release|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.Build.0 = Release|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.ActiveCfg = Debug|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.Build.0 = Debug|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.ActiveCfg = Debug|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.Build.0 = Debug|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.ActiveCfg = Release|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.Build.0 = Release|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.ActiveCfg = Release|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.Build.0 = Release|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.ActiveCfg = Debug|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.Build.0 = Debug|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.ActiveCfg = Debug|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.Build.0 = Debug|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.ActiveCfg = Release|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.Build.0 = Release|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.ActiveCfg = Release|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.Build.0 = Release|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.ActiveCfg = Debug|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.Build.0 = Debug|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.ActiveCfg = Debug|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.Build.0 = Debug|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.ActiveCfg = Release|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.Build.0 = Release|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.ActiveCfg = Release|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.Build.0 = Release|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.ActiveCfg = Debug|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.Build.0 = Debug|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.ActiveCfg = Debug|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.Build.0 = Debug|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.ActiveCfg = Release|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.Build.0 = Release|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.ActiveCfg = Release|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.Build.0 = Release|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F618F449-6B8C-43C9-9647-D7D53706723D} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27004.2010 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toolbar_icons", "..\plugins\Clist_modern\icons_pack\Toolbar_icons.vcxproj", "{796B43EF-DACE-4145-8571-31886F45A2C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM_icons", "..\plugins\SecureIM\SecureIM_icons\secureim_icons.vcxproj", "{3FAB6AC7-6B7F-4779-B519-34E8035074A4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker_Flags", "..\plugins\SpellChecker\Flags\spellchecker_flags.vcxproj", "{3B8B2642-716E-437C-B341-279B08FDC2C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx_icons", "..\plugins\UserInfoEx\IconPacks\default\icons_default_15.vcxproj", "{AA542F66-FF66-498A-ADBE-0BB9103ECD0A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_IRC", "..\protocols\IRCG\proto_irc\Proto_IRC.vcxproj", "{DD667247-3712-4355-9774-7E6ACAF2275E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Jabber", "..\protocols\JabberG\proto_jabber\Proto_Jabber.vcxproj", "{1AA0A504-0644-4F00-A1AD-F55D69E50DD0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_GG", "..\protocols\Gadu-Gadu\proto_gg\Proto_GG.vcxproj", "{33912E32-3B68-4E2C-82AE-64C06EE987A7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Twitter", "..\protocols\Twitter\proto_twitter\Proto_Twitter.vcxproj", "{A82C682E-8596-4DCA-98A6-50436194714B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xStatus_Jabber", "..\protocols\JabberG\jabber_xstatus\xStatus_Jabber.vcxproj", "{6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryPP_icons", "..\plugins\HistoryPlusPlus\historypp_icons\HistoryPP_icons.vcxproj", "{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Omegle", "..\protocols\Omegle\proto_omegle\omegle_icons.vcxproj", "{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM_icons", "..\plugins\TabSRMM\TabSRMM_icons\NOVA\ICONS_NOVA_15.vcxproj", "{F553F140-B7D3-4984-90B1-00D4831B8A6E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_mRadio", "..\plugins\mRadio\proto_mradio\Proto_mRadio.vcxproj", "{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_NewsAggregator", "..\protocols\NewsAggregator\proto_newsaggregator\Proto_NewsAggregator.vcxproj", "{B97882DC-7462-41DB-A390-BDFCE5295265}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_CurrencyRates", "..\protocols\CurrencyRates\proto_CurrencyRates\proto_CurrencyRates.vcxproj", "{5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Weather", "..\protocols\Weather\proto_weather\proto_weather.vcxproj", "{B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_YAMN", "..\protocols\YAMN\proto_yamn\proto_YAMN.vcxproj", "{C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fp_icons", "..\plugins\FingerprintNG\iconpacks\fp_icons.vcxproj", "{7F854B13-37EA-4956-BAEE-9715AE9F4579}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_VKontakte", "..\protocols\VKontakte\proto_vkontakte\Proto_VKontakte.vcxproj", "{5F8495EF-0765-4E03-905D-639BDBF05B4F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Sametime", "..\protocols\Sametime\proto_sametime\Proto_Sametime.vcxproj", "{217C99B1-0D5E-4A85-A84F-836FCA167B25}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MetaContacts", "..\src\icons\proto_metacontacts\Proto_MetaContacts.vcxproj", "{793B6174-89B0-4682-A957-A32BE7F61502}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Dummy", "..\protocols\Dummy\proto_dummy\Proto_Dummy.vcxproj", "{018F801B-E80F-4E49-A640-E30BC445E74A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Steam", "..\protocols\Steam\proto_steam\Proto_Steam.vcxproj", "{523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Skype", "..\protocols\SkypeWeb\proto_skype\Proto_Skype.vcxproj", "{DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Tox", "..\protocols\Tox\proto_tox\Proto_Tox.vcxproj", "{129A4E61-E476-45E8-BD50-5E03BA80E9AD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MinecraftDynmap", "..\protocols\MinecraftDynmap\proto_minecraftdynmap\minecraftdynmap_icons.vcxproj", "{178045D7-C0F4-4931-9F40-AB1B2A175092}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_ICQ", "..\protocols\ICQ-WIM\proto_icq\Proto_ICQ.vcxproj", "{DB3B0449-E576-4BBB-8B08-AB9E914D39CA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MRA", "..\protocols\ICQ-WIM\proto_mra\Proto_MRA.vcxproj", "{38BF6F63-58E7-442D-A7E8-B4BD57D224E2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Facebook", "..\protocols\Facebook\proto_facebook\Proto_Facebook.vcxproj", "{44298314-7DD4-4EF7-B576-30E503257223}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_WhatsApp", "..\protocols\WhatsApp\proto_whatsapp\Proto_WhatsApp.vcxproj", "{64A2B403-90AF-4CF8-BC69-4E8D33872D64}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Telegram", "..\protocols\Telegram\proto_telegram\Proto_Telegram.vcxproj", "{129A4E61-45E8-E476-BD50-5E03BA80E9AD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.Build.0 = Debug|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.ActiveCfg = Debug|x64 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.Build.0 = Debug|x64 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.ActiveCfg = Release|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.Build.0 = Release|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.ActiveCfg = Release|x64 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.Build.0 = Release|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.Build.0 = Debug|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.ActiveCfg = Debug|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.Build.0 = Debug|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.ActiveCfg = Release|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.Build.0 = Release|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.ActiveCfg = Release|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.Build.0 = Release|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.Build.0 = Debug|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.ActiveCfg = Debug|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.Build.0 = Debug|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.ActiveCfg = Release|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.Build.0 = Release|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.ActiveCfg = Release|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.Build.0 = Release|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.Build.0 = Debug|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.ActiveCfg = Debug|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.Build.0 = Debug|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.ActiveCfg = Release|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.Build.0 = Release|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.ActiveCfg = Release|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.Build.0 = Release|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.Build.0 = Debug|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.ActiveCfg = Debug|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.Build.0 = Debug|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.ActiveCfg = Release|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.Build.0 = Release|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.ActiveCfg = Release|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.Build.0 = Release|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.Build.0 = Debug|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.ActiveCfg = Debug|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.Build.0 = Debug|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.ActiveCfg = Release|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.Build.0 = Release|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.ActiveCfg = Release|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.Build.0 = Release|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.ActiveCfg = Debug|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.Build.0 = Debug|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.ActiveCfg = Debug|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.Build.0 = Debug|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.ActiveCfg = Release|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.Build.0 = Release|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.ActiveCfg = Release|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.Build.0 = Release|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.ActiveCfg = Debug|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.Build.0 = Debug|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.ActiveCfg = Debug|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.Build.0 = Debug|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.ActiveCfg = Release|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.Build.0 = Release|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.ActiveCfg = Release|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.Build.0 = Release|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.Build.0 = Debug|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.ActiveCfg = Debug|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.Build.0 = Debug|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.ActiveCfg = Release|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.Build.0 = Release|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.ActiveCfg = Release|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.Build.0 = Release|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.ActiveCfg = Debug|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.Build.0 = Debug|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.ActiveCfg = Debug|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.Build.0 = Debug|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.ActiveCfg = Release|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.Build.0 = Release|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.ActiveCfg = Release|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.Build.0 = Release|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.ActiveCfg = Debug|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.Build.0 = Debug|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.ActiveCfg = Debug|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.Build.0 = Debug|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.ActiveCfg = Release|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.Build.0 = Release|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.ActiveCfg = Release|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.Build.0 = Release|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.Build.0 = Debug|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.ActiveCfg = Debug|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.Build.0 = Debug|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.ActiveCfg = Release|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.Build.0 = Release|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.ActiveCfg = Release|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.Build.0 = Release|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.Build.0 = Debug|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.ActiveCfg = Debug|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.Build.0 = Debug|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.ActiveCfg = Release|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.Build.0 = Release|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.ActiveCfg = Release|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.Build.0 = Release|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.ActiveCfg = Debug|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.Build.0 = Debug|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.ActiveCfg = Debug|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.Build.0 = Debug|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.ActiveCfg = Release|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.Build.0 = Release|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.ActiveCfg = Release|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.Build.0 = Release|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.Build.0 = Debug|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.ActiveCfg = Debug|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.Build.0 = Debug|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.ActiveCfg = Release|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.Build.0 = Release|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.ActiveCfg = Release|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.Build.0 = Release|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.ActiveCfg = Debug|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.Build.0 = Debug|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.ActiveCfg = Debug|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.Build.0 = Debug|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.ActiveCfg = Release|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.Build.0 = Release|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.ActiveCfg = Release|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.Build.0 = Release|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.Build.0 = Debug|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.ActiveCfg = Debug|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.Build.0 = Debug|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.ActiveCfg = Release|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.Build.0 = Release|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.ActiveCfg = Release|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.Build.0 = Release|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.ActiveCfg = Debug|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.Build.0 = Debug|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.ActiveCfg = Debug|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.Build.0 = Debug|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.ActiveCfg = Release|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.Build.0 = Release|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.ActiveCfg = Release|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.Build.0 = Release|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.Build.0 = Debug|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.ActiveCfg = Debug|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.Build.0 = Debug|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.ActiveCfg = Release|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.Build.0 = Release|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.ActiveCfg = Release|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.Build.0 = Release|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.ActiveCfg = Debug|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.Build.0 = Debug|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.ActiveCfg = Debug|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.Build.0 = Debug|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.ActiveCfg = Release|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.Build.0 = Release|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.ActiveCfg = Release|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.Build.0 = Release|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.ActiveCfg = Debug|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.Build.0 = Debug|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.ActiveCfg = Debug|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.Build.0 = Debug|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.ActiveCfg = Release|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.Build.0 = Release|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.ActiveCfg = Release|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.Build.0 = Release|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.ActiveCfg = Debug|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.Build.0 = Debug|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.ActiveCfg = Debug|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.Build.0 = Debug|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.ActiveCfg = Release|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.Build.0 = Release|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.ActiveCfg = Release|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.Build.0 = Release|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.ActiveCfg = Debug|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.Build.0 = Debug|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.ActiveCfg = Debug|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.Build.0 = Debug|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.ActiveCfg = Release|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.Build.0 = Release|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.ActiveCfg = Release|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.Build.0 = Release|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.Build.0 = Debug|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.ActiveCfg = Debug|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.Build.0 = Debug|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.ActiveCfg = Release|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.Build.0 = Release|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.ActiveCfg = Release|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.Build.0 = Release|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.ActiveCfg = Debug|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.Build.0 = Debug|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.ActiveCfg = Debug|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.Build.0 = Debug|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.ActiveCfg = Release|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.Build.0 = Release|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.ActiveCfg = Release|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.Build.0 = Release|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.ActiveCfg = Debug|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.Build.0 = Debug|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.ActiveCfg = Debug|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.Build.0 = Debug|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.ActiveCfg = Release|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.Build.0 = Release|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.ActiveCfg = Release|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.Build.0 = Release|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.ActiveCfg = Debug|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.Build.0 = Debug|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.ActiveCfg = Debug|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.Build.0 = Debug|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.ActiveCfg = Release|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.Build.0 = Release|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.ActiveCfg = Release|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.Build.0 = Release|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.ActiveCfg = Debug|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.Build.0 = Debug|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.ActiveCfg = Debug|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.Build.0 = Debug|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.ActiveCfg = Release|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.Build.0 = Release|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.ActiveCfg = Release|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.Build.0 = Release|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.ActiveCfg = Debug|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.Build.0 = Debug|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.ActiveCfg = Debug|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.Build.0 = Debug|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.ActiveCfg = Release|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.Build.0 = Release|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.ActiveCfg = Release|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.Build.0 = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F618F449-6B8C-43C9-9647-D7D53706723D} + EndGlobalSection +EndGlobal diff --git a/bin15/tdlib.sln b/bin15/tdlib.sln index afa3fb80aa..41b3fa02c8 100644 --- a/bin15/tdlib.sln +++ b/bin15/tdlib.sln @@ -1,81 +1,81 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.33026.149 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdactor", "..\protocols\Telegram\tdlib\tdactor.vcxproj", "{85F63934-02FE-332A-8703-059040B65512}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdcore", "..\protocols\Telegram\tdlib\tdcore.vcxproj", "{FC88FB5A-AAED-3F3E-9959-236444D8F644}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tddb", "..\protocols\Telegram\tdlib\tddb.vcxproj", "{F525EE11-8820-3D8A-87A5-465D50A98A64}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdlib", "..\protocols\Telegram\tdlib\tdlib.vcxproj", "{800E305A-3704-4617-ADA0-DEE8EAFDB804}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdnet", "..\protocols\Telegram\tdlib\tdnet.vcxproj", "{2246C3CF-7888-3102-984A-80214ADF418C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdutils", "..\protocols\Telegram\tdlib\tdutils.vcxproj", "{D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.ActiveCfg = Debug|x64 - {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.Build.0 = Debug|x64 - {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.ActiveCfg = Debug|Win32 - {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.Build.0 = Debug|Win32 - {85F63934-02FE-332A-8703-059040B65512}.Release|x64.ActiveCfg = Release|x64 - {85F63934-02FE-332A-8703-059040B65512}.Release|x64.Build.0 = Release|x64 - {85F63934-02FE-332A-8703-059040B65512}.Release|x86.ActiveCfg = Release|Win32 - {85F63934-02FE-332A-8703-059040B65512}.Release|x86.Build.0 = Release|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.ActiveCfg = Debug|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.Build.0 = Debug|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.ActiveCfg = Debug|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.Build.0 = Debug|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.ActiveCfg = Release|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.Build.0 = Release|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.ActiveCfg = Release|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.Build.0 = Release|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.ActiveCfg = Debug|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.Build.0 = Debug|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.ActiveCfg = Debug|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.Build.0 = Debug|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.ActiveCfg = Release|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.Build.0 = Release|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.ActiveCfg = Release|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.Build.0 = Release|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.ActiveCfg = Debug|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.Build.0 = Debug|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.ActiveCfg = Debug|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.Build.0 = Debug|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.ActiveCfg = Release|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.Build.0 = Release|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.ActiveCfg = Release|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.Build.0 = Release|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.ActiveCfg = Debug|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.Build.0 = Debug|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.ActiveCfg = Debug|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.Build.0 = Debug|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.ActiveCfg = Release|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.Build.0 = Release|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.ActiveCfg = Release|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.Build.0 = Release|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.ActiveCfg = Debug|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.Build.0 = Debug|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.ActiveCfg = Debug|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.Build.0 = Debug|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.ActiveCfg = Release|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.Build.0 = Release|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.ActiveCfg = Release|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8F24FFFB-D787-4C9B-A473-3B5904646619} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.33026.149 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdactor", "..\protocols\Telegram\tdlib\tdactor.vcxproj", "{85F63934-02FE-332A-8703-059040B65512}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdcore", "..\protocols\Telegram\tdlib\tdcore.vcxproj", "{FC88FB5A-AAED-3F3E-9959-236444D8F644}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tddb", "..\protocols\Telegram\tdlib\tddb.vcxproj", "{F525EE11-8820-3D8A-87A5-465D50A98A64}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdlib", "..\protocols\Telegram\tdlib\tdlib.vcxproj", "{800E305A-3704-4617-ADA0-DEE8EAFDB804}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdnet", "..\protocols\Telegram\tdlib\tdnet.vcxproj", "{2246C3CF-7888-3102-984A-80214ADF418C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdutils", "..\protocols\Telegram\tdlib\tdutils.vcxproj", "{D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.ActiveCfg = Debug|x64 + {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.Build.0 = Debug|x64 + {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.ActiveCfg = Debug|Win32 + {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.Build.0 = Debug|Win32 + {85F63934-02FE-332A-8703-059040B65512}.Release|x64.ActiveCfg = Release|x64 + {85F63934-02FE-332A-8703-059040B65512}.Release|x64.Build.0 = Release|x64 + {85F63934-02FE-332A-8703-059040B65512}.Release|x86.ActiveCfg = Release|Win32 + {85F63934-02FE-332A-8703-059040B65512}.Release|x86.Build.0 = Release|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.ActiveCfg = Debug|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.Build.0 = Debug|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.ActiveCfg = Debug|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.Build.0 = Debug|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.ActiveCfg = Release|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.Build.0 = Release|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.ActiveCfg = Release|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.Build.0 = Release|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.ActiveCfg = Debug|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.Build.0 = Debug|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.ActiveCfg = Debug|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.Build.0 = Debug|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.ActiveCfg = Release|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.Build.0 = Release|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.ActiveCfg = Release|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.Build.0 = Release|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.ActiveCfg = Debug|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.Build.0 = Debug|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.ActiveCfg = Debug|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.Build.0 = Debug|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.ActiveCfg = Release|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.Build.0 = Release|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.ActiveCfg = Release|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.Build.0 = Release|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.ActiveCfg = Debug|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.Build.0 = Debug|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.ActiveCfg = Debug|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.Build.0 = Debug|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.ActiveCfg = Release|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.Build.0 = Release|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.ActiveCfg = Release|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.Build.0 = Release|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.ActiveCfg = Debug|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.Build.0 = Debug|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.ActiveCfg = Debug|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.Build.0 = Debug|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.ActiveCfg = Release|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.Build.0 = Release|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.ActiveCfg = Release|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8F24FFFB-D787-4C9B-A473-3B5904646619} + EndGlobalSection +EndGlobal diff --git a/bin16/mir_full.sln b/bin16/mir_full.sln index df2ff5e4ec..ae65273f57 100644 --- a/bin16/mir_full.sln +++ b/bin16/mir_full.sln @@ -1,2178 +1,2178 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.27130.2036 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Miranda", "..\src\miranda32\miranda32.vcxproj", "{F9916510-9055-4C9F-997A-3755DEC1511B}" - ProjectSection(ProjectDependencies) = postProject - {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {538E451F-E667-4D07-BCE6-976ECC7BB8D1} - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_core", "..\src\mir_core\mir_core.vcxproj", "{D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_app", "..\src\mir_app\mir_app.vcxproj", "{538E451F-E667-4D07-BCE6-976ECC7BB8D1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjson", "..\libs\libjson\libjson.vcxproj", "{F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AVS", "..\plugins\AVS\avs.vcxproj", "{7711F563-6473-4ABD-B5E3-477CE8384AD6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zlib", "..\libs\zlib\zlib.vcxproj", "{E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Import", "..\plugins\Import\import.vcxproj", "{9299B507-1AF9-4C93-9560-5F637D1E0C9E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mmap", "..\plugins\Db3x_mmap\db3x_mmap.vcxproj", "{20D781FB-4A20-4B75-B863-304A47182966}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scriver", "..\plugins\Scriver\scriver.vcxproj", "{B8928210-546C-4AE3-956B-E2B724E6B8E5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM", "..\plugins\TabSRMM\tabsrmm.vcxproj", "{99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GG", "..\protocols\Gadu-Gadu\gadugadu.vcxproj", "{6DA1396F-2A44-4D5C-8442-012F71006217}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IRC", "..\protocols\IRCG\IRC.vcxproj", "{3A12F777-56A8-42EC-BD17-8F325524241E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Jabber", "..\protocols\JabberG\jabber.vcxproj", "{33276462-8313-4192-8306-13717ECCA60A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_nicer", "..\plugins\Clist_nicer\clist_nicer.vcxproj", "{3C42510C-A29E-4A53-899C-203BFA874E0B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cln_skinedit", "..\plugins\Cln_skinedit\skinedit.vcxproj", "{987F026D-EB1F-4013-ADA8-2406ACCDA526}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\AuthState\authstate.vcxproj", "{DB315D7D-00BB-43B2-93A6-0430CA2B9F28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "..\plugins\Console\Console.vcxproj", "{A231E008-2D1A-4F24-95DD-59F56F85A499}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Contacts", "..\plugins\ContactsPlus\contacts.vcxproj", "{F4F2FD25-1553-FB72-F695-0701D20C3168}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Flags", "..\plugins\CountryFlags\flags.vcxproj", "{B4361FA0-4073-4B60-EE72-F5C08E6EDF61}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSList", "..\plugins\CSList\cslist.vcxproj", "{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Db_autobackups", "..\plugins\Db_autobackups\db_autobackups.vcxproj", "{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FavContacts", "..\plugins\FavContacts\favcontacts.vcxproj", "{2D0B4CB0-3ACA-4612-B745-FF3050E1500A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FltContacts", "..\plugins\FloatingContacts\FltCont.vcxproj", "{9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folders", "..\plugins\Folders\folders.vcxproj", "{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LinkList", "..\plugins\HistoryLinkListPlus\linklist.vcxproj", "{850EC838-0EAD-45EB-6F1B-16DC90DCE18D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistorySweeperLight", "..\plugins\HistorySweeperLight\historysweeperlight.vcxproj", "{9DE1F0B0-B9D1-4681-82E7-13CC3E047445}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEView", "..\plugins\IEView\ieview.vcxproj", "{B988F96C-F87A-484C-AB15-D0674B22F291}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IgnoreState", "..\plugins\IgnoreState\ignore.vcxproj", "{214F211F-1A2B-4F79-8993-B8DEE2EF7441}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MenuEx", "..\plugins\MenuItemEx\menuex.vcxproj", "{210DD88D-649B-4695-8C5F-898A4F60A8CE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libTextControl", "..\libs\mTextControl\mtextcontrol.vcxproj", "{E26D2311-C164-48CF-BA24-5CEDA873D1B2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewXstatusNotify", "..\plugins\NewXstatusNotify\NewXstatusNotify.vcxproj", "{D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Nudge", "..\plugins\Nudge\nudge.vcxproj", "{8190CFAA-3B73-43D8-9101-8368E21F1864}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PopupPlus", "..\plugins\Popup\Popup.vcxproj", "{726460C7-E1F1-4C37-B64F-DA8A8DD26D70}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickMessages", "..\plugins\QuickMessages\quickmessages.vcxproj", "{DD76B998-ED0D-4BFD-9660-3ADC3A334872}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickReplies", "..\plugins\QuickReplies\quickreplies.vcxproj", "{27CA5499-B3F2-4FB6-8414-651819B0B96C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Rate", "..\plugins\Rate\rate.vcxproj", "{C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM", "..\plugins\SecureIM\secureim_16.vcxproj", "{4ADADECA-99D7-410D-8127-CB27210DCC6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SeenPlugin", "..\plugins\SeenPlugin\seenplugin.vcxproj", "{EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sessions", "..\plugins\Sessions\Sessions.vcxproj", "{37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleAR", "..\plugins\SimpleAR\SimpleAR.vcxproj", "{06C44834-7B7A-4074-A6D8-7F163B3FF707}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SmileyAdd", "..\plugins\SmileyAdd\SmileyAdd.vcxproj", "{5BBA7E51-B494-4462-BC4F-1AE5F57F9857}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SplashScreen", "..\plugins\SplashScreen\splashscreen.vcxproj", "{5A6095F4-B037-4DA8-8410-8004A90C961A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpam", "..\plugins\StopSpamPlus\stopspam.vcxproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tipper", "..\plugins\TipperYM\tipper_ym.vcxproj", "{2C818919-A38F-44FF-BD91-A6A204AC592A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TooltipNotify", "..\plugins\TooltipNotify\ttnotify.vcxproj", "{1948EAEA-4C25-4F6B-AD9E-5891F656EADA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TranslitSwitcher", "..\plugins\TranslitSwitcher\TranslitSwitcher.vcxproj", "{82F96271-4136-4B0E-AB6F-040DE7A4DD1E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserGuide", "..\plugins\UserGuide\UserGuide.vcxproj", "{92E3BDEE-DD17-4619-AD61-70C0ADE04217}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx", "..\plugins\UserInfoEx\UInfoEx.vcxproj", "{AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Variables", "..\plugins\Variables\Variables.vcxproj", "{3038EF69-85BE-4D92-9864-CD6A5EBB558A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhenWasIt", "..\plugins\WhenWasIt\WhenWasIt.vcxproj", "{63E05ECA-0A63-479E-86BD-2CAF53869BDA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker", "..\plugins\SpellChecker\spellchecker.vcxproj", "{5DB86086-10E9-42E7-AC90-503D2678C2A2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Alarms", "..\plugins\Alarms\alarms.vcxproj", "{5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroNotify", "..\plugins\ZeroNotification\Zero Notification.vcxproj", "{E37561EB-B9C5-4215-9FF9-DB559916FBA2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardNotify", "..\plugins\KeyboardNotify\KeyboardNotify.vcxproj", "{A9265E36-7F2D-440C-BF3E-F447FDB6200F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AddContactPlus", "..\plugins\AddContactPlus\addcontactplus.vcxproj", "{253ADD1D-F7C9-4643-A957-51BFCD61A5D2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleStatusMsg", "..\plugins\SimpleStatusMsg\simplestatusmsg.vcxproj", "{D3D80E27-D099-41EC-AFB2-A891A33F1608}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClientChangeNotify", "..\plugins\ClientChangeNotify\ClientChangeNotify.vcxproj", "{6A1969EA-9657-4828-93E0-8D21A970F868}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ListeningTo", "..\plugins\ListeningTo\listeningto.vcxproj", "{5FAA475D-0593-454F-8601-0D7150DCA4A0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Omegle", "..\protocols\Omegle\omegle.vcxproj", "{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugins\RecentContacts\RecentContacts.vcxproj", "{07137F45-8B5F-4561-BEC8-B883E9123785}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EkHtml", "..\plugins\MirOTR\ekhtml\ekhtml_16.vcxproj", "{2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Libgcrypt", "..\plugins\MirOTR\Libgcrypt\Libgcrypt_16.vcxproj", "{40FE7861-E54E-4DA9-BE4D-A5178014E477}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libotr", "..\plugins\MirOTR\libotr\libotr_16.vcxproj", "{1423FC8F-AA52-4562-8275-4BF0838CA378}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirOTR", "..\plugins\MirOTR\MirOTR_16.vcxproj", "{53F841E8-284F-4545-9176-B131896E43F8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewEventNotify", "..\plugins\NewEventNotify\neweventnotify.vcxproj", "{2E0A2793-94C3-82E7-2AB0-FD421816CFBF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhoUsesMyFiles", "..\plugins\WhoUsesMyFiles\wumf.vcxproj", "{F29CCB9B-79CF-4341-AA05-3626A036D3E3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CryptoPP", "..\plugins\CryptoPP\cryptopp_16.vcxproj", "{4AC1E062-0236-4E49-AA04-F732043D2DCF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cryptlib", "..\plugins\CryptoPP\crypto\cryptlib_16.vcxproj", "{290C5ED4-71A7-4040-AD26-4820CF7A9E60}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserInfo", "..\src\core\stduserinfo\stduserinfo.vcxproj", "{1C856B14-54CD-4D07-B18B-5F7DB073AB51}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdEmail", "..\src\core\stdemail\stdemail.vcxproj", "{A5B558C6-C767-11E1-A335-F6EB6188709B}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdFile", "..\src\core\stdfile\stdfile.vcxproj", "{6022990D-3FD5-46A9-8AB5-E444C51646F3}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAutoAway", "..\src\core\stdautoaway\stdautoaway.vcxproj", "{A8F23706-E590-4A87-96CC-5F8E5082503F}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUIHist", "..\src\core\stduihist\stduihist.vcxproj", "{DADAC956-3A54-440A-8B56-A07234DEE861}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserOnline", "..\src\core\stduseronline\stduseronline.vcxproj", "{D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAway", "..\src\core\stdaway\stdaway.vcxproj", "{C14D6E0D-810E-4599-A6E0-17298AFA0501}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdClist", "..\src\core\stdclist\stdclist.vcxproj", "{E71C1722-A41D-4475-87F4-29961A3654BB}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdMsg", "..\src\core\stdmsg\stdmsg.vcxproj", "{F47EAB99-C78F-4A92-87D5-B0E16FE5A133}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdCrypt", "..\src\core\stdcrypt\stdcrypt.vcxproj", "{8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmdLine", "..\plugins\CmdLine\CmdLine.vcxproj", "{73BA9CA5-640D-4F30-A157-A73557A25F98}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MimCmd", "..\plugins\MimCmd\MimCmd.vcxproj", "{1E3BB48A-FFBC-4A03-8C43-9124A484BE51}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTPFile", "..\plugins\FTPFileYM\ftpfile.vcxproj", "{73482497-9F57-4819-A9AB-5D841A9F072D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PasteIt", "..\plugins\PasteIt\PasteIt.vcxproj", "{BAEBC482-CDA9-4053-A7D0-08222E85118E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendScreenshotPlus\SendSS.vcxproj", "{CEAD8BCF-1F22-4E00-9F6D-E33405B00552}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenFolder", "..\plugins\OpenFolder\openFolder.vcxproj", "{8D233B9A-2744-4B62-94FC-7872FDDA4683}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyDetails", "..\plugins\MyDetails\mydetails.vcxproj", "{A4855451-6447-437C-B024-B36C3C7901EA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Msg_Export", "..\plugins\Msg_Export\msg_export.vcxproj", "{4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpamMod", "..\plugins\StopSpamMod\stopspam_mod.vcxproj", "{0FF6989B-880A-4C3F-B69D-AFF93296044D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Watrack_MPD", "..\plugins\watrack_mpd\watrack_mpd.vcxproj", "{A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginUpdater", "..\plugins\PluginUpdater\PluginUpdater.vcxproj", "{21F6C0E4-DD1A-49E6-82FD-64574BB902BD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PManagerEx", "..\plugins\ProfileManager\pmanagerEx.vcxproj", "{728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Restart", "..\plugins\Restart\Restart.vcxproj", "{18195F68-A747-8643-050C-C5101DA658FD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrafficCounter", "..\plugins\TrafficCounter\TrafficCounter.vcxproj", "{885010EA-D008-4E38-85D4-487693F0BA00}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackUpdater", "..\plugins\PackUpdater\PackUpdater.vcxproj", "{20413125-4D68-4751-8062-DDA026DDABF1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickContacts", "..\plugins\QuickContacts\quickcontacts.vcxproj", "{7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MobileState", "..\plugins\MobileState\mobilestate.vcxproj", "{AE677E3A-DAC5-42FD-8762-47370C57639B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NoHistory", "..\plugins\NoHistory\NoHistory.vcxproj", "{ABF05E2C-C335-4BD1-8C3E-4C63285362CF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YAMN", "..\protocols\YAMN\YAMN.vcxproj", "{C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewsAggregator", "..\protocols\NewsAggregator\NewsAggregator.vcxproj", "{6DE11A47-2268-4B08-8DE5-15A1705FCE28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CurrencyRates", "..\protocols\CurrencyRates\Forex.vcxproj", "{C619A811-8023-4441-B3D7-785388A09DF0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Weather", "..\protocols\Weather\weather.vcxproj", "{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ping", "..\plugins\Ping\ping.vcxproj", "{F31BD1B6-EE9D-4F76-A047-F8AEADC26086}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fingerprint", "..\plugins\FingerprintNG\fingerprint_ng.vcxproj", "{AF7D71D4-19B7-42B8-91DD-701F155AC4AE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssocMgr", "..\plugins\AssocMgr\assocmgr.vcxproj", "{B57D997C-73E1-D5F7-ECCA-C204345C04A3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoRun", "..\plugins\AutoRun\autorun.vcxproj", "{00037ACC-F32D-4B5F-93A8-3CF0E277E377}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoShutdown", "..\plugins\AutoShutdown\shutdown.vcxproj", "{3F8EF54D-0593-4048-B0E5-C938F99B29F3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AvatarHistory", "..\plugins\AvatarHistory\AvatarHistory.vcxproj", "{9D702039-F4A9-4978-92B3-3615E5C44BEE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicHistory", "..\plugins\BasicHistory\BasicHistory.vcxproj", "{155211F8-08E1-4864-A3B8-9F04F4270360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BASS_interface", "..\plugins\BASS_interface\Bass_interface.vcxproj", "{3933E789-D185-41DC-8169-9FF4365B6015}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_blind", "..\plugins\Clist_blind\Clist_blind.vcxproj", "{2E15C462-A150-4A37-ACD6-FBAECF1724F5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartPosition", "..\plugins\StartPosition\StartPosition.vcxproj", "{046C5F80-ABE5-488F-BFC8-B024D4AACC8C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HTTPServer", "..\plugins\HTTPServer\HTTPServer_16.vcxproj", "{F7A70398-AFA0-4A58-B645-85268F9517DE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pu_stub", "..\plugins\PluginUpdater\pu_stub\pu_stub.vcxproj", "{121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotifyAnything", "..\plugins\NotifyAnything\NotifyAnything.vcxproj", "{F5E3FAFE-B650-4736-8D27-FA53866668C6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "..\libs\libcurl\libcurl.vcxproj", "{01F9E227-06F5-4BED-907F-402CA7DFAFE6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusChange", "..\plugins\StatusChange\StatusChange.vcxproj", "{D09881C7-E189-49AD-919E-F64355F8EFD0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyPounce", "..\plugins\BuddyPounce\buddypounce.vcxproj", "{FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MsgPopup", "..\plugins\MsgPopup\MsgPopup.vcxproj", "{1E702CF1-E52F-49F8-915A-FCBBCE554774}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NimContact", "..\protocols\Non-IM Contact\nimcontact.vcxproj", "{A556E0B5-73A1-4676-BA1F-133820DE7D5A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XSoundNotify", "..\plugins\XSoundNotify\XSoundNotify.vcxproj", "{5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YARelay", "..\plugins\YARelay\YARelay.vcxproj", "{AA5CA2D0-F096-4001-B1B6-439C7FC11E77}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeStatusChange", "..\plugins\SkypeStatusChange\SkypeStatusChange.vcxproj", "{10F78F26-2B20-4158-869F-CB29533B4C2C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wbOSD", "..\plugins\wbOSD\wbOSD.vcxproj", "{DA450122-7F0B-45DA-9EAA-421887AD8450}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "New_GPG", "..\plugins\New_GPG\new_gpg.vcxproj", "{F29D0C8D-141A-43CF-86B2-34A04653F8D4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spamotron", "..\plugins\Spamotron\Spamotron.vcxproj", "{DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LotusNotify", "..\protocols\LotusNotify\LotusNotify.vcxproj", "{0E046380-14CA-4C23-A807-8C678519A605}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirFox", "..\plugins\MirFox\MirFoxNG_16.vcxproj", "{3E9DA555-4C7B-463C-AD5C-214073DE29D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConnectionNotify", "..\protocols\ConnectionNotify\ConnectionNotify.vcxproj", "{3C83B0AB-9739-41C1-A127-ED7DB9551F76}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Exchange", "..\plugins\Exchange\Exchange.vcxproj", "{F462FDA1-BDCD-49B2-B996-D7DE71D07393}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebView", "..\protocols\WebView\webview.vcxproj", "{475ED6ED-C311-4188-ACB2-1C41830B22EE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShlExt", "..\plugins\ShellExt\shellext.vcxproj", "{B27B85B5-0EF1-496D-99D7-0702A98A342A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinterSpeak", "..\plugins\WinterSpeak\WinterSpeak.vcxproj", "{A44F96D0-A850-4A67-9570-0E9298A16E40}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKontakte", "..\protocols\VKontakte\vk.vcxproj", "{BF6E1942-7E42-4564-9DF5-FD0A00D71173}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartupSilence", "..\plugins\StartupSilence\StartupSilence.vcxproj", "{7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirandaG15", "..\plugins\MirandaG15\MirandaG15.vcxproj", "{8ACA3C8B-BDFA-47B2-8578-069555BA05B3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RemovePersonalSettings", "..\plugins\RemovePersonalSettings\rps.vcxproj", "{0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewAwaySys", "..\plugins\NewAwaySysMod\NewAwaySys.vcxproj", "{6A516E27-AC50-5374-756B-A1558DB2EFA9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryStats", "..\plugins\HistoryStats\historystats.vcxproj", "{B5BCDC2F-81FC-4324-90C6-E5540A225EFF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sametime", "..\protocols\Sametime\sametime.vcxproj", "{BE22A21F-73B7-453F-86A0-B867F0056490}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glib", "..\protocols\Sametime\src\glib\glib_16.vcxproj", "{12BCA020-EABF-429E-876A-A476BC9C10C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GmailNotifier", "..\protocols\GmailNotifier\GmailNotifier.vcxproj", "{EDAAD28B-505B-4969-A8BB-97EAE818DEEA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Pcre16", "..\libs\Pcre16\pcre16.vcxproj", "{6124E997-426E-4A0B-9617-D6D577D5E7D7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEHistory", "..\plugins\IEHistory\IEHistory.vcxproj", "{7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dummy", "..\protocols\Dummy\dummy.vcxproj", "{D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Steam", "..\protocols\Steam\Steam.vcxproj", "{8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HwHotKeys", "..\plugins\HwHotKeys\HwHotKeys.vcxproj", "{639E2B3A-64F2-4152-B5BB-12468E5D60B6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeWeb", "..\protocols\SkypeWeb\SkypeWeb.vcxproj", "{66A9BDEB-150F-45DC-B20F-9892C0B43834}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tox", "..\protocols\Tox\Tox.vcxproj", "{BCFAB658-326E-466D-995B-E76636C1DEA4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinecraftDynmap", "..\protocols\MinecraftDynmap\MinecraftDynmap.vcxproj", "{B4327D10-ACDC-4C12-9555-749DD49A7BB0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroSwitch", "..\plugins\ZeroSwitch\ZeroSwitch.vcxproj", "{D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MessageState", "..\plugins\MessageState\MessageState.vcxproj", "{D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirLua", "..\plugins\MirLua\MirLua.vcxproj", "{27D41D81-991F-4DC6-8749-B0321C87E694}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toaster", "..\plugins\Toaster\Toaster.vcxproj", "{1FDBD8F0-3929-41BC-92D1-020779460769}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\libs\liblua\liblua.vcxproj", "{BD291BF0-D804-4818-8311-DE871E6BCEAA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winapi", "..\plugins\MirLua\Modules\WinAPI\WinAPI.vcxproj", "{045BAC91-34D1-4B43-B52B-566801BE7F85}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hunspell", "..\libs\hunspell\hunspell.vcxproj", "{B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_popup", "..\plugins\MirLua\Modules\m_popup\m_popup.vcxproj", "{D5C9CA74-4E25-478A-B890-75EB13E6DB1C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_variables", "..\plugins\MirLua\Modules\m_variables\m_variables.vcxproj", "{E604CD58-4579-4F69-9D6A-2605FD7CF716}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusManager", "..\plugins\StatusManager\StatusManager.vcxproj", "{D2EF305F-5255-49E8-A738-D4206D62D2B8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CloudFile", "..\protocols\CloudFile\CloudFile.vcxproj", "{E876FE63-0701-4CDA-BED5-7C73A379C1D1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_schedule", "..\plugins\MirLua\Modules\m_schedule\m_schedule.vcxproj", "{FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_toptoolbar", "..\plugins\MirLua\Modules\m_toptoolbar\m_toptoolbar.vcxproj", "{277E433F-7D71-4247-8AAA-CC5FB1AA7A67}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsSingleWindow", "..\plugins\AsSingleWindow\AsSingleWindow.vcxproj", "{CE6A5A24-EA88-4E67-BDF2-22517528E43F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "..\libs\sqlite3\sqlite3.vcxproj", "{0C02E395-E73F-47E3-8B95-B7924C0C7A6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsodium", "..\libs\libsodium\libsodium.vcxproj", "{A185B162-6CB6-4502-B03F-B56F7699A8D9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads", "..\libs\pthreads\pthreads.vcxproj", "{E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtox", "..\protocols\Tox\libtox\libtox.vcxproj", "{A21C50CD-28A6-481A-A12B-47189FE66641}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileAsMessage", "..\plugins\FileAsMessage\fileecho.vcxproj", "{D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EmLanProto", "..\protocols\EmLanProto\emlanproto.vcxproj", "{2115FEBC-1EC4-4F95-A058-A523ED5295A4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mdbx", "..\plugins\Dbx_mdbx\dbx_mdbx.vcxproj", "{E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQCorp", "..\protocols\ICQCorp\ICQCorp.vcxproj", "{AD0D0500-CE7D-417D-9C36-3620D56CA6D4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeImage", "..\libs\freeimage\freeimage.vcxproj", "{5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MagneticWindows", "..\plugins\MagneticWindows\MagneticWindows.vcxproj", "{7DC23E4E-2448-4811-AABD-F5D069F6E74A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Protocols", "Protocols", "{A035B524-0F2D-45D0-BCF2-3C20279C77E2}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{E7FB43FB-3563-4568-8846-A88FC37449BF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{37EDFBEA-8446-4BF3-9F2E-655908CDFB62}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua", "Lua", "{329B4E94-C846-4C78-AFD5-8B6B839DCCE1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{F13387B0-1C74-48EC-9AEC-65E3B9DE29E4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Message edtors", "Message edtors", "{D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Contact lists", "Contact lists", "{F9C41695-3353-4564-A154-58106829B19C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Encryption", "Encryption", "{30218E20-9E62-4027-BB87-2627B17F6CA3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notifications", "Notifications", "{703CFA44-C8E8-4547-B597-AE239F4F6DD9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProxySwitch", "..\plugins\ProxySwitch\ProxySwitch.vcxproj", "{7446276D-5845-4258-A245-83D1D4D3CEC3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_sqlite", "..\plugins\Dbx_sqlite\dbx_sqlite.vcxproj", "{B3494FED-FB8C-43F4-B341-F26A3460203B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQ", "..\protocols\ICQ-WIM\ICQ-WIM.vcxproj", "{EFB2355B-82B3-4759-B7D8-95F8E9506291}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh2", "..\libs\libssh2\libssh2.vcxproj", "{B3BC3949-6949-41DE-94BF-B112FBFB1A84}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdPopup", "..\src\core\stdpopup\stdpopup.vcxproj", "{713067DF-65EE-480B-A000-B2A323495F16}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotesReminders", "..\plugins\NotesAndReminders\NotesReminders.vcxproj", "{EEB57129-946C-4B98-8856-FDA501AE2A5E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsignal", "..\libs\libsignal\libsignal.vcxproj", "{620E0BE7-3763-4F35-9DBD-4770104E269C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Facebook", "..\protocols\Facebook\facebook.vcxproj", "{86033E58-A1E3-43AD-AE8E-305E15E72A91}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewStory", "..\plugins\NewStory\NewStory.vcxproj", "{A7FAD273-8C71-4D72-A84F-2D160F2DC589}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbChecker", "..\plugins\DbChecker\dbchecker.vcxproj", "{A2E9DA24-95E4-4414-94AF-488A382E276A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickSearch", "..\plugins\QuickSearch\quicksearch.vcxproj", "{3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmdbx", "..\libs\libmdbx\libmdbx.vcxproj", "{6D19209B-ECE7-4B9C-941C-0AA2B484F199}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoiceService", "..\plugins\VoiceService\VoiceService.vcxproj", "{48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libqrencode", "..\libs\libqrencode\libqrencode.vcxproj", "{4D3554DE-6E14-4F94-A909-A4B19151A47E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhatsApp", "..\protocols\WhatsApp\WhatsApp.vcxproj", "{13E796AD-BEA4-4213-A1B8-E18E2397E544}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Telegram", "..\protocols\Telegram\Telegram.vcxproj", "{AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.ActiveCfg = Debug|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.Build.0 = Debug|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.ActiveCfg = Debug|x64 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.Build.0 = Debug|x64 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.ActiveCfg = Release|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.Build.0 = Release|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.ActiveCfg = Release|x64 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.Build.0 = Release|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.ActiveCfg = Debug|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.Build.0 = Debug|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.ActiveCfg = Debug|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.Build.0 = Debug|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.ActiveCfg = Release|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.Build.0 = Release|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.ActiveCfg = Release|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.Build.0 = Release|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.ActiveCfg = Debug|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.Build.0 = Debug|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.ActiveCfg = Debug|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.Build.0 = Debug|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.ActiveCfg = Release|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.Build.0 = Release|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.ActiveCfg = Release|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.Build.0 = Release|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.ActiveCfg = Debug|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.Build.0 = Debug|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.ActiveCfg = Debug|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.Build.0 = Debug|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.ActiveCfg = Release|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.Build.0 = Release|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.ActiveCfg = Release|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.Build.0 = Release|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.ActiveCfg = Debug|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.Build.0 = Debug|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.ActiveCfg = Debug|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.Build.0 = Debug|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.ActiveCfg = Release|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.Build.0 = Release|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.ActiveCfg = Release|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.Build.0 = Release|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.ActiveCfg = Debug|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.Build.0 = Debug|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.ActiveCfg = Debug|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.Build.0 = Debug|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.ActiveCfg = Release|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.Build.0 = Release|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.ActiveCfg = Release|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.Build.0 = Release|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.ActiveCfg = Debug|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.Build.0 = Debug|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.ActiveCfg = Debug|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.Build.0 = Debug|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.ActiveCfg = Release|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.Build.0 = Release|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.ActiveCfg = Release|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.Build.0 = Release|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.ActiveCfg = Debug|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.Build.0 = Debug|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.ActiveCfg = Debug|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.Build.0 = Debug|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.ActiveCfg = Release|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.Build.0 = Release|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.ActiveCfg = Release|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.Build.0 = Release|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.ActiveCfg = Debug|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.Build.0 = Debug|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.ActiveCfg = Debug|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.Build.0 = Debug|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.ActiveCfg = Release|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.Build.0 = Release|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.ActiveCfg = Release|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.Build.0 = Release|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.ActiveCfg = Debug|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.Build.0 = Debug|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.ActiveCfg = Debug|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.Build.0 = Debug|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.ActiveCfg = Release|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.Build.0 = Release|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.ActiveCfg = Release|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.Build.0 = Release|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.Build.0 = Debug|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.ActiveCfg = Debug|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.Build.0 = Debug|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.ActiveCfg = Release|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.Build.0 = Release|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.ActiveCfg = Release|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.Build.0 = Release|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.ActiveCfg = Debug|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.Build.0 = Debug|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.ActiveCfg = Debug|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.Build.0 = Debug|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.ActiveCfg = Release|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.Build.0 = Release|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.ActiveCfg = Release|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.Build.0 = Release|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.ActiveCfg = Debug|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.Build.0 = Debug|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.ActiveCfg = Debug|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.Build.0 = Debug|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.ActiveCfg = Release|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.Build.0 = Release|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.ActiveCfg = Release|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.Build.0 = Release|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.Build.0 = Debug|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.ActiveCfg = Debug|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.Build.0 = Debug|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.ActiveCfg = Release|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.Build.0 = Release|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.ActiveCfg = Release|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.Build.0 = Release|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.ActiveCfg = Debug|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.Build.0 = Debug|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.ActiveCfg = Debug|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.Build.0 = Debug|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.ActiveCfg = Release|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.Build.0 = Release|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.ActiveCfg = Release|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.Build.0 = Release|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.ActiveCfg = Debug|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.Build.0 = Debug|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.ActiveCfg = Debug|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.Build.0 = Debug|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.ActiveCfg = Release|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.Build.0 = Release|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.ActiveCfg = Release|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.Build.0 = Release|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.ActiveCfg = Debug|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.Build.0 = Debug|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.ActiveCfg = Debug|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.Build.0 = Debug|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.ActiveCfg = Release|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.Build.0 = Release|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.ActiveCfg = Release|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.Build.0 = Release|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.ActiveCfg = Debug|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.Build.0 = Debug|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.ActiveCfg = Debug|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.Build.0 = Debug|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.ActiveCfg = Release|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.Build.0 = Release|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.ActiveCfg = Release|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.Build.0 = Release|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.Build.0 = Debug|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.ActiveCfg = Debug|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.Build.0 = Debug|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.ActiveCfg = Release|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.Build.0 = Release|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.ActiveCfg = Release|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.Build.0 = Release|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.ActiveCfg = Debug|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.Build.0 = Debug|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.ActiveCfg = Debug|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.Build.0 = Debug|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.ActiveCfg = Release|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.Build.0 = Release|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.ActiveCfg = Release|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.Build.0 = Release|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.Build.0 = Debug|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.ActiveCfg = Debug|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.Build.0 = Debug|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.ActiveCfg = Release|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.Build.0 = Release|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.ActiveCfg = Release|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.Build.0 = Release|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.ActiveCfg = Debug|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.Build.0 = Debug|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.ActiveCfg = Debug|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.Build.0 = Debug|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.ActiveCfg = Release|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.Build.0 = Release|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.ActiveCfg = Release|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.Build.0 = Release|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.ActiveCfg = Debug|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.Build.0 = Debug|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.ActiveCfg = Debug|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.Build.0 = Debug|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.ActiveCfg = Release|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.Build.0 = Release|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.ActiveCfg = Release|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.Build.0 = Release|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.ActiveCfg = Debug|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.Build.0 = Debug|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.ActiveCfg = Debug|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.Build.0 = Debug|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.ActiveCfg = Release|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.Build.0 = Release|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.ActiveCfg = Release|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.Build.0 = Release|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.Build.0 = Debug|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.ActiveCfg = Debug|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.Build.0 = Debug|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.ActiveCfg = Release|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.Build.0 = Release|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.ActiveCfg = Release|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.Build.0 = Release|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.ActiveCfg = Debug|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.Build.0 = Debug|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.ActiveCfg = Debug|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.Build.0 = Debug|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.ActiveCfg = Release|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.Build.0 = Release|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.ActiveCfg = Release|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.Build.0 = Release|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.Build.0 = Debug|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.ActiveCfg = Debug|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.Build.0 = Debug|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.ActiveCfg = Release|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.Build.0 = Release|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.ActiveCfg = Release|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.Build.0 = Release|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.ActiveCfg = Debug|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.Build.0 = Debug|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.ActiveCfg = Debug|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.Build.0 = Debug|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.ActiveCfg = Release|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.Build.0 = Release|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.ActiveCfg = Release|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.Build.0 = Release|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.Build.0 = Debug|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.ActiveCfg = Debug|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.Build.0 = Debug|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.ActiveCfg = Release|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.Build.0 = Release|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.ActiveCfg = Release|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.Build.0 = Release|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.ActiveCfg = Debug|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.Build.0 = Debug|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.ActiveCfg = Debug|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.Build.0 = Debug|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.ActiveCfg = Release|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.Build.0 = Release|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.ActiveCfg = Release|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.Build.0 = Release|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.ActiveCfg = Debug|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.Build.0 = Debug|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.ActiveCfg = Debug|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.Build.0 = Debug|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.ActiveCfg = Release|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.Build.0 = Release|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.ActiveCfg = Release|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.Build.0 = Release|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.Build.0 = Debug|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.ActiveCfg = Debug|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.Build.0 = Debug|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.ActiveCfg = Release|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.Build.0 = Release|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.ActiveCfg = Release|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.Build.0 = Release|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.Build.0 = Debug|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.ActiveCfg = Debug|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.Build.0 = Debug|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.ActiveCfg = Release|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.Build.0 = Release|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.ActiveCfg = Release|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.Build.0 = Release|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.ActiveCfg = Debug|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.Build.0 = Debug|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.ActiveCfg = Debug|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.Build.0 = Debug|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.ActiveCfg = Release|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.Build.0 = Release|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.ActiveCfg = Release|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.Build.0 = Release|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.ActiveCfg = Debug|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.Build.0 = Debug|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.ActiveCfg = Debug|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.Build.0 = Debug|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.ActiveCfg = Release|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.Build.0 = Release|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.ActiveCfg = Release|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.Build.0 = Release|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.ActiveCfg = Debug|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.Build.0 = Debug|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.ActiveCfg = Debug|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.Build.0 = Debug|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.ActiveCfg = Release|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.Build.0 = Release|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.ActiveCfg = Release|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.Build.0 = Release|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.Build.0 = Debug|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.ActiveCfg = Debug|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.Build.0 = Debug|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.ActiveCfg = Release|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.Build.0 = Release|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.ActiveCfg = Release|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.Build.0 = Release|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.ActiveCfg = Debug|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.Build.0 = Debug|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.ActiveCfg = Debug|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.Build.0 = Debug|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.ActiveCfg = Release|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.Build.0 = Release|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.ActiveCfg = Release|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.Build.0 = Release|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.ActiveCfg = Debug|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.Build.0 = Debug|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.ActiveCfg = Debug|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.Build.0 = Debug|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.ActiveCfg = Release|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.Build.0 = Release|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.ActiveCfg = Release|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.Build.0 = Release|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.Build.0 = Debug|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.ActiveCfg = Debug|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.Build.0 = Debug|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.ActiveCfg = Release|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.Build.0 = Release|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.ActiveCfg = Release|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.Build.0 = Release|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.ActiveCfg = Debug|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.Build.0 = Debug|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.ActiveCfg = Debug|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.Build.0 = Debug|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.ActiveCfg = Release|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.Build.0 = Release|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.ActiveCfg = Release|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.Build.0 = Release|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.ActiveCfg = Debug|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.Build.0 = Debug|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.ActiveCfg = Debug|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.Build.0 = Debug|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.ActiveCfg = Release|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.Build.0 = Release|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.ActiveCfg = Release|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.Build.0 = Release|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.ActiveCfg = Debug|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.Build.0 = Debug|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.ActiveCfg = Debug|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.Build.0 = Debug|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.ActiveCfg = Release|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.Build.0 = Release|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.ActiveCfg = Release|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.Build.0 = Release|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.ActiveCfg = Debug|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.Build.0 = Debug|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.ActiveCfg = Debug|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.Build.0 = Debug|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.ActiveCfg = Release|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.Build.0 = Release|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.ActiveCfg = Release|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.Build.0 = Release|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.ActiveCfg = Debug|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.Build.0 = Debug|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.ActiveCfg = Debug|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.Build.0 = Debug|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.ActiveCfg = Release|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.Build.0 = Release|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.ActiveCfg = Release|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.Build.0 = Release|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.ActiveCfg = Debug|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.Build.0 = Debug|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.ActiveCfg = Release|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.Build.0 = Release|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.Build.0 = Debug|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.ActiveCfg = Debug|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.Build.0 = Debug|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.ActiveCfg = Release|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.Build.0 = Release|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.ActiveCfg = Release|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.Build.0 = Release|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.ActiveCfg = Debug|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.Build.0 = Debug|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.ActiveCfg = Debug|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.Build.0 = Debug|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.ActiveCfg = Release|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.Build.0 = Release|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.ActiveCfg = Release|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.Build.0 = Release|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.ActiveCfg = Debug|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.Build.0 = Debug|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.ActiveCfg = Debug|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.Build.0 = Debug|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.ActiveCfg = Release|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.Build.0 = Release|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.ActiveCfg = Release|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.Build.0 = Release|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.ActiveCfg = Debug|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.Build.0 = Debug|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.ActiveCfg = Debug|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.Build.0 = Debug|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.ActiveCfg = Release|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.Build.0 = Release|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.ActiveCfg = Release|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.Build.0 = Release|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.Build.0 = Debug|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.ActiveCfg = Debug|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.Build.0 = Debug|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.ActiveCfg = Release|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.Build.0 = Release|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.ActiveCfg = Release|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.Build.0 = Release|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.ActiveCfg = Debug|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.Build.0 = Debug|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.ActiveCfg = Debug|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.Build.0 = Debug|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.ActiveCfg = Release|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.Build.0 = Release|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.ActiveCfg = Release|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.Build.0 = Release|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.ActiveCfg = Debug|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.Build.0 = Debug|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.ActiveCfg = Debug|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.Build.0 = Debug|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.ActiveCfg = Release|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.Build.0 = Release|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.ActiveCfg = Release|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.Build.0 = Release|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.ActiveCfg = Debug|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.Build.0 = Debug|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.ActiveCfg = Debug|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.Build.0 = Debug|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.ActiveCfg = Release|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.Build.0 = Release|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.ActiveCfg = Release|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.Build.0 = Release|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.Build.0 = Debug|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.ActiveCfg = Debug|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.Build.0 = Debug|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.ActiveCfg = Release|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.Build.0 = Release|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.ActiveCfg = Release|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.Build.0 = Release|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.Build.0 = Debug|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.ActiveCfg = Debug|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.Build.0 = Debug|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.ActiveCfg = Release|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.Build.0 = Release|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.ActiveCfg = Release|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.Build.0 = Release|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.ActiveCfg = Debug|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.Build.0 = Debug|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.ActiveCfg = Debug|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.Build.0 = Debug|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.ActiveCfg = Release|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.Build.0 = Release|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.ActiveCfg = Release|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.Build.0 = Release|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.ActiveCfg = Debug|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.Build.0 = Debug|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.ActiveCfg = Debug|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.Build.0 = Debug|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.ActiveCfg = Release|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.Build.0 = Release|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.ActiveCfg = Release|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.Build.0 = Release|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.ActiveCfg = Debug|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.Build.0 = Debug|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.ActiveCfg = Debug|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.Build.0 = Debug|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.ActiveCfg = Release|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.Build.0 = Release|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.ActiveCfg = Release|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.Build.0 = Release|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.ActiveCfg = Debug|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.Build.0 = Debug|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.ActiveCfg = Debug|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.Build.0 = Debug|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.ActiveCfg = Release|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.Build.0 = Release|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.ActiveCfg = Release|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.Build.0 = Release|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.Build.0 = Debug|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.ActiveCfg = Debug|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.Build.0 = Debug|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.ActiveCfg = Release|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.Build.0 = Release|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.ActiveCfg = Release|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.Build.0 = Release|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.Build.0 = Debug|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.ActiveCfg = Debug|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.Build.0 = Debug|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.ActiveCfg = Release|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.Build.0 = Release|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.ActiveCfg = Release|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.Build.0 = Release|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.ActiveCfg = Debug|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.Build.0 = Debug|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.ActiveCfg = Debug|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.Build.0 = Debug|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.ActiveCfg = Release|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.Build.0 = Release|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.ActiveCfg = Release|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.Build.0 = Release|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.ActiveCfg = Debug|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.Build.0 = Debug|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.ActiveCfg = Debug|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.Build.0 = Debug|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.ActiveCfg = Release|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.Build.0 = Release|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.ActiveCfg = Release|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.Build.0 = Release|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.Build.0 = Debug|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.ActiveCfg = Debug|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.Build.0 = Debug|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.ActiveCfg = Release|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.Build.0 = Release|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.ActiveCfg = Release|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.Build.0 = Release|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.Build.0 = Debug|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.ActiveCfg = Debug|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.Build.0 = Debug|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.ActiveCfg = Release|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.Build.0 = Release|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.ActiveCfg = Release|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.Build.0 = Release|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.ActiveCfg = Debug|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.Build.0 = Debug|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.ActiveCfg = Debug|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.Build.0 = Debug|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.ActiveCfg = Release|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.Build.0 = Release|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.ActiveCfg = Release|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.Build.0 = Release|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.Build.0 = Debug|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.ActiveCfg = Debug|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.Build.0 = Debug|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.ActiveCfg = Release|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.Build.0 = Release|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.ActiveCfg = Release|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.Build.0 = Release|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.Build.0 = Debug|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.ActiveCfg = Debug|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.Build.0 = Debug|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.ActiveCfg = Release|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.Build.0 = Release|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.ActiveCfg = Release|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.Build.0 = Release|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.ActiveCfg = Debug|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.Build.0 = Debug|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.ActiveCfg = Debug|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.Build.0 = Debug|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.ActiveCfg = Release|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.Build.0 = Release|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.ActiveCfg = Release|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.Build.0 = Release|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.ActiveCfg = Debug|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.Build.0 = Debug|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.ActiveCfg = Debug|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.Build.0 = Debug|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.ActiveCfg = Release|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.Build.0 = Release|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.ActiveCfg = Release|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.Build.0 = Release|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.ActiveCfg = Debug|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.Build.0 = Debug|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.ActiveCfg = Debug|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.Build.0 = Debug|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.ActiveCfg = Release|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.Build.0 = Release|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.ActiveCfg = Release|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.Build.0 = Release|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.ActiveCfg = Debug|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.Build.0 = Debug|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.ActiveCfg = Debug|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.Build.0 = Debug|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.ActiveCfg = Release|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.Build.0 = Release|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.ActiveCfg = Release|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.Build.0 = Release|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.ActiveCfg = Debug|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.Build.0 = Debug|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.ActiveCfg = Debug|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.Build.0 = Debug|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.ActiveCfg = Release|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.Build.0 = Release|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.ActiveCfg = Release|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.Build.0 = Release|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.ActiveCfg = Debug|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.Build.0 = Debug|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.ActiveCfg = Debug|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.Build.0 = Debug|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.ActiveCfg = Release|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.Build.0 = Release|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.ActiveCfg = Release|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.Build.0 = Release|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.ActiveCfg = Debug|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.Build.0 = Debug|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.ActiveCfg = Debug|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.Build.0 = Debug|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.ActiveCfg = Release|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.Build.0 = Release|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.ActiveCfg = Release|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.Build.0 = Release|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.ActiveCfg = Debug|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.Build.0 = Debug|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.ActiveCfg = Debug|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.Build.0 = Debug|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.ActiveCfg = Release|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.Build.0 = Release|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.ActiveCfg = Release|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.Build.0 = Release|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.ActiveCfg = Debug|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.Build.0 = Debug|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.ActiveCfg = Debug|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.Build.0 = Debug|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.ActiveCfg = Release|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.Build.0 = Release|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.ActiveCfg = Release|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.Build.0 = Release|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.Build.0 = Debug|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.ActiveCfg = Debug|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.Build.0 = Debug|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.ActiveCfg = Release|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.Build.0 = Release|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.ActiveCfg = Release|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.Build.0 = Release|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.ActiveCfg = Debug|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.Build.0 = Debug|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.ActiveCfg = Debug|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.Build.0 = Debug|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.ActiveCfg = Release|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.Build.0 = Release|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.ActiveCfg = Release|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.Build.0 = Release|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.ActiveCfg = Debug|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.Build.0 = Debug|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.ActiveCfg = Debug|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.Build.0 = Debug|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.ActiveCfg = Release|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.Build.0 = Release|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.ActiveCfg = Release|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.Build.0 = Release|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.ActiveCfg = Debug|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.Build.0 = Debug|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.ActiveCfg = Debug|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.Build.0 = Debug|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.ActiveCfg = Release|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.Build.0 = Release|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.ActiveCfg = Release|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.Build.0 = Release|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.ActiveCfg = Debug|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.Build.0 = Debug|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.ActiveCfg = Debug|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.Build.0 = Debug|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.ActiveCfg = Release|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.Build.0 = Release|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.ActiveCfg = Release|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.Build.0 = Release|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.ActiveCfg = Debug|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.Build.0 = Debug|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.ActiveCfg = Debug|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.Build.0 = Debug|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.ActiveCfg = Release|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.Build.0 = Release|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.ActiveCfg = Release|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.Build.0 = Release|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.ActiveCfg = Debug|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.Build.0 = Debug|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.ActiveCfg = Debug|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.Build.0 = Debug|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.ActiveCfg = Release|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.Build.0 = Release|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.ActiveCfg = Release|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.Build.0 = Release|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.ActiveCfg = Debug|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.Build.0 = Debug|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.ActiveCfg = Debug|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.Build.0 = Debug|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.ActiveCfg = Release|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.Build.0 = Release|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.ActiveCfg = Release|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.Build.0 = Release|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.ActiveCfg = Debug|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.Build.0 = Debug|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.ActiveCfg = Debug|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.Build.0 = Debug|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.ActiveCfg = Release|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.Build.0 = Release|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.ActiveCfg = Release|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.Build.0 = Release|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.ActiveCfg = Debug|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.Build.0 = Debug|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.ActiveCfg = Debug|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.Build.0 = Debug|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.ActiveCfg = Release|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.Build.0 = Release|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.ActiveCfg = Release|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.Build.0 = Release|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.ActiveCfg = Debug|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.Build.0 = Debug|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.ActiveCfg = Debug|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.Build.0 = Debug|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.ActiveCfg = Release|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.Build.0 = Release|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.ActiveCfg = Release|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.Build.0 = Release|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.ActiveCfg = Debug|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.Build.0 = Debug|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.ActiveCfg = Debug|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.Build.0 = Debug|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.ActiveCfg = Release|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.Build.0 = Release|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.ActiveCfg = Release|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.Build.0 = Release|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.ActiveCfg = Debug|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.Build.0 = Debug|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.ActiveCfg = Debug|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.Build.0 = Debug|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.ActiveCfg = Release|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.Build.0 = Release|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.ActiveCfg = Release|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.Build.0 = Release|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.ActiveCfg = Debug|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.Build.0 = Debug|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.ActiveCfg = Debug|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.Build.0 = Debug|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.ActiveCfg = Release|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.Build.0 = Release|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.ActiveCfg = Release|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.Build.0 = Release|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.ActiveCfg = Debug|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.Build.0 = Debug|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.ActiveCfg = Debug|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.Build.0 = Debug|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.ActiveCfg = Release|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.Build.0 = Release|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.ActiveCfg = Release|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.Build.0 = Release|x64 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.ActiveCfg = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.Build.0 = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.ActiveCfg = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.Build.0 = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.ActiveCfg = Release|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.Build.0 = Release|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.ActiveCfg = Release|x64 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.Build.0 = Release|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.ActiveCfg = Debug|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.Build.0 = Debug|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.ActiveCfg = Debug|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.Build.0 = Debug|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.ActiveCfg = Release|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.Build.0 = Release|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.ActiveCfg = Release|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.Build.0 = Release|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.ActiveCfg = Debug|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.Build.0 = Debug|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.ActiveCfg = Debug|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.Build.0 = Debug|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.ActiveCfg = Release|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.Build.0 = Release|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.ActiveCfg = Release|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.Build.0 = Release|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.ActiveCfg = Debug|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.Build.0 = Debug|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.ActiveCfg = Debug|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.Build.0 = Debug|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.ActiveCfg = Release|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.Build.0 = Release|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.ActiveCfg = Release|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.Build.0 = Release|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.Build.0 = Debug|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.ActiveCfg = Debug|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.Build.0 = Debug|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.ActiveCfg = Release|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.Build.0 = Release|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.ActiveCfg = Release|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.Build.0 = Release|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.Build.0 = Debug|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.ActiveCfg = Debug|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.Build.0 = Debug|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.ActiveCfg = Release|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.Build.0 = Release|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.ActiveCfg = Release|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.Build.0 = Release|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.ActiveCfg = Debug|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.Build.0 = Debug|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.ActiveCfg = Debug|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.Build.0 = Debug|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.ActiveCfg = Release|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.Build.0 = Release|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.ActiveCfg = Release|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.Build.0 = Release|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.ActiveCfg = Debug|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.Build.0 = Debug|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.ActiveCfg = Debug|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.Build.0 = Debug|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.ActiveCfg = Release|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.Build.0 = Release|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.ActiveCfg = Release|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.Build.0 = Release|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.ActiveCfg = Debug|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.Build.0 = Debug|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.ActiveCfg = Debug|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.Build.0 = Debug|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.ActiveCfg = Release|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.Build.0 = Release|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.ActiveCfg = Release|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.Build.0 = Release|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.ActiveCfg = Debug|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.Build.0 = Debug|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.ActiveCfg = Debug|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.Build.0 = Debug|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.ActiveCfg = Release|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.Build.0 = Release|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.ActiveCfg = Release|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.Build.0 = Release|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.ActiveCfg = Debug|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.Build.0 = Debug|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.ActiveCfg = Debug|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.Build.0 = Debug|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.ActiveCfg = Release|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.Build.0 = Release|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.ActiveCfg = Release|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.Build.0 = Release|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.Build.0 = Debug|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.ActiveCfg = Debug|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.Build.0 = Debug|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.ActiveCfg = Release|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.Build.0 = Release|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.ActiveCfg = Release|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.Build.0 = Release|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.ActiveCfg = Debug|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.Build.0 = Debug|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.ActiveCfg = Debug|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.Build.0 = Debug|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.ActiveCfg = Release|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.Build.0 = Release|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.ActiveCfg = Release|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.Build.0 = Release|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.ActiveCfg = Debug|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.Build.0 = Debug|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.ActiveCfg = Debug|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.Build.0 = Debug|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.ActiveCfg = Release|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.Build.0 = Release|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.ActiveCfg = Release|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.Build.0 = Release|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.Build.0 = Debug|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.ActiveCfg = Debug|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.Build.0 = Debug|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.ActiveCfg = Release|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.Build.0 = Release|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.ActiveCfg = Release|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.Build.0 = Release|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.Build.0 = Debug|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.ActiveCfg = Debug|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.Build.0 = Debug|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.ActiveCfg = Release|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.Build.0 = Release|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.ActiveCfg = Release|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.Build.0 = Release|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.Build.0 = Debug|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.ActiveCfg = Debug|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.Build.0 = Debug|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.ActiveCfg = Release|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.Build.0 = Release|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.ActiveCfg = Release|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.Build.0 = Release|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.ActiveCfg = Debug|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.Build.0 = Debug|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.ActiveCfg = Debug|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.Build.0 = Debug|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.ActiveCfg = Release|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.Build.0 = Release|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.ActiveCfg = Release|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.Build.0 = Release|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.ActiveCfg = Debug|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.Build.0 = Debug|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.ActiveCfg = Debug|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.Build.0 = Debug|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.ActiveCfg = Release|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.Build.0 = Release|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.ActiveCfg = Release|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.Build.0 = Release|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.ActiveCfg = Debug|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.Build.0 = Debug|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.ActiveCfg = Debug|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.Build.0 = Debug|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.ActiveCfg = Release|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.Build.0 = Release|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.ActiveCfg = Release|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.Build.0 = Release|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.ActiveCfg = Debug|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.Build.0 = Debug|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.ActiveCfg = Debug|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.Build.0 = Debug|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.ActiveCfg = Release|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.Build.0 = Release|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.ActiveCfg = Release|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.Build.0 = Release|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.Build.0 = Debug|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.ActiveCfg = Debug|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.Build.0 = Debug|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.ActiveCfg = Release|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.Build.0 = Release|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.ActiveCfg = Release|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.Build.0 = Release|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.ActiveCfg = Debug|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.Build.0 = Debug|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.ActiveCfg = Debug|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.Build.0 = Debug|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.ActiveCfg = Release|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.Build.0 = Release|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.ActiveCfg = Release|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.Build.0 = Release|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.ActiveCfg = Debug|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.Build.0 = Debug|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.ActiveCfg = Debug|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.Build.0 = Debug|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.ActiveCfg = Release|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.Build.0 = Release|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.ActiveCfg = Release|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.Build.0 = Release|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.ActiveCfg = Debug|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.Build.0 = Debug|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.ActiveCfg = Debug|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.Build.0 = Debug|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.ActiveCfg = Release|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.Build.0 = Release|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.ActiveCfg = Release|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.Build.0 = Release|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.ActiveCfg = Debug|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.Build.0 = Debug|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.ActiveCfg = Debug|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.Build.0 = Debug|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.ActiveCfg = Release|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.Build.0 = Release|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.ActiveCfg = Release|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.Build.0 = Release|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.Build.0 = Debug|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.ActiveCfg = Debug|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.Build.0 = Debug|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.ActiveCfg = Release|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.Build.0 = Release|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.ActiveCfg = Release|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.Build.0 = Release|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.Build.0 = Debug|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.ActiveCfg = Debug|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.Build.0 = Debug|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.ActiveCfg = Release|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.Build.0 = Release|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.ActiveCfg = Release|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.Build.0 = Release|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.ActiveCfg = Debug|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.Build.0 = Debug|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.ActiveCfg = Debug|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.Build.0 = Debug|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.ActiveCfg = Release|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.Build.0 = Release|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.ActiveCfg = Release|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.Build.0 = Release|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.Build.0 = Debug|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.ActiveCfg = Debug|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.Build.0 = Debug|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.ActiveCfg = Release|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.Build.0 = Release|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.ActiveCfg = Release|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.Build.0 = Release|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.ActiveCfg = Debug|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.Build.0 = Debug|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.ActiveCfg = Debug|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.Build.0 = Debug|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.ActiveCfg = Release|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.Build.0 = Release|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.ActiveCfg = Release|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.Build.0 = Release|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.ActiveCfg = Debug|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.Build.0 = Debug|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.ActiveCfg = Debug|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.Build.0 = Debug|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.ActiveCfg = Release|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.Build.0 = Release|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.ActiveCfg = Release|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.Build.0 = Release|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.ActiveCfg = Debug|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.Build.0 = Debug|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.ActiveCfg = Debug|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.Build.0 = Debug|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.ActiveCfg = Release|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.Build.0 = Release|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.ActiveCfg = Release|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.Build.0 = Release|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.ActiveCfg = Debug|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.Build.0 = Debug|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.ActiveCfg = Debug|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.Build.0 = Debug|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.ActiveCfg = Release|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.Build.0 = Release|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.ActiveCfg = Release|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.Build.0 = Release|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.ActiveCfg = Debug|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.Build.0 = Debug|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.ActiveCfg = Debug|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.Build.0 = Debug|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.ActiveCfg = Release|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.Build.0 = Release|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.ActiveCfg = Release|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.Build.0 = Release|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.ActiveCfg = Debug|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.Build.0 = Debug|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.ActiveCfg = Debug|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.Build.0 = Debug|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.ActiveCfg = Release|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.Build.0 = Release|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.ActiveCfg = Release|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.Build.0 = Release|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.Build.0 = Debug|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.ActiveCfg = Debug|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.Build.0 = Debug|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.ActiveCfg = Release|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.Build.0 = Release|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.ActiveCfg = Release|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.Build.0 = Release|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.ActiveCfg = Debug|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.Build.0 = Debug|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.ActiveCfg = Debug|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.Build.0 = Debug|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.ActiveCfg = Release|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.Build.0 = Release|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.ActiveCfg = Release|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.Build.0 = Release|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.Build.0 = Debug|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.ActiveCfg = Debug|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.Build.0 = Debug|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.ActiveCfg = Release|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.Build.0 = Release|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.ActiveCfg = Release|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.Build.0 = Release|x64 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.ActiveCfg = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.Build.0 = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.ActiveCfg = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.Build.0 = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.ActiveCfg = Release|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.Build.0 = Release|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.ActiveCfg = Release|x64 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.Build.0 = Release|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.ActiveCfg = Debug|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.Build.0 = Debug|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.ActiveCfg = Debug|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.Build.0 = Debug|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.ActiveCfg = Release|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.Build.0 = Release|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.ActiveCfg = Release|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.Build.0 = Release|x64 - {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.Build.0 = Debug|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Debug|x64.ActiveCfg = Debug|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.ActiveCfg = Release|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.Build.0 = Release|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Release|x64.ActiveCfg = Release|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.Build.0 = Debug|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.ActiveCfg = Debug|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.Build.0 = Debug|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.ActiveCfg = Release|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.Build.0 = Release|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.ActiveCfg = Release|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.Build.0 = Release|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.Build.0 = Debug|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.ActiveCfg = Debug|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.Build.0 = Debug|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.ActiveCfg = Release|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.Build.0 = Release|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.ActiveCfg = Release|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.Build.0 = Release|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.ActiveCfg = Debug|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.Build.0 = Debug|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.ActiveCfg = Debug|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.Build.0 = Debug|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.ActiveCfg = Release|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.Build.0 = Release|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.ActiveCfg = Release|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.Build.0 = Release|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.ActiveCfg = Debug|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.Build.0 = Debug|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.ActiveCfg = Debug|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.Build.0 = Debug|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.ActiveCfg = Release|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.Build.0 = Release|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.ActiveCfg = Release|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.Build.0 = Release|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.ActiveCfg = Debug|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.Build.0 = Debug|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.ActiveCfg = Debug|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.Build.0 = Debug|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.ActiveCfg = Release|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.Build.0 = Release|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.ActiveCfg = Release|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.Build.0 = Release|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.ActiveCfg = Debug|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.Build.0 = Debug|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.ActiveCfg = Debug|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.Build.0 = Debug|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.ActiveCfg = Release|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.Build.0 = Release|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.ActiveCfg = Release|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.Build.0 = Release|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.Build.0 = Debug|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.ActiveCfg = Debug|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.Build.0 = Debug|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.ActiveCfg = Release|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.Build.0 = Release|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.ActiveCfg = Release|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.Build.0 = Release|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.Build.0 = Debug|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.ActiveCfg = Debug|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.Build.0 = Debug|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.ActiveCfg = Release|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.Build.0 = Release|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.ActiveCfg = Release|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.Build.0 = Release|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.ActiveCfg = Debug|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.Build.0 = Debug|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.ActiveCfg = Debug|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.Build.0 = Debug|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.ActiveCfg = Release|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.Build.0 = Release|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.ActiveCfg = Release|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.Build.0 = Release|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.ActiveCfg = Debug|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.Build.0 = Debug|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.ActiveCfg = Debug|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.Build.0 = Debug|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.ActiveCfg = Release|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.Build.0 = Release|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.ActiveCfg = Release|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.Build.0 = Release|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.ActiveCfg = Debug|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.Build.0 = Debug|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.ActiveCfg = Debug|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.Build.0 = Debug|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.ActiveCfg = Release|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.Build.0 = Release|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.ActiveCfg = Release|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.Build.0 = Release|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.ActiveCfg = Debug|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.Build.0 = Debug|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.ActiveCfg = Debug|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.Build.0 = Debug|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.ActiveCfg = Release|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.Build.0 = Release|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.ActiveCfg = Release|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.Build.0 = Release|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.ActiveCfg = Debug|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.Build.0 = Debug|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.ActiveCfg = Debug|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.Build.0 = Debug|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.ActiveCfg = Release|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.Build.0 = Release|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.ActiveCfg = Release|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.Build.0 = Release|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.Build.0 = Debug|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.ActiveCfg = Debug|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.Build.0 = Debug|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.ActiveCfg = Release|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.Build.0 = Release|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.ActiveCfg = Release|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.Build.0 = Release|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.ActiveCfg = Debug|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.Build.0 = Debug|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.ActiveCfg = Debug|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.Build.0 = Debug|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.ActiveCfg = Release|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.Build.0 = Release|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.ActiveCfg = Release|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.Build.0 = Release|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.ActiveCfg = Debug|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.Build.0 = Debug|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.ActiveCfg = Debug|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.Build.0 = Debug|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.ActiveCfg = Release|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.Build.0 = Release|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.ActiveCfg = Release|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.Build.0 = Release|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.ActiveCfg = Debug|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.Build.0 = Debug|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.ActiveCfg = Debug|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.Build.0 = Debug|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.ActiveCfg = Release|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.Build.0 = Release|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.ActiveCfg = Release|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.Build.0 = Release|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.ActiveCfg = Debug|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.Build.0 = Debug|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.ActiveCfg = Debug|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.Build.0 = Debug|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.ActiveCfg = Release|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.Build.0 = Release|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.ActiveCfg = Release|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.Build.0 = Release|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.ActiveCfg = Debug|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.Build.0 = Debug|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.ActiveCfg = Debug|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.Build.0 = Debug|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.ActiveCfg = Release|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.Build.0 = Release|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.ActiveCfg = Release|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.Build.0 = Release|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.ActiveCfg = Debug|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.Build.0 = Debug|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.ActiveCfg = Debug|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.Build.0 = Debug|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.ActiveCfg = Release|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.Build.0 = Release|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.ActiveCfg = Release|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.Build.0 = Release|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.ActiveCfg = Debug|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.Build.0 = Debug|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.ActiveCfg = Debug|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.Build.0 = Debug|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.ActiveCfg = Release|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.Build.0 = Release|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.ActiveCfg = Release|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.Build.0 = Release|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.ActiveCfg = Debug|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.Build.0 = Debug|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.ActiveCfg = Debug|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.Build.0 = Debug|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.ActiveCfg = Release|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.Build.0 = Release|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.ActiveCfg = Release|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.Build.0 = Release|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.ActiveCfg = Debug|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.Build.0 = Debug|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.ActiveCfg = Debug|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.Build.0 = Debug|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.ActiveCfg = Release|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.Build.0 = Release|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.ActiveCfg = Release|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.Build.0 = Release|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.Build.0 = Debug|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.ActiveCfg = Debug|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.Build.0 = Debug|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.ActiveCfg = Release|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.Build.0 = Release|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.ActiveCfg = Release|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.Build.0 = Release|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.Build.0 = Debug|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.ActiveCfg = Debug|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.Build.0 = Debug|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.ActiveCfg = Release|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.Build.0 = Release|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.ActiveCfg = Release|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.Build.0 = Release|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.ActiveCfg = Debug|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.Build.0 = Debug|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.ActiveCfg = Debug|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.Build.0 = Debug|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.ActiveCfg = Release|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.Build.0 = Release|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.ActiveCfg = Release|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.Build.0 = Release|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.ActiveCfg = Debug|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.Build.0 = Debug|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.ActiveCfg = Debug|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.Build.0 = Debug|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.ActiveCfg = Release|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.Build.0 = Release|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.ActiveCfg = Release|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.Build.0 = Release|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.Build.0 = Debug|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.ActiveCfg = Debug|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.Build.0 = Debug|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.ActiveCfg = Release|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.Build.0 = Release|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.ActiveCfg = Release|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.Build.0 = Release|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.ActiveCfg = Debug|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.Build.0 = Debug|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.ActiveCfg = Debug|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.Build.0 = Debug|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.ActiveCfg = Release|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.Build.0 = Release|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.ActiveCfg = Release|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.Build.0 = Release|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.Build.0 = Debug|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.ActiveCfg = Debug|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.Build.0 = Debug|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.ActiveCfg = Release|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.Build.0 = Release|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.ActiveCfg = Release|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.Build.0 = Release|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.ActiveCfg = Debug|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.Build.0 = Debug|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.ActiveCfg = Debug|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.Build.0 = Debug|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.ActiveCfg = Release|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.Build.0 = Release|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.ActiveCfg = Release|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.Build.0 = Release|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.ActiveCfg = Debug|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.Build.0 = Debug|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.ActiveCfg = Debug|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.Build.0 = Debug|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.ActiveCfg = Release|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.Build.0 = Release|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.ActiveCfg = Release|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.Build.0 = Release|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.ActiveCfg = Debug|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.Build.0 = Debug|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.ActiveCfg = Debug|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.Build.0 = Debug|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.ActiveCfg = Release|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.Build.0 = Release|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.ActiveCfg = Release|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.Build.0 = Release|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.ActiveCfg = Debug|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.Build.0 = Debug|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.ActiveCfg = Debug|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.Build.0 = Debug|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.ActiveCfg = Release|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.Build.0 = Release|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.ActiveCfg = Release|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.Build.0 = Release|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.Build.0 = Debug|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.ActiveCfg = Debug|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.Build.0 = Debug|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.ActiveCfg = Release|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.Build.0 = Release|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.ActiveCfg = Release|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.Build.0 = Release|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.ActiveCfg = Debug|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.Build.0 = Debug|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.ActiveCfg = Debug|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.Build.0 = Debug|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.ActiveCfg = Release|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.Build.0 = Release|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.ActiveCfg = Release|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.Build.0 = Release|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.ActiveCfg = Debug|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.Build.0 = Debug|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.ActiveCfg = Debug|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.Build.0 = Debug|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.ActiveCfg = Release|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.Build.0 = Release|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.ActiveCfg = Release|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.Build.0 = Release|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.Build.0 = Debug|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.ActiveCfg = Debug|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.Build.0 = Debug|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.ActiveCfg = Release|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.Build.0 = Release|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.ActiveCfg = Release|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.Build.0 = Release|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.Build.0 = Debug|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.ActiveCfg = Debug|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.Build.0 = Debug|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.ActiveCfg = Release|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.Build.0 = Release|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.ActiveCfg = Release|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.Build.0 = Release|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.ActiveCfg = Debug|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.Build.0 = Debug|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.ActiveCfg = Debug|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.Build.0 = Debug|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.ActiveCfg = Release|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.Build.0 = Release|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.ActiveCfg = Release|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.Build.0 = Release|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.ActiveCfg = Debug|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.Build.0 = Debug|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.ActiveCfg = Debug|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.Build.0 = Debug|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.ActiveCfg = Release|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.Build.0 = Release|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.ActiveCfg = Release|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.Build.0 = Release|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.Build.0 = Debug|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.ActiveCfg = Debug|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.Build.0 = Debug|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.ActiveCfg = Release|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.Build.0 = Release|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.ActiveCfg = Release|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.Build.0 = Release|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.ActiveCfg = Debug|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.Build.0 = Debug|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.ActiveCfg = Debug|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.Build.0 = Debug|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.ActiveCfg = Release|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.Build.0 = Release|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.ActiveCfg = Release|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.Build.0 = Release|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.ActiveCfg = Debug|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.Build.0 = Debug|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.ActiveCfg = Debug|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.Build.0 = Debug|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.ActiveCfg = Release|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.Build.0 = Release|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.ActiveCfg = Release|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.Build.0 = Release|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.Build.0 = Debug|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.ActiveCfg = Debug|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.Build.0 = Debug|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.ActiveCfg = Release|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.Build.0 = Release|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.ActiveCfg = Release|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.Build.0 = Release|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.Build.0 = Debug|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.ActiveCfg = Debug|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.Build.0 = Debug|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.ActiveCfg = Release|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.Build.0 = Release|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.ActiveCfg = Release|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.Build.0 = Release|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.ActiveCfg = Debug|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.Build.0 = Debug|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.ActiveCfg = Debug|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.Build.0 = Debug|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.ActiveCfg = Release|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.Build.0 = Release|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.ActiveCfg = Release|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.Build.0 = Release|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.ActiveCfg = Debug|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.Build.0 = Debug|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.ActiveCfg = Debug|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.Build.0 = Debug|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.ActiveCfg = Release|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.Build.0 = Release|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.ActiveCfg = Release|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.Build.0 = Release|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.Build.0 = Debug|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.ActiveCfg = Debug|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.Build.0 = Debug|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.ActiveCfg = Release|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.Build.0 = Release|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.ActiveCfg = Release|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.Build.0 = Release|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.ActiveCfg = Debug|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.Build.0 = Debug|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.ActiveCfg = Debug|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.Build.0 = Debug|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.ActiveCfg = Release|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.Build.0 = Release|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.ActiveCfg = Release|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.Build.0 = Release|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.Build.0 = Debug|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.ActiveCfg = Debug|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.Build.0 = Debug|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.ActiveCfg = Release|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.Build.0 = Release|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.ActiveCfg = Release|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.Build.0 = Release|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.ActiveCfg = Debug|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.Build.0 = Debug|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.ActiveCfg = Debug|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.Build.0 = Debug|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.ActiveCfg = Release|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.Build.0 = Release|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.ActiveCfg = Release|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.Build.0 = Release|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.ActiveCfg = Debug|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.Build.0 = Debug|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.ActiveCfg = Debug|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.Build.0 = Debug|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.ActiveCfg = Release|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.Build.0 = Release|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.ActiveCfg = Release|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.Build.0 = Release|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.ActiveCfg = Debug|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.Build.0 = Debug|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.ActiveCfg = Debug|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.Build.0 = Debug|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.ActiveCfg = Release|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.Build.0 = Release|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.ActiveCfg = Release|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.Build.0 = Release|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.ActiveCfg = Debug|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.Build.0 = Debug|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.ActiveCfg = Debug|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.Build.0 = Debug|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.ActiveCfg = Release|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.Build.0 = Release|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.ActiveCfg = Release|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.Build.0 = Release|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.ActiveCfg = Debug|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.Build.0 = Debug|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.ActiveCfg = Debug|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.Build.0 = Debug|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.ActiveCfg = Release|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.Build.0 = Release|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.ActiveCfg = Release|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.Build.0 = Release|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.ActiveCfg = Debug|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.Build.0 = Debug|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.ActiveCfg = Debug|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.Build.0 = Debug|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.ActiveCfg = Release|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.Build.0 = Release|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.ActiveCfg = Release|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.Build.0 = Release|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.Build.0 = Debug|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.ActiveCfg = Debug|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.Build.0 = Debug|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.ActiveCfg = Release|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.Build.0 = Release|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.ActiveCfg = Release|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.Build.0 = Release|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.ActiveCfg = Debug|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.Build.0 = Debug|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.ActiveCfg = Debug|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.Build.0 = Debug|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.ActiveCfg = Release|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.Build.0 = Release|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.ActiveCfg = Release|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.Build.0 = Release|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.ActiveCfg = Debug|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.Build.0 = Debug|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.ActiveCfg = Debug|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.Build.0 = Debug|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.ActiveCfg = Release|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.Build.0 = Release|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.ActiveCfg = Release|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.Build.0 = Release|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.ActiveCfg = Debug|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.Build.0 = Debug|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.ActiveCfg = Debug|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.Build.0 = Debug|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.ActiveCfg = Release|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.Build.0 = Release|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.ActiveCfg = Release|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.Build.0 = Release|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.ActiveCfg = Debug|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.Build.0 = Debug|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.ActiveCfg = Debug|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.Build.0 = Debug|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.ActiveCfg = Release|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.Build.0 = Release|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.ActiveCfg = Release|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.Build.0 = Release|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.ActiveCfg = Debug|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.Build.0 = Debug|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.ActiveCfg = Debug|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.Build.0 = Debug|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.ActiveCfg = Release|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.Build.0 = Release|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.ActiveCfg = Release|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {F9916510-9055-4C9F-997A-3755DEC1511B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {9299B507-1AF9-4C93-9560-5F637D1E0C9E} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {20D781FB-4A20-4B75-B863-304A47182966} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {B8928210-546C-4AE3-956B-E2B724E6B8E5} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {6DA1396F-2A44-4D5C-8442-012F71006217} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {3A12F777-56A8-42EC-BD17-8F325524241E} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {33276462-8313-4192-8306-13717ECCA60A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {3C42510C-A29E-4A53-899C-203BFA874E0B} = {F9C41695-3353-4564-A154-58106829B19C} - {987F026D-EB1F-4013-ADA8-2406ACCDA526} = {F9C41695-3353-4564-A154-58106829B19C} - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28} = {F9C41695-3353-4564-A154-58106829B19C} - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61} = {F9C41695-3353-4564-A154-58106829B19C} - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3} = {F9C41695-3353-4564-A154-58106829B19C} - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A} = {F9C41695-3353-4564-A154-58106829B19C} - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856} = {F9C41695-3353-4564-A154-58106829B19C} - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {B988F96C-F87A-484C-AB15-D0674B22F291} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {214F211F-1A2B-4F79-8993-B8DEE2EF7441} = {F9C41695-3353-4564-A154-58106829B19C} - {210DD88D-649B-4695-8C5F-898A4F60A8CE} = {F9C41695-3353-4564-A154-58106829B19C} - {E26D2311-C164-48CF-BA24-5CEDA873D1B2} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {DD76B998-ED0D-4BFD-9660-3ADC3A334872} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {27CA5499-B3F2-4FB6-8414-651819B0B96C} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5} = {F9C41695-3353-4564-A154-58106829B19C} - {4ADADECA-99D7-410D-8127-CB27210DCC6A} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {E37561EB-B9C5-4215-9FF9-DB559916FBA2} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {A9265E36-7F2D-440C-BF3E-F447FDB6200F} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {6A1969EA-9657-4828-93E0-8D21A970F868} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {07137F45-8B5F-4561-BEC8-B883E9123785} = {F9C41695-3353-4564-A154-58106829B19C} - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {ECE691D0-BFB3-483B-A699-084269EFCE89} = {F9C41695-3353-4564-A154-58106829B19C} - {0BB52326-02D5-4698-A180-24078DA5DA0E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {D9057E63-AAAA-4FE7-800A-20C02F4761F3} = {F9C41695-3353-4564-A154-58106829B19C} - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {40FE7861-E54E-4DA9-BE4D-A5178014E477} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {1423FC8F-AA52-4562-8275-4BF0838CA378} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {53F841E8-284F-4545-9176-B131896E43F8} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {4AC1E062-0236-4E49-AA04-F732043D2DCF} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {290C5ED4-71A7-4040-AD26-4820CF7A9E60} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {1C856B14-54CD-4D07-B18B-5F7DB073AB51} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {A5B558C6-C767-11E1-A335-F6EB6188709B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {6022990D-3FD5-46A9-8AB5-E444C51646F3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {A8F23706-E590-4A87-96CC-5F8E5082503F} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {DADAC956-3A54-440A-8B56-A07234DEE861} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {C14D6E0D-810E-4599-A6E0-17298AFA0501} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {E71C1722-A41D-4475-87F4-29961A3654BB} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {9C6040B8-1173-40FA-A3DB-DE044CCD8250} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {576EEEFD-E423-482B-879A-F0515D40B8E1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {A4855451-6447-437C-B024-B36C3C7901EA} = {F9C41695-3353-4564-A154-58106829B19C} - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {AE677E3A-DAC5-42FD-8762-47370C57639B} = {F9C41695-3353-4564-A154-58106829B19C} - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {6DE11A47-2268-4B08-8DE5-15A1705FCE28} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {C619A811-8023-4441-B3D7-785388A09DF0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE} = {F9C41695-3353-4564-A154-58106829B19C} - {155211F8-08E1-4864-A3B8-9F04F4270360} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {2E15C462-A150-4A37-ACD6-FBAECF1724F5} = {F9C41695-3353-4564-A154-58106829B19C} - {F5E3FAFE-B650-4736-8D27-FA53866668C6} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {01F9E227-06F5-4BED-907F-402CA7DFAFE6} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {A556E0B5-73A1-4676-BA1F-133820DE7D5A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {F29D0C8D-141A-43CF-86B2-34A04653F8D4} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {0E046380-14CA-4C23-A807-8C678519A605} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {3C83B0AB-9739-41C1-A127-ED7DB9551F76} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {475ED6ED-C311-4188-ACB2-1C41830B22EE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {BF6E1942-7E42-4564-9DF5-FD0A00D71173} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {BE22A21F-73B7-453F-86A0-B867F0056490} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {12BCA020-EABF-429E-876A-A476BC9C10C0} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {6124E997-426E-4A0B-9617-D6D577D5E7D7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {66A9BDEB-150F-45DC-B20F-9892C0B43834} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {BCFAB658-326E-466D-995B-E76636C1DEA4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {B4327D10-ACDC-4C12-9555-749DD49A7BB0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {27D41D81-991F-4DC6-8749-B0321C87E694} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {BD291BF0-D804-4818-8311-DE871E6BCEAA} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {045BAC91-34D1-4B43-B52B-566801BE7F85} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {E604CD58-4579-4F69-9D6A-2605FD7CF716} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {E876FE63-0701-4CDA-BED5-7C73A379C1D1} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {CE6A5A24-EA88-4E67-BDF2-22517528E43F} = {F9C41695-3353-4564-A154-58106829B19C} - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {A185B162-6CB6-4502-B03F-B56F7699A8D9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {A21C50CD-28A6-481A-A12B-47189FE66641} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {2115FEBC-1EC4-4F95-A058-A523ED5295A4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {7DC23E4E-2448-4811-AABD-F5D069F6E74A} = {F9C41695-3353-4564-A154-58106829B19C} - {B3494FED-FB8C-43F4-B341-F26A3460203B} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {EFB2355B-82B3-4759-B7D8-95F8E9506291} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {B3BC3949-6949-41DE-94BF-B112FBFB1A84} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {713067DF-65EE-480B-A000-B2A323495F16} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {620E0BE7-3763-4F35-9DBD-4770104E269C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {86033E58-A1E3-43AD-AE8E-305E15E72A91} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {A7FAD273-8C71-4D72-A84F-2D160F2DC589} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {A2E9DA24-95E4-4414-94AF-488A382E276A} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {6D19209B-ECE7-4B9C-941C-0AA2B484F199} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A} = {F9C41695-3353-4564-A154-58106829B19C} - {4D3554DE-6E14-4F94-A909-A4B19151A47E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {13E796AD-BEA4-4213-A1B8-E18E2397E544} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {29A0C2A8-07A4-4A8B-8BED-8F7D024013D6} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.27130.2036 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Miranda", "..\src\miranda32\miranda32.vcxproj", "{F9916510-9055-4C9F-997A-3755DEC1511B}" + ProjectSection(ProjectDependencies) = postProject + {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {538E451F-E667-4D07-BCE6-976ECC7BB8D1} + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_core", "..\src\mir_core\mir_core.vcxproj", "{D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_app", "..\src\mir_app\mir_app.vcxproj", "{538E451F-E667-4D07-BCE6-976ECC7BB8D1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjson", "..\libs\libjson\libjson.vcxproj", "{F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AVS", "..\plugins\AVS\avs.vcxproj", "{7711F563-6473-4ABD-B5E3-477CE8384AD6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zlib", "..\libs\zlib\zlib.vcxproj", "{E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Import", "..\plugins\Import\import.vcxproj", "{9299B507-1AF9-4C93-9560-5F637D1E0C9E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mmap", "..\plugins\Db3x_mmap\db3x_mmap.vcxproj", "{20D781FB-4A20-4B75-B863-304A47182966}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scriver", "..\plugins\Scriver\scriver.vcxproj", "{B8928210-546C-4AE3-956B-E2B724E6B8E5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM", "..\plugins\TabSRMM\tabsrmm.vcxproj", "{99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GG", "..\protocols\Gadu-Gadu\gadugadu.vcxproj", "{6DA1396F-2A44-4D5C-8442-012F71006217}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IRC", "..\protocols\IRCG\IRC.vcxproj", "{3A12F777-56A8-42EC-BD17-8F325524241E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Jabber", "..\protocols\JabberG\jabber.vcxproj", "{33276462-8313-4192-8306-13717ECCA60A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_nicer", "..\plugins\Clist_nicer\clist_nicer.vcxproj", "{3C42510C-A29E-4A53-899C-203BFA874E0B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cln_skinedit", "..\plugins\Cln_skinedit\skinedit.vcxproj", "{987F026D-EB1F-4013-ADA8-2406ACCDA526}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\AuthState\authstate.vcxproj", "{DB315D7D-00BB-43B2-93A6-0430CA2B9F28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "..\plugins\Console\Console.vcxproj", "{A231E008-2D1A-4F24-95DD-59F56F85A499}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Contacts", "..\plugins\ContactsPlus\contacts.vcxproj", "{F4F2FD25-1553-FB72-F695-0701D20C3168}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Flags", "..\plugins\CountryFlags\flags.vcxproj", "{B4361FA0-4073-4B60-EE72-F5C08E6EDF61}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSList", "..\plugins\CSList\cslist.vcxproj", "{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Db_autobackups", "..\plugins\Db_autobackups\db_autobackups.vcxproj", "{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FavContacts", "..\plugins\FavContacts\favcontacts.vcxproj", "{2D0B4CB0-3ACA-4612-B745-FF3050E1500A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FltContacts", "..\plugins\FloatingContacts\FltCont.vcxproj", "{9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folders", "..\plugins\Folders\folders.vcxproj", "{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LinkList", "..\plugins\HistoryLinkListPlus\linklist.vcxproj", "{850EC838-0EAD-45EB-6F1B-16DC90DCE18D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistorySweeperLight", "..\plugins\HistorySweeperLight\historysweeperlight.vcxproj", "{9DE1F0B0-B9D1-4681-82E7-13CC3E047445}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEView", "..\plugins\IEView\ieview.vcxproj", "{B988F96C-F87A-484C-AB15-D0674B22F291}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IgnoreState", "..\plugins\IgnoreState\ignore.vcxproj", "{214F211F-1A2B-4F79-8993-B8DEE2EF7441}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MenuEx", "..\plugins\MenuItemEx\menuex.vcxproj", "{210DD88D-649B-4695-8C5F-898A4F60A8CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libTextControl", "..\libs\mTextControl\mtextcontrol.vcxproj", "{E26D2311-C164-48CF-BA24-5CEDA873D1B2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewXstatusNotify", "..\plugins\NewXstatusNotify\NewXstatusNotify.vcxproj", "{D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Nudge", "..\plugins\Nudge\nudge.vcxproj", "{8190CFAA-3B73-43D8-9101-8368E21F1864}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PopupPlus", "..\plugins\Popup\Popup.vcxproj", "{726460C7-E1F1-4C37-B64F-DA8A8DD26D70}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickMessages", "..\plugins\QuickMessages\quickmessages.vcxproj", "{DD76B998-ED0D-4BFD-9660-3ADC3A334872}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickReplies", "..\plugins\QuickReplies\quickreplies.vcxproj", "{27CA5499-B3F2-4FB6-8414-651819B0B96C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Rate", "..\plugins\Rate\rate.vcxproj", "{C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM", "..\plugins\SecureIM\secureim_16.vcxproj", "{4ADADECA-99D7-410D-8127-CB27210DCC6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SeenPlugin", "..\plugins\SeenPlugin\seenplugin.vcxproj", "{EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sessions", "..\plugins\Sessions\Sessions.vcxproj", "{37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleAR", "..\plugins\SimpleAR\SimpleAR.vcxproj", "{06C44834-7B7A-4074-A6D8-7F163B3FF707}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SmileyAdd", "..\plugins\SmileyAdd\SmileyAdd.vcxproj", "{5BBA7E51-B494-4462-BC4F-1AE5F57F9857}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SplashScreen", "..\plugins\SplashScreen\splashscreen.vcxproj", "{5A6095F4-B037-4DA8-8410-8004A90C961A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpam", "..\plugins\StopSpamPlus\stopspam.vcxproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tipper", "..\plugins\TipperYM\tipper_ym.vcxproj", "{2C818919-A38F-44FF-BD91-A6A204AC592A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TooltipNotify", "..\plugins\TooltipNotify\ttnotify.vcxproj", "{1948EAEA-4C25-4F6B-AD9E-5891F656EADA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TranslitSwitcher", "..\plugins\TranslitSwitcher\TranslitSwitcher.vcxproj", "{82F96271-4136-4B0E-AB6F-040DE7A4DD1E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserGuide", "..\plugins\UserGuide\UserGuide.vcxproj", "{92E3BDEE-DD17-4619-AD61-70C0ADE04217}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx", "..\plugins\UserInfoEx\UInfoEx.vcxproj", "{AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Variables", "..\plugins\Variables\Variables.vcxproj", "{3038EF69-85BE-4D92-9864-CD6A5EBB558A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhenWasIt", "..\plugins\WhenWasIt\WhenWasIt.vcxproj", "{63E05ECA-0A63-479E-86BD-2CAF53869BDA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker", "..\plugins\SpellChecker\spellchecker.vcxproj", "{5DB86086-10E9-42E7-AC90-503D2678C2A2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Alarms", "..\plugins\Alarms\alarms.vcxproj", "{5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroNotify", "..\plugins\ZeroNotification\Zero Notification.vcxproj", "{E37561EB-B9C5-4215-9FF9-DB559916FBA2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardNotify", "..\plugins\KeyboardNotify\KeyboardNotify.vcxproj", "{A9265E36-7F2D-440C-BF3E-F447FDB6200F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AddContactPlus", "..\plugins\AddContactPlus\addcontactplus.vcxproj", "{253ADD1D-F7C9-4643-A957-51BFCD61A5D2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleStatusMsg", "..\plugins\SimpleStatusMsg\simplestatusmsg.vcxproj", "{D3D80E27-D099-41EC-AFB2-A891A33F1608}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClientChangeNotify", "..\plugins\ClientChangeNotify\ClientChangeNotify.vcxproj", "{6A1969EA-9657-4828-93E0-8D21A970F868}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ListeningTo", "..\plugins\ListeningTo\listeningto.vcxproj", "{5FAA475D-0593-454F-8601-0D7150DCA4A0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Omegle", "..\protocols\Omegle\omegle.vcxproj", "{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugins\RecentContacts\RecentContacts.vcxproj", "{07137F45-8B5F-4561-BEC8-B883E9123785}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EkHtml", "..\plugins\MirOTR\ekhtml\ekhtml_16.vcxproj", "{2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Libgcrypt", "..\plugins\MirOTR\Libgcrypt\Libgcrypt_16.vcxproj", "{40FE7861-E54E-4DA9-BE4D-A5178014E477}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libotr", "..\plugins\MirOTR\libotr\libotr_16.vcxproj", "{1423FC8F-AA52-4562-8275-4BF0838CA378}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirOTR", "..\plugins\MirOTR\MirOTR_16.vcxproj", "{53F841E8-284F-4545-9176-B131896E43F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewEventNotify", "..\plugins\NewEventNotify\neweventnotify.vcxproj", "{2E0A2793-94C3-82E7-2AB0-FD421816CFBF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhoUsesMyFiles", "..\plugins\WhoUsesMyFiles\wumf.vcxproj", "{F29CCB9B-79CF-4341-AA05-3626A036D3E3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CryptoPP", "..\plugins\CryptoPP\cryptopp_16.vcxproj", "{4AC1E062-0236-4E49-AA04-F732043D2DCF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cryptlib", "..\plugins\CryptoPP\crypto\cryptlib_16.vcxproj", "{290C5ED4-71A7-4040-AD26-4820CF7A9E60}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserInfo", "..\src\core\stduserinfo\stduserinfo.vcxproj", "{1C856B14-54CD-4D07-B18B-5F7DB073AB51}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdEmail", "..\src\core\stdemail\stdemail.vcxproj", "{A5B558C6-C767-11E1-A335-F6EB6188709B}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdFile", "..\src\core\stdfile\stdfile.vcxproj", "{6022990D-3FD5-46A9-8AB5-E444C51646F3}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAutoAway", "..\src\core\stdautoaway\stdautoaway.vcxproj", "{A8F23706-E590-4A87-96CC-5F8E5082503F}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUIHist", "..\src\core\stduihist\stduihist.vcxproj", "{DADAC956-3A54-440A-8B56-A07234DEE861}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserOnline", "..\src\core\stduseronline\stduseronline.vcxproj", "{D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAway", "..\src\core\stdaway\stdaway.vcxproj", "{C14D6E0D-810E-4599-A6E0-17298AFA0501}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdClist", "..\src\core\stdclist\stdclist.vcxproj", "{E71C1722-A41D-4475-87F4-29961A3654BB}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdMsg", "..\src\core\stdmsg\stdmsg.vcxproj", "{F47EAB99-C78F-4A92-87D5-B0E16FE5A133}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdCrypt", "..\src\core\stdcrypt\stdcrypt.vcxproj", "{8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmdLine", "..\plugins\CmdLine\CmdLine.vcxproj", "{73BA9CA5-640D-4F30-A157-A73557A25F98}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MimCmd", "..\plugins\MimCmd\MimCmd.vcxproj", "{1E3BB48A-FFBC-4A03-8C43-9124A484BE51}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTPFile", "..\plugins\FTPFileYM\ftpfile.vcxproj", "{73482497-9F57-4819-A9AB-5D841A9F072D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PasteIt", "..\plugins\PasteIt\PasteIt.vcxproj", "{BAEBC482-CDA9-4053-A7D0-08222E85118E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendScreenshotPlus\SendSS.vcxproj", "{CEAD8BCF-1F22-4E00-9F6D-E33405B00552}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenFolder", "..\plugins\OpenFolder\openFolder.vcxproj", "{8D233B9A-2744-4B62-94FC-7872FDDA4683}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyDetails", "..\plugins\MyDetails\mydetails.vcxproj", "{A4855451-6447-437C-B024-B36C3C7901EA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Msg_Export", "..\plugins\Msg_Export\msg_export.vcxproj", "{4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpamMod", "..\plugins\StopSpamMod\stopspam_mod.vcxproj", "{0FF6989B-880A-4C3F-B69D-AFF93296044D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Watrack_MPD", "..\plugins\watrack_mpd\watrack_mpd.vcxproj", "{A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginUpdater", "..\plugins\PluginUpdater\PluginUpdater.vcxproj", "{21F6C0E4-DD1A-49E6-82FD-64574BB902BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PManagerEx", "..\plugins\ProfileManager\pmanagerEx.vcxproj", "{728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Restart", "..\plugins\Restart\Restart.vcxproj", "{18195F68-A747-8643-050C-C5101DA658FD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrafficCounter", "..\plugins\TrafficCounter\TrafficCounter.vcxproj", "{885010EA-D008-4E38-85D4-487693F0BA00}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackUpdater", "..\plugins\PackUpdater\PackUpdater.vcxproj", "{20413125-4D68-4751-8062-DDA026DDABF1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickContacts", "..\plugins\QuickContacts\quickcontacts.vcxproj", "{7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MobileState", "..\plugins\MobileState\mobilestate.vcxproj", "{AE677E3A-DAC5-42FD-8762-47370C57639B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NoHistory", "..\plugins\NoHistory\NoHistory.vcxproj", "{ABF05E2C-C335-4BD1-8C3E-4C63285362CF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YAMN", "..\protocols\YAMN\YAMN.vcxproj", "{C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewsAggregator", "..\protocols\NewsAggregator\NewsAggregator.vcxproj", "{6DE11A47-2268-4B08-8DE5-15A1705FCE28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CurrencyRates", "..\protocols\CurrencyRates\Forex.vcxproj", "{C619A811-8023-4441-B3D7-785388A09DF0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Weather", "..\protocols\Weather\weather.vcxproj", "{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ping", "..\plugins\Ping\ping.vcxproj", "{F31BD1B6-EE9D-4F76-A047-F8AEADC26086}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fingerprint", "..\plugins\FingerprintNG\fingerprint_ng.vcxproj", "{AF7D71D4-19B7-42B8-91DD-701F155AC4AE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssocMgr", "..\plugins\AssocMgr\assocmgr.vcxproj", "{B57D997C-73E1-D5F7-ECCA-C204345C04A3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoRun", "..\plugins\AutoRun\autorun.vcxproj", "{00037ACC-F32D-4B5F-93A8-3CF0E277E377}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoShutdown", "..\plugins\AutoShutdown\shutdown.vcxproj", "{3F8EF54D-0593-4048-B0E5-C938F99B29F3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AvatarHistory", "..\plugins\AvatarHistory\AvatarHistory.vcxproj", "{9D702039-F4A9-4978-92B3-3615E5C44BEE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicHistory", "..\plugins\BasicHistory\BasicHistory.vcxproj", "{155211F8-08E1-4864-A3B8-9F04F4270360}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BASS_interface", "..\plugins\BASS_interface\Bass_interface.vcxproj", "{3933E789-D185-41DC-8169-9FF4365B6015}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_blind", "..\plugins\Clist_blind\Clist_blind.vcxproj", "{2E15C462-A150-4A37-ACD6-FBAECF1724F5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartPosition", "..\plugins\StartPosition\StartPosition.vcxproj", "{046C5F80-ABE5-488F-BFC8-B024D4AACC8C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HTTPServer", "..\plugins\HTTPServer\HTTPServer_16.vcxproj", "{F7A70398-AFA0-4A58-B645-85268F9517DE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pu_stub", "..\plugins\PluginUpdater\pu_stub\pu_stub.vcxproj", "{121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotifyAnything", "..\plugins\NotifyAnything\NotifyAnything.vcxproj", "{F5E3FAFE-B650-4736-8D27-FA53866668C6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "..\libs\libcurl\libcurl.vcxproj", "{01F9E227-06F5-4BED-907F-402CA7DFAFE6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusChange", "..\plugins\StatusChange\StatusChange.vcxproj", "{D09881C7-E189-49AD-919E-F64355F8EFD0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyPounce", "..\plugins\BuddyPounce\buddypounce.vcxproj", "{FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MsgPopup", "..\plugins\MsgPopup\MsgPopup.vcxproj", "{1E702CF1-E52F-49F8-915A-FCBBCE554774}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NimContact", "..\protocols\Non-IM Contact\nimcontact.vcxproj", "{A556E0B5-73A1-4676-BA1F-133820DE7D5A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XSoundNotify", "..\plugins\XSoundNotify\XSoundNotify.vcxproj", "{5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YARelay", "..\plugins\YARelay\YARelay.vcxproj", "{AA5CA2D0-F096-4001-B1B6-439C7FC11E77}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeStatusChange", "..\plugins\SkypeStatusChange\SkypeStatusChange.vcxproj", "{10F78F26-2B20-4158-869F-CB29533B4C2C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wbOSD", "..\plugins\wbOSD\wbOSD.vcxproj", "{DA450122-7F0B-45DA-9EAA-421887AD8450}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "New_GPG", "..\plugins\New_GPG\new_gpg.vcxproj", "{F29D0C8D-141A-43CF-86B2-34A04653F8D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spamotron", "..\plugins\Spamotron\Spamotron.vcxproj", "{DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LotusNotify", "..\protocols\LotusNotify\LotusNotify.vcxproj", "{0E046380-14CA-4C23-A807-8C678519A605}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirFox", "..\plugins\MirFox\MirFoxNG_16.vcxproj", "{3E9DA555-4C7B-463C-AD5C-214073DE29D6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConnectionNotify", "..\protocols\ConnectionNotify\ConnectionNotify.vcxproj", "{3C83B0AB-9739-41C1-A127-ED7DB9551F76}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Exchange", "..\plugins\Exchange\Exchange.vcxproj", "{F462FDA1-BDCD-49B2-B996-D7DE71D07393}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebView", "..\protocols\WebView\webview.vcxproj", "{475ED6ED-C311-4188-ACB2-1C41830B22EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShlExt", "..\plugins\ShellExt\shellext.vcxproj", "{B27B85B5-0EF1-496D-99D7-0702A98A342A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinterSpeak", "..\plugins\WinterSpeak\WinterSpeak.vcxproj", "{A44F96D0-A850-4A67-9570-0E9298A16E40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKontakte", "..\protocols\VKontakte\vk.vcxproj", "{BF6E1942-7E42-4564-9DF5-FD0A00D71173}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartupSilence", "..\plugins\StartupSilence\StartupSilence.vcxproj", "{7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirandaG15", "..\plugins\MirandaG15\MirandaG15.vcxproj", "{8ACA3C8B-BDFA-47B2-8578-069555BA05B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RemovePersonalSettings", "..\plugins\RemovePersonalSettings\rps.vcxproj", "{0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewAwaySys", "..\plugins\NewAwaySysMod\NewAwaySys.vcxproj", "{6A516E27-AC50-5374-756B-A1558DB2EFA9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryStats", "..\plugins\HistoryStats\historystats.vcxproj", "{B5BCDC2F-81FC-4324-90C6-E5540A225EFF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sametime", "..\protocols\Sametime\sametime.vcxproj", "{BE22A21F-73B7-453F-86A0-B867F0056490}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glib", "..\protocols\Sametime\src\glib\glib_16.vcxproj", "{12BCA020-EABF-429E-876A-A476BC9C10C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GmailNotifier", "..\protocols\GmailNotifier\GmailNotifier.vcxproj", "{EDAAD28B-505B-4969-A8BB-97EAE818DEEA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Pcre16", "..\libs\Pcre16\pcre16.vcxproj", "{6124E997-426E-4A0B-9617-D6D577D5E7D7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEHistory", "..\plugins\IEHistory\IEHistory.vcxproj", "{7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dummy", "..\protocols\Dummy\dummy.vcxproj", "{D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Steam", "..\protocols\Steam\Steam.vcxproj", "{8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HwHotKeys", "..\plugins\HwHotKeys\HwHotKeys.vcxproj", "{639E2B3A-64F2-4152-B5BB-12468E5D60B6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeWeb", "..\protocols\SkypeWeb\SkypeWeb.vcxproj", "{66A9BDEB-150F-45DC-B20F-9892C0B43834}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tox", "..\protocols\Tox\Tox.vcxproj", "{BCFAB658-326E-466D-995B-E76636C1DEA4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinecraftDynmap", "..\protocols\MinecraftDynmap\MinecraftDynmap.vcxproj", "{B4327D10-ACDC-4C12-9555-749DD49A7BB0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroSwitch", "..\plugins\ZeroSwitch\ZeroSwitch.vcxproj", "{D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MessageState", "..\plugins\MessageState\MessageState.vcxproj", "{D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirLua", "..\plugins\MirLua\MirLua.vcxproj", "{27D41D81-991F-4DC6-8749-B0321C87E694}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toaster", "..\plugins\Toaster\Toaster.vcxproj", "{1FDBD8F0-3929-41BC-92D1-020779460769}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\libs\liblua\liblua.vcxproj", "{BD291BF0-D804-4818-8311-DE871E6BCEAA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winapi", "..\plugins\MirLua\Modules\WinAPI\WinAPI.vcxproj", "{045BAC91-34D1-4B43-B52B-566801BE7F85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hunspell", "..\libs\hunspell\hunspell.vcxproj", "{B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_popup", "..\plugins\MirLua\Modules\m_popup\m_popup.vcxproj", "{D5C9CA74-4E25-478A-B890-75EB13E6DB1C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_variables", "..\plugins\MirLua\Modules\m_variables\m_variables.vcxproj", "{E604CD58-4579-4F69-9D6A-2605FD7CF716}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusManager", "..\plugins\StatusManager\StatusManager.vcxproj", "{D2EF305F-5255-49E8-A738-D4206D62D2B8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CloudFile", "..\protocols\CloudFile\CloudFile.vcxproj", "{E876FE63-0701-4CDA-BED5-7C73A379C1D1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_schedule", "..\plugins\MirLua\Modules\m_schedule\m_schedule.vcxproj", "{FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_toptoolbar", "..\plugins\MirLua\Modules\m_toptoolbar\m_toptoolbar.vcxproj", "{277E433F-7D71-4247-8AAA-CC5FB1AA7A67}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsSingleWindow", "..\plugins\AsSingleWindow\AsSingleWindow.vcxproj", "{CE6A5A24-EA88-4E67-BDF2-22517528E43F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "..\libs\sqlite3\sqlite3.vcxproj", "{0C02E395-E73F-47E3-8B95-B7924C0C7A6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsodium", "..\libs\libsodium\libsodium.vcxproj", "{A185B162-6CB6-4502-B03F-B56F7699A8D9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads", "..\libs\pthreads\pthreads.vcxproj", "{E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtox", "..\protocols\Tox\libtox\libtox.vcxproj", "{A21C50CD-28A6-481A-A12B-47189FE66641}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileAsMessage", "..\plugins\FileAsMessage\fileecho.vcxproj", "{D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EmLanProto", "..\protocols\EmLanProto\emlanproto.vcxproj", "{2115FEBC-1EC4-4F95-A058-A523ED5295A4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mdbx", "..\plugins\Dbx_mdbx\dbx_mdbx.vcxproj", "{E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQCorp", "..\protocols\ICQCorp\ICQCorp.vcxproj", "{AD0D0500-CE7D-417D-9C36-3620D56CA6D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeImage", "..\libs\freeimage\freeimage.vcxproj", "{5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MagneticWindows", "..\plugins\MagneticWindows\MagneticWindows.vcxproj", "{7DC23E4E-2448-4811-AABD-F5D069F6E74A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Protocols", "Protocols", "{A035B524-0F2D-45D0-BCF2-3C20279C77E2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{E7FB43FB-3563-4568-8846-A88FC37449BF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{37EDFBEA-8446-4BF3-9F2E-655908CDFB62}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua", "Lua", "{329B4E94-C846-4C78-AFD5-8B6B839DCCE1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{F13387B0-1C74-48EC-9AEC-65E3B9DE29E4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Message edtors", "Message edtors", "{D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Contact lists", "Contact lists", "{F9C41695-3353-4564-A154-58106829B19C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Encryption", "Encryption", "{30218E20-9E62-4027-BB87-2627B17F6CA3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notifications", "Notifications", "{703CFA44-C8E8-4547-B597-AE239F4F6DD9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProxySwitch", "..\plugins\ProxySwitch\ProxySwitch.vcxproj", "{7446276D-5845-4258-A245-83D1D4D3CEC3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_sqlite", "..\plugins\Dbx_sqlite\dbx_sqlite.vcxproj", "{B3494FED-FB8C-43F4-B341-F26A3460203B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQ", "..\protocols\ICQ-WIM\ICQ-WIM.vcxproj", "{EFB2355B-82B3-4759-B7D8-95F8E9506291}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh2", "..\libs\libssh2\libssh2.vcxproj", "{B3BC3949-6949-41DE-94BF-B112FBFB1A84}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdPopup", "..\src\core\stdpopup\stdpopup.vcxproj", "{713067DF-65EE-480B-A000-B2A323495F16}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotesReminders", "..\plugins\NotesAndReminders\NotesReminders.vcxproj", "{EEB57129-946C-4B98-8856-FDA501AE2A5E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsignal", "..\libs\libsignal\libsignal.vcxproj", "{620E0BE7-3763-4F35-9DBD-4770104E269C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Facebook", "..\protocols\Facebook\facebook.vcxproj", "{86033E58-A1E3-43AD-AE8E-305E15E72A91}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewStory", "..\plugins\NewStory\NewStory.vcxproj", "{A7FAD273-8C71-4D72-A84F-2D160F2DC589}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbChecker", "..\plugins\DbChecker\dbchecker.vcxproj", "{A2E9DA24-95E4-4414-94AF-488A382E276A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickSearch", "..\plugins\QuickSearch\quicksearch.vcxproj", "{3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmdbx", "..\libs\libmdbx\libmdbx.vcxproj", "{6D19209B-ECE7-4B9C-941C-0AA2B484F199}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoiceService", "..\plugins\VoiceService\VoiceService.vcxproj", "{48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libqrencode", "..\libs\libqrencode\libqrencode.vcxproj", "{4D3554DE-6E14-4F94-A909-A4B19151A47E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhatsApp", "..\protocols\WhatsApp\WhatsApp.vcxproj", "{13E796AD-BEA4-4213-A1B8-E18E2397E544}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Telegram", "..\protocols\Telegram\Telegram.vcxproj", "{AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.ActiveCfg = Debug|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.Build.0 = Debug|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.ActiveCfg = Debug|x64 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.Build.0 = Debug|x64 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.ActiveCfg = Release|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.Build.0 = Release|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.ActiveCfg = Release|x64 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.Build.0 = Release|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.Build.0 = Debug|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.ActiveCfg = Debug|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.Build.0 = Debug|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.ActiveCfg = Release|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.Build.0 = Release|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.ActiveCfg = Release|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.Build.0 = Release|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.Build.0 = Debug|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.ActiveCfg = Debug|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.Build.0 = Debug|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.ActiveCfg = Release|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.Build.0 = Release|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.ActiveCfg = Release|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.Build.0 = Release|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.ActiveCfg = Debug|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.Build.0 = Debug|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.ActiveCfg = Debug|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.Build.0 = Debug|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.ActiveCfg = Release|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.Build.0 = Release|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.ActiveCfg = Release|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.Build.0 = Release|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.ActiveCfg = Debug|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.Build.0 = Debug|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.ActiveCfg = Debug|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.Build.0 = Debug|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.ActiveCfg = Release|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.Build.0 = Release|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.ActiveCfg = Release|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.Build.0 = Release|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.ActiveCfg = Debug|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.Build.0 = Debug|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.ActiveCfg = Debug|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.Build.0 = Debug|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.ActiveCfg = Release|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.Build.0 = Release|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.ActiveCfg = Release|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.Build.0 = Release|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.Build.0 = Debug|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.ActiveCfg = Debug|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.Build.0 = Debug|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.ActiveCfg = Release|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.Build.0 = Release|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.ActiveCfg = Release|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.Build.0 = Release|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.ActiveCfg = Debug|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.Build.0 = Debug|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.ActiveCfg = Debug|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.Build.0 = Debug|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.ActiveCfg = Release|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.Build.0 = Release|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.ActiveCfg = Release|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.Build.0 = Release|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.ActiveCfg = Debug|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.Build.0 = Debug|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.ActiveCfg = Debug|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.Build.0 = Debug|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.ActiveCfg = Release|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.Build.0 = Release|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.ActiveCfg = Release|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.Build.0 = Release|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.ActiveCfg = Debug|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.Build.0 = Debug|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.ActiveCfg = Debug|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.Build.0 = Debug|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.ActiveCfg = Release|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.Build.0 = Release|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.ActiveCfg = Release|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.Build.0 = Release|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.Build.0 = Debug|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.ActiveCfg = Debug|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.Build.0 = Debug|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.ActiveCfg = Release|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.Build.0 = Release|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.ActiveCfg = Release|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.Build.0 = Release|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.Build.0 = Debug|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.ActiveCfg = Debug|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.Build.0 = Debug|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.ActiveCfg = Release|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.Build.0 = Release|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.ActiveCfg = Release|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.Build.0 = Release|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.ActiveCfg = Debug|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.Build.0 = Debug|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.ActiveCfg = Debug|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.Build.0 = Debug|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.ActiveCfg = Release|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.Build.0 = Release|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.ActiveCfg = Release|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.Build.0 = Release|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.Build.0 = Debug|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.ActiveCfg = Debug|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.Build.0 = Debug|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.ActiveCfg = Release|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.Build.0 = Release|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.ActiveCfg = Release|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.Build.0 = Release|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.ActiveCfg = Debug|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.Build.0 = Debug|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.ActiveCfg = Debug|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.Build.0 = Debug|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.ActiveCfg = Release|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.Build.0 = Release|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.ActiveCfg = Release|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.Build.0 = Release|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.ActiveCfg = Debug|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.Build.0 = Debug|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.ActiveCfg = Debug|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.Build.0 = Debug|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.ActiveCfg = Release|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.Build.0 = Release|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.ActiveCfg = Release|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.Build.0 = Release|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.ActiveCfg = Debug|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.Build.0 = Debug|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.ActiveCfg = Debug|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.Build.0 = Debug|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.ActiveCfg = Release|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.Build.0 = Release|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.ActiveCfg = Release|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.Build.0 = Release|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.ActiveCfg = Debug|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.Build.0 = Debug|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.ActiveCfg = Debug|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.Build.0 = Debug|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.ActiveCfg = Release|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.Build.0 = Release|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.ActiveCfg = Release|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.Build.0 = Release|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.Build.0 = Debug|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.ActiveCfg = Debug|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.Build.0 = Debug|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.ActiveCfg = Release|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.Build.0 = Release|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.ActiveCfg = Release|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.Build.0 = Release|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.ActiveCfg = Debug|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.Build.0 = Debug|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.ActiveCfg = Debug|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.Build.0 = Debug|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.ActiveCfg = Release|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.Build.0 = Release|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.ActiveCfg = Release|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.Build.0 = Release|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.Build.0 = Debug|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.ActiveCfg = Debug|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.Build.0 = Debug|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.ActiveCfg = Release|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.Build.0 = Release|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.ActiveCfg = Release|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.Build.0 = Release|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.Build.0 = Debug|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.ActiveCfg = Debug|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.Build.0 = Debug|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.ActiveCfg = Release|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.Build.0 = Release|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.ActiveCfg = Release|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.Build.0 = Release|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.Build.0 = Debug|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.ActiveCfg = Debug|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.Build.0 = Debug|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.ActiveCfg = Release|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.Build.0 = Release|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.ActiveCfg = Release|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.Build.0 = Release|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.ActiveCfg = Debug|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.Build.0 = Debug|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.ActiveCfg = Debug|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.Build.0 = Debug|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.ActiveCfg = Release|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.Build.0 = Release|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.ActiveCfg = Release|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.Build.0 = Release|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.ActiveCfg = Debug|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.Build.0 = Debug|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.ActiveCfg = Debug|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.Build.0 = Debug|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.ActiveCfg = Release|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.Build.0 = Release|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.ActiveCfg = Release|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.Build.0 = Release|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.ActiveCfg = Debug|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.Build.0 = Debug|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.ActiveCfg = Debug|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.Build.0 = Debug|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.ActiveCfg = Release|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.Build.0 = Release|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.ActiveCfg = Release|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.Build.0 = Release|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.Build.0 = Debug|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.ActiveCfg = Debug|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.Build.0 = Debug|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.ActiveCfg = Release|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.Build.0 = Release|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.ActiveCfg = Release|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.Build.0 = Release|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.ActiveCfg = Debug|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.Build.0 = Debug|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.ActiveCfg = Debug|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.Build.0 = Debug|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.ActiveCfg = Release|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.Build.0 = Release|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.ActiveCfg = Release|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.Build.0 = Release|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.ActiveCfg = Debug|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.Build.0 = Debug|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.ActiveCfg = Debug|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.Build.0 = Debug|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.ActiveCfg = Release|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.Build.0 = Release|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.ActiveCfg = Release|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.Build.0 = Release|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.ActiveCfg = Debug|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.Build.0 = Debug|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.ActiveCfg = Debug|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.Build.0 = Debug|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.ActiveCfg = Release|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.Build.0 = Release|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.ActiveCfg = Release|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.Build.0 = Release|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.ActiveCfg = Debug|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.Build.0 = Debug|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.ActiveCfg = Debug|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.Build.0 = Debug|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.ActiveCfg = Release|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.Build.0 = Release|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.ActiveCfg = Release|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.Build.0 = Release|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.Build.0 = Debug|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.ActiveCfg = Debug|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.Build.0 = Debug|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.ActiveCfg = Release|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.Build.0 = Release|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.ActiveCfg = Release|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.Build.0 = Release|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.ActiveCfg = Debug|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.Build.0 = Debug|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.ActiveCfg = Debug|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.Build.0 = Debug|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.ActiveCfg = Release|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.Build.0 = Release|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.ActiveCfg = Release|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.Build.0 = Release|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.ActiveCfg = Debug|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.Build.0 = Debug|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.ActiveCfg = Debug|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.Build.0 = Debug|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.ActiveCfg = Release|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.Build.0 = Release|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.ActiveCfg = Release|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.Build.0 = Release|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.ActiveCfg = Debug|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.Build.0 = Debug|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.ActiveCfg = Debug|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.Build.0 = Debug|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.ActiveCfg = Release|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.Build.0 = Release|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.ActiveCfg = Release|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.Build.0 = Release|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.ActiveCfg = Debug|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.Build.0 = Debug|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.ActiveCfg = Debug|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.Build.0 = Debug|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.ActiveCfg = Release|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.Build.0 = Release|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.ActiveCfg = Release|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.Build.0 = Release|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.Build.0 = Debug|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.ActiveCfg = Debug|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.Build.0 = Debug|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.ActiveCfg = Release|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.Build.0 = Release|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.ActiveCfg = Release|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.Build.0 = Release|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.ActiveCfg = Debug|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.Build.0 = Debug|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.ActiveCfg = Debug|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.Build.0 = Debug|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.ActiveCfg = Release|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.Build.0 = Release|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.ActiveCfg = Release|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.Build.0 = Release|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.ActiveCfg = Debug|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.Build.0 = Debug|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.ActiveCfg = Debug|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.Build.0 = Debug|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.ActiveCfg = Release|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.Build.0 = Release|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.ActiveCfg = Release|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.Build.0 = Release|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.Build.0 = Debug|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.ActiveCfg = Debug|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.Build.0 = Debug|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.ActiveCfg = Release|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.Build.0 = Release|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.ActiveCfg = Release|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.Build.0 = Release|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.Build.0 = Debug|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.ActiveCfg = Debug|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.Build.0 = Debug|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.ActiveCfg = Release|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.Build.0 = Release|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.ActiveCfg = Release|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.Build.0 = Release|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.Build.0 = Debug|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.ActiveCfg = Debug|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.Build.0 = Debug|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.ActiveCfg = Release|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.Build.0 = Release|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.ActiveCfg = Release|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.Build.0 = Release|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.ActiveCfg = Debug|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.Build.0 = Debug|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.ActiveCfg = Debug|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.Build.0 = Debug|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.ActiveCfg = Release|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.Build.0 = Release|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.ActiveCfg = Release|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.Build.0 = Release|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.ActiveCfg = Debug|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.Build.0 = Debug|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.ActiveCfg = Debug|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.Build.0 = Debug|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.ActiveCfg = Release|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.Build.0 = Release|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.ActiveCfg = Release|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.Build.0 = Release|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.Build.0 = Debug|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.ActiveCfg = Debug|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.Build.0 = Debug|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.ActiveCfg = Release|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.Build.0 = Release|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.ActiveCfg = Release|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.Build.0 = Release|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.ActiveCfg = Debug|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.Build.0 = Debug|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.ActiveCfg = Release|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.Build.0 = Release|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.Build.0 = Debug|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.ActiveCfg = Debug|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.Build.0 = Debug|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.ActiveCfg = Release|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.Build.0 = Release|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.ActiveCfg = Release|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.Build.0 = Release|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.ActiveCfg = Debug|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.Build.0 = Debug|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.ActiveCfg = Debug|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.Build.0 = Debug|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.ActiveCfg = Release|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.Build.0 = Release|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.ActiveCfg = Release|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.Build.0 = Release|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.ActiveCfg = Debug|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.Build.0 = Debug|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.ActiveCfg = Debug|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.Build.0 = Debug|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.ActiveCfg = Release|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.Build.0 = Release|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.ActiveCfg = Release|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.Build.0 = Release|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.ActiveCfg = Debug|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.Build.0 = Debug|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.ActiveCfg = Debug|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.Build.0 = Debug|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.ActiveCfg = Release|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.Build.0 = Release|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.ActiveCfg = Release|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.Build.0 = Release|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.Build.0 = Debug|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.ActiveCfg = Debug|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.Build.0 = Debug|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.ActiveCfg = Release|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.Build.0 = Release|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.ActiveCfg = Release|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.Build.0 = Release|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.ActiveCfg = Debug|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.Build.0 = Debug|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.ActiveCfg = Debug|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.Build.0 = Debug|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.ActiveCfg = Release|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.Build.0 = Release|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.ActiveCfg = Release|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.Build.0 = Release|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.ActiveCfg = Debug|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.Build.0 = Debug|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.ActiveCfg = Debug|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.Build.0 = Debug|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.ActiveCfg = Release|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.Build.0 = Release|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.ActiveCfg = Release|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.Build.0 = Release|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.ActiveCfg = Debug|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.Build.0 = Debug|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.ActiveCfg = Debug|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.Build.0 = Debug|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.ActiveCfg = Release|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.Build.0 = Release|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.ActiveCfg = Release|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.Build.0 = Release|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.Build.0 = Debug|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.ActiveCfg = Debug|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.Build.0 = Debug|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.ActiveCfg = Release|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.Build.0 = Release|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.ActiveCfg = Release|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.Build.0 = Release|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.ActiveCfg = Debug|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.Build.0 = Debug|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.ActiveCfg = Debug|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.Build.0 = Debug|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.ActiveCfg = Release|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.Build.0 = Release|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.ActiveCfg = Release|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.Build.0 = Release|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.ActiveCfg = Debug|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.Build.0 = Debug|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.ActiveCfg = Debug|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.Build.0 = Debug|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.ActiveCfg = Release|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.Build.0 = Release|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.ActiveCfg = Release|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.Build.0 = Release|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.ActiveCfg = Debug|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.Build.0 = Debug|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.ActiveCfg = Debug|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.Build.0 = Debug|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.ActiveCfg = Release|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.Build.0 = Release|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.ActiveCfg = Release|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.Build.0 = Release|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.Build.0 = Debug|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.ActiveCfg = Debug|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.Build.0 = Debug|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.ActiveCfg = Release|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.Build.0 = Release|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.ActiveCfg = Release|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.Build.0 = Release|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.Build.0 = Debug|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.ActiveCfg = Debug|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.Build.0 = Debug|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.ActiveCfg = Release|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.Build.0 = Release|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.ActiveCfg = Release|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.Build.0 = Release|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.ActiveCfg = Debug|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.Build.0 = Debug|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.ActiveCfg = Debug|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.Build.0 = Debug|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.ActiveCfg = Release|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.Build.0 = Release|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.ActiveCfg = Release|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.Build.0 = Release|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.ActiveCfg = Debug|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.Build.0 = Debug|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.ActiveCfg = Debug|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.Build.0 = Debug|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.ActiveCfg = Release|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.Build.0 = Release|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.ActiveCfg = Release|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.Build.0 = Release|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.ActiveCfg = Debug|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.Build.0 = Debug|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.ActiveCfg = Debug|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.Build.0 = Debug|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.ActiveCfg = Release|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.Build.0 = Release|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.ActiveCfg = Release|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.Build.0 = Release|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.ActiveCfg = Debug|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.Build.0 = Debug|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.ActiveCfg = Debug|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.Build.0 = Debug|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.ActiveCfg = Release|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.Build.0 = Release|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.ActiveCfg = Release|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.Build.0 = Release|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.Build.0 = Debug|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.ActiveCfg = Debug|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.Build.0 = Debug|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.ActiveCfg = Release|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.Build.0 = Release|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.ActiveCfg = Release|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.Build.0 = Release|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.ActiveCfg = Debug|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.Build.0 = Debug|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.ActiveCfg = Debug|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.Build.0 = Debug|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.ActiveCfg = Release|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.Build.0 = Release|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.ActiveCfg = Release|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.Build.0 = Release|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.ActiveCfg = Debug|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.Build.0 = Debug|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.ActiveCfg = Debug|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.Build.0 = Debug|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.ActiveCfg = Release|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.Build.0 = Release|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.ActiveCfg = Release|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.Build.0 = Release|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.Build.0 = Debug|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.ActiveCfg = Debug|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.Build.0 = Debug|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.ActiveCfg = Release|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.Build.0 = Release|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.ActiveCfg = Release|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.Build.0 = Release|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.Build.0 = Debug|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.ActiveCfg = Debug|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.Build.0 = Debug|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.ActiveCfg = Release|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.Build.0 = Release|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.ActiveCfg = Release|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.Build.0 = Release|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.ActiveCfg = Debug|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.Build.0 = Debug|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.ActiveCfg = Debug|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.Build.0 = Debug|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.ActiveCfg = Release|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.Build.0 = Release|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.ActiveCfg = Release|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.Build.0 = Release|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.ActiveCfg = Debug|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.Build.0 = Debug|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.ActiveCfg = Debug|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.Build.0 = Debug|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.ActiveCfg = Release|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.Build.0 = Release|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.ActiveCfg = Release|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.Build.0 = Release|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.Build.0 = Debug|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.ActiveCfg = Debug|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.Build.0 = Debug|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.ActiveCfg = Release|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.Build.0 = Release|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.ActiveCfg = Release|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.Build.0 = Release|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.Build.0 = Debug|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.ActiveCfg = Debug|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.Build.0 = Debug|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.ActiveCfg = Release|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.Build.0 = Release|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.ActiveCfg = Release|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.Build.0 = Release|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.Build.0 = Debug|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.ActiveCfg = Debug|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.Build.0 = Debug|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.ActiveCfg = Release|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.Build.0 = Release|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.ActiveCfg = Release|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.Build.0 = Release|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.ActiveCfg = Debug|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.Build.0 = Debug|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.ActiveCfg = Debug|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.Build.0 = Debug|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.ActiveCfg = Release|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.Build.0 = Release|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.ActiveCfg = Release|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.Build.0 = Release|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.ActiveCfg = Debug|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.Build.0 = Debug|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.ActiveCfg = Debug|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.Build.0 = Debug|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.ActiveCfg = Release|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.Build.0 = Release|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.ActiveCfg = Release|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.Build.0 = Release|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.ActiveCfg = Debug|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.Build.0 = Debug|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.ActiveCfg = Debug|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.Build.0 = Debug|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.ActiveCfg = Release|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.Build.0 = Release|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.ActiveCfg = Release|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.Build.0 = Release|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.ActiveCfg = Debug|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.Build.0 = Debug|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.ActiveCfg = Debug|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.Build.0 = Debug|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.ActiveCfg = Release|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.Build.0 = Release|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.ActiveCfg = Release|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.Build.0 = Release|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.Build.0 = Debug|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.ActiveCfg = Debug|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.Build.0 = Debug|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.ActiveCfg = Release|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.Build.0 = Release|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.ActiveCfg = Release|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.Build.0 = Release|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.Build.0 = Debug|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.ActiveCfg = Debug|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.Build.0 = Debug|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.ActiveCfg = Release|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.Build.0 = Release|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.ActiveCfg = Release|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.Build.0 = Release|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.ActiveCfg = Debug|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.Build.0 = Debug|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.ActiveCfg = Debug|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.Build.0 = Debug|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.ActiveCfg = Release|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.Build.0 = Release|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.ActiveCfg = Release|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.Build.0 = Release|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.ActiveCfg = Debug|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.Build.0 = Debug|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.ActiveCfg = Debug|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.Build.0 = Debug|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.ActiveCfg = Release|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.Build.0 = Release|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.ActiveCfg = Release|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.Build.0 = Release|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.ActiveCfg = Debug|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.Build.0 = Debug|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.ActiveCfg = Debug|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.Build.0 = Debug|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.ActiveCfg = Release|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.Build.0 = Release|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.ActiveCfg = Release|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.Build.0 = Release|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.ActiveCfg = Debug|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.Build.0 = Debug|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.ActiveCfg = Debug|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.Build.0 = Debug|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.ActiveCfg = Release|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.Build.0 = Release|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.ActiveCfg = Release|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.Build.0 = Release|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.ActiveCfg = Debug|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.Build.0 = Debug|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.ActiveCfg = Debug|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.Build.0 = Debug|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.ActiveCfg = Release|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.Build.0 = Release|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.ActiveCfg = Release|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.Build.0 = Release|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.ActiveCfg = Debug|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.Build.0 = Debug|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.ActiveCfg = Debug|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.Build.0 = Debug|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.ActiveCfg = Release|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.Build.0 = Release|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.ActiveCfg = Release|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.Build.0 = Release|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.ActiveCfg = Debug|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.Build.0 = Debug|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.ActiveCfg = Debug|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.Build.0 = Debug|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.ActiveCfg = Release|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.Build.0 = Release|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.ActiveCfg = Release|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.Build.0 = Release|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.Build.0 = Debug|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.ActiveCfg = Debug|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.Build.0 = Debug|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.ActiveCfg = Release|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.Build.0 = Release|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.ActiveCfg = Release|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.Build.0 = Release|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.ActiveCfg = Debug|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.Build.0 = Debug|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.ActiveCfg = Debug|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.Build.0 = Debug|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.ActiveCfg = Release|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.Build.0 = Release|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.ActiveCfg = Release|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.Build.0 = Release|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.ActiveCfg = Debug|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.Build.0 = Debug|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.ActiveCfg = Debug|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.Build.0 = Debug|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.ActiveCfg = Release|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.Build.0 = Release|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.ActiveCfg = Release|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.Build.0 = Release|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.ActiveCfg = Debug|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.Build.0 = Debug|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.ActiveCfg = Debug|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.Build.0 = Debug|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.ActiveCfg = Release|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.Build.0 = Release|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.ActiveCfg = Release|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.Build.0 = Release|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.ActiveCfg = Debug|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.Build.0 = Debug|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.ActiveCfg = Debug|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.Build.0 = Debug|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.ActiveCfg = Release|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.Build.0 = Release|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.ActiveCfg = Release|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.Build.0 = Release|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.Build.0 = Debug|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.ActiveCfg = Debug|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.Build.0 = Debug|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.ActiveCfg = Release|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.Build.0 = Release|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.ActiveCfg = Release|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.Build.0 = Release|x64 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.ActiveCfg = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.Build.0 = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.ActiveCfg = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.Build.0 = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.ActiveCfg = Release|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.Build.0 = Release|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.ActiveCfg = Release|x64 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.Build.0 = Release|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.ActiveCfg = Debug|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.Build.0 = Debug|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.ActiveCfg = Debug|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.Build.0 = Debug|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.ActiveCfg = Release|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.Build.0 = Release|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.ActiveCfg = Release|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.Build.0 = Release|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.ActiveCfg = Debug|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.Build.0 = Debug|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.ActiveCfg = Debug|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.Build.0 = Debug|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.ActiveCfg = Release|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.Build.0 = Release|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.ActiveCfg = Release|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.Build.0 = Release|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.ActiveCfg = Debug|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.Build.0 = Debug|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.ActiveCfg = Debug|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.Build.0 = Debug|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.ActiveCfg = Release|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.Build.0 = Release|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.ActiveCfg = Release|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.Build.0 = Release|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.Build.0 = Debug|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.ActiveCfg = Debug|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.Build.0 = Debug|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.ActiveCfg = Release|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.Build.0 = Release|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.ActiveCfg = Release|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.Build.0 = Release|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.Build.0 = Debug|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.ActiveCfg = Debug|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.Build.0 = Debug|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.ActiveCfg = Release|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.Build.0 = Release|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.ActiveCfg = Release|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.Build.0 = Release|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.ActiveCfg = Debug|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.Build.0 = Debug|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.ActiveCfg = Debug|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.Build.0 = Debug|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.ActiveCfg = Release|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.Build.0 = Release|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.ActiveCfg = Release|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.Build.0 = Release|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.ActiveCfg = Debug|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.Build.0 = Debug|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.ActiveCfg = Debug|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.Build.0 = Debug|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.ActiveCfg = Release|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.Build.0 = Release|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.ActiveCfg = Release|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.Build.0 = Release|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.ActiveCfg = Debug|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.Build.0 = Debug|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.ActiveCfg = Debug|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.Build.0 = Debug|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.ActiveCfg = Release|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.Build.0 = Release|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.ActiveCfg = Release|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.Build.0 = Release|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.ActiveCfg = Debug|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.Build.0 = Debug|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.ActiveCfg = Debug|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.Build.0 = Debug|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.ActiveCfg = Release|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.Build.0 = Release|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.ActiveCfg = Release|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.Build.0 = Release|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.ActiveCfg = Debug|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.Build.0 = Debug|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.ActiveCfg = Debug|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.Build.0 = Debug|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.ActiveCfg = Release|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.Build.0 = Release|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.ActiveCfg = Release|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.Build.0 = Release|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.Build.0 = Debug|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.ActiveCfg = Debug|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.Build.0 = Debug|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.ActiveCfg = Release|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.Build.0 = Release|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.ActiveCfg = Release|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.Build.0 = Release|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.ActiveCfg = Debug|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.Build.0 = Debug|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.ActiveCfg = Debug|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.Build.0 = Debug|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.ActiveCfg = Release|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.Build.0 = Release|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.ActiveCfg = Release|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.Build.0 = Release|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.ActiveCfg = Debug|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.Build.0 = Debug|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.ActiveCfg = Debug|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.Build.0 = Debug|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.ActiveCfg = Release|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.Build.0 = Release|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.ActiveCfg = Release|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.Build.0 = Release|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.Build.0 = Debug|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.ActiveCfg = Debug|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.Build.0 = Debug|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.ActiveCfg = Release|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.Build.0 = Release|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.ActiveCfg = Release|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.Build.0 = Release|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.ActiveCfg = Debug|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.Build.0 = Debug|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.ActiveCfg = Debug|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.Build.0 = Debug|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.ActiveCfg = Release|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.Build.0 = Release|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.ActiveCfg = Release|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.Build.0 = Release|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.Build.0 = Debug|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.ActiveCfg = Debug|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.Build.0 = Debug|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.ActiveCfg = Release|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.Build.0 = Release|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.ActiveCfg = Release|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.Build.0 = Release|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.ActiveCfg = Debug|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.Build.0 = Debug|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.ActiveCfg = Debug|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.Build.0 = Debug|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.ActiveCfg = Release|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.Build.0 = Release|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.ActiveCfg = Release|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.Build.0 = Release|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.ActiveCfg = Debug|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.Build.0 = Debug|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.ActiveCfg = Debug|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.Build.0 = Debug|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.ActiveCfg = Release|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.Build.0 = Release|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.ActiveCfg = Release|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.Build.0 = Release|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.ActiveCfg = Debug|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.Build.0 = Debug|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.ActiveCfg = Debug|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.Build.0 = Debug|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.ActiveCfg = Release|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.Build.0 = Release|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.ActiveCfg = Release|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.Build.0 = Release|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.ActiveCfg = Debug|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.Build.0 = Debug|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.ActiveCfg = Debug|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.Build.0 = Debug|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.ActiveCfg = Release|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.Build.0 = Release|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.ActiveCfg = Release|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.Build.0 = Release|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.Build.0 = Debug|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.ActiveCfg = Debug|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.Build.0 = Debug|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.ActiveCfg = Release|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.Build.0 = Release|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.ActiveCfg = Release|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.Build.0 = Release|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.ActiveCfg = Debug|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.Build.0 = Debug|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.ActiveCfg = Debug|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.Build.0 = Debug|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.ActiveCfg = Release|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.Build.0 = Release|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.ActiveCfg = Release|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.Build.0 = Release|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.ActiveCfg = Debug|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.Build.0 = Debug|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.ActiveCfg = Debug|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.Build.0 = Debug|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.ActiveCfg = Release|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.Build.0 = Release|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.ActiveCfg = Release|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.Build.0 = Release|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.ActiveCfg = Debug|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.Build.0 = Debug|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.ActiveCfg = Debug|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.Build.0 = Debug|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.ActiveCfg = Release|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.Build.0 = Release|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.ActiveCfg = Release|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.Build.0 = Release|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.Build.0 = Debug|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.ActiveCfg = Debug|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.Build.0 = Debug|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.ActiveCfg = Release|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.Build.0 = Release|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.ActiveCfg = Release|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.Build.0 = Release|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.ActiveCfg = Debug|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.Build.0 = Debug|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.ActiveCfg = Debug|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.Build.0 = Debug|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.ActiveCfg = Release|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.Build.0 = Release|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.ActiveCfg = Release|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.Build.0 = Release|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.Build.0 = Debug|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.ActiveCfg = Debug|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.Build.0 = Debug|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.ActiveCfg = Release|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.Build.0 = Release|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.ActiveCfg = Release|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.Build.0 = Release|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.ActiveCfg = Debug|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.Build.0 = Debug|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.ActiveCfg = Debug|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.Build.0 = Debug|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.ActiveCfg = Release|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.Build.0 = Release|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.ActiveCfg = Release|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.Build.0 = Release|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.ActiveCfg = Debug|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.Build.0 = Debug|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.ActiveCfg = Debug|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.Build.0 = Debug|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.ActiveCfg = Release|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.Build.0 = Release|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.ActiveCfg = Release|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.Build.0 = Release|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.Build.0 = Debug|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.ActiveCfg = Debug|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.Build.0 = Debug|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.ActiveCfg = Release|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.Build.0 = Release|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.ActiveCfg = Release|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.Build.0 = Release|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.ActiveCfg = Debug|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.Build.0 = Debug|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.ActiveCfg = Debug|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.Build.0 = Debug|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.ActiveCfg = Release|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.Build.0 = Release|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.ActiveCfg = Release|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.Build.0 = Release|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.Build.0 = Debug|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.ActiveCfg = Debug|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.Build.0 = Debug|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.ActiveCfg = Release|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.Build.0 = Release|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.ActiveCfg = Release|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.Build.0 = Release|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.Build.0 = Debug|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.ActiveCfg = Debug|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.Build.0 = Debug|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.ActiveCfg = Release|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.Build.0 = Release|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.ActiveCfg = Release|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.Build.0 = Release|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.ActiveCfg = Debug|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.Build.0 = Debug|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.ActiveCfg = Debug|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.Build.0 = Debug|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.ActiveCfg = Release|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.Build.0 = Release|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.ActiveCfg = Release|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.Build.0 = Release|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.Build.0 = Debug|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.ActiveCfg = Debug|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.Build.0 = Debug|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.ActiveCfg = Release|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.Build.0 = Release|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.ActiveCfg = Release|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.Build.0 = Release|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.Build.0 = Debug|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.ActiveCfg = Debug|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.Build.0 = Debug|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.ActiveCfg = Release|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.Build.0 = Release|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.ActiveCfg = Release|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.Build.0 = Release|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.ActiveCfg = Debug|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.Build.0 = Debug|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.ActiveCfg = Debug|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.Build.0 = Debug|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.ActiveCfg = Release|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.Build.0 = Release|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.ActiveCfg = Release|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.Build.0 = Release|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.Build.0 = Debug|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.ActiveCfg = Debug|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.Build.0 = Debug|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.ActiveCfg = Release|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.Build.0 = Release|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.ActiveCfg = Release|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.Build.0 = Release|x64 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.Build.0 = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.ActiveCfg = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.Build.0 = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.ActiveCfg = Release|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.Build.0 = Release|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.ActiveCfg = Release|x64 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.Build.0 = Release|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.ActiveCfg = Debug|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.Build.0 = Debug|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.ActiveCfg = Debug|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.Build.0 = Debug|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.ActiveCfg = Release|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.Build.0 = Release|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.ActiveCfg = Release|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.Build.0 = Release|x64 + {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.ActiveCfg = Debug|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.Build.0 = Debug|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Debug|x64.ActiveCfg = Debug|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.ActiveCfg = Release|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.Build.0 = Release|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Release|x64.ActiveCfg = Release|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.Build.0 = Debug|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.ActiveCfg = Debug|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.Build.0 = Debug|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.ActiveCfg = Release|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.Build.0 = Release|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.ActiveCfg = Release|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.Build.0 = Release|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.Build.0 = Debug|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.ActiveCfg = Debug|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.Build.0 = Debug|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.ActiveCfg = Release|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.Build.0 = Release|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.ActiveCfg = Release|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.Build.0 = Release|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.ActiveCfg = Debug|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.Build.0 = Debug|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.ActiveCfg = Debug|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.Build.0 = Debug|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.ActiveCfg = Release|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.Build.0 = Release|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.ActiveCfg = Release|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.Build.0 = Release|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.Build.0 = Debug|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.ActiveCfg = Debug|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.Build.0 = Debug|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.ActiveCfg = Release|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.Build.0 = Release|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.ActiveCfg = Release|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.Build.0 = Release|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.ActiveCfg = Debug|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.Build.0 = Debug|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.ActiveCfg = Debug|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.Build.0 = Debug|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.ActiveCfg = Release|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.Build.0 = Release|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.ActiveCfg = Release|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.Build.0 = Release|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.ActiveCfg = Debug|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.Build.0 = Debug|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.ActiveCfg = Debug|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.Build.0 = Debug|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.ActiveCfg = Release|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.Build.0 = Release|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.ActiveCfg = Release|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.Build.0 = Release|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.ActiveCfg = Debug|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.Build.0 = Debug|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.ActiveCfg = Debug|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.Build.0 = Debug|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.ActiveCfg = Release|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.Build.0 = Release|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.ActiveCfg = Release|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.Build.0 = Release|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.Build.0 = Debug|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.ActiveCfg = Debug|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.Build.0 = Debug|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.ActiveCfg = Release|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.Build.0 = Release|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.ActiveCfg = Release|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.Build.0 = Release|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.Build.0 = Debug|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.ActiveCfg = Debug|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.Build.0 = Debug|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.ActiveCfg = Release|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.Build.0 = Release|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.ActiveCfg = Release|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.Build.0 = Release|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.ActiveCfg = Debug|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.Build.0 = Debug|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.ActiveCfg = Debug|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.Build.0 = Debug|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.ActiveCfg = Release|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.Build.0 = Release|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.ActiveCfg = Release|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.Build.0 = Release|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.Build.0 = Debug|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.ActiveCfg = Debug|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.Build.0 = Debug|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.ActiveCfg = Release|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.Build.0 = Release|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.ActiveCfg = Release|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.Build.0 = Release|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.ActiveCfg = Debug|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.Build.0 = Debug|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.ActiveCfg = Debug|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.Build.0 = Debug|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.ActiveCfg = Release|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.Build.0 = Release|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.ActiveCfg = Release|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.Build.0 = Release|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.ActiveCfg = Debug|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.Build.0 = Debug|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.ActiveCfg = Debug|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.Build.0 = Debug|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.ActiveCfg = Release|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.Build.0 = Release|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.ActiveCfg = Release|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.Build.0 = Release|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.Build.0 = Debug|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.ActiveCfg = Debug|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.Build.0 = Debug|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.ActiveCfg = Release|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.Build.0 = Release|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.ActiveCfg = Release|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.Build.0 = Release|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.ActiveCfg = Debug|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.Build.0 = Debug|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.ActiveCfg = Debug|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.Build.0 = Debug|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.ActiveCfg = Release|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.Build.0 = Release|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.ActiveCfg = Release|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.Build.0 = Release|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.Build.0 = Debug|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.ActiveCfg = Debug|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.Build.0 = Debug|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.ActiveCfg = Release|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.Build.0 = Release|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.ActiveCfg = Release|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.Build.0 = Release|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.ActiveCfg = Debug|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.Build.0 = Debug|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.ActiveCfg = Debug|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.Build.0 = Debug|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.ActiveCfg = Release|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.Build.0 = Release|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.ActiveCfg = Release|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.Build.0 = Release|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.Build.0 = Debug|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.ActiveCfg = Debug|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.Build.0 = Debug|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.ActiveCfg = Release|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.Build.0 = Release|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.ActiveCfg = Release|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.Build.0 = Release|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.ActiveCfg = Debug|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.Build.0 = Debug|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.ActiveCfg = Debug|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.Build.0 = Debug|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.ActiveCfg = Release|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.Build.0 = Release|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.ActiveCfg = Release|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.Build.0 = Release|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.ActiveCfg = Debug|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.Build.0 = Debug|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.ActiveCfg = Debug|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.Build.0 = Debug|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.ActiveCfg = Release|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.Build.0 = Release|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.ActiveCfg = Release|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.Build.0 = Release|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.ActiveCfg = Debug|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.Build.0 = Debug|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.ActiveCfg = Debug|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.Build.0 = Debug|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.ActiveCfg = Release|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.Build.0 = Release|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.ActiveCfg = Release|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.Build.0 = Release|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.Build.0 = Debug|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.ActiveCfg = Debug|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.Build.0 = Debug|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.ActiveCfg = Release|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.Build.0 = Release|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.ActiveCfg = Release|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.Build.0 = Release|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.Build.0 = Debug|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.ActiveCfg = Debug|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.Build.0 = Debug|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.ActiveCfg = Release|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.Build.0 = Release|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.ActiveCfg = Release|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.Build.0 = Release|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.Build.0 = Debug|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.ActiveCfg = Debug|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.Build.0 = Debug|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.ActiveCfg = Release|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.Build.0 = Release|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.ActiveCfg = Release|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.Build.0 = Release|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.Build.0 = Debug|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.ActiveCfg = Debug|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.Build.0 = Debug|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.ActiveCfg = Release|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.Build.0 = Release|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.ActiveCfg = Release|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.Build.0 = Release|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.ActiveCfg = Debug|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.Build.0 = Debug|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.ActiveCfg = Debug|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.Build.0 = Debug|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.ActiveCfg = Release|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.Build.0 = Release|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.ActiveCfg = Release|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.Build.0 = Release|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.ActiveCfg = Debug|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.Build.0 = Debug|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.ActiveCfg = Debug|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.Build.0 = Debug|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.ActiveCfg = Release|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.Build.0 = Release|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.ActiveCfg = Release|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.Build.0 = Release|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.ActiveCfg = Debug|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.Build.0 = Debug|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.ActiveCfg = Debug|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.Build.0 = Debug|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.ActiveCfg = Release|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.Build.0 = Release|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.ActiveCfg = Release|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.Build.0 = Release|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.ActiveCfg = Debug|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.Build.0 = Debug|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.ActiveCfg = Debug|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.Build.0 = Debug|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.ActiveCfg = Release|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.Build.0 = Release|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.ActiveCfg = Release|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.Build.0 = Release|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.Build.0 = Debug|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.ActiveCfg = Debug|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.Build.0 = Debug|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.ActiveCfg = Release|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.Build.0 = Release|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.ActiveCfg = Release|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.Build.0 = Release|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.ActiveCfg = Debug|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.Build.0 = Debug|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.ActiveCfg = Debug|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.Build.0 = Debug|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.ActiveCfg = Release|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.Build.0 = Release|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.ActiveCfg = Release|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.Build.0 = Release|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.ActiveCfg = Debug|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.Build.0 = Debug|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.ActiveCfg = Debug|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.Build.0 = Debug|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.ActiveCfg = Release|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.Build.0 = Release|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.ActiveCfg = Release|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.Build.0 = Release|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.ActiveCfg = Debug|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.Build.0 = Debug|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.ActiveCfg = Debug|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.Build.0 = Debug|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.ActiveCfg = Release|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.Build.0 = Release|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.ActiveCfg = Release|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.Build.0 = Release|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.Build.0 = Debug|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.ActiveCfg = Debug|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.Build.0 = Debug|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.ActiveCfg = Release|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.Build.0 = Release|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.ActiveCfg = Release|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.Build.0 = Release|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.Build.0 = Debug|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.ActiveCfg = Debug|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.Build.0 = Debug|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.ActiveCfg = Release|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.Build.0 = Release|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.ActiveCfg = Release|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.Build.0 = Release|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.ActiveCfg = Debug|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.Build.0 = Debug|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.ActiveCfg = Debug|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.Build.0 = Debug|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.ActiveCfg = Release|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.Build.0 = Release|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.ActiveCfg = Release|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.Build.0 = Release|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.ActiveCfg = Debug|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.Build.0 = Debug|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.ActiveCfg = Debug|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.Build.0 = Debug|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.ActiveCfg = Release|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.Build.0 = Release|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.ActiveCfg = Release|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.Build.0 = Release|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.Build.0 = Debug|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.ActiveCfg = Debug|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.Build.0 = Debug|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.ActiveCfg = Release|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.Build.0 = Release|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.ActiveCfg = Release|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.Build.0 = Release|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.ActiveCfg = Debug|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.Build.0 = Debug|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.ActiveCfg = Debug|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.Build.0 = Debug|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.ActiveCfg = Release|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.Build.0 = Release|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.ActiveCfg = Release|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.Build.0 = Release|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.Build.0 = Debug|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.ActiveCfg = Debug|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.Build.0 = Debug|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.ActiveCfg = Release|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.Build.0 = Release|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.ActiveCfg = Release|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.Build.0 = Release|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.ActiveCfg = Debug|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.Build.0 = Debug|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.ActiveCfg = Debug|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.Build.0 = Debug|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.ActiveCfg = Release|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.Build.0 = Release|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.ActiveCfg = Release|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.Build.0 = Release|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.ActiveCfg = Debug|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.Build.0 = Debug|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.ActiveCfg = Debug|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.Build.0 = Debug|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.ActiveCfg = Release|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.Build.0 = Release|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.ActiveCfg = Release|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.Build.0 = Release|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.ActiveCfg = Debug|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.Build.0 = Debug|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.ActiveCfg = Debug|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.Build.0 = Debug|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.ActiveCfg = Release|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.Build.0 = Release|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.ActiveCfg = Release|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.Build.0 = Release|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.Build.0 = Debug|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.ActiveCfg = Debug|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.Build.0 = Debug|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.ActiveCfg = Release|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.Build.0 = Release|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.ActiveCfg = Release|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.Build.0 = Release|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.Build.0 = Debug|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.ActiveCfg = Debug|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.Build.0 = Debug|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.ActiveCfg = Release|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.Build.0 = Release|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.ActiveCfg = Release|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.Build.0 = Release|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.ActiveCfg = Debug|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.Build.0 = Debug|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.ActiveCfg = Debug|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.Build.0 = Debug|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.ActiveCfg = Release|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.Build.0 = Release|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.ActiveCfg = Release|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.Build.0 = Release|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.ActiveCfg = Debug|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.Build.0 = Debug|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.ActiveCfg = Debug|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.Build.0 = Debug|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.ActiveCfg = Release|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.Build.0 = Release|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.ActiveCfg = Release|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.Build.0 = Release|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.ActiveCfg = Debug|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.Build.0 = Debug|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.ActiveCfg = Debug|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.Build.0 = Debug|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.ActiveCfg = Release|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.Build.0 = Release|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.ActiveCfg = Release|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.Build.0 = Release|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.Build.0 = Debug|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.ActiveCfg = Debug|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.Build.0 = Debug|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.ActiveCfg = Release|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.Build.0 = Release|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.ActiveCfg = Release|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.Build.0 = Release|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.ActiveCfg = Debug|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.Build.0 = Debug|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.ActiveCfg = Debug|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.Build.0 = Debug|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.ActiveCfg = Release|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.Build.0 = Release|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.ActiveCfg = Release|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.Build.0 = Release|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.Build.0 = Debug|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.ActiveCfg = Debug|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.Build.0 = Debug|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.ActiveCfg = Release|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.Build.0 = Release|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.ActiveCfg = Release|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.Build.0 = Release|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.ActiveCfg = Debug|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.Build.0 = Debug|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.ActiveCfg = Debug|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.Build.0 = Debug|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.ActiveCfg = Release|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.Build.0 = Release|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.ActiveCfg = Release|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.Build.0 = Release|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.ActiveCfg = Debug|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.Build.0 = Debug|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.ActiveCfg = Debug|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.Build.0 = Debug|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.ActiveCfg = Release|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.Build.0 = Release|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.ActiveCfg = Release|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.Build.0 = Release|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.ActiveCfg = Debug|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.Build.0 = Debug|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.ActiveCfg = Debug|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.Build.0 = Debug|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.ActiveCfg = Release|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.Build.0 = Release|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.ActiveCfg = Release|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.Build.0 = Release|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.ActiveCfg = Debug|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.Build.0 = Debug|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.ActiveCfg = Debug|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.Build.0 = Debug|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.ActiveCfg = Release|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.Build.0 = Release|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.ActiveCfg = Release|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.Build.0 = Release|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.Build.0 = Debug|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.ActiveCfg = Debug|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.Build.0 = Debug|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.ActiveCfg = Release|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.Build.0 = Release|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.ActiveCfg = Release|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.Build.0 = Release|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.ActiveCfg = Debug|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.Build.0 = Debug|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.ActiveCfg = Debug|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.Build.0 = Debug|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.ActiveCfg = Release|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.Build.0 = Release|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.ActiveCfg = Release|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.Build.0 = Release|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.Build.0 = Debug|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.ActiveCfg = Debug|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.Build.0 = Debug|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.ActiveCfg = Release|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.Build.0 = Release|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.ActiveCfg = Release|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.Build.0 = Release|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.ActiveCfg = Debug|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.Build.0 = Debug|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.ActiveCfg = Debug|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.Build.0 = Debug|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.ActiveCfg = Release|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.Build.0 = Release|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.ActiveCfg = Release|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.Build.0 = Release|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.ActiveCfg = Debug|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.Build.0 = Debug|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.ActiveCfg = Debug|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.Build.0 = Debug|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.ActiveCfg = Release|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.Build.0 = Release|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.ActiveCfg = Release|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.Build.0 = Release|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.Build.0 = Debug|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.ActiveCfg = Debug|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.Build.0 = Debug|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.ActiveCfg = Release|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.Build.0 = Release|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.ActiveCfg = Release|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.Build.0 = Release|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.ActiveCfg = Debug|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.Build.0 = Debug|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.ActiveCfg = Debug|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.Build.0 = Debug|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.ActiveCfg = Release|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.Build.0 = Release|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.ActiveCfg = Release|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.Build.0 = Release|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.ActiveCfg = Debug|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.Build.0 = Debug|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.ActiveCfg = Debug|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.Build.0 = Debug|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.ActiveCfg = Release|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.Build.0 = Release|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.ActiveCfg = Release|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F9916510-9055-4C9F-997A-3755DEC1511B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {9299B507-1AF9-4C93-9560-5F637D1E0C9E} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {20D781FB-4A20-4B75-B863-304A47182966} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {B8928210-546C-4AE3-956B-E2B724E6B8E5} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {6DA1396F-2A44-4D5C-8442-012F71006217} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {3A12F777-56A8-42EC-BD17-8F325524241E} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {33276462-8313-4192-8306-13717ECCA60A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {3C42510C-A29E-4A53-899C-203BFA874E0B} = {F9C41695-3353-4564-A154-58106829B19C} + {987F026D-EB1F-4013-ADA8-2406ACCDA526} = {F9C41695-3353-4564-A154-58106829B19C} + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28} = {F9C41695-3353-4564-A154-58106829B19C} + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61} = {F9C41695-3353-4564-A154-58106829B19C} + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3} = {F9C41695-3353-4564-A154-58106829B19C} + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A} = {F9C41695-3353-4564-A154-58106829B19C} + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856} = {F9C41695-3353-4564-A154-58106829B19C} + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {B988F96C-F87A-484C-AB15-D0674B22F291} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {214F211F-1A2B-4F79-8993-B8DEE2EF7441} = {F9C41695-3353-4564-A154-58106829B19C} + {210DD88D-649B-4695-8C5F-898A4F60A8CE} = {F9C41695-3353-4564-A154-58106829B19C} + {E26D2311-C164-48CF-BA24-5CEDA873D1B2} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {DD76B998-ED0D-4BFD-9660-3ADC3A334872} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {27CA5499-B3F2-4FB6-8414-651819B0B96C} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5} = {F9C41695-3353-4564-A154-58106829B19C} + {4ADADECA-99D7-410D-8127-CB27210DCC6A} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {E37561EB-B9C5-4215-9FF9-DB559916FBA2} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {A9265E36-7F2D-440C-BF3E-F447FDB6200F} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {6A1969EA-9657-4828-93E0-8D21A970F868} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {07137F45-8B5F-4561-BEC8-B883E9123785} = {F9C41695-3353-4564-A154-58106829B19C} + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {ECE691D0-BFB3-483B-A699-084269EFCE89} = {F9C41695-3353-4564-A154-58106829B19C} + {0BB52326-02D5-4698-A180-24078DA5DA0E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {D9057E63-AAAA-4FE7-800A-20C02F4761F3} = {F9C41695-3353-4564-A154-58106829B19C} + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {40FE7861-E54E-4DA9-BE4D-A5178014E477} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {1423FC8F-AA52-4562-8275-4BF0838CA378} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {53F841E8-284F-4545-9176-B131896E43F8} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {4AC1E062-0236-4E49-AA04-F732043D2DCF} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {290C5ED4-71A7-4040-AD26-4820CF7A9E60} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {1C856B14-54CD-4D07-B18B-5F7DB073AB51} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {A5B558C6-C767-11E1-A335-F6EB6188709B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {6022990D-3FD5-46A9-8AB5-E444C51646F3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {A8F23706-E590-4A87-96CC-5F8E5082503F} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {DADAC956-3A54-440A-8B56-A07234DEE861} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {C14D6E0D-810E-4599-A6E0-17298AFA0501} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {E71C1722-A41D-4475-87F4-29961A3654BB} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {9C6040B8-1173-40FA-A3DB-DE044CCD8250} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {576EEEFD-E423-482B-879A-F0515D40B8E1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {A4855451-6447-437C-B024-B36C3C7901EA} = {F9C41695-3353-4564-A154-58106829B19C} + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {AE677E3A-DAC5-42FD-8762-47370C57639B} = {F9C41695-3353-4564-A154-58106829B19C} + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {6DE11A47-2268-4B08-8DE5-15A1705FCE28} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {C619A811-8023-4441-B3D7-785388A09DF0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE} = {F9C41695-3353-4564-A154-58106829B19C} + {155211F8-08E1-4864-A3B8-9F04F4270360} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {2E15C462-A150-4A37-ACD6-FBAECF1724F5} = {F9C41695-3353-4564-A154-58106829B19C} + {F5E3FAFE-B650-4736-8D27-FA53866668C6} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {01F9E227-06F5-4BED-907F-402CA7DFAFE6} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {A556E0B5-73A1-4676-BA1F-133820DE7D5A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {F29D0C8D-141A-43CF-86B2-34A04653F8D4} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {0E046380-14CA-4C23-A807-8C678519A605} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {3C83B0AB-9739-41C1-A127-ED7DB9551F76} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {475ED6ED-C311-4188-ACB2-1C41830B22EE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {BF6E1942-7E42-4564-9DF5-FD0A00D71173} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {BE22A21F-73B7-453F-86A0-B867F0056490} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {12BCA020-EABF-429E-876A-A476BC9C10C0} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {6124E997-426E-4A0B-9617-D6D577D5E7D7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {66A9BDEB-150F-45DC-B20F-9892C0B43834} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {BCFAB658-326E-466D-995B-E76636C1DEA4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {B4327D10-ACDC-4C12-9555-749DD49A7BB0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {27D41D81-991F-4DC6-8749-B0321C87E694} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {BD291BF0-D804-4818-8311-DE871E6BCEAA} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {045BAC91-34D1-4B43-B52B-566801BE7F85} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {E604CD58-4579-4F69-9D6A-2605FD7CF716} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {E876FE63-0701-4CDA-BED5-7C73A379C1D1} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {CE6A5A24-EA88-4E67-BDF2-22517528E43F} = {F9C41695-3353-4564-A154-58106829B19C} + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {A185B162-6CB6-4502-B03F-B56F7699A8D9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {A21C50CD-28A6-481A-A12B-47189FE66641} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {2115FEBC-1EC4-4F95-A058-A523ED5295A4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {7DC23E4E-2448-4811-AABD-F5D069F6E74A} = {F9C41695-3353-4564-A154-58106829B19C} + {B3494FED-FB8C-43F4-B341-F26A3460203B} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {EFB2355B-82B3-4759-B7D8-95F8E9506291} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {B3BC3949-6949-41DE-94BF-B112FBFB1A84} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {713067DF-65EE-480B-A000-B2A323495F16} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {620E0BE7-3763-4F35-9DBD-4770104E269C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {86033E58-A1E3-43AD-AE8E-305E15E72A91} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {A7FAD273-8C71-4D72-A84F-2D160F2DC589} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {A2E9DA24-95E4-4414-94AF-488A382E276A} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {6D19209B-ECE7-4B9C-941C-0AA2B484F199} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A} = {F9C41695-3353-4564-A154-58106829B19C} + {4D3554DE-6E14-4F94-A909-A4B19151A47E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {13E796AD-BEA4-4213-A1B8-E18E2397E544} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {29A0C2A8-07A4-4A8B-8BED-8F7D024013D6} + EndGlobalSection +EndGlobal diff --git a/bin16/mir_icons.sln b/bin16/mir_icons.sln index d9dd51bd23..9369ad9c06 100644 --- a/bin16/mir_icons.sln +++ b/bin16/mir_icons.sln @@ -1,330 +1,330 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.27004.2010 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toolbar_icons", "..\plugins\Clist_modern\icons_pack\Toolbar_icons.vcxproj", "{796B43EF-DACE-4145-8571-31886F45A2C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM_icons", "..\plugins\SecureIM\SecureIM_icons\secureim_icons.vcxproj", "{3FAB6AC7-6B7F-4779-B519-34E8035074A4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker_Flags", "..\plugins\SpellChecker\Flags\spellchecker_flags.vcxproj", "{3B8B2642-716E-437C-B341-279B08FDC2C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx_icons", "..\plugins\UserInfoEx\IconPacks\default\icons_default_16.vcxproj", "{AA542F66-FF66-498A-ADBE-0BB9103ECD0A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_IRC", "..\protocols\IRCG\proto_irc\Proto_IRC.vcxproj", "{DD667247-3712-4355-9774-7E6ACAF2275E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Jabber", "..\protocols\JabberG\proto_jabber\Proto_Jabber.vcxproj", "{1AA0A504-0644-4F00-A1AD-F55D69E50DD0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_GG", "..\protocols\Gadu-Gadu\proto_gg\Proto_GG.vcxproj", "{33912E32-3B68-4E2C-82AE-64C06EE987A7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Twitter", "..\protocols\Twitter\proto_twitter\Proto_Twitter.vcxproj", "{A82C682E-8596-4DCA-98A6-50436194714B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xStatus_Jabber", "..\protocols\JabberG\jabber_xstatus\xStatus_Jabber.vcxproj", "{6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryPP_icons", "..\plugins\HistoryPlusPlus\historypp_icons\HistoryPP_icons.vcxproj", "{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Omegle", "..\protocols\Omegle\proto_omegle\omegle_icons.vcxproj", "{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM_icons", "..\plugins\TabSRMM\TabSRMM_icons\NOVA\ICONS_NOVA_16.vcxproj", "{F553F140-B7D3-4984-90B1-00D4831B8A6E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_mRadio", "..\plugins\mRadio\proto_mradio\Proto_mRadio.vcxproj", "{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_NewsAggregator", "..\protocols\NewsAggregator\proto_newsaggregator\Proto_NewsAggregator.vcxproj", "{B97882DC-7462-41DB-A390-BDFCE5295265}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_CurrencyRates", "..\protocols\CurrencyRates\proto_CurrencyRates\proto_CurrencyRates.vcxproj", "{5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Weather", "..\protocols\Weather\proto_weather\proto_weather.vcxproj", "{B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_YAMN", "..\protocols\YAMN\proto_yamn\proto_YAMN.vcxproj", "{C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fp_icons", "..\plugins\FingerprintNG\iconpacks\fp_icons.vcxproj", "{7F854B13-37EA-4956-BAEE-9715AE9F4579}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_VKontakte", "..\protocols\VKontakte\proto_vkontakte\Proto_VKontakte.vcxproj", "{5F8495EF-0765-4E03-905D-639BDBF05B4F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Sametime", "..\protocols\Sametime\proto_sametime\Proto_Sametime.vcxproj", "{217C99B1-0D5E-4A85-A84F-836FCA167B25}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MetaContacts", "..\src\icons\proto_metacontacts\Proto_MetaContacts.vcxproj", "{793B6174-89B0-4682-A957-A32BE7F61502}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Dummy", "..\protocols\Dummy\proto_dummy\Proto_Dummy.vcxproj", "{018F801B-E80F-4E49-A640-E30BC445E74A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Steam", "..\protocols\Steam\proto_steam\Proto_Steam.vcxproj", "{523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Skype", "..\protocols\SkypeWeb\proto_skype\Proto_Skype.vcxproj", "{DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Tox", "..\protocols\Tox\proto_tox\Proto_Tox.vcxproj", "{129A4E61-E476-45E8-BD50-5E03BA80E9AD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MinecraftDynmap", "..\protocols\MinecraftDynmap\proto_minecraftdynmap\minecraftdynmap_icons.vcxproj", "{178045D7-C0F4-4931-9F40-AB1B2A175092}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_ICQ", "..\protocols\ICQ-WIM\proto_icq\Proto_ICQ.vcxproj", "{DB3B0449-E576-4BBB-8B08-AB9E914D39CA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MRA", "..\protocols\ICQ-WIM\proto_mra\Proto_MRA.vcxproj", "{38BF6F63-58E7-442D-A7E8-B4BD57D224E2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Facebook", "..\protocols\Facebook\proto_facebook\Proto_Facebook.vcxproj", "{44298314-7DD4-4EF7-B576-30E503257223}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_WhatsApp", "..\protocols\WhatsApp\proto_whatsapp\Proto_WhatsApp.vcxproj", "{64A2B403-90AF-4CF8-BC69-4E8D33872D64}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Telegram", "..\protocols\Telegram\proto_telegram\Proto_Telegram.vcxproj", "{129A4E61-45E8-E476-BD50-5E03BA80E9AD}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.Build.0 = Debug|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.ActiveCfg = Debug|x64 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.Build.0 = Debug|x64 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.ActiveCfg = Release|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.Build.0 = Release|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.ActiveCfg = Release|x64 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.Build.0 = Release|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.ActiveCfg = Debug|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.Build.0 = Debug|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.ActiveCfg = Debug|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.Build.0 = Debug|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.ActiveCfg = Release|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.Build.0 = Release|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.ActiveCfg = Release|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.Build.0 = Release|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.Build.0 = Debug|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.ActiveCfg = Debug|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.Build.0 = Debug|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.ActiveCfg = Release|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.Build.0 = Release|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.ActiveCfg = Release|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.Build.0 = Release|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.Build.0 = Debug|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.ActiveCfg = Debug|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.Build.0 = Debug|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.ActiveCfg = Release|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.Build.0 = Release|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.ActiveCfg = Release|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.Build.0 = Release|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.Build.0 = Debug|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.ActiveCfg = Debug|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.Build.0 = Debug|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.ActiveCfg = Release|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.Build.0 = Release|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.ActiveCfg = Release|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.Build.0 = Release|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.Build.0 = Debug|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.ActiveCfg = Debug|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.Build.0 = Debug|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.ActiveCfg = Release|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.Build.0 = Release|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.ActiveCfg = Release|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.Build.0 = Release|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.ActiveCfg = Debug|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.Build.0 = Debug|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.ActiveCfg = Debug|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.Build.0 = Debug|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.ActiveCfg = Release|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.Build.0 = Release|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.ActiveCfg = Release|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.Build.0 = Release|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.ActiveCfg = Debug|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.Build.0 = Debug|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.ActiveCfg = Debug|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.Build.0 = Debug|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.ActiveCfg = Release|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.Build.0 = Release|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.ActiveCfg = Release|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.Build.0 = Release|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.ActiveCfg = Debug|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.Build.0 = Debug|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.ActiveCfg = Debug|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.Build.0 = Debug|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.ActiveCfg = Release|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.Build.0 = Release|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.ActiveCfg = Release|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.Build.0 = Release|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.Build.0 = Debug|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.ActiveCfg = Debug|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.Build.0 = Debug|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.ActiveCfg = Release|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.Build.0 = Release|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.ActiveCfg = Release|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.Build.0 = Release|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.ActiveCfg = Debug|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.Build.0 = Debug|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.ActiveCfg = Debug|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.Build.0 = Debug|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.ActiveCfg = Release|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.Build.0 = Release|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.ActiveCfg = Release|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.Build.0 = Release|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.Build.0 = Debug|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.ActiveCfg = Debug|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.Build.0 = Debug|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.ActiveCfg = Release|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.Build.0 = Release|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.ActiveCfg = Release|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.Build.0 = Release|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.ActiveCfg = Debug|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.Build.0 = Debug|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.ActiveCfg = Debug|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.Build.0 = Debug|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.ActiveCfg = Release|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.Build.0 = Release|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.ActiveCfg = Release|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.Build.0 = Release|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.ActiveCfg = Debug|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.Build.0 = Debug|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.ActiveCfg = Debug|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.Build.0 = Debug|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.ActiveCfg = Release|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.Build.0 = Release|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.ActiveCfg = Release|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.Build.0 = Release|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.ActiveCfg = Debug|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.Build.0 = Debug|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.ActiveCfg = Debug|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.Build.0 = Debug|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.ActiveCfg = Release|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.Build.0 = Release|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.ActiveCfg = Release|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.Build.0 = Release|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.Build.0 = Debug|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.ActiveCfg = Debug|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.Build.0 = Debug|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.ActiveCfg = Release|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.Build.0 = Release|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.ActiveCfg = Release|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.Build.0 = Release|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.ActiveCfg = Debug|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.Build.0 = Debug|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.ActiveCfg = Debug|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.Build.0 = Debug|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.ActiveCfg = Release|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.Build.0 = Release|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.ActiveCfg = Release|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.Build.0 = Release|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.ActiveCfg = Debug|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.Build.0 = Debug|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.ActiveCfg = Debug|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.Build.0 = Debug|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.ActiveCfg = Release|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.Build.0 = Release|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.ActiveCfg = Release|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.Build.0 = Release|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.Build.0 = Debug|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.ActiveCfg = Debug|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.Build.0 = Debug|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.ActiveCfg = Release|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.Build.0 = Release|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.ActiveCfg = Release|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.Build.0 = Release|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.ActiveCfg = Debug|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.Build.0 = Debug|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.ActiveCfg = Debug|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.Build.0 = Debug|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.ActiveCfg = Release|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.Build.0 = Release|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.ActiveCfg = Release|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.Build.0 = Release|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.ActiveCfg = Debug|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.Build.0 = Debug|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.ActiveCfg = Debug|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.Build.0 = Debug|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.ActiveCfg = Release|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.Build.0 = Release|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.ActiveCfg = Release|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.Build.0 = Release|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.ActiveCfg = Debug|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.Build.0 = Debug|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.ActiveCfg = Debug|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.Build.0 = Debug|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.ActiveCfg = Release|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.Build.0 = Release|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.ActiveCfg = Release|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.Build.0 = Release|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.ActiveCfg = Debug|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.Build.0 = Debug|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.ActiveCfg = Debug|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.Build.0 = Debug|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.ActiveCfg = Release|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.Build.0 = Release|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.ActiveCfg = Release|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.Build.0 = Release|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.Build.0 = Debug|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.ActiveCfg = Debug|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.Build.0 = Debug|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.ActiveCfg = Release|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.Build.0 = Release|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.ActiveCfg = Release|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.Build.0 = Release|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.ActiveCfg = Debug|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.Build.0 = Debug|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.ActiveCfg = Debug|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.Build.0 = Debug|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.ActiveCfg = Release|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.Build.0 = Release|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.ActiveCfg = Release|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.Build.0 = Release|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.ActiveCfg = Debug|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.Build.0 = Debug|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.ActiveCfg = Debug|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.Build.0 = Debug|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.ActiveCfg = Release|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.Build.0 = Release|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.ActiveCfg = Release|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.Build.0 = Release|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.ActiveCfg = Debug|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.Build.0 = Debug|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.ActiveCfg = Debug|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.Build.0 = Debug|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.ActiveCfg = Release|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.Build.0 = Release|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.ActiveCfg = Release|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.Build.0 = Release|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.ActiveCfg = Debug|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.Build.0 = Debug|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.ActiveCfg = Debug|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.Build.0 = Debug|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.ActiveCfg = Release|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.Build.0 = Release|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.ActiveCfg = Release|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.Build.0 = Release|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.ActiveCfg = Debug|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.Build.0 = Debug|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.ActiveCfg = Debug|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.Build.0 = Debug|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.ActiveCfg = Release|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.Build.0 = Release|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.ActiveCfg = Release|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.Build.0 = Release|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F618F449-6B8C-43C9-9647-D7D53706723D} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.27004.2010 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toolbar_icons", "..\plugins\Clist_modern\icons_pack\Toolbar_icons.vcxproj", "{796B43EF-DACE-4145-8571-31886F45A2C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM_icons", "..\plugins\SecureIM\SecureIM_icons\secureim_icons.vcxproj", "{3FAB6AC7-6B7F-4779-B519-34E8035074A4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker_Flags", "..\plugins\SpellChecker\Flags\spellchecker_flags.vcxproj", "{3B8B2642-716E-437C-B341-279B08FDC2C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx_icons", "..\plugins\UserInfoEx\IconPacks\default\icons_default_16.vcxproj", "{AA542F66-FF66-498A-ADBE-0BB9103ECD0A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_IRC", "..\protocols\IRCG\proto_irc\Proto_IRC.vcxproj", "{DD667247-3712-4355-9774-7E6ACAF2275E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Jabber", "..\protocols\JabberG\proto_jabber\Proto_Jabber.vcxproj", "{1AA0A504-0644-4F00-A1AD-F55D69E50DD0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_GG", "..\protocols\Gadu-Gadu\proto_gg\Proto_GG.vcxproj", "{33912E32-3B68-4E2C-82AE-64C06EE987A7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Twitter", "..\protocols\Twitter\proto_twitter\Proto_Twitter.vcxproj", "{A82C682E-8596-4DCA-98A6-50436194714B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xStatus_Jabber", "..\protocols\JabberG\jabber_xstatus\xStatus_Jabber.vcxproj", "{6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryPP_icons", "..\plugins\HistoryPlusPlus\historypp_icons\HistoryPP_icons.vcxproj", "{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Omegle", "..\protocols\Omegle\proto_omegle\omegle_icons.vcxproj", "{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM_icons", "..\plugins\TabSRMM\TabSRMM_icons\NOVA\ICONS_NOVA_16.vcxproj", "{F553F140-B7D3-4984-90B1-00D4831B8A6E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_mRadio", "..\plugins\mRadio\proto_mradio\Proto_mRadio.vcxproj", "{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_NewsAggregator", "..\protocols\NewsAggregator\proto_newsaggregator\Proto_NewsAggregator.vcxproj", "{B97882DC-7462-41DB-A390-BDFCE5295265}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_CurrencyRates", "..\protocols\CurrencyRates\proto_CurrencyRates\proto_CurrencyRates.vcxproj", "{5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Weather", "..\protocols\Weather\proto_weather\proto_weather.vcxproj", "{B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_YAMN", "..\protocols\YAMN\proto_yamn\proto_YAMN.vcxproj", "{C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fp_icons", "..\plugins\FingerprintNG\iconpacks\fp_icons.vcxproj", "{7F854B13-37EA-4956-BAEE-9715AE9F4579}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_VKontakte", "..\protocols\VKontakte\proto_vkontakte\Proto_VKontakte.vcxproj", "{5F8495EF-0765-4E03-905D-639BDBF05B4F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Sametime", "..\protocols\Sametime\proto_sametime\Proto_Sametime.vcxproj", "{217C99B1-0D5E-4A85-A84F-836FCA167B25}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MetaContacts", "..\src\icons\proto_metacontacts\Proto_MetaContacts.vcxproj", "{793B6174-89B0-4682-A957-A32BE7F61502}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Dummy", "..\protocols\Dummy\proto_dummy\Proto_Dummy.vcxproj", "{018F801B-E80F-4E49-A640-E30BC445E74A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Steam", "..\protocols\Steam\proto_steam\Proto_Steam.vcxproj", "{523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Skype", "..\protocols\SkypeWeb\proto_skype\Proto_Skype.vcxproj", "{DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Tox", "..\protocols\Tox\proto_tox\Proto_Tox.vcxproj", "{129A4E61-E476-45E8-BD50-5E03BA80E9AD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MinecraftDynmap", "..\protocols\MinecraftDynmap\proto_minecraftdynmap\minecraftdynmap_icons.vcxproj", "{178045D7-C0F4-4931-9F40-AB1B2A175092}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_ICQ", "..\protocols\ICQ-WIM\proto_icq\Proto_ICQ.vcxproj", "{DB3B0449-E576-4BBB-8B08-AB9E914D39CA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MRA", "..\protocols\ICQ-WIM\proto_mra\Proto_MRA.vcxproj", "{38BF6F63-58E7-442D-A7E8-B4BD57D224E2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Facebook", "..\protocols\Facebook\proto_facebook\Proto_Facebook.vcxproj", "{44298314-7DD4-4EF7-B576-30E503257223}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_WhatsApp", "..\protocols\WhatsApp\proto_whatsapp\Proto_WhatsApp.vcxproj", "{64A2B403-90AF-4CF8-BC69-4E8D33872D64}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Telegram", "..\protocols\Telegram\proto_telegram\Proto_Telegram.vcxproj", "{129A4E61-45E8-E476-BD50-5E03BA80E9AD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.Build.0 = Debug|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.ActiveCfg = Debug|x64 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.Build.0 = Debug|x64 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.ActiveCfg = Release|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.Build.0 = Release|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.ActiveCfg = Release|x64 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.Build.0 = Release|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.Build.0 = Debug|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.ActiveCfg = Debug|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.Build.0 = Debug|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.ActiveCfg = Release|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.Build.0 = Release|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.ActiveCfg = Release|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.Build.0 = Release|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.Build.0 = Debug|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.ActiveCfg = Debug|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.Build.0 = Debug|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.ActiveCfg = Release|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.Build.0 = Release|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.ActiveCfg = Release|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.Build.0 = Release|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.Build.0 = Debug|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.ActiveCfg = Debug|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.Build.0 = Debug|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.ActiveCfg = Release|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.Build.0 = Release|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.ActiveCfg = Release|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.Build.0 = Release|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.Build.0 = Debug|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.ActiveCfg = Debug|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.Build.0 = Debug|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.ActiveCfg = Release|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.Build.0 = Release|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.ActiveCfg = Release|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.Build.0 = Release|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.Build.0 = Debug|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.ActiveCfg = Debug|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.Build.0 = Debug|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.ActiveCfg = Release|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.Build.0 = Release|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.ActiveCfg = Release|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.Build.0 = Release|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.ActiveCfg = Debug|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.Build.0 = Debug|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.ActiveCfg = Debug|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.Build.0 = Debug|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.ActiveCfg = Release|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.Build.0 = Release|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.ActiveCfg = Release|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.Build.0 = Release|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.ActiveCfg = Debug|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.Build.0 = Debug|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.ActiveCfg = Debug|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.Build.0 = Debug|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.ActiveCfg = Release|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.Build.0 = Release|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.ActiveCfg = Release|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.Build.0 = Release|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.Build.0 = Debug|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.ActiveCfg = Debug|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.Build.0 = Debug|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.ActiveCfg = Release|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.Build.0 = Release|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.ActiveCfg = Release|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.Build.0 = Release|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.ActiveCfg = Debug|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.Build.0 = Debug|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.ActiveCfg = Debug|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.Build.0 = Debug|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.ActiveCfg = Release|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.Build.0 = Release|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.ActiveCfg = Release|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.Build.0 = Release|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.ActiveCfg = Debug|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.Build.0 = Debug|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.ActiveCfg = Debug|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.Build.0 = Debug|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.ActiveCfg = Release|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.Build.0 = Release|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.ActiveCfg = Release|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.Build.0 = Release|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.Build.0 = Debug|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.ActiveCfg = Debug|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.Build.0 = Debug|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.ActiveCfg = Release|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.Build.0 = Release|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.ActiveCfg = Release|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.Build.0 = Release|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.Build.0 = Debug|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.ActiveCfg = Debug|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.Build.0 = Debug|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.ActiveCfg = Release|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.Build.0 = Release|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.ActiveCfg = Release|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.Build.0 = Release|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.ActiveCfg = Debug|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.Build.0 = Debug|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.ActiveCfg = Debug|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.Build.0 = Debug|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.ActiveCfg = Release|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.Build.0 = Release|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.ActiveCfg = Release|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.Build.0 = Release|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.Build.0 = Debug|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.ActiveCfg = Debug|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.Build.0 = Debug|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.ActiveCfg = Release|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.Build.0 = Release|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.ActiveCfg = Release|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.Build.0 = Release|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.ActiveCfg = Debug|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.Build.0 = Debug|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.ActiveCfg = Debug|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.Build.0 = Debug|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.ActiveCfg = Release|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.Build.0 = Release|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.ActiveCfg = Release|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.Build.0 = Release|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.Build.0 = Debug|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.ActiveCfg = Debug|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.Build.0 = Debug|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.ActiveCfg = Release|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.Build.0 = Release|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.ActiveCfg = Release|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.Build.0 = Release|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.ActiveCfg = Debug|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.Build.0 = Debug|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.ActiveCfg = Debug|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.Build.0 = Debug|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.ActiveCfg = Release|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.Build.0 = Release|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.ActiveCfg = Release|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.Build.0 = Release|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.Build.0 = Debug|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.ActiveCfg = Debug|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.Build.0 = Debug|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.ActiveCfg = Release|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.Build.0 = Release|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.ActiveCfg = Release|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.Build.0 = Release|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.ActiveCfg = Debug|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.Build.0 = Debug|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.ActiveCfg = Debug|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.Build.0 = Debug|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.ActiveCfg = Release|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.Build.0 = Release|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.ActiveCfg = Release|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.Build.0 = Release|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.ActiveCfg = Debug|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.Build.0 = Debug|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.ActiveCfg = Debug|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.Build.0 = Debug|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.ActiveCfg = Release|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.Build.0 = Release|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.ActiveCfg = Release|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.Build.0 = Release|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.ActiveCfg = Debug|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.Build.0 = Debug|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.ActiveCfg = Debug|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.Build.0 = Debug|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.ActiveCfg = Release|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.Build.0 = Release|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.ActiveCfg = Release|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.Build.0 = Release|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.ActiveCfg = Debug|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.Build.0 = Debug|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.ActiveCfg = Debug|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.Build.0 = Debug|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.ActiveCfg = Release|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.Build.0 = Release|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.ActiveCfg = Release|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.Build.0 = Release|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.Build.0 = Debug|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.ActiveCfg = Debug|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.Build.0 = Debug|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.ActiveCfg = Release|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.Build.0 = Release|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.ActiveCfg = Release|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.Build.0 = Release|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.ActiveCfg = Debug|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.Build.0 = Debug|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.ActiveCfg = Debug|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.Build.0 = Debug|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.ActiveCfg = Release|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.Build.0 = Release|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.ActiveCfg = Release|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.Build.0 = Release|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.ActiveCfg = Debug|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.Build.0 = Debug|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.ActiveCfg = Debug|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.Build.0 = Debug|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.ActiveCfg = Release|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.Build.0 = Release|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.ActiveCfg = Release|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.Build.0 = Release|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.ActiveCfg = Debug|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.Build.0 = Debug|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.ActiveCfg = Debug|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.Build.0 = Debug|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.ActiveCfg = Release|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.Build.0 = Release|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.ActiveCfg = Release|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.Build.0 = Release|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.ActiveCfg = Debug|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.Build.0 = Debug|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.ActiveCfg = Debug|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.Build.0 = Debug|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.ActiveCfg = Release|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.Build.0 = Release|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.ActiveCfg = Release|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.Build.0 = Release|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.ActiveCfg = Debug|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.Build.0 = Debug|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.ActiveCfg = Debug|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.Build.0 = Debug|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.ActiveCfg = Release|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.Build.0 = Release|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.ActiveCfg = Release|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.Build.0 = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F618F449-6B8C-43C9-9647-D7D53706723D} + EndGlobalSection +EndGlobal diff --git a/bin16/tdlib.sln b/bin16/tdlib.sln index 4adc488264..344626e747 100644 --- a/bin16/tdlib.sln +++ b/bin16/tdlib.sln @@ -1,81 +1,81 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 16 -VisualStudioVersion = 16.0.33026.149 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdactor", "..\protocols\Telegram\tdlib\tdactor.vcxproj", "{85F63934-02FE-332A-8703-059040B65512}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdcore", "..\protocols\Telegram\tdlib\tdcore.vcxproj", "{FC88FB5A-AAED-3F3E-9959-236444D8F644}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tddb", "..\protocols\Telegram\tdlib\tddb.vcxproj", "{F525EE11-8820-3D8A-87A5-465D50A98A64}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdlib", "..\protocols\Telegram\tdlib\tdlib.vcxproj", "{800E305A-3704-4617-ADA0-DEE8EAFDB804}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdnet", "..\protocols\Telegram\tdlib\tdnet.vcxproj", "{2246C3CF-7888-3102-984A-80214ADF418C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdutils", "..\protocols\Telegram\tdlib\tdutils.vcxproj", "{D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.ActiveCfg = Debug|x64 - {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.Build.0 = Debug|x64 - {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.ActiveCfg = Debug|Win32 - {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.Build.0 = Debug|Win32 - {85F63934-02FE-332A-8703-059040B65512}.Release|x64.ActiveCfg = Release|x64 - {85F63934-02FE-332A-8703-059040B65512}.Release|x64.Build.0 = Release|x64 - {85F63934-02FE-332A-8703-059040B65512}.Release|x86.ActiveCfg = Release|Win32 - {85F63934-02FE-332A-8703-059040B65512}.Release|x86.Build.0 = Release|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.ActiveCfg = Debug|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.Build.0 = Debug|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.ActiveCfg = Debug|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.Build.0 = Debug|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.ActiveCfg = Release|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.Build.0 = Release|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.ActiveCfg = Release|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.Build.0 = Release|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.ActiveCfg = Debug|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.Build.0 = Debug|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.ActiveCfg = Debug|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.Build.0 = Debug|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.ActiveCfg = Release|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.Build.0 = Release|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.ActiveCfg = Release|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.Build.0 = Release|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.ActiveCfg = Debug|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.Build.0 = Debug|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.ActiveCfg = Debug|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.Build.0 = Debug|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.ActiveCfg = Release|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.Build.0 = Release|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.ActiveCfg = Release|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.Build.0 = Release|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.ActiveCfg = Debug|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.Build.0 = Debug|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.ActiveCfg = Debug|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.Build.0 = Debug|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.ActiveCfg = Release|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.Build.0 = Release|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.ActiveCfg = Release|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.Build.0 = Release|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.ActiveCfg = Debug|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.Build.0 = Debug|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.ActiveCfg = Debug|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.Build.0 = Debug|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.ActiveCfg = Release|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.Build.0 = Release|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.ActiveCfg = Release|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8F24FFFB-D787-4C9B-A473-3B5904646619} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 16 +VisualStudioVersion = 16.0.33026.149 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdactor", "..\protocols\Telegram\tdlib\tdactor.vcxproj", "{85F63934-02FE-332A-8703-059040B65512}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdcore", "..\protocols\Telegram\tdlib\tdcore.vcxproj", "{FC88FB5A-AAED-3F3E-9959-236444D8F644}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tddb", "..\protocols\Telegram\tdlib\tddb.vcxproj", "{F525EE11-8820-3D8A-87A5-465D50A98A64}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdlib", "..\protocols\Telegram\tdlib\tdlib.vcxproj", "{800E305A-3704-4617-ADA0-DEE8EAFDB804}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdnet", "..\protocols\Telegram\tdlib\tdnet.vcxproj", "{2246C3CF-7888-3102-984A-80214ADF418C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdutils", "..\protocols\Telegram\tdlib\tdutils.vcxproj", "{D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.ActiveCfg = Debug|x64 + {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.Build.0 = Debug|x64 + {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.ActiveCfg = Debug|Win32 + {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.Build.0 = Debug|Win32 + {85F63934-02FE-332A-8703-059040B65512}.Release|x64.ActiveCfg = Release|x64 + {85F63934-02FE-332A-8703-059040B65512}.Release|x64.Build.0 = Release|x64 + {85F63934-02FE-332A-8703-059040B65512}.Release|x86.ActiveCfg = Release|Win32 + {85F63934-02FE-332A-8703-059040B65512}.Release|x86.Build.0 = Release|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.ActiveCfg = Debug|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.Build.0 = Debug|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.ActiveCfg = Debug|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.Build.0 = Debug|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.ActiveCfg = Release|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.Build.0 = Release|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.ActiveCfg = Release|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.Build.0 = Release|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.ActiveCfg = Debug|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.Build.0 = Debug|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.ActiveCfg = Debug|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.Build.0 = Debug|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.ActiveCfg = Release|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.Build.0 = Release|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.ActiveCfg = Release|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.Build.0 = Release|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.ActiveCfg = Debug|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.Build.0 = Debug|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.ActiveCfg = Debug|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.Build.0 = Debug|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.ActiveCfg = Release|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.Build.0 = Release|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.ActiveCfg = Release|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.Build.0 = Release|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.ActiveCfg = Debug|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.Build.0 = Debug|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.ActiveCfg = Debug|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.Build.0 = Debug|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.ActiveCfg = Release|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.Build.0 = Release|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.ActiveCfg = Release|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.Build.0 = Release|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.ActiveCfg = Debug|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.Build.0 = Debug|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.ActiveCfg = Debug|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.Build.0 = Debug|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.ActiveCfg = Release|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.Build.0 = Release|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.ActiveCfg = Release|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8F24FFFB-D787-4C9B-A473-3B5904646619} + EndGlobalSection +EndGlobal diff --git a/bin17/mir_full.sln b/bin17/mir_full.sln index d85033c3a9..0408be3ee4 100644 --- a/bin17/mir_full.sln +++ b/bin17/mir_full.sln @@ -1,2178 +1,2178 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.32112.339 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Miranda", "..\src\miranda32\miranda32.vcxproj", "{F9916510-9055-4C9F-997A-3755DEC1511B}" - ProjectSection(ProjectDependencies) = postProject - {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {538E451F-E667-4D07-BCE6-976ECC7BB8D1} - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_core", "..\src\mir_core\mir_core.vcxproj", "{D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_app", "..\src\mir_app\mir_app.vcxproj", "{538E451F-E667-4D07-BCE6-976ECC7BB8D1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjson", "..\libs\libjson\libjson.vcxproj", "{F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AVS", "..\plugins\AVS\avs.vcxproj", "{7711F563-6473-4ABD-B5E3-477CE8384AD6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zlib", "..\libs\zlib\zlib.vcxproj", "{E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Import", "..\plugins\Import\import.vcxproj", "{9299B507-1AF9-4C93-9560-5F637D1E0C9E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mmap", "..\plugins\Db3x_mmap\db3x_mmap.vcxproj", "{20D781FB-4A20-4B75-B863-304A47182966}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scriver", "..\plugins\Scriver\scriver.vcxproj", "{B8928210-546C-4AE3-956B-E2B724E6B8E5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM", "..\plugins\TabSRMM\tabsrmm.vcxproj", "{99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GG", "..\protocols\Gadu-Gadu\gadugadu.vcxproj", "{6DA1396F-2A44-4D5C-8442-012F71006217}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IRC", "..\protocols\IRCG\IRC.vcxproj", "{3A12F777-56A8-42EC-BD17-8F325524241E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Jabber", "..\protocols\JabberG\jabber.vcxproj", "{33276462-8313-4192-8306-13717ECCA60A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_nicer", "..\plugins\Clist_nicer\clist_nicer.vcxproj", "{3C42510C-A29E-4A53-899C-203BFA874E0B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cln_skinedit", "..\plugins\Cln_skinedit\skinedit.vcxproj", "{987F026D-EB1F-4013-ADA8-2406ACCDA526}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\AuthState\authstate.vcxproj", "{DB315D7D-00BB-43B2-93A6-0430CA2B9F28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "..\plugins\Console\Console.vcxproj", "{A231E008-2D1A-4F24-95DD-59F56F85A499}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Contacts", "..\plugins\ContactsPlus\contacts.vcxproj", "{F4F2FD25-1553-FB72-F695-0701D20C3168}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Flags", "..\plugins\CountryFlags\flags.vcxproj", "{B4361FA0-4073-4B60-EE72-F5C08E6EDF61}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSList", "..\plugins\CSList\cslist.vcxproj", "{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Db_autobackups", "..\plugins\Db_autobackups\db_autobackups.vcxproj", "{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FavContacts", "..\plugins\FavContacts\favcontacts.vcxproj", "{2D0B4CB0-3ACA-4612-B745-FF3050E1500A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FltContacts", "..\plugins\FloatingContacts\FltCont.vcxproj", "{9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folders", "..\plugins\Folders\folders.vcxproj", "{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LinkList", "..\plugins\HistoryLinkListPlus\linklist.vcxproj", "{850EC838-0EAD-45EB-6F1B-16DC90DCE18D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistorySweeperLight", "..\plugins\HistorySweeperLight\historysweeperlight.vcxproj", "{9DE1F0B0-B9D1-4681-82E7-13CC3E047445}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEView", "..\plugins\IEView\ieview.vcxproj", "{B988F96C-F87A-484C-AB15-D0674B22F291}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IgnoreState", "..\plugins\IgnoreState\ignore.vcxproj", "{214F211F-1A2B-4F79-8993-B8DEE2EF7441}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MenuEx", "..\plugins\MenuItemEx\menuex.vcxproj", "{210DD88D-649B-4695-8C5F-898A4F60A8CE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libTextControl", "..\libs\mTextControl\mtextcontrol.vcxproj", "{E26D2311-C164-48CF-BA24-5CEDA873D1B2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewXstatusNotify", "..\plugins\NewXstatusNotify\NewXstatusNotify.vcxproj", "{D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Nudge", "..\plugins\Nudge\nudge.vcxproj", "{8190CFAA-3B73-43D8-9101-8368E21F1864}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PopupPlus", "..\plugins\Popup\Popup.vcxproj", "{726460C7-E1F1-4C37-B64F-DA8A8DD26D70}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickMessages", "..\plugins\QuickMessages\quickmessages.vcxproj", "{DD76B998-ED0D-4BFD-9660-3ADC3A334872}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickReplies", "..\plugins\QuickReplies\quickreplies.vcxproj", "{27CA5499-B3F2-4FB6-8414-651819B0B96C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Rate", "..\plugins\Rate\rate.vcxproj", "{C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM", "..\plugins\SecureIM\secureim_17.vcxproj", "{4ADADECA-99D7-410D-8127-CB27210DCC6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SeenPlugin", "..\plugins\SeenPlugin\seenplugin.vcxproj", "{EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sessions", "..\plugins\Sessions\Sessions.vcxproj", "{37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleAR", "..\plugins\SimpleAR\SimpleAR.vcxproj", "{06C44834-7B7A-4074-A6D8-7F163B3FF707}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SmileyAdd", "..\plugins\SmileyAdd\SmileyAdd.vcxproj", "{5BBA7E51-B494-4462-BC4F-1AE5F57F9857}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SplashScreen", "..\plugins\SplashScreen\splashscreen.vcxproj", "{5A6095F4-B037-4DA8-8410-8004A90C961A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpam", "..\plugins\StopSpamPlus\stopspam.vcxproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tipper", "..\plugins\TipperYM\tipper_ym.vcxproj", "{2C818919-A38F-44FF-BD91-A6A204AC592A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TooltipNotify", "..\plugins\TooltipNotify\ttnotify.vcxproj", "{1948EAEA-4C25-4F6B-AD9E-5891F656EADA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TranslitSwitcher", "..\plugins\TranslitSwitcher\TranslitSwitcher.vcxproj", "{82F96271-4136-4B0E-AB6F-040DE7A4DD1E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserGuide", "..\plugins\UserGuide\UserGuide.vcxproj", "{92E3BDEE-DD17-4619-AD61-70C0ADE04217}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx", "..\plugins\UserInfoEx\UInfoEx.vcxproj", "{AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Variables", "..\plugins\Variables\Variables.vcxproj", "{3038EF69-85BE-4D92-9864-CD6A5EBB558A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhenWasIt", "..\plugins\WhenWasIt\WhenWasIt.vcxproj", "{63E05ECA-0A63-479E-86BD-2CAF53869BDA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker", "..\plugins\SpellChecker\spellchecker.vcxproj", "{5DB86086-10E9-42E7-AC90-503D2678C2A2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Alarms", "..\plugins\Alarms\alarms.vcxproj", "{5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroNotify", "..\plugins\ZeroNotification\Zero Notification.vcxproj", "{E37561EB-B9C5-4215-9FF9-DB559916FBA2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardNotify", "..\plugins\KeyboardNotify\KeyboardNotify.vcxproj", "{A9265E36-7F2D-440C-BF3E-F447FDB6200F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AddContactPlus", "..\plugins\AddContactPlus\addcontactplus.vcxproj", "{253ADD1D-F7C9-4643-A957-51BFCD61A5D2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleStatusMsg", "..\plugins\SimpleStatusMsg\simplestatusmsg.vcxproj", "{D3D80E27-D099-41EC-AFB2-A891A33F1608}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClientChangeNotify", "..\plugins\ClientChangeNotify\ClientChangeNotify.vcxproj", "{6A1969EA-9657-4828-93E0-8D21A970F868}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ListeningTo", "..\plugins\ListeningTo\listeningto.vcxproj", "{5FAA475D-0593-454F-8601-0D7150DCA4A0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Omegle", "..\protocols\Omegle\omegle.vcxproj", "{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugins\RecentContacts\RecentContacts.vcxproj", "{07137F45-8B5F-4561-BEC8-B883E9123785}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EkHtml", "..\plugins\MirOTR\ekhtml\ekhtml_17.vcxproj", "{2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Libgcrypt", "..\plugins\MirOTR\Libgcrypt\Libgcrypt_17.vcxproj", "{40FE7861-E54E-4DA9-BE4D-A5178014E477}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libotr", "..\plugins\MirOTR\libotr\libotr_17.vcxproj", "{1423FC8F-AA52-4562-8275-4BF0838CA378}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirOTR", "..\plugins\MirOTR\MirOTR_17.vcxproj", "{53F841E8-284F-4545-9176-B131896E43F8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewEventNotify", "..\plugins\NewEventNotify\neweventnotify.vcxproj", "{2E0A2793-94C3-82E7-2AB0-FD421816CFBF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhoUsesMyFiles", "..\plugins\WhoUsesMyFiles\wumf.vcxproj", "{F29CCB9B-79CF-4341-AA05-3626A036D3E3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CryptoPP", "..\plugins\CryptoPP\cryptopp_17.vcxproj", "{4AC1E062-0236-4E49-AA04-F732043D2DCF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cryptlib", "..\plugins\CryptoPP\crypto\cryptlib_17.vcxproj", "{290C5ED4-71A7-4040-AD26-4820CF7A9E60}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserInfo", "..\src\core\stduserinfo\stduserinfo.vcxproj", "{1C856B14-54CD-4D07-B18B-5F7DB073AB51}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdEmail", "..\src\core\stdemail\stdemail.vcxproj", "{A5B558C6-C767-11E1-A335-F6EB6188709B}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdFile", "..\src\core\stdfile\stdfile.vcxproj", "{6022990D-3FD5-46A9-8AB5-E444C51646F3}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAutoAway", "..\src\core\stdautoaway\stdautoaway.vcxproj", "{A8F23706-E590-4A87-96CC-5F8E5082503F}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUIHist", "..\src\core\stduihist\stduihist.vcxproj", "{DADAC956-3A54-440A-8B56-A07234DEE861}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserOnline", "..\src\core\stduseronline\stduseronline.vcxproj", "{D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAway", "..\src\core\stdaway\stdaway.vcxproj", "{C14D6E0D-810E-4599-A6E0-17298AFA0501}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdClist", "..\src\core\stdclist\stdclist.vcxproj", "{E71C1722-A41D-4475-87F4-29961A3654BB}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdMsg", "..\src\core\stdmsg\stdmsg.vcxproj", "{F47EAB99-C78F-4A92-87D5-B0E16FE5A133}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdCrypt", "..\src\core\stdcrypt\stdcrypt.vcxproj", "{8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}" - ProjectSection(ProjectDependencies) = postProject - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmdLine", "..\plugins\CmdLine\CmdLine.vcxproj", "{73BA9CA5-640D-4F30-A157-A73557A25F98}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MimCmd", "..\plugins\MimCmd\MimCmd.vcxproj", "{1E3BB48A-FFBC-4A03-8C43-9124A484BE51}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTPFile", "..\plugins\FTPFileYM\ftpfile.vcxproj", "{73482497-9F57-4819-A9AB-5D841A9F072D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PasteIt", "..\plugins\PasteIt\PasteIt.vcxproj", "{BAEBC482-CDA9-4053-A7D0-08222E85118E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendScreenshotPlus\SendSS.vcxproj", "{CEAD8BCF-1F22-4E00-9F6D-E33405B00552}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenFolder", "..\plugins\OpenFolder\openFolder.vcxproj", "{8D233B9A-2744-4B62-94FC-7872FDDA4683}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyDetails", "..\plugins\MyDetails\mydetails.vcxproj", "{A4855451-6447-437C-B024-B36C3C7901EA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Msg_Export", "..\plugins\Msg_Export\msg_export.vcxproj", "{4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpamMod", "..\plugins\StopSpamMod\stopspam_mod.vcxproj", "{0FF6989B-880A-4C3F-B69D-AFF93296044D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Watrack_MPD", "..\plugins\watrack_mpd\watrack_mpd.vcxproj", "{A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginUpdater", "..\plugins\PluginUpdater\PluginUpdater.vcxproj", "{21F6C0E4-DD1A-49E6-82FD-64574BB902BD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PManagerEx", "..\plugins\ProfileManager\pmanagerEx.vcxproj", "{728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Restart", "..\plugins\Restart\Restart.vcxproj", "{18195F68-A747-8643-050C-C5101DA658FD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrafficCounter", "..\plugins\TrafficCounter\TrafficCounter.vcxproj", "{885010EA-D008-4E38-85D4-487693F0BA00}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackUpdater", "..\plugins\PackUpdater\PackUpdater.vcxproj", "{20413125-4D68-4751-8062-DDA026DDABF1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickContacts", "..\plugins\QuickContacts\quickcontacts.vcxproj", "{7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MobileState", "..\plugins\MobileState\mobilestate.vcxproj", "{AE677E3A-DAC5-42FD-8762-47370C57639B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NoHistory", "..\plugins\NoHistory\NoHistory.vcxproj", "{ABF05E2C-C335-4BD1-8C3E-4C63285362CF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YAMN", "..\protocols\YAMN\YAMN.vcxproj", "{C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewsAggregator", "..\protocols\NewsAggregator\NewsAggregator.vcxproj", "{6DE11A47-2268-4B08-8DE5-15A1705FCE28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CurrencyRates", "..\protocols\CurrencyRates\Forex.vcxproj", "{C619A811-8023-4441-B3D7-785388A09DF0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Weather", "..\protocols\Weather\weather.vcxproj", "{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ping", "..\plugins\Ping\ping.vcxproj", "{F31BD1B6-EE9D-4F76-A047-F8AEADC26086}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fingerprint", "..\plugins\FingerprintNG\fingerprint_ng.vcxproj", "{AF7D71D4-19B7-42B8-91DD-701F155AC4AE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssocMgr", "..\plugins\AssocMgr\assocmgr.vcxproj", "{B57D997C-73E1-D5F7-ECCA-C204345C04A3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoRun", "..\plugins\AutoRun\autorun.vcxproj", "{00037ACC-F32D-4B5F-93A8-3CF0E277E377}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoShutdown", "..\plugins\AutoShutdown\shutdown.vcxproj", "{3F8EF54D-0593-4048-B0E5-C938F99B29F3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AvatarHistory", "..\plugins\AvatarHistory\AvatarHistory.vcxproj", "{9D702039-F4A9-4978-92B3-3615E5C44BEE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicHistory", "..\plugins\BasicHistory\BasicHistory.vcxproj", "{155211F8-08E1-4864-A3B8-9F04F4270360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BASS_interface", "..\plugins\BASS_interface\Bass_interface.vcxproj", "{3933E789-D185-41DC-8169-9FF4365B6015}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_blind", "..\plugins\Clist_blind\Clist_blind.vcxproj", "{2E15C462-A150-4A37-ACD6-FBAECF1724F5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartPosition", "..\plugins\StartPosition\StartPosition.vcxproj", "{046C5F80-ABE5-488F-BFC8-B024D4AACC8C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HTTPServer", "..\plugins\HTTPServer\HTTPServer_17.vcxproj", "{F7A70398-AFA0-4A58-B645-85268F9517DE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pu_stub", "..\plugins\PluginUpdater\pu_stub\pu_stub.vcxproj", "{121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotifyAnything", "..\plugins\NotifyAnything\NotifyAnything.vcxproj", "{F5E3FAFE-B650-4736-8D27-FA53866668C6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "..\libs\libcurl\libcurl.vcxproj", "{01F9E227-06F5-4BED-907F-402CA7DFAFE6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusChange", "..\plugins\StatusChange\StatusChange.vcxproj", "{D09881C7-E189-49AD-919E-F64355F8EFD0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyPounce", "..\plugins\BuddyPounce\buddypounce.vcxproj", "{FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MsgPopup", "..\plugins\MsgPopup\MsgPopup.vcxproj", "{1E702CF1-E52F-49F8-915A-FCBBCE554774}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NimContact", "..\protocols\Non-IM Contact\nimcontact.vcxproj", "{A556E0B5-73A1-4676-BA1F-133820DE7D5A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XSoundNotify", "..\plugins\XSoundNotify\XSoundNotify.vcxproj", "{5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YARelay", "..\plugins\YARelay\YARelay.vcxproj", "{AA5CA2D0-F096-4001-B1B6-439C7FC11E77}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeStatusChange", "..\plugins\SkypeStatusChange\SkypeStatusChange.vcxproj", "{10F78F26-2B20-4158-869F-CB29533B4C2C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wbOSD", "..\plugins\wbOSD\wbOSD.vcxproj", "{DA450122-7F0B-45DA-9EAA-421887AD8450}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "New_GPG", "..\plugins\New_GPG\new_gpg.vcxproj", "{F29D0C8D-141A-43CF-86B2-34A04653F8D4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spamotron", "..\plugins\Spamotron\Spamotron.vcxproj", "{DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LotusNotify", "..\protocols\LotusNotify\LotusNotify.vcxproj", "{0E046380-14CA-4C23-A807-8C678519A605}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConnectionNotify", "..\protocols\ConnectionNotify\ConnectionNotify.vcxproj", "{3C83B0AB-9739-41C1-A127-ED7DB9551F76}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Exchange", "..\plugins\Exchange\Exchange.vcxproj", "{F462FDA1-BDCD-49B2-B996-D7DE71D07393}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebView", "..\protocols\WebView\webview.vcxproj", "{475ED6ED-C311-4188-ACB2-1C41830B22EE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShlExt", "..\plugins\ShellExt\shellext.vcxproj", "{B27B85B5-0EF1-496D-99D7-0702A98A342A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinterSpeak", "..\plugins\WinterSpeak\WinterSpeak.vcxproj", "{A44F96D0-A850-4A67-9570-0E9298A16E40}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKontakte", "..\protocols\VKontakte\vk.vcxproj", "{BF6E1942-7E42-4564-9DF5-FD0A00D71173}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartupSilence", "..\plugins\StartupSilence\StartupSilence.vcxproj", "{7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirandaG15", "..\plugins\MirandaG15\MirandaG15.vcxproj", "{8ACA3C8B-BDFA-47B2-8578-069555BA05B3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RemovePersonalSettings", "..\plugins\RemovePersonalSettings\rps.vcxproj", "{0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewAwaySys", "..\plugins\NewAwaySysMod\NewAwaySys.vcxproj", "{6A516E27-AC50-5374-756B-A1558DB2EFA9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryStats", "..\plugins\HistoryStats\historystats.vcxproj", "{B5BCDC2F-81FC-4324-90C6-E5540A225EFF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sametime", "..\protocols\Sametime\sametime.vcxproj", "{BE22A21F-73B7-453F-86A0-B867F0056490}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glib", "..\protocols\Sametime\src\glib\glib_17.vcxproj", "{12BCA020-EABF-429E-876A-A476BC9C10C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GmailNotifier", "..\protocols\GmailNotifier\GmailNotifier.vcxproj", "{EDAAD28B-505B-4969-A8BB-97EAE818DEEA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Pcre16", "..\libs\Pcre16\pcre16.vcxproj", "{6124E997-426E-4A0B-9617-D6D577D5E7D7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEHistory", "..\plugins\IEHistory\IEHistory.vcxproj", "{7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dummy", "..\protocols\Dummy\dummy.vcxproj", "{D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Steam", "..\protocols\Steam\Steam.vcxproj", "{8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HwHotKeys", "..\plugins\HwHotKeys\HwHotKeys.vcxproj", "{639E2B3A-64F2-4152-B5BB-12468E5D60B6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeWeb", "..\protocols\SkypeWeb\SkypeWeb.vcxproj", "{66A9BDEB-150F-45DC-B20F-9892C0B43834}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tox", "..\protocols\Tox\Tox.vcxproj", "{BCFAB658-326E-466D-995B-E76636C1DEA4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinecraftDynmap", "..\protocols\MinecraftDynmap\MinecraftDynmap.vcxproj", "{B4327D10-ACDC-4C12-9555-749DD49A7BB0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroSwitch", "..\plugins\ZeroSwitch\ZeroSwitch.vcxproj", "{D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MessageState", "..\plugins\MessageState\MessageState.vcxproj", "{D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirLua", "..\plugins\MirLua\MirLua.vcxproj", "{27D41D81-991F-4DC6-8749-B0321C87E694}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toaster", "..\plugins\Toaster\Toaster.vcxproj", "{1FDBD8F0-3929-41BC-92D1-020779460769}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\libs\liblua\liblua.vcxproj", "{BD291BF0-D804-4818-8311-DE871E6BCEAA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winapi", "..\plugins\MirLua\Modules\WinAPI\WinAPI.vcxproj", "{045BAC91-34D1-4B43-B52B-566801BE7F85}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hunspell", "..\libs\hunspell\hunspell.vcxproj", "{B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_popup", "..\plugins\MirLua\Modules\m_popup\m_popup.vcxproj", "{D5C9CA74-4E25-478A-B890-75EB13E6DB1C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_variables", "..\plugins\MirLua\Modules\m_variables\m_variables.vcxproj", "{E604CD58-4579-4F69-9D6A-2605FD7CF716}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusManager", "..\plugins\StatusManager\StatusManager.vcxproj", "{D2EF305F-5255-49E8-A738-D4206D62D2B8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CloudFile", "..\protocols\CloudFile\CloudFile.vcxproj", "{E876FE63-0701-4CDA-BED5-7C73A379C1D1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_schedule", "..\plugins\MirLua\Modules\m_schedule\m_schedule.vcxproj", "{FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_toptoolbar", "..\plugins\MirLua\Modules\m_toptoolbar\m_toptoolbar.vcxproj", "{277E433F-7D71-4247-8AAA-CC5FB1AA7A67}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsSingleWindow", "..\plugins\AsSingleWindow\AsSingleWindow.vcxproj", "{CE6A5A24-EA88-4E67-BDF2-22517528E43F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "..\libs\sqlite3\sqlite3.vcxproj", "{0C02E395-E73F-47E3-8B95-B7924C0C7A6A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsodium", "..\libs\libsodium\libsodium.vcxproj", "{A185B162-6CB6-4502-B03F-B56F7699A8D9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtox", "..\protocols\Tox\libtox\libtox.vcxproj", "{A21C50CD-28A6-481A-A12B-47189FE66641}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileAsMessage", "..\plugins\FileAsMessage\fileecho.vcxproj", "{D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EmLanProto", "..\protocols\EmLanProto\emlanproto.vcxproj", "{2115FEBC-1EC4-4F95-A058-A523ED5295A4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mdbx", "..\plugins\Dbx_mdbx\dbx_mdbx.vcxproj", "{E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQCorp", "..\protocols\ICQCorp\ICQCorp.vcxproj", "{AD0D0500-CE7D-417D-9C36-3620D56CA6D4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeImage", "..\libs\freeimage\freeimage.vcxproj", "{5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MagneticWindows", "..\plugins\MagneticWindows\MagneticWindows.vcxproj", "{7DC23E4E-2448-4811-AABD-F5D069F6E74A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Protocols", "Protocols", "{A035B524-0F2D-45D0-BCF2-3C20279C77E2}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{E7FB43FB-3563-4568-8846-A88FC37449BF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{37EDFBEA-8446-4BF3-9F2E-655908CDFB62}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua", "Lua", "{329B4E94-C846-4C78-AFD5-8B6B839DCCE1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{F13387B0-1C74-48EC-9AEC-65E3B9DE29E4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Message edtors", "Message edtors", "{D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Contact lists", "Contact lists", "{F9C41695-3353-4564-A154-58106829B19C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Encryption", "Encryption", "{30218E20-9E62-4027-BB87-2627B17F6CA3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notifications", "Notifications", "{703CFA44-C8E8-4547-B597-AE239F4F6DD9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProxySwitch", "..\plugins\ProxySwitch\ProxySwitch.vcxproj", "{7446276D-5845-4258-A245-83D1D4D3CEC3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_sqlite", "..\plugins\Dbx_sqlite\dbx_sqlite.vcxproj", "{B3494FED-FB8C-43F4-B341-F26A3460203B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQ", "..\protocols\ICQ-WIM\ICQ-WIM.vcxproj", "{EFB2355B-82B3-4759-B7D8-95F8E9506291}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh2", "..\libs\libssh2\libssh2.vcxproj", "{B3BC3949-6949-41DE-94BF-B112FBFB1A84}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdPopup", "..\src\core\stdpopup\stdpopup.vcxproj", "{713067DF-65EE-480B-A000-B2A323495F16}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotesReminders", "..\plugins\NotesAndReminders\NotesReminders.vcxproj", "{EEB57129-946C-4B98-8856-FDA501AE2A5E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsignal", "..\libs\libsignal\libsignal.vcxproj", "{620E0BE7-3763-4F35-9DBD-4770104E269C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Facebook", "..\protocols\Facebook\facebook.vcxproj", "{86033E58-A1E3-43AD-AE8E-305E15E72A91}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewStory", "..\plugins\NewStory\NewStory.vcxproj", "{A7FAD273-8C71-4D72-A84F-2D160F2DC589}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbChecker", "..\plugins\DbChecker\dbchecker.vcxproj", "{A2E9DA24-95E4-4414-94AF-488A382E276A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickSearch", "..\plugins\QuickSearch\quicksearch.vcxproj", "{3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmdbx", "..\libs\libmdbx\libmdbx.vcxproj", "{6D19209B-ECE7-4B9C-941C-0AA2B484F199}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirFox", "..\plugins\MirFox\MirFoxNG_17.vcxproj", "{3E9DA555-4C7B-463C-AD5C-214073DE29D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads", "..\libs\pthreads\pthreads.vcxproj", "{E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoiceService", "..\plugins\VoiceService\VoiceService.vcxproj", "{48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libqrencode", "..\libs\libqrencode\libqrencode.vcxproj", "{4D3554DE-6E14-4F94-A909-A4B19151A47E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhatsApp", "..\protocols\WhatsApp\WhatsApp.vcxproj", "{13E796AD-BEA4-4213-A1B8-E18E2397E544}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Telegram", "..\protocols\Telegram\Telegram.vcxproj", "{AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.ActiveCfg = Debug|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.Build.0 = Debug|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.ActiveCfg = Debug|x64 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.Build.0 = Debug|x64 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.ActiveCfg = Release|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.Build.0 = Release|Win32 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.ActiveCfg = Release|x64 - {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.Build.0 = Release|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.ActiveCfg = Debug|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.Build.0 = Debug|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.ActiveCfg = Debug|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.Build.0 = Debug|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.ActiveCfg = Release|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.Build.0 = Release|Win32 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.ActiveCfg = Release|x64 - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.Build.0 = Release|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.ActiveCfg = Debug|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.Build.0 = Debug|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.ActiveCfg = Debug|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.Build.0 = Debug|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.ActiveCfg = Release|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.Build.0 = Release|Win32 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.ActiveCfg = Release|x64 - {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.Build.0 = Release|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.ActiveCfg = Debug|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.Build.0 = Debug|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.ActiveCfg = Debug|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.Build.0 = Debug|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.ActiveCfg = Release|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.Build.0 = Release|Win32 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.ActiveCfg = Release|x64 - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.Build.0 = Release|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.ActiveCfg = Debug|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.Build.0 = Debug|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.ActiveCfg = Debug|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.Build.0 = Debug|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.ActiveCfg = Release|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.Build.0 = Release|Win32 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.ActiveCfg = Release|x64 - {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.Build.0 = Release|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.ActiveCfg = Debug|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.Build.0 = Debug|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.ActiveCfg = Debug|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.Build.0 = Debug|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.ActiveCfg = Release|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.Build.0 = Release|Win32 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.ActiveCfg = Release|x64 - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.Build.0 = Release|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.ActiveCfg = Debug|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.Build.0 = Debug|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.ActiveCfg = Debug|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.Build.0 = Debug|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.ActiveCfg = Release|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.Build.0 = Release|Win32 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.ActiveCfg = Release|x64 - {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.Build.0 = Release|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.ActiveCfg = Debug|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.Build.0 = Debug|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.ActiveCfg = Debug|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.Build.0 = Debug|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.ActiveCfg = Release|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.Build.0 = Release|Win32 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.ActiveCfg = Release|x64 - {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.Build.0 = Release|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.ActiveCfg = Debug|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.Build.0 = Debug|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.ActiveCfg = Debug|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.Build.0 = Debug|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.ActiveCfg = Release|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.Build.0 = Release|Win32 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.ActiveCfg = Release|x64 - {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.Build.0 = Release|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.ActiveCfg = Debug|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.Build.0 = Debug|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.ActiveCfg = Debug|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.Build.0 = Debug|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.ActiveCfg = Release|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.Build.0 = Release|Win32 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.ActiveCfg = Release|x64 - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.Build.0 = Release|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.Build.0 = Debug|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.ActiveCfg = Debug|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.Build.0 = Debug|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.ActiveCfg = Release|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.Build.0 = Release|Win32 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.ActiveCfg = Release|x64 - {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.Build.0 = Release|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.ActiveCfg = Debug|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.Build.0 = Debug|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.ActiveCfg = Debug|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.Build.0 = Debug|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.ActiveCfg = Release|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.Build.0 = Release|Win32 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.ActiveCfg = Release|x64 - {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.Build.0 = Release|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.ActiveCfg = Debug|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.Build.0 = Debug|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.ActiveCfg = Debug|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.Build.0 = Debug|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.ActiveCfg = Release|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.Build.0 = Release|Win32 - {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.ActiveCfg = Release|x64 - {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.Build.0 = Release|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.Build.0 = Debug|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.ActiveCfg = Debug|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.Build.0 = Debug|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.ActiveCfg = Release|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.Build.0 = Release|Win32 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.ActiveCfg = Release|x64 - {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.Build.0 = Release|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.ActiveCfg = Debug|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.Build.0 = Debug|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.ActiveCfg = Debug|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.Build.0 = Debug|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.ActiveCfg = Release|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.Build.0 = Release|Win32 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.ActiveCfg = Release|x64 - {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.Build.0 = Release|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.ActiveCfg = Debug|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.Build.0 = Debug|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.ActiveCfg = Debug|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.Build.0 = Debug|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.ActiveCfg = Release|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.Build.0 = Release|Win32 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.ActiveCfg = Release|x64 - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.Build.0 = Release|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.ActiveCfg = Debug|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.Build.0 = Debug|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.ActiveCfg = Debug|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.Build.0 = Debug|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.ActiveCfg = Release|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.Build.0 = Release|Win32 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.ActiveCfg = Release|x64 - {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.Build.0 = Release|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.ActiveCfg = Debug|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.Build.0 = Debug|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.ActiveCfg = Debug|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.Build.0 = Debug|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.ActiveCfg = Release|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.Build.0 = Release|Win32 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.ActiveCfg = Release|x64 - {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.Build.0 = Release|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.ActiveCfg = Debug|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.Build.0 = Debug|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.ActiveCfg = Debug|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.Build.0 = Debug|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.ActiveCfg = Release|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.Build.0 = Release|Win32 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.ActiveCfg = Release|x64 - {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.Build.0 = Release|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.ActiveCfg = Debug|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.Build.0 = Debug|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.ActiveCfg = Debug|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.Build.0 = Debug|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.ActiveCfg = Release|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.Build.0 = Release|Win32 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.ActiveCfg = Release|x64 - {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.Build.0 = Release|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.ActiveCfg = Debug|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.Build.0 = Debug|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.ActiveCfg = Debug|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.Build.0 = Debug|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.ActiveCfg = Release|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.Build.0 = Release|Win32 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.ActiveCfg = Release|x64 - {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.Build.0 = Release|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.ActiveCfg = Debug|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.Build.0 = Debug|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.ActiveCfg = Debug|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.Build.0 = Debug|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.ActiveCfg = Release|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.Build.0 = Release|Win32 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.ActiveCfg = Release|x64 - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.Build.0 = Release|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.ActiveCfg = Debug|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.Build.0 = Debug|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.ActiveCfg = Debug|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.Build.0 = Debug|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.ActiveCfg = Release|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.Build.0 = Release|Win32 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.ActiveCfg = Release|x64 - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.Build.0 = Release|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.ActiveCfg = Debug|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.Build.0 = Debug|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.ActiveCfg = Debug|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.Build.0 = Debug|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.ActiveCfg = Release|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.Build.0 = Release|Win32 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.ActiveCfg = Release|x64 - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.Build.0 = Release|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.Build.0 = Debug|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.ActiveCfg = Debug|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.Build.0 = Debug|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.ActiveCfg = Release|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.Build.0 = Release|Win32 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.ActiveCfg = Release|x64 - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.Build.0 = Release|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.ActiveCfg = Debug|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.Build.0 = Debug|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.ActiveCfg = Debug|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.Build.0 = Debug|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.ActiveCfg = Release|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.Build.0 = Release|Win32 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.ActiveCfg = Release|x64 - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.Build.0 = Release|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.Build.0 = Debug|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.ActiveCfg = Debug|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.Build.0 = Debug|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.ActiveCfg = Release|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.Build.0 = Release|Win32 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.ActiveCfg = Release|x64 - {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.Build.0 = Release|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.ActiveCfg = Debug|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.Build.0 = Debug|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.ActiveCfg = Debug|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.Build.0 = Debug|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.ActiveCfg = Release|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.Build.0 = Release|Win32 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.ActiveCfg = Release|x64 - {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.Build.0 = Release|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.ActiveCfg = Debug|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.Build.0 = Debug|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.ActiveCfg = Debug|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.Build.0 = Debug|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.ActiveCfg = Release|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.Build.0 = Release|Win32 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.ActiveCfg = Release|x64 - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.Build.0 = Release|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.ActiveCfg = Debug|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.Build.0 = Debug|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.ActiveCfg = Debug|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.Build.0 = Debug|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.ActiveCfg = Release|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.Build.0 = Release|Win32 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.ActiveCfg = Release|x64 - {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.Build.0 = Release|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.ActiveCfg = Debug|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.Build.0 = Debug|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.ActiveCfg = Debug|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.Build.0 = Debug|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.ActiveCfg = Release|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.Build.0 = Release|Win32 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.ActiveCfg = Release|x64 - {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.Build.0 = Release|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.Build.0 = Debug|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.ActiveCfg = Debug|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.Build.0 = Debug|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.ActiveCfg = Release|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.Build.0 = Release|Win32 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.ActiveCfg = Release|x64 - {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.Build.0 = Release|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.Build.0 = Debug|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.ActiveCfg = Debug|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.Build.0 = Debug|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.ActiveCfg = Release|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.Build.0 = Release|Win32 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.ActiveCfg = Release|x64 - {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.Build.0 = Release|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.ActiveCfg = Debug|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.Build.0 = Debug|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.ActiveCfg = Debug|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.Build.0 = Debug|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.ActiveCfg = Release|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.Build.0 = Release|Win32 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.ActiveCfg = Release|x64 - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.Build.0 = Release|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.ActiveCfg = Debug|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.Build.0 = Debug|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.ActiveCfg = Debug|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.Build.0 = Debug|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.ActiveCfg = Release|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.Build.0 = Release|Win32 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.ActiveCfg = Release|x64 - {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.Build.0 = Release|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.ActiveCfg = Debug|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.Build.0 = Debug|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.ActiveCfg = Debug|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.Build.0 = Debug|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.ActiveCfg = Release|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.Build.0 = Release|Win32 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.ActiveCfg = Release|x64 - {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.Build.0 = Release|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.Build.0 = Debug|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.ActiveCfg = Debug|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.Build.0 = Debug|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.ActiveCfg = Release|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.Build.0 = Release|Win32 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.ActiveCfg = Release|x64 - {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.Build.0 = Release|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.ActiveCfg = Debug|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.Build.0 = Debug|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.ActiveCfg = Debug|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.Build.0 = Debug|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.ActiveCfg = Release|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.Build.0 = Release|Win32 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.ActiveCfg = Release|x64 - {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.Build.0 = Release|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.ActiveCfg = Debug|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.Build.0 = Debug|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.ActiveCfg = Debug|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.Build.0 = Debug|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.ActiveCfg = Release|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.Build.0 = Release|Win32 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.ActiveCfg = Release|x64 - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.Build.0 = Release|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.Build.0 = Debug|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.ActiveCfg = Debug|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.Build.0 = Debug|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.ActiveCfg = Release|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.Build.0 = Release|Win32 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.ActiveCfg = Release|x64 - {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.Build.0 = Release|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.ActiveCfg = Debug|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.Build.0 = Debug|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.ActiveCfg = Debug|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.Build.0 = Debug|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.ActiveCfg = Release|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.Build.0 = Release|Win32 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.ActiveCfg = Release|x64 - {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.Build.0 = Release|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.ActiveCfg = Debug|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.Build.0 = Debug|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.ActiveCfg = Debug|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.Build.0 = Debug|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.ActiveCfg = Release|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.Build.0 = Release|Win32 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.ActiveCfg = Release|x64 - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.Build.0 = Release|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.ActiveCfg = Debug|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.Build.0 = Debug|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.ActiveCfg = Debug|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.Build.0 = Debug|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.ActiveCfg = Release|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.Build.0 = Release|Win32 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.ActiveCfg = Release|x64 - {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.Build.0 = Release|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.ActiveCfg = Debug|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.Build.0 = Debug|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.ActiveCfg = Debug|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.Build.0 = Debug|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.ActiveCfg = Release|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.Build.0 = Release|Win32 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.ActiveCfg = Release|x64 - {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.Build.0 = Release|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.ActiveCfg = Debug|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.Build.0 = Debug|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.ActiveCfg = Debug|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.Build.0 = Debug|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.ActiveCfg = Release|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.Build.0 = Release|Win32 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.ActiveCfg = Release|x64 - {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.Build.0 = Release|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.ActiveCfg = Debug|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.Build.0 = Debug|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.ActiveCfg = Release|x64 - {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.Build.0 = Release|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.Build.0 = Debug|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.ActiveCfg = Debug|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.Build.0 = Debug|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.ActiveCfg = Release|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.Build.0 = Release|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.ActiveCfg = Release|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.Build.0 = Release|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.ActiveCfg = Debug|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.Build.0 = Debug|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.ActiveCfg = Debug|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.Build.0 = Debug|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.ActiveCfg = Release|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.Build.0 = Release|Win32 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.ActiveCfg = Release|x64 - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.Build.0 = Release|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.ActiveCfg = Debug|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.Build.0 = Debug|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.ActiveCfg = Debug|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.Build.0 = Debug|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.ActiveCfg = Release|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.Build.0 = Release|Win32 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.ActiveCfg = Release|x64 - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.Build.0 = Release|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.ActiveCfg = Debug|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.Build.0 = Debug|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.ActiveCfg = Debug|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.Build.0 = Debug|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.ActiveCfg = Release|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.Build.0 = Release|Win32 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.ActiveCfg = Release|x64 - {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.Build.0 = Release|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.Build.0 = Debug|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.ActiveCfg = Debug|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.Build.0 = Debug|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.ActiveCfg = Release|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.Build.0 = Release|Win32 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.ActiveCfg = Release|x64 - {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.Build.0 = Release|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.ActiveCfg = Debug|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.Build.0 = Debug|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.ActiveCfg = Debug|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.Build.0 = Debug|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.ActiveCfg = Release|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.Build.0 = Release|Win32 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.ActiveCfg = Release|x64 - {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.Build.0 = Release|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.ActiveCfg = Debug|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.Build.0 = Debug|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.ActiveCfg = Debug|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.Build.0 = Debug|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.ActiveCfg = Release|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.Build.0 = Release|Win32 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.ActiveCfg = Release|x64 - {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.Build.0 = Release|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.ActiveCfg = Debug|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.Build.0 = Debug|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.ActiveCfg = Debug|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.Build.0 = Debug|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.ActiveCfg = Release|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.Build.0 = Release|Win32 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.ActiveCfg = Release|x64 - {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.Build.0 = Release|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.Build.0 = Debug|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.ActiveCfg = Debug|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.Build.0 = Debug|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.ActiveCfg = Release|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.Build.0 = Release|Win32 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.ActiveCfg = Release|x64 - {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.Build.0 = Release|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.Build.0 = Debug|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.ActiveCfg = Debug|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.Build.0 = Debug|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.ActiveCfg = Release|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.Build.0 = Release|Win32 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.ActiveCfg = Release|x64 - {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.Build.0 = Release|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.ActiveCfg = Debug|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.Build.0 = Debug|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.ActiveCfg = Debug|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.Build.0 = Debug|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.ActiveCfg = Release|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.Build.0 = Release|Win32 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.ActiveCfg = Release|x64 - {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.Build.0 = Release|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.ActiveCfg = Debug|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.Build.0 = Debug|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.ActiveCfg = Debug|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.Build.0 = Debug|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.ActiveCfg = Release|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.Build.0 = Release|Win32 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.ActiveCfg = Release|x64 - {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.Build.0 = Release|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.ActiveCfg = Debug|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.Build.0 = Debug|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.ActiveCfg = Debug|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.Build.0 = Debug|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.ActiveCfg = Release|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.Build.0 = Release|Win32 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.ActiveCfg = Release|x64 - {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.Build.0 = Release|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.ActiveCfg = Debug|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.Build.0 = Debug|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.ActiveCfg = Debug|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.Build.0 = Debug|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.ActiveCfg = Release|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.Build.0 = Release|Win32 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.ActiveCfg = Release|x64 - {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.Build.0 = Release|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.Build.0 = Debug|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.ActiveCfg = Debug|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.Build.0 = Debug|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.ActiveCfg = Release|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.Build.0 = Release|Win32 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.ActiveCfg = Release|x64 - {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.Build.0 = Release|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.Build.0 = Debug|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.ActiveCfg = Debug|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.Build.0 = Debug|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.ActiveCfg = Release|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.Build.0 = Release|Win32 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.ActiveCfg = Release|x64 - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.Build.0 = Release|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.ActiveCfg = Debug|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.Build.0 = Debug|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.ActiveCfg = Debug|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.Build.0 = Debug|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.ActiveCfg = Release|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.Build.0 = Release|Win32 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.ActiveCfg = Release|x64 - {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.Build.0 = Release|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.ActiveCfg = Debug|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.Build.0 = Debug|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.ActiveCfg = Debug|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.Build.0 = Debug|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.ActiveCfg = Release|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.Build.0 = Release|Win32 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.ActiveCfg = Release|x64 - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.Build.0 = Release|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.Build.0 = Debug|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.ActiveCfg = Debug|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.Build.0 = Debug|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.ActiveCfg = Release|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.Build.0 = Release|Win32 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.ActiveCfg = Release|x64 - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.Build.0 = Release|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.Build.0 = Debug|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.ActiveCfg = Debug|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.Build.0 = Debug|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.ActiveCfg = Release|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.Build.0 = Release|Win32 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.ActiveCfg = Release|x64 - {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.Build.0 = Release|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.ActiveCfg = Debug|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.Build.0 = Debug|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.ActiveCfg = Debug|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.Build.0 = Debug|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.ActiveCfg = Release|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.Build.0 = Release|Win32 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.ActiveCfg = Release|x64 - {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.Build.0 = Release|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.Build.0 = Debug|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.ActiveCfg = Debug|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.Build.0 = Debug|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.ActiveCfg = Release|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.Build.0 = Release|Win32 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.ActiveCfg = Release|x64 - {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.Build.0 = Release|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.Build.0 = Debug|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.ActiveCfg = Debug|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.Build.0 = Debug|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.ActiveCfg = Release|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.Build.0 = Release|Win32 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.ActiveCfg = Release|x64 - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.Build.0 = Release|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.ActiveCfg = Debug|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.Build.0 = Debug|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.ActiveCfg = Debug|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.Build.0 = Debug|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.ActiveCfg = Release|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.Build.0 = Release|Win32 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.ActiveCfg = Release|x64 - {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.Build.0 = Release|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.ActiveCfg = Debug|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.Build.0 = Debug|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.ActiveCfg = Debug|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.Build.0 = Debug|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.ActiveCfg = Release|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.Build.0 = Release|Win32 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.ActiveCfg = Release|x64 - {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.Build.0 = Release|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.ActiveCfg = Debug|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.Build.0 = Debug|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.ActiveCfg = Debug|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.Build.0 = Debug|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.ActiveCfg = Release|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.Build.0 = Release|Win32 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.ActiveCfg = Release|x64 - {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.Build.0 = Release|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.ActiveCfg = Debug|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.Build.0 = Debug|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.ActiveCfg = Debug|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.Build.0 = Debug|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.ActiveCfg = Release|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.Build.0 = Release|Win32 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.ActiveCfg = Release|x64 - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.Build.0 = Release|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.ActiveCfg = Debug|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.Build.0 = Debug|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.ActiveCfg = Debug|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.Build.0 = Debug|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.ActiveCfg = Release|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.Build.0 = Release|Win32 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.ActiveCfg = Release|x64 - {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.Build.0 = Release|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.ActiveCfg = Debug|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.Build.0 = Debug|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.ActiveCfg = Debug|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.Build.0 = Debug|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.ActiveCfg = Release|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.Build.0 = Release|Win32 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.ActiveCfg = Release|x64 - {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.Build.0 = Release|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.ActiveCfg = Debug|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.Build.0 = Debug|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.ActiveCfg = Debug|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.Build.0 = Debug|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.ActiveCfg = Release|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.Build.0 = Release|Win32 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.ActiveCfg = Release|x64 - {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.Build.0 = Release|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.ActiveCfg = Debug|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.Build.0 = Debug|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.ActiveCfg = Debug|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.Build.0 = Debug|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.ActiveCfg = Release|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.Build.0 = Release|Win32 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.ActiveCfg = Release|x64 - {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.Build.0 = Release|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.ActiveCfg = Debug|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.Build.0 = Debug|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.ActiveCfg = Debug|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.Build.0 = Debug|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.ActiveCfg = Release|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.Build.0 = Release|Win32 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.ActiveCfg = Release|x64 - {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.Build.0 = Release|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.Build.0 = Debug|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.ActiveCfg = Debug|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.Build.0 = Debug|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.ActiveCfg = Release|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.Build.0 = Release|Win32 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.ActiveCfg = Release|x64 - {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.Build.0 = Release|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.ActiveCfg = Debug|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.Build.0 = Debug|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.ActiveCfg = Debug|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.Build.0 = Debug|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.ActiveCfg = Release|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.Build.0 = Release|Win32 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.ActiveCfg = Release|x64 - {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.Build.0 = Release|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.ActiveCfg = Debug|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.Build.0 = Debug|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.ActiveCfg = Debug|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.Build.0 = Debug|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.ActiveCfg = Release|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.Build.0 = Release|Win32 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.ActiveCfg = Release|x64 - {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.Build.0 = Release|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.ActiveCfg = Debug|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.Build.0 = Debug|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.ActiveCfg = Debug|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.Build.0 = Debug|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.ActiveCfg = Release|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.Build.0 = Release|Win32 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.ActiveCfg = Release|x64 - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.Build.0 = Release|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.ActiveCfg = Debug|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.Build.0 = Debug|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.ActiveCfg = Debug|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.Build.0 = Debug|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.ActiveCfg = Release|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.Build.0 = Release|Win32 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.ActiveCfg = Release|x64 - {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.Build.0 = Release|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.ActiveCfg = Debug|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.Build.0 = Debug|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.ActiveCfg = Debug|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.Build.0 = Debug|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.ActiveCfg = Release|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.Build.0 = Release|Win32 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.ActiveCfg = Release|x64 - {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.Build.0 = Release|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.ActiveCfg = Debug|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.Build.0 = Debug|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.ActiveCfg = Debug|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.Build.0 = Debug|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.ActiveCfg = Release|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.Build.0 = Release|Win32 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.ActiveCfg = Release|x64 - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.Build.0 = Release|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.ActiveCfg = Debug|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.Build.0 = Debug|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.ActiveCfg = Debug|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.Build.0 = Debug|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.ActiveCfg = Release|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.Build.0 = Release|Win32 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.ActiveCfg = Release|x64 - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.Build.0 = Release|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.ActiveCfg = Debug|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.Build.0 = Debug|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.ActiveCfg = Debug|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.Build.0 = Debug|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.ActiveCfg = Release|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.Build.0 = Release|Win32 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.ActiveCfg = Release|x64 - {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.Build.0 = Release|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.ActiveCfg = Debug|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.Build.0 = Debug|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.ActiveCfg = Debug|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.Build.0 = Debug|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.ActiveCfg = Release|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.Build.0 = Release|Win32 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.ActiveCfg = Release|x64 - {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.Build.0 = Release|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.ActiveCfg = Debug|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.Build.0 = Debug|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.ActiveCfg = Debug|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.Build.0 = Debug|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.ActiveCfg = Release|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.Build.0 = Release|Win32 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.ActiveCfg = Release|x64 - {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.Build.0 = Release|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.ActiveCfg = Debug|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.Build.0 = Debug|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.ActiveCfg = Debug|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.Build.0 = Debug|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.ActiveCfg = Release|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.Build.0 = Release|Win32 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.ActiveCfg = Release|x64 - {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.Build.0 = Release|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.ActiveCfg = Debug|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.Build.0 = Debug|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.ActiveCfg = Debug|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.Build.0 = Debug|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.ActiveCfg = Release|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.Build.0 = Release|Win32 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.ActiveCfg = Release|x64 - {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.Build.0 = Release|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.ActiveCfg = Debug|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.Build.0 = Debug|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.ActiveCfg = Debug|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.Build.0 = Debug|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.ActiveCfg = Release|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.Build.0 = Release|Win32 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.ActiveCfg = Release|x64 - {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.Build.0 = Release|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.ActiveCfg = Debug|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.Build.0 = Debug|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.ActiveCfg = Debug|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.Build.0 = Debug|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.ActiveCfg = Release|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.Build.0 = Release|Win32 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.ActiveCfg = Release|x64 - {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.Build.0 = Release|x64 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.ActiveCfg = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.Build.0 = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.ActiveCfg = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.Build.0 = Debug|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.ActiveCfg = Release|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.Build.0 = Release|Win32 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.ActiveCfg = Release|x64 - {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.Build.0 = Release|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.ActiveCfg = Debug|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.Build.0 = Debug|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.ActiveCfg = Debug|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.Build.0 = Debug|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.ActiveCfg = Release|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.Build.0 = Release|Win32 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.ActiveCfg = Release|x64 - {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.Build.0 = Release|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.ActiveCfg = Debug|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.Build.0 = Debug|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.ActiveCfg = Debug|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.Build.0 = Debug|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.ActiveCfg = Release|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.Build.0 = Release|Win32 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.ActiveCfg = Release|x64 - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.Build.0 = Release|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.ActiveCfg = Debug|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.Build.0 = Debug|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.ActiveCfg = Debug|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.Build.0 = Debug|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.ActiveCfg = Release|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.Build.0 = Release|Win32 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.ActiveCfg = Release|x64 - {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.Build.0 = Release|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.Build.0 = Debug|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.ActiveCfg = Debug|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.Build.0 = Debug|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.ActiveCfg = Release|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.Build.0 = Release|Win32 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.ActiveCfg = Release|x64 - {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.Build.0 = Release|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.Build.0 = Debug|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.ActiveCfg = Debug|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.Build.0 = Debug|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.ActiveCfg = Release|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.Build.0 = Release|Win32 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.ActiveCfg = Release|x64 - {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.Build.0 = Release|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.ActiveCfg = Debug|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.Build.0 = Debug|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.ActiveCfg = Debug|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.Build.0 = Debug|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.ActiveCfg = Release|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.Build.0 = Release|Win32 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.ActiveCfg = Release|x64 - {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.Build.0 = Release|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.ActiveCfg = Debug|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.Build.0 = Debug|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.ActiveCfg = Debug|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.Build.0 = Debug|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.ActiveCfg = Release|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.Build.0 = Release|Win32 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.ActiveCfg = Release|x64 - {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.Build.0 = Release|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.ActiveCfg = Debug|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.Build.0 = Debug|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.ActiveCfg = Debug|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.Build.0 = Debug|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.ActiveCfg = Release|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.Build.0 = Release|Win32 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.ActiveCfg = Release|x64 - {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.Build.0 = Release|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.ActiveCfg = Debug|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.Build.0 = Debug|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.ActiveCfg = Debug|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.Build.0 = Debug|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.ActiveCfg = Release|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.Build.0 = Release|Win32 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.ActiveCfg = Release|x64 - {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.Build.0 = Release|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.ActiveCfg = Debug|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.Build.0 = Debug|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.ActiveCfg = Debug|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.Build.0 = Debug|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.ActiveCfg = Release|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.Build.0 = Release|Win32 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.ActiveCfg = Release|x64 - {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.Build.0 = Release|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.ActiveCfg = Debug|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.Build.0 = Debug|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.ActiveCfg = Debug|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.Build.0 = Debug|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.ActiveCfg = Release|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.Build.0 = Release|Win32 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.ActiveCfg = Release|x64 - {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.Build.0 = Release|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.ActiveCfg = Debug|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.Build.0 = Debug|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.ActiveCfg = Debug|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.Build.0 = Debug|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.ActiveCfg = Release|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.Build.0 = Release|Win32 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.ActiveCfg = Release|x64 - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.Build.0 = Release|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.ActiveCfg = Debug|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.Build.0 = Debug|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.ActiveCfg = Debug|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.Build.0 = Debug|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.ActiveCfg = Release|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.Build.0 = Release|Win32 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.ActiveCfg = Release|x64 - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.Build.0 = Release|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.ActiveCfg = Debug|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.Build.0 = Debug|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.ActiveCfg = Debug|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.Build.0 = Debug|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.ActiveCfg = Release|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.Build.0 = Release|Win32 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.ActiveCfg = Release|x64 - {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.Build.0 = Release|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.Build.0 = Debug|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.ActiveCfg = Debug|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.Build.0 = Debug|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.ActiveCfg = Release|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.Build.0 = Release|Win32 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.ActiveCfg = Release|x64 - {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.Build.0 = Release|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.Build.0 = Debug|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.ActiveCfg = Debug|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.Build.0 = Debug|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.ActiveCfg = Release|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.Build.0 = Release|Win32 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.ActiveCfg = Release|x64 - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.Build.0 = Release|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.ActiveCfg = Debug|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.Build.0 = Debug|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.ActiveCfg = Debug|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.Build.0 = Debug|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.ActiveCfg = Release|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.Build.0 = Release|Win32 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.ActiveCfg = Release|x64 - {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.Build.0 = Release|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.ActiveCfg = Debug|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.Build.0 = Debug|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.ActiveCfg = Debug|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.Build.0 = Debug|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.ActiveCfg = Release|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.Build.0 = Release|Win32 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.ActiveCfg = Release|x64 - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.Build.0 = Release|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.ActiveCfg = Debug|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.Build.0 = Debug|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.ActiveCfg = Debug|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.Build.0 = Debug|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.ActiveCfg = Release|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.Build.0 = Release|Win32 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.ActiveCfg = Release|x64 - {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.Build.0 = Release|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.ActiveCfg = Debug|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.Build.0 = Debug|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.ActiveCfg = Debug|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.Build.0 = Debug|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.ActiveCfg = Release|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.Build.0 = Release|Win32 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.ActiveCfg = Release|x64 - {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.Build.0 = Release|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.Build.0 = Debug|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.ActiveCfg = Debug|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.Build.0 = Debug|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.ActiveCfg = Release|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.Build.0 = Release|Win32 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.ActiveCfg = Release|x64 - {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.Build.0 = Release|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.ActiveCfg = Debug|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.Build.0 = Debug|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.ActiveCfg = Debug|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.Build.0 = Debug|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.ActiveCfg = Release|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.Build.0 = Release|Win32 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.ActiveCfg = Release|x64 - {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.Build.0 = Release|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.ActiveCfg = Debug|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.Build.0 = Debug|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.ActiveCfg = Debug|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.Build.0 = Debug|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.ActiveCfg = Release|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.Build.0 = Release|Win32 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.ActiveCfg = Release|x64 - {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.Build.0 = Release|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.ActiveCfg = Debug|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.Build.0 = Debug|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.ActiveCfg = Debug|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.Build.0 = Debug|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.ActiveCfg = Release|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.Build.0 = Release|Win32 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.ActiveCfg = Release|x64 - {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.Build.0 = Release|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.ActiveCfg = Debug|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.Build.0 = Debug|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.ActiveCfg = Debug|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.Build.0 = Debug|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.ActiveCfg = Release|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.Build.0 = Release|Win32 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.ActiveCfg = Release|x64 - {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.Build.0 = Release|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.Build.0 = Debug|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.ActiveCfg = Debug|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.Build.0 = Debug|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.ActiveCfg = Release|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.Build.0 = Release|Win32 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.ActiveCfg = Release|x64 - {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.Build.0 = Release|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.ActiveCfg = Debug|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.Build.0 = Debug|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.ActiveCfg = Debug|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.Build.0 = Debug|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.ActiveCfg = Release|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.Build.0 = Release|Win32 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.ActiveCfg = Release|x64 - {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.Build.0 = Release|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.ActiveCfg = Debug|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.Build.0 = Debug|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.ActiveCfg = Debug|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.Build.0 = Debug|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.ActiveCfg = Release|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.Build.0 = Release|Win32 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.ActiveCfg = Release|x64 - {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.Build.0 = Release|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.Build.0 = Debug|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.ActiveCfg = Debug|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.Build.0 = Debug|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.ActiveCfg = Release|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.Build.0 = Release|Win32 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.ActiveCfg = Release|x64 - {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.Build.0 = Release|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.ActiveCfg = Debug|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.Build.0 = Debug|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.ActiveCfg = Debug|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.Build.0 = Debug|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.ActiveCfg = Release|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.Build.0 = Release|Win32 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.ActiveCfg = Release|x64 - {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.Build.0 = Release|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.ActiveCfg = Debug|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.Build.0 = Debug|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.ActiveCfg = Debug|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.Build.0 = Debug|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.ActiveCfg = Release|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.Build.0 = Release|Win32 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.ActiveCfg = Release|x64 - {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.Build.0 = Release|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.ActiveCfg = Debug|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.Build.0 = Debug|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.ActiveCfg = Debug|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.Build.0 = Debug|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.ActiveCfg = Release|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.Build.0 = Release|Win32 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.ActiveCfg = Release|x64 - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.Build.0 = Release|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.ActiveCfg = Debug|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.Build.0 = Debug|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.ActiveCfg = Debug|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.Build.0 = Debug|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.ActiveCfg = Release|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.Build.0 = Release|Win32 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.ActiveCfg = Release|x64 - {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.Build.0 = Release|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.ActiveCfg = Debug|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.Build.0 = Debug|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.ActiveCfg = Debug|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.Build.0 = Debug|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.ActiveCfg = Release|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.Build.0 = Release|Win32 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.ActiveCfg = Release|x64 - {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.Build.0 = Release|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.ActiveCfg = Debug|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.Build.0 = Debug|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.ActiveCfg = Debug|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.Build.0 = Debug|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.ActiveCfg = Release|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.Build.0 = Release|Win32 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.ActiveCfg = Release|x64 - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.Build.0 = Release|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.Build.0 = Debug|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.ActiveCfg = Debug|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.Build.0 = Debug|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.ActiveCfg = Release|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.Build.0 = Release|Win32 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.ActiveCfg = Release|x64 - {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.Build.0 = Release|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.ActiveCfg = Debug|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.Build.0 = Debug|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.ActiveCfg = Debug|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.Build.0 = Debug|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.ActiveCfg = Release|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.Build.0 = Release|Win32 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.ActiveCfg = Release|x64 - {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.Build.0 = Release|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.Build.0 = Debug|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.ActiveCfg = Debug|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.Build.0 = Debug|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.ActiveCfg = Release|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.Build.0 = Release|Win32 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.ActiveCfg = Release|x64 - {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.Build.0 = Release|x64 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.ActiveCfg = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.Build.0 = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.ActiveCfg = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.Build.0 = Debug|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.ActiveCfg = Release|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.Build.0 = Release|Win32 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.ActiveCfg = Release|x64 - {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.Build.0 = Release|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.ActiveCfg = Debug|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.Build.0 = Debug|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.ActiveCfg = Debug|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.Build.0 = Debug|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.ActiveCfg = Release|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.Build.0 = Release|Win32 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.ActiveCfg = Release|x64 - {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.Build.0 = Release|x64 - {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.Build.0 = Debug|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Debug|x64.ActiveCfg = Debug|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.ActiveCfg = Release|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.Build.0 = Release|Win32 - {0E046380-14CA-4C23-A807-8C678519A605}.Release|x64.ActiveCfg = Release|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.Build.0 = Debug|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.ActiveCfg = Debug|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.Build.0 = Debug|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.ActiveCfg = Release|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.Build.0 = Release|Win32 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.ActiveCfg = Release|x64 - {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.Build.0 = Release|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.ActiveCfg = Debug|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.Build.0 = Debug|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.ActiveCfg = Debug|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.Build.0 = Debug|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.ActiveCfg = Release|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.Build.0 = Release|Win32 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.ActiveCfg = Release|x64 - {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.Build.0 = Release|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.ActiveCfg = Debug|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.Build.0 = Debug|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.ActiveCfg = Debug|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.Build.0 = Debug|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.ActiveCfg = Release|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.Build.0 = Release|Win32 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.ActiveCfg = Release|x64 - {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.Build.0 = Release|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.ActiveCfg = Debug|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.Build.0 = Debug|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.ActiveCfg = Debug|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.Build.0 = Debug|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.ActiveCfg = Release|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.Build.0 = Release|Win32 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.ActiveCfg = Release|x64 - {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.Build.0 = Release|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.ActiveCfg = Debug|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.Build.0 = Debug|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.ActiveCfg = Debug|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.Build.0 = Debug|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.ActiveCfg = Release|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.Build.0 = Release|Win32 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.ActiveCfg = Release|x64 - {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.Build.0 = Release|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.Build.0 = Debug|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.ActiveCfg = Debug|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.Build.0 = Debug|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.ActiveCfg = Release|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.Build.0 = Release|Win32 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.ActiveCfg = Release|x64 - {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.Build.0 = Release|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.Build.0 = Debug|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.ActiveCfg = Debug|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.Build.0 = Debug|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.ActiveCfg = Release|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.Build.0 = Release|Win32 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.ActiveCfg = Release|x64 - {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.Build.0 = Release|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.ActiveCfg = Debug|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.Build.0 = Debug|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.ActiveCfg = Debug|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.Build.0 = Debug|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.ActiveCfg = Release|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.Build.0 = Release|Win32 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.ActiveCfg = Release|x64 - {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.Build.0 = Release|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.ActiveCfg = Debug|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.Build.0 = Debug|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.ActiveCfg = Debug|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.Build.0 = Debug|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.ActiveCfg = Release|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.Build.0 = Release|Win32 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.ActiveCfg = Release|x64 - {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.Build.0 = Release|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.ActiveCfg = Debug|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.Build.0 = Debug|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.ActiveCfg = Debug|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.Build.0 = Debug|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.ActiveCfg = Release|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.Build.0 = Release|Win32 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.ActiveCfg = Release|x64 - {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.Build.0 = Release|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.ActiveCfg = Debug|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.Build.0 = Debug|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.ActiveCfg = Debug|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.Build.0 = Debug|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.ActiveCfg = Release|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.Build.0 = Release|Win32 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.ActiveCfg = Release|x64 - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.Build.0 = Release|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.ActiveCfg = Debug|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.Build.0 = Debug|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.ActiveCfg = Debug|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.Build.0 = Debug|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.ActiveCfg = Release|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.Build.0 = Release|Win32 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.ActiveCfg = Release|x64 - {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.Build.0 = Release|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.Build.0 = Debug|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.ActiveCfg = Debug|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.Build.0 = Debug|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.ActiveCfg = Release|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.Build.0 = Release|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.ActiveCfg = Release|x64 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.Build.0 = Release|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.ActiveCfg = Debug|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.Build.0 = Debug|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.ActiveCfg = Debug|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.Build.0 = Debug|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.ActiveCfg = Release|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.Build.0 = Release|Win32 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.ActiveCfg = Release|x64 - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.Build.0 = Release|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.ActiveCfg = Debug|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.Build.0 = Debug|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.ActiveCfg = Debug|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.Build.0 = Debug|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.ActiveCfg = Release|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.Build.0 = Release|Win32 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.ActiveCfg = Release|x64 - {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.Build.0 = Release|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.ActiveCfg = Debug|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.Build.0 = Debug|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.ActiveCfg = Debug|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.Build.0 = Debug|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.ActiveCfg = Release|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.Build.0 = Release|Win32 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.ActiveCfg = Release|x64 - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.Build.0 = Release|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.ActiveCfg = Debug|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.Build.0 = Debug|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.ActiveCfg = Debug|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.Build.0 = Debug|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.ActiveCfg = Release|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.Build.0 = Release|Win32 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.ActiveCfg = Release|x64 - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.Build.0 = Release|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.ActiveCfg = Debug|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.Build.0 = Debug|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.ActiveCfg = Debug|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.Build.0 = Debug|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.ActiveCfg = Release|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.Build.0 = Release|Win32 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.ActiveCfg = Release|x64 - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.Build.0 = Release|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.ActiveCfg = Debug|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.Build.0 = Debug|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.ActiveCfg = Debug|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.Build.0 = Debug|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.ActiveCfg = Release|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.Build.0 = Release|Win32 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.ActiveCfg = Release|x64 - {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.Build.0 = Release|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.ActiveCfg = Debug|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.Build.0 = Debug|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.ActiveCfg = Debug|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.Build.0 = Debug|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.ActiveCfg = Release|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.Build.0 = Release|Win32 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.ActiveCfg = Release|x64 - {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.Build.0 = Release|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.ActiveCfg = Debug|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.Build.0 = Debug|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.ActiveCfg = Debug|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.Build.0 = Debug|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.ActiveCfg = Release|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.Build.0 = Release|Win32 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.ActiveCfg = Release|x64 - {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.Build.0 = Release|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.ActiveCfg = Debug|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.Build.0 = Debug|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.ActiveCfg = Debug|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.Build.0 = Debug|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.ActiveCfg = Release|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.Build.0 = Release|Win32 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.ActiveCfg = Release|x64 - {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.Build.0 = Release|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.Build.0 = Debug|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.ActiveCfg = Debug|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.Build.0 = Debug|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.ActiveCfg = Release|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.Build.0 = Release|Win32 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.ActiveCfg = Release|x64 - {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.Build.0 = Release|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.ActiveCfg = Debug|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.Build.0 = Debug|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.ActiveCfg = Debug|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.Build.0 = Debug|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.ActiveCfg = Release|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.Build.0 = Release|Win32 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.ActiveCfg = Release|x64 - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.Build.0 = Release|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.ActiveCfg = Debug|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.Build.0 = Debug|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.ActiveCfg = Debug|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.Build.0 = Debug|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.ActiveCfg = Release|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.Build.0 = Release|Win32 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.ActiveCfg = Release|x64 - {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.Build.0 = Release|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.ActiveCfg = Debug|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.Build.0 = Debug|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.ActiveCfg = Debug|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.Build.0 = Debug|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.ActiveCfg = Release|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.Build.0 = Release|Win32 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.ActiveCfg = Release|x64 - {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.Build.0 = Release|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.Build.0 = Debug|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.ActiveCfg = Debug|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.Build.0 = Debug|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.ActiveCfg = Release|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.Build.0 = Release|Win32 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.ActiveCfg = Release|x64 - {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.Build.0 = Release|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.ActiveCfg = Debug|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.Build.0 = Debug|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.ActiveCfg = Debug|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.Build.0 = Debug|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.ActiveCfg = Release|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.Build.0 = Release|Win32 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.ActiveCfg = Release|x64 - {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.Build.0 = Release|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.Build.0 = Debug|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.ActiveCfg = Debug|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.Build.0 = Debug|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.ActiveCfg = Release|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.Build.0 = Release|Win32 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.ActiveCfg = Release|x64 - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.Build.0 = Release|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.ActiveCfg = Debug|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.Build.0 = Debug|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.ActiveCfg = Debug|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.Build.0 = Debug|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.ActiveCfg = Release|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.Build.0 = Release|Win32 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.ActiveCfg = Release|x64 - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.Build.0 = Release|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.ActiveCfg = Debug|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.Build.0 = Debug|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.ActiveCfg = Debug|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.Build.0 = Debug|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.ActiveCfg = Release|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.Build.0 = Release|Win32 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.ActiveCfg = Release|x64 - {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.Build.0 = Release|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.ActiveCfg = Debug|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.Build.0 = Debug|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.ActiveCfg = Debug|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.Build.0 = Debug|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.ActiveCfg = Release|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.Build.0 = Release|Win32 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.ActiveCfg = Release|x64 - {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.Build.0 = Release|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.ActiveCfg = Debug|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.Build.0 = Debug|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.ActiveCfg = Debug|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.Build.0 = Debug|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.ActiveCfg = Release|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.Build.0 = Release|Win32 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.ActiveCfg = Release|x64 - {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.Build.0 = Release|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.Build.0 = Debug|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.ActiveCfg = Debug|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.Build.0 = Debug|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.ActiveCfg = Release|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.Build.0 = Release|Win32 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.ActiveCfg = Release|x64 - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.Build.0 = Release|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.ActiveCfg = Debug|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.Build.0 = Debug|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.ActiveCfg = Debug|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.Build.0 = Debug|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.ActiveCfg = Release|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.Build.0 = Release|Win32 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.ActiveCfg = Release|x64 - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.Build.0 = Release|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.ActiveCfg = Debug|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.Build.0 = Debug|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.ActiveCfg = Debug|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.Build.0 = Debug|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.ActiveCfg = Release|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.Build.0 = Release|Win32 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.ActiveCfg = Release|x64 - {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.Build.0 = Release|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.ActiveCfg = Debug|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.Build.0 = Debug|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.ActiveCfg = Debug|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.Build.0 = Debug|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.ActiveCfg = Release|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.Build.0 = Release|Win32 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.ActiveCfg = Release|x64 - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.Build.0 = Release|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.Build.0 = Debug|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.ActiveCfg = Debug|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.Build.0 = Debug|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.ActiveCfg = Release|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.Build.0 = Release|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.ActiveCfg = Release|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.Build.0 = Release|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.ActiveCfg = Debug|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.Build.0 = Debug|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.ActiveCfg = Debug|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.Build.0 = Debug|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.ActiveCfg = Release|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.Build.0 = Release|Win32 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.ActiveCfg = Release|x64 - {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.Build.0 = Release|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.Build.0 = Debug|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.ActiveCfg = Debug|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.Build.0 = Debug|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.ActiveCfg = Release|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.Build.0 = Release|Win32 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.ActiveCfg = Release|x64 - {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.Build.0 = Release|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.ActiveCfg = Debug|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.Build.0 = Debug|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.ActiveCfg = Debug|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.Build.0 = Debug|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.ActiveCfg = Release|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.Build.0 = Release|Win32 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.ActiveCfg = Release|x64 - {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.Build.0 = Release|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.ActiveCfg = Debug|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.Build.0 = Debug|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.ActiveCfg = Debug|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.Build.0 = Debug|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.ActiveCfg = Release|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.Build.0 = Release|Win32 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.ActiveCfg = Release|x64 - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.Build.0 = Release|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.Build.0 = Debug|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.ActiveCfg = Debug|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.Build.0 = Debug|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.ActiveCfg = Release|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.Build.0 = Release|Win32 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.ActiveCfg = Release|x64 - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.Build.0 = Release|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.ActiveCfg = Debug|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.Build.0 = Debug|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.ActiveCfg = Debug|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.Build.0 = Debug|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.ActiveCfg = Release|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.Build.0 = Release|Win32 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.ActiveCfg = Release|x64 - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.Build.0 = Release|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.ActiveCfg = Debug|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.Build.0 = Debug|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.ActiveCfg = Debug|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.Build.0 = Debug|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.ActiveCfg = Release|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.Build.0 = Release|Win32 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.ActiveCfg = Release|x64 - {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.Build.0 = Release|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.ActiveCfg = Debug|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.Build.0 = Debug|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.ActiveCfg = Debug|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.Build.0 = Debug|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.ActiveCfg = Release|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.Build.0 = Release|Win32 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.ActiveCfg = Release|x64 - {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.Build.0 = Release|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.Build.0 = Debug|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.ActiveCfg = Debug|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.Build.0 = Debug|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.ActiveCfg = Release|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.Build.0 = Release|Win32 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.ActiveCfg = Release|x64 - {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.Build.0 = Release|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.ActiveCfg = Debug|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.Build.0 = Debug|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.ActiveCfg = Debug|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.Build.0 = Debug|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.ActiveCfg = Release|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.Build.0 = Release|Win32 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.ActiveCfg = Release|x64 - {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.Build.0 = Release|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.Build.0 = Debug|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.ActiveCfg = Debug|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.Build.0 = Debug|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.ActiveCfg = Release|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.Build.0 = Release|Win32 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.ActiveCfg = Release|x64 - {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.Build.0 = Release|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.ActiveCfg = Debug|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.Build.0 = Debug|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.ActiveCfg = Debug|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.Build.0 = Debug|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.ActiveCfg = Release|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.Build.0 = Release|Win32 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.ActiveCfg = Release|x64 - {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.Build.0 = Release|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.ActiveCfg = Debug|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.Build.0 = Debug|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.ActiveCfg = Debug|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.Build.0 = Debug|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.ActiveCfg = Release|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.Build.0 = Release|Win32 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.ActiveCfg = Release|x64 - {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.Build.0 = Release|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.ActiveCfg = Debug|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.Build.0 = Debug|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.ActiveCfg = Debug|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.Build.0 = Debug|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.ActiveCfg = Release|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.Build.0 = Release|Win32 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.ActiveCfg = Release|x64 - {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.Build.0 = Release|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.ActiveCfg = Debug|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.Build.0 = Debug|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.ActiveCfg = Debug|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.Build.0 = Debug|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.ActiveCfg = Release|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.Build.0 = Release|Win32 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.ActiveCfg = Release|x64 - {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.Build.0 = Release|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.ActiveCfg = Debug|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.Build.0 = Debug|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.ActiveCfg = Debug|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.Build.0 = Debug|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.ActiveCfg = Release|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.Build.0 = Release|Win32 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.ActiveCfg = Release|x64 - {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.Build.0 = Release|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.ActiveCfg = Debug|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.Build.0 = Debug|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.ActiveCfg = Debug|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.Build.0 = Debug|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.ActiveCfg = Release|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.Build.0 = Release|Win32 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.ActiveCfg = Release|x64 - {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.Build.0 = Release|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.Build.0 = Debug|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.ActiveCfg = Debug|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.Build.0 = Debug|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.ActiveCfg = Release|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.Build.0 = Release|Win32 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.ActiveCfg = Release|x64 - {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.Build.0 = Release|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.ActiveCfg = Debug|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.Build.0 = Debug|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.ActiveCfg = Debug|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.Build.0 = Debug|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.ActiveCfg = Release|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.Build.0 = Release|Win32 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.ActiveCfg = Release|x64 - {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.Build.0 = Release|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.Build.0 = Debug|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.ActiveCfg = Debug|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.Build.0 = Debug|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.ActiveCfg = Release|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.Build.0 = Release|Win32 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.ActiveCfg = Release|x64 - {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.Build.0 = Release|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.ActiveCfg = Debug|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.Build.0 = Debug|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.ActiveCfg = Debug|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.Build.0 = Debug|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.ActiveCfg = Release|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.Build.0 = Release|Win32 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.ActiveCfg = Release|x64 - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.Build.0 = Release|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.ActiveCfg = Debug|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.Build.0 = Debug|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.ActiveCfg = Debug|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.Build.0 = Debug|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.ActiveCfg = Release|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.Build.0 = Release|Win32 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.ActiveCfg = Release|x64 - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.Build.0 = Release|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.ActiveCfg = Debug|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.Build.0 = Debug|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.ActiveCfg = Debug|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.Build.0 = Debug|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.ActiveCfg = Release|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.Build.0 = Release|Win32 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.ActiveCfg = Release|x64 - {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.Build.0 = Release|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.ActiveCfg = Debug|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.Build.0 = Debug|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.ActiveCfg = Debug|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.Build.0 = Debug|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.ActiveCfg = Release|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.Build.0 = Release|Win32 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.ActiveCfg = Release|x64 - {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.Build.0 = Release|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.ActiveCfg = Debug|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.Build.0 = Debug|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.ActiveCfg = Debug|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.Build.0 = Debug|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.ActiveCfg = Release|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.Build.0 = Release|Win32 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.ActiveCfg = Release|x64 - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {F9916510-9055-4C9F-997A-3755DEC1511B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {9299B507-1AF9-4C93-9560-5F637D1E0C9E} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {20D781FB-4A20-4B75-B863-304A47182966} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {B8928210-546C-4AE3-956B-E2B724E6B8E5} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {6DA1396F-2A44-4D5C-8442-012F71006217} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {3A12F777-56A8-42EC-BD17-8F325524241E} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {33276462-8313-4192-8306-13717ECCA60A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {3C42510C-A29E-4A53-899C-203BFA874E0B} = {F9C41695-3353-4564-A154-58106829B19C} - {987F026D-EB1F-4013-ADA8-2406ACCDA526} = {F9C41695-3353-4564-A154-58106829B19C} - {DB315D7D-00BB-43B2-93A6-0430CA2B9F28} = {F9C41695-3353-4564-A154-58106829B19C} - {B4361FA0-4073-4B60-EE72-F5C08E6EDF61} = {F9C41695-3353-4564-A154-58106829B19C} - {2AD2FF74-06E1-4BD8-984A-526F3C6315B3} = {F9C41695-3353-4564-A154-58106829B19C} - {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {2D0B4CB0-3ACA-4612-B745-FF3050E1500A} = {F9C41695-3353-4564-A154-58106829B19C} - {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856} = {F9C41695-3353-4564-A154-58106829B19C} - {9DE1F0B0-B9D1-4681-82E7-13CC3E047445} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {B988F96C-F87A-484C-AB15-D0674B22F291} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {214F211F-1A2B-4F79-8993-B8DEE2EF7441} = {F9C41695-3353-4564-A154-58106829B19C} - {210DD88D-649B-4695-8C5F-898A4F60A8CE} = {F9C41695-3353-4564-A154-58106829B19C} - {E26D2311-C164-48CF-BA24-5CEDA873D1B2} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {DD76B998-ED0D-4BFD-9660-3ADC3A334872} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {27CA5499-B3F2-4FB6-8414-651819B0B96C} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5} = {F9C41695-3353-4564-A154-58106829B19C} - {4ADADECA-99D7-410D-8127-CB27210DCC6A} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {1948EAEA-4C25-4F6B-AD9E-5891F656EADA} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {82F96271-4136-4B0E-AB6F-040DE7A4DD1E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {E37561EB-B9C5-4215-9FF9-DB559916FBA2} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {A9265E36-7F2D-440C-BF3E-F447FDB6200F} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {6A1969EA-9657-4828-93E0-8D21A970F868} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {D5E2FEC1-B29A-476C-BD41-469FE282EE0F} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {07137F45-8B5F-4561-BEC8-B883E9123785} = {F9C41695-3353-4564-A154-58106829B19C} - {12FFF2B0-0D0B-430B-A4C6-1577CA98F598} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {ECE691D0-BFB3-483B-A699-084269EFCE89} = {F9C41695-3353-4564-A154-58106829B19C} - {0BB52326-02D5-4698-A180-24078DA5DA0E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {D9057E63-AAAA-4FE7-800A-20C02F4761F3} = {F9C41695-3353-4564-A154-58106829B19C} - {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {40FE7861-E54E-4DA9-BE4D-A5178014E477} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {1423FC8F-AA52-4562-8275-4BF0838CA378} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {53F841E8-284F-4545-9176-B131896E43F8} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {2E0A2793-94C3-82E7-2AB0-FD421816CFBF} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {4AC1E062-0236-4E49-AA04-F732043D2DCF} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {290C5ED4-71A7-4040-AD26-4820CF7A9E60} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {1C856B14-54CD-4D07-B18B-5F7DB073AB51} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {A5B558C6-C767-11E1-A335-F6EB6188709B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {6022990D-3FD5-46A9-8AB5-E444C51646F3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {A8F23706-E590-4A87-96CC-5F8E5082503F} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {DADAC956-3A54-440A-8B56-A07234DEE861} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {C14D6E0D-810E-4599-A6E0-17298AFA0501} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {E71C1722-A41D-4475-87F4-29961A3654BB} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {F47EAB99-C78F-4A92-87D5-B0E16FE5A133} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {9C6040B8-1173-40FA-A3DB-DE044CCD8250} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {576EEEFD-E423-482B-879A-F0515D40B8E1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {A4855451-6447-437C-B024-B36C3C7901EA} = {F9C41695-3353-4564-A154-58106829B19C} - {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {AE677E3A-DAC5-42FD-8762-47370C57639B} = {F9C41695-3353-4564-A154-58106829B19C} - {ABF05E2C-C335-4BD1-8C3E-4C63285362CF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {6DE11A47-2268-4B08-8DE5-15A1705FCE28} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {C619A811-8023-4441-B3D7-785388A09DF0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {AF7D71D4-19B7-42B8-91DD-701F155AC4AE} = {F9C41695-3353-4564-A154-58106829B19C} - {155211F8-08E1-4864-A3B8-9F04F4270360} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {2E15C462-A150-4A37-ACD6-FBAECF1724F5} = {F9C41695-3353-4564-A154-58106829B19C} - {F5E3FAFE-B650-4736-8D27-FA53866668C6} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {01F9E227-06F5-4BED-907F-402CA7DFAFE6} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {A556E0B5-73A1-4676-BA1F-133820DE7D5A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} - {F29D0C8D-141A-43CF-86B2-34A04653F8D4} = {30218E20-9E62-4027-BB87-2627B17F6CA3} - {0E046380-14CA-4C23-A807-8C678519A605} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {3C83B0AB-9739-41C1-A127-ED7DB9551F76} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {475ED6ED-C311-4188-ACB2-1C41830B22EE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {BF6E1942-7E42-4564-9DF5-FD0A00D71173} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {B5BCDC2F-81FC-4324-90C6-E5540A225EFF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {BE22A21F-73B7-453F-86A0-B867F0056490} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {12BCA020-EABF-429E-876A-A476BC9C10C0} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {EDAAD28B-505B-4969-A8BB-97EAE818DEEA} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {6124E997-426E-4A0B-9617-D6D577D5E7D7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {66A9BDEB-150F-45DC-B20F-9892C0B43834} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {BCFAB658-326E-466D-995B-E76636C1DEA4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {B4327D10-ACDC-4C12-9555-749DD49A7BB0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {27D41D81-991F-4DC6-8749-B0321C87E694} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {BD291BF0-D804-4818-8311-DE871E6BCEAA} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {045BAC91-34D1-4B43-B52B-566801BE7F85} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {D5C9CA74-4E25-478A-B890-75EB13E6DB1C} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {E604CD58-4579-4F69-9D6A-2605FD7CF716} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {E876FE63-0701-4CDA-BED5-7C73A379C1D1} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {277E433F-7D71-4247-8AAA-CC5FB1AA7A67} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} - {CE6A5A24-EA88-4E67-BDF2-22517528E43F} = {F9C41695-3353-4564-A154-58106829B19C} - {0C02E395-E73F-47E3-8B95-B7924C0C7A6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {A185B162-6CB6-4502-B03F-B56F7699A8D9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {A21C50CD-28A6-481A-A12B-47189FE66641} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {2115FEBC-1EC4-4F95-A058-A523ED5295A4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {AD0D0500-CE7D-417D-9C36-3620D56CA6D4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {7DC23E4E-2448-4811-AABD-F5D069F6E74A} = {F9C41695-3353-4564-A154-58106829B19C} - {B3494FED-FB8C-43F4-B341-F26A3460203B} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {EFB2355B-82B3-4759-B7D8-95F8E9506291} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {B3BC3949-6949-41DE-94BF-B112FBFB1A84} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {713067DF-65EE-480B-A000-B2A323495F16} = {E7FB43FB-3563-4568-8846-A88FC37449BF} - {620E0BE7-3763-4F35-9DBD-4770104E269C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {86033E58-A1E3-43AD-AE8E-305E15E72A91} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {A7FAD273-8C71-4D72-A84F-2D160F2DC589} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} - {A2E9DA24-95E4-4414-94AF-488A382E276A} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} - {6D19209B-ECE7-4B9C-941C-0AA2B484F199} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A} = {F9C41695-3353-4564-A154-58106829B19C} - {4D3554DE-6E14-4F94-A909-A4B19151A47E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} - {13E796AD-BEA4-4213-A1B8-E18E2397E544} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {29A0C2A8-07A4-4A8B-8BED-8F7D024013D6} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32112.339 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Miranda", "..\src\miranda32\miranda32.vcxproj", "{F9916510-9055-4C9F-997A-3755DEC1511B}" + ProjectSection(ProjectDependencies) = postProject + {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {538E451F-E667-4D07-BCE6-976ECC7BB8D1} + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_core", "..\src\mir_core\mir_core.vcxproj", "{D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mir_app", "..\src\mir_app\mir_app.vcxproj", "{538E451F-E667-4D07-BCE6-976ECC7BB8D1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjson", "..\libs\libjson\libjson.vcxproj", "{F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AVS", "..\plugins\AVS\avs.vcxproj", "{7711F563-6473-4ABD-B5E3-477CE8384AD6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Zlib", "..\libs\zlib\zlib.vcxproj", "{E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Import", "..\plugins\Import\import.vcxproj", "{9299B507-1AF9-4C93-9560-5F637D1E0C9E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mmap", "..\plugins\Db3x_mmap\db3x_mmap.vcxproj", "{20D781FB-4A20-4B75-B863-304A47182966}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scriver", "..\plugins\Scriver\scriver.vcxproj", "{B8928210-546C-4AE3-956B-E2B724E6B8E5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM", "..\plugins\TabSRMM\tabsrmm.vcxproj", "{99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GG", "..\protocols\Gadu-Gadu\gadugadu.vcxproj", "{6DA1396F-2A44-4D5C-8442-012F71006217}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IRC", "..\protocols\IRCG\IRC.vcxproj", "{3A12F777-56A8-42EC-BD17-8F325524241E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Jabber", "..\protocols\JabberG\jabber.vcxproj", "{33276462-8313-4192-8306-13717ECCA60A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_nicer", "..\plugins\Clist_nicer\clist_nicer.vcxproj", "{3C42510C-A29E-4A53-899C-203BFA874E0B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cln_skinedit", "..\plugins\Cln_skinedit\skinedit.vcxproj", "{987F026D-EB1F-4013-ADA8-2406ACCDA526}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthState", "..\plugins\AuthState\authstate.vcxproj", "{DB315D7D-00BB-43B2-93A6-0430CA2B9F28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Boltun", "..\plugins\Boltun\Boltun.vcxproj", "{98DF7761-41D7-4C5C-9FFE-E5CCB3997783}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BossKey", "..\plugins\BossKeyPlus\BossKey.vcxproj", "{88E47CF7-7B40-4312-A35A-9B28885FFED9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyExpectator", "..\plugins\BuddyExpectator\BuddyExpectator.vcxproj", "{8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Console", "..\plugins\Console\Console.vcxproj", "{A231E008-2D1A-4F24-95DD-59F56F85A499}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Contacts", "..\plugins\ContactsPlus\contacts.vcxproj", "{F4F2FD25-1553-FB72-F695-0701D20C3168}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Flags", "..\plugins\CountryFlags\flags.vcxproj", "{B4361FA0-4073-4B60-EE72-F5C08E6EDF61}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSList", "..\plugins\CSList\cslist.vcxproj", "{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Db_autobackups", "..\plugins\Db_autobackups\db_autobackups.vcxproj", "{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FavContacts", "..\plugins\FavContacts\favcontacts.vcxproj", "{2D0B4CB0-3ACA-4612-B745-FF3050E1500A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FltContacts", "..\plugins\FloatingContacts\FltCont.vcxproj", "{9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folders", "..\plugins\Folders\folders.vcxproj", "{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LinkList", "..\plugins\HistoryLinkListPlus\linklist.vcxproj", "{850EC838-0EAD-45EB-6F1B-16DC90DCE18D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistorySweeperLight", "..\plugins\HistorySweeperLight\historysweeperlight.vcxproj", "{9DE1F0B0-B9D1-4681-82E7-13CC3E047445}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEView", "..\plugins\IEView\ieview.vcxproj", "{B988F96C-F87A-484C-AB15-D0674B22F291}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IgnoreState", "..\plugins\IgnoreState\ignore.vcxproj", "{214F211F-1A2B-4F79-8993-B8DEE2EF7441}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MenuEx", "..\plugins\MenuItemEx\menuex.vcxproj", "{210DD88D-649B-4695-8C5F-898A4F60A8CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libTextControl", "..\libs\mTextControl\mtextcontrol.vcxproj", "{E26D2311-C164-48CF-BA24-5CEDA873D1B2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewXstatusNotify", "..\plugins\NewXstatusNotify\NewXstatusNotify.vcxproj", "{D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Nudge", "..\plugins\Nudge\nudge.vcxproj", "{8190CFAA-3B73-43D8-9101-8368E21F1864}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PopupPlus", "..\plugins\Popup\Popup.vcxproj", "{726460C7-E1F1-4C37-B64F-DA8A8DD26D70}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickMessages", "..\plugins\QuickMessages\quickmessages.vcxproj", "{DD76B998-ED0D-4BFD-9660-3ADC3A334872}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickReplies", "..\plugins\QuickReplies\quickreplies.vcxproj", "{27CA5499-B3F2-4FB6-8414-651819B0B96C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Rate", "..\plugins\Rate\rate.vcxproj", "{C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM", "..\plugins\SecureIM\secureim_17.vcxproj", "{4ADADECA-99D7-410D-8127-CB27210DCC6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SeenPlugin", "..\plugins\SeenPlugin\seenplugin.vcxproj", "{EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sessions", "..\plugins\Sessions\Sessions.vcxproj", "{37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleAR", "..\plugins\SimpleAR\SimpleAR.vcxproj", "{06C44834-7B7A-4074-A6D8-7F163B3FF707}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SmileyAdd", "..\plugins\SmileyAdd\SmileyAdd.vcxproj", "{5BBA7E51-B494-4462-BC4F-1AE5F57F9857}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SplashScreen", "..\plugins\SplashScreen\splashscreen.vcxproj", "{5A6095F4-B037-4DA8-8410-8004A90C961A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpam", "..\plugins\StopSpamPlus\stopspam.vcxproj", "{3E6CEC79-5E93-4607-B10E-498586ECF6A6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tipper", "..\plugins\TipperYM\tipper_ym.vcxproj", "{2C818919-A38F-44FF-BD91-A6A204AC592A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TooltipNotify", "..\plugins\TooltipNotify\ttnotify.vcxproj", "{1948EAEA-4C25-4F6B-AD9E-5891F656EADA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TranslitSwitcher", "..\plugins\TranslitSwitcher\TranslitSwitcher.vcxproj", "{82F96271-4136-4B0E-AB6F-040DE7A4DD1E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserGuide", "..\plugins\UserGuide\UserGuide.vcxproj", "{92E3BDEE-DD17-4619-AD61-70C0ADE04217}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx", "..\plugins\UserInfoEx\UInfoEx.vcxproj", "{AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Variables", "..\plugins\Variables\Variables.vcxproj", "{3038EF69-85BE-4D92-9864-CD6A5EBB558A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhenWasIt", "..\plugins\WhenWasIt\WhenWasIt.vcxproj", "{63E05ECA-0A63-479E-86BD-2CAF53869BDA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker", "..\plugins\SpellChecker\spellchecker.vcxproj", "{5DB86086-10E9-42E7-AC90-503D2678C2A2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Alarms", "..\plugins\Alarms\alarms.vcxproj", "{5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroNotify", "..\plugins\ZeroNotification\Zero Notification.vcxproj", "{E37561EB-B9C5-4215-9FF9-DB559916FBA2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardNotify", "..\plugins\KeyboardNotify\KeyboardNotify.vcxproj", "{A9265E36-7F2D-440C-BF3E-F447FDB6200F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AddContactPlus", "..\plugins\AddContactPlus\addcontactplus.vcxproj", "{253ADD1D-F7C9-4643-A957-51BFCD61A5D2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleStatusMsg", "..\plugins\SimpleStatusMsg\simplestatusmsg.vcxproj", "{D3D80E27-D099-41EC-AFB2-A891A33F1608}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClientChangeNotify", "..\plugins\ClientChangeNotify\ClientChangeNotify.vcxproj", "{6A1969EA-9657-4828-93E0-8D21A970F868}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ListeningTo", "..\plugins\ListeningTo\listeningto.vcxproj", "{5FAA475D-0593-454F-8601-0D7150DCA4A0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Omegle", "..\protocols\Omegle\omegle.vcxproj", "{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugins\RecentContacts\RecentContacts.vcxproj", "{07137F45-8B5F-4561-BEC8-B883E9123785}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChangeKeyboardLayout", "..\plugins\ChangeKeyboardLayout\ChangeKeyboardLayout.vcxproj", "{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopToolBar", "..\plugins\TopToolBar\TopToolBar.vcxproj", "{ECE691D0-BFB3-483B-A699-084269EFCE89}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyrTranslit", "..\plugins\CyrTranslit\CyrTranslit.vcxproj", "{0BB52326-02D5-4698-A180-24078DA5DA0E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_modern", "..\plugins\Clist_modern\clist_modern.vcxproj", "{D9057E63-AAAA-4FE7-800A-20C02F4761F3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EkHtml", "..\plugins\MirOTR\ekhtml\ekhtml_17.vcxproj", "{2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Libgcrypt", "..\plugins\MirOTR\Libgcrypt\Libgcrypt_17.vcxproj", "{40FE7861-E54E-4DA9-BE4D-A5178014E477}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libotr", "..\plugins\MirOTR\libotr\libotr_17.vcxproj", "{1423FC8F-AA52-4562-8275-4BF0838CA378}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirOTR", "..\plugins\MirOTR\MirOTR_17.vcxproj", "{53F841E8-284F-4545-9176-B131896E43F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewEventNotify", "..\plugins\NewEventNotify\neweventnotify.vcxproj", "{2E0A2793-94C3-82E7-2AB0-FD421816CFBF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhoUsesMyFiles", "..\plugins\WhoUsesMyFiles\wumf.vcxproj", "{F29CCB9B-79CF-4341-AA05-3626A036D3E3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CryptoPP", "..\plugins\CryptoPP\cryptopp_17.vcxproj", "{4AC1E062-0236-4E49-AA04-F732043D2DCF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cryptlib", "..\plugins\CryptoPP\crypto\cryptlib_17.vcxproj", "{290C5ED4-71A7-4040-AD26-4820CF7A9E60}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserInfo", "..\src\core\stduserinfo\stduserinfo.vcxproj", "{1C856B14-54CD-4D07-B18B-5F7DB073AB51}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdEmail", "..\src\core\stdemail\stdemail.vcxproj", "{A5B558C6-C767-11E1-A335-F6EB6188709B}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdFile", "..\src\core\stdfile\stdfile.vcxproj", "{6022990D-3FD5-46A9-8AB5-E444C51646F3}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAutoAway", "..\src\core\stdautoaway\stdautoaway.vcxproj", "{A8F23706-E590-4A87-96CC-5F8E5082503F}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUIHist", "..\src\core\stduihist\stduihist.vcxproj", "{DADAC956-3A54-440A-8B56-A07234DEE861}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdUserOnline", "..\src\core\stduseronline\stduseronline.vcxproj", "{D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdAway", "..\src\core\stdaway\stdaway.vcxproj", "{C14D6E0D-810E-4599-A6E0-17298AFA0501}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdClist", "..\src\core\stdclist\stdclist.vcxproj", "{E71C1722-A41D-4475-87F4-29961A3654BB}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdMsg", "..\src\core\stdmsg\stdmsg.vcxproj", "{F47EAB99-C78F-4A92-87D5-B0E16FE5A133}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdCrypt", "..\src\core\stdcrypt\stdcrypt.vcxproj", "{8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}" + ProjectSection(ProjectDependencies) = postProject + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmdLine", "..\plugins\CmdLine\CmdLine.vcxproj", "{73BA9CA5-640D-4F30-A157-A73557A25F98}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MimCmd", "..\plugins\MimCmd\MimCmd.vcxproj", "{1E3BB48A-FFBC-4A03-8C43-9124A484BE51}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTPFile", "..\plugins\FTPFileYM\ftpfile.vcxproj", "{73482497-9F57-4819-A9AB-5D841A9F072D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PasteIt", "..\plugins\PasteIt\PasteIt.vcxproj", "{BAEBC482-CDA9-4053-A7D0-08222E85118E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendSS", "..\plugins\SendScreenshotPlus\SendSS.vcxproj", "{CEAD8BCF-1F22-4E00-9F6D-E33405B00552}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbEditorPP", "..\plugins\DbeditorPP\dbeditorpp.vcxproj", "{9C6040B8-1173-40FA-A3DB-DE044CCD8250}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrashDumper", "..\plugins\CrashDumper\crshdmp.vcxproj", "{576EEEFD-E423-482B-879A-F0515D40B8E1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenFolder", "..\plugins\OpenFolder\openFolder.vcxproj", "{8D233B9A-2744-4B62-94FC-7872FDDA4683}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyDetails", "..\plugins\MyDetails\mydetails.vcxproj", "{A4855451-6447-437C-B024-B36C3C7901EA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Msg_Export", "..\plugins\Msg_Export\msg_export.vcxproj", "{4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StopSpamMod", "..\plugins\StopSpamMod\stopspam_mod.vcxproj", "{0FF6989B-880A-4C3F-B69D-AFF93296044D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Watrack_MPD", "..\plugins\watrack_mpd\watrack_mpd.vcxproj", "{A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginUpdater", "..\plugins\PluginUpdater\PluginUpdater.vcxproj", "{21F6C0E4-DD1A-49E6-82FD-64574BB902BD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PManagerEx", "..\plugins\ProfileManager\pmanagerEx.vcxproj", "{728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Restart", "..\plugins\Restart\Restart.vcxproj", "{18195F68-A747-8643-050C-C5101DA658FD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrafficCounter", "..\plugins\TrafficCounter\TrafficCounter.vcxproj", "{885010EA-D008-4E38-85D4-487693F0BA00}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackUpdater", "..\plugins\PackUpdater\PackUpdater.vcxproj", "{20413125-4D68-4751-8062-DDA026DDABF1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickContacts", "..\plugins\QuickContacts\quickcontacts.vcxproj", "{7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MobileState", "..\plugins\MobileState\mobilestate.vcxproj", "{AE677E3A-DAC5-42FD-8762-47370C57639B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NoHistory", "..\plugins\NoHistory\NoHistory.vcxproj", "{ABF05E2C-C335-4BD1-8C3E-4C63285362CF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YAMN", "..\protocols\YAMN\YAMN.vcxproj", "{C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewsAggregator", "..\protocols\NewsAggregator\NewsAggregator.vcxproj", "{6DE11A47-2268-4B08-8DE5-15A1705FCE28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CurrencyRates", "..\protocols\CurrencyRates\Forex.vcxproj", "{C619A811-8023-4441-B3D7-785388A09DF0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Weather", "..\protocols\Weather\weather.vcxproj", "{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ping", "..\plugins\Ping\ping.vcxproj", "{F31BD1B6-EE9D-4F76-A047-F8AEADC26086}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fingerprint", "..\plugins\FingerprintNG\fingerprint_ng.vcxproj", "{AF7D71D4-19B7-42B8-91DD-701F155AC4AE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssocMgr", "..\plugins\AssocMgr\assocmgr.vcxproj", "{B57D997C-73E1-D5F7-ECCA-C204345C04A3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoRun", "..\plugins\AutoRun\autorun.vcxproj", "{00037ACC-F32D-4B5F-93A8-3CF0E277E377}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoShutdown", "..\plugins\AutoShutdown\shutdown.vcxproj", "{3F8EF54D-0593-4048-B0E5-C938F99B29F3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AvatarHistory", "..\plugins\AvatarHistory\AvatarHistory.vcxproj", "{9D702039-F4A9-4978-92B3-3615E5C44BEE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicHistory", "..\plugins\BasicHistory\BasicHistory.vcxproj", "{155211F8-08E1-4864-A3B8-9F04F4270360}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BASS_interface", "..\plugins\BASS_interface\Bass_interface.vcxproj", "{3933E789-D185-41DC-8169-9FF4365B6015}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Clist_blind", "..\plugins\Clist_blind\Clist_blind.vcxproj", "{2E15C462-A150-4A37-ACD6-FBAECF1724F5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartPosition", "..\plugins\StartPosition\StartPosition.vcxproj", "{046C5F80-ABE5-488F-BFC8-B024D4AACC8C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HTTPServer", "..\plugins\HTTPServer\HTTPServer_17.vcxproj", "{F7A70398-AFA0-4A58-B645-85268F9517DE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pu_stub", "..\plugins\PluginUpdater\pu_stub\pu_stub.vcxproj", "{121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotifyAnything", "..\plugins\NotifyAnything\NotifyAnything.vcxproj", "{F5E3FAFE-B650-4736-8D27-FA53866668C6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "..\libs\libcurl\libcurl.vcxproj", "{01F9E227-06F5-4BED-907F-402CA7DFAFE6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusChange", "..\plugins\StatusChange\StatusChange.vcxproj", "{D09881C7-E189-49AD-919E-F64355F8EFD0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BuddyPounce", "..\plugins\BuddyPounce\buddypounce.vcxproj", "{FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MsgPopup", "..\plugins\MsgPopup\MsgPopup.vcxproj", "{1E702CF1-E52F-49F8-915A-FCBBCE554774}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NimContact", "..\protocols\Non-IM Contact\nimcontact.vcxproj", "{A556E0B5-73A1-4676-BA1F-133820DE7D5A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XSoundNotify", "..\plugins\XSoundNotify\XSoundNotify.vcxproj", "{5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YARelay", "..\plugins\YARelay\YARelay.vcxproj", "{AA5CA2D0-F096-4001-B1B6-439C7FC11E77}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeStatusChange", "..\plugins\SkypeStatusChange\SkypeStatusChange.vcxproj", "{10F78F26-2B20-4158-869F-CB29533B4C2C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wbOSD", "..\plugins\wbOSD\wbOSD.vcxproj", "{DA450122-7F0B-45DA-9EAA-421887AD8450}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "New_GPG", "..\plugins\New_GPG\new_gpg.vcxproj", "{F29D0C8D-141A-43CF-86B2-34A04653F8D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spamotron", "..\plugins\Spamotron\Spamotron.vcxproj", "{DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LotusNotify", "..\protocols\LotusNotify\LotusNotify.vcxproj", "{0E046380-14CA-4C23-A807-8C678519A605}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConnectionNotify", "..\protocols\ConnectionNotify\ConnectionNotify.vcxproj", "{3C83B0AB-9739-41C1-A127-ED7DB9551F76}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Exchange", "..\plugins\Exchange\Exchange.vcxproj", "{F462FDA1-BDCD-49B2-B996-D7DE71D07393}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebView", "..\protocols\WebView\webview.vcxproj", "{475ED6ED-C311-4188-ACB2-1C41830B22EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShlExt", "..\plugins\ShellExt\shellext.vcxproj", "{B27B85B5-0EF1-496D-99D7-0702A98A342A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinterSpeak", "..\plugins\WinterSpeak\WinterSpeak.vcxproj", "{A44F96D0-A850-4A67-9570-0E9298A16E40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKontakte", "..\protocols\VKontakte\vk.vcxproj", "{BF6E1942-7E42-4564-9DF5-FD0A00D71173}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StartupSilence", "..\plugins\StartupSilence\StartupSilence.vcxproj", "{7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirandaG15", "..\plugins\MirandaG15\MirandaG15.vcxproj", "{8ACA3C8B-BDFA-47B2-8578-069555BA05B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RemovePersonalSettings", "..\plugins\RemovePersonalSettings\rps.vcxproj", "{0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewAwaySys", "..\plugins\NewAwaySysMod\NewAwaySys.vcxproj", "{6A516E27-AC50-5374-756B-A1558DB2EFA9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryStats", "..\plugins\HistoryStats\historystats.vcxproj", "{B5BCDC2F-81FC-4324-90C6-E5540A225EFF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sametime", "..\protocols\Sametime\sametime.vcxproj", "{BE22A21F-73B7-453F-86A0-B867F0056490}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glib", "..\protocols\Sametime\src\glib\glib_17.vcxproj", "{12BCA020-EABF-429E-876A-A476BC9C10C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GmailNotifier", "..\protocols\GmailNotifier\GmailNotifier.vcxproj", "{EDAAD28B-505B-4969-A8BB-97EAE818DEEA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Pcre16", "..\libs\Pcre16\pcre16.vcxproj", "{6124E997-426E-4A0B-9617-D6D577D5E7D7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IEHistory", "..\plugins\IEHistory\IEHistory.vcxproj", "{7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dummy", "..\protocols\Dummy\dummy.vcxproj", "{D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Steam", "..\protocols\Steam\Steam.vcxproj", "{8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HwHotKeys", "..\plugins\HwHotKeys\HwHotKeys.vcxproj", "{639E2B3A-64F2-4152-B5BB-12468E5D60B6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkypeWeb", "..\protocols\SkypeWeb\SkypeWeb.vcxproj", "{66A9BDEB-150F-45DC-B20F-9892C0B43834}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tox", "..\protocols\Tox\Tox.vcxproj", "{BCFAB658-326E-466D-995B-E76636C1DEA4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinecraftDynmap", "..\protocols\MinecraftDynmap\MinecraftDynmap.vcxproj", "{B4327D10-ACDC-4C12-9555-749DD49A7BB0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroSwitch", "..\plugins\ZeroSwitch\ZeroSwitch.vcxproj", "{D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MessageState", "..\plugins\MessageState\MessageState.vcxproj", "{D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirLua", "..\plugins\MirLua\MirLua.vcxproj", "{27D41D81-991F-4DC6-8749-B0321C87E694}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toaster", "..\plugins\Toaster\Toaster.vcxproj", "{1FDBD8F0-3929-41BC-92D1-020779460769}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\libs\liblua\liblua.vcxproj", "{BD291BF0-D804-4818-8311-DE871E6BCEAA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winapi", "..\plugins\MirLua\Modules\WinAPI\WinAPI.vcxproj", "{045BAC91-34D1-4B43-B52B-566801BE7F85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hunspell", "..\libs\hunspell\hunspell.vcxproj", "{B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_popup", "..\plugins\MirLua\Modules\m_popup\m_popup.vcxproj", "{D5C9CA74-4E25-478A-B890-75EB13E6DB1C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_variables", "..\plugins\MirLua\Modules\m_variables\m_variables.vcxproj", "{E604CD58-4579-4F69-9D6A-2605FD7CF716}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StatusManager", "..\plugins\StatusManager\StatusManager.vcxproj", "{D2EF305F-5255-49E8-A738-D4206D62D2B8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CloudFile", "..\protocols\CloudFile\CloudFile.vcxproj", "{E876FE63-0701-4CDA-BED5-7C73A379C1D1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_schedule", "..\plugins\MirLua\Modules\m_schedule\m_schedule.vcxproj", "{FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m_toptoolbar", "..\plugins\MirLua\Modules\m_toptoolbar\m_toptoolbar.vcxproj", "{277E433F-7D71-4247-8AAA-CC5FB1AA7A67}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsSingleWindow", "..\plugins\AsSingleWindow\AsSingleWindow.vcxproj", "{CE6A5A24-EA88-4E67-BDF2-22517528E43F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "..\libs\sqlite3\sqlite3.vcxproj", "{0C02E395-E73F-47E3-8B95-B7924C0C7A6A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsodium", "..\libs\libsodium\libsodium.vcxproj", "{A185B162-6CB6-4502-B03F-B56F7699A8D9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtox", "..\protocols\Tox\libtox\libtox.vcxproj", "{A21C50CD-28A6-481A-A12B-47189FE66641}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileAsMessage", "..\plugins\FileAsMessage\fileecho.vcxproj", "{D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EmLanProto", "..\protocols\EmLanProto\emlanproto.vcxproj", "{2115FEBC-1EC4-4F95-A058-A523ED5295A4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_mdbx", "..\plugins\Dbx_mdbx\dbx_mdbx.vcxproj", "{E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQCorp", "..\protocols\ICQCorp\ICQCorp.vcxproj", "{AD0D0500-CE7D-417D-9C36-3620D56CA6D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeImage", "..\libs\freeimage\freeimage.vcxproj", "{5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MagneticWindows", "..\plugins\MagneticWindows\MagneticWindows.vcxproj", "{7DC23E4E-2448-4811-AABD-F5D069F6E74A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Protocols", "Protocols", "{A035B524-0F2D-45D0-BCF2-3C20279C77E2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{E7FB43FB-3563-4568-8846-A88FC37449BF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{37EDFBEA-8446-4BF3-9F2E-655908CDFB62}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua", "Lua", "{329B4E94-C846-4C78-AFD5-8B6B839DCCE1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Database", "Database", "{F13387B0-1C74-48EC-9AEC-65E3B9DE29E4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Message edtors", "Message edtors", "{D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Contact lists", "Contact lists", "{F9C41695-3353-4564-A154-58106829B19C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Encryption", "Encryption", "{30218E20-9E62-4027-BB87-2627B17F6CA3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notifications", "Notifications", "{703CFA44-C8E8-4547-B597-AE239F4F6DD9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProxySwitch", "..\plugins\ProxySwitch\ProxySwitch.vcxproj", "{7446276D-5845-4258-A245-83D1D4D3CEC3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dbx_sqlite", "..\plugins\Dbx_sqlite\dbx_sqlite.vcxproj", "{B3494FED-FB8C-43F4-B341-F26A3460203B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ICQ", "..\protocols\ICQ-WIM\ICQ-WIM.vcxproj", "{EFB2355B-82B3-4759-B7D8-95F8E9506291}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh2", "..\libs\libssh2\libssh2.vcxproj", "{B3BC3949-6949-41DE-94BF-B112FBFB1A84}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StdPopup", "..\src\core\stdpopup\stdpopup.vcxproj", "{713067DF-65EE-480B-A000-B2A323495F16}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NotesReminders", "..\plugins\NotesAndReminders\NotesReminders.vcxproj", "{EEB57129-946C-4B98-8856-FDA501AE2A5E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsignal", "..\libs\libsignal\libsignal.vcxproj", "{620E0BE7-3763-4F35-9DBD-4770104E269C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Facebook", "..\protocols\Facebook\facebook.vcxproj", "{86033E58-A1E3-43AD-AE8E-305E15E72A91}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewStory", "..\plugins\NewStory\NewStory.vcxproj", "{A7FAD273-8C71-4D72-A84F-2D160F2DC589}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DbChecker", "..\plugins\DbChecker\dbchecker.vcxproj", "{A2E9DA24-95E4-4414-94AF-488A382E276A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickSearch", "..\plugins\QuickSearch\quicksearch.vcxproj", "{3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmdbx", "..\libs\libmdbx\libmdbx.vcxproj", "{6D19209B-ECE7-4B9C-941C-0AA2B484F199}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MirFox", "..\plugins\MirFox\MirFoxNG_17.vcxproj", "{3E9DA555-4C7B-463C-AD5C-214073DE29D6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads", "..\libs\pthreads\pthreads.vcxproj", "{E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoiceService", "..\plugins\VoiceService\VoiceService.vcxproj", "{48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libqrencode", "..\libs\libqrencode\libqrencode.vcxproj", "{4D3554DE-6E14-4F94-A909-A4B19151A47E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WhatsApp", "..\protocols\WhatsApp\WhatsApp.vcxproj", "{13E796AD-BEA4-4213-A1B8-E18E2397E544}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Telegram", "..\protocols\Telegram\Telegram.vcxproj", "{AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.ActiveCfg = Debug|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|Win32.Build.0 = Debug|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.ActiveCfg = Debug|x64 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Debug|x64.Build.0 = Debug|x64 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.ActiveCfg = Release|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|Win32.Build.0 = Release|Win32 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.ActiveCfg = Release|x64 + {F9916510-9055-4C9F-997A-3755DEC1511B}.Release|x64.Build.0 = Release|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|Win32.Build.0 = Debug|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.ActiveCfg = Debug|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Debug|x64.Build.0 = Debug|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.ActiveCfg = Release|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|Win32.Build.0 = Release|Win32 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.ActiveCfg = Release|x64 + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60}.Release|x64.Build.0 = Release|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|Win32.Build.0 = Debug|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.ActiveCfg = Debug|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Debug|x64.Build.0 = Debug|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.ActiveCfg = Release|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|Win32.Build.0 = Release|Win32 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.ActiveCfg = Release|x64 + {538E451F-E667-4D07-BCE6-976ECC7BB8D1}.Release|x64.Build.0 = Release|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.ActiveCfg = Debug|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|Win32.Build.0 = Debug|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.ActiveCfg = Debug|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Debug|x64.Build.0 = Debug|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.ActiveCfg = Release|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|Win32.Build.0 = Release|Win32 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.ActiveCfg = Release|x64 + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7}.Release|x64.Build.0 = Release|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.ActiveCfg = Debug|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|Win32.Build.0 = Debug|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.ActiveCfg = Debug|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Debug|x64.Build.0 = Debug|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.ActiveCfg = Release|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|Win32.Build.0 = Release|Win32 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.ActiveCfg = Release|x64 + {7711F563-6473-4ABD-B5E3-477CE8384AD6}.Release|x64.Build.0 = Release|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.ActiveCfg = Debug|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|Win32.Build.0 = Debug|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.ActiveCfg = Debug|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Debug|x64.Build.0 = Debug|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.ActiveCfg = Release|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|Win32.Build.0 = Release|Win32 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.ActiveCfg = Release|x64 + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C}.Release|x64.Build.0 = Release|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.Build.0 = Debug|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.ActiveCfg = Debug|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.Build.0 = Debug|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.ActiveCfg = Release|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.Build.0 = Release|Win32 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.ActiveCfg = Release|x64 + {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.Build.0 = Release|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.ActiveCfg = Debug|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.Build.0 = Debug|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.ActiveCfg = Debug|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.Build.0 = Debug|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.ActiveCfg = Release|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.Build.0 = Release|Win32 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.ActiveCfg = Release|x64 + {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.Build.0 = Release|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.ActiveCfg = Debug|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|Win32.Build.0 = Debug|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.ActiveCfg = Debug|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Debug|x64.Build.0 = Debug|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.ActiveCfg = Release|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|Win32.Build.0 = Release|Win32 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.ActiveCfg = Release|x64 + {B8928210-546C-4AE3-956B-E2B724E6B8E5}.Release|x64.Build.0 = Release|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.ActiveCfg = Debug|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|Win32.Build.0 = Debug|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.ActiveCfg = Debug|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Debug|x64.Build.0 = Debug|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.ActiveCfg = Release|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|Win32.Build.0 = Release|Win32 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.ActiveCfg = Release|x64 + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7}.Release|x64.Build.0 = Release|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|Win32.Build.0 = Debug|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.ActiveCfg = Debug|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Debug|x64.Build.0 = Debug|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.ActiveCfg = Release|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|Win32.Build.0 = Release|Win32 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.ActiveCfg = Release|x64 + {6DA1396F-2A44-4D5C-8442-012F71006217}.Release|x64.Build.0 = Release|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|Win32.Build.0 = Debug|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.ActiveCfg = Debug|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Debug|x64.Build.0 = Debug|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.ActiveCfg = Release|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|Win32.Build.0 = Release|Win32 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.ActiveCfg = Release|x64 + {3A12F777-56A8-42EC-BD17-8F325524241E}.Release|x64.Build.0 = Release|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.ActiveCfg = Debug|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|Win32.Build.0 = Debug|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.ActiveCfg = Debug|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Debug|x64.Build.0 = Debug|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.ActiveCfg = Release|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Release|Win32.Build.0 = Release|Win32 + {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.ActiveCfg = Release|x64 + {33276462-8313-4192-8306-13717ECCA60A}.Release|x64.Build.0 = Release|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|Win32.Build.0 = Debug|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.ActiveCfg = Debug|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Debug|x64.Build.0 = Debug|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.ActiveCfg = Release|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|Win32.Build.0 = Release|Win32 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.ActiveCfg = Release|x64 + {3C42510C-A29E-4A53-899C-203BFA874E0B}.Release|x64.Build.0 = Release|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.ActiveCfg = Debug|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|Win32.Build.0 = Debug|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.ActiveCfg = Debug|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Debug|x64.Build.0 = Debug|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.ActiveCfg = Release|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|Win32.Build.0 = Release|Win32 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.ActiveCfg = Release|x64 + {987F026D-EB1F-4013-ADA8-2406ACCDA526}.Release|x64.Build.0 = Release|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.ActiveCfg = Debug|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|Win32.Build.0 = Debug|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.ActiveCfg = Debug|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Debug|x64.Build.0 = Debug|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.ActiveCfg = Release|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|Win32.Build.0 = Release|Win32 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.ActiveCfg = Release|x64 + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28}.Release|x64.Build.0 = Release|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.ActiveCfg = Debug|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|Win32.Build.0 = Debug|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.ActiveCfg = Debug|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Debug|x64.Build.0 = Debug|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.ActiveCfg = Release|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|Win32.Build.0 = Release|Win32 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.ActiveCfg = Release|x64 + {98DF7761-41D7-4C5C-9FFE-E5CCB3997783}.Release|x64.Build.0 = Release|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.ActiveCfg = Debug|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|Win32.Build.0 = Debug|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.ActiveCfg = Debug|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Debug|x64.Build.0 = Debug|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.ActiveCfg = Release|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|Win32.Build.0 = Release|Win32 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.ActiveCfg = Release|x64 + {88E47CF7-7B40-4312-A35A-9B28885FFED9}.Release|x64.Build.0 = Release|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.ActiveCfg = Debug|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|Win32.Build.0 = Debug|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.ActiveCfg = Debug|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Debug|x64.Build.0 = Debug|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.ActiveCfg = Release|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|Win32.Build.0 = Release|Win32 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.ActiveCfg = Release|x64 + {8CEBD7AC-CD02-4BEC-B889-A7243F3E5DD8}.Release|x64.Build.0 = Release|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.ActiveCfg = Debug|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|Win32.Build.0 = Debug|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.ActiveCfg = Debug|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Debug|x64.Build.0 = Debug|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.ActiveCfg = Release|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|Win32.Build.0 = Release|Win32 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.ActiveCfg = Release|x64 + {A231E008-2D1A-4F24-95DD-59F56F85A499}.Release|x64.Build.0 = Release|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|Win32.Build.0 = Debug|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.ActiveCfg = Debug|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Debug|x64.Build.0 = Debug|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.ActiveCfg = Release|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|Win32.Build.0 = Release|Win32 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.ActiveCfg = Release|x64 + {F4F2FD25-1553-FB72-F695-0701D20C3168}.Release|x64.Build.0 = Release|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|Win32.Build.0 = Debug|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.ActiveCfg = Debug|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Debug|x64.Build.0 = Debug|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.ActiveCfg = Release|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|Win32.Build.0 = Release|Win32 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.ActiveCfg = Release|x64 + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61}.Release|x64.Build.0 = Release|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|Win32.Build.0 = Debug|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.ActiveCfg = Debug|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Debug|x64.Build.0 = Debug|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.ActiveCfg = Release|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.Build.0 = Release|Win32 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.ActiveCfg = Release|x64 + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|x64.Build.0 = Release|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.ActiveCfg = Debug|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.Build.0 = Debug|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.ActiveCfg = Debug|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.Build.0 = Debug|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.ActiveCfg = Release|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.Build.0 = Release|Win32 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.ActiveCfg = Release|x64 + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.Build.0 = Release|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.ActiveCfg = Debug|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|Win32.Build.0 = Debug|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.ActiveCfg = Debug|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Debug|x64.Build.0 = Debug|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.ActiveCfg = Release|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|Win32.Build.0 = Release|Win32 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.ActiveCfg = Release|x64 + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A}.Release|x64.Build.0 = Release|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.ActiveCfg = Debug|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|Win32.Build.0 = Debug|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.ActiveCfg = Debug|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Debug|x64.Build.0 = Debug|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.ActiveCfg = Release|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|Win32.Build.0 = Release|Win32 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.ActiveCfg = Release|x64 + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856}.Release|x64.Build.0 = Release|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|Win32.Build.0 = Debug|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.ActiveCfg = Debug|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Debug|x64.Build.0 = Debug|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.ActiveCfg = Release|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|Win32.Build.0 = Release|Win32 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.ActiveCfg = Release|x64 + {019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}.Release|x64.Build.0 = Release|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.ActiveCfg = Debug|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|Win32.Build.0 = Debug|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.ActiveCfg = Debug|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Debug|x64.Build.0 = Debug|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.ActiveCfg = Release|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|Win32.Build.0 = Release|Win32 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.ActiveCfg = Release|x64 + {850EC838-0EAD-45EB-6F1B-16DC90DCE18D}.Release|x64.Build.0 = Release|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.ActiveCfg = Debug|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|Win32.Build.0 = Debug|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.ActiveCfg = Debug|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Debug|x64.Build.0 = Debug|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.ActiveCfg = Release|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|Win32.Build.0 = Release|Win32 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.ActiveCfg = Release|x64 + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445}.Release|x64.Build.0 = Release|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.ActiveCfg = Debug|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|Win32.Build.0 = Debug|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.ActiveCfg = Debug|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Debug|x64.Build.0 = Debug|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.ActiveCfg = Release|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|Win32.Build.0 = Release|Win32 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.ActiveCfg = Release|x64 + {B988F96C-F87A-484C-AB15-D0674B22F291}.Release|x64.Build.0 = Release|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.ActiveCfg = Debug|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|Win32.Build.0 = Debug|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.ActiveCfg = Debug|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Debug|x64.Build.0 = Debug|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.ActiveCfg = Release|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|Win32.Build.0 = Release|Win32 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.ActiveCfg = Release|x64 + {214F211F-1A2B-4F79-8993-B8DEE2EF7441}.Release|x64.Build.0 = Release|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|Win32.Build.0 = Debug|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.ActiveCfg = Debug|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Debug|x64.Build.0 = Debug|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.ActiveCfg = Release|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|Win32.Build.0 = Release|Win32 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.ActiveCfg = Release|x64 + {210DD88D-649B-4695-8C5F-898A4F60A8CE}.Release|x64.Build.0 = Release|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.ActiveCfg = Debug|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|Win32.Build.0 = Debug|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.ActiveCfg = Debug|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Debug|x64.Build.0 = Debug|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.ActiveCfg = Release|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|Win32.Build.0 = Release|Win32 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.ActiveCfg = Release|x64 + {E26D2311-C164-48CF-BA24-5CEDA873D1B2}.Release|x64.Build.0 = Release|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.ActiveCfg = Debug|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|Win32.Build.0 = Debug|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.ActiveCfg = Debug|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Debug|x64.Build.0 = Debug|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.ActiveCfg = Release|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|Win32.Build.0 = Release|Win32 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.ActiveCfg = Release|x64 + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260}.Release|x64.Build.0 = Release|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.ActiveCfg = Debug|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|Win32.Build.0 = Debug|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.ActiveCfg = Debug|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Debug|x64.Build.0 = Debug|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.ActiveCfg = Release|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|Win32.Build.0 = Release|Win32 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.ActiveCfg = Release|x64 + {8190CFAA-3B73-43D8-9101-8368E21F1864}.Release|x64.Build.0 = Release|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.ActiveCfg = Debug|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|Win32.Build.0 = Debug|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.ActiveCfg = Debug|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Debug|x64.Build.0 = Debug|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.ActiveCfg = Release|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|Win32.Build.0 = Release|Win32 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.ActiveCfg = Release|x64 + {726460C7-E1F1-4C37-B64F-DA8A8DD26D70}.Release|x64.Build.0 = Release|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|Win32.Build.0 = Debug|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.ActiveCfg = Debug|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Debug|x64.Build.0 = Debug|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.ActiveCfg = Release|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|Win32.Build.0 = Release|Win32 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.ActiveCfg = Release|x64 + {DD76B998-ED0D-4BFD-9660-3ADC3A334872}.Release|x64.Build.0 = Release|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.ActiveCfg = Debug|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|Win32.Build.0 = Debug|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.ActiveCfg = Debug|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Debug|x64.Build.0 = Debug|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.ActiveCfg = Release|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|Win32.Build.0 = Release|Win32 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.ActiveCfg = Release|x64 + {27CA5499-B3F2-4FB6-8414-651819B0B96C}.Release|x64.Build.0 = Release|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.ActiveCfg = Debug|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|Win32.Build.0 = Debug|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.ActiveCfg = Debug|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Debug|x64.Build.0 = Debug|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.ActiveCfg = Release|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|Win32.Build.0 = Release|Win32 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.ActiveCfg = Release|x64 + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5}.Release|x64.Build.0 = Release|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|Win32.Build.0 = Debug|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.ActiveCfg = Debug|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Debug|x64.Build.0 = Debug|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.ActiveCfg = Release|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|Win32.Build.0 = Release|Win32 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.ActiveCfg = Release|x64 + {4ADADECA-99D7-410D-8127-CB27210DCC6A}.Release|x64.Build.0 = Release|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|Win32.Build.0 = Debug|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.ActiveCfg = Debug|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Debug|x64.Build.0 = Debug|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.ActiveCfg = Release|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|Win32.Build.0 = Release|Win32 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.ActiveCfg = Release|x64 + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}.Release|x64.Build.0 = Release|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|Win32.Build.0 = Debug|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.ActiveCfg = Debug|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Debug|x64.Build.0 = Debug|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.ActiveCfg = Release|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|Win32.Build.0 = Release|Win32 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.ActiveCfg = Release|x64 + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9}.Release|x64.Build.0 = Release|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.ActiveCfg = Debug|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|Win32.Build.0 = Debug|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.ActiveCfg = Debug|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Debug|x64.Build.0 = Debug|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.ActiveCfg = Release|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|Win32.Build.0 = Release|Win32 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.ActiveCfg = Release|x64 + {06C44834-7B7A-4074-A6D8-7F163B3FF707}.Release|x64.Build.0 = Release|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.ActiveCfg = Debug|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|Win32.Build.0 = Debug|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.ActiveCfg = Debug|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Debug|x64.Build.0 = Debug|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.ActiveCfg = Release|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|Win32.Build.0 = Release|Win32 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.ActiveCfg = Release|x64 + {5BBA7E51-B494-4462-BC4F-1AE5F57F9857}.Release|x64.Build.0 = Release|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|Win32.Build.0 = Debug|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.ActiveCfg = Debug|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Debug|x64.Build.0 = Debug|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.ActiveCfg = Release|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|Win32.Build.0 = Release|Win32 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.ActiveCfg = Release|x64 + {5A6095F4-B037-4DA8-8410-8004A90C961A}.Release|x64.Build.0 = Release|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|Win32.Build.0 = Debug|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.ActiveCfg = Debug|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Debug|x64.Build.0 = Debug|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.ActiveCfg = Release|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|Win32.Build.0 = Release|Win32 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.ActiveCfg = Release|x64 + {3E6CEC79-5E93-4607-B10E-498586ECF6A6}.Release|x64.Build.0 = Release|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.Build.0 = Debug|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.ActiveCfg = Debug|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.Build.0 = Debug|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.ActiveCfg = Release|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.Build.0 = Release|Win32 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.ActiveCfg = Release|x64 + {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.Build.0 = Release|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.ActiveCfg = Debug|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|Win32.Build.0 = Debug|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.ActiveCfg = Debug|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Debug|x64.Build.0 = Debug|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.ActiveCfg = Release|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|Win32.Build.0 = Release|Win32 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.ActiveCfg = Release|x64 + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA}.Release|x64.Build.0 = Release|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.ActiveCfg = Debug|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|Win32.Build.0 = Debug|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.ActiveCfg = Debug|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Debug|x64.Build.0 = Debug|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.ActiveCfg = Release|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|Win32.Build.0 = Release|Win32 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.ActiveCfg = Release|x64 + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E}.Release|x64.Build.0 = Release|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.ActiveCfg = Debug|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|Win32.Build.0 = Debug|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.ActiveCfg = Debug|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Debug|x64.Build.0 = Debug|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.ActiveCfg = Release|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|Win32.Build.0 = Release|Win32 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.ActiveCfg = Release|x64 + {92E3BDEE-DD17-4619-AD61-70C0ADE04217}.Release|x64.Build.0 = Release|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|Win32.Build.0 = Debug|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.ActiveCfg = Debug|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Debug|x64.Build.0 = Debug|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.ActiveCfg = Release|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|Win32.Build.0 = Release|Win32 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.ActiveCfg = Release|x64 + {AD3B6CDC-7B26-4338-B6AE-0306DEDA0D6A}.Release|x64.Build.0 = Release|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.ActiveCfg = Debug|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|Win32.Build.0 = Debug|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.ActiveCfg = Debug|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Debug|x64.Build.0 = Debug|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.ActiveCfg = Release|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|Win32.Build.0 = Release|Win32 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.ActiveCfg = Release|x64 + {3038EF69-85BE-4D92-9864-CD6A5EBB558A}.Release|x64.Build.0 = Release|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.ActiveCfg = Debug|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|Win32.Build.0 = Debug|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.ActiveCfg = Debug|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Debug|x64.Build.0 = Debug|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.ActiveCfg = Release|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|Win32.Build.0 = Release|Win32 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.ActiveCfg = Release|x64 + {63E05ECA-0A63-479E-86BD-2CAF53869BDA}.Release|x64.Build.0 = Release|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.ActiveCfg = Debug|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|Win32.Build.0 = Debug|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.ActiveCfg = Debug|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Debug|x64.Build.0 = Debug|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.ActiveCfg = Release|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|Win32.Build.0 = Release|Win32 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.ActiveCfg = Release|x64 + {5DB86086-10E9-42E7-AC90-503D2678C2A2}.Release|x64.Build.0 = Release|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|Win32.Build.0 = Debug|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.ActiveCfg = Debug|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Debug|x64.Build.0 = Debug|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.ActiveCfg = Release|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|Win32.Build.0 = Release|Win32 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.ActiveCfg = Release|x64 + {5F09C93B-463A-4BF5-A85E-6E4E916AA8F8}.Release|x64.Build.0 = Release|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.ActiveCfg = Debug|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.Build.0 = Debug|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.ActiveCfg = Debug|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.Build.0 = Debug|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.ActiveCfg = Release|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|Win32.Build.0 = Release|Win32 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.ActiveCfg = Release|x64 + {E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Release|x64.Build.0 = Release|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.ActiveCfg = Debug|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|Win32.Build.0 = Debug|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.ActiveCfg = Debug|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Debug|x64.Build.0 = Debug|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.ActiveCfg = Release|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|Win32.Build.0 = Release|Win32 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.ActiveCfg = Release|x64 + {A9265E36-7F2D-440C-BF3E-F447FDB6200F}.Release|x64.Build.0 = Release|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.ActiveCfg = Debug|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|Win32.Build.0 = Debug|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.ActiveCfg = Debug|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Debug|x64.Build.0 = Debug|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.ActiveCfg = Release|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|Win32.Build.0 = Release|Win32 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.ActiveCfg = Release|x64 + {253ADD1D-F7C9-4643-A957-51BFCD61A5D2}.Release|x64.Build.0 = Release|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|Win32.Build.0 = Debug|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.ActiveCfg = Debug|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Debug|x64.Build.0 = Debug|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.ActiveCfg = Release|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|Win32.Build.0 = Release|Win32 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.ActiveCfg = Release|x64 + {D3D80E27-D099-41EC-AFB2-A891A33F1608}.Release|x64.Build.0 = Release|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|Win32.Build.0 = Debug|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.ActiveCfg = Debug|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Debug|x64.Build.0 = Debug|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.ActiveCfg = Release|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|Win32.Build.0 = Release|Win32 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.ActiveCfg = Release|x64 + {6A1969EA-9657-4828-93E0-8D21A970F868}.Release|x64.Build.0 = Release|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.ActiveCfg = Debug|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|Win32.Build.0 = Debug|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.ActiveCfg = Debug|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Debug|x64.Build.0 = Debug|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.ActiveCfg = Release|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.Build.0 = Release|Win32 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.ActiveCfg = Release|x64 + {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.Build.0 = Release|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.ActiveCfg = Debug|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.Build.0 = Debug|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.ActiveCfg = Debug|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.Build.0 = Debug|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.ActiveCfg = Release|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.Build.0 = Release|Win32 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.ActiveCfg = Release|x64 + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.Build.0 = Release|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.ActiveCfg = Debug|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.Build.0 = Debug|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.ActiveCfg = Debug|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.Build.0 = Debug|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.ActiveCfg = Release|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|Win32.Build.0 = Release|Win32 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.ActiveCfg = Release|x64 + {07137F45-8B5F-4561-BEC8-B883E9123785}.Release|x64.Build.0 = Release|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.ActiveCfg = Debug|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|Win32.Build.0 = Debug|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.ActiveCfg = Debug|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Debug|x64.Build.0 = Debug|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.ActiveCfg = Release|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|Win32.Build.0 = Release|Win32 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.ActiveCfg = Release|x64 + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598}.Release|x64.Build.0 = Release|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|Win32.Build.0 = Debug|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.ActiveCfg = Debug|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Debug|x64.Build.0 = Debug|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.ActiveCfg = Release|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|Win32.Build.0 = Release|Win32 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.ActiveCfg = Release|x64 + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4}.Release|x64.Build.0 = Release|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.ActiveCfg = Debug|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|Win32.Build.0 = Debug|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.ActiveCfg = Debug|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Debug|x64.Build.0 = Debug|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.ActiveCfg = Release|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|Win32.Build.0 = Release|Win32 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.ActiveCfg = Release|x64 + {ECE691D0-BFB3-483B-A699-084269EFCE89}.Release|x64.Build.0 = Release|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.ActiveCfg = Debug|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|Win32.Build.0 = Debug|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.ActiveCfg = Debug|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Debug|x64.Build.0 = Debug|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.ActiveCfg = Release|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|Win32.Build.0 = Release|Win32 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.ActiveCfg = Release|x64 + {0BB52326-02D5-4698-A180-24078DA5DA0E}.Release|x64.Build.0 = Release|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|Win32.Build.0 = Debug|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.ActiveCfg = Debug|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Debug|x64.Build.0 = Debug|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.ActiveCfg = Release|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|Win32.Build.0 = Release|Win32 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.ActiveCfg = Release|x64 + {D9057E63-AAAA-4FE7-800A-20C02F4761F3}.Release|x64.Build.0 = Release|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|Win32.Build.0 = Debug|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.ActiveCfg = Debug|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Debug|x64.Build.0 = Debug|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.ActiveCfg = Release|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|Win32.Build.0 = Release|Win32 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.ActiveCfg = Release|x64 + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8}.Release|x64.Build.0 = Release|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.ActiveCfg = Debug|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|Win32.Build.0 = Debug|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.ActiveCfg = Debug|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Debug|x64.Build.0 = Debug|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.ActiveCfg = Release|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|Win32.Build.0 = Release|Win32 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.ActiveCfg = Release|x64 + {40FE7861-E54E-4DA9-BE4D-A5178014E477}.Release|x64.Build.0 = Release|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.ActiveCfg = Debug|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|Win32.Build.0 = Debug|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.ActiveCfg = Debug|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Debug|x64.Build.0 = Debug|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.ActiveCfg = Release|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|Win32.Build.0 = Release|Win32 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.ActiveCfg = Release|x64 + {1423FC8F-AA52-4562-8275-4BF0838CA378}.Release|x64.Build.0 = Release|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|Win32.Build.0 = Debug|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.ActiveCfg = Debug|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Debug|x64.Build.0 = Debug|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.ActiveCfg = Release|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|Win32.Build.0 = Release|Win32 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.ActiveCfg = Release|x64 + {53F841E8-284F-4545-9176-B131896E43F8}.Release|x64.Build.0 = Release|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|Win32.Build.0 = Debug|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.ActiveCfg = Debug|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Debug|x64.Build.0 = Debug|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.ActiveCfg = Release|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|Win32.Build.0 = Release|Win32 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.ActiveCfg = Release|x64 + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF}.Release|x64.Build.0 = Release|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|Win32.Build.0 = Debug|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.ActiveCfg = Debug|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Debug|x64.Build.0 = Debug|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.ActiveCfg = Release|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|Win32.Build.0 = Release|Win32 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.ActiveCfg = Release|x64 + {F29CCB9B-79CF-4341-AA05-3626A036D3E3}.Release|x64.Build.0 = Release|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.ActiveCfg = Debug|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|Win32.Build.0 = Debug|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.ActiveCfg = Debug|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Debug|x64.Build.0 = Debug|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.ActiveCfg = Release|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|Win32.Build.0 = Release|Win32 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.ActiveCfg = Release|x64 + {4AC1E062-0236-4E49-AA04-F732043D2DCF}.Release|x64.Build.0 = Release|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.ActiveCfg = Debug|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|Win32.Build.0 = Debug|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.ActiveCfg = Debug|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Debug|x64.Build.0 = Debug|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.ActiveCfg = Release|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|Win32.Build.0 = Release|Win32 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.ActiveCfg = Release|x64 + {290C5ED4-71A7-4040-AD26-4820CF7A9E60}.Release|x64.Build.0 = Release|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.ActiveCfg = Debug|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|Win32.Build.0 = Debug|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.ActiveCfg = Debug|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Debug|x64.Build.0 = Debug|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.ActiveCfg = Release|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|Win32.Build.0 = Release|Win32 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.ActiveCfg = Release|x64 + {1C856B14-54CD-4D07-B18B-5F7DB073AB51}.Release|x64.Build.0 = Release|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.ActiveCfg = Debug|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|Win32.Build.0 = Debug|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.ActiveCfg = Debug|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Debug|x64.Build.0 = Debug|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.ActiveCfg = Release|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|Win32.Build.0 = Release|Win32 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.ActiveCfg = Release|x64 + {A5B558C6-C767-11E1-A335-F6EB6188709B}.Release|x64.Build.0 = Release|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|Win32.Build.0 = Debug|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.ActiveCfg = Debug|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Debug|x64.Build.0 = Debug|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.ActiveCfg = Release|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|Win32.Build.0 = Release|Win32 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.ActiveCfg = Release|x64 + {6022990D-3FD5-46A9-8AB5-E444C51646F3}.Release|x64.Build.0 = Release|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|Win32.Build.0 = Debug|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.ActiveCfg = Debug|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Debug|x64.Build.0 = Debug|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.ActiveCfg = Release|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|Win32.Build.0 = Release|Win32 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.ActiveCfg = Release|x64 + {A8F23706-E590-4A87-96CC-5F8E5082503F}.Release|x64.Build.0 = Release|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.ActiveCfg = Debug|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|Win32.Build.0 = Debug|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.ActiveCfg = Debug|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Debug|x64.Build.0 = Debug|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.ActiveCfg = Release|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|Win32.Build.0 = Release|Win32 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.ActiveCfg = Release|x64 + {DADAC956-3A54-440A-8B56-A07234DEE861}.Release|x64.Build.0 = Release|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.ActiveCfg = Debug|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|Win32.Build.0 = Debug|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.ActiveCfg = Debug|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Debug|x64.Build.0 = Debug|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.ActiveCfg = Release|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|Win32.Build.0 = Release|Win32 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.ActiveCfg = Release|x64 + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563}.Release|x64.Build.0 = Release|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.ActiveCfg = Debug|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|Win32.Build.0 = Debug|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.ActiveCfg = Debug|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Debug|x64.Build.0 = Debug|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.ActiveCfg = Release|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|Win32.Build.0 = Release|Win32 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.ActiveCfg = Release|x64 + {C14D6E0D-810E-4599-A6E0-17298AFA0501}.Release|x64.Build.0 = Release|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.ActiveCfg = Debug|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|Win32.Build.0 = Debug|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.ActiveCfg = Debug|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Debug|x64.Build.0 = Debug|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.ActiveCfg = Release|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|Win32.Build.0 = Release|Win32 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.ActiveCfg = Release|x64 + {E71C1722-A41D-4475-87F4-29961A3654BB}.Release|x64.Build.0 = Release|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.ActiveCfg = Debug|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|Win32.Build.0 = Debug|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.ActiveCfg = Debug|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Debug|x64.Build.0 = Debug|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.ActiveCfg = Release|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|Win32.Build.0 = Release|Win32 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.ActiveCfg = Release|x64 + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133}.Release|x64.Build.0 = Release|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.ActiveCfg = Debug|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|Win32.Build.0 = Debug|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.ActiveCfg = Debug|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Debug|x64.Build.0 = Debug|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.ActiveCfg = Release|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|Win32.Build.0 = Release|Win32 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.ActiveCfg = Release|x64 + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3}.Release|x64.Build.0 = Release|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.ActiveCfg = Debug|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|Win32.Build.0 = Debug|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.ActiveCfg = Debug|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Debug|x64.Build.0 = Debug|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.ActiveCfg = Release|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|Win32.Build.0 = Release|Win32 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.ActiveCfg = Release|x64 + {73BA9CA5-640D-4F30-A157-A73557A25F98}.Release|x64.Build.0 = Release|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|Win32.Build.0 = Debug|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.ActiveCfg = Debug|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Debug|x64.Build.0 = Debug|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.ActiveCfg = Release|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|Win32.Build.0 = Release|Win32 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.ActiveCfg = Release|x64 + {1E3BB48A-FFBC-4A03-8C43-9124A484BE51}.Release|x64.Build.0 = Release|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.ActiveCfg = Debug|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|Win32.Build.0 = Debug|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.ActiveCfg = Debug|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Debug|x64.Build.0 = Debug|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.ActiveCfg = Release|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|Win32.Build.0 = Release|Win32 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.ActiveCfg = Release|x64 + {73482497-9F57-4819-A9AB-5D841A9F072D}.Release|x64.Build.0 = Release|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.ActiveCfg = Debug|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|Win32.Build.0 = Debug|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.ActiveCfg = Debug|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Debug|x64.Build.0 = Debug|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.ActiveCfg = Release|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|Win32.Build.0 = Release|Win32 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.ActiveCfg = Release|x64 + {BAEBC482-CDA9-4053-A7D0-08222E85118E}.Release|x64.Build.0 = Release|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.ActiveCfg = Debug|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|Win32.Build.0 = Debug|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.ActiveCfg = Debug|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Debug|x64.Build.0 = Debug|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.ActiveCfg = Release|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|Win32.Build.0 = Release|Win32 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.ActiveCfg = Release|x64 + {CEAD8BCF-1F22-4E00-9F6D-E33405B00552}.Release|x64.Build.0 = Release|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.ActiveCfg = Debug|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|Win32.Build.0 = Debug|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.ActiveCfg = Debug|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Debug|x64.Build.0 = Debug|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.ActiveCfg = Release|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|Win32.Build.0 = Release|Win32 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.ActiveCfg = Release|x64 + {9C6040B8-1173-40FA-A3DB-DE044CCD8250}.Release|x64.Build.0 = Release|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|Win32.Build.0 = Debug|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.ActiveCfg = Debug|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Debug|x64.Build.0 = Debug|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.ActiveCfg = Release|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|Win32.Build.0 = Release|Win32 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.ActiveCfg = Release|x64 + {576EEEFD-E423-482B-879A-F0515D40B8E1}.Release|x64.Build.0 = Release|x64 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.ActiveCfg = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|Win32.Build.0 = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.ActiveCfg = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Debug|x64.Build.0 = Debug|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.ActiveCfg = Release|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|Win32.Build.0 = Release|Win32 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.ActiveCfg = Release|x64 + {8D233B9A-2744-4B62-94FC-7872FDDA4683}.Release|x64.Build.0 = Release|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.ActiveCfg = Debug|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|Win32.Build.0 = Debug|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.ActiveCfg = Debug|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Debug|x64.Build.0 = Debug|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.ActiveCfg = Release|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|Win32.Build.0 = Release|Win32 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.ActiveCfg = Release|x64 + {A4855451-6447-437C-B024-B36C3C7901EA}.Release|x64.Build.0 = Release|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.ActiveCfg = Debug|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|Win32.Build.0 = Debug|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.ActiveCfg = Debug|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Debug|x64.Build.0 = Debug|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.ActiveCfg = Release|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|Win32.Build.0 = Release|Win32 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.ActiveCfg = Release|x64 + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B}.Release|x64.Build.0 = Release|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.ActiveCfg = Debug|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|Win32.Build.0 = Debug|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.ActiveCfg = Debug|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Debug|x64.Build.0 = Debug|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.ActiveCfg = Release|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|Win32.Build.0 = Release|Win32 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.ActiveCfg = Release|x64 + {0FF6989B-880A-4C3F-B69D-AFF93296044D}.Release|x64.Build.0 = Release|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|Win32.Build.0 = Debug|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.ActiveCfg = Debug|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Debug|x64.Build.0 = Debug|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.ActiveCfg = Release|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|Win32.Build.0 = Release|Win32 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.ActiveCfg = Release|x64 + {A7D9DFA5-C34F-4B98-BEE8-5140EFCD2E8C}.Release|x64.Build.0 = Release|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|Win32.Build.0 = Debug|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.ActiveCfg = Debug|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Debug|x64.Build.0 = Debug|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.ActiveCfg = Release|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|Win32.Build.0 = Release|Win32 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.ActiveCfg = Release|x64 + {21F6C0E4-DD1A-49E6-82FD-64574BB902BD}.Release|x64.Build.0 = Release|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.ActiveCfg = Debug|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|Win32.Build.0 = Debug|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.ActiveCfg = Debug|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Debug|x64.Build.0 = Debug|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.ActiveCfg = Release|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|Win32.Build.0 = Release|Win32 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.ActiveCfg = Release|x64 + {728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}.Release|x64.Build.0 = Release|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.ActiveCfg = Debug|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|Win32.Build.0 = Debug|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.ActiveCfg = Debug|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Debug|x64.Build.0 = Debug|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.ActiveCfg = Release|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|Win32.Build.0 = Release|Win32 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.ActiveCfg = Release|x64 + {18195F68-A747-8643-050C-C5101DA658FD}.Release|x64.Build.0 = Release|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.ActiveCfg = Debug|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|Win32.Build.0 = Debug|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.ActiveCfg = Debug|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Debug|x64.Build.0 = Debug|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.ActiveCfg = Release|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|Win32.Build.0 = Release|Win32 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.ActiveCfg = Release|x64 + {885010EA-D008-4E38-85D4-487693F0BA00}.Release|x64.Build.0 = Release|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.ActiveCfg = Debug|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|Win32.Build.0 = Debug|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.ActiveCfg = Debug|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Debug|x64.Build.0 = Debug|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.ActiveCfg = Release|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|Win32.Build.0 = Release|Win32 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.ActiveCfg = Release|x64 + {20413125-4D68-4751-8062-DDA026DDABF1}.Release|x64.Build.0 = Release|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.ActiveCfg = Debug|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|Win32.Build.0 = Debug|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.ActiveCfg = Debug|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Debug|x64.Build.0 = Debug|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.ActiveCfg = Release|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|Win32.Build.0 = Release|Win32 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.ActiveCfg = Release|x64 + {7FC00D59-03D3-4A6C-AEFE-67349C9C9E10}.Release|x64.Build.0 = Release|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|Win32.Build.0 = Debug|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.ActiveCfg = Debug|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Debug|x64.Build.0 = Debug|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.ActiveCfg = Release|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|Win32.Build.0 = Release|Win32 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.ActiveCfg = Release|x64 + {AE677E3A-DAC5-42FD-8762-47370C57639B}.Release|x64.Build.0 = Release|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.ActiveCfg = Debug|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|Win32.Build.0 = Debug|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.ActiveCfg = Debug|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Debug|x64.Build.0 = Debug|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.ActiveCfg = Release|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|Win32.Build.0 = Release|Win32 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.ActiveCfg = Release|x64 + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF}.Release|x64.Build.0 = Release|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.ActiveCfg = Debug|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|Win32.Build.0 = Debug|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.ActiveCfg = Debug|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Debug|x64.Build.0 = Debug|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.ActiveCfg = Release|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|Win32.Build.0 = Release|Win32 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.ActiveCfg = Release|x64 + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}.Release|x64.Build.0 = Release|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|Win32.Build.0 = Debug|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.ActiveCfg = Debug|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Debug|x64.Build.0 = Debug|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.ActiveCfg = Release|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|Win32.Build.0 = Release|Win32 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.ActiveCfg = Release|x64 + {6DE11A47-2268-4B08-8DE5-15A1705FCE28}.Release|x64.Build.0 = Release|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.ActiveCfg = Debug|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.Build.0 = Debug|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.ActiveCfg = Debug|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.Build.0 = Debug|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.ActiveCfg = Release|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.Build.0 = Release|Win32 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.ActiveCfg = Release|x64 + {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.Build.0 = Release|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.Build.0 = Debug|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.ActiveCfg = Debug|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.Build.0 = Debug|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.ActiveCfg = Release|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.Build.0 = Release|Win32 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.ActiveCfg = Release|x64 + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.Build.0 = Release|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.ActiveCfg = Debug|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|Win32.Build.0 = Debug|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.ActiveCfg = Debug|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Debug|x64.Build.0 = Debug|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.ActiveCfg = Release|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|Win32.Build.0 = Release|Win32 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.ActiveCfg = Release|x64 + {F31BD1B6-EE9D-4F76-A047-F8AEADC26086}.Release|x64.Build.0 = Release|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.ActiveCfg = Debug|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|Win32.Build.0 = Debug|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.ActiveCfg = Debug|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Debug|x64.Build.0 = Debug|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.ActiveCfg = Release|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|Win32.Build.0 = Release|Win32 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.ActiveCfg = Release|x64 + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE}.Release|x64.Build.0 = Release|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.ActiveCfg = Debug|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|Win32.Build.0 = Debug|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.ActiveCfg = Debug|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Debug|x64.Build.0 = Debug|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.ActiveCfg = Release|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|Win32.Build.0 = Release|Win32 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.ActiveCfg = Release|x64 + {B57D997C-73E1-D5F7-ECCA-C204345C04A3}.Release|x64.Build.0 = Release|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.ActiveCfg = Debug|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|Win32.Build.0 = Debug|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.ActiveCfg = Debug|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Debug|x64.Build.0 = Debug|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.ActiveCfg = Release|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|Win32.Build.0 = Release|Win32 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.ActiveCfg = Release|x64 + {00037ACC-F32D-4B5F-93A8-3CF0E277E377}.Release|x64.Build.0 = Release|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|Win32.Build.0 = Debug|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.ActiveCfg = Debug|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Debug|x64.Build.0 = Debug|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.ActiveCfg = Release|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|Win32.Build.0 = Release|Win32 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.ActiveCfg = Release|x64 + {3F8EF54D-0593-4048-B0E5-C938F99B29F3}.Release|x64.Build.0 = Release|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.ActiveCfg = Debug|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|Win32.Build.0 = Debug|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.ActiveCfg = Debug|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Debug|x64.Build.0 = Debug|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.ActiveCfg = Release|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|Win32.Build.0 = Release|Win32 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.ActiveCfg = Release|x64 + {9D702039-F4A9-4978-92B3-3615E5C44BEE}.Release|x64.Build.0 = Release|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.ActiveCfg = Debug|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|Win32.Build.0 = Debug|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.ActiveCfg = Debug|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Debug|x64.Build.0 = Debug|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.ActiveCfg = Release|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|Win32.Build.0 = Release|Win32 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.ActiveCfg = Release|x64 + {155211F8-08E1-4864-A3B8-9F04F4270360}.Release|x64.Build.0 = Release|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.ActiveCfg = Debug|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|Win32.Build.0 = Debug|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.ActiveCfg = Debug|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Debug|x64.Build.0 = Debug|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.ActiveCfg = Release|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|Win32.Build.0 = Release|Win32 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.ActiveCfg = Release|x64 + {3933E789-D185-41DC-8169-9FF4365B6015}.Release|x64.Build.0 = Release|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|Win32.Build.0 = Debug|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.ActiveCfg = Debug|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Debug|x64.Build.0 = Debug|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.ActiveCfg = Release|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|Win32.Build.0 = Release|Win32 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.ActiveCfg = Release|x64 + {2E15C462-A150-4A37-ACD6-FBAECF1724F5}.Release|x64.Build.0 = Release|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.ActiveCfg = Debug|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|Win32.Build.0 = Debug|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.ActiveCfg = Debug|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Debug|x64.Build.0 = Debug|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.ActiveCfg = Release|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|Win32.Build.0 = Release|Win32 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.ActiveCfg = Release|x64 + {046C5F80-ABE5-488F-BFC8-B024D4AACC8C}.Release|x64.Build.0 = Release|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|Win32.Build.0 = Debug|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.ActiveCfg = Debug|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Debug|x64.Build.0 = Debug|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.ActiveCfg = Release|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|Win32.Build.0 = Release|Win32 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.ActiveCfg = Release|x64 + {F7A70398-AFA0-4A58-B645-85268F9517DE}.Release|x64.Build.0 = Release|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.ActiveCfg = Debug|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|Win32.Build.0 = Debug|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.ActiveCfg = Debug|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Debug|x64.Build.0 = Debug|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.ActiveCfg = Release|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|Win32.Build.0 = Release|Win32 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.ActiveCfg = Release|x64 + {121D2EA6-9D3C-43F6-AC5C-44BDBF93E3E0}.Release|x64.Build.0 = Release|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.ActiveCfg = Debug|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|Win32.Build.0 = Debug|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.ActiveCfg = Debug|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Debug|x64.Build.0 = Debug|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.ActiveCfg = Release|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|Win32.Build.0 = Release|Win32 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.ActiveCfg = Release|x64 + {F5E3FAFE-B650-4736-8D27-FA53866668C6}.Release|x64.Build.0 = Release|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|Win32.Build.0 = Debug|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.ActiveCfg = Debug|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Debug|x64.Build.0 = Debug|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.ActiveCfg = Release|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|Win32.Build.0 = Release|Win32 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.ActiveCfg = Release|x64 + {01F9E227-06F5-4BED-907F-402CA7DFAFE6}.Release|x64.Build.0 = Release|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.ActiveCfg = Debug|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|Win32.Build.0 = Debug|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.ActiveCfg = Debug|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Debug|x64.Build.0 = Debug|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.ActiveCfg = Release|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|Win32.Build.0 = Release|Win32 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.ActiveCfg = Release|x64 + {D09881C7-E189-49AD-919E-F64355F8EFD0}.Release|x64.Build.0 = Release|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|Win32.Build.0 = Debug|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.ActiveCfg = Debug|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Debug|x64.Build.0 = Debug|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.ActiveCfg = Release|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|Win32.Build.0 = Release|Win32 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.ActiveCfg = Release|x64 + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1}.Release|x64.Build.0 = Release|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|Win32.Build.0 = Debug|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.ActiveCfg = Debug|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Debug|x64.Build.0 = Debug|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.ActiveCfg = Release|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|Win32.Build.0 = Release|Win32 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.ActiveCfg = Release|x64 + {1E702CF1-E52F-49F8-915A-FCBBCE554774}.Release|x64.Build.0 = Release|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.ActiveCfg = Debug|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|Win32.Build.0 = Debug|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.ActiveCfg = Debug|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Debug|x64.Build.0 = Debug|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.ActiveCfg = Release|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|Win32.Build.0 = Release|Win32 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.ActiveCfg = Release|x64 + {A556E0B5-73A1-4676-BA1F-133820DE7D5A}.Release|x64.Build.0 = Release|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|Win32.Build.0 = Debug|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.ActiveCfg = Debug|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Debug|x64.Build.0 = Debug|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.ActiveCfg = Release|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|Win32.Build.0 = Release|Win32 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.ActiveCfg = Release|x64 + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE}.Release|x64.Build.0 = Release|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|Win32.Build.0 = Debug|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.ActiveCfg = Debug|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Debug|x64.Build.0 = Debug|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.ActiveCfg = Release|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|Win32.Build.0 = Release|Win32 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.ActiveCfg = Release|x64 + {AA5CA2D0-F096-4001-B1B6-439C7FC11E77}.Release|x64.Build.0 = Release|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.ActiveCfg = Debug|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|Win32.Build.0 = Debug|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.ActiveCfg = Debug|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Debug|x64.Build.0 = Debug|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.ActiveCfg = Release|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|Win32.Build.0 = Release|Win32 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.ActiveCfg = Release|x64 + {10F78F26-2B20-4158-869F-CB29533B4C2C}.Release|x64.Build.0 = Release|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|Win32.Build.0 = Debug|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.ActiveCfg = Debug|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Debug|x64.Build.0 = Debug|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.ActiveCfg = Release|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|Win32.Build.0 = Release|Win32 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.ActiveCfg = Release|x64 + {DA450122-7F0B-45DA-9EAA-421887AD8450}.Release|x64.Build.0 = Release|x64 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|Win32.Build.0 = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.ActiveCfg = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Debug|x64.Build.0 = Debug|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.ActiveCfg = Release|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|Win32.Build.0 = Release|Win32 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.ActiveCfg = Release|x64 + {F29D0C8D-141A-43CF-86B2-34A04653F8D4}.Release|x64.Build.0 = Release|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.ActiveCfg = Debug|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|Win32.Build.0 = Debug|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.ActiveCfg = Debug|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Debug|x64.Build.0 = Debug|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.ActiveCfg = Release|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|Win32.Build.0 = Release|Win32 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.ActiveCfg = Release|x64 + {DBB261B4-E433-4DFF-8A5D-6C3B5B5F4FF4}.Release|x64.Build.0 = Release|x64 + {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.ActiveCfg = Debug|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Debug|Win32.Build.0 = Debug|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Debug|x64.ActiveCfg = Debug|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.ActiveCfg = Release|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Release|Win32.Build.0 = Release|Win32 + {0E046380-14CA-4C23-A807-8C678519A605}.Release|x64.ActiveCfg = Release|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|Win32.Build.0 = Debug|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.ActiveCfg = Debug|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Debug|x64.Build.0 = Debug|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.ActiveCfg = Release|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|Win32.Build.0 = Release|Win32 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.ActiveCfg = Release|x64 + {3C83B0AB-9739-41C1-A127-ED7DB9551F76}.Release|x64.Build.0 = Release|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.ActiveCfg = Debug|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|Win32.Build.0 = Debug|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.ActiveCfg = Debug|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Debug|x64.Build.0 = Debug|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.ActiveCfg = Release|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|Win32.Build.0 = Release|Win32 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.ActiveCfg = Release|x64 + {F462FDA1-BDCD-49B2-B996-D7DE71D07393}.Release|x64.Build.0 = Release|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|Win32.Build.0 = Debug|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.ActiveCfg = Debug|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Debug|x64.Build.0 = Debug|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.ActiveCfg = Release|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|Win32.Build.0 = Release|Win32 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.ActiveCfg = Release|x64 + {475ED6ED-C311-4188-ACB2-1C41830B22EE}.Release|x64.Build.0 = Release|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.ActiveCfg = Debug|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|Win32.Build.0 = Debug|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.ActiveCfg = Debug|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Debug|x64.Build.0 = Debug|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.ActiveCfg = Release|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|Win32.Build.0 = Release|Win32 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.ActiveCfg = Release|x64 + {B27B85B5-0EF1-496D-99D7-0702A98A342A}.Release|x64.Build.0 = Release|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.ActiveCfg = Debug|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|Win32.Build.0 = Debug|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.ActiveCfg = Debug|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Debug|x64.Build.0 = Debug|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.ActiveCfg = Release|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|Win32.Build.0 = Release|Win32 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.ActiveCfg = Release|x64 + {A44F96D0-A850-4A67-9570-0E9298A16E40}.Release|x64.Build.0 = Release|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.ActiveCfg = Debug|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|Win32.Build.0 = Debug|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.ActiveCfg = Debug|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Debug|x64.Build.0 = Debug|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.ActiveCfg = Release|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|Win32.Build.0 = Release|Win32 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.ActiveCfg = Release|x64 + {BF6E1942-7E42-4564-9DF5-FD0A00D71173}.Release|x64.Build.0 = Release|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.ActiveCfg = Debug|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|Win32.Build.0 = Debug|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.ActiveCfg = Debug|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Debug|x64.Build.0 = Debug|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.ActiveCfg = Release|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|Win32.Build.0 = Release|Win32 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.ActiveCfg = Release|x64 + {7B072B7F-E2AA-4935-AAF5-5BEF99665AD3}.Release|x64.Build.0 = Release|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|Win32.Build.0 = Debug|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.ActiveCfg = Debug|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Debug|x64.Build.0 = Debug|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.ActiveCfg = Release|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|Win32.Build.0 = Release|Win32 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.ActiveCfg = Release|x64 + {8ACA3C8B-BDFA-47B2-8578-069555BA05B3}.Release|x64.Build.0 = Release|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.ActiveCfg = Debug|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|Win32.Build.0 = Debug|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.ActiveCfg = Debug|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Debug|x64.Build.0 = Debug|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.ActiveCfg = Release|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|Win32.Build.0 = Release|Win32 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.ActiveCfg = Release|x64 + {0D3EF7C4-B99C-E87E-D0D8-C6E003B7EB65}.Release|x64.Build.0 = Release|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|Win32.Build.0 = Debug|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.ActiveCfg = Debug|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Debug|x64.Build.0 = Debug|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.ActiveCfg = Release|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|Win32.Build.0 = Release|Win32 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.ActiveCfg = Release|x64 + {6A516E27-AC50-5374-756B-A1558DB2EFA9}.Release|x64.Build.0 = Release|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.ActiveCfg = Debug|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|Win32.Build.0 = Debug|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.ActiveCfg = Debug|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Debug|x64.Build.0 = Debug|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.ActiveCfg = Release|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|Win32.Build.0 = Release|Win32 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.ActiveCfg = Release|x64 + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF}.Release|x64.Build.0 = Release|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.ActiveCfg = Debug|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|Win32.Build.0 = Debug|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.ActiveCfg = Debug|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Debug|x64.Build.0 = Debug|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.ActiveCfg = Release|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|Win32.Build.0 = Release|Win32 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.ActiveCfg = Release|x64 + {BE22A21F-73B7-453F-86A0-B867F0056490}.Release|x64.Build.0 = Release|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.Build.0 = Debug|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.ActiveCfg = Debug|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|x64.Build.0 = Debug|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.ActiveCfg = Release|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.Build.0 = Release|Win32 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.ActiveCfg = Release|x64 + {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|x64.Build.0 = Release|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.ActiveCfg = Debug|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|Win32.Build.0 = Debug|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.ActiveCfg = Debug|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Debug|x64.Build.0 = Debug|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.ActiveCfg = Release|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|Win32.Build.0 = Release|Win32 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.ActiveCfg = Release|x64 + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA}.Release|x64.Build.0 = Release|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|Win32.Build.0 = Debug|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.ActiveCfg = Debug|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Debug|x64.Build.0 = Debug|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.ActiveCfg = Release|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|Win32.Build.0 = Release|Win32 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.ActiveCfg = Release|x64 + {6124E997-426E-4A0B-9617-D6D577D5E7D7}.Release|x64.Build.0 = Release|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.ActiveCfg = Debug|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|Win32.Build.0 = Debug|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.ActiveCfg = Debug|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Debug|x64.Build.0 = Debug|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.ActiveCfg = Release|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|Win32.Build.0 = Release|Win32 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.ActiveCfg = Release|x64 + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776}.Release|x64.Build.0 = Release|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|Win32.Build.0 = Debug|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.ActiveCfg = Debug|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Debug|x64.Build.0 = Debug|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.ActiveCfg = Release|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|Win32.Build.0 = Release|Win32 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.ActiveCfg = Release|x64 + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821}.Release|x64.Build.0 = Release|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.ActiveCfg = Debug|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|Win32.Build.0 = Debug|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.ActiveCfg = Debug|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Debug|x64.Build.0 = Debug|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.ActiveCfg = Release|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|Win32.Build.0 = Release|Win32 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.ActiveCfg = Release|x64 + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB}.Release|x64.Build.0 = Release|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.ActiveCfg = Debug|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|Win32.Build.0 = Debug|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.ActiveCfg = Debug|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Debug|x64.Build.0 = Debug|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.ActiveCfg = Release|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|Win32.Build.0 = Release|Win32 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.ActiveCfg = Release|x64 + {639E2B3A-64F2-4152-B5BB-12468E5D60B6}.Release|x64.Build.0 = Release|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.ActiveCfg = Debug|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|Win32.Build.0 = Debug|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.ActiveCfg = Debug|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Debug|x64.Build.0 = Debug|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.ActiveCfg = Release|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|Win32.Build.0 = Release|Win32 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.ActiveCfg = Release|x64 + {66A9BDEB-150F-45DC-B20F-9892C0B43834}.Release|x64.Build.0 = Release|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|Win32.Build.0 = Debug|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.ActiveCfg = Debug|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Debug|x64.Build.0 = Debug|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.ActiveCfg = Release|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|Win32.Build.0 = Release|Win32 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.ActiveCfg = Release|x64 + {BCFAB658-326E-466D-995B-E76636C1DEA4}.Release|x64.Build.0 = Release|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|Win32.Build.0 = Debug|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.ActiveCfg = Debug|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Debug|x64.Build.0 = Debug|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.ActiveCfg = Release|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|Win32.Build.0 = Release|Win32 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.ActiveCfg = Release|x64 + {B4327D10-ACDC-4C12-9555-749DD49A7BB0}.Release|x64.Build.0 = Release|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|Win32.Build.0 = Debug|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.ActiveCfg = Debug|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Debug|x64.Build.0 = Debug|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.ActiveCfg = Release|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|Win32.Build.0 = Release|Win32 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.ActiveCfg = Release|x64 + {D31CD2B4-9025-4B01-9F74-EEEE2E94DDF4}.Release|x64.Build.0 = Release|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.ActiveCfg = Debug|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|Win32.Build.0 = Debug|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.ActiveCfg = Debug|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Debug|x64.Build.0 = Debug|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.ActiveCfg = Release|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|Win32.Build.0 = Release|Win32 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.ActiveCfg = Release|x64 + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4}.Release|x64.Build.0 = Release|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.ActiveCfg = Debug|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|Win32.Build.0 = Debug|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.ActiveCfg = Debug|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Debug|x64.Build.0 = Debug|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.ActiveCfg = Release|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|Win32.Build.0 = Release|Win32 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.ActiveCfg = Release|x64 + {27D41D81-991F-4DC6-8749-B0321C87E694}.Release|x64.Build.0 = Release|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.ActiveCfg = Debug|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|Win32.Build.0 = Debug|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.ActiveCfg = Debug|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Debug|x64.Build.0 = Debug|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.ActiveCfg = Release|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|Win32.Build.0 = Release|Win32 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.ActiveCfg = Release|x64 + {1FDBD8F0-3929-41BC-92D1-020779460769}.Release|x64.Build.0 = Release|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.ActiveCfg = Debug|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|Win32.Build.0 = Debug|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.ActiveCfg = Debug|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Debug|x64.Build.0 = Debug|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.ActiveCfg = Release|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|Win32.Build.0 = Release|Win32 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.ActiveCfg = Release|x64 + {BD291BF0-D804-4818-8311-DE871E6BCEAA}.Release|x64.Build.0 = Release|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.ActiveCfg = Debug|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|Win32.Build.0 = Debug|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.ActiveCfg = Debug|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Debug|x64.Build.0 = Debug|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.ActiveCfg = Release|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|Win32.Build.0 = Release|Win32 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.ActiveCfg = Release|x64 + {045BAC91-34D1-4B43-B52B-566801BE7F85}.Release|x64.Build.0 = Release|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|Win32.Build.0 = Debug|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.ActiveCfg = Debug|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Debug|x64.Build.0 = Debug|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.ActiveCfg = Release|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|Win32.Build.0 = Release|Win32 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.ActiveCfg = Release|x64 + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A}.Release|x64.Build.0 = Release|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.ActiveCfg = Debug|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|Win32.Build.0 = Debug|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.ActiveCfg = Debug|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Debug|x64.Build.0 = Debug|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.ActiveCfg = Release|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|Win32.Build.0 = Release|Win32 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.ActiveCfg = Release|x64 + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C}.Release|x64.Build.0 = Release|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.ActiveCfg = Debug|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|Win32.Build.0 = Debug|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.ActiveCfg = Debug|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Debug|x64.Build.0 = Debug|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.ActiveCfg = Release|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|Win32.Build.0 = Release|Win32 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.ActiveCfg = Release|x64 + {E604CD58-4579-4F69-9D6A-2605FD7CF716}.Release|x64.Build.0 = Release|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.ActiveCfg = Debug|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|Win32.Build.0 = Debug|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.ActiveCfg = Debug|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Debug|x64.Build.0 = Debug|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.ActiveCfg = Release|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|Win32.Build.0 = Release|Win32 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.ActiveCfg = Release|x64 + {D2EF305F-5255-49E8-A738-D4206D62D2B8}.Release|x64.Build.0 = Release|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|Win32.Build.0 = Debug|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.ActiveCfg = Debug|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Debug|x64.Build.0 = Debug|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.ActiveCfg = Release|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|Win32.Build.0 = Release|Win32 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.ActiveCfg = Release|x64 + {E876FE63-0701-4CDA-BED5-7C73A379C1D1}.Release|x64.Build.0 = Release|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.ActiveCfg = Debug|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|Win32.Build.0 = Debug|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.ActiveCfg = Debug|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Debug|x64.Build.0 = Debug|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.ActiveCfg = Release|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|Win32.Build.0 = Release|Win32 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.ActiveCfg = Release|x64 + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}.Release|x64.Build.0 = Release|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.ActiveCfg = Debug|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|Win32.Build.0 = Debug|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.ActiveCfg = Debug|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Debug|x64.Build.0 = Debug|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.ActiveCfg = Release|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|Win32.Build.0 = Release|Win32 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.ActiveCfg = Release|x64 + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67}.Release|x64.Build.0 = Release|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.ActiveCfg = Debug|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|Win32.Build.0 = Debug|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.ActiveCfg = Debug|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Debug|x64.Build.0 = Debug|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.ActiveCfg = Release|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|Win32.Build.0 = Release|Win32 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.ActiveCfg = Release|x64 + {CE6A5A24-EA88-4E67-BDF2-22517528E43F}.Release|x64.Build.0 = Release|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|Win32.Build.0 = Debug|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.ActiveCfg = Debug|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Debug|x64.Build.0 = Debug|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.ActiveCfg = Release|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|Win32.Build.0 = Release|Win32 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.ActiveCfg = Release|x64 + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A}.Release|x64.Build.0 = Release|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.ActiveCfg = Debug|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.Build.0 = Debug|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.ActiveCfg = Debug|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.Build.0 = Debug|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.ActiveCfg = Release|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.Build.0 = Release|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.ActiveCfg = Release|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.Build.0 = Release|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.ActiveCfg = Debug|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|Win32.Build.0 = Debug|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.ActiveCfg = Debug|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Debug|x64.Build.0 = Debug|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.ActiveCfg = Release|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|Win32.Build.0 = Release|Win32 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.ActiveCfg = Release|x64 + {A21C50CD-28A6-481A-A12B-47189FE66641}.Release|x64.Build.0 = Release|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.ActiveCfg = Debug|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|Win32.Build.0 = Debug|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.ActiveCfg = Debug|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Debug|x64.Build.0 = Debug|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.ActiveCfg = Release|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|Win32.Build.0 = Release|Win32 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.ActiveCfg = Release|x64 + {D7A3B8D0-425A-2286-8E2F-2C0BF1EE5C2E}.Release|x64.Build.0 = Release|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.ActiveCfg = Debug|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|Win32.Build.0 = Debug|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.ActiveCfg = Debug|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Debug|x64.Build.0 = Debug|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.ActiveCfg = Release|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|Win32.Build.0 = Release|Win32 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.ActiveCfg = Release|x64 + {2115FEBC-1EC4-4F95-A058-A523ED5295A4}.Release|x64.Build.0 = Release|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|Win32.Build.0 = Debug|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.ActiveCfg = Debug|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Debug|x64.Build.0 = Debug|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.ActiveCfg = Release|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|Win32.Build.0 = Release|Win32 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.ActiveCfg = Release|x64 + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18}.Release|x64.Build.0 = Release|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|Win32.Build.0 = Debug|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.ActiveCfg = Debug|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Debug|x64.Build.0 = Debug|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.ActiveCfg = Release|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|Win32.Build.0 = Release|Win32 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.ActiveCfg = Release|x64 + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4}.Release|x64.Build.0 = Release|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.ActiveCfg = Debug|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|Win32.Build.0 = Debug|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.ActiveCfg = Debug|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Debug|x64.Build.0 = Debug|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.ActiveCfg = Release|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|Win32.Build.0 = Release|Win32 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.ActiveCfg = Release|x64 + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E}.Release|x64.Build.0 = Release|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.ActiveCfg = Debug|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|Win32.Build.0 = Debug|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.ActiveCfg = Debug|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Debug|x64.Build.0 = Debug|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.ActiveCfg = Release|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|Win32.Build.0 = Release|Win32 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.ActiveCfg = Release|x64 + {7DC23E4E-2448-4811-AABD-F5D069F6E74A}.Release|x64.Build.0 = Release|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.ActiveCfg = Debug|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|Win32.Build.0 = Debug|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.ActiveCfg = Debug|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Debug|x64.Build.0 = Debug|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.ActiveCfg = Release|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|Win32.Build.0 = Release|Win32 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.ActiveCfg = Release|x64 + {7446276D-5845-4258-A245-83D1D4D3CEC3}.Release|x64.Build.0 = Release|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|Win32.Build.0 = Debug|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.ActiveCfg = Debug|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Debug|x64.Build.0 = Debug|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.ActiveCfg = Release|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|Win32.Build.0 = Release|Win32 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.ActiveCfg = Release|x64 + {B3494FED-FB8C-43F4-B341-F26A3460203B}.Release|x64.Build.0 = Release|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.ActiveCfg = Debug|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|Win32.Build.0 = Debug|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.ActiveCfg = Debug|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Debug|x64.Build.0 = Debug|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.ActiveCfg = Release|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|Win32.Build.0 = Release|Win32 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.ActiveCfg = Release|x64 + {EFB2355B-82B3-4759-B7D8-95F8E9506291}.Release|x64.Build.0 = Release|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|Win32.Build.0 = Debug|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.ActiveCfg = Debug|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Debug|x64.Build.0 = Debug|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.ActiveCfg = Release|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|Win32.Build.0 = Release|Win32 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.ActiveCfg = Release|x64 + {B3BC3949-6949-41DE-94BF-B112FBFB1A84}.Release|x64.Build.0 = Release|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.ActiveCfg = Debug|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|Win32.Build.0 = Debug|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.ActiveCfg = Debug|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Debug|x64.Build.0 = Debug|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.ActiveCfg = Release|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|Win32.Build.0 = Release|Win32 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.ActiveCfg = Release|x64 + {713067DF-65EE-480B-A000-B2A323495F16}.Release|x64.Build.0 = Release|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.ActiveCfg = Debug|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|Win32.Build.0 = Debug|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.ActiveCfg = Debug|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Debug|x64.Build.0 = Debug|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.ActiveCfg = Release|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|Win32.Build.0 = Release|Win32 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.ActiveCfg = Release|x64 + {EEB57129-946C-4B98-8856-FDA501AE2A5E}.Release|x64.Build.0 = Release|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.ActiveCfg = Debug|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|Win32.Build.0 = Debug|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.ActiveCfg = Debug|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Debug|x64.Build.0 = Debug|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.ActiveCfg = Release|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|Win32.Build.0 = Release|Win32 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.ActiveCfg = Release|x64 + {620E0BE7-3763-4F35-9DBD-4770104E269C}.Release|x64.Build.0 = Release|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.ActiveCfg = Debug|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|Win32.Build.0 = Debug|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.ActiveCfg = Debug|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Debug|x64.Build.0 = Debug|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.ActiveCfg = Release|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|Win32.Build.0 = Release|Win32 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.ActiveCfg = Release|x64 + {86033E58-A1E3-43AD-AE8E-305E15E72A91}.Release|x64.Build.0 = Release|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|Win32.Build.0 = Debug|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.ActiveCfg = Debug|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Debug|x64.Build.0 = Debug|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.ActiveCfg = Release|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|Win32.Build.0 = Release|Win32 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.ActiveCfg = Release|x64 + {A7FAD273-8C71-4D72-A84F-2D160F2DC589}.Release|x64.Build.0 = Release|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.ActiveCfg = Debug|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.Build.0 = Debug|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.ActiveCfg = Debug|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.Build.0 = Debug|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.ActiveCfg = Release|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.Build.0 = Release|Win32 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.ActiveCfg = Release|x64 + {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.Build.0 = Release|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|Win32.Build.0 = Debug|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.ActiveCfg = Debug|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Debug|x64.Build.0 = Debug|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.ActiveCfg = Release|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|Win32.Build.0 = Release|Win32 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.ActiveCfg = Release|x64 + {3C3EAFC2-01FB-4BA8-8E47-42E0969C0D75}.Release|x64.Build.0 = Release|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.ActiveCfg = Debug|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|Win32.Build.0 = Debug|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.ActiveCfg = Debug|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Debug|x64.Build.0 = Debug|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.ActiveCfg = Release|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|Win32.Build.0 = Release|Win32 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.ActiveCfg = Release|x64 + {6D19209B-ECE7-4B9C-941C-0AA2B484F199}.Release|x64.Build.0 = Release|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|Win32.Build.0 = Debug|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.ActiveCfg = Debug|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Debug|x64.Build.0 = Debug|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.ActiveCfg = Release|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|Win32.Build.0 = Release|Win32 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.ActiveCfg = Release|x64 + {3E9DA555-4C7B-463C-AD5C-214073DE29D6}.Release|x64.Build.0 = Release|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|Win32.Build.0 = Debug|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.ActiveCfg = Debug|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Debug|x64.Build.0 = Debug|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.ActiveCfg = Release|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|Win32.Build.0 = Release|Win32 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.ActiveCfg = Release|x64 + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9}.Release|x64.Build.0 = Release|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.ActiveCfg = Debug|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|Win32.Build.0 = Debug|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.ActiveCfg = Debug|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Debug|x64.Build.0 = Debug|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.ActiveCfg = Release|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|Win32.Build.0 = Release|Win32 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.ActiveCfg = Release|x64 + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A}.Release|x64.Build.0 = Release|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|Win32.Build.0 = Debug|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.ActiveCfg = Debug|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Debug|x64.Build.0 = Debug|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.ActiveCfg = Release|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|Win32.Build.0 = Release|Win32 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.ActiveCfg = Release|x64 + {4D3554DE-6E14-4F94-A909-A4B19151A47E}.Release|x64.Build.0 = Release|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.ActiveCfg = Debug|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|Win32.Build.0 = Debug|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.ActiveCfg = Debug|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Debug|x64.Build.0 = Debug|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.ActiveCfg = Release|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|Win32.Build.0 = Release|Win32 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.ActiveCfg = Release|x64 + {13E796AD-BEA4-4213-A1B8-E18E2397E544}.Release|x64.Build.0 = Release|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.ActiveCfg = Debug|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|Win32.Build.0 = Debug|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.ActiveCfg = Debug|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Debug|x64.Build.0 = Debug|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.ActiveCfg = Release|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|Win32.Build.0 = Release|Win32 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.ActiveCfg = Release|x64 + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F9916510-9055-4C9F-997A-3755DEC1511B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {D9EFEA4B-B817-4DE1-BD62-68A5DB8F5F60} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {538E451F-E667-4D07-BCE6-976ECC7BB8D1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {F6A9340E-B8D9-4C75-BE30-47DC66D0ABC7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {E2A369CD-EDA3-414F-8AD0-E732CD7EE68C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {9299B507-1AF9-4C93-9560-5F637D1E0C9E} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {20D781FB-4A20-4B75-B863-304A47182966} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {B8928210-546C-4AE3-956B-E2B724E6B8E5} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {99D26CA1-BFD4-4E77-9A1E-919E54CF33F7} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {6DA1396F-2A44-4D5C-8442-012F71006217} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {3A12F777-56A8-42EC-BD17-8F325524241E} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {33276462-8313-4192-8306-13717ECCA60A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {3C42510C-A29E-4A53-899C-203BFA874E0B} = {F9C41695-3353-4564-A154-58106829B19C} + {987F026D-EB1F-4013-ADA8-2406ACCDA526} = {F9C41695-3353-4564-A154-58106829B19C} + {DB315D7D-00BB-43B2-93A6-0430CA2B9F28} = {F9C41695-3353-4564-A154-58106829B19C} + {B4361FA0-4073-4B60-EE72-F5C08E6EDF61} = {F9C41695-3353-4564-A154-58106829B19C} + {2AD2FF74-06E1-4BD8-984A-526F3C6315B3} = {F9C41695-3353-4564-A154-58106829B19C} + {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {2D0B4CB0-3ACA-4612-B745-FF3050E1500A} = {F9C41695-3353-4564-A154-58106829B19C} + {9290A9CC-3FDA-4FD6-A8A2-04AD4BA1C856} = {F9C41695-3353-4564-A154-58106829B19C} + {9DE1F0B0-B9D1-4681-82E7-13CC3E047445} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {B988F96C-F87A-484C-AB15-D0674B22F291} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {214F211F-1A2B-4F79-8993-B8DEE2EF7441} = {F9C41695-3353-4564-A154-58106829B19C} + {210DD88D-649B-4695-8C5F-898A4F60A8CE} = {F9C41695-3353-4564-A154-58106829B19C} + {E26D2311-C164-48CF-BA24-5CEDA873D1B2} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {D726A7E5-CF4C-4CF2-A2D3-073DECEC0260} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {DD76B998-ED0D-4BFD-9660-3ADC3A334872} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {27CA5499-B3F2-4FB6-8414-651819B0B96C} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {C09A0E86-E7C3-4229-B817-C86A0AE8ACE5} = {F9C41695-3353-4564-A154-58106829B19C} + {4ADADECA-99D7-410D-8127-CB27210DCC6A} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {37C2B9A4-63EF-49E8-BF23-677B5EBD73E9} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {1948EAEA-4C25-4F6B-AD9E-5891F656EADA} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {82F96271-4136-4B0E-AB6F-040DE7A4DD1E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {E37561EB-B9C5-4215-9FF9-DB559916FBA2} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {A9265E36-7F2D-440C-BF3E-F447FDB6200F} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {6A1969EA-9657-4828-93E0-8D21A970F868} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {D5E2FEC1-B29A-476C-BD41-469FE282EE0F} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {07137F45-8B5F-4561-BEC8-B883E9123785} = {F9C41695-3353-4564-A154-58106829B19C} + {12FFF2B0-0D0B-430B-A4C6-1577CA98F598} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {ECE691D0-BFB3-483B-A699-084269EFCE89} = {F9C41695-3353-4564-A154-58106829B19C} + {0BB52326-02D5-4698-A180-24078DA5DA0E} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {D9057E63-AAAA-4FE7-800A-20C02F4761F3} = {F9C41695-3353-4564-A154-58106829B19C} + {2C050CAF-D8AA-468A-B1A7-89F3BE99D3C8} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {40FE7861-E54E-4DA9-BE4D-A5178014E477} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {1423FC8F-AA52-4562-8275-4BF0838CA378} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {53F841E8-284F-4545-9176-B131896E43F8} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {2E0A2793-94C3-82E7-2AB0-FD421816CFBF} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {4AC1E062-0236-4E49-AA04-F732043D2DCF} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {290C5ED4-71A7-4040-AD26-4820CF7A9E60} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {1C856B14-54CD-4D07-B18B-5F7DB073AB51} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {A5B558C6-C767-11E1-A335-F6EB6188709B} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {6022990D-3FD5-46A9-8AB5-E444C51646F3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {A8F23706-E590-4A87-96CC-5F8E5082503F} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {DADAC956-3A54-440A-8B56-A07234DEE861} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {D22C1BBB-E06A-4A28-8F33-17D1EA3E8563} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {C14D6E0D-810E-4599-A6E0-17298AFA0501} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {E71C1722-A41D-4475-87F4-29961A3654BB} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {F47EAB99-C78F-4A92-87D5-B0E16FE5A133} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {8D0F60DE-DB07-49FD-8E1F-0DE558BE6DE3} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {9C6040B8-1173-40FA-A3DB-DE044CCD8250} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {576EEEFD-E423-482B-879A-F0515D40B8E1} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {A4855451-6447-437C-B024-B36C3C7901EA} = {F9C41695-3353-4564-A154-58106829B19C} + {4CE78D43-FF23-4134-A5AC-B2CF0F8D9F3B} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {AE677E3A-DAC5-42FD-8762-47370C57639B} = {F9C41695-3353-4564-A154-58106829B19C} + {ABF05E2C-C335-4BD1-8C3E-4C63285362CF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {6DE11A47-2268-4B08-8DE5-15A1705FCE28} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {C619A811-8023-4441-B3D7-785388A09DF0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {AF7D71D4-19B7-42B8-91DD-701F155AC4AE} = {F9C41695-3353-4564-A154-58106829B19C} + {155211F8-08E1-4864-A3B8-9F04F4270360} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {2E15C462-A150-4A37-ACD6-FBAECF1724F5} = {F9C41695-3353-4564-A154-58106829B19C} + {F5E3FAFE-B650-4736-8D27-FA53866668C6} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {01F9E227-06F5-4BED-907F-402CA7DFAFE6} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {A556E0B5-73A1-4676-BA1F-133820DE7D5A} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {5935CC24-A1C9-4CF9-8B1C-1AA2321627DE} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9} + {F29D0C8D-141A-43CF-86B2-34A04653F8D4} = {30218E20-9E62-4027-BB87-2627B17F6CA3} + {0E046380-14CA-4C23-A807-8C678519A605} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {3C83B0AB-9739-41C1-A127-ED7DB9551F76} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {475ED6ED-C311-4188-ACB2-1C41830B22EE} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {BF6E1942-7E42-4564-9DF5-FD0A00D71173} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {B5BCDC2F-81FC-4324-90C6-E5540A225EFF} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {BE22A21F-73B7-453F-86A0-B867F0056490} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {12BCA020-EABF-429E-876A-A476BC9C10C0} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {EDAAD28B-505B-4969-A8BB-97EAE818DEEA} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {6124E997-426E-4A0B-9617-D6D577D5E7D7} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {7F5EA8BC-8F2B-478E-8F05-0ED4B691B776} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {D3B4DDFF-D3A5-4452-AE9D-B43B3C97C821} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {8236EA1F-579A-4AFB-9DFE-5FA056AEDDBB} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {66A9BDEB-150F-45DC-B20F-9892C0B43834} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {BCFAB658-326E-466D-995B-E76636C1DEA4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {B4327D10-ACDC-4C12-9555-749DD49A7BB0} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {D7F4D0B3-7B2C-4DB9-B9CB-0C93491E38E4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {27D41D81-991F-4DC6-8749-B0321C87E694} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {BD291BF0-D804-4818-8311-DE871E6BCEAA} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {045BAC91-34D1-4B43-B52B-566801BE7F85} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {B80C2C8D-B987-48B6-AFE2-8DA2D17F2F6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {D5C9CA74-4E25-478A-B890-75EB13E6DB1C} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {E604CD58-4579-4F69-9D6A-2605FD7CF716} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {E876FE63-0701-4CDA-BED5-7C73A379C1D1} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {277E433F-7D71-4247-8AAA-CC5FB1AA7A67} = {329B4E94-C846-4C78-AFD5-8B6B839DCCE1} + {CE6A5A24-EA88-4E67-BDF2-22517528E43F} = {F9C41695-3353-4564-A154-58106829B19C} + {0C02E395-E73F-47E3-8B95-B7924C0C7A6A} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {A185B162-6CB6-4502-B03F-B56F7699A8D9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {A21C50CD-28A6-481A-A12B-47189FE66641} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {2115FEBC-1EC4-4F95-A058-A523ED5295A4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {E0ACDEA0-0AC9-4431-8CA3-6B0CCACB2E18} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {AD0D0500-CE7D-417D-9C36-3620D56CA6D4} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {5D14CFF3-0D17-4528-99EA-DE9DCA47CC2E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {7DC23E4E-2448-4811-AABD-F5D069F6E74A} = {F9C41695-3353-4564-A154-58106829B19C} + {B3494FED-FB8C-43F4-B341-F26A3460203B} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {EFB2355B-82B3-4759-B7D8-95F8E9506291} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {B3BC3949-6949-41DE-94BF-B112FBFB1A84} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {713067DF-65EE-480B-A000-B2A323495F16} = {E7FB43FB-3563-4568-8846-A88FC37449BF} + {620E0BE7-3763-4F35-9DBD-4770104E269C} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {86033E58-A1E3-43AD-AE8E-305E15E72A91} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {A7FAD273-8C71-4D72-A84F-2D160F2DC589} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55} + {A2E9DA24-95E4-4414-94AF-488A382E276A} = {F13387B0-1C74-48EC-9AEC-65E3B9DE29E4} + {6D19209B-ECE7-4B9C-941C-0AA2B484F199} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {E0EBB8A5-B577-414C-A5F9-9B4E2A0A66E9} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {48A76FF0-9506-4D70-81D7-E3A2B2B2A65A} = {F9C41695-3353-4564-A154-58106829B19C} + {4D3554DE-6E14-4F94-A909-A4B19151A47E} = {37EDFBEA-8446-4BF3-9F2E-655908CDFB62} + {13E796AD-BEA4-4213-A1B8-E18E2397E544} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {29A0C2A8-07A4-4A8B-8BED-8F7D024013D6} + EndGlobalSection +EndGlobal diff --git a/bin17/mir_icons.sln b/bin17/mir_icons.sln index 66d130a913..3a23b0485b 100644 --- a/bin17/mir_icons.sln +++ b/bin17/mir_icons.sln @@ -1,330 +1,330 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.32112.339 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toolbar_icons", "..\plugins\Clist_modern\icons_pack\Toolbar_icons.vcxproj", "{796B43EF-DACE-4145-8571-31886F45A2C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM_icons", "..\plugins\SecureIM\SecureIM_icons\secureim_icons.vcxproj", "{3FAB6AC7-6B7F-4779-B519-34E8035074A4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker_Flags", "..\plugins\SpellChecker\Flags\spellchecker_flags.vcxproj", "{3B8B2642-716E-437C-B341-279B08FDC2C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx_icons", "..\plugins\UserInfoEx\IconPacks\default\icons_default_17.vcxproj", "{AA542F66-FF66-498A-ADBE-0BB9103ECD0A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_IRC", "..\protocols\IRCG\proto_irc\Proto_IRC.vcxproj", "{DD667247-3712-4355-9774-7E6ACAF2275E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Jabber", "..\protocols\JabberG\proto_jabber\Proto_Jabber.vcxproj", "{1AA0A504-0644-4F00-A1AD-F55D69E50DD0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_GG", "..\protocols\Gadu-Gadu\proto_gg\Proto_GG.vcxproj", "{33912E32-3B68-4E2C-82AE-64C06EE987A7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Twitter", "..\protocols\Twitter\proto_twitter\Proto_Twitter.vcxproj", "{A82C682E-8596-4DCA-98A6-50436194714B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xStatus_Jabber", "..\protocols\JabberG\jabber_xstatus\xStatus_Jabber.vcxproj", "{6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryPP_icons", "..\plugins\HistoryPlusPlus\historypp_icons\HistoryPP_icons.vcxproj", "{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Omegle", "..\protocols\Omegle\proto_omegle\omegle_icons.vcxproj", "{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM_icons", "..\plugins\TabSRMM\TabSRMM_icons\NOVA\ICONS_NOVA_17.vcxproj", "{F553F140-B7D3-4984-90B1-00D4831B8A6E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_mRadio", "..\plugins\mRadio\proto_mradio\Proto_mRadio.vcxproj", "{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_NewsAggregator", "..\protocols\NewsAggregator\proto_newsaggregator\Proto_NewsAggregator.vcxproj", "{B97882DC-7462-41DB-A390-BDFCE5295265}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_CurrencyRates", "..\protocols\CurrencyRates\proto_CurrencyRates\proto_CurrencyRates.vcxproj", "{5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Weather", "..\protocols\Weather\proto_weather\proto_weather.vcxproj", "{B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_YAMN", "..\protocols\YAMN\proto_yamn\proto_YAMN.vcxproj", "{C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fp_icons", "..\plugins\FingerprintNG\iconpacks\fp_icons.vcxproj", "{7F854B13-37EA-4956-BAEE-9715AE9F4579}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_VKontakte", "..\protocols\VKontakte\proto_vkontakte\Proto_VKontakte.vcxproj", "{5F8495EF-0765-4E03-905D-639BDBF05B4F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Sametime", "..\protocols\Sametime\proto_sametime\Proto_Sametime.vcxproj", "{217C99B1-0D5E-4A85-A84F-836FCA167B25}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MetaContacts", "..\src\icons\proto_metacontacts\Proto_MetaContacts.vcxproj", "{793B6174-89B0-4682-A957-A32BE7F61502}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Dummy", "..\protocols\Dummy\proto_dummy\Proto_Dummy.vcxproj", "{018F801B-E80F-4E49-A640-E30BC445E74A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Steam", "..\protocols\Steam\proto_steam\Proto_Steam.vcxproj", "{523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Skype", "..\protocols\SkypeWeb\proto_skype\Proto_Skype.vcxproj", "{DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Tox", "..\protocols\Tox\proto_tox\Proto_Tox.vcxproj", "{129A4E61-E476-45E8-BD50-5E03BA80E9AD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MinecraftDynmap", "..\protocols\MinecraftDynmap\proto_minecraftdynmap\minecraftdynmap_icons.vcxproj", "{178045D7-C0F4-4931-9F40-AB1B2A175092}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_ICQ", "..\protocols\ICQ-WIM\proto_icq\Proto_ICQ.vcxproj", "{DB3B0449-E576-4BBB-8B08-AB9E914D39CA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MRA", "..\protocols\ICQ-WIM\proto_mra\Proto_MRA.vcxproj", "{38BF6F63-58E7-442D-A7E8-B4BD57D224E2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Facebook", "..\protocols\Facebook\proto_facebook\Proto_Facebook.vcxproj", "{44298314-7DD4-4EF7-B576-30E503257223}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_WhatsApp", "..\protocols\WhatsApp\proto_whatsapp\Proto_WhatsApp.vcxproj", "{64A2B403-90AF-4CF8-BC69-4E8D33872D64}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Telegram", "..\protocols\Telegram\proto_telegram\Proto_Telegram.vcxproj", "{129A4E61-45E8-E476-BD50-5E03BA80E9AD}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.Build.0 = Debug|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.ActiveCfg = Debug|x64 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.Build.0 = Debug|x64 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.ActiveCfg = Release|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.Build.0 = Release|Win32 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.ActiveCfg = Release|x64 - {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.Build.0 = Release|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.ActiveCfg = Debug|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.Build.0 = Debug|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.ActiveCfg = Debug|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.Build.0 = Debug|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.ActiveCfg = Release|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.Build.0 = Release|Win32 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.ActiveCfg = Release|x64 - {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.Build.0 = Release|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.Build.0 = Debug|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.ActiveCfg = Debug|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.Build.0 = Debug|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.ActiveCfg = Release|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.Build.0 = Release|Win32 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.ActiveCfg = Release|x64 - {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.Build.0 = Release|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.Build.0 = Debug|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.ActiveCfg = Debug|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.Build.0 = Debug|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.ActiveCfg = Release|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.Build.0 = Release|Win32 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.ActiveCfg = Release|x64 - {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.Build.0 = Release|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.Build.0 = Debug|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.ActiveCfg = Debug|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.Build.0 = Debug|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.ActiveCfg = Release|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.Build.0 = Release|Win32 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.ActiveCfg = Release|x64 - {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.Build.0 = Release|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.Build.0 = Debug|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.ActiveCfg = Debug|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.Build.0 = Debug|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.ActiveCfg = Release|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.Build.0 = Release|Win32 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.ActiveCfg = Release|x64 - {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.Build.0 = Release|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.ActiveCfg = Debug|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.Build.0 = Debug|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.ActiveCfg = Debug|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.Build.0 = Debug|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.ActiveCfg = Release|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.Build.0 = Release|Win32 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.ActiveCfg = Release|x64 - {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.Build.0 = Release|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.ActiveCfg = Debug|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.Build.0 = Debug|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.ActiveCfg = Debug|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.Build.0 = Debug|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.ActiveCfg = Release|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.Build.0 = Release|Win32 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.ActiveCfg = Release|x64 - {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.Build.0 = Release|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.ActiveCfg = Debug|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.Build.0 = Debug|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.ActiveCfg = Debug|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.Build.0 = Debug|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.ActiveCfg = Release|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.Build.0 = Release|Win32 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.ActiveCfg = Release|x64 - {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.Build.0 = Release|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.Build.0 = Debug|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.ActiveCfg = Debug|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.Build.0 = Debug|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.ActiveCfg = Release|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.Build.0 = Release|Win32 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.ActiveCfg = Release|x64 - {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.Build.0 = Release|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.ActiveCfg = Debug|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.Build.0 = Debug|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.ActiveCfg = Debug|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.Build.0 = Debug|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.ActiveCfg = Release|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.Build.0 = Release|Win32 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.ActiveCfg = Release|x64 - {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.Build.0 = Release|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.ActiveCfg = Debug|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.Build.0 = Debug|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.ActiveCfg = Debug|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.Build.0 = Debug|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.ActiveCfg = Release|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.Build.0 = Release|Win32 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.ActiveCfg = Release|x64 - {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.Build.0 = Release|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.ActiveCfg = Debug|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.Build.0 = Debug|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.ActiveCfg = Debug|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.Build.0 = Debug|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.ActiveCfg = Release|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.Build.0 = Release|Win32 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.ActiveCfg = Release|x64 - {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.Build.0 = Release|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.ActiveCfg = Debug|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.Build.0 = Debug|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.ActiveCfg = Debug|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.Build.0 = Debug|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.ActiveCfg = Release|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.Build.0 = Release|Win32 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.ActiveCfg = Release|x64 - {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.Build.0 = Release|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.ActiveCfg = Debug|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.Build.0 = Debug|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.ActiveCfg = Debug|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.Build.0 = Debug|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.ActiveCfg = Release|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.Build.0 = Release|Win32 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.ActiveCfg = Release|x64 - {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.Build.0 = Release|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.Build.0 = Debug|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.ActiveCfg = Debug|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.Build.0 = Debug|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.ActiveCfg = Release|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.Build.0 = Release|Win32 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.ActiveCfg = Release|x64 - {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.Build.0 = Release|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.ActiveCfg = Debug|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.Build.0 = Debug|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.ActiveCfg = Debug|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.Build.0 = Debug|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.ActiveCfg = Release|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.Build.0 = Release|Win32 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.ActiveCfg = Release|x64 - {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.Build.0 = Release|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.ActiveCfg = Debug|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.Build.0 = Debug|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.ActiveCfg = Debug|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.Build.0 = Debug|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.ActiveCfg = Release|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.Build.0 = Release|Win32 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.ActiveCfg = Release|x64 - {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.Build.0 = Release|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.Build.0 = Debug|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.ActiveCfg = Debug|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.Build.0 = Debug|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.ActiveCfg = Release|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.Build.0 = Release|Win32 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.ActiveCfg = Release|x64 - {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.Build.0 = Release|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.ActiveCfg = Debug|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.Build.0 = Debug|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.ActiveCfg = Debug|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.Build.0 = Debug|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.ActiveCfg = Release|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.Build.0 = Release|Win32 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.ActiveCfg = Release|x64 - {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.Build.0 = Release|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.ActiveCfg = Debug|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.Build.0 = Debug|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.ActiveCfg = Debug|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.Build.0 = Debug|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.ActiveCfg = Release|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.Build.0 = Release|Win32 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.ActiveCfg = Release|x64 - {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.Build.0 = Release|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.ActiveCfg = Debug|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.Build.0 = Debug|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.ActiveCfg = Debug|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.Build.0 = Debug|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.ActiveCfg = Release|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.Build.0 = Release|Win32 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.ActiveCfg = Release|x64 - {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.Build.0 = Release|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.ActiveCfg = Debug|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.Build.0 = Debug|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.ActiveCfg = Debug|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.Build.0 = Debug|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.ActiveCfg = Release|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.Build.0 = Release|Win32 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.ActiveCfg = Release|x64 - {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.Build.0 = Release|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.Build.0 = Debug|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.ActiveCfg = Debug|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.Build.0 = Debug|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.ActiveCfg = Release|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.Build.0 = Release|Win32 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.ActiveCfg = Release|x64 - {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.Build.0 = Release|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 - {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.ActiveCfg = Debug|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.Build.0 = Debug|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.ActiveCfg = Debug|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.Build.0 = Debug|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.ActiveCfg = Release|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.Build.0 = Release|Win32 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.ActiveCfg = Release|x64 - {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.Build.0 = Release|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.ActiveCfg = Debug|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.Build.0 = Debug|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.ActiveCfg = Debug|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.Build.0 = Debug|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.ActiveCfg = Release|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.Build.0 = Release|Win32 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.ActiveCfg = Release|x64 - {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.Build.0 = Release|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.ActiveCfg = Debug|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.Build.0 = Debug|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.ActiveCfg = Debug|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.Build.0 = Debug|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.ActiveCfg = Release|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.Build.0 = Release|Win32 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.ActiveCfg = Release|x64 - {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.Build.0 = Release|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.ActiveCfg = Debug|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.Build.0 = Debug|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.ActiveCfg = Debug|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.Build.0 = Debug|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.ActiveCfg = Release|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.Build.0 = Release|Win32 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.ActiveCfg = Release|x64 - {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.Build.0 = Release|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.ActiveCfg = Debug|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.Build.0 = Debug|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.ActiveCfg = Debug|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.Build.0 = Debug|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.ActiveCfg = Release|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.Build.0 = Release|Win32 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.ActiveCfg = Release|x64 - {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.Build.0 = Release|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 - {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F618F449-6B8C-43C9-9647-D7D53706723D} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32112.339 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Toolbar_icons", "..\plugins\Clist_modern\icons_pack\Toolbar_icons.vcxproj", "{796B43EF-DACE-4145-8571-31886F45A2C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecureIM_icons", "..\plugins\SecureIM\SecureIM_icons\secureim_icons.vcxproj", "{3FAB6AC7-6B7F-4779-B519-34E8035074A4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SpellChecker_Flags", "..\plugins\SpellChecker\Flags\spellchecker_flags.vcxproj", "{3B8B2642-716E-437C-B341-279B08FDC2C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UInfoEx_icons", "..\plugins\UserInfoEx\IconPacks\default\icons_default_17.vcxproj", "{AA542F66-FF66-498A-ADBE-0BB9103ECD0A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_IRC", "..\protocols\IRCG\proto_irc\Proto_IRC.vcxproj", "{DD667247-3712-4355-9774-7E6ACAF2275E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Jabber", "..\protocols\JabberG\proto_jabber\Proto_Jabber.vcxproj", "{1AA0A504-0644-4F00-A1AD-F55D69E50DD0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_GG", "..\protocols\Gadu-Gadu\proto_gg\Proto_GG.vcxproj", "{33912E32-3B68-4E2C-82AE-64C06EE987A7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Twitter", "..\protocols\Twitter\proto_twitter\Proto_Twitter.vcxproj", "{A82C682E-8596-4DCA-98A6-50436194714B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xStatus_Jabber", "..\protocols\JabberG\jabber_xstatus\xStatus_Jabber.vcxproj", "{6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryPP_icons", "..\plugins\HistoryPlusPlus\historypp_icons\HistoryPP_icons.vcxproj", "{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Omegle", "..\protocols\Omegle\proto_omegle\omegle_icons.vcxproj", "{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM_icons", "..\plugins\TabSRMM\TabSRMM_icons\NOVA\ICONS_NOVA_17.vcxproj", "{F553F140-B7D3-4984-90B1-00D4831B8A6E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_mRadio", "..\plugins\mRadio\proto_mradio\Proto_mRadio.vcxproj", "{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_NewsAggregator", "..\protocols\NewsAggregator\proto_newsaggregator\Proto_NewsAggregator.vcxproj", "{B97882DC-7462-41DB-A390-BDFCE5295265}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_CurrencyRates", "..\protocols\CurrencyRates\proto_CurrencyRates\proto_CurrencyRates.vcxproj", "{5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Weather", "..\protocols\Weather\proto_weather\proto_weather.vcxproj", "{B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_YAMN", "..\protocols\YAMN\proto_yamn\proto_YAMN.vcxproj", "{C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fp_icons", "..\plugins\FingerprintNG\iconpacks\fp_icons.vcxproj", "{7F854B13-37EA-4956-BAEE-9715AE9F4579}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_VKontakte", "..\protocols\VKontakte\proto_vkontakte\Proto_VKontakte.vcxproj", "{5F8495EF-0765-4E03-905D-639BDBF05B4F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Sametime", "..\protocols\Sametime\proto_sametime\Proto_Sametime.vcxproj", "{217C99B1-0D5E-4A85-A84F-836FCA167B25}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MetaContacts", "..\src\icons\proto_metacontacts\Proto_MetaContacts.vcxproj", "{793B6174-89B0-4682-A957-A32BE7F61502}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Dummy", "..\protocols\Dummy\proto_dummy\Proto_Dummy.vcxproj", "{018F801B-E80F-4E49-A640-E30BC445E74A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Steam", "..\protocols\Steam\proto_steam\Proto_Steam.vcxproj", "{523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Skype", "..\protocols\SkypeWeb\proto_skype\Proto_Skype.vcxproj", "{DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Tox", "..\protocols\Tox\proto_tox\Proto_Tox.vcxproj", "{129A4E61-E476-45E8-BD50-5E03BA80E9AD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MinecraftDynmap", "..\protocols\MinecraftDynmap\proto_minecraftdynmap\minecraftdynmap_icons.vcxproj", "{178045D7-C0F4-4931-9F40-AB1B2A175092}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_ICQ", "..\protocols\ICQ-WIM\proto_icq\Proto_ICQ.vcxproj", "{DB3B0449-E576-4BBB-8B08-AB9E914D39CA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_MRA", "..\protocols\ICQ-WIM\proto_mra\Proto_MRA.vcxproj", "{38BF6F63-58E7-442D-A7E8-B4BD57D224E2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Facebook", "..\protocols\Facebook\proto_facebook\Proto_Facebook.vcxproj", "{44298314-7DD4-4EF7-B576-30E503257223}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_WhatsApp", "..\protocols\WhatsApp\proto_whatsapp\Proto_WhatsApp.vcxproj", "{64A2B403-90AF-4CF8-BC69-4E8D33872D64}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Telegram", "..\protocols\Telegram\proto_telegram\Proto_Telegram.vcxproj", "{129A4E61-45E8-E476-BD50-5E03BA80E9AD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|Win32.Build.0 = Debug|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.ActiveCfg = Debug|x64 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Debug|x64.Build.0 = Debug|x64 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.ActiveCfg = Release|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|Win32.Build.0 = Release|Win32 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.ActiveCfg = Release|x64 + {796B43EF-DACE-4145-8571-31886F45A2C0}.Release|x64.Build.0 = Release|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|Win32.Build.0 = Debug|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.ActiveCfg = Debug|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Debug|x64.Build.0 = Debug|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.ActiveCfg = Release|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|Win32.Build.0 = Release|Win32 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.ActiveCfg = Release|x64 + {3FAB6AC7-6B7F-4779-B519-34E8035074A4}.Release|x64.Build.0 = Release|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|Win32.Build.0 = Debug|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.ActiveCfg = Debug|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Debug|x64.Build.0 = Debug|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.ActiveCfg = Release|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|Win32.Build.0 = Release|Win32 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.ActiveCfg = Release|x64 + {3B8B2642-716E-437C-B341-279B08FDC2C0}.Release|x64.Build.0 = Release|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|Win32.Build.0 = Debug|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.ActiveCfg = Debug|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Debug|x64.Build.0 = Debug|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.ActiveCfg = Release|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|Win32.Build.0 = Release|Win32 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.ActiveCfg = Release|x64 + {AA542F66-FF66-498A-ADBE-0BB9103ECD0A}.Release|x64.Build.0 = Release|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|Win32.Build.0 = Debug|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.ActiveCfg = Debug|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Debug|x64.Build.0 = Debug|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.ActiveCfg = Release|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|Win32.Build.0 = Release|Win32 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.ActiveCfg = Release|x64 + {DD667247-3712-4355-9774-7E6ACAF2275E}.Release|x64.Build.0 = Release|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|Win32.Build.0 = Debug|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.ActiveCfg = Debug|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Debug|x64.Build.0 = Debug|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.ActiveCfg = Release|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|Win32.Build.0 = Release|Win32 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.ActiveCfg = Release|x64 + {1AA0A504-0644-4F00-A1AD-F55D69E50DD0}.Release|x64.Build.0 = Release|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.ActiveCfg = Debug|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|Win32.Build.0 = Debug|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.ActiveCfg = Debug|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Debug|x64.Build.0 = Debug|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.ActiveCfg = Release|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|Win32.Build.0 = Release|Win32 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.ActiveCfg = Release|x64 + {33912E32-3B68-4E2C-82AE-64C06EE987A7}.Release|x64.Build.0 = Release|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.ActiveCfg = Debug|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|Win32.Build.0 = Debug|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.ActiveCfg = Debug|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Debug|x64.Build.0 = Debug|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.ActiveCfg = Release|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|Win32.Build.0 = Release|Win32 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.ActiveCfg = Release|x64 + {A82C682E-8596-4DCA-98A6-50436194714B}.Release|x64.Build.0 = Release|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.ActiveCfg = Debug|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|Win32.Build.0 = Debug|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.ActiveCfg = Debug|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Debug|x64.Build.0 = Debug|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.ActiveCfg = Release|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|Win32.Build.0 = Release|Win32 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.ActiveCfg = Release|x64 + {6BBEEA1E-3C87-6CD1-F32A-027C3EC5320E}.Release|x64.Build.0 = Release|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.ActiveCfg = Debug|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|Win32.Build.0 = Debug|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.ActiveCfg = Debug|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Debug|x64.Build.0 = Debug|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.ActiveCfg = Release|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.Build.0 = Release|Win32 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.ActiveCfg = Release|x64 + {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.Build.0 = Release|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.ActiveCfg = Debug|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.Build.0 = Debug|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.ActiveCfg = Debug|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.Build.0 = Debug|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.ActiveCfg = Release|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.Build.0 = Release|Win32 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.ActiveCfg = Release|x64 + {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.Build.0 = Release|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.Build.0 = Debug|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.ActiveCfg = Debug|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.Build.0 = Debug|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.ActiveCfg = Release|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|Win32.Build.0 = Release|Win32 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.ActiveCfg = Release|x64 + {F553F140-B7D3-4984-90B1-00D4831B8A6E}.Release|x64.Build.0 = Release|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.ActiveCfg = Debug|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|Win32.Build.0 = Debug|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.ActiveCfg = Debug|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Debug|x64.Build.0 = Debug|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.ActiveCfg = Release|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|Win32.Build.0 = Release|Win32 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.ActiveCfg = Release|x64 + {2BCC460C-E7C0-4AA8-B680-B9DE561A8408}.Release|x64.Build.0 = Release|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.ActiveCfg = Debug|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|Win32.Build.0 = Debug|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.ActiveCfg = Debug|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Debug|x64.Build.0 = Debug|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.ActiveCfg = Release|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|Win32.Build.0 = Release|Win32 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.ActiveCfg = Release|x64 + {B97882DC-7462-41DB-A390-BDFCE5295265}.Release|x64.Build.0 = Release|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|Win32.Build.0 = Debug|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.ActiveCfg = Debug|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Debug|x64.Build.0 = Debug|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.ActiveCfg = Release|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|Win32.Build.0 = Release|Win32 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.ActiveCfg = Release|x64 + {5A0A9761-78E1-4E0F-AD8C-8931A667A5F2}.Release|x64.Build.0 = Release|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.ActiveCfg = Debug|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.Build.0 = Debug|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.ActiveCfg = Debug|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.Build.0 = Debug|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.ActiveCfg = Release|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.Build.0 = Release|Win32 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.ActiveCfg = Release|x64 + {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.Build.0 = Release|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.ActiveCfg = Debug|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|Win32.Build.0 = Debug|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.ActiveCfg = Debug|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Debug|x64.Build.0 = Debug|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.ActiveCfg = Release|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|Win32.Build.0 = Release|Win32 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.ActiveCfg = Release|x64 + {C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}.Release|x64.Build.0 = Release|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.ActiveCfg = Debug|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|Win32.Build.0 = Debug|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.ActiveCfg = Debug|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Debug|x64.Build.0 = Debug|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.ActiveCfg = Release|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|Win32.Build.0 = Release|Win32 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.ActiveCfg = Release|x64 + {7F854B13-37EA-4956-BAEE-9715AE9F4579}.Release|x64.Build.0 = Release|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|Win32.Build.0 = Debug|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.ActiveCfg = Debug|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Debug|x64.Build.0 = Debug|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.ActiveCfg = Release|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|Win32.Build.0 = Release|Win32 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.ActiveCfg = Release|x64 + {5F8495EF-0765-4E03-905D-639BDBF05B4F}.Release|x64.Build.0 = Release|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.ActiveCfg = Debug|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|Win32.Build.0 = Debug|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.ActiveCfg = Debug|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Debug|x64.Build.0 = Debug|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.ActiveCfg = Release|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|Win32.Build.0 = Release|Win32 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.ActiveCfg = Release|x64 + {217C99B1-0D5E-4A85-A84F-836FCA167B25}.Release|x64.Build.0 = Release|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.ActiveCfg = Debug|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|Win32.Build.0 = Debug|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.ActiveCfg = Debug|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Debug|x64.Build.0 = Debug|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.ActiveCfg = Release|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|Win32.Build.0 = Release|Win32 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.ActiveCfg = Release|x64 + {793B6174-89B0-4682-A957-A32BE7F61502}.Release|x64.Build.0 = Release|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.ActiveCfg = Debug|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|Win32.Build.0 = Debug|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.ActiveCfg = Debug|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Debug|x64.Build.0 = Debug|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.ActiveCfg = Release|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|Win32.Build.0 = Release|Win32 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.ActiveCfg = Release|x64 + {018F801B-E80F-4E49-A640-E30BC445E74A}.Release|x64.Build.0 = Release|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.ActiveCfg = Debug|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|Win32.Build.0 = Debug|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.ActiveCfg = Debug|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Debug|x64.Build.0 = Debug|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.ActiveCfg = Release|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|Win32.Build.0 = Release|Win32 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.ActiveCfg = Release|x64 + {523D76E4-1AB3-49B6-AFF0-E6057FAB9BC0}.Release|x64.Build.0 = Release|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|Win32.Build.0 = Debug|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.ActiveCfg = Debug|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Debug|x64.Build.0 = Debug|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.ActiveCfg = Release|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|Win32.Build.0 = Release|Win32 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.ActiveCfg = Release|x64 + {DA3CD2B3-5DAC-4F6A-BC9F-05DE39EFF4C3}.Release|x64.Build.0 = Release|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 + {129A4E61-E476-45E8-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.ActiveCfg = Debug|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|Win32.Build.0 = Debug|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.ActiveCfg = Debug|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Debug|x64.Build.0 = Debug|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.ActiveCfg = Release|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|Win32.Build.0 = Release|Win32 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.ActiveCfg = Release|x64 + {178045D7-C0F4-4931-9F40-AB1B2A175092}.Release|x64.Build.0 = Release|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.ActiveCfg = Debug|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|Win32.Build.0 = Debug|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.ActiveCfg = Debug|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Debug|x64.Build.0 = Debug|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.ActiveCfg = Release|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|Win32.Build.0 = Release|Win32 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.ActiveCfg = Release|x64 + {DB3B0449-E576-4BBB-8B08-AB9E914D39CA}.Release|x64.Build.0 = Release|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.ActiveCfg = Debug|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|Win32.Build.0 = Debug|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.ActiveCfg = Debug|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Debug|x64.Build.0 = Debug|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.ActiveCfg = Release|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|Win32.Build.0 = Release|Win32 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.ActiveCfg = Release|x64 + {38BF6F63-58E7-442D-A7E8-B4BD57D224E2}.Release|x64.Build.0 = Release|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.ActiveCfg = Debug|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|Win32.Build.0 = Debug|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.ActiveCfg = Debug|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Debug|x64.Build.0 = Debug|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.ActiveCfg = Release|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|Win32.Build.0 = Release|Win32 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.ActiveCfg = Release|x64 + {44298314-7DD4-4EF7-B576-30E503257223}.Release|x64.Build.0 = Release|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.ActiveCfg = Debug|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|Win32.Build.0 = Debug|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.ActiveCfg = Debug|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Debug|x64.Build.0 = Debug|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.ActiveCfg = Release|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|Win32.Build.0 = Release|Win32 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.ActiveCfg = Release|x64 + {64A2B403-90AF-4CF8-BC69-4E8D33872D64}.Release|x64.Build.0 = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.ActiveCfg = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|Win32.Build.0 = Debug|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.ActiveCfg = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Debug|x64.Build.0 = Debug|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.ActiveCfg = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|Win32.Build.0 = Release|Win32 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.ActiveCfg = Release|x64 + {129A4E61-45E8-E476-BD50-5E03BA80E9AD}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F618F449-6B8C-43C9-9647-D7D53706723D} + EndGlobalSection +EndGlobal diff --git a/bin17/tdlib.sln b/bin17/tdlib.sln index 1b0a9c0ae5..5c3927afc6 100644 --- a/bin17/tdlib.sln +++ b/bin17/tdlib.sln @@ -1,81 +1,81 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 17 -VisualStudioVersion = 17.0.33026.149 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdactor", "..\protocols\Telegram\tdlib\tdactor.vcxproj", "{85F63934-02FE-332A-8703-059040B65512}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdcore", "..\protocols\Telegram\tdlib\tdcore.vcxproj", "{FC88FB5A-AAED-3F3E-9959-236444D8F644}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tddb", "..\protocols\Telegram\tdlib\tddb.vcxproj", "{F525EE11-8820-3D8A-87A5-465D50A98A64}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdlib", "..\protocols\Telegram\tdlib\tdlib.vcxproj", "{800E305A-3704-4617-ADA0-DEE8EAFDB804}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdnet", "..\protocols\Telegram\tdlib\tdnet.vcxproj", "{2246C3CF-7888-3102-984A-80214ADF418C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdutils", "..\protocols\Telegram\tdlib\tdutils.vcxproj", "{D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.ActiveCfg = Debug|x64 - {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.Build.0 = Debug|x64 - {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.ActiveCfg = Debug|Win32 - {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.Build.0 = Debug|Win32 - {85F63934-02FE-332A-8703-059040B65512}.Release|x64.ActiveCfg = Release|x64 - {85F63934-02FE-332A-8703-059040B65512}.Release|x64.Build.0 = Release|x64 - {85F63934-02FE-332A-8703-059040B65512}.Release|x86.ActiveCfg = Release|Win32 - {85F63934-02FE-332A-8703-059040B65512}.Release|x86.Build.0 = Release|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.ActiveCfg = Debug|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.Build.0 = Debug|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.ActiveCfg = Debug|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.Build.0 = Debug|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.ActiveCfg = Release|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.Build.0 = Release|x64 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.ActiveCfg = Release|Win32 - {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.Build.0 = Release|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.ActiveCfg = Debug|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.Build.0 = Debug|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.ActiveCfg = Debug|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.Build.0 = Debug|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.ActiveCfg = Release|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.Build.0 = Release|x64 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.ActiveCfg = Release|Win32 - {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.Build.0 = Release|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.ActiveCfg = Debug|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.Build.0 = Debug|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.ActiveCfg = Debug|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.Build.0 = Debug|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.ActiveCfg = Release|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.Build.0 = Release|x64 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.ActiveCfg = Release|Win32 - {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.Build.0 = Release|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.ActiveCfg = Debug|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.Build.0 = Debug|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.ActiveCfg = Debug|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.Build.0 = Debug|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.ActiveCfg = Release|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.Build.0 = Release|x64 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.ActiveCfg = Release|Win32 - {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.Build.0 = Release|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.ActiveCfg = Debug|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.Build.0 = Debug|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.ActiveCfg = Debug|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.Build.0 = Debug|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.ActiveCfg = Release|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.Build.0 = Release|x64 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.ActiveCfg = Release|Win32 - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8F24FFFB-D787-4C9B-A473-3B5904646619} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 17 +VisualStudioVersion = 17.0.33026.149 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdactor", "..\protocols\Telegram\tdlib\tdactor.vcxproj", "{85F63934-02FE-332A-8703-059040B65512}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdcore", "..\protocols\Telegram\tdlib\tdcore.vcxproj", "{FC88FB5A-AAED-3F3E-9959-236444D8F644}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tddb", "..\protocols\Telegram\tdlib\tddb.vcxproj", "{F525EE11-8820-3D8A-87A5-465D50A98A64}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdlib", "..\protocols\Telegram\tdlib\tdlib.vcxproj", "{800E305A-3704-4617-ADA0-DEE8EAFDB804}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdnet", "..\protocols\Telegram\tdlib\tdnet.vcxproj", "{2246C3CF-7888-3102-984A-80214ADF418C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tdutils", "..\protocols\Telegram\tdlib\tdutils.vcxproj", "{D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.ActiveCfg = Debug|x64 + {85F63934-02FE-332A-8703-059040B65512}.Debug|x64.Build.0 = Debug|x64 + {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.ActiveCfg = Debug|Win32 + {85F63934-02FE-332A-8703-059040B65512}.Debug|x86.Build.0 = Debug|Win32 + {85F63934-02FE-332A-8703-059040B65512}.Release|x64.ActiveCfg = Release|x64 + {85F63934-02FE-332A-8703-059040B65512}.Release|x64.Build.0 = Release|x64 + {85F63934-02FE-332A-8703-059040B65512}.Release|x86.ActiveCfg = Release|Win32 + {85F63934-02FE-332A-8703-059040B65512}.Release|x86.Build.0 = Release|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.ActiveCfg = Debug|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x64.Build.0 = Debug|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.ActiveCfg = Debug|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Debug|x86.Build.0 = Debug|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.ActiveCfg = Release|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x64.Build.0 = Release|x64 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.ActiveCfg = Release|Win32 + {FC88FB5A-AAED-3F3E-9959-236444D8F644}.Release|x86.Build.0 = Release|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.ActiveCfg = Debug|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x64.Build.0 = Debug|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.ActiveCfg = Debug|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Debug|x86.Build.0 = Debug|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.ActiveCfg = Release|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x64.Build.0 = Release|x64 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.ActiveCfg = Release|Win32 + {F525EE11-8820-3D8A-87A5-465D50A98A64}.Release|x86.Build.0 = Release|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.ActiveCfg = Debug|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x64.Build.0 = Debug|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.ActiveCfg = Debug|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Debug|x86.Build.0 = Debug|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.ActiveCfg = Release|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x64.Build.0 = Release|x64 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.ActiveCfg = Release|Win32 + {800E305A-3704-4617-ADA0-DEE8EAFDB804}.Release|x86.Build.0 = Release|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.ActiveCfg = Debug|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x64.Build.0 = Debug|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.ActiveCfg = Debug|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Debug|x86.Build.0 = Debug|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.ActiveCfg = Release|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x64.Build.0 = Release|x64 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.ActiveCfg = Release|Win32 + {2246C3CF-7888-3102-984A-80214ADF418C}.Release|x86.Build.0 = Release|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.ActiveCfg = Debug|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x64.Build.0 = Debug|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.ActiveCfg = Debug|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Debug|x86.Build.0 = Debug|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.ActiveCfg = Release|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x64.Build.0 = Release|x64 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.ActiveCfg = Release|Win32 + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8F24FFFB-D787-4C9B-A473-3B5904646619} + EndGlobalSection +EndGlobal diff --git a/include/m_database.h b/include/m_database.h index fda99b4b2f..ad0e16e60b 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -1,799 +1,799 @@ -///////////////////////////////////////////////////////////////////////////////////////// -// Miranda NG: the free IM client for Microsoft* Windows* -// -// Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) -// Copyright (c) 2000-08 Miranda ICQ/IM project, -// all portions of this codebase are copyrighted to the people -// listed in contributors.txt. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef M_DATABASE_H__ -#define M_DATABASE_H__ 1 - -///////////////////////////////////////////////////////////////////////////////////////// -// GENERALLY USEFUL STUFF - -#if !defined(M_SYSTEM_H__) - #include "m_system.h" -#endif - -#if !defined(M_UTILS_H__) - #include "m_utils.h" -#endif - -#ifdef _MSC_VER - #pragma warning(disable:4201 4204) -#endif - -///////////////////////////////////////////////////////////////////////////////////////// -// database functions - -// Switches safety settings on or off -// newSetting is TRUE initially. -// Miranda's database is normally protected against corruption by agressively -// flushing data to the disk on writes. If you're doing a lot of writes (eg in -// an import plugin) it can sometimes be desirable to switch this feature off to -// speed up the process. If you do switch it off, you must remember that crashes -// are far more likely to be catastrophic, so switch it back on at the earliest -// possible opportunity. -// Note that if you're doing a lot of setting writes, the flush is already delayed -// so you need not use this service for that purpose. - -EXTERN_C MIR_CORE_DLL(void) db_set_safety_mode(BOOL bNewMode); - -// Gets the number of contacts in the database, which does not count the user -// Returns the number of contacts. They can be retrieved using contact/findfirst and contact/findnext - -EXTERN_C MIR_CORE_DLL(int) db_get_contact_count(void); - -// Checks if a module doesn't contain any settings (for the contact given) - -MIR_CORE_DLL(bool) db_is_module_empty(MCONTACT hContact, const char *module); - -// Copies a module to another module for the contact given (0 by default) - -EXTERN_C MIR_CORE_DLL(int) db_copy_module(const char *szModule, const char *szNewModule, MCONTACT hContact = 0); - -// Removes all settings for the specified module. -// hContact is 0 for global settings or matches the concrete contact - -EXTERN_C MIR_CORE_DLL(int) db_delete_module(MCONTACT hContact, const char *szModuleName); - -///////////////////////////////////////////////////////////////////////////////////////// -// contact functions - -// Adds a new contact to the database. New contacts initially have no settings -// whatsoever, they must all be added with db/contacts/writesetting. -// Returns a handle to the newly created contact on success, or NULL otherwise. -// Triggers a db/contact/added event just before it returns. - -EXTERN_C MIR_CORE_DLL(MCONTACT) db_add_contact(void); - -// Deletes the contact hContact from the database and all events and settings associated with it. -// Returns 0 on success or nonzero if hContact was invalid -// Please don't try to delete the user contact (hContact = NULL) -// Triggers a db/contact/deleted event just *before* it removes anything -// Because all events are deleted, lots of people may end up with invalid event -// handles from this operation, which they should be prepared for. - -EXTERN_C MIR_CORE_DLL(int) db_delete_contact(MCONTACT hContact); - -// Checks if a given value is a valid contact handle, note that due -// to the nature of multiple threading, a valid contact can still become -// invalid after a call to this service. -// Returns 1 if the contact is a contact, or 0 if the contact is not valid. - -EXTERN_C MIR_CORE_DLL(int) db_is_contact(MCONTACT hContact); - -///////////////////////////////////////////////////////////////////////////////////////// -// enumerators - -// Enumerates the names of all modules that have stored or requested information from the database. -// Returns the value returned by the last call to dbmep -// This service is only really useful for debugging, in conjunction with db/contact/enumsettings -// dbmep should return 0 to continue enumeration, or nonzero to stop. -// -// Modules names will be enumerated in no particular order -// Writing to the database while module names are being enumerated will cause -// unpredictable results in the enumeration, but the write will work. -// szModuleName is only guaranteed to be valid for the duration of the callback. -// If you want to keep it for longer you must allocation your own storage. - -typedef int(*DBMODULEENUMPROC)(const char *szModuleName, void *param); - -EXTERN_C MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC dbmep, void *param = nullptr); - -// Lists all resident settings - -EXTERN_C MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, void *param = nullptr); - -// Lists all the settings a specific modules has stored in the database for a specific contact. -// Returns the return value of the last call to pfnEnumProc, or -1 if there are -// no settings for that module/contact pair -// Writing to or deleting from the database while enumerating will have -// unpredictable results for the enumeration, but the write will succeed. -// Use db/modules/enum to get a complete list of module names -// szSetting is only guaranteed to be valid for the duration of the callback. If -// you want to keep it for longer you must allocation your own storage. - -typedef int (*DBSETTINGENUMPROC)(const char *szSetting, void *param); - -EXTERN_C MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param = nullptr); - -///////////////////////////////////////////////////////////////////////////////////////// -// DBVARIANT: used by db/contact/getsetting and db/contact/writesetting - -#define DBVT_DELETED 0 // this setting just got deleted, no other values are valid -#define DBVT_BYTE 1 // bVal and cVal are valid -#define DBVT_WORD 2 // wVal and sVal are valid -#define DBVT_DWORD 4 // dVal and lVal are valid -#define DBVT_ASCIIZ 255 // pszVal is valid -#define DBVT_BLOB 254 // cpbVal and pbVal are valid -#define DBVT_UTF8 253 // pszVal is valid -#define DBVT_WCHAR 252 // pwszVal is valid -#define DBVT_ENCRYPTED 250 // blob of encrypted bytesw - - -#define DBVTF_VARIABLELENGTH 0x80 - -struct DBVARIANT -{ - uint8_t type; - union { - uint8_t bVal; char cVal; - uint16_t wVal; short sVal; - uint32_t dVal; long lVal; - struct { - union { - char *pszVal; - wchar_t *pwszVal; - }; - uint16_t cchVal; //only used for db/contact/getsettingstatic - }; - struct { - uint16_t cpbVal; - uint8_t *pbVal; - }; - }; -}; - -#define DBEF_TEMPORARY 0x0001 // disable notifications about temporary database events -#define DBEF_SENT 0x0002 // this event was sent by the user. If not set this event was received. -#define DBEF_READ 0x0004 // event has been read by the user. It does not need to be processed any more except for history. -#define DBEF_RTL 0x0008 // event contains the right-to-left aligned text -#define DBEF_UTF 0x0010 // event contains a text in utf-8 -#define DBEF_ENCRYPTED 0x0020 // event is encrypted (never reported outside a driver) -#define DBEF_HAS_ID 0x0040 // event has unique server id - -struct DBEVENTINFO -{ - const char *szModule; // pointer to name of the module that 'owns' this event - uint32_t timestamp; // seconds since 00:00, 01/01/1970. Gives us times until 2106 - // unless you use the standard C library which is - // signed and can only do until 2038. In GMT. - uint32_t flags; // combination of DBEF_* flags - uint16_t eventType; // module-defined event type field - int cbBlob; // size of pBlob in bytes - uint8_t *pBlob; // pointer to buffer containing module-defined event data - const char *szId; // server id - - bool __forceinline markedRead() const { - return (flags & (DBEF_SENT | DBEF_READ)) != 0; - } - - wchar_t* getString(const char *str) const { - return (flags & DBEF_UTF) ? mir_utf8decodeW(str) : mir_a2u(str); - } - - bool __forceinline operator==(const DBEVENTINFO &e) { - return (timestamp == e.timestamp && eventType == e.eventType && cbBlob == e.cbBlob && (flags & DBEF_SENT) == (e.flags & DBEF_SENT)); - } -}; - -EXTERN_C MIR_CORE_DLL(INT_PTR) db_free(DBVARIANT *dbv); - -///////////////////////////////////////////////////////////////////////////////////////// -// Database contacts - -// Gets the handle of the first contact in the database. This handle can be used -// with loads of functions. It does not need to be closed. -// You can specify szProto to find only its contacts -// Returns a handle to the first contact in the db on success, or NULL if there -// are no contacts in the db. - -EXTERN_C MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto = nullptr); - -// Gets the handle of the next contact after hContact in the database. This handle -// can be used with loads of functions. It does not need to be closed. -// You can specify szProto to find only its contacts -// Returns a handle to the contact after hContact in the db on success or NULL if -// hContact was the last contact in the db or hContact was invalid. - -EXTERN_C MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto = nullptr); - -class Contacts -{ - const char *m_szModule; - -public: - Contacts(const char *m = nullptr) : - m_szModule(m) - {} - - class iterator - { - MCONTACT hContact; - const char *m_szModule; - - public: - __inline iterator(const char *_m, MCONTACT _h) : - hContact(_h), - m_szModule(_m) - {} - - __inline iterator operator++() { hContact = ::db_find_next(hContact, m_szModule); return *this; } - __inline bool operator!=(const iterator &p) { return hContact != p.hContact; } - __inline operator const MCONTACT*() const { return &hContact; } - }; - - __inline iterator begin() const { return iterator(m_szModule, ::db_find_first(m_szModule)); } - __inline iterator end() const { return iterator(m_szModule, 0); } -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// Database events - -// Adds a new event to a contact's event list -// Returns a handle to the newly added event, or NULL on failure -// Triggers a db/event/added event just before it returns. -// Events are sorted chronologically as they are entered, so you cannot guarantee -// that the new hEvent is the last event in the chain, however if a new event is -// added that has a timestamp less than 90 seconds *before* the event that should -// be after it, it will be added afterwards, to allow for protocols that only -// store times to the nearest minute, and slight delays in transports. -// There are a few predefined eventTypes below for easier compatibility, but -// modules are free to define their own, beginning at 2000 -// DBEVENTINFO.timestamp is in GMT, as returned by time(). There are services -// db/time/x below with useful stuff for dealing with it. - -#define EVENTTYPE_MESSAGE 0 -#define EVENTTYPE_CONTACTS 2 //v0.1.2.2+ -#define EVENTTYPE_ADDED 1000 //v0.1.1.0+: these used to be module- -#define EVENTTYPE_AUTHREQUEST 1001 //specific codes, hence the module- -#define EVENTTYPE_FILE 1002 //specific limit has been raised to 2000 - -EXTERN_C MIR_CORE_DLL(MEVENT) db_event_add(MCONTACT hContact, const DBEVENTINFO *dbei); - -// Gets the number of events in the chain belonging to a contact in the database. -// Returns the number of events in the chain owned by hContact or -1 if hContact -// is invalid. They can be retrieved using the db_event_first/last() services. - -EXTERN_C MIR_CORE_DLL(int) db_event_count(MCONTACT hContact); - -// Removes a single event from the database -// hDbEvent should have been returned by db_event_add/first/last/next/prev() -// Returns 0 on success, or nonzero if hDbEvent was invalid -// Triggers a db/event/deleted event just *before* the event is deleted - -EXTERN_C MIR_CORE_DLL(int) db_event_delete(MEVENT hDbEvent); - -// Edits an event in the database -// Returns 0 on success, or nonzero on error - -EXTERN_C MIR_CORE_DLL(int) db_event_edit(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *dbei); - -// Tries to find an event by its id if present -// if an event is found, it's edited, otherwise a new event is added - -EXTERN_C MIR_CORE_DLL(MEVENT) db_event_replace(MCONTACT hContact, const DBEVENTINFO *dbei); - -// Retrieves a handle to the first event in the chain for hContact -// Returns the handle, or NULL if hContact is invalid or has no events -// Events in a chain are sorted chronologically automatically - -EXTERN_C MIR_CORE_DLL(MEVENT) db_event_first(MCONTACT hContact); - -// Retrieves a handle to the first unread event in the chain for hContact -// Returns the handle, or NULL if hContact is invalid or all its events have been read - -EXTERN_C MIR_CORE_DLL(MEVENT) db_event_firstUnread(MCONTACT hContact); - -// Retrieves all the information stored in hDbEvent -// hDbEvent should have been returned by db_event_add/first/last/next/prev() -// Returns 0 on success or nonzero if hDbEvent is invalid -// Don't forget to set dbe.cbSize, dbe.pBlob and dbe.cbBlob before calling this function -// The correct value dbe.cbBlob can be got using db_event_getBlobSize -// If successful, all the fields of dbe are filled. dbe.cbBlob is set to the -// actual number of bytes retrieved and put in dbe.pBlob -// If dbe.cbBlob is too small, dbe.pBlob is filled up to the size of dbe.cbBlob -// and then dbe.cbBlob is set to the required size of data to go in dbe.pBlob -// On return, dbe.szModule is a pointer to the database module's own internal list -// of modules. Look but don't touch. - -EXTERN_C MIR_CORE_DLL(int) db_event_get(MEVENT hDbEvent, DBEVENTINFO *dbei); - -// Retrieves the space in bytes required to store the blob in hDbEvent -// hDbEvent should have been returned by db_event_add/first/last/next/prev() -// Returns the space required in bytes, or -1 if hDbEvent is invalid - -EXTERN_C MIR_CORE_DLL(int) db_event_getBlobSize(MEVENT hDbEvent); - -// Retrieves a handle to the contact that owns hDbEvent. -// hDbEvent should have been returned by db_event_add/first/last/next/prev() -// NULL is a valid return value, meaning, as usual, the user. -// Returns INVALID_CONTACT_ID if hDbEvent is invalid, or the handle to the contact on success - -EXTERN_C MIR_CORE_DLL(MCONTACT) db_event_getContact(MEVENT hDbEvent); - -// Retrieves a handle to the last event in the chain for hContact -// Returns the handle, or NULL if hContact is invalid or has no events -// Events in a chain are sorted chronologically automatically - -EXTERN_C MIR_CORE_DLL(MEVENT) db_event_last(MCONTACT hContact); - -// Changes the flags for an event to mark it as read. -// hDbEvent should have been returned by db_event_add/first/last/next/prev() -// Returns the entire flag uint32_t for the event after the change, or -1 if hDbEvent is invalid. -// This is the one database write operation that does not trigger an event. -// Modules should not save flags states for any length of time. - -EXTERN_C MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, MEVENT hDbEvent); - -// Retrieves a handle to the next event in a chain after hDbEvent -// Returns the handle, or NULL if hDbEvent is invalid or is the last event -// Events in a chain are sorted chronologically automatically - -EXTERN_C MIR_CORE_DLL(MEVENT) db_event_next(MCONTACT hContact, MEVENT hDbEvent); - -// Retrieves a handle to the previous event in a chain before hDbEvent -// Returns the handle, or NULL if hDbEvent is invalid or is the first event -// Events in a chain are sorted chronologically automatically - -EXTERN_C MIR_CORE_DLL(MEVENT) db_event_prev(MCONTACT hContact, MEVENT hDbEvent); - -// Retrieves a handle to the event identified by its module and unique identifier - -EXTERN_C MIR_CORE_DLL(MEVENT) db_event_getById(const char *szModule, const char *szId); - -// Updates the server ID associated with an event -// Returns 0 on success or a failure otherwise - -EXTERN_C MIR_CORE_DLL(int) db_event_updateId(MEVENT hDbEvent, const char *szId); - -///////////////////////////////////////////////////////////////////////////////////////// -// Database settings - -EXTERN_C MIR_CORE_DLL(INT_PTR) db_get(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); - -EXTERN_C MIR_CORE_DLL(int) db_get_b(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue = 0); -EXTERN_C MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue = 0); -EXTERN_C MIR_CORE_DLL(uint32_t) db_get_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t errorValue = 0); - -EXTERN_C MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr); -EXTERN_C MIR_CORE_DLL(char*) db_get_utfa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr); -EXTERN_C MIR_CORE_DLL(wchar_t*) db_get_wsa(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szValue = nullptr); - -MIR_CORE_DLL(CMStringA) db_get_sm(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr); -MIR_CORE_DLL(CMStringW) db_get_wsm(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szValue = nullptr); - -EXTERN_C MIR_CORE_DLL(int) db_get_static(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest); -EXTERN_C MIR_CORE_DLL(int) db_get_static_utf(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest); -EXTERN_C MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, const char *szModule, const char *szSetting, wchar_t *pDest, int cbDest); - -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, const char *szModule, const char *szSetting, uint8_t val); -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const char *szSetting, uint16_t val); -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t val); -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val); -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *val); -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val); -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, const char *szModule, const char *szSetting, const void *val, unsigned len); - -EXTERN_C MIR_CORE_DLL(INT_PTR) db_unset(MCONTACT hContact, const char *szModule, const char *szSetting); - -EXTERN_C MIR_CORE_DLL(BOOL) db_set_resident(const char *szModule, const char *szService, BOOL bEnable = true); - -EXTERN_C MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType = DBVT_ASCIIZ); -#define db_get_ws(a,b,c,d) db_get_s(a,b,c,d,DBVT_WCHAR) -#define db_get_utf(a,b,c,d) db_get_s(a,b,c,d,DBVT_UTF8) - -///////////////////////////////////////////////////////////////////////////////////////// -// Profile services - -// Gets the name of the profile currently being used by the database module. -// This is the same as the filename of the database -// Returns 0 on success or nonzero otherwise - -EXTERN_C MIR_APP_DLL(int) Profile_GetNameA(size_t cbLen, char *pszDest); -EXTERN_C MIR_APP_DLL(int) Profile_GetNameW(size_t cbLen, wchar_t *pwszDest); - -// Get the path of the base folder where Miranda will store all individual profiles -// The returned path does NOT include a trailing backslash. -// Essentially this is what has been set in mirandaboot.ini as ProfileDir. -// For more options to retrieve profile paths check MS_UTILS_REPLACEVARS -// Returns 0 on success or nonzero otherwise - -EXTERN_C MIR_APP_DLL(int) Profile_GetPathA(size_t cbLen, char *pszDest); -EXTERN_C MIR_APP_DLL(int) Profile_GetPathW(size_t cbLen, wchar_t *pwszDest); - -// Sets the default profile name programmatically -// Analog of Database/DefaultProfile in mirandaboot.ini -EXTERN_C MIR_APP_DLL(void) Profile_SetDefault(const wchar_t *pwszPath); - -// Checks if a profile is opened -EXTERN_C MIR_APP_DLL(bool) Profile_CheckOpened(const wchar_t *pwszProfileName); - -// Read an option from mirandaboot.ini -EXTERN_C MIR_APP_DLL(int) Profile_GetSettingInt(const wchar_t *pwszSetting, int iDefault = 0); -EXTERN_C MIR_APP_DLL(bool) Profile_GetSetting(const wchar_t *pwszSetting, wchar_t *pwszBuf, size_t cbLen, const wchar_t *pwszDefault = nullptr); - -template -bool Profile_GetSetting(const wchar_t *pwszSetting, wchar_t(&pwszBuf)[_Size], const wchar_t *pwszDefault = nullptr) -{ - return Profile_GetSetting(pwszSetting, pwszBuf, _Size, pwszDefault); -} - -// Checks the specified profile like dbtool did. -// Implemented in the dbchecker plugins, thus it might not exist -// wParam = (WPARAM)(wchar_t*)ptszProfileName -// lParam = (BOOL)bConversionMode - -#define MS_DB_CHECKPROFILE "DB/CheckProfile" - -///////////////////////////////////////////////////////////////////////////////////////// -// Contact services - -struct DBCONTACTWRITESETTING -{ - const char *szModule; // pointer to name of the module that wrote the setting to get - const char *szSetting; // pointer to name of the setting to get - DBVARIANT value; // variant containing the value to set -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// Event services - -// Registers the specified database event type, with module, id & description. -// When someone needs to retrieve an event's text, a service named Module/GetEventText -// will be called. For example, for module named 'foo' and event id 2000 a service -// foo/GetEventText2000 should be defined to process this request. That handler should -// decode a blob and return the event text in the required format, its prototype is identical -// to a call of DbEvent_GetText (see below) -// -// Returns -1 on error (e.g., event type already registred), 0 on success - -struct DBEVENTTYPEDESCR -{ - LPSTR module; // event module name - uint32_t flags; // flags, combination of the DETF_* - int eventType; // event id, unique for this module - LPSTR descr; // event type description (i.e. "File Transfer") - LPSTR textService; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID) - LPSTR iconService; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID) - HANDLE eventIcon; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID) -}; - -// constants for default event behaviour -#define DETF_HISTORY 1 // show event in history -#define DETF_MSGWINDOW 2 // show event in message window -#define DETF_NONOTIFY 4 // block event notify (e.g. Popups) - -EXTERN_C MIR_APP_DLL(int) DbEvent_RegisterType(DBEVENTTYPEDESCR*); - -///////////////////////////////////////////////////////////////////////////////////////// -// Retrieves the previously registered database event type, by module & id. -// Returns DBEVENTTYPEDESCR* or NULL, if an event isn't found. - -EXTERN_C MIR_APP_DLL(DBEVENTTYPEDESCR*) DbEvent_GetType(const char *szModule, int eventType); - -///////////////////////////////////////////////////////////////////////////////////////// -// macro to extract MCONTACT from the auth blob - -__forceinline MCONTACT DbGetAuthEventContact(DBEVENTINFO *dbei) -{ - return (MCONTACT)(*(uint32_t*)&dbei->pBlob[sizeof(uint32_t)]); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Retrieves the event's text -// * dbei should be the valid database event read via db_event_get() -// * codepage is any valid codepage, CP_ACP by default. -// -// Function returns a pointer to a string in the required format. -// This string should be freed by a call of mir_free - -EXTERN_C MIR_APP_DLL(char*) DbEvent_GetTextA(DBEVENTINFO *dbei, int codepage); -EXTERN_C MIR_APP_DLL(wchar_t*) DbEvent_GetTextW(DBEVENTINFO *dbei, int codepage); - -///////////////////////////////////////////////////////////////////////////////////////// -// Retrieves the event's icon -// * use LR_SHARED in flags for shared HICON -// dbei should be a valid database event read via db_event_get() -// -// Function returns HICON (use DestroyIcon to release resources if not LR_SHARED) -// -// A plugin can register the standard event icon in IcoLib named -// 'eventicon_'+Module+EvtID, like eventicon_ICQ2001. Otherwise, to declare an icon -// with the non-standard name, you can declare the special service, Module/GetEventIcon, -// which will retrieve the custom icon handle (HICON). This service function has the -// same parameters MS_DB_EVENT_GETICON does. - -EXTERN_C MIR_APP_DLL(HICON) DbEvent_GetIcon(DBEVENTINFO *dbei, int flags); - -///////////////////////////////////////////////////////////////////////////////////////// -// Converts the event's string to wchar_t* depending on the event's format -// returns wchar_t* - the converted string -// Caller must free the result using mir_free - -EXTERN_C MIR_APP_DLL(wchar_t*) DbEvent_GetString(DBEVENTINFO *dbei, const char *str); - -///////////////////////////////////////////////////////////////////////////////////////// -// Database events - -///////////////////////////////////////////////////////////////////////////////////////// -// DB/Event/Added event -// Called when a new event has been added to the event chain for a contact -// wParam = (MCONTACT)hContact -// lParam = (LPARAM)(HANDLE)hDbEvent -// hDbEvent is a valid handle to the event. hContact is a valid handle to the -// contact to which hDbEvent refers. -// Since events are sorted chronologically, you cannot guarantee that hDbEvent is -// at any particular position in the chain. - -#define ME_DB_EVENT_ADDED "DB/Event/Added" - -///////////////////////////////////////////////////////////////////////////////////////// -// DB/Event/Edited event -// Called when the existing event was changed -// wParam = (MCONTACT)hContact -// lParam = (LPARAM)(HANDLE)hDbEvent -// hDbEvent is a valid handle to the event. hContact is a valid handle to the -// contact to which hDbEvent refers. - -#define ME_DB_EVENT_EDITED "DB/Event/Edited" - -///////////////////////////////////////////////////////////////////////////////////////// -// DB/Event/FilterAdd (NOTE: Added during 0.3.3+ development!) -// Called **before** a new event is made of a DBEVENTINFO structure, this -// hook is not SAFE unless you know what you're doing with it, the arguments -// are passed as-is (with errors, pointer problems, if any) from any arguments -// passed to db_event_add. - -// The point of this hook is to stop any unwanted database events, to stop -// an event being added, return 1, to allow the event to pass through return 0. -// wParam = (MCONTACT)hContact -// lParam = (LPARAM)&DBEVENTINFO -// -// Any changed made to the said DBEVENTINFO are also passed along to the database, -// therefore it is possible to shape the data, however DO NOT DO THIS. - -#define ME_DB_EVENT_FILTER_ADD "DB/Event/FilterAdd" - -///////////////////////////////////////////////////////////////////////////////////////// -// DB/Event/Marked/Read event -// Called when an event is marked read -// wParam = (MCONTACT)hContact -// lParam = (LPARAM)(HANDLE)hDbEvent -// hDbEvent is a valid handle to the event. -// hContact is a valid handle to the contact to which hDbEvent refers, and will remain valid. - -#define ME_DB_EVENT_MARKED_READ "DB/Event/Marked/Read" - -///////////////////////////////////////////////////////////////////////////////////////// -// DB/Event/Deleted event -// Called when an event is about to be deleted from the event chain for a contact -// wParam = (MCONTACT)hContact -// lParam = (LPARAM)(HANDLE)hDbEvent -// hDbEvent is a valid handle to the event which is about to be deleted, but it -// won't be once your hook has returned. -// hContact is a valid handle to the contact to which hDbEvent refers, and will -// remain valid. -// Returning nonzero from your hook will not stop the deletion, but it will, as -// usual, stop other hooks from being called. - -#define ME_DB_EVENT_DELETED "DB/Event/Deleted" - -///////////////////////////////////////////////////////////////////////////////////////// -// DB/Contact/Added event -// Called when a new contact has been added to the database -// wParam = (MCONTACT)hContact -// lParam = 0 -// hContact is a valid handle to the new contact. -// Contacts are initially created without any settings, so if you hook this event -// you will almost certainly also want to hook db/contact/settingchanged as well. - -#define ME_DB_CONTACT_ADDED "DB/Contact/Added" - -///////////////////////////////////////////////////////////////////////////////////////// -// DB/Contact/Deleted event -// Called when an contact is about to be deleted -// wParam = (MCONTACT)hContact -// lParam = 0 -// hContact is a valid handle to the contact which is about to be deleted, but it -// won't be once your hook has returned. -// Returning nonzero from your hook will not stop the deletion, but it will, as -// usual, stop other hooks from being called. -// Deleting a contact invalidates all events in its chain. - -#define ME_DB_CONTACT_DELETED "DB/Contact/Deleted" - -///////////////////////////////////////////////////////////////////////////////////////// -// DB/Contact/SettingChanged event -// Called when a contact has had one of its settings changed -// wParam = (MCONTACT)hContact -// lParam = (LPARAM)(DBCONTACTWRITESETTING*)&dbcws -// hContact is a valid handle to the contact that has changed. -// This event will be triggered many times rapidly when a whole bunch of values are set. -// Modules which hook this should be aware of this fact and quickly return if they -// are not interested in the value that has been changed. -// Careful not to get into infinite loops with this event. -// The structure dbcws is the same one as is passed to the original service, so -// don't change any of the members. - -#define ME_DB_CONTACT_SETTINGCHANGED "DB/Contact/SettingChanged" - -///////////////////////////////////////////////////////////////////////////////////////// -// Settings helper functions - -#ifndef DB_NOHELPERFUNCTIONS - -///////////////////////////////////////////////////////////////////////////////////////// inlined range tolerate versions */ - -__inline uint8_t DBGetContactSettingRangedByte(MCONTACT hContact, const char *szModule, const char *szSetting, uint8_t errorValue, uint8_t minValue, uint8_t maxValue) -{ - uint8_t bVal = db_get_b(hContact, szModule, szSetting, errorValue); - return (bVal < minValue || bVal > maxValue) ? errorValue : bVal; -} - -__inline uint16_t DBGetContactSettingRangedWord(MCONTACT hContact, const char *szModule, const char *szSetting, uint16_t errorValue, uint16_t minValue, uint16_t maxValue) -{ - uint16_t wVal = db_get_w(hContact, szModule, szSetting, errorValue); - return (wVal < minValue || wVal > maxValue) ? errorValue : wVal; -} - -__inline uint32_t DBGetContactSettingRangedDword(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t errorValue, uint32_t minValue, uint32_t maxValue) -{ - uint32_t dwVal = db_get_dw(hContact, szModule, szSetting, errorValue); - return (dwVal < minValue || dwVal > maxValue) ? errorValue : dwVal; -} - -#endif - -namespace DB -{ - MIR_APP_DLL(bool) IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO &dbei); - - ///////////////////////////////////////////////////////////////////////////////////////// - // Helper to free event contents automatically - - struct EventInfo : public DBEVENTINFO - { - __forceinline explicit EventInfo() - { - memset(this, 0, sizeof(*this)); - } - - __forceinline ~EventInfo() - { - mir_free(pBlob); - } - }; - - ///////////////////////////////////////////////////////////////////////////////////////// - // Helper to process the auth req body - // blob is: 0(uint32_t), hContact(uint32_t), nick(UTF8), firstName(UTF8), lastName(UTF8), email(UTF8), reason(UTF8) - - #pragma warning(disable : 4251) - - class MIR_APP_EXPORT AUTH_BLOB - { - MCONTACT m_hContact; - uint32_t m_dwUin; - ptrA m_szNick, m_szFirstName, m_szLastName, m_szEmail, m_szReason; - uint32_t m_size; - - uint8_t* makeBlob(); - - public: - explicit AUTH_BLOB(MCONTACT hContact, const char *nick, const char *fname, const char *lname, const char *id, const char *reason); - explicit AUTH_BLOB(uint8_t *blob); - ~AUTH_BLOB(); - - __forceinline operator char*() { return (char*)makeBlob(); } - __forceinline operator uint8_t*() { return makeBlob(); } - - __forceinline uint32_t size() const { return m_size; } - - __forceinline MCONTACT get_contact() const { return m_hContact; } - __forceinline const char* get_nick() const { return m_szNick; } - __forceinline const char* get_firstName() const { return m_szFirstName; } - __forceinline const char* get_lastName() const { return m_szLastName; } - __forceinline const char* get_email() const { return m_szEmail; } - __forceinline const char* get_reason() const { return m_szReason; } - - __forceinline uint32_t get_uin() const { return m_dwUin; } - __forceinline void set_uin(uint32_t dwValue) { m_dwUin = dwValue; } - }; - - ///////////////////////////////////////////////////////////////////////////////////////// - // Event cursors - - class MIR_CORE_EXPORT EventCursor : public MZeroedObject - { - friend class EventIterator; - - protected: - MCONTACT hContact; - - public: - EventCursor(MCONTACT _1) : - hContact(_1) - { } - - virtual ~EventCursor(); - virtual MEVENT FetchNext() = 0; - - __forceinline MEVENT begin() { - return FetchNext(); - } - - __forceinline MEVENT end() { - return 0; - } - }; - - class MIR_CORE_EXPORT ECPTR : public MNonCopyable - { - EventCursor *m_cursor; - MEVENT m_prevFetched, m_currEvent; - - public: - ECPTR(EventCursor *_1); - ~ECPTR(); - - void DeleteEvent(); - MEVENT FetchNext(); - }; - - class EventIterator - { - EventCursor *cursor; - MEVENT hCurr = 0; - - public: - EventIterator(EventCursor *_1) : - cursor(_1) - {} - - EventIterator operator++() { - hCurr = cursor->FetchNext(); - return *this; - } - - bool operator!=(const EventIterator &p) { - return hCurr != p.hCurr; - } - - operator MEVENT() const { - return hCurr; - } - }; - - MIR_CORE_DLL(EventCursor*) Events(MCONTACT, MEVENT iStartEvent = 0); - MIR_CORE_DLL(EventCursor*) EventsRev(MCONTACT, MEVENT iStartEvent = 0); -}; - -#endif // M_DATABASE_H__ +///////////////////////////////////////////////////////////////////////////////////////// +// Miranda NG: the free IM client for Microsoft* Windows* +// +// Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) +// Copyright (c) 2000-08 Miranda ICQ/IM project, +// all portions of this codebase are copyrighted to the people +// listed in contributors.txt. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#ifndef M_DATABASE_H__ +#define M_DATABASE_H__ 1 + +///////////////////////////////////////////////////////////////////////////////////////// +// GENERALLY USEFUL STUFF + +#if !defined(M_SYSTEM_H__) + #include "m_system.h" +#endif + +#if !defined(M_UTILS_H__) + #include "m_utils.h" +#endif + +#ifdef _MSC_VER + #pragma warning(disable:4201 4204) +#endif + +///////////////////////////////////////////////////////////////////////////////////////// +// database functions + +// Switches safety settings on or off +// newSetting is TRUE initially. +// Miranda's database is normally protected against corruption by agressively +// flushing data to the disk on writes. If you're doing a lot of writes (eg in +// an import plugin) it can sometimes be desirable to switch this feature off to +// speed up the process. If you do switch it off, you must remember that crashes +// are far more likely to be catastrophic, so switch it back on at the earliest +// possible opportunity. +// Note that if you're doing a lot of setting writes, the flush is already delayed +// so you need not use this service for that purpose. + +EXTERN_C MIR_CORE_DLL(void) db_set_safety_mode(BOOL bNewMode); + +// Gets the number of contacts in the database, which does not count the user +// Returns the number of contacts. They can be retrieved using contact/findfirst and contact/findnext + +EXTERN_C MIR_CORE_DLL(int) db_get_contact_count(void); + +// Checks if a module doesn't contain any settings (for the contact given) + +MIR_CORE_DLL(bool) db_is_module_empty(MCONTACT hContact, const char *module); + +// Copies a module to another module for the contact given (0 by default) + +EXTERN_C MIR_CORE_DLL(int) db_copy_module(const char *szModule, const char *szNewModule, MCONTACT hContact = 0); + +// Removes all settings for the specified module. +// hContact is 0 for global settings or matches the concrete contact + +EXTERN_C MIR_CORE_DLL(int) db_delete_module(MCONTACT hContact, const char *szModuleName); + +///////////////////////////////////////////////////////////////////////////////////////// +// contact functions + +// Adds a new contact to the database. New contacts initially have no settings +// whatsoever, they must all be added with db/contacts/writesetting. +// Returns a handle to the newly created contact on success, or NULL otherwise. +// Triggers a db/contact/added event just before it returns. + +EXTERN_C MIR_CORE_DLL(MCONTACT) db_add_contact(void); + +// Deletes the contact hContact from the database and all events and settings associated with it. +// Returns 0 on success or nonzero if hContact was invalid +// Please don't try to delete the user contact (hContact = NULL) +// Triggers a db/contact/deleted event just *before* it removes anything +// Because all events are deleted, lots of people may end up with invalid event +// handles from this operation, which they should be prepared for. + +EXTERN_C MIR_CORE_DLL(int) db_delete_contact(MCONTACT hContact); + +// Checks if a given value is a valid contact handle, note that due +// to the nature of multiple threading, a valid contact can still become +// invalid after a call to this service. +// Returns 1 if the contact is a contact, or 0 if the contact is not valid. + +EXTERN_C MIR_CORE_DLL(int) db_is_contact(MCONTACT hContact); + +///////////////////////////////////////////////////////////////////////////////////////// +// enumerators + +// Enumerates the names of all modules that have stored or requested information from the database. +// Returns the value returned by the last call to dbmep +// This service is only really useful for debugging, in conjunction with db/contact/enumsettings +// dbmep should return 0 to continue enumeration, or nonzero to stop. +// +// Modules names will be enumerated in no particular order +// Writing to the database while module names are being enumerated will cause +// unpredictable results in the enumeration, but the write will work. +// szModuleName is only guaranteed to be valid for the duration of the callback. +// If you want to keep it for longer you must allocation your own storage. + +typedef int(*DBMODULEENUMPROC)(const char *szModuleName, void *param); + +EXTERN_C MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC dbmep, void *param = nullptr); + +// Lists all resident settings + +EXTERN_C MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, void *param = nullptr); + +// Lists all the settings a specific modules has stored in the database for a specific contact. +// Returns the return value of the last call to pfnEnumProc, or -1 if there are +// no settings for that module/contact pair +// Writing to or deleting from the database while enumerating will have +// unpredictable results for the enumeration, but the write will succeed. +// Use db/modules/enum to get a complete list of module names +// szSetting is only guaranteed to be valid for the duration of the callback. If +// you want to keep it for longer you must allocation your own storage. + +typedef int (*DBSETTINGENUMPROC)(const char *szSetting, void *param); + +EXTERN_C MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param = nullptr); + +///////////////////////////////////////////////////////////////////////////////////////// +// DBVARIANT: used by db/contact/getsetting and db/contact/writesetting + +#define DBVT_DELETED 0 // this setting just got deleted, no other values are valid +#define DBVT_BYTE 1 // bVal and cVal are valid +#define DBVT_WORD 2 // wVal and sVal are valid +#define DBVT_DWORD 4 // dVal and lVal are valid +#define DBVT_ASCIIZ 255 // pszVal is valid +#define DBVT_BLOB 254 // cpbVal and pbVal are valid +#define DBVT_UTF8 253 // pszVal is valid +#define DBVT_WCHAR 252 // pwszVal is valid +#define DBVT_ENCRYPTED 250 // blob of encrypted bytesw + + +#define DBVTF_VARIABLELENGTH 0x80 + +struct DBVARIANT +{ + uint8_t type; + union { + uint8_t bVal; char cVal; + uint16_t wVal; short sVal; + uint32_t dVal; long lVal; + struct { + union { + char *pszVal; + wchar_t *pwszVal; + }; + uint16_t cchVal; //only used for db/contact/getsettingstatic + }; + struct { + uint16_t cpbVal; + uint8_t *pbVal; + }; + }; +}; + +#define DBEF_TEMPORARY 0x0001 // disable notifications about temporary database events +#define DBEF_SENT 0x0002 // this event was sent by the user. If not set this event was received. +#define DBEF_READ 0x0004 // event has been read by the user. It does not need to be processed any more except for history. +#define DBEF_RTL 0x0008 // event contains the right-to-left aligned text +#define DBEF_UTF 0x0010 // event contains a text in utf-8 +#define DBEF_ENCRYPTED 0x0020 // event is encrypted (never reported outside a driver) +#define DBEF_HAS_ID 0x0040 // event has unique server id + +struct DBEVENTINFO +{ + const char *szModule; // pointer to name of the module that 'owns' this event + uint32_t timestamp; // seconds since 00:00, 01/01/1970. Gives us times until 2106 + // unless you use the standard C library which is + // signed and can only do until 2038. In GMT. + uint32_t flags; // combination of DBEF_* flags + uint16_t eventType; // module-defined event type field + int cbBlob; // size of pBlob in bytes + uint8_t *pBlob; // pointer to buffer containing module-defined event data + const char *szId; // server id + + bool __forceinline markedRead() const { + return (flags & (DBEF_SENT | DBEF_READ)) != 0; + } + + wchar_t* getString(const char *str) const { + return (flags & DBEF_UTF) ? mir_utf8decodeW(str) : mir_a2u(str); + } + + bool __forceinline operator==(const DBEVENTINFO &e) { + return (timestamp == e.timestamp && eventType == e.eventType && cbBlob == e.cbBlob && (flags & DBEF_SENT) == (e.flags & DBEF_SENT)); + } +}; + +EXTERN_C MIR_CORE_DLL(INT_PTR) db_free(DBVARIANT *dbv); + +///////////////////////////////////////////////////////////////////////////////////////// +// Database contacts + +// Gets the handle of the first contact in the database. This handle can be used +// with loads of functions. It does not need to be closed. +// You can specify szProto to find only its contacts +// Returns a handle to the first contact in the db on success, or NULL if there +// are no contacts in the db. + +EXTERN_C MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto = nullptr); + +// Gets the handle of the next contact after hContact in the database. This handle +// can be used with loads of functions. It does not need to be closed. +// You can specify szProto to find only its contacts +// Returns a handle to the contact after hContact in the db on success or NULL if +// hContact was the last contact in the db or hContact was invalid. + +EXTERN_C MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto = nullptr); + +class Contacts +{ + const char *m_szModule; + +public: + Contacts(const char *m = nullptr) : + m_szModule(m) + {} + + class iterator + { + MCONTACT hContact; + const char *m_szModule; + + public: + __inline iterator(const char *_m, MCONTACT _h) : + hContact(_h), + m_szModule(_m) + {} + + __inline iterator operator++() { hContact = ::db_find_next(hContact, m_szModule); return *this; } + __inline bool operator!=(const iterator &p) { return hContact != p.hContact; } + __inline operator const MCONTACT*() const { return &hContact; } + }; + + __inline iterator begin() const { return iterator(m_szModule, ::db_find_first(m_szModule)); } + __inline iterator end() const { return iterator(m_szModule, 0); } +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// Database events + +// Adds a new event to a contact's event list +// Returns a handle to the newly added event, or NULL on failure +// Triggers a db/event/added event just before it returns. +// Events are sorted chronologically as they are entered, so you cannot guarantee +// that the new hEvent is the last event in the chain, however if a new event is +// added that has a timestamp less than 90 seconds *before* the event that should +// be after it, it will be added afterwards, to allow for protocols that only +// store times to the nearest minute, and slight delays in transports. +// There are a few predefined eventTypes below for easier compatibility, but +// modules are free to define their own, beginning at 2000 +// DBEVENTINFO.timestamp is in GMT, as returned by time(). There are services +// db/time/x below with useful stuff for dealing with it. + +#define EVENTTYPE_MESSAGE 0 +#define EVENTTYPE_CONTACTS 2 //v0.1.2.2+ +#define EVENTTYPE_ADDED 1000 //v0.1.1.0+: these used to be module- +#define EVENTTYPE_AUTHREQUEST 1001 //specific codes, hence the module- +#define EVENTTYPE_FILE 1002 //specific limit has been raised to 2000 + +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_add(MCONTACT hContact, const DBEVENTINFO *dbei); + +// Gets the number of events in the chain belonging to a contact in the database. +// Returns the number of events in the chain owned by hContact or -1 if hContact +// is invalid. They can be retrieved using the db_event_first/last() services. + +EXTERN_C MIR_CORE_DLL(int) db_event_count(MCONTACT hContact); + +// Removes a single event from the database +// hDbEvent should have been returned by db_event_add/first/last/next/prev() +// Returns 0 on success, or nonzero if hDbEvent was invalid +// Triggers a db/event/deleted event just *before* the event is deleted + +EXTERN_C MIR_CORE_DLL(int) db_event_delete(MEVENT hDbEvent); + +// Edits an event in the database +// Returns 0 on success, or nonzero on error + +EXTERN_C MIR_CORE_DLL(int) db_event_edit(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *dbei); + +// Tries to find an event by its id if present +// if an event is found, it's edited, otherwise a new event is added + +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_replace(MCONTACT hContact, const DBEVENTINFO *dbei); + +// Retrieves a handle to the first event in the chain for hContact +// Returns the handle, or NULL if hContact is invalid or has no events +// Events in a chain are sorted chronologically automatically + +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_first(MCONTACT hContact); + +// Retrieves a handle to the first unread event in the chain for hContact +// Returns the handle, or NULL if hContact is invalid or all its events have been read + +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_firstUnread(MCONTACT hContact); + +// Retrieves all the information stored in hDbEvent +// hDbEvent should have been returned by db_event_add/first/last/next/prev() +// Returns 0 on success or nonzero if hDbEvent is invalid +// Don't forget to set dbe.cbSize, dbe.pBlob and dbe.cbBlob before calling this function +// The correct value dbe.cbBlob can be got using db_event_getBlobSize +// If successful, all the fields of dbe are filled. dbe.cbBlob is set to the +// actual number of bytes retrieved and put in dbe.pBlob +// If dbe.cbBlob is too small, dbe.pBlob is filled up to the size of dbe.cbBlob +// and then dbe.cbBlob is set to the required size of data to go in dbe.pBlob +// On return, dbe.szModule is a pointer to the database module's own internal list +// of modules. Look but don't touch. + +EXTERN_C MIR_CORE_DLL(int) db_event_get(MEVENT hDbEvent, DBEVENTINFO *dbei); + +// Retrieves the space in bytes required to store the blob in hDbEvent +// hDbEvent should have been returned by db_event_add/first/last/next/prev() +// Returns the space required in bytes, or -1 if hDbEvent is invalid + +EXTERN_C MIR_CORE_DLL(int) db_event_getBlobSize(MEVENT hDbEvent); + +// Retrieves a handle to the contact that owns hDbEvent. +// hDbEvent should have been returned by db_event_add/first/last/next/prev() +// NULL is a valid return value, meaning, as usual, the user. +// Returns INVALID_CONTACT_ID if hDbEvent is invalid, or the handle to the contact on success + +EXTERN_C MIR_CORE_DLL(MCONTACT) db_event_getContact(MEVENT hDbEvent); + +// Retrieves a handle to the last event in the chain for hContact +// Returns the handle, or NULL if hContact is invalid or has no events +// Events in a chain are sorted chronologically automatically + +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_last(MCONTACT hContact); + +// Changes the flags for an event to mark it as read. +// hDbEvent should have been returned by db_event_add/first/last/next/prev() +// Returns the entire flag uint32_t for the event after the change, or -1 if hDbEvent is invalid. +// This is the one database write operation that does not trigger an event. +// Modules should not save flags states for any length of time. + +EXTERN_C MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, MEVENT hDbEvent); + +// Retrieves a handle to the next event in a chain after hDbEvent +// Returns the handle, or NULL if hDbEvent is invalid or is the last event +// Events in a chain are sorted chronologically automatically + +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_next(MCONTACT hContact, MEVENT hDbEvent); + +// Retrieves a handle to the previous event in a chain before hDbEvent +// Returns the handle, or NULL if hDbEvent is invalid or is the first event +// Events in a chain are sorted chronologically automatically + +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_prev(MCONTACT hContact, MEVENT hDbEvent); + +// Retrieves a handle to the event identified by its module and unique identifier + +EXTERN_C MIR_CORE_DLL(MEVENT) db_event_getById(const char *szModule, const char *szId); + +// Updates the server ID associated with an event +// Returns 0 on success or a failure otherwise + +EXTERN_C MIR_CORE_DLL(int) db_event_updateId(MEVENT hDbEvent, const char *szId); + +///////////////////////////////////////////////////////////////////////////////////////// +// Database settings + +EXTERN_C MIR_CORE_DLL(INT_PTR) db_get(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); + +EXTERN_C MIR_CORE_DLL(int) db_get_b(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue = 0); +EXTERN_C MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue = 0); +EXTERN_C MIR_CORE_DLL(uint32_t) db_get_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t errorValue = 0); + +EXTERN_C MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr); +EXTERN_C MIR_CORE_DLL(char*) db_get_utfa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr); +EXTERN_C MIR_CORE_DLL(wchar_t*) db_get_wsa(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szValue = nullptr); + +MIR_CORE_DLL(CMStringA) db_get_sm(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr); +MIR_CORE_DLL(CMStringW) db_get_wsm(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szValue = nullptr); + +EXTERN_C MIR_CORE_DLL(int) db_get_static(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest); +EXTERN_C MIR_CORE_DLL(int) db_get_static_utf(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest); +EXTERN_C MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, const char *szModule, const char *szSetting, wchar_t *pDest, int cbDest); + +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, const char *szModule, const char *szSetting, uint8_t val); +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const char *szSetting, uint16_t val); +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t val); +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val); +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *val); +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val); +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, const char *szModule, const char *szSetting, const void *val, unsigned len); + +EXTERN_C MIR_CORE_DLL(INT_PTR) db_unset(MCONTACT hContact, const char *szModule, const char *szSetting); + +EXTERN_C MIR_CORE_DLL(BOOL) db_set_resident(const char *szModule, const char *szService, BOOL bEnable = true); + +EXTERN_C MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType = DBVT_ASCIIZ); +#define db_get_ws(a,b,c,d) db_get_s(a,b,c,d,DBVT_WCHAR) +#define db_get_utf(a,b,c,d) db_get_s(a,b,c,d,DBVT_UTF8) + +///////////////////////////////////////////////////////////////////////////////////////// +// Profile services + +// Gets the name of the profile currently being used by the database module. +// This is the same as the filename of the database +// Returns 0 on success or nonzero otherwise + +EXTERN_C MIR_APP_DLL(int) Profile_GetNameA(size_t cbLen, char *pszDest); +EXTERN_C MIR_APP_DLL(int) Profile_GetNameW(size_t cbLen, wchar_t *pwszDest); + +// Get the path of the base folder where Miranda will store all individual profiles +// The returned path does NOT include a trailing backslash. +// Essentially this is what has been set in mirandaboot.ini as ProfileDir. +// For more options to retrieve profile paths check MS_UTILS_REPLACEVARS +// Returns 0 on success or nonzero otherwise + +EXTERN_C MIR_APP_DLL(int) Profile_GetPathA(size_t cbLen, char *pszDest); +EXTERN_C MIR_APP_DLL(int) Profile_GetPathW(size_t cbLen, wchar_t *pwszDest); + +// Sets the default profile name programmatically +// Analog of Database/DefaultProfile in mirandaboot.ini +EXTERN_C MIR_APP_DLL(void) Profile_SetDefault(const wchar_t *pwszPath); + +// Checks if a profile is opened +EXTERN_C MIR_APP_DLL(bool) Profile_CheckOpened(const wchar_t *pwszProfileName); + +// Read an option from mirandaboot.ini +EXTERN_C MIR_APP_DLL(int) Profile_GetSettingInt(const wchar_t *pwszSetting, int iDefault = 0); +EXTERN_C MIR_APP_DLL(bool) Profile_GetSetting(const wchar_t *pwszSetting, wchar_t *pwszBuf, size_t cbLen, const wchar_t *pwszDefault = nullptr); + +template +bool Profile_GetSetting(const wchar_t *pwszSetting, wchar_t(&pwszBuf)[_Size], const wchar_t *pwszDefault = nullptr) +{ + return Profile_GetSetting(pwszSetting, pwszBuf, _Size, pwszDefault); +} + +// Checks the specified profile like dbtool did. +// Implemented in the dbchecker plugins, thus it might not exist +// wParam = (WPARAM)(wchar_t*)ptszProfileName +// lParam = (BOOL)bConversionMode + +#define MS_DB_CHECKPROFILE "DB/CheckProfile" + +///////////////////////////////////////////////////////////////////////////////////////// +// Contact services + +struct DBCONTACTWRITESETTING +{ + const char *szModule; // pointer to name of the module that wrote the setting to get + const char *szSetting; // pointer to name of the setting to get + DBVARIANT value; // variant containing the value to set +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// Event services + +// Registers the specified database event type, with module, id & description. +// When someone needs to retrieve an event's text, a service named Module/GetEventText +// will be called. For example, for module named 'foo' and event id 2000 a service +// foo/GetEventText2000 should be defined to process this request. That handler should +// decode a blob and return the event text in the required format, its prototype is identical +// to a call of DbEvent_GetText (see below) +// +// Returns -1 on error (e.g., event type already registred), 0 on success + +struct DBEVENTTYPEDESCR +{ + LPSTR module; // event module name + uint32_t flags; // flags, combination of the DETF_* + int eventType; // event id, unique for this module + LPSTR descr; // event type description (i.e. "File Transfer") + LPSTR textService; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID) + LPSTR iconService; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID) + HANDLE eventIcon; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID) +}; + +// constants for default event behaviour +#define DETF_HISTORY 1 // show event in history +#define DETF_MSGWINDOW 2 // show event in message window +#define DETF_NONOTIFY 4 // block event notify (e.g. Popups) + +EXTERN_C MIR_APP_DLL(int) DbEvent_RegisterType(DBEVENTTYPEDESCR*); + +///////////////////////////////////////////////////////////////////////////////////////// +// Retrieves the previously registered database event type, by module & id. +// Returns DBEVENTTYPEDESCR* or NULL, if an event isn't found. + +EXTERN_C MIR_APP_DLL(DBEVENTTYPEDESCR*) DbEvent_GetType(const char *szModule, int eventType); + +///////////////////////////////////////////////////////////////////////////////////////// +// macro to extract MCONTACT from the auth blob + +__forceinline MCONTACT DbGetAuthEventContact(DBEVENTINFO *dbei) +{ + return (MCONTACT)(*(uint32_t*)&dbei->pBlob[sizeof(uint32_t)]); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Retrieves the event's text +// * dbei should be the valid database event read via db_event_get() +// * codepage is any valid codepage, CP_ACP by default. +// +// Function returns a pointer to a string in the required format. +// This string should be freed by a call of mir_free + +EXTERN_C MIR_APP_DLL(char*) DbEvent_GetTextA(DBEVENTINFO *dbei, int codepage); +EXTERN_C MIR_APP_DLL(wchar_t*) DbEvent_GetTextW(DBEVENTINFO *dbei, int codepage); + +///////////////////////////////////////////////////////////////////////////////////////// +// Retrieves the event's icon +// * use LR_SHARED in flags for shared HICON +// dbei should be a valid database event read via db_event_get() +// +// Function returns HICON (use DestroyIcon to release resources if not LR_SHARED) +// +// A plugin can register the standard event icon in IcoLib named +// 'eventicon_'+Module+EvtID, like eventicon_ICQ2001. Otherwise, to declare an icon +// with the non-standard name, you can declare the special service, Module/GetEventIcon, +// which will retrieve the custom icon handle (HICON). This service function has the +// same parameters MS_DB_EVENT_GETICON does. + +EXTERN_C MIR_APP_DLL(HICON) DbEvent_GetIcon(DBEVENTINFO *dbei, int flags); + +///////////////////////////////////////////////////////////////////////////////////////// +// Converts the event's string to wchar_t* depending on the event's format +// returns wchar_t* - the converted string +// Caller must free the result using mir_free + +EXTERN_C MIR_APP_DLL(wchar_t*) DbEvent_GetString(DBEVENTINFO *dbei, const char *str); + +///////////////////////////////////////////////////////////////////////////////////////// +// Database events + +///////////////////////////////////////////////////////////////////////////////////////// +// DB/Event/Added event +// Called when a new event has been added to the event chain for a contact +// wParam = (MCONTACT)hContact +// lParam = (LPARAM)(HANDLE)hDbEvent +// hDbEvent is a valid handle to the event. hContact is a valid handle to the +// contact to which hDbEvent refers. +// Since events are sorted chronologically, you cannot guarantee that hDbEvent is +// at any particular position in the chain. + +#define ME_DB_EVENT_ADDED "DB/Event/Added" + +///////////////////////////////////////////////////////////////////////////////////////// +// DB/Event/Edited event +// Called when the existing event was changed +// wParam = (MCONTACT)hContact +// lParam = (LPARAM)(HANDLE)hDbEvent +// hDbEvent is a valid handle to the event. hContact is a valid handle to the +// contact to which hDbEvent refers. + +#define ME_DB_EVENT_EDITED "DB/Event/Edited" + +///////////////////////////////////////////////////////////////////////////////////////// +// DB/Event/FilterAdd (NOTE: Added during 0.3.3+ development!) +// Called **before** a new event is made of a DBEVENTINFO structure, this +// hook is not SAFE unless you know what you're doing with it, the arguments +// are passed as-is (with errors, pointer problems, if any) from any arguments +// passed to db_event_add. + +// The point of this hook is to stop any unwanted database events, to stop +// an event being added, return 1, to allow the event to pass through return 0. +// wParam = (MCONTACT)hContact +// lParam = (LPARAM)&DBEVENTINFO +// +// Any changed made to the said DBEVENTINFO are also passed along to the database, +// therefore it is possible to shape the data, however DO NOT DO THIS. + +#define ME_DB_EVENT_FILTER_ADD "DB/Event/FilterAdd" + +///////////////////////////////////////////////////////////////////////////////////////// +// DB/Event/Marked/Read event +// Called when an event is marked read +// wParam = (MCONTACT)hContact +// lParam = (LPARAM)(HANDLE)hDbEvent +// hDbEvent is a valid handle to the event. +// hContact is a valid handle to the contact to which hDbEvent refers, and will remain valid. + +#define ME_DB_EVENT_MARKED_READ "DB/Event/Marked/Read" + +///////////////////////////////////////////////////////////////////////////////////////// +// DB/Event/Deleted event +// Called when an event is about to be deleted from the event chain for a contact +// wParam = (MCONTACT)hContact +// lParam = (LPARAM)(HANDLE)hDbEvent +// hDbEvent is a valid handle to the event which is about to be deleted, but it +// won't be once your hook has returned. +// hContact is a valid handle to the contact to which hDbEvent refers, and will +// remain valid. +// Returning nonzero from your hook will not stop the deletion, but it will, as +// usual, stop other hooks from being called. + +#define ME_DB_EVENT_DELETED "DB/Event/Deleted" + +///////////////////////////////////////////////////////////////////////////////////////// +// DB/Contact/Added event +// Called when a new contact has been added to the database +// wParam = (MCONTACT)hContact +// lParam = 0 +// hContact is a valid handle to the new contact. +// Contacts are initially created without any settings, so if you hook this event +// you will almost certainly also want to hook db/contact/settingchanged as well. + +#define ME_DB_CONTACT_ADDED "DB/Contact/Added" + +///////////////////////////////////////////////////////////////////////////////////////// +// DB/Contact/Deleted event +// Called when an contact is about to be deleted +// wParam = (MCONTACT)hContact +// lParam = 0 +// hContact is a valid handle to the contact which is about to be deleted, but it +// won't be once your hook has returned. +// Returning nonzero from your hook will not stop the deletion, but it will, as +// usual, stop other hooks from being called. +// Deleting a contact invalidates all events in its chain. + +#define ME_DB_CONTACT_DELETED "DB/Contact/Deleted" + +///////////////////////////////////////////////////////////////////////////////////////// +// DB/Contact/SettingChanged event +// Called when a contact has had one of its settings changed +// wParam = (MCONTACT)hContact +// lParam = (LPARAM)(DBCONTACTWRITESETTING*)&dbcws +// hContact is a valid handle to the contact that has changed. +// This event will be triggered many times rapidly when a whole bunch of values are set. +// Modules which hook this should be aware of this fact and quickly return if they +// are not interested in the value that has been changed. +// Careful not to get into infinite loops with this event. +// The structure dbcws is the same one as is passed to the original service, so +// don't change any of the members. + +#define ME_DB_CONTACT_SETTINGCHANGED "DB/Contact/SettingChanged" + +///////////////////////////////////////////////////////////////////////////////////////// +// Settings helper functions + +#ifndef DB_NOHELPERFUNCTIONS + +///////////////////////////////////////////////////////////////////////////////////////// inlined range tolerate versions */ + +__inline uint8_t DBGetContactSettingRangedByte(MCONTACT hContact, const char *szModule, const char *szSetting, uint8_t errorValue, uint8_t minValue, uint8_t maxValue) +{ + uint8_t bVal = db_get_b(hContact, szModule, szSetting, errorValue); + return (bVal < minValue || bVal > maxValue) ? errorValue : bVal; +} + +__inline uint16_t DBGetContactSettingRangedWord(MCONTACT hContact, const char *szModule, const char *szSetting, uint16_t errorValue, uint16_t minValue, uint16_t maxValue) +{ + uint16_t wVal = db_get_w(hContact, szModule, szSetting, errorValue); + return (wVal < minValue || wVal > maxValue) ? errorValue : wVal; +} + +__inline uint32_t DBGetContactSettingRangedDword(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t errorValue, uint32_t minValue, uint32_t maxValue) +{ + uint32_t dwVal = db_get_dw(hContact, szModule, szSetting, errorValue); + return (dwVal < minValue || dwVal > maxValue) ? errorValue : dwVal; +} + +#endif + +namespace DB +{ + MIR_APP_DLL(bool) IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO &dbei); + + ///////////////////////////////////////////////////////////////////////////////////////// + // Helper to free event contents automatically + + struct EventInfo : public DBEVENTINFO + { + __forceinline explicit EventInfo() + { + memset(this, 0, sizeof(*this)); + } + + __forceinline ~EventInfo() + { + mir_free(pBlob); + } + }; + + ///////////////////////////////////////////////////////////////////////////////////////// + // Helper to process the auth req body + // blob is: 0(uint32_t), hContact(uint32_t), nick(UTF8), firstName(UTF8), lastName(UTF8), email(UTF8), reason(UTF8) + + #pragma warning(disable : 4251) + + class MIR_APP_EXPORT AUTH_BLOB + { + MCONTACT m_hContact; + uint32_t m_dwUin; + ptrA m_szNick, m_szFirstName, m_szLastName, m_szEmail, m_szReason; + uint32_t m_size; + + uint8_t* makeBlob(); + + public: + explicit AUTH_BLOB(MCONTACT hContact, const char *nick, const char *fname, const char *lname, const char *id, const char *reason); + explicit AUTH_BLOB(uint8_t *blob); + ~AUTH_BLOB(); + + __forceinline operator char*() { return (char*)makeBlob(); } + __forceinline operator uint8_t*() { return makeBlob(); } + + __forceinline uint32_t size() const { return m_size; } + + __forceinline MCONTACT get_contact() const { return m_hContact; } + __forceinline const char* get_nick() const { return m_szNick; } + __forceinline const char* get_firstName() const { return m_szFirstName; } + __forceinline const char* get_lastName() const { return m_szLastName; } + __forceinline const char* get_email() const { return m_szEmail; } + __forceinline const char* get_reason() const { return m_szReason; } + + __forceinline uint32_t get_uin() const { return m_dwUin; } + __forceinline void set_uin(uint32_t dwValue) { m_dwUin = dwValue; } + }; + + ///////////////////////////////////////////////////////////////////////////////////////// + // Event cursors + + class MIR_CORE_EXPORT EventCursor : public MZeroedObject + { + friend class EventIterator; + + protected: + MCONTACT hContact; + + public: + EventCursor(MCONTACT _1) : + hContact(_1) + { } + + virtual ~EventCursor(); + virtual MEVENT FetchNext() = 0; + + __forceinline MEVENT begin() { + return FetchNext(); + } + + __forceinline MEVENT end() { + return 0; + } + }; + + class MIR_CORE_EXPORT ECPTR : public MNonCopyable + { + EventCursor *m_cursor; + MEVENT m_prevFetched, m_currEvent; + + public: + ECPTR(EventCursor *_1); + ~ECPTR(); + + void DeleteEvent(); + MEVENT FetchNext(); + }; + + class EventIterator + { + EventCursor *cursor; + MEVENT hCurr = 0; + + public: + EventIterator(EventCursor *_1) : + cursor(_1) + {} + + EventIterator operator++() { + hCurr = cursor->FetchNext(); + return *this; + } + + bool operator!=(const EventIterator &p) { + return hCurr != p.hCurr; + } + + operator MEVENT() const { + return hCurr; + } + }; + + MIR_CORE_DLL(EventCursor*) Events(MCONTACT, MEVENT iStartEvent = 0); + MIR_CORE_DLL(EventCursor*) EventsRev(MCONTACT, MEVENT iStartEvent = 0); +}; + +#endif // M_DATABASE_H__ diff --git a/include/m_db_int.h b/include/m_db_int.h index 2516208764..661ad565f4 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -1,407 +1,407 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -aint with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#ifndef M_DB_INT_H__ -#define M_DB_INT_H__ 1 - -#ifndef M_CORE_H__ - #include -#endif - -/////////////////////////////////////////////////////////////////////////////// -// basic database checker interface - -#define STATUS_MESSAGE 0 -#define STATUS_WARNING 1 -#define STATUS_ERROR 2 -#define STATUS_FATAL 3 -#define STATUS_SUCCESS 4 - -struct DATABASELINK; - -struct DBCHeckCallback -{ - uint32_t spaceProcessed, spaceUsed; - - void (*pfnAddLogMessage)(int type, const wchar_t *ptszFormat, ...); -}; - -interface MIDatabaseChecker -{ - STDMETHOD_(BOOL, Start)(DBCHeckCallback *callback) PURE; - STDMETHOD_(BOOL, CheckDb)(int phase) PURE; - STDMETHOD_(void, Destroy)() PURE; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// basic database interface - -struct DBCachedGlobalValue -{ - char *name; - DBVARIANT value; -}; - -struct DBCachedContactValue -{ - char *name; - DBVARIANT value; - DBCachedContactValue *next; -}; - -struct DBCachedContactBase -{ - MCONTACT contactID; - char *szProto; - DBCachedContactValue *first, *last; - - // metacontacts - int nSubs; // == -1 -> not a metacontact - MCONTACT *pSubs; - MCONTACT parentID; // == 0 -> not a subcontact - int nDefault; // default sub number - - __forceinline bool IsMeta() const { return nSubs != -1; } - __forceinline bool IsSub() const { return parentID != 0; } -}; - -#ifndef OWN_CACHED_CONTACT -struct DBCachedContact : public DBCachedContactBase {}; -#else -struct DBCachedContact; -#endif - -interface MIDatabaseCache : public MZeroedObject -{ - STDMETHOD_(DBCachedContact*, AddContactToCache)(MCONTACT contactID) PURE; - STDMETHOD_(DBCachedContact*, GetCachedContact)(MCONTACT contactID) PURE; - STDMETHOD_(DBCachedContact*, GetFirstContact)(void) PURE; - STDMETHOD_(DBCachedContact*, GetNextContact)(MCONTACT contactID) PURE; - STDMETHOD_(void, FreeCachedContact)(MCONTACT contactID) PURE; - - STDMETHOD_(char*, InsertCachedSetting)(const char *szName, size_t) PURE; - STDMETHOD_(char*, GetCachedSetting)(const char *szModuleName, const char *szSettingName, size_t, size_t) PURE; - STDMETHOD_(void, SetCachedVariant)(DBVARIANT *s, DBVARIANT *d) PURE; - STDMETHOD_(DBVARIANT*, GetCachedValuePtr)(MCONTACT contactID, char *szSetting, int bAllocate) PURE; -}; - -interface MIR_APP_EXPORT MIDatabase -{ - STDMETHOD_(BOOL, IsRelational)(void) PURE; - STDMETHOD_(void, SetCacheSafetyMode)(BOOL) PURE; - - STDMETHOD_(int, GetContactCount)(void) PURE; - STDMETHOD_(MCONTACT, FindFirstContact)(const char *szProto = nullptr) PURE; - STDMETHOD_(MCONTACT, FindNextContact)(MCONTACT contactID, const char *szProto = nullptr) PURE; - - STDMETHOD_(int, DeleteContact)(MCONTACT contactID) PURE; - STDMETHOD_(MCONTACT, AddContact)(void) PURE; - STDMETHOD_(BOOL, IsDbContact)(MCONTACT contactID) PURE; - STDMETHOD_(int, GetContactSize)(void) PURE; - - STDMETHOD_(int, GetEventCount)(MCONTACT contactID) PURE; - STDMETHOD_(MEVENT, AddEvent)(MCONTACT contactID, const DBEVENTINFO *dbe) PURE; - STDMETHOD_(BOOL, DeleteEvent)(MEVENT hDbEvent) PURE; - STDMETHOD_(BOOL, EditEvent)(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO *dbe) PURE; - STDMETHOD_(int, GetBlobSize)(MEVENT hDbEvent) PURE; - STDMETHOD_(BOOL, GetEvent)(MEVENT hDbEvent, DBEVENTINFO *dbe) PURE; - STDMETHOD_(BOOL, MarkEventRead)(MCONTACT contactID, MEVENT hDbEvent) PURE; - STDMETHOD_(MCONTACT, GetEventContact)(MEVENT hDbEvent) PURE; - STDMETHOD_(MEVENT, FindFirstEvent)(MCONTACT contactID) PURE; - STDMETHOD_(MEVENT, FindFirstUnreadEvent)(MCONTACT contactID) PURE; - STDMETHOD_(MEVENT, FindLastEvent)(MCONTACT contactID) PURE; - STDMETHOD_(MEVENT, FindNextEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE; - STDMETHOD_(MEVENT, FindPrevEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE; - - STDMETHOD_(BOOL, DeleteModule)(MCONTACT contactID, LPCSTR szModule) PURE; - STDMETHOD_(BOOL, EnumModuleNames)(DBMODULEENUMPROC pFunc, void *pParam) PURE; - - STDMETHOD_(BOOL, GetContactSetting)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE; - STDMETHOD_(BOOL, GetContactSettingStr)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE; - STDMETHOD_(BOOL, GetContactSettingStatic)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE; - STDMETHOD_(BOOL, FreeVariant)(DBVARIANT *dbv) PURE; - STDMETHOD_(BOOL, WriteContactSetting)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE; - STDMETHOD_(BOOL, DeleteContactSetting)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting) PURE; - STDMETHOD_(BOOL, EnumContactSettings)(MCONTACT contactID, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param) PURE; - STDMETHOD_(BOOL, SetSettingResident)(BOOL bIsResident, const char *pszSettingName) PURE; - STDMETHOD_(BOOL, EnumResidentSettings)(DBMODULEENUMPROC pFunc, void *pParam) PURE; - STDMETHOD_(BOOL, IsSettingEncrypted)(LPCSTR szModule, LPCSTR szSetting) PURE; - - STDMETHOD_(BOOL, MetaDetouchSub)(DBCachedContact*, int nSub) PURE; - STDMETHOD_(BOOL, MetaSetDefault)(DBCachedContact*) PURE; - STDMETHOD_(BOOL, MetaMergeHistory)(DBCachedContact *ccMeta, DBCachedContact *ccSub) PURE; - STDMETHOD_(BOOL, MetaSplitHistory)(DBCachedContact *ccMeta, DBCachedContact *ccSub) PURE; - STDMETHOD_(BOOL, MetaRemoveSubHistory)(DBCachedContact *ccSub) PURE; - - STDMETHOD_(BOOL, Compact)(void) PURE; - STDMETHOD_(BOOL, Backup)(LPCWSTR) PURE; - STDMETHOD_(BOOL, Flush)(void) PURE; - - STDMETHOD_(MIDatabaseChecker*, GetChecker)(void) PURE; - STDMETHOD_(DATABASELINK*, GetDriver)(void) PURE; - - STDMETHOD_(MEVENT, GetEventById)(LPCSTR szModule, LPCSTR szId) PURE; - STDMETHOD_(int, UpdateEventId)(MEVENT hDbEvent, const char *szId) PURE; - - STDMETHOD_(DB::EventCursor*, EventCursor)(MCONTACT hContact, MEVENT hDbEvent) PURE; - STDMETHOD_(DB::EventCursor*, EventCursorRev)(MCONTACT hContact, MEVENT hDbEvent) PURE; -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -#pragma warning(push) -#pragma warning(disable:4275) - -struct MICryptoEngine; -struct CRYPTO_PROVIDER; - -class MIR_APP_EXPORT MDatabaseCommon : public MIDatabase, public MNonCopyable -{ - HANDLE m_hLock = nullptr; - -protected: - bool m_bEncrypted = false, m_bUsesPassword = false; - int m_codePage; - - mir_cs m_csDbAccess; - LIST m_lResidentSettings; - MIDatabaseCache* m_cache; - MICryptoEngine *m_crypto = nullptr; - -protected: - int CheckProto(DBCachedContact *cc, const char *proto); - void FillContactSettings(); - bool LockName(const wchar_t *pwszProfileName); - void UnlockName(); - - STDMETHOD_(BOOL, GetContactSettingWorker)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic); - STDMETHOD_(BOOL, WriteContactSettingWorker)(MCONTACT contactID, DBCONTACTWRITESETTING &dbcws) PURE; - -public: - MDatabaseCommon(); - virtual ~MDatabaseCommon(); - - __forceinline bool isEncrypted() const { return m_bEncrypted; } - __forceinline MICryptoEngine* getCrypt() const { return m_crypto; } - __forceinline MIDatabaseCache* getCache() const { return m_cache; } - __forceinline bool usesPassword() const { return m_bUsesPassword; } - - void SetPassword(const wchar_t *ptszPassword); - - STDMETHODIMP_(BOOL) DeleteModule(MCONTACT contactID, LPCSTR szModule) override; - - STDMETHODIMP_(MCONTACT) FindFirstContact(const char *szProto = nullptr) override; - STDMETHODIMP_(MCONTACT) FindNextContact(MCONTACT contactID, const char *szProto = nullptr) override; - - STDMETHODIMP_(BOOL) MetaDetouchSub(DBCachedContact *cc, int nSub) override; - STDMETHODIMP_(BOOL) MetaSetDefault(DBCachedContact *cc) override; - STDMETHODIMP_(BOOL) MetaRemoveSubHistory(DBCachedContact *ccSub) override; - - STDMETHODIMP_(BOOL) IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting) override; - STDMETHODIMP_(BOOL) GetContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override; - STDMETHODIMP_(BOOL) GetContactSettingStr(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override; - STDMETHODIMP_(BOOL) GetContactSettingStatic(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override; - STDMETHODIMP_(BOOL) FreeVariant(DBVARIANT *dbv); - STDMETHODIMP_(BOOL) WriteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override; - - STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam) override; - STDMETHODIMP_(BOOL) SetSettingResident(BOOL bIsResident, const char *pszSettingName) override; - - STDMETHODIMP_(BOOL) Compact(void) override; - STDMETHODIMP_(BOOL) Backup(LPCWSTR) override; - STDMETHODIMP_(BOOL) Flush(void) override; - - STDMETHODIMP_(MIDatabaseChecker*) GetChecker(void) override; - - STDMETHODIMP_(DB::EventCursor*) EventCursor(MCONTACT hContact, MEVENT hDbEvent) override; - STDMETHODIMP_(DB::EventCursor*) EventCursorRev(MCONTACT hContact, MEVENT hDbEvent) override; - - //////////////////////////////////////////////////////////////////////////////////////// - // encryption support - - int InitCrypt(); - - CRYPTO_PROVIDER* SelectProvider(); - STDMETHOD_(CRYPTO_PROVIDER*, ReadProvider)() PURE; - STDMETHOD_(BOOL, StoreProvider)(CRYPTO_PROVIDER*) PURE; - - STDMETHOD_(BOOL, ReadCryptoKey)(MBinBuffer&) PURE; - STDMETHOD_(BOOL, StoreCryptoKey)() PURE; - - STDMETHOD_(BOOL, EnableEncryption)(BOOL) PURE; - STDMETHOD_(BOOL, ReadEncryption)() PURE; -}; - -#pragma warning(pop) - -///////////////////////////////////////////////////////////////////////////////////////// -// Read-only database, that cannot add/modify information in a profile - -class MIR_APP_EXPORT MDatabaseReadonly : public MDatabaseCommon -{ -public: - MDatabaseReadonly(); - - STDMETHODIMP_(BOOL) IsRelational(void) override; - - STDMETHODIMP_(void) SetCacheSafetyMode(BOOL) override; - - STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC, void*) override; - - STDMETHODIMP_(CRYPTO_PROVIDER*) ReadProvider() override; - STDMETHODIMP_(BOOL) StoreProvider(CRYPTO_PROVIDER*) override; - STDMETHODIMP_(BOOL) ReadCryptoKey(MBinBuffer&) override; - STDMETHODIMP_(BOOL) StoreCryptoKey() override; - STDMETHODIMP_(BOOL) EnableEncryption(BOOL) override; - STDMETHODIMP_(BOOL) ReadEncryption() override; - - //////////////////////////////////////////////////////////////////////////////////////// - STDMETHODIMP_(MCONTACT) AddContact(void) override; - STDMETHODIMP_(int) DeleteContact(MCONTACT) override; - STDMETHODIMP_(BOOL) IsDbContact(MCONTACT contactID) override; - STDMETHODIMP_(int) GetContactSize(void) override; - - //////////////////////////////////////////////////////////////////////////////////////// - STDMETHODIMP_(MEVENT) AddEvent(MCONTACT, const DBEVENTINFO*) override; - STDMETHODIMP_(BOOL) DeleteEvent(MEVENT) override; - STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO *dbe) override; - STDMETHODIMP_(int) GetBlobSize(MEVENT) override; - STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT, MEVENT) override; - STDMETHODIMP_(MCONTACT) GetEventContact(MEVENT) override; - STDMETHODIMP_(MEVENT) FindFirstUnreadEvent(MCONTACT) override; - - //////////////////////////////////////////////////////////////////////////////////////// - STDMETHODIMP_(BOOL) GetContactSettingWorker(MCONTACT, LPCSTR, LPCSTR, DBVARIANT*, int) override; - STDMETHODIMP_(BOOL) WriteContactSettingWorker(MCONTACT, DBCONTACTWRITESETTING&) override; - STDMETHODIMP_(BOOL) DeleteContactSetting(MCONTACT, LPCSTR, LPCSTR) override; - STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT, DBSETTINGENUMPROC, const char*, void*) override; - - //////////////////////////////////////////////////////////////////////////////////////// - STDMETHODIMP_(BOOL) MetaMergeHistory(DBCachedContact*, DBCachedContact*) override; - STDMETHODIMP_(BOOL) MetaSplitHistory(DBCachedContact*, DBCachedContact*) override; - STDMETHODIMP_(BOOL) MetaRemoveSubHistory(DBCachedContact*) override; - - //////////////////////////////////////////////////////////////////////////////////////// - STDMETHODIMP_(MEVENT) GetEventById(LPCSTR szModule, LPCSTR szId) override; - STDMETHODIMP_(int) UpdateEventId(MEVENT hDbEvent, const char *szId) override; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// Each database plugin should register itself using this structure - -// Codes for DATABASELINK functions - -// grokHeader() error codes -#define EGROKPRF_NOERROR 0 -#define EGROKPRF_CANTREAD 1 // can't open the profile for reading -#define EGROKPRF_UNKHEADER 2 // header not supported, not a supported profile -#define EGROKPRF_VERNEWER 3 // header correct, version in profile newer than reader/writer -#define EGROKPRF_DAMAGED 4 // header/version fine, other internal data missing, damaged. -#define EGROKPRF_OBSOLETE 5 // obsolete database version detected, requiring conversion - -// makeDatabase() error codes -#define EMKPRF_CREATEFAILED 1 // for some reason CreateFile() didnt like something - -#define MDB_CAPS_CREATE 0x0001 // new database can be created -#define MDB_CAPS_COMPACT 0x0002 // database can be compacted -#define MDB_CAPS_CHECK 0x0004 // database can be checked - - -struct DATABASELINK -{ - int capabilities; - char* szShortName; // uniqie short database name - wchar_t* szFullName; // in English, auto-translated by the core - - /* - profile: pointer to a string which contains full path + name - Affect: The database plugin should create the profile, the filepath will not exist at - the time of this call, profile will be C:\..\.dat - Returns: 0 on success, non zero on failure - error contains extended error information, see EMKPRF_* - */ - int (*makeDatabase)(const wchar_t *profile); - - /* - profile: [in] a null terminated string to file path of selected profile - error: [in/out] pointer to an int to set with error if any - Affect: Ask the database plugin if it supports the given profile, if it does it will - return 0, if it doesnt return 1, with the error set in error -- EGROKPRF_* can be valid error - condition, most common error would be [EGROKPRF_UNKHEADER] - Note: Just because 1 is returned, doesnt mean the profile is not supported, the profile might be damaged - etc. - Returns: 0 on success, non zero on failure - */ - int (*grokHeader)(const wchar_t *profile); - - /* - Affect: Tell the database to create all services/hooks that a 3.xx legacy database might support into link, - which is a PLUGINLINK structure - Returns: 0 on success, nonzero on failure - */ - MDatabaseCommon* (*Load)(const wchar_t *profile, BOOL bReadOnly); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// global database event handles - -EXTERN_C MIR_APP_EXPORT HANDLE - g_hevContactDeleted, // ME_DB_CONTACT_DELETED - g_hevContactAdded, // ME_DB_CONTACT_ADDED - g_hevSettingChanged, // ME_DB_CONTACT_SETTINGCHANGED - g_hevMarkedRead, // ME_DB_EVENT_MARKED_READ - g_hevEventAdded, // ME_DB_EVENT_ADDED - g_hevEventEdited, // ME_DB_EVENT_EDITED - g_hevEventDeleted, // ME_DB_EVENT_DELETED - g_hevEventFiltered; // ME_DB_EVENT_FILTER_ADD - -///////////////////////////////////////////////////////////////////////////////////////// -// cache access function - -EXTERN_C MIR_CORE_DLL(DBCachedContact*) db_get_contact(MCONTACT); - -///////////////////////////////////////////////////////////////////////////////////////// -// database list's functions - -EXTERN_C MIR_CORE_DLL(MDatabaseCommon*) db_get_current(void); -EXTERN_C MIR_CORE_DLL(void) db_setCurrent(MDatabaseCommon *_db); - -// registers a database plugin -EXTERN_C MIR_APP_DLL(void) RegisterDatabasePlugin(DATABASELINK *pDescr); - -// looks for a database plugin by its short name -// returns DATABASELINK* of the required plugin or nullptr on error -EXTERN_C MIR_APP_DLL(DATABASELINK*) GetDatabasePlugin(const char *pszDriverName); - -// looks for a database plugin suitable to open this file -// returns DATABASELINK* of the required plugin or nullptr on error -EXTERN_C MIR_APP_DLL(DATABASELINK*) FindDatabasePlugin(const wchar_t *ptszFileName); - -///////////////////////////////////////////////////////////////////////////////////////// -// database upgrader - -namespace DB -{ - MIR_APP_DLL(MDatabaseCommon *) Upgrade(const wchar_t *profile); -} - -#endif // M_DB_INT_H__ +/* + +Miranda NG: the free IM client for Microsoft* Windows* + +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +aint with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#ifndef M_DB_INT_H__ +#define M_DB_INT_H__ 1 + +#ifndef M_CORE_H__ + #include +#endif + +/////////////////////////////////////////////////////////////////////////////// +// basic database checker interface + +#define STATUS_MESSAGE 0 +#define STATUS_WARNING 1 +#define STATUS_ERROR 2 +#define STATUS_FATAL 3 +#define STATUS_SUCCESS 4 + +struct DATABASELINK; + +struct DBCHeckCallback +{ + uint32_t spaceProcessed, spaceUsed; + + void (*pfnAddLogMessage)(int type, const wchar_t *ptszFormat, ...); +}; + +interface MIDatabaseChecker +{ + STDMETHOD_(BOOL, Start)(DBCHeckCallback *callback) PURE; + STDMETHOD_(BOOL, CheckDb)(int phase) PURE; + STDMETHOD_(void, Destroy)() PURE; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// basic database interface + +struct DBCachedGlobalValue +{ + char *name; + DBVARIANT value; +}; + +struct DBCachedContactValue +{ + char *name; + DBVARIANT value; + DBCachedContactValue *next; +}; + +struct DBCachedContactBase +{ + MCONTACT contactID; + char *szProto; + DBCachedContactValue *first, *last; + + // metacontacts + int nSubs; // == -1 -> not a metacontact + MCONTACT *pSubs; + MCONTACT parentID; // == 0 -> not a subcontact + int nDefault; // default sub number + + __forceinline bool IsMeta() const { return nSubs != -1; } + __forceinline bool IsSub() const { return parentID != 0; } +}; + +#ifndef OWN_CACHED_CONTACT +struct DBCachedContact : public DBCachedContactBase {}; +#else +struct DBCachedContact; +#endif + +interface MIDatabaseCache : public MZeroedObject +{ + STDMETHOD_(DBCachedContact*, AddContactToCache)(MCONTACT contactID) PURE; + STDMETHOD_(DBCachedContact*, GetCachedContact)(MCONTACT contactID) PURE; + STDMETHOD_(DBCachedContact*, GetFirstContact)(void) PURE; + STDMETHOD_(DBCachedContact*, GetNextContact)(MCONTACT contactID) PURE; + STDMETHOD_(void, FreeCachedContact)(MCONTACT contactID) PURE; + + STDMETHOD_(char*, InsertCachedSetting)(const char *szName, size_t) PURE; + STDMETHOD_(char*, GetCachedSetting)(const char *szModuleName, const char *szSettingName, size_t, size_t) PURE; + STDMETHOD_(void, SetCachedVariant)(DBVARIANT *s, DBVARIANT *d) PURE; + STDMETHOD_(DBVARIANT*, GetCachedValuePtr)(MCONTACT contactID, char *szSetting, int bAllocate) PURE; +}; + +interface MIR_APP_EXPORT MIDatabase +{ + STDMETHOD_(BOOL, IsRelational)(void) PURE; + STDMETHOD_(void, SetCacheSafetyMode)(BOOL) PURE; + + STDMETHOD_(int, GetContactCount)(void) PURE; + STDMETHOD_(MCONTACT, FindFirstContact)(const char *szProto = nullptr) PURE; + STDMETHOD_(MCONTACT, FindNextContact)(MCONTACT contactID, const char *szProto = nullptr) PURE; + + STDMETHOD_(int, DeleteContact)(MCONTACT contactID) PURE; + STDMETHOD_(MCONTACT, AddContact)(void) PURE; + STDMETHOD_(BOOL, IsDbContact)(MCONTACT contactID) PURE; + STDMETHOD_(int, GetContactSize)(void) PURE; + + STDMETHOD_(int, GetEventCount)(MCONTACT contactID) PURE; + STDMETHOD_(MEVENT, AddEvent)(MCONTACT contactID, const DBEVENTINFO *dbe) PURE; + STDMETHOD_(BOOL, DeleteEvent)(MEVENT hDbEvent) PURE; + STDMETHOD_(BOOL, EditEvent)(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO *dbe) PURE; + STDMETHOD_(int, GetBlobSize)(MEVENT hDbEvent) PURE; + STDMETHOD_(BOOL, GetEvent)(MEVENT hDbEvent, DBEVENTINFO *dbe) PURE; + STDMETHOD_(BOOL, MarkEventRead)(MCONTACT contactID, MEVENT hDbEvent) PURE; + STDMETHOD_(MCONTACT, GetEventContact)(MEVENT hDbEvent) PURE; + STDMETHOD_(MEVENT, FindFirstEvent)(MCONTACT contactID) PURE; + STDMETHOD_(MEVENT, FindFirstUnreadEvent)(MCONTACT contactID) PURE; + STDMETHOD_(MEVENT, FindLastEvent)(MCONTACT contactID) PURE; + STDMETHOD_(MEVENT, FindNextEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE; + STDMETHOD_(MEVENT, FindPrevEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE; + + STDMETHOD_(BOOL, DeleteModule)(MCONTACT contactID, LPCSTR szModule) PURE; + STDMETHOD_(BOOL, EnumModuleNames)(DBMODULEENUMPROC pFunc, void *pParam) PURE; + + STDMETHOD_(BOOL, GetContactSetting)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE; + STDMETHOD_(BOOL, GetContactSettingStr)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE; + STDMETHOD_(BOOL, GetContactSettingStatic)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE; + STDMETHOD_(BOOL, FreeVariant)(DBVARIANT *dbv) PURE; + STDMETHOD_(BOOL, WriteContactSetting)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) PURE; + STDMETHOD_(BOOL, DeleteContactSetting)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting) PURE; + STDMETHOD_(BOOL, EnumContactSettings)(MCONTACT contactID, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param) PURE; + STDMETHOD_(BOOL, SetSettingResident)(BOOL bIsResident, const char *pszSettingName) PURE; + STDMETHOD_(BOOL, EnumResidentSettings)(DBMODULEENUMPROC pFunc, void *pParam) PURE; + STDMETHOD_(BOOL, IsSettingEncrypted)(LPCSTR szModule, LPCSTR szSetting) PURE; + + STDMETHOD_(BOOL, MetaDetouchSub)(DBCachedContact*, int nSub) PURE; + STDMETHOD_(BOOL, MetaSetDefault)(DBCachedContact*) PURE; + STDMETHOD_(BOOL, MetaMergeHistory)(DBCachedContact *ccMeta, DBCachedContact *ccSub) PURE; + STDMETHOD_(BOOL, MetaSplitHistory)(DBCachedContact *ccMeta, DBCachedContact *ccSub) PURE; + STDMETHOD_(BOOL, MetaRemoveSubHistory)(DBCachedContact *ccSub) PURE; + + STDMETHOD_(BOOL, Compact)(void) PURE; + STDMETHOD_(BOOL, Backup)(LPCWSTR) PURE; + STDMETHOD_(BOOL, Flush)(void) PURE; + + STDMETHOD_(MIDatabaseChecker*, GetChecker)(void) PURE; + STDMETHOD_(DATABASELINK*, GetDriver)(void) PURE; + + STDMETHOD_(MEVENT, GetEventById)(LPCSTR szModule, LPCSTR szId) PURE; + STDMETHOD_(int, UpdateEventId)(MEVENT hDbEvent, const char *szId) PURE; + + STDMETHOD_(DB::EventCursor*, EventCursor)(MCONTACT hContact, MEVENT hDbEvent) PURE; + STDMETHOD_(DB::EventCursor*, EventCursorRev)(MCONTACT hContact, MEVENT hDbEvent) PURE; +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +#pragma warning(push) +#pragma warning(disable:4275) + +struct MICryptoEngine; +struct CRYPTO_PROVIDER; + +class MIR_APP_EXPORT MDatabaseCommon : public MIDatabase, public MNonCopyable +{ + HANDLE m_hLock = nullptr; + +protected: + bool m_bEncrypted = false, m_bUsesPassword = false; + int m_codePage; + + mir_cs m_csDbAccess; + LIST m_lResidentSettings; + MIDatabaseCache* m_cache; + MICryptoEngine *m_crypto = nullptr; + +protected: + int CheckProto(DBCachedContact *cc, const char *proto); + void FillContactSettings(); + bool LockName(const wchar_t *pwszProfileName); + void UnlockName(); + + STDMETHOD_(BOOL, GetContactSettingWorker)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic); + STDMETHOD_(BOOL, WriteContactSettingWorker)(MCONTACT contactID, DBCONTACTWRITESETTING &dbcws) PURE; + +public: + MDatabaseCommon(); + virtual ~MDatabaseCommon(); + + __forceinline bool isEncrypted() const { return m_bEncrypted; } + __forceinline MICryptoEngine* getCrypt() const { return m_crypto; } + __forceinline MIDatabaseCache* getCache() const { return m_cache; } + __forceinline bool usesPassword() const { return m_bUsesPassword; } + + void SetPassword(const wchar_t *ptszPassword); + + STDMETHODIMP_(BOOL) DeleteModule(MCONTACT contactID, LPCSTR szModule) override; + + STDMETHODIMP_(MCONTACT) FindFirstContact(const char *szProto = nullptr) override; + STDMETHODIMP_(MCONTACT) FindNextContact(MCONTACT contactID, const char *szProto = nullptr) override; + + STDMETHODIMP_(BOOL) MetaDetouchSub(DBCachedContact *cc, int nSub) override; + STDMETHODIMP_(BOOL) MetaSetDefault(DBCachedContact *cc) override; + STDMETHODIMP_(BOOL) MetaRemoveSubHistory(DBCachedContact *ccSub) override; + + STDMETHODIMP_(BOOL) IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting) override; + STDMETHODIMP_(BOOL) GetContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override; + STDMETHODIMP_(BOOL) GetContactSettingStr(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override; + STDMETHODIMP_(BOOL) GetContactSettingStatic(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override; + STDMETHODIMP_(BOOL) FreeVariant(DBVARIANT *dbv); + STDMETHODIMP_(BOOL) WriteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override; + + STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam) override; + STDMETHODIMP_(BOOL) SetSettingResident(BOOL bIsResident, const char *pszSettingName) override; + + STDMETHODIMP_(BOOL) Compact(void) override; + STDMETHODIMP_(BOOL) Backup(LPCWSTR) override; + STDMETHODIMP_(BOOL) Flush(void) override; + + STDMETHODIMP_(MIDatabaseChecker*) GetChecker(void) override; + + STDMETHODIMP_(DB::EventCursor*) EventCursor(MCONTACT hContact, MEVENT hDbEvent) override; + STDMETHODIMP_(DB::EventCursor*) EventCursorRev(MCONTACT hContact, MEVENT hDbEvent) override; + + //////////////////////////////////////////////////////////////////////////////////////// + // encryption support + + int InitCrypt(); + + CRYPTO_PROVIDER* SelectProvider(); + STDMETHOD_(CRYPTO_PROVIDER*, ReadProvider)() PURE; + STDMETHOD_(BOOL, StoreProvider)(CRYPTO_PROVIDER*) PURE; + + STDMETHOD_(BOOL, ReadCryptoKey)(MBinBuffer&) PURE; + STDMETHOD_(BOOL, StoreCryptoKey)() PURE; + + STDMETHOD_(BOOL, EnableEncryption)(BOOL) PURE; + STDMETHOD_(BOOL, ReadEncryption)() PURE; +}; + +#pragma warning(pop) + +///////////////////////////////////////////////////////////////////////////////////////// +// Read-only database, that cannot add/modify information in a profile + +class MIR_APP_EXPORT MDatabaseReadonly : public MDatabaseCommon +{ +public: + MDatabaseReadonly(); + + STDMETHODIMP_(BOOL) IsRelational(void) override; + + STDMETHODIMP_(void) SetCacheSafetyMode(BOOL) override; + + STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC, void*) override; + + STDMETHODIMP_(CRYPTO_PROVIDER*) ReadProvider() override; + STDMETHODIMP_(BOOL) StoreProvider(CRYPTO_PROVIDER*) override; + STDMETHODIMP_(BOOL) ReadCryptoKey(MBinBuffer&) override; + STDMETHODIMP_(BOOL) StoreCryptoKey() override; + STDMETHODIMP_(BOOL) EnableEncryption(BOOL) override; + STDMETHODIMP_(BOOL) ReadEncryption() override; + + //////////////////////////////////////////////////////////////////////////////////////// + STDMETHODIMP_(MCONTACT) AddContact(void) override; + STDMETHODIMP_(int) DeleteContact(MCONTACT) override; + STDMETHODIMP_(BOOL) IsDbContact(MCONTACT contactID) override; + STDMETHODIMP_(int) GetContactSize(void) override; + + //////////////////////////////////////////////////////////////////////////////////////// + STDMETHODIMP_(MEVENT) AddEvent(MCONTACT, const DBEVENTINFO*) override; + STDMETHODIMP_(BOOL) DeleteEvent(MEVENT) override; + STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO *dbe) override; + STDMETHODIMP_(int) GetBlobSize(MEVENT) override; + STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT, MEVENT) override; + STDMETHODIMP_(MCONTACT) GetEventContact(MEVENT) override; + STDMETHODIMP_(MEVENT) FindFirstUnreadEvent(MCONTACT) override; + + //////////////////////////////////////////////////////////////////////////////////////// + STDMETHODIMP_(BOOL) GetContactSettingWorker(MCONTACT, LPCSTR, LPCSTR, DBVARIANT*, int) override; + STDMETHODIMP_(BOOL) WriteContactSettingWorker(MCONTACT, DBCONTACTWRITESETTING&) override; + STDMETHODIMP_(BOOL) DeleteContactSetting(MCONTACT, LPCSTR, LPCSTR) override; + STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT, DBSETTINGENUMPROC, const char*, void*) override; + + //////////////////////////////////////////////////////////////////////////////////////// + STDMETHODIMP_(BOOL) MetaMergeHistory(DBCachedContact*, DBCachedContact*) override; + STDMETHODIMP_(BOOL) MetaSplitHistory(DBCachedContact*, DBCachedContact*) override; + STDMETHODIMP_(BOOL) MetaRemoveSubHistory(DBCachedContact*) override; + + //////////////////////////////////////////////////////////////////////////////////////// + STDMETHODIMP_(MEVENT) GetEventById(LPCSTR szModule, LPCSTR szId) override; + STDMETHODIMP_(int) UpdateEventId(MEVENT hDbEvent, const char *szId) override; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// Each database plugin should register itself using this structure + +// Codes for DATABASELINK functions + +// grokHeader() error codes +#define EGROKPRF_NOERROR 0 +#define EGROKPRF_CANTREAD 1 // can't open the profile for reading +#define EGROKPRF_UNKHEADER 2 // header not supported, not a supported profile +#define EGROKPRF_VERNEWER 3 // header correct, version in profile newer than reader/writer +#define EGROKPRF_DAMAGED 4 // header/version fine, other internal data missing, damaged. +#define EGROKPRF_OBSOLETE 5 // obsolete database version detected, requiring conversion + +// makeDatabase() error codes +#define EMKPRF_CREATEFAILED 1 // for some reason CreateFile() didnt like something + +#define MDB_CAPS_CREATE 0x0001 // new database can be created +#define MDB_CAPS_COMPACT 0x0002 // database can be compacted +#define MDB_CAPS_CHECK 0x0004 // database can be checked + + +struct DATABASELINK +{ + int capabilities; + char* szShortName; // uniqie short database name + wchar_t* szFullName; // in English, auto-translated by the core + + /* + profile: pointer to a string which contains full path + name + Affect: The database plugin should create the profile, the filepath will not exist at + the time of this call, profile will be C:\..\.dat + Returns: 0 on success, non zero on failure - error contains extended error information, see EMKPRF_* + */ + int (*makeDatabase)(const wchar_t *profile); + + /* + profile: [in] a null terminated string to file path of selected profile + error: [in/out] pointer to an int to set with error if any + Affect: Ask the database plugin if it supports the given profile, if it does it will + return 0, if it doesnt return 1, with the error set in error -- EGROKPRF_* can be valid error + condition, most common error would be [EGROKPRF_UNKHEADER] + Note: Just because 1 is returned, doesnt mean the profile is not supported, the profile might be damaged + etc. + Returns: 0 on success, non zero on failure + */ + int (*grokHeader)(const wchar_t *profile); + + /* + Affect: Tell the database to create all services/hooks that a 3.xx legacy database might support into link, + which is a PLUGINLINK structure + Returns: 0 on success, nonzero on failure + */ + MDatabaseCommon* (*Load)(const wchar_t *profile, BOOL bReadOnly); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// global database event handles + +EXTERN_C MIR_APP_EXPORT HANDLE + g_hevContactDeleted, // ME_DB_CONTACT_DELETED + g_hevContactAdded, // ME_DB_CONTACT_ADDED + g_hevSettingChanged, // ME_DB_CONTACT_SETTINGCHANGED + g_hevMarkedRead, // ME_DB_EVENT_MARKED_READ + g_hevEventAdded, // ME_DB_EVENT_ADDED + g_hevEventEdited, // ME_DB_EVENT_EDITED + g_hevEventDeleted, // ME_DB_EVENT_DELETED + g_hevEventFiltered; // ME_DB_EVENT_FILTER_ADD + +///////////////////////////////////////////////////////////////////////////////////////// +// cache access function + +EXTERN_C MIR_CORE_DLL(DBCachedContact*) db_get_contact(MCONTACT); + +///////////////////////////////////////////////////////////////////////////////////////// +// database list's functions + +EXTERN_C MIR_CORE_DLL(MDatabaseCommon*) db_get_current(void); +EXTERN_C MIR_CORE_DLL(void) db_setCurrent(MDatabaseCommon *_db); + +// registers a database plugin +EXTERN_C MIR_APP_DLL(void) RegisterDatabasePlugin(DATABASELINK *pDescr); + +// looks for a database plugin by its short name +// returns DATABASELINK* of the required plugin or nullptr on error +EXTERN_C MIR_APP_DLL(DATABASELINK*) GetDatabasePlugin(const char *pszDriverName); + +// looks for a database plugin suitable to open this file +// returns DATABASELINK* of the required plugin or nullptr on error +EXTERN_C MIR_APP_DLL(DATABASELINK*) FindDatabasePlugin(const wchar_t *ptszFileName); + +///////////////////////////////////////////////////////////////////////////////////////// +// database upgrader + +namespace DB +{ + MIR_APP_DLL(MDatabaseCommon *) Upgrade(const wchar_t *profile); +} + +#endif // M_DB_INT_H__ diff --git a/include/m_gui.h b/include/m_gui.h index 48041ff696..60d4dc2933 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -1,1606 +1,1606 @@ -/* - -Jabber Protocol Plugin for Miranda NG - -Copyright (c) 2002-04 Santithorn Bunchua -Copyright (c) 2005-12 George Hazan -Copyright (c) 2007-09 Maxim Mluhov -Copyright (c) 2007-09 Victor Pavlychko -Copyright (C) 2012-23 Miranda NG team - -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. - -*/ - -#pragma once - -#ifndef __M_GUI_H -#define __M_GUI_H - -#ifdef _MSC_VER - #include -#endif // _WINDOWS - -#include -#include -#include - -#pragma warning(disable:4355 4251 4481) - -///////////////////////////////////////////////////////////////////////////////////////// -// helpers for the option's visualization - -template -struct CMDBTraits -{ -}; - -template<> -struct CMDBTraits<1> -{ - typedef uint8_t DBType; - enum { DBTypeId = DBVT_BYTE }; - static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) - { - return db_get_b(0, szModule, szSetting, value); - } - static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) - { - db_set_b(0, szModule, szSetting, value); - } -}; - -template<> -struct CMDBTraits<2> -{ - typedef uint16_t DBType; - enum { DBTypeId = DBVT_WORD }; - static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) - { - return db_get_w(0, szModule, szSetting, value); - } - static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) - { - db_set_w(0, szModule, szSetting, value); - } -}; - -template<> -struct CMDBTraits<4> -{ - typedef uint32_t DBType; - enum { DBTypeId = DBVT_DWORD }; - static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) - { - return db_get_dw(0, szModule, szSetting, value); - } - static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) - { - db_set_dw(0, szModule, szSetting, value); - } -}; - -template<> -struct CMDBTraits<8> -{ - typedef uint32_t DBType; - enum { DBTypeId = DBVT_DWORD }; - static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) - { - return db_get_dw(0, szModule, szSetting, value); - } - static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) - { - db_set_dw(0, szModule, szSetting, value); - } -}; - -class CMOptionBase : public MNonCopyable -{ -public: - __forceinline const char* GetDBModuleName() const { return m_szModuleName; } - __forceinline const char* GetDBSettingName() const { return m_szSetting; } - - __forceinline void Delete() const - { db_unset(0, m_szModuleName, m_szSetting); - } - -protected: - __forceinline CMOptionBase(PROTO_INTERFACE *proto, const char *szSetting) : - m_szModuleName(proto->m_szModuleName), m_szSetting(szSetting) - {} - - __forceinline CMOptionBase(const char *module, const char *szSetting) : - m_szModuleName(module), m_szSetting(szSetting) - {} - - const char *m_szModuleName; - const char *m_szSetting; -}; - -template -class CMOption : public CMOptionBase -{ -public: - typedef T Type; - - __forceinline CMOption(PROTO_INTERFACE *proto, const char *szSetting, Type defValue) : - CMOptionBase(proto, szSetting), m_default(defValue) - {} - - __forceinline CMOption(const char *szModule, const char *szSetting, Type defValue) : - CMOptionBase(szModule, szSetting), m_default(defValue) - {} - - __forceinline Type Default() const - { - return m_default; - } - - __forceinline operator Type() - { - return (Type)CMDBTraits::Get(m_szModuleName, m_szSetting, m_default); - } - - __forceinline Type operator= (Type value) - { - #ifdef _MSC_VER - CMDBTraits::Set(m_szModuleName, m_szSetting, (CMDBTraits::DBType)value); - #else - CMDBTraits::Set(m_szModuleName, m_szSetting, value); - #endif - return value; - } - -private: - Type m_default; -}; - -template<> -class CMOption : public CMOptionBase -{ -public: - - typedef char Type; - - __forceinline CMOption(PROTO_INTERFACE *proto, const char *szSetting, const Type *defValue = nullptr) : - CMOptionBase(proto, szSetting), m_default(defValue) - {} - - __forceinline CMOption(const char *szModule, const char *szSetting, const Type *defValue = nullptr) : - CMOptionBase(szModule, szSetting), m_default(defValue) - {} - - __forceinline const Type* Default() const - { - return m_default; - } - - __forceinline operator Type*() - { - m_value = db_get_sa(0, m_szModuleName, m_szSetting); - if (!m_value) m_value = mir_strdup(m_default); - return m_value; - } - - __forceinline Type* operator= (Type *value) - { - db_set_s(0, m_szModuleName, m_szSetting, value); - return value; - } - -private: - const Type *m_default; - mir_ptr m_value; -}; - -template<> -class CMOption : public CMOptionBase -{ -public: - - typedef wchar_t Type; - - __forceinline CMOption(PROTO_INTERFACE *proto, const char *szSetting, const Type *defValue = nullptr) : - CMOptionBase(proto, szSetting), m_default(defValue) - {} - - __forceinline CMOption(const char *szModule, const char *szSetting, const Type *defValue = nullptr) : - CMOptionBase(szModule, szSetting), m_default(defValue) - {} - - __forceinline const Type* Default() const - { - return m_default; - } - - __forceinline operator Type*() - { - m_value = db_get_wsa(0, m_szModuleName, m_szSetting); - if (!m_value) m_value = mir_wstrdup(m_default); - return m_value; - } - - __forceinline const Type* operator= (const Type *value) - { - db_set_ws(0, m_szModuleName, m_szSetting, value); - return value; - } - -private: - const Type *m_default; - mir_ptr m_value; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CDbLink - -class MIR_CORE_EXPORT CDataLink -{ -protected: - uint8_t m_type; - -public: - __inline CDataLink(uint8_t type) : m_type(type) {} - virtual ~CDataLink() {} - - __inline uint8_t GetDataType() const { return m_type; } - - virtual uint32_t LoadInt() = 0; - virtual void SaveInt(uint32_t value) = 0; - - virtual wchar_t* LoadText() = 0; - virtual void SaveText(wchar_t *value) = 0; -}; - -class MIR_CORE_EXPORT CDbLink : public CDataLink -{ - char *m_szModule; - char *m_szSetting; - - uint32_t m_iDefault; - wchar_t *m_szDefault; - - DBVARIANT dbv; - -public: - CDbLink(const char *szModule, const char *szSetting, uint8_t type, uint32_t iValue); - CDbLink(const char *szModule, const char *szSetting, uint8_t type, wchar_t *szValue); - ~CDbLink(); - - uint32_t LoadInt() override; - void SaveInt(uint32_t value) override; - - wchar_t* LoadText() override; - void SaveText(wchar_t *value) override; -}; - -template -class CMOptionLink : public CDataLink -{ -private: - CMOption *m_option; - -public: - __forceinline CMOptionLink(CMOption &option) : - CDataLink(CMDBTraits::DBTypeId), m_option(&option) - {} - - __forceinline uint32_t LoadInt() override { return (uint32_t)(T)*m_option; } - __forceinline void SaveInt(uint32_t value) override { *m_option = (T)value; } - - __forceinline wchar_t* LoadText() override { return nullptr; } - __forceinline void SaveText(wchar_t*) override {} -}; - -template<> -class CMOptionLink : public CDataLink -{ -private: - typedef wchar_t *T; - CMOption *m_option; - -public: - __forceinline CMOptionLink(CMOption &option) : - CDataLink(DBVT_WCHAR), m_option(&option) - {} - - __forceinline uint32_t LoadInt() override { return 0; } - __forceinline void SaveInt(uint32_t) override { } - - __forceinline wchar_t* LoadText() override { return *m_option; } - __forceinline void SaveText(wchar_t *value) override { *m_option = value; } -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlBase - -struct CContextMenuPos -{ - const class CCtrlBase *pCtrl; - POINT pt; - union { - int iCurr; // int for list boxes - HTREEITEM hItem; - }; -}; - -class MIR_CORE_EXPORT CCtrlBase -{ - friend class CDlgBase; - - __forceinline CCtrlBase(const CCtrlBase&) = delete; - __forceinline CCtrlBase& operator=(const CCtrlBase&) = delete; - -public: - CCtrlBase(CDlgBase *wnd, int idCtrl); - virtual ~CCtrlBase(); - - __forceinline MWindow GetHwnd() const { return m_hwnd; } - __forceinline int GetCtrlId() const { return m_idCtrl; } - __forceinline CDlgBase *GetParent() const { return m_parentWnd; } - __forceinline bool IsChanged() const { return m_bChanged; } - __forceinline void SetSilent(bool bSilent = true) { m_bSilent = bSilent; } - __forceinline void UseSystemColors() { m_bUseSystemColors = true; } - - void Show(bool bShow = true); - __forceinline void Hide() { Show(false); } - - void Enable(bool bIsEnable = true); - __forceinline void Disable() { Enable(false); } - bool Enabled(void) const; - - void NotifyChange(); - void SetDraw(bool bEnable); - - LRESULT SendMsg(UINT Msg, WPARAM wParam, LPARAM lParam) const; - - void SetText(const wchar_t *text); - void SetTextA(const char *text); - void SetInt(int value); - - wchar_t* GetText() const; - char* GetTextA() const; - char* GetTextU() const; - - wchar_t* GetText(wchar_t *buf, size_t size) const; - char* GetTextA(char *buf, size_t size) const; - char* GetTextU(char *buf, size_t size) const; - - int GetInt() const; - - virtual BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t /*idCode*/) { return FALSE; } - virtual BOOL OnNotify(int /*idCtrl*/, NMHDR* /*pnmh*/) { return FALSE; } - - virtual BOOL OnMeasureItem(MEASUREITEMSTRUCT*) { return FALSE; } - virtual BOOL OnDrawItem(DRAWITEMSTRUCT*) { return FALSE; } - virtual BOOL OnDeleteItem(DELETEITEMSTRUCT*) { return FALSE; } - - virtual void OnInit(); - virtual void OnDestroy(); - - virtual bool OnApply(); - virtual void OnReset(); - -protected: - MWindow m_hwnd = nullptr; // must be the first data item - int m_idCtrl; - bool m_bChanged = false, m_bSilent = false, m_bUseSystemColors = false, m_bNotifiable = false; - CDlgBase *m_parentWnd; - -public: - CCallback OnChange; - CCallback OnBuildMenu; - -protected: - virtual void GetCaretPos(CContextMenuPos&) const; - virtual LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam); - - void Subclass(); - void Unsubclass(); - -private: - static LRESULT CALLBACK GlobalSubclassWndProc(MWindow hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlData - data access controls base class - -class MIR_CORE_EXPORT CCtrlData : public CCtrlBase -{ - typedef CCtrlBase CSuper; - -public: - CCtrlData(CDlgBase *dlg, int ctrlId); - ~CCtrlData(); - - void CreateDbLink(const char* szModuleName, const char* szSetting, uint8_t type, uint32_t iValue); - void CreateDbLink(const char* szModuleName, const char* szSetting, wchar_t* szValue); - void CreateDbLink(CDataLink *link) { m_dbLink = link; } - - void OnInit() override; - -protected: - CDataLink *m_dbLink; - - __inline uint8_t GetDataType() { return m_dbLink ? m_dbLink->GetDataType() : DBVT_DELETED; } - __inline uint32_t LoadInt() { return m_dbLink ? m_dbLink->LoadInt() : 0; } - __inline void SaveInt(uint32_t value) { if (m_dbLink) m_dbLink->SaveInt(value); } - __inline const wchar_t *LoadText() { return m_dbLink ? m_dbLink->LoadText() : L""; } - __inline void SaveText(wchar_t *value) { if (m_dbLink) m_dbLink->SaveText(value); } -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CDlgBase - base dialog class - -class MIR_CORE_EXPORT CDlgBase -{ - friend class CTimer; - friend class CCtrlBase; - friend class CCtrlData; - -public: - CDlgBase(class CMPluginBase &pPlug, int idDialog); - virtual ~CDlgBase(); - - // general utilities - void Close(); - void Resize(); - void Create(); - void Show(int nCmdShow = SW_SHOW); - int DoModal(); - void EndModal(INT_PTR nResult); - - class CCtrlBase* FindControl(int idCtrl); - class CCtrlBase* FindControl(MWindow hwnd); - - void SetCaption(const wchar_t *ptszCaption); - void SetDraw(bool bEnable); - void NotifyChange(void); // sends a notification to a parent window - - HINSTANCE GetInst() const; - - __forceinline MWindow GetHwnd() const { return m_hwnd; } - __forceinline void Hide() { Show(SW_HIDE); } - __forceinline bool IsInitialized() const { return m_bInitialized; } - __forceinline void SetMinSize(int x, int y) { m_iMinWidth = x, m_iMinHeight = y; } - __forceinline void SetParent(MWindow hwnd) { m_hwndParent = hwnd; } - - __forceinline CCtrlBase* operator[](int iControlId) { return FindControl(iControlId); } - - static CDlgBase* Find(MWindow hwnd); - -protected: - MWindow m_hwnd = nullptr; // must be the first data item - MWindow m_hwndParent = nullptr; - int m_idDialog; - - bool m_isModal = false; - bool m_bInitialized = false; - bool m_forceResizable = false; - bool m_bFixedSize; - bool m_bSucceeded = false; // was IDOK pressed or not - bool m_bExiting = false; // window received WM_CLOSE and gonna die soon - - enum { CLOSE_ON_OK = 0x1, CLOSE_ON_CANCEL = 0x2 }; - uint8_t m_autoClose; // automatically close dialog on IDOK/CANCEL commands. default: CLOSE_ON_OK|CLOSE_ON_CANCEL - - CMPluginBase &m_pPlugin; - - // override this handlers to provide custom functionality - // general messages - virtual bool OnInitDialog(); - virtual bool OnApply(); - virtual bool OnClose(); - virtual void OnDestroy(); - - virtual void OnTimer(class CTimer*); - - // miranda-related stuff - virtual int Resizer(UTILRESIZECONTROL *urc); - virtual void OnResize(); - virtual void OnReset(); - virtual void OnChange(); - - // main dialog procedure - virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam); - - CCallback m_OnFinishWizard; - - // register controls - void AddControl(CCtrlBase *ctrl); - void RemoveControl(CCtrlBase *ctrl); - - // timers - void AddTimer(CTimer *timer); - void RemoveTimer(UINT_PTR idEvent); - - // options support - void CreateLink(class CCtrlData& ctrl, const char *szSetting, uint8_t type, uint32_t iValue); - void CreateLink(class CCtrlData& ctrl, const char *szSetting, wchar_t *szValue); - - template - __inline void CreateLink(CCtrlData& ctrl, CMOption &option) - { - ctrl.CreateDbLink(new CMOptionLink(option)); - } - - // win32 stuff - void ThemeDialogBackground(BOOL tabbed); - -private: - LIST m_timers; - LIST m_controls; - - void NotifyControls(void (CCtrlBase::*fn)()); - bool VerifyControls(bool (CCtrlBase::*fn)()); - - CTimer* FindTimer(int idEvent); - int m_iMinWidth = -1, m_iMinHeight = -1; - - static BOOL CALLBACK GlobalFieldEnum(MWindow hwnd, LPARAM lParam); - static INT_PTR CALLBACK GlobalDlgProc(MWindow hwnd, UINT msg, WPARAM wParam, LPARAM lParam); - static int GlobalDlgResizer(MWindow hwnd, LPARAM lParam, UTILRESIZECONTROL *urc); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CTimer - -class MIR_CORE_EXPORT CTimer -{ - friend class CDlgBase; - -public: - CTimer(CDlgBase* wnd, UINT_PTR idEvent); - ~CTimer(); - - __forceinline UINT_PTR GetEventId() const { return m_idEvent; } - __forceinline MWindow GetHwnd() const { return m_wnd->GetHwnd(); } - - virtual BOOL OnTimer(); - - void Start(int elapse); - bool Stop(); // returns true if timer was active - - void StartSafe(int elapse); - void StopSafe(); - - CCallback OnEvent; - -protected: - UINT_PTR m_idEvent; - CDlgBase* m_wnd; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlLabel - -class MIR_CORE_EXPORT CCtrlLabel : public CCtrlBase -{ - typedef CCtrlBase CSuper; - -public: - CCtrlLabel(CDlgBase *dlg, int ctrlId); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlButton - -class MIR_CORE_EXPORT CCtrlButton : public CCtrlBase -{ - typedef CCtrlBase CSuper; - -public: - CCtrlButton(CDlgBase *dlg, int ctrlId); - - BOOL OnCommand(MWindow hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; - - CCallback OnClick; - - void Click(); - bool IsPushed() const; - void Push(bool bPushed); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlMButton - -class MIR_CORE_EXPORT CCtrlMButton : public CCtrlButton -{ - typedef CCtrlButton CSuper; - -public: - CCtrlMButton(CDlgBase *dlg, int ctrlId, HICON hIcon, const char* tooltip); - CCtrlMButton(CDlgBase *dlg, int ctrlId, int iCoreIcon, const char* tooltip); - ~CCtrlMButton(); - - void MakeFlat(); - void MakePush(); - - void OnInit() override; - -protected: - HICON m_hIcon; - const char* m_toolTip; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CSplitter - -class MIR_CORE_EXPORT CSplitter : public CCtrlBase -{ - typedef CCtrlBase CSuper; - -public: - CSplitter(CDlgBase *dlg, int ctrlId); - - __forceinline int GetPos() const { return m_iPosition; } - -protected: - LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) override; - void OnInit() override; - - int m_iPosition; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlHyperlink - -class MIR_CORE_EXPORT CCtrlHyperlink : public CCtrlBase -{ - typedef CCtrlBase CSuper; - -public: - CCtrlHyperlink(CDlgBase *dlg, int ctrlId, const char* url = nullptr); - - BOOL OnCommand(MWindow hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; - - CCallback OnClick; - - void SetUrl(const char *url); - const char *GetUrl(); - -protected: - const char* m_url; - - void Default_OnClick(CCtrlHyperlink*); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CProgress - -class MIR_CORE_EXPORT CCtrlProgress : public CCtrlBase -{ -public: - CCtrlProgress(CDlgBase *dlg, int ctrlId); - - void SetRange(uint16_t max, uint16_t min = 0); - void SetPosition(uint16_t value); - void SetStep(uint16_t value); - uint16_t Move(uint16_t delta = 0); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlClc - -#if !defined(MGROUP) - typedef int MGROUP; -#endif - -class MIR_CORE_EXPORT CCtrlClc : public CCtrlBase -{ - typedef CCtrlBase CSuper; - -public: - CCtrlClc(CDlgBase *dlg, int ctrlId); - - void AddContact(MCONTACT hContact); - void AddGroup(HANDLE hGroup); - HANDLE AddInfoItem(CLCINFOITEM *cii); - void AutoRebuild(); - void DeleteItem(HANDLE hItem); - void EditLabel(HANDLE hItem); - void EndEditLabel(bool save); - void EnsureVisible(HANDLE hItem, bool partialOk); - void Expand(HANDLE hItem, uint32_t flags); - HANDLE FindContact(MCONTACT hContact); - HANDLE FindGroup(MGROUP hGroup); - COLORREF GetBkColor() const; - bool GetCheck(HANDLE hItem) const; - int GetCount() const; - MWindow GetEditControl() const; - uint32_t GetExStyle() const; - uint32_t GetExpand(HANDLE hItem) const; - int GetExtraColumns() const; - uint8_t GetExtraImage(HANDLE hItem, int iColumn) const; - HIMAGELIST GetExtraImageList() const; - HFONT GetFont(int iFontId) const; - bool GetHideOfflineRoot() const; - int GetItemType(HANDLE hItem) const; - HANDLE GetNextItem(HANDLE hItem, uint32_t flags) const; - HANDLE GetSelection() const; - HANDLE HitTest(int x, int y, uint32_t *hitTest) const; - void SelectItem(HANDLE hItem); - void SetBkColor(COLORREF clBack); - void SetCheck(HANDLE hItem, bool check); - void SetExStyle(uint32_t exStyle); - void SetExtraColumns(int iColumns); - void SetExtraImage(HANDLE hItem, int iColumn, int iImage); - void SetExtraImageList(HIMAGELIST hImgList); - void SetFont(int iFontId, HANDLE hFont, bool bRedraw); - void SetItemText(HANDLE hItem, char *szText); - void SetHideEmptyGroups(bool state); - void SetHideOfflineRoot(bool state); - void SetOfflineModes(uint32_t modes); - void SetUseGroups(bool state); - - struct TEventInfo - { - CCtrlClc *ctrl; - NMCLISTCONTROL *info; - }; - - CCallback OnExpanded; - CCallback OnListRebuilt; - CCallback OnItemChecked; - CCallback OnDragging; - CCallback OnDropped; - CCallback OnListSizeChange; - CCallback OnOptionsChanged; - CCallback OnDragStop; - CCallback OnNewContact; - CCallback OnContactMoved; - CCallback OnCheckChanged; - CCallback OnClick; - -protected: - BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlCheck - -class MIR_CORE_EXPORT CCtrlCheck : public CCtrlData -{ - typedef CCtrlData CSuper; - -public: - CCtrlCheck(CDlgBase *dlg, int ctrlId); - BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t /*idCode*/) override; - - bool OnApply() override; - void OnReset() override; - - int GetState() const; - void SetState(int state); - - bool IsChecked(); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlColor - color picker - -class MIR_CORE_EXPORT CCtrlColor : public CCtrlData -{ - typedef CCtrlData CSuper; - -public: - CCtrlColor(CDlgBase *dlg, int ctrlId); - BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t /*idCode*/) override; - - bool OnApply() override; - void OnReset() override; - - uint32_t GetColor(); - void SetColor(uint32_t dwValue); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlDate - date & time picker - -class MIR_CORE_EXPORT CCtrlDate : public CCtrlData -{ - typedef CCtrlData CSuper; - - BOOL OnNotify(int, NMHDR*) override; - -public: - CCtrlDate(CDlgBase *dlg, int ctrlId); - - void GetTime(SYSTEMTIME*); - void SetTime(SYSTEMTIME*); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlEdit - -class MIR_CORE_EXPORT CCtrlEdit : public CCtrlData -{ - typedef CCtrlData CSuper; - -public: - CCtrlEdit(CDlgBase *dlg, int ctrlId); - BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t idCode) override; - - bool OnApply() override; - void OnReset() override; - - void SetMaxLength(unsigned int len); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlRichEdit - -class MIR_CORE_EXPORT CCtrlRichEdit : public CCtrlEdit -{ - typedef CCtrlEdit CSuper; - -public: - CCtrlRichEdit(CDlgBase *dlg, int ctrlId); - - // returns text length in bytes if a parameter is omitted or in symbols, if not - int GetRichTextLength(int iCodePage = CP_ACP) const; - - // returns a buffer that should be freed using mir_free() or ptrA/ptrW - char* GetRichTextRtf(bool bText = false, bool bSelection = false) const; // returns text with formatting - wchar_t* GetRichText() const; // returns only text in ucs2 - - // these methods return text length in Unicode chars - int SetRichText(const wchar_t *text); - int SetRichTextRtf(const char *text); - - // enables or disables content editing - void SetReadOnly(bool bReadOnly); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlSlider - -class MIR_CORE_EXPORT CCtrlSlider : public CCtrlData -{ - typedef CCtrlData CSuper; - - int m_wMin, m_wMax; - -protected: - BOOL OnCommand(MWindow hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; - -public: - CCtrlSlider(CDlgBase *dlg, int ctrlId, int max = 100, int min = 0); - - bool OnApply() override; - void OnReset() override; - - int GetPosition() const; - void SetPosition(int pos); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlSpin - -class MIR_CORE_EXPORT CCtrlSpin : public CCtrlData -{ - typedef CCtrlData CSuper; - - int16_t m_wMin, m_wMax, m_wCurr; - - BOOL OnNotify(int, NMHDR*) override; - -public: - CCtrlSpin(CDlgBase *dlg, int ctrlId, int16_t max = 100, int16_t min = 0); - - bool OnApply() override; - void OnReset() override; - - int16_t GetPosition(); - void SetPosition(int16_t pos); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlListBox - -class MIR_CORE_EXPORT CCtrlListBox : public CCtrlBase -{ - typedef CCtrlBase CSuper; - -public: - CCtrlListBox(CDlgBase *dlg, int ctrlId); - - int AddString(const wchar_t *text, LPARAM data=0); - void DeleteString(int index); - int FindString(const wchar_t *str, int index = -1, bool exact = false); - int GetCount() const; - int GetCurSel() const; - LPARAM GetItemData(int index) const; - int GetItemRect(int index, RECT *pResult) const; - wchar_t* GetItemText(int index) const; - wchar_t* GetItemText(int index, wchar_t *buf, int size) const; - bool GetSel(int index) const; - int GetSelCount() const; - int* GetSelItems(int *items, int count) const; - int* GetSelItems() const; - int InsertString(const wchar_t *text, int pos, LPARAM data=0); - void ResetContent(); - int SelectString(const wchar_t *str); - int SetCurSel(int index); - void SetItemData(int index, LPARAM data); - void SetItemHeight(int index, int iHeight); - void SetSel(int index, bool sel = true); - - // Events - CCallback OnDblClick; - CCallback OnSelCancel; - CCallback OnSelChange; - -protected: - BOOL OnCommand(MWindow hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; - void GetCaretPos(CContextMenuPos&) const override; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlCombo - -class MIR_CORE_EXPORT CCtrlCombo : public CCtrlData -{ - typedef CCtrlData CSuper; - -public: - CCtrlCombo(CDlgBase *dlg, int ctrlId); - - BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t idCode) override; - void OnInit() override; - bool OnApply() override; - void OnReset() override; - - // returns item data associated with the selected item or -1 - LPARAM GetCurData() const; - - // selects line with userdata passed. returns index of this line or -1 - int SelectData(LPARAM data); - - // Control interface - int AddString(const wchar_t *text, LPARAM data = 0); - int AddStringA(const char *text, LPARAM data = 0); - void DeleteString(int index); - int FindString(const wchar_t *str, int index = -1, bool exact = false); - int FindStringA(const char *str, int index = -1, bool exact = false); - int GetCount() const; - int GetCurSel() const; - bool GetDroppedState() const; - LPARAM GetItemData(int index) const; - wchar_t* GetItemText(int index) const; - wchar_t* GetItemText(int index, wchar_t *buf, int size) const; - int InsertString(const wchar_t *text, int pos, LPARAM data=0); - void ResetContent(); - int SelectString(const wchar_t *str); - int SetCurSel(int index); - void SetItemData(int index, LPARAM data); - void ShowDropdown(bool show = true); - - // Events - CCallback OnCloseup; - CCallback OnDropdown; - CCallback OnKillFocus; - CCallback OnSelChanged; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlListView - -class MIR_CORE_EXPORT CCtrlListView : public CCtrlBase -{ - typedef CCtrlBase CSuper; - -public: - CCtrlListView(CDlgBase *dlg, int ctrlId); - - // direction = -1 or 1. returns new item index - int MoveItem(int idx, int direction); - - void SetCurSel(int idx); - - // Classic LV interface - uint32_t ApproximateViewRect(int cx, int cy, int iCount); - void Arrange(UINT code); - void CancelEditLabel(); - HIMAGELIST CreateDragImage(int iItem, POINT *lpptUpLeft); - void DeleteAllItems(); - void DeleteColumn(int iCol); - void DeleteItem(int iItem); - MWindow EditLabel(int iItem); - int EnableGroupView(BOOL fEnable); - BOOL EnsureVisible(int i, BOOL fPartialOK); - int FindItem(int iStart, const LVFINDINFO *plvfi); - COLORREF GetBkColor() const; - void GetBkImage(LVBKIMAGE *plvbki) const; - UINT GetCallbackMask() const; - BOOL GetCheckState(UINT iIndex) const; - void GetColumn(int iCol, LVCOLUMN *pcol) const; - void GetColumnOrderArray(int iCount, int *lpiArray) const; - int GetColumnWidth(int iCol) const; - int GetCountPerPage() const; - MWindow GetEditControl() const; - uint32_t GetExtendedListViewStyle() const; - int GetFocusedGroup() const; - int GetGroupCount() const; - void GetGroupInfo(int iGroupId, LVGROUP *pgrp) const; - void GetGroupInfoByIndex(int iIndex, LVGROUP *pgrp) const; - void GetGroupMetrics(LVGROUPMETRICS *pGroupMetrics) const; - UINT GetGroupState(UINT dwGroupId, UINT dwMask) const; - MWindow GetHeader() const; - HCURSOR GetHotCursor() const; - int GetHotItem() const; - uint32_t GetHoverTime() const; - HIMAGELIST GetImageList(int iImageList) const; - BOOL GetInsertMark(LVINSERTMARK *plvim) const; - COLORREF GetInsertMarkColor() const; - int GetInsertMarkRect(RECT *prc) const; - BOOL GetISearchString(LPSTR lpsz) const; - bool GetItem(LVITEM *pitem) const; - int GetItemCount() const; - void GetItemPosition(int i, POINT *ppt) const; - void GetItemRect(int i, RECT *prc, int code) const; - uint32_t GetItemSpacing(BOOL fSmall) const; - UINT GetItemState(int i, UINT mask) const; - void GetItemText(int iItem, int iSubItem, LPTSTR pszText, int cchTextMax) const; - int GetNextItem(int iStart, UINT flags) const; - BOOL GetNumberOfWorkAreas(UINT *lpuWorkAreas) const; - BOOL GetOrigin(POINT *lpptOrg) const; - COLORREF GetOutlineColor() const; - UINT GetSelectedColumn() const; - UINT GetSelectedCount() const; - int GetSelectionMark() const; - int GetStringWidth(LPCSTR psz) const; - BOOL GetSubItemRect(int iItem, int iSubItem, int code, RECT *lpRect) const; - COLORREF GetTextBkColor() const; - COLORREF GetTextColor() const; - void GetTileInfo(LVTILEINFO *plvtinfo) const; - void GetTileViewInfo(LVTILEVIEWINFO *plvtvinfo) const; - MWindow GetToolTips() const; - int GetTopIndex() const; - BOOL GetUnicodeFormat() const; - uint32_t GetView() const; - BOOL GetViewRect(RECT *prc) const; - void GetWorkAreas(int nWorkAreas, RECT *lprc) const; - BOOL HasGroup(int dwGroupId); - int HitTest(LVHITTESTINFO *pinfo) const; - int HitTestEx(LVHITTESTINFO *pinfo); - int InsertColumn(int iCol, const LVCOLUMN *pcol); - int InsertGroup(int index, LVGROUP *pgrp); - void InsertGroupSorted(LVINSERTGROUPSORTED *structInsert); - int InsertItem(const LVITEM *pitem); - BOOL InsertMarkHitTest(POINT *point, LVINSERTMARK *plvim); - BOOL IsGroupViewEnabled(); - UINT IsItemVisible(UINT index); - UINT MapIDToIndex(UINT id); - UINT MapIndexToID(UINT index); - BOOL RedrawItems(int iFirst, int iLast); - void RemoveAllGroups(); - int RemoveGroup(int iGroupId); - BOOL Scroll(int dx, int dy); - BOOL SetBkColor(COLORREF clrBk); - BOOL SetBkImage(LVBKIMAGE *plvbki); - BOOL SetCallbackMask(UINT mask); - void SetCheckState(UINT iIndex, BOOL fCheck); - BOOL SetColumn(int iCol, LVCOLUMN *pcol); - BOOL SetColumnOrderArray(int iCount, int *lpiArray); - BOOL SetColumnWidth(int iCol, int cx); - void SetExtendedListViewStyle(uint32_t dwExStyle); - void SetExtendedListViewStyleEx(uint32_t dwExMask, uint32_t dwExStyle); - int SetGroupInfo(int iGroupId, LVGROUP *pgrp); - void SetGroupMetrics(LVGROUPMETRICS *pGroupMetrics); - void SetGroupState(UINT dwGroupId, UINT dwMask, UINT dwState); - HCURSOR SetHotCursor(HCURSOR hCursor); - int SetHotItem(int iIndex); - void SetHoverTime(uint32_t dwHoverTime); - uint32_t SetIconSpacing(int cx, int cy); - HIMAGELIST SetImageList(HIMAGELIST himl, int iImageList); - BOOL SetInfoTip(LVSETINFOTIP *plvSetInfoTip); - BOOL SetInsertMark(LVINSERTMARK *plvim); - COLORREF SetInsertMarkColor(COLORREF color); - BOOL SetItem(const LVITEM *pitem); - void SetItemCount(int cItems); - void SetItemCountEx(int cItems, uint32_t dwFlags); - BOOL SetItemPosition(int i, int x, int y); - void SetItemPosition32(int iItem, int x, int y); - void SetItemState(int i, UINT state, UINT mask); - void SetItemText(int i, int iSubItem, const wchar_t *pszText); - COLORREF SetOutlineColor(COLORREF color); - void SetSelectedColumn(int iCol); - int SetSelectionMark(int iIndex); - BOOL SetTextBkColor(COLORREF clrText); - BOOL SetTextColor(COLORREF clrText); - BOOL SetTileInfo(LVTILEINFO *plvtinfo); - BOOL SetTileViewInfo(LVTILEVIEWINFO *plvtvinfo); - MWindow SetToolTips(MWindow ToolTip); - BOOL SetUnicodeFormat(BOOL fUnicode); - int SetView(uint32_t iView); - void SetWorkAreas(int nWorkAreas, RECT *lprc); - int SubItemHitTest(LVHITTESTINFO *pInfo) const; - int SubItemHitTestEx(LVHITTESTINFO *plvhti); - BOOL Update(int iItem); - - #ifdef _MSC_VER - int SortGroups(PFNLVGROUPCOMPARE pfnGroupCompare, LPVOID plv); - BOOL SortItems(PFNLVCOMPARE pfnCompare, LPARAM lParamSort); - BOOL SortItemsEx(PFNLVCOMPARE pfnCompare, LPARAM lParamSort); - #endif // _MSC_VER - - // Additional APIs - HIMAGELIST CreateImageList(int iImageList); - void AddColumn(int iSubItem, const wchar_t *name, int cx); - void AddGroup(int iGroupId, const wchar_t *name); - int AddItem(const wchar_t *text, int iIcon, LPARAM lParam = 0, int iGroupId = -1); - void SetItem(int iItem, int iSubItem, const wchar_t *text, int iIcon = -1); - LPARAM GetItemData(int iItem) const; - - // Events - struct TEventInfo { - CCtrlListView *treeviewctrl; - union { - NMHDR *nmhdr; - NMLISTVIEW *nmlv; - NMLVDISPINFO *nmlvdi; - NMLVSCROLL *nmlvscr; - NMLVGETINFOTIP *nmlvit; - NMLVFINDITEM *nmlvfi; - NMITEMACTIVATE *nmlvia; - NMLVKEYDOWN *nmlvkey; - NMLVCUSTOMDRAW *nmcd; - }; - }; - - CCallback OnBeginDrag; - CCallback OnBeginLabelEdit; - CCallback OnBeginRDrag; - CCallback OnBeginScroll; - CCallback OnColumnClick; - CCallback OnCustomDraw; - CCallback OnDeleteAllItems; - CCallback OnDeleteItem; - CCallback OnClick; - CCallback OnDoubleClick; - CCallback OnEndLabelEdit; - CCallback OnEndScroll; - CCallback OnGetDispInfo; - CCallback OnGetInfoTip; - CCallback OnHotTrack; - CCallback OnIncrementalSearch; - CCallback OnInsertItem; - CCallback OnItemActivate; - CCallback OnItemChanged; - CCallback OnItemChanging; - CCallback OnKeyDown; - CCallback OnMarqueeBegin; - CCallback OnSetDispInfo; - -protected: - BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; - void GetCaretPos(CContextMenuPos&) const override; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlTreeView - -#undef GetNextSibling -#undef GetPrevSibling - -#define MTREE_CHECKBOX 0x0001 -#define MTREE_DND 0x0002 -#define MTREE_MULTISELECT 0x0004 - -class MIR_CORE_EXPORT CCtrlTreeView : public CCtrlBase -{ - typedef CCtrlBase CSuper; - - HTREEITEM MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter, HTREEITEM hParent); - -public: - CCtrlTreeView(CDlgBase *dlg, int ctrlId); - - void SetFlags(uint32_t dwFlags); // MTREE_* combination - - // Classic TV interface - HIMAGELIST CreateDragImage(HTREEITEM hItem); - void DeleteAllItems(); - void DeleteItem(HTREEITEM hItem); - MWindow EditLabel(HTREEITEM hItem); - void EndEditLabelNow(BOOL cancel); - void EnsureVisible(HTREEITEM hItem); - void Expand(HTREEITEM hItem, uint32_t flag); - COLORREF GetBkColor() const; - uint32_t GetCheckState(HTREEITEM hItem) const; - HTREEITEM GetChild(HTREEITEM hItem) const; - int GetCount() const; - HTREEITEM GetDropHilight() const; - MWindow GetEditControl() const; - HTREEITEM GetFirstVisible() const; - HIMAGELIST GetImageList(int iImage) const; - int GetIndent() const; - COLORREF GetInsertMarkColor() const; - bool GetItem(TVITEMEX *tvi) const; - int GetItemHeight() const; - void GetItemRect(HTREEITEM hItem, RECT *rcItem, BOOL fItemRect) const; - uint32_t GetItemState(HTREEITEM hItem, uint32_t stateMask) const; - HTREEITEM GetLastVisible() const; - COLORREF GetLineColor() const; - HTREEITEM GetNextItem(HTREEITEM hItem, uint32_t flag) const; - HTREEITEM GetNextSibling(HTREEITEM hItem) const; - HTREEITEM GetNextVisible(HTREEITEM hItem) const; - HTREEITEM GetParent(HTREEITEM hItem) const; - HTREEITEM GetPrevSibling(HTREEITEM hItem) const; - HTREEITEM GetPrevVisible(HTREEITEM hItem) const; - HTREEITEM GetRoot() const; - uint32_t GetScrollTime() const; - HTREEITEM GetSelection() const; - COLORREF GetTextColor() const; - MWindow GetToolTips() const; - BOOL GetUnicodeFormat() const; - unsigned GetVisibleCount() const; - HTREEITEM HitTest(TVHITTESTINFO *hti) const; - HTREEITEM InsertItem(TVINSERTSTRUCT *tvis); - void Select(HTREEITEM hItem, uint32_t flag); - void SelectDropTarget(HTREEITEM hItem); - void SelectItem(HTREEITEM hItem); - void SelectSetFirstVisible(HTREEITEM hItem); - COLORREF SetBkColor(COLORREF clBack); - void SetCheckState(HTREEITEM hItem, uint32_t state); - HIMAGELIST SetImageList(HIMAGELIST hIml, int iImage); - void SetIndent(int iIndent); - void SetInsertMark(HTREEITEM hItem, BOOL fAfter); - COLORREF SetInsertMarkColor(COLORREF clMark); - void SetItem(TVITEMEX *tvi); - void SetItemHeight(short cyItem); - void SetItemState(HTREEITEM hItem, uint32_t state, uint32_t stateMask); - COLORREF SetLineColor(COLORREF clLine); - void SetScrollTime(UINT uMaxScrollTime); - COLORREF SetTextColor(COLORREF clText); - MWindow SetToolTips(MWindow hwndToolTips); - BOOL SetUnicodeFormat(BOOL fUnicode); - void SortChildren(HTREEITEM hItem, BOOL fRecurse); - void SortChildrenCB(TVSORTCB *cb, BOOL fRecurse); - - // Additional stuff - void TranslateItem(HTREEITEM hItem); - void TranslateTree(); - HTREEITEM FindNamedItem(HTREEITEM hItem, const wchar_t *name); - void GetItem(HTREEITEM hItem, TVITEMEX *tvi) const; - void GetItem(HTREEITEM hItem, TVITEMEX *tvi, wchar_t *szText, int iTextLength) const; - void InvertCheck(HTREEITEM hItem); - - bool IsSelected(HTREEITEM hItem); - int GetNumSelected(); - void GetSelected(LIST<_TREEITEM> &selected); - - void Select(HTREEITEM hItem); - void Select(LIST<_TREEITEM> &selected); - void SelectAll(); - void SelectRange(HTREEITEM hStart, HTREEITEM hEnd); - - void Unselect(HTREEITEM hItem); - void UnselectAll(); - - void DropHilite(HTREEITEM hItem); - void DropUnhilite(HTREEITEM hItem); - - // Events - struct TEventInfo { - CCtrlTreeView *treeviewctrl; - union { - NMHDR *nmhdr; - NMTREEVIEW *nmtv; - NMTVKEYDOWN *nmtvkey; - NMTVDISPINFO *nmtvdi; - NMTVGETINFOTIP *nmtvit; - NMTVCUSTOMDRAW *nmcd; - HTREEITEM hItem; // for OnItemChanged - }; - }; - - CCallback OnBeginDrag; - CCallback OnBeginLabelEdit; - CCallback OnBeginRDrag; - CCallback OnCustomDraw; - CCallback OnDeleteItem; - CCallback OnEndLabelEdit; - CCallback OnGetDispInfo; - CCallback OnGetInfoTip; - CCallback OnItemChanged; - CCallback OnItemExpanded; - CCallback OnItemExpanding; - CCallback OnKeyDown; - CCallback OnRightClick; - CCallback OnSelChanged; - CCallback OnSelChanging; - CCallback OnSetDispInfo; - CCallback OnSingleExpand; - -protected: - void OnInit() override; - BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; - - void GetCaretPos(CContextMenuPos&) const override; - LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) override; - - union { - uint32_t m_dwFlags; - struct { - bool m_bDndEnabled : 1; - bool m_bDragging : 1; - bool m_bCheckBox : 1; - bool m_bMultiSelect : 1; - }; - }; - HTREEITEM m_hDragItem; // valid if m_bDragging == true -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlTreeOpts - array of options with sections - -class MIR_CORE_EXPORT CCtrlTreeOpts : public CCtrlTreeView -{ - typedef CCtrlTreeView CSuper; - -public: - CCtrlTreeOpts(CDlgBase *dlg, int ctrlId); - ~CCtrlTreeOpts(); - - void AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, CMOption &option); - void AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, bool &option); - void AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, uint32_t &option, uint32_t mask); - - BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; - void OnDestroy() override; - void OnInit() override; - bool OnApply() override; - -protected: - struct COptionsItem - { - const wchar_t *m_pwszSection, *m_pwszName; - - union - { - CMOption *m_option; - bool *m_pBool; - struct - { - uint32_t *m_pDword; - uint32_t m_mask; - }; - }; - - HTREEITEM m_hItem = nullptr; - enum OptionItemType { CMOPTION = 1, BOOL = 2, MASK = 3 }; - OptionItemType m_type; - - COptionsItem(const wchar_t *pwszSection, const wchar_t *pwszName, OptionItemType type) : - m_pwszSection(pwszSection), - m_pwszName(pwszName), - m_type(type) - {} - }; - - OBJLIST m_options; - - void ProcessItemClick(HTREEITEM hti); -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlPages - -#define PSN_INFOCHANGED 1 - -// force-send a PSN_INFOCHANGED to all pages -#define PSM_FORCECHANGED (WM_USER+100) - -class MIR_CORE_EXPORT CCtrlPages : public CCtrlBase -{ - typedef CCtrlBase CSuper; - - HIMAGELIST m_hIml; - CDlgBase *m_pActivePage; - int m_numRows = 1; - - struct TPageInfo; - void InsertPage(TPageInfo *pPage); - void ShowPage(CDlgBase *pDlg); - - void CheckRowCount(); - TPageInfo* GetCurrPage(); - TPageInfo* GetItemPage(int iPage); - LIST m_pages; - -public: - CCtrlPages(CDlgBase *dlg, int ctrlId); - - void AddPage(const wchar_t *ptszName, HICON hIcon, CDlgBase *pDlg); - void ActivatePage(int iPage); - int GetCount(void); - int GetDlgIndex(CDlgBase*); - void RemovePage(int iPage); - void SwapPages(int idx1, int idx2); - - CDlgBase* GetNthPage(int iPage); - - __forceinline CDlgBase* GetActivePage() const - { return m_pActivePage; - } - -protected: - BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; - - void OnInit() override; - void OnDestroy() override; - - bool OnApply() override; - void OnReset() override; - - LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) override; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// CProtoDlgBase - -#define WM_PROTO_REFRESH (WM_USER + 100) -#define WM_PROTO_CHECK_ONLINE (WM_USER + 101) -#define WM_PROTO_ACTIVATE (WM_USER + 102) -#define WM_PROTO_LAST (WM_USER + 200) - -struct PROTO_INTERFACE; - -class MIR_APP_EXPORT CProtoIntDlgBase : public CDlgBase -{ - typedef CDlgBase CSuper; - -public: - CProtoIntDlgBase(PROTO_INTERFACE *proto, int idDialog); - - void CreateLink(CCtrlData &ctrl, const char *szSetting, uint8_t type, uint32_t iValue); - void CreateLink(CCtrlData &ctrl, const char *szSetting, wchar_t *szValue); - - template - __inline void CreateLink(CCtrlData &ctrl, CMOption &option) - { - ctrl.CreateDbLink(new CMOptionLink(option)); - } - - __inline PROTO_INTERFACE *GetProtoInterface() { return m_proto_interface; } - - void SetStatusText(const wchar_t *statusText); - -protected: - PROTO_INTERFACE *m_proto_interface; - MWindow m_hwndStatus = nullptr; - - INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override; - - virtual void OnProtoRefresh(WPARAM, LPARAM); - virtual void OnProtoActivate(WPARAM, LPARAM); - virtual void OnProtoCheckOnline(WPARAM, LPARAM); - -private: - void UpdateStatusBar(); -}; - -template -class CProtoDlgBase : public CProtoIntDlgBase -{ - typedef CProtoIntDlgBase CSuper; - -public: - __inline CProtoDlgBase(TProto *proto, int idDialog) : - CProtoIntDlgBase(proto, idDialog), - m_proto(proto) - { - } - - __inline TProto *GetProto() { return m_proto; } - -protected: - TProto* m_proto; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// Safe open/close dialogs -#define UI_SAFE_OPEN(dlgClass, dlgPtr) \ - { \ - if (dlgPtr) \ - { \ - SetForegroundWindow((dlgPtr)->GetHwnd()); \ - } else \ - { \ - (dlgPtr) = new dlgClass(this); \ - (dlgPtr)->Show(); \ - } \ - } - -#define UI_SAFE_OPEN_EX(dlgClass, dlgPtr, dlgLocal) \ - if (dlgPtr) \ - { \ - ::SetForegroundWindow((dlgPtr)->GetHwnd()); \ - } else \ - { \ - (dlgPtr) = new dlgClass(this); \ - (dlgPtr)->Show(); \ - } \ - dlgClass *dlgLocal = (dlgClass *)(dlgPtr); - -#define UI_SAFE_CLOSE(dlg) \ - { \ - if (dlg) { \ - (dlg)->Close(); \ - (dlg) = NULL; \ - } \ - } - -#define UI_SAFE_CLOSE_HWND(hwnd) \ - { \ - if (hwnd) { \ - ::SendMessage((hwnd), WM_CLOSE, 0, 0); \ - (hwnd) = NULL; \ - } \ - } - -///////////////////////////////////////////////////////////////////////////////////////// -// NULL-Safe dialog notifications -#define UI_SAFE_NOTIFY(dlg, msg) \ - { \ - if (dlg) \ - ::SendMessage((dlg)->GetHwnd(), msg, 0, 0); \ - } - -#define UI_SAFE_NOTIFY_HWND(hwnd, msg) \ - { \ - if (hwnd) \ - ::SendMessage((hwnd), msg, 0, 0); \ - } - -///////////////////////////////////////////////////////////////////////////////////////// -// Define message maps -#define UI_MESSAGE_MAP(dlgClass, baseDlgClass) \ - typedef baseDlgClass CMessageMapSuperClass; \ - virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) \ - { \ - switch (msg) \ - { \ - case 0: \ - break /* just to handle ";" symbol after macro */ - -#define UI_MESSAGE(msg, proc) \ - case msg: \ - proc(msg, wParam, lParam); \ - break - -#define UI_MESSAGE_EX(msg, func) \ - case msg: \ - return func(msg, wParam, lParam) - -#define UI_POSTPROCESS_MESSAGE(msg, proc) \ - case msg: \ - CMessageMapSuperClass::DlgProc(msg, wParam, lParam); \ - return FALSE - -#define UI_POSTPROCESS_MESSAGE_EX(msg, func) \ - case msg: \ - CMessageMapSuperClass::DlgProc(msg, wParam, lParam); \ - return func(msg, wParam, lParam) - -#define UI_MESSAGE_MAP_END() \ - } \ - return CMessageMapSuperClass::DlgProc(msg, wParam, lParam); \ - } - -#endif // __M_GUI_H +/* + +Jabber Protocol Plugin for Miranda NG + +Copyright (c) 2002-04 Santithorn Bunchua +Copyright (c) 2005-12 George Hazan +Copyright (c) 2007-09 Maxim Mluhov +Copyright (c) 2007-09 Victor Pavlychko +Copyright (C) 2012-23 Miranda NG team + +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. + +*/ + +#pragma once + +#ifndef __M_GUI_H +#define __M_GUI_H + +#ifdef _MSC_VER + #include +#endif // _WINDOWS + +#include +#include +#include + +#pragma warning(disable:4355 4251 4481) + +///////////////////////////////////////////////////////////////////////////////////////// +// helpers for the option's visualization + +template +struct CMDBTraits +{ +}; + +template<> +struct CMDBTraits<1> +{ + typedef uint8_t DBType; + enum { DBTypeId = DBVT_BYTE }; + static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) + { + return db_get_b(0, szModule, szSetting, value); + } + static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) + { + db_set_b(0, szModule, szSetting, value); + } +}; + +template<> +struct CMDBTraits<2> +{ + typedef uint16_t DBType; + enum { DBTypeId = DBVT_WORD }; + static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) + { + return db_get_w(0, szModule, szSetting, value); + } + static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) + { + db_set_w(0, szModule, szSetting, value); + } +}; + +template<> +struct CMDBTraits<4> +{ + typedef uint32_t DBType; + enum { DBTypeId = DBVT_DWORD }; + static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) + { + return db_get_dw(0, szModule, szSetting, value); + } + static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) + { + db_set_dw(0, szModule, szSetting, value); + } +}; + +template<> +struct CMDBTraits<8> +{ + typedef uint32_t DBType; + enum { DBTypeId = DBVT_DWORD }; + static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) + { + return db_get_dw(0, szModule, szSetting, value); + } + static __forceinline void Set(const char *szModule, const char *szSetting, DBType value) + { + db_set_dw(0, szModule, szSetting, value); + } +}; + +class CMOptionBase : public MNonCopyable +{ +public: + __forceinline const char* GetDBModuleName() const { return m_szModuleName; } + __forceinline const char* GetDBSettingName() const { return m_szSetting; } + + __forceinline void Delete() const + { db_unset(0, m_szModuleName, m_szSetting); + } + +protected: + __forceinline CMOptionBase(PROTO_INTERFACE *proto, const char *szSetting) : + m_szModuleName(proto->m_szModuleName), m_szSetting(szSetting) + {} + + __forceinline CMOptionBase(const char *module, const char *szSetting) : + m_szModuleName(module), m_szSetting(szSetting) + {} + + const char *m_szModuleName; + const char *m_szSetting; +}; + +template +class CMOption : public CMOptionBase +{ +public: + typedef T Type; + + __forceinline CMOption(PROTO_INTERFACE *proto, const char *szSetting, Type defValue) : + CMOptionBase(proto, szSetting), m_default(defValue) + {} + + __forceinline CMOption(const char *szModule, const char *szSetting, Type defValue) : + CMOptionBase(szModule, szSetting), m_default(defValue) + {} + + __forceinline Type Default() const + { + return m_default; + } + + __forceinline operator Type() + { + return (Type)CMDBTraits::Get(m_szModuleName, m_szSetting, m_default); + } + + __forceinline Type operator= (Type value) + { + #ifdef _MSC_VER + CMDBTraits::Set(m_szModuleName, m_szSetting, (CMDBTraits::DBType)value); + #else + CMDBTraits::Set(m_szModuleName, m_szSetting, value); + #endif + return value; + } + +private: + Type m_default; +}; + +template<> +class CMOption : public CMOptionBase +{ +public: + + typedef char Type; + + __forceinline CMOption(PROTO_INTERFACE *proto, const char *szSetting, const Type *defValue = nullptr) : + CMOptionBase(proto, szSetting), m_default(defValue) + {} + + __forceinline CMOption(const char *szModule, const char *szSetting, const Type *defValue = nullptr) : + CMOptionBase(szModule, szSetting), m_default(defValue) + {} + + __forceinline const Type* Default() const + { + return m_default; + } + + __forceinline operator Type*() + { + m_value = db_get_sa(0, m_szModuleName, m_szSetting); + if (!m_value) m_value = mir_strdup(m_default); + return m_value; + } + + __forceinline Type* operator= (Type *value) + { + db_set_s(0, m_szModuleName, m_szSetting, value); + return value; + } + +private: + const Type *m_default; + mir_ptr m_value; +}; + +template<> +class CMOption : public CMOptionBase +{ +public: + + typedef wchar_t Type; + + __forceinline CMOption(PROTO_INTERFACE *proto, const char *szSetting, const Type *defValue = nullptr) : + CMOptionBase(proto, szSetting), m_default(defValue) + {} + + __forceinline CMOption(const char *szModule, const char *szSetting, const Type *defValue = nullptr) : + CMOptionBase(szModule, szSetting), m_default(defValue) + {} + + __forceinline const Type* Default() const + { + return m_default; + } + + __forceinline operator Type*() + { + m_value = db_get_wsa(0, m_szModuleName, m_szSetting); + if (!m_value) m_value = mir_wstrdup(m_default); + return m_value; + } + + __forceinline const Type* operator= (const Type *value) + { + db_set_ws(0, m_szModuleName, m_szSetting, value); + return value; + } + +private: + const Type *m_default; + mir_ptr m_value; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CDbLink + +class MIR_CORE_EXPORT CDataLink +{ +protected: + uint8_t m_type; + +public: + __inline CDataLink(uint8_t type) : m_type(type) {} + virtual ~CDataLink() {} + + __inline uint8_t GetDataType() const { return m_type; } + + virtual uint32_t LoadInt() = 0; + virtual void SaveInt(uint32_t value) = 0; + + virtual wchar_t* LoadText() = 0; + virtual void SaveText(wchar_t *value) = 0; +}; + +class MIR_CORE_EXPORT CDbLink : public CDataLink +{ + char *m_szModule; + char *m_szSetting; + + uint32_t m_iDefault; + wchar_t *m_szDefault; + + DBVARIANT dbv; + +public: + CDbLink(const char *szModule, const char *szSetting, uint8_t type, uint32_t iValue); + CDbLink(const char *szModule, const char *szSetting, uint8_t type, wchar_t *szValue); + ~CDbLink(); + + uint32_t LoadInt() override; + void SaveInt(uint32_t value) override; + + wchar_t* LoadText() override; + void SaveText(wchar_t *value) override; +}; + +template +class CMOptionLink : public CDataLink +{ +private: + CMOption *m_option; + +public: + __forceinline CMOptionLink(CMOption &option) : + CDataLink(CMDBTraits::DBTypeId), m_option(&option) + {} + + __forceinline uint32_t LoadInt() override { return (uint32_t)(T)*m_option; } + __forceinline void SaveInt(uint32_t value) override { *m_option = (T)value; } + + __forceinline wchar_t* LoadText() override { return nullptr; } + __forceinline void SaveText(wchar_t*) override {} +}; + +template<> +class CMOptionLink : public CDataLink +{ +private: + typedef wchar_t *T; + CMOption *m_option; + +public: + __forceinline CMOptionLink(CMOption &option) : + CDataLink(DBVT_WCHAR), m_option(&option) + {} + + __forceinline uint32_t LoadInt() override { return 0; } + __forceinline void SaveInt(uint32_t) override { } + + __forceinline wchar_t* LoadText() override { return *m_option; } + __forceinline void SaveText(wchar_t *value) override { *m_option = value; } +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlBase + +struct CContextMenuPos +{ + const class CCtrlBase *pCtrl; + POINT pt; + union { + int iCurr; // int for list boxes + HTREEITEM hItem; + }; +}; + +class MIR_CORE_EXPORT CCtrlBase +{ + friend class CDlgBase; + + __forceinline CCtrlBase(const CCtrlBase&) = delete; + __forceinline CCtrlBase& operator=(const CCtrlBase&) = delete; + +public: + CCtrlBase(CDlgBase *wnd, int idCtrl); + virtual ~CCtrlBase(); + + __forceinline MWindow GetHwnd() const { return m_hwnd; } + __forceinline int GetCtrlId() const { return m_idCtrl; } + __forceinline CDlgBase *GetParent() const { return m_parentWnd; } + __forceinline bool IsChanged() const { return m_bChanged; } + __forceinline void SetSilent(bool bSilent = true) { m_bSilent = bSilent; } + __forceinline void UseSystemColors() { m_bUseSystemColors = true; } + + void Show(bool bShow = true); + __forceinline void Hide() { Show(false); } + + void Enable(bool bIsEnable = true); + __forceinline void Disable() { Enable(false); } + bool Enabled(void) const; + + void NotifyChange(); + void SetDraw(bool bEnable); + + LRESULT SendMsg(UINT Msg, WPARAM wParam, LPARAM lParam) const; + + void SetText(const wchar_t *text); + void SetTextA(const char *text); + void SetInt(int value); + + wchar_t* GetText() const; + char* GetTextA() const; + char* GetTextU() const; + + wchar_t* GetText(wchar_t *buf, size_t size) const; + char* GetTextA(char *buf, size_t size) const; + char* GetTextU(char *buf, size_t size) const; + + int GetInt() const; + + virtual BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t /*idCode*/) { return FALSE; } + virtual BOOL OnNotify(int /*idCtrl*/, NMHDR* /*pnmh*/) { return FALSE; } + + virtual BOOL OnMeasureItem(MEASUREITEMSTRUCT*) { return FALSE; } + virtual BOOL OnDrawItem(DRAWITEMSTRUCT*) { return FALSE; } + virtual BOOL OnDeleteItem(DELETEITEMSTRUCT*) { return FALSE; } + + virtual void OnInit(); + virtual void OnDestroy(); + + virtual bool OnApply(); + virtual void OnReset(); + +protected: + MWindow m_hwnd = nullptr; // must be the first data item + int m_idCtrl; + bool m_bChanged = false, m_bSilent = false, m_bUseSystemColors = false, m_bNotifiable = false; + CDlgBase *m_parentWnd; + +public: + CCallback OnChange; + CCallback OnBuildMenu; + +protected: + virtual void GetCaretPos(CContextMenuPos&) const; + virtual LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam); + + void Subclass(); + void Unsubclass(); + +private: + static LRESULT CALLBACK GlobalSubclassWndProc(MWindow hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlData - data access controls base class + +class MIR_CORE_EXPORT CCtrlData : public CCtrlBase +{ + typedef CCtrlBase CSuper; + +public: + CCtrlData(CDlgBase *dlg, int ctrlId); + ~CCtrlData(); + + void CreateDbLink(const char* szModuleName, const char* szSetting, uint8_t type, uint32_t iValue); + void CreateDbLink(const char* szModuleName, const char* szSetting, wchar_t* szValue); + void CreateDbLink(CDataLink *link) { m_dbLink = link; } + + void OnInit() override; + +protected: + CDataLink *m_dbLink; + + __inline uint8_t GetDataType() { return m_dbLink ? m_dbLink->GetDataType() : DBVT_DELETED; } + __inline uint32_t LoadInt() { return m_dbLink ? m_dbLink->LoadInt() : 0; } + __inline void SaveInt(uint32_t value) { if (m_dbLink) m_dbLink->SaveInt(value); } + __inline const wchar_t *LoadText() { return m_dbLink ? m_dbLink->LoadText() : L""; } + __inline void SaveText(wchar_t *value) { if (m_dbLink) m_dbLink->SaveText(value); } +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CDlgBase - base dialog class + +class MIR_CORE_EXPORT CDlgBase +{ + friend class CTimer; + friend class CCtrlBase; + friend class CCtrlData; + +public: + CDlgBase(class CMPluginBase &pPlug, int idDialog); + virtual ~CDlgBase(); + + // general utilities + void Close(); + void Resize(); + void Create(); + void Show(int nCmdShow = SW_SHOW); + int DoModal(); + void EndModal(INT_PTR nResult); + + class CCtrlBase* FindControl(int idCtrl); + class CCtrlBase* FindControl(MWindow hwnd); + + void SetCaption(const wchar_t *ptszCaption); + void SetDraw(bool bEnable); + void NotifyChange(void); // sends a notification to a parent window + + HINSTANCE GetInst() const; + + __forceinline MWindow GetHwnd() const { return m_hwnd; } + __forceinline void Hide() { Show(SW_HIDE); } + __forceinline bool IsInitialized() const { return m_bInitialized; } + __forceinline void SetMinSize(int x, int y) { m_iMinWidth = x, m_iMinHeight = y; } + __forceinline void SetParent(MWindow hwnd) { m_hwndParent = hwnd; } + + __forceinline CCtrlBase* operator[](int iControlId) { return FindControl(iControlId); } + + static CDlgBase* Find(MWindow hwnd); + +protected: + MWindow m_hwnd = nullptr; // must be the first data item + MWindow m_hwndParent = nullptr; + int m_idDialog; + + bool m_isModal = false; + bool m_bInitialized = false; + bool m_forceResizable = false; + bool m_bFixedSize; + bool m_bSucceeded = false; // was IDOK pressed or not + bool m_bExiting = false; // window received WM_CLOSE and gonna die soon + + enum { CLOSE_ON_OK = 0x1, CLOSE_ON_CANCEL = 0x2 }; + uint8_t m_autoClose; // automatically close dialog on IDOK/CANCEL commands. default: CLOSE_ON_OK|CLOSE_ON_CANCEL + + CMPluginBase &m_pPlugin; + + // override this handlers to provide custom functionality + // general messages + virtual bool OnInitDialog(); + virtual bool OnApply(); + virtual bool OnClose(); + virtual void OnDestroy(); + + virtual void OnTimer(class CTimer*); + + // miranda-related stuff + virtual int Resizer(UTILRESIZECONTROL *urc); + virtual void OnResize(); + virtual void OnReset(); + virtual void OnChange(); + + // main dialog procedure + virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam); + + CCallback m_OnFinishWizard; + + // register controls + void AddControl(CCtrlBase *ctrl); + void RemoveControl(CCtrlBase *ctrl); + + // timers + void AddTimer(CTimer *timer); + void RemoveTimer(UINT_PTR idEvent); + + // options support + void CreateLink(class CCtrlData& ctrl, const char *szSetting, uint8_t type, uint32_t iValue); + void CreateLink(class CCtrlData& ctrl, const char *szSetting, wchar_t *szValue); + + template + __inline void CreateLink(CCtrlData& ctrl, CMOption &option) + { + ctrl.CreateDbLink(new CMOptionLink(option)); + } + + // win32 stuff + void ThemeDialogBackground(BOOL tabbed); + +private: + LIST m_timers; + LIST m_controls; + + void NotifyControls(void (CCtrlBase::*fn)()); + bool VerifyControls(bool (CCtrlBase::*fn)()); + + CTimer* FindTimer(int idEvent); + int m_iMinWidth = -1, m_iMinHeight = -1; + + static BOOL CALLBACK GlobalFieldEnum(MWindow hwnd, LPARAM lParam); + static INT_PTR CALLBACK GlobalDlgProc(MWindow hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + static int GlobalDlgResizer(MWindow hwnd, LPARAM lParam, UTILRESIZECONTROL *urc); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CTimer + +class MIR_CORE_EXPORT CTimer +{ + friend class CDlgBase; + +public: + CTimer(CDlgBase* wnd, UINT_PTR idEvent); + ~CTimer(); + + __forceinline UINT_PTR GetEventId() const { return m_idEvent; } + __forceinline MWindow GetHwnd() const { return m_wnd->GetHwnd(); } + + virtual BOOL OnTimer(); + + void Start(int elapse); + bool Stop(); // returns true if timer was active + + void StartSafe(int elapse); + void StopSafe(); + + CCallback OnEvent; + +protected: + UINT_PTR m_idEvent; + CDlgBase* m_wnd; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlLabel + +class MIR_CORE_EXPORT CCtrlLabel : public CCtrlBase +{ + typedef CCtrlBase CSuper; + +public: + CCtrlLabel(CDlgBase *dlg, int ctrlId); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlButton + +class MIR_CORE_EXPORT CCtrlButton : public CCtrlBase +{ + typedef CCtrlBase CSuper; + +public: + CCtrlButton(CDlgBase *dlg, int ctrlId); + + BOOL OnCommand(MWindow hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; + + CCallback OnClick; + + void Click(); + bool IsPushed() const; + void Push(bool bPushed); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlMButton + +class MIR_CORE_EXPORT CCtrlMButton : public CCtrlButton +{ + typedef CCtrlButton CSuper; + +public: + CCtrlMButton(CDlgBase *dlg, int ctrlId, HICON hIcon, const char* tooltip); + CCtrlMButton(CDlgBase *dlg, int ctrlId, int iCoreIcon, const char* tooltip); + ~CCtrlMButton(); + + void MakeFlat(); + void MakePush(); + + void OnInit() override; + +protected: + HICON m_hIcon; + const char* m_toolTip; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CSplitter + +class MIR_CORE_EXPORT CSplitter : public CCtrlBase +{ + typedef CCtrlBase CSuper; + +public: + CSplitter(CDlgBase *dlg, int ctrlId); + + __forceinline int GetPos() const { return m_iPosition; } + +protected: + LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) override; + void OnInit() override; + + int m_iPosition; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlHyperlink + +class MIR_CORE_EXPORT CCtrlHyperlink : public CCtrlBase +{ + typedef CCtrlBase CSuper; + +public: + CCtrlHyperlink(CDlgBase *dlg, int ctrlId, const char* url = nullptr); + + BOOL OnCommand(MWindow hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; + + CCallback OnClick; + + void SetUrl(const char *url); + const char *GetUrl(); + +protected: + const char* m_url; + + void Default_OnClick(CCtrlHyperlink*); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CProgress + +class MIR_CORE_EXPORT CCtrlProgress : public CCtrlBase +{ +public: + CCtrlProgress(CDlgBase *dlg, int ctrlId); + + void SetRange(uint16_t max, uint16_t min = 0); + void SetPosition(uint16_t value); + void SetStep(uint16_t value); + uint16_t Move(uint16_t delta = 0); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlClc + +#if !defined(MGROUP) + typedef int MGROUP; +#endif + +class MIR_CORE_EXPORT CCtrlClc : public CCtrlBase +{ + typedef CCtrlBase CSuper; + +public: + CCtrlClc(CDlgBase *dlg, int ctrlId); + + void AddContact(MCONTACT hContact); + void AddGroup(HANDLE hGroup); + HANDLE AddInfoItem(CLCINFOITEM *cii); + void AutoRebuild(); + void DeleteItem(HANDLE hItem); + void EditLabel(HANDLE hItem); + void EndEditLabel(bool save); + void EnsureVisible(HANDLE hItem, bool partialOk); + void Expand(HANDLE hItem, uint32_t flags); + HANDLE FindContact(MCONTACT hContact); + HANDLE FindGroup(MGROUP hGroup); + COLORREF GetBkColor() const; + bool GetCheck(HANDLE hItem) const; + int GetCount() const; + MWindow GetEditControl() const; + uint32_t GetExStyle() const; + uint32_t GetExpand(HANDLE hItem) const; + int GetExtraColumns() const; + uint8_t GetExtraImage(HANDLE hItem, int iColumn) const; + HIMAGELIST GetExtraImageList() const; + HFONT GetFont(int iFontId) const; + bool GetHideOfflineRoot() const; + int GetItemType(HANDLE hItem) const; + HANDLE GetNextItem(HANDLE hItem, uint32_t flags) const; + HANDLE GetSelection() const; + HANDLE HitTest(int x, int y, uint32_t *hitTest) const; + void SelectItem(HANDLE hItem); + void SetBkColor(COLORREF clBack); + void SetCheck(HANDLE hItem, bool check); + void SetExStyle(uint32_t exStyle); + void SetExtraColumns(int iColumns); + void SetExtraImage(HANDLE hItem, int iColumn, int iImage); + void SetExtraImageList(HIMAGELIST hImgList); + void SetFont(int iFontId, HANDLE hFont, bool bRedraw); + void SetItemText(HANDLE hItem, char *szText); + void SetHideEmptyGroups(bool state); + void SetHideOfflineRoot(bool state); + void SetOfflineModes(uint32_t modes); + void SetUseGroups(bool state); + + struct TEventInfo + { + CCtrlClc *ctrl; + NMCLISTCONTROL *info; + }; + + CCallback OnExpanded; + CCallback OnListRebuilt; + CCallback OnItemChecked; + CCallback OnDragging; + CCallback OnDropped; + CCallback OnListSizeChange; + CCallback OnOptionsChanged; + CCallback OnDragStop; + CCallback OnNewContact; + CCallback OnContactMoved; + CCallback OnCheckChanged; + CCallback OnClick; + +protected: + BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlCheck + +class MIR_CORE_EXPORT CCtrlCheck : public CCtrlData +{ + typedef CCtrlData CSuper; + +public: + CCtrlCheck(CDlgBase *dlg, int ctrlId); + BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t /*idCode*/) override; + + bool OnApply() override; + void OnReset() override; + + int GetState() const; + void SetState(int state); + + bool IsChecked(); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlColor - color picker + +class MIR_CORE_EXPORT CCtrlColor : public CCtrlData +{ + typedef CCtrlData CSuper; + +public: + CCtrlColor(CDlgBase *dlg, int ctrlId); + BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t /*idCode*/) override; + + bool OnApply() override; + void OnReset() override; + + uint32_t GetColor(); + void SetColor(uint32_t dwValue); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlDate - date & time picker + +class MIR_CORE_EXPORT CCtrlDate : public CCtrlData +{ + typedef CCtrlData CSuper; + + BOOL OnNotify(int, NMHDR*) override; + +public: + CCtrlDate(CDlgBase *dlg, int ctrlId); + + void GetTime(SYSTEMTIME*); + void SetTime(SYSTEMTIME*); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlEdit + +class MIR_CORE_EXPORT CCtrlEdit : public CCtrlData +{ + typedef CCtrlData CSuper; + +public: + CCtrlEdit(CDlgBase *dlg, int ctrlId); + BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t idCode) override; + + bool OnApply() override; + void OnReset() override; + + void SetMaxLength(unsigned int len); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlRichEdit + +class MIR_CORE_EXPORT CCtrlRichEdit : public CCtrlEdit +{ + typedef CCtrlEdit CSuper; + +public: + CCtrlRichEdit(CDlgBase *dlg, int ctrlId); + + // returns text length in bytes if a parameter is omitted or in symbols, if not + int GetRichTextLength(int iCodePage = CP_ACP) const; + + // returns a buffer that should be freed using mir_free() or ptrA/ptrW + char* GetRichTextRtf(bool bText = false, bool bSelection = false) const; // returns text with formatting + wchar_t* GetRichText() const; // returns only text in ucs2 + + // these methods return text length in Unicode chars + int SetRichText(const wchar_t *text); + int SetRichTextRtf(const char *text); + + // enables or disables content editing + void SetReadOnly(bool bReadOnly); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlSlider + +class MIR_CORE_EXPORT CCtrlSlider : public CCtrlData +{ + typedef CCtrlData CSuper; + + int m_wMin, m_wMax; + +protected: + BOOL OnCommand(MWindow hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; + +public: + CCtrlSlider(CDlgBase *dlg, int ctrlId, int max = 100, int min = 0); + + bool OnApply() override; + void OnReset() override; + + int GetPosition() const; + void SetPosition(int pos); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlSpin + +class MIR_CORE_EXPORT CCtrlSpin : public CCtrlData +{ + typedef CCtrlData CSuper; + + int16_t m_wMin, m_wMax, m_wCurr; + + BOOL OnNotify(int, NMHDR*) override; + +public: + CCtrlSpin(CDlgBase *dlg, int ctrlId, int16_t max = 100, int16_t min = 0); + + bool OnApply() override; + void OnReset() override; + + int16_t GetPosition(); + void SetPosition(int16_t pos); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlListBox + +class MIR_CORE_EXPORT CCtrlListBox : public CCtrlBase +{ + typedef CCtrlBase CSuper; + +public: + CCtrlListBox(CDlgBase *dlg, int ctrlId); + + int AddString(const wchar_t *text, LPARAM data=0); + void DeleteString(int index); + int FindString(const wchar_t *str, int index = -1, bool exact = false); + int GetCount() const; + int GetCurSel() const; + LPARAM GetItemData(int index) const; + int GetItemRect(int index, RECT *pResult) const; + wchar_t* GetItemText(int index) const; + wchar_t* GetItemText(int index, wchar_t *buf, int size) const; + bool GetSel(int index) const; + int GetSelCount() const; + int* GetSelItems(int *items, int count) const; + int* GetSelItems() const; + int InsertString(const wchar_t *text, int pos, LPARAM data=0); + void ResetContent(); + int SelectString(const wchar_t *str); + int SetCurSel(int index); + void SetItemData(int index, LPARAM data); + void SetItemHeight(int index, int iHeight); + void SetSel(int index, bool sel = true); + + // Events + CCallback OnDblClick; + CCallback OnSelCancel; + CCallback OnSelChange; + +protected: + BOOL OnCommand(MWindow hwndCtrl, uint16_t idCtrl, uint16_t idCode) override; + void GetCaretPos(CContextMenuPos&) const override; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlCombo + +class MIR_CORE_EXPORT CCtrlCombo : public CCtrlData +{ + typedef CCtrlData CSuper; + +public: + CCtrlCombo(CDlgBase *dlg, int ctrlId); + + BOOL OnCommand(MWindow /*hwndCtrl*/, uint16_t /*idCtrl*/, uint16_t idCode) override; + void OnInit() override; + bool OnApply() override; + void OnReset() override; + + // returns item data associated with the selected item or -1 + LPARAM GetCurData() const; + + // selects line with userdata passed. returns index of this line or -1 + int SelectData(LPARAM data); + + // Control interface + int AddString(const wchar_t *text, LPARAM data = 0); + int AddStringA(const char *text, LPARAM data = 0); + void DeleteString(int index); + int FindString(const wchar_t *str, int index = -1, bool exact = false); + int FindStringA(const char *str, int index = -1, bool exact = false); + int GetCount() const; + int GetCurSel() const; + bool GetDroppedState() const; + LPARAM GetItemData(int index) const; + wchar_t* GetItemText(int index) const; + wchar_t* GetItemText(int index, wchar_t *buf, int size) const; + int InsertString(const wchar_t *text, int pos, LPARAM data=0); + void ResetContent(); + int SelectString(const wchar_t *str); + int SetCurSel(int index); + void SetItemData(int index, LPARAM data); + void ShowDropdown(bool show = true); + + // Events + CCallback OnCloseup; + CCallback OnDropdown; + CCallback OnKillFocus; + CCallback OnSelChanged; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlListView + +class MIR_CORE_EXPORT CCtrlListView : public CCtrlBase +{ + typedef CCtrlBase CSuper; + +public: + CCtrlListView(CDlgBase *dlg, int ctrlId); + + // direction = -1 or 1. returns new item index + int MoveItem(int idx, int direction); + + void SetCurSel(int idx); + + // Classic LV interface + uint32_t ApproximateViewRect(int cx, int cy, int iCount); + void Arrange(UINT code); + void CancelEditLabel(); + HIMAGELIST CreateDragImage(int iItem, POINT *lpptUpLeft); + void DeleteAllItems(); + void DeleteColumn(int iCol); + void DeleteItem(int iItem); + MWindow EditLabel(int iItem); + int EnableGroupView(BOOL fEnable); + BOOL EnsureVisible(int i, BOOL fPartialOK); + int FindItem(int iStart, const LVFINDINFO *plvfi); + COLORREF GetBkColor() const; + void GetBkImage(LVBKIMAGE *plvbki) const; + UINT GetCallbackMask() const; + BOOL GetCheckState(UINT iIndex) const; + void GetColumn(int iCol, LVCOLUMN *pcol) const; + void GetColumnOrderArray(int iCount, int *lpiArray) const; + int GetColumnWidth(int iCol) const; + int GetCountPerPage() const; + MWindow GetEditControl() const; + uint32_t GetExtendedListViewStyle() const; + int GetFocusedGroup() const; + int GetGroupCount() const; + void GetGroupInfo(int iGroupId, LVGROUP *pgrp) const; + void GetGroupInfoByIndex(int iIndex, LVGROUP *pgrp) const; + void GetGroupMetrics(LVGROUPMETRICS *pGroupMetrics) const; + UINT GetGroupState(UINT dwGroupId, UINT dwMask) const; + MWindow GetHeader() const; + HCURSOR GetHotCursor() const; + int GetHotItem() const; + uint32_t GetHoverTime() const; + HIMAGELIST GetImageList(int iImageList) const; + BOOL GetInsertMark(LVINSERTMARK *plvim) const; + COLORREF GetInsertMarkColor() const; + int GetInsertMarkRect(RECT *prc) const; + BOOL GetISearchString(LPSTR lpsz) const; + bool GetItem(LVITEM *pitem) const; + int GetItemCount() const; + void GetItemPosition(int i, POINT *ppt) const; + void GetItemRect(int i, RECT *prc, int code) const; + uint32_t GetItemSpacing(BOOL fSmall) const; + UINT GetItemState(int i, UINT mask) const; + void GetItemText(int iItem, int iSubItem, LPTSTR pszText, int cchTextMax) const; + int GetNextItem(int iStart, UINT flags) const; + BOOL GetNumberOfWorkAreas(UINT *lpuWorkAreas) const; + BOOL GetOrigin(POINT *lpptOrg) const; + COLORREF GetOutlineColor() const; + UINT GetSelectedColumn() const; + UINT GetSelectedCount() const; + int GetSelectionMark() const; + int GetStringWidth(LPCSTR psz) const; + BOOL GetSubItemRect(int iItem, int iSubItem, int code, RECT *lpRect) const; + COLORREF GetTextBkColor() const; + COLORREF GetTextColor() const; + void GetTileInfo(LVTILEINFO *plvtinfo) const; + void GetTileViewInfo(LVTILEVIEWINFO *plvtvinfo) const; + MWindow GetToolTips() const; + int GetTopIndex() const; + BOOL GetUnicodeFormat() const; + uint32_t GetView() const; + BOOL GetViewRect(RECT *prc) const; + void GetWorkAreas(int nWorkAreas, RECT *lprc) const; + BOOL HasGroup(int dwGroupId); + int HitTest(LVHITTESTINFO *pinfo) const; + int HitTestEx(LVHITTESTINFO *pinfo); + int InsertColumn(int iCol, const LVCOLUMN *pcol); + int InsertGroup(int index, LVGROUP *pgrp); + void InsertGroupSorted(LVINSERTGROUPSORTED *structInsert); + int InsertItem(const LVITEM *pitem); + BOOL InsertMarkHitTest(POINT *point, LVINSERTMARK *plvim); + BOOL IsGroupViewEnabled(); + UINT IsItemVisible(UINT index); + UINT MapIDToIndex(UINT id); + UINT MapIndexToID(UINT index); + BOOL RedrawItems(int iFirst, int iLast); + void RemoveAllGroups(); + int RemoveGroup(int iGroupId); + BOOL Scroll(int dx, int dy); + BOOL SetBkColor(COLORREF clrBk); + BOOL SetBkImage(LVBKIMAGE *plvbki); + BOOL SetCallbackMask(UINT mask); + void SetCheckState(UINT iIndex, BOOL fCheck); + BOOL SetColumn(int iCol, LVCOLUMN *pcol); + BOOL SetColumnOrderArray(int iCount, int *lpiArray); + BOOL SetColumnWidth(int iCol, int cx); + void SetExtendedListViewStyle(uint32_t dwExStyle); + void SetExtendedListViewStyleEx(uint32_t dwExMask, uint32_t dwExStyle); + int SetGroupInfo(int iGroupId, LVGROUP *pgrp); + void SetGroupMetrics(LVGROUPMETRICS *pGroupMetrics); + void SetGroupState(UINT dwGroupId, UINT dwMask, UINT dwState); + HCURSOR SetHotCursor(HCURSOR hCursor); + int SetHotItem(int iIndex); + void SetHoverTime(uint32_t dwHoverTime); + uint32_t SetIconSpacing(int cx, int cy); + HIMAGELIST SetImageList(HIMAGELIST himl, int iImageList); + BOOL SetInfoTip(LVSETINFOTIP *plvSetInfoTip); + BOOL SetInsertMark(LVINSERTMARK *plvim); + COLORREF SetInsertMarkColor(COLORREF color); + BOOL SetItem(const LVITEM *pitem); + void SetItemCount(int cItems); + void SetItemCountEx(int cItems, uint32_t dwFlags); + BOOL SetItemPosition(int i, int x, int y); + void SetItemPosition32(int iItem, int x, int y); + void SetItemState(int i, UINT state, UINT mask); + void SetItemText(int i, int iSubItem, const wchar_t *pszText); + COLORREF SetOutlineColor(COLORREF color); + void SetSelectedColumn(int iCol); + int SetSelectionMark(int iIndex); + BOOL SetTextBkColor(COLORREF clrText); + BOOL SetTextColor(COLORREF clrText); + BOOL SetTileInfo(LVTILEINFO *plvtinfo); + BOOL SetTileViewInfo(LVTILEVIEWINFO *plvtvinfo); + MWindow SetToolTips(MWindow ToolTip); + BOOL SetUnicodeFormat(BOOL fUnicode); + int SetView(uint32_t iView); + void SetWorkAreas(int nWorkAreas, RECT *lprc); + int SubItemHitTest(LVHITTESTINFO *pInfo) const; + int SubItemHitTestEx(LVHITTESTINFO *plvhti); + BOOL Update(int iItem); + + #ifdef _MSC_VER + int SortGroups(PFNLVGROUPCOMPARE pfnGroupCompare, LPVOID plv); + BOOL SortItems(PFNLVCOMPARE pfnCompare, LPARAM lParamSort); + BOOL SortItemsEx(PFNLVCOMPARE pfnCompare, LPARAM lParamSort); + #endif // _MSC_VER + + // Additional APIs + HIMAGELIST CreateImageList(int iImageList); + void AddColumn(int iSubItem, const wchar_t *name, int cx); + void AddGroup(int iGroupId, const wchar_t *name); + int AddItem(const wchar_t *text, int iIcon, LPARAM lParam = 0, int iGroupId = -1); + void SetItem(int iItem, int iSubItem, const wchar_t *text, int iIcon = -1); + LPARAM GetItemData(int iItem) const; + + // Events + struct TEventInfo { + CCtrlListView *treeviewctrl; + union { + NMHDR *nmhdr; + NMLISTVIEW *nmlv; + NMLVDISPINFO *nmlvdi; + NMLVSCROLL *nmlvscr; + NMLVGETINFOTIP *nmlvit; + NMLVFINDITEM *nmlvfi; + NMITEMACTIVATE *nmlvia; + NMLVKEYDOWN *nmlvkey; + NMLVCUSTOMDRAW *nmcd; + }; + }; + + CCallback OnBeginDrag; + CCallback OnBeginLabelEdit; + CCallback OnBeginRDrag; + CCallback OnBeginScroll; + CCallback OnColumnClick; + CCallback OnCustomDraw; + CCallback OnDeleteAllItems; + CCallback OnDeleteItem; + CCallback OnClick; + CCallback OnDoubleClick; + CCallback OnEndLabelEdit; + CCallback OnEndScroll; + CCallback OnGetDispInfo; + CCallback OnGetInfoTip; + CCallback OnHotTrack; + CCallback OnIncrementalSearch; + CCallback OnInsertItem; + CCallback OnItemActivate; + CCallback OnItemChanged; + CCallback OnItemChanging; + CCallback OnKeyDown; + CCallback OnMarqueeBegin; + CCallback OnSetDispInfo; + +protected: + BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; + void GetCaretPos(CContextMenuPos&) const override; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlTreeView + +#undef GetNextSibling +#undef GetPrevSibling + +#define MTREE_CHECKBOX 0x0001 +#define MTREE_DND 0x0002 +#define MTREE_MULTISELECT 0x0004 + +class MIR_CORE_EXPORT CCtrlTreeView : public CCtrlBase +{ + typedef CCtrlBase CSuper; + + HTREEITEM MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter, HTREEITEM hParent); + +public: + CCtrlTreeView(CDlgBase *dlg, int ctrlId); + + void SetFlags(uint32_t dwFlags); // MTREE_* combination + + // Classic TV interface + HIMAGELIST CreateDragImage(HTREEITEM hItem); + void DeleteAllItems(); + void DeleteItem(HTREEITEM hItem); + MWindow EditLabel(HTREEITEM hItem); + void EndEditLabelNow(BOOL cancel); + void EnsureVisible(HTREEITEM hItem); + void Expand(HTREEITEM hItem, uint32_t flag); + COLORREF GetBkColor() const; + uint32_t GetCheckState(HTREEITEM hItem) const; + HTREEITEM GetChild(HTREEITEM hItem) const; + int GetCount() const; + HTREEITEM GetDropHilight() const; + MWindow GetEditControl() const; + HTREEITEM GetFirstVisible() const; + HIMAGELIST GetImageList(int iImage) const; + int GetIndent() const; + COLORREF GetInsertMarkColor() const; + bool GetItem(TVITEMEX *tvi) const; + int GetItemHeight() const; + void GetItemRect(HTREEITEM hItem, RECT *rcItem, BOOL fItemRect) const; + uint32_t GetItemState(HTREEITEM hItem, uint32_t stateMask) const; + HTREEITEM GetLastVisible() const; + COLORREF GetLineColor() const; + HTREEITEM GetNextItem(HTREEITEM hItem, uint32_t flag) const; + HTREEITEM GetNextSibling(HTREEITEM hItem) const; + HTREEITEM GetNextVisible(HTREEITEM hItem) const; + HTREEITEM GetParent(HTREEITEM hItem) const; + HTREEITEM GetPrevSibling(HTREEITEM hItem) const; + HTREEITEM GetPrevVisible(HTREEITEM hItem) const; + HTREEITEM GetRoot() const; + uint32_t GetScrollTime() const; + HTREEITEM GetSelection() const; + COLORREF GetTextColor() const; + MWindow GetToolTips() const; + BOOL GetUnicodeFormat() const; + unsigned GetVisibleCount() const; + HTREEITEM HitTest(TVHITTESTINFO *hti) const; + HTREEITEM InsertItem(TVINSERTSTRUCT *tvis); + void Select(HTREEITEM hItem, uint32_t flag); + void SelectDropTarget(HTREEITEM hItem); + void SelectItem(HTREEITEM hItem); + void SelectSetFirstVisible(HTREEITEM hItem); + COLORREF SetBkColor(COLORREF clBack); + void SetCheckState(HTREEITEM hItem, uint32_t state); + HIMAGELIST SetImageList(HIMAGELIST hIml, int iImage); + void SetIndent(int iIndent); + void SetInsertMark(HTREEITEM hItem, BOOL fAfter); + COLORREF SetInsertMarkColor(COLORREF clMark); + void SetItem(TVITEMEX *tvi); + void SetItemHeight(short cyItem); + void SetItemState(HTREEITEM hItem, uint32_t state, uint32_t stateMask); + COLORREF SetLineColor(COLORREF clLine); + void SetScrollTime(UINT uMaxScrollTime); + COLORREF SetTextColor(COLORREF clText); + MWindow SetToolTips(MWindow hwndToolTips); + BOOL SetUnicodeFormat(BOOL fUnicode); + void SortChildren(HTREEITEM hItem, BOOL fRecurse); + void SortChildrenCB(TVSORTCB *cb, BOOL fRecurse); + + // Additional stuff + void TranslateItem(HTREEITEM hItem); + void TranslateTree(); + HTREEITEM FindNamedItem(HTREEITEM hItem, const wchar_t *name); + void GetItem(HTREEITEM hItem, TVITEMEX *tvi) const; + void GetItem(HTREEITEM hItem, TVITEMEX *tvi, wchar_t *szText, int iTextLength) const; + void InvertCheck(HTREEITEM hItem); + + bool IsSelected(HTREEITEM hItem); + int GetNumSelected(); + void GetSelected(LIST<_TREEITEM> &selected); + + void Select(HTREEITEM hItem); + void Select(LIST<_TREEITEM> &selected); + void SelectAll(); + void SelectRange(HTREEITEM hStart, HTREEITEM hEnd); + + void Unselect(HTREEITEM hItem); + void UnselectAll(); + + void DropHilite(HTREEITEM hItem); + void DropUnhilite(HTREEITEM hItem); + + // Events + struct TEventInfo { + CCtrlTreeView *treeviewctrl; + union { + NMHDR *nmhdr; + NMTREEVIEW *nmtv; + NMTVKEYDOWN *nmtvkey; + NMTVDISPINFO *nmtvdi; + NMTVGETINFOTIP *nmtvit; + NMTVCUSTOMDRAW *nmcd; + HTREEITEM hItem; // for OnItemChanged + }; + }; + + CCallback OnBeginDrag; + CCallback OnBeginLabelEdit; + CCallback OnBeginRDrag; + CCallback OnCustomDraw; + CCallback OnDeleteItem; + CCallback OnEndLabelEdit; + CCallback OnGetDispInfo; + CCallback OnGetInfoTip; + CCallback OnItemChanged; + CCallback OnItemExpanded; + CCallback OnItemExpanding; + CCallback OnKeyDown; + CCallback OnRightClick; + CCallback OnSelChanged; + CCallback OnSelChanging; + CCallback OnSetDispInfo; + CCallback OnSingleExpand; + +protected: + void OnInit() override; + BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; + + void GetCaretPos(CContextMenuPos&) const override; + LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) override; + + union { + uint32_t m_dwFlags; + struct { + bool m_bDndEnabled : 1; + bool m_bDragging : 1; + bool m_bCheckBox : 1; + bool m_bMultiSelect : 1; + }; + }; + HTREEITEM m_hDragItem; // valid if m_bDragging == true +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlTreeOpts - array of options with sections + +class MIR_CORE_EXPORT CCtrlTreeOpts : public CCtrlTreeView +{ + typedef CCtrlTreeView CSuper; + +public: + CCtrlTreeOpts(CDlgBase *dlg, int ctrlId); + ~CCtrlTreeOpts(); + + void AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, CMOption &option); + void AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, bool &option); + void AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, uint32_t &option, uint32_t mask); + + BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; + void OnDestroy() override; + void OnInit() override; + bool OnApply() override; + +protected: + struct COptionsItem + { + const wchar_t *m_pwszSection, *m_pwszName; + + union + { + CMOption *m_option; + bool *m_pBool; + struct + { + uint32_t *m_pDword; + uint32_t m_mask; + }; + }; + + HTREEITEM m_hItem = nullptr; + enum OptionItemType { CMOPTION = 1, BOOL = 2, MASK = 3 }; + OptionItemType m_type; + + COptionsItem(const wchar_t *pwszSection, const wchar_t *pwszName, OptionItemType type) : + m_pwszSection(pwszSection), + m_pwszName(pwszName), + m_type(type) + {} + }; + + OBJLIST m_options; + + void ProcessItemClick(HTREEITEM hti); +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlPages + +#define PSN_INFOCHANGED 1 + +// force-send a PSN_INFOCHANGED to all pages +#define PSM_FORCECHANGED (WM_USER+100) + +class MIR_CORE_EXPORT CCtrlPages : public CCtrlBase +{ + typedef CCtrlBase CSuper; + + HIMAGELIST m_hIml; + CDlgBase *m_pActivePage; + int m_numRows = 1; + + struct TPageInfo; + void InsertPage(TPageInfo *pPage); + void ShowPage(CDlgBase *pDlg); + + void CheckRowCount(); + TPageInfo* GetCurrPage(); + TPageInfo* GetItemPage(int iPage); + LIST m_pages; + +public: + CCtrlPages(CDlgBase *dlg, int ctrlId); + + void AddPage(const wchar_t *ptszName, HICON hIcon, CDlgBase *pDlg); + void ActivatePage(int iPage); + int GetCount(void); + int GetDlgIndex(CDlgBase*); + void RemovePage(int iPage); + void SwapPages(int idx1, int idx2); + + CDlgBase* GetNthPage(int iPage); + + __forceinline CDlgBase* GetActivePage() const + { return m_pActivePage; + } + +protected: + BOOL OnNotify(int idCtrl, NMHDR *pnmh) override; + + void OnInit() override; + void OnDestroy() override; + + bool OnApply() override; + void OnReset() override; + + LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) override; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// CProtoDlgBase + +#define WM_PROTO_REFRESH (WM_USER + 100) +#define WM_PROTO_CHECK_ONLINE (WM_USER + 101) +#define WM_PROTO_ACTIVATE (WM_USER + 102) +#define WM_PROTO_LAST (WM_USER + 200) + +struct PROTO_INTERFACE; + +class MIR_APP_EXPORT CProtoIntDlgBase : public CDlgBase +{ + typedef CDlgBase CSuper; + +public: + CProtoIntDlgBase(PROTO_INTERFACE *proto, int idDialog); + + void CreateLink(CCtrlData &ctrl, const char *szSetting, uint8_t type, uint32_t iValue); + void CreateLink(CCtrlData &ctrl, const char *szSetting, wchar_t *szValue); + + template + __inline void CreateLink(CCtrlData &ctrl, CMOption &option) + { + ctrl.CreateDbLink(new CMOptionLink(option)); + } + + __inline PROTO_INTERFACE *GetProtoInterface() { return m_proto_interface; } + + void SetStatusText(const wchar_t *statusText); + +protected: + PROTO_INTERFACE *m_proto_interface; + MWindow m_hwndStatus = nullptr; + + INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override; + + virtual void OnProtoRefresh(WPARAM, LPARAM); + virtual void OnProtoActivate(WPARAM, LPARAM); + virtual void OnProtoCheckOnline(WPARAM, LPARAM); + +private: + void UpdateStatusBar(); +}; + +template +class CProtoDlgBase : public CProtoIntDlgBase +{ + typedef CProtoIntDlgBase CSuper; + +public: + __inline CProtoDlgBase(TProto *proto, int idDialog) : + CProtoIntDlgBase(proto, idDialog), + m_proto(proto) + { + } + + __inline TProto *GetProto() { return m_proto; } + +protected: + TProto* m_proto; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// Safe open/close dialogs +#define UI_SAFE_OPEN(dlgClass, dlgPtr) \ + { \ + if (dlgPtr) \ + { \ + SetForegroundWindow((dlgPtr)->GetHwnd()); \ + } else \ + { \ + (dlgPtr) = new dlgClass(this); \ + (dlgPtr)->Show(); \ + } \ + } + +#define UI_SAFE_OPEN_EX(dlgClass, dlgPtr, dlgLocal) \ + if (dlgPtr) \ + { \ + ::SetForegroundWindow((dlgPtr)->GetHwnd()); \ + } else \ + { \ + (dlgPtr) = new dlgClass(this); \ + (dlgPtr)->Show(); \ + } \ + dlgClass *dlgLocal = (dlgClass *)(dlgPtr); + +#define UI_SAFE_CLOSE(dlg) \ + { \ + if (dlg) { \ + (dlg)->Close(); \ + (dlg) = NULL; \ + } \ + } + +#define UI_SAFE_CLOSE_HWND(hwnd) \ + { \ + if (hwnd) { \ + ::SendMessage((hwnd), WM_CLOSE, 0, 0); \ + (hwnd) = NULL; \ + } \ + } + +///////////////////////////////////////////////////////////////////////////////////////// +// NULL-Safe dialog notifications +#define UI_SAFE_NOTIFY(dlg, msg) \ + { \ + if (dlg) \ + ::SendMessage((dlg)->GetHwnd(), msg, 0, 0); \ + } + +#define UI_SAFE_NOTIFY_HWND(hwnd, msg) \ + { \ + if (hwnd) \ + ::SendMessage((hwnd), msg, 0, 0); \ + } + +///////////////////////////////////////////////////////////////////////////////////////// +// Define message maps +#define UI_MESSAGE_MAP(dlgClass, baseDlgClass) \ + typedef baseDlgClass CMessageMapSuperClass; \ + virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) \ + { \ + switch (msg) \ + { \ + case 0: \ + break /* just to handle ";" symbol after macro */ + +#define UI_MESSAGE(msg, proc) \ + case msg: \ + proc(msg, wParam, lParam); \ + break + +#define UI_MESSAGE_EX(msg, func) \ + case msg: \ + return func(msg, wParam, lParam) + +#define UI_POSTPROCESS_MESSAGE(msg, proc) \ + case msg: \ + CMessageMapSuperClass::DlgProc(msg, wParam, lParam); \ + return FALSE + +#define UI_POSTPROCESS_MESSAGE_EX(msg, func) \ + case msg: \ + CMessageMapSuperClass::DlgProc(msg, wParam, lParam); \ + return func(msg, wParam, lParam) + +#define UI_MESSAGE_MAP_END() \ + } \ + return CMessageMapSuperClass::DlgProc(msg, wParam, lParam); \ + } + +#endif // __M_GUI_H diff --git a/libs/hunspell/src/phonet.c++ b/libs/hunspell/src/phonet.c++ index 69601a2872..c81d890a21 100644 --- a/libs/hunspell/src/phonet.c++ +++ b/libs/hunspell/src/phonet.c++ @@ -1,270 +1,270 @@ -/* phonetic.c - generic replacement aglogithms for phonetic transformation - Copyright (C) 2000 Bjoern Jacke - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License version 2.1 as published by the Free Software Foundation; - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; If not, see - . - - Changelog: - - 2000-01-05 Bjoern Jacke - Initial Release insprired by the article about phonetic - transformations out of c't 25/1999 - - 2007-07-26 Bjoern Jacke - Released under MPL/GPL/LGPL tri-license for Hunspell - - 2007-08-23 Laszlo Nemeth - Porting from Aspell to Hunspell using C-like structs -*/ - -#include -#include -#include -#include - -#include "csutil.hxx" -#include "phonet.hxx" - -void init_phonet_hash(phonetable& parms) { - for (int i = 0; i < HASHSIZE; i++) { - parms.hash[i] = -1; - } - - for (int i = 0; parms.rules[i][0] != '\0'; i += 2) { - /** set hash value **/ - int k = (unsigned char)parms.rules[i][0]; - - if (parms.hash[k] < 0) { - parms.hash[k] = i; - } - } -} - -// like strcpy but safe if the strings overlap -// but only if dest < src -static inline void strmove(char* dest, char* src) { - while (*src) - *dest++ = *src++; - *dest = '\0'; -} - -static int myisalpha(char ch) { - if ((unsigned char)ch < 128) - return isalpha(ch); - return 1; -} - -/* Do phonetic transformation. */ -/* phonetic transcription algorithm */ -/* see: http://aspell.net/man-html/Phonetic-Code.html */ -/* convert string to uppercase before this call */ -std::string phonet(const std::string& inword, phonetable& parms) { - - int i, k = 0, p, z; - int k0, n0, p0 = -333; - char c; - typedef unsigned char uchar; - - size_t len = inword.size(); - if (len > MAXPHONETUTF8LEN) - return std::string(); - char word[MAXPHONETUTF8LEN + 1]; - strncpy(word, inword.c_str(), MAXPHONETUTF8LEN); - word[MAXPHONETUTF8LEN] = '\0'; - - std::string target; - /** check word **/ - i = z = 0; - while ((c = word[i]) != '\0') { - int n = parms.hash[(uchar)c]; - int z0 = 0; - - if (n >= 0 && !parms.rules[n].empty()) { - /** check all rules for the same letter **/ - while (parms.rules[n][0] == c) { - /** check whole string **/ - k = 1; /** number of found letters **/ - p = 5; /** default priority **/ - const char*s = parms.rules[n].c_str(); - s++; /** important for (see below) "*(s-1)" **/ - - while (*s != '\0' && word[i + k] == *s && !isdigit((unsigned char)*s) && - strchr("(-<^$", *s) == NULL) { - k++; - s++; - } - if (*s == '(') { - /** check letters in "(..)" **/ - if (myisalpha(word[i + k]) // ...could be implied? - && strchr(s + 1, word[i + k]) != NULL) { - k++; - while (*s != ')') - s++; - s++; - } - } - p0 = (int)*s; - k0 = k; - while (*s == '-' && k > 1) { - k--; - s++; - } - if (*s == '<') - s++; - if (isdigit((unsigned char)*s)) { - /** determine priority **/ - p = *s - '0'; - s++; - } - if (*s == '^' && *(s + 1) == '^') - s++; - - if (*s == '\0' || (*s == '^' && (i == 0 || !myisalpha(word[i - 1])) && - (*(s + 1) != '$' || (!myisalpha(word[i + k0])))) || - (*s == '$' && i > 0 && myisalpha(word[i - 1]) && - (!myisalpha(word[i + k0])))) { - /** search for followup rules, if: **/ - /** parms.followup and k > 1 and NO '-' in searchstring **/ - char c0 = word[i + k - 1]; - n0 = parms.hash[(uchar)c0]; - - // if (parms.followup && k > 1 && n0 >= 0 - if (k > 1 && n0 >= 0 && p0 != (int)'-' && word[i + k] != '\0' && !parms.rules[n0].empty()) { - /** test follow-up rule for "word[i+k]" **/ - while (parms.rules[n0][0] == c0) { - /** check whole string **/ - k0 = k; - p0 = 5; - s = parms.rules[n0].c_str(); - s++; - while (*s != '\0' && word[i + k0] == *s && - !isdigit((unsigned char)*s) && - strchr("(-<^$", *s) == NULL) { - k0++; - s++; - } - if (*s == '(') { - /** check letters **/ - if (myisalpha(word[i + k0]) && - strchr(s + 1, word[i + k0]) != NULL) { - k0++; - while (*s != ')' && *s != '\0') - s++; - if (*s == ')') - s++; - } - } - while (*s == '-') { - /** "k0" gets NOT reduced **/ - /** because "if (k0 == k)" **/ - s++; - } - if (*s == '<') - s++; - if (isdigit((unsigned char)*s)) { - p0 = *s - '0'; - s++; - } - - if (*s == '\0' - /** *s == '^' cuts **/ - || (*s == '$' && !myisalpha(word[i + k0]))) { - if (k0 == k) { - /** this is just a piece of the string **/ - n0 += 2; - continue; - } - - if (p0 < p) { - /** priority too low **/ - n0 += 2; - continue; - } - /** rule fits; stop search **/ - break; - } - n0 += 2; - } /** End of "while (parms.rules[n0][0] == c0)" **/ - - if (p0 >= p && parms.rules[n0][0] == c0) { - n += 2; - continue; - } - } /** end of follow-up stuff **/ - - /** replace string **/ - s = parms.rules[n + 1].c_str(); - p0 = (!parms.rules[n].empty() && - strchr(parms.rules[n].c_str() + 1, '<') != NULL) - ? 1 - : 0; - if (p0 == 1 && z == 0) { - /** rule with '<' is used **/ - if (!target.empty() && *s != '\0' && - (target[target.size()-1] == c || target[target.size()-1] == *s)) { - target.erase(target.size() - 1); - } - z0 = 1; - z = 1; - k0 = 0; - while (*s != '\0' && word[i + k0] != '\0') { - word[i + k0] = *s; - k0++; - s++; - } - if (k > k0) - strmove(&word[0] + i + k0, &word[0] + i + k); - - /** new "actual letter" **/ - c = word[i]; - } else { /** no '<' rule used **/ - i += k - 1; - z = 0; - while (*s != '\0' && *(s + 1) != '\0' && target.size() < len) { - if (target.empty() || target[target.size()-1] != *s) { - target.push_back(*s); - } - s++; - } - /** new "actual letter" **/ - c = *s; - if (!parms.rules[n].empty() && - strstr(parms.rules[n].c_str() + 1, "^^") != NULL) { - if (c != '\0') { - target.push_back(c); - } - strmove(&word[0], &word[0] + i + 1); - i = 0; - z0 = 1; - } - } - break; - } /** end of follow-up stuff **/ - n += 2; - } /** end of while (parms.rules[n][0] == c) **/ - } /** end of if (n >= 0) **/ - if (z0 == 0) { - if (k && !p0 && target.size() < len && c != '\0') { - /** condense only double letters **/ - target.push_back(c); - /// printf("\n setting \n"); - } - - i++; - z = 0; - k = 0; - } - } /** end of while ((c = word[i]) != '\0') **/ - - return target; -} /** end of function "phonet" **/ +/* phonetic.c - generic replacement aglogithms for phonetic transformation + Copyright (C) 2000 Bjoern Jacke + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1 as published by the Free Software Foundation; + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; If not, see + . + + Changelog: + + 2000-01-05 Bjoern Jacke + Initial Release insprired by the article about phonetic + transformations out of c't 25/1999 + + 2007-07-26 Bjoern Jacke + Released under MPL/GPL/LGPL tri-license for Hunspell + + 2007-08-23 Laszlo Nemeth + Porting from Aspell to Hunspell using C-like structs +*/ + +#include +#include +#include +#include + +#include "csutil.hxx" +#include "phonet.hxx" + +void init_phonet_hash(phonetable& parms) { + for (int i = 0; i < HASHSIZE; i++) { + parms.hash[i] = -1; + } + + for (int i = 0; parms.rules[i][0] != '\0'; i += 2) { + /** set hash value **/ + int k = (unsigned char)parms.rules[i][0]; + + if (parms.hash[k] < 0) { + parms.hash[k] = i; + } + } +} + +// like strcpy but safe if the strings overlap +// but only if dest < src +static inline void strmove(char* dest, char* src) { + while (*src) + *dest++ = *src++; + *dest = '\0'; +} + +static int myisalpha(char ch) { + if ((unsigned char)ch < 128) + return isalpha(ch); + return 1; +} + +/* Do phonetic transformation. */ +/* phonetic transcription algorithm */ +/* see: http://aspell.net/man-html/Phonetic-Code.html */ +/* convert string to uppercase before this call */ +std::string phonet(const std::string& inword, phonetable& parms) { + + int i, k = 0, p, z; + int k0, n0, p0 = -333; + char c; + typedef unsigned char uchar; + + size_t len = inword.size(); + if (len > MAXPHONETUTF8LEN) + return std::string(); + char word[MAXPHONETUTF8LEN + 1]; + strncpy(word, inword.c_str(), MAXPHONETUTF8LEN); + word[MAXPHONETUTF8LEN] = '\0'; + + std::string target; + /** check word **/ + i = z = 0; + while ((c = word[i]) != '\0') { + int n = parms.hash[(uchar)c]; + int z0 = 0; + + if (n >= 0 && !parms.rules[n].empty()) { + /** check all rules for the same letter **/ + while (parms.rules[n][0] == c) { + /** check whole string **/ + k = 1; /** number of found letters **/ + p = 5; /** default priority **/ + const char*s = parms.rules[n].c_str(); + s++; /** important for (see below) "*(s-1)" **/ + + while (*s != '\0' && word[i + k] == *s && !isdigit((unsigned char)*s) && + strchr("(-<^$", *s) == NULL) { + k++; + s++; + } + if (*s == '(') { + /** check letters in "(..)" **/ + if (myisalpha(word[i + k]) // ...could be implied? + && strchr(s + 1, word[i + k]) != NULL) { + k++; + while (*s != ')') + s++; + s++; + } + } + p0 = (int)*s; + k0 = k; + while (*s == '-' && k > 1) { + k--; + s++; + } + if (*s == '<') + s++; + if (isdigit((unsigned char)*s)) { + /** determine priority **/ + p = *s - '0'; + s++; + } + if (*s == '^' && *(s + 1) == '^') + s++; + + if (*s == '\0' || (*s == '^' && (i == 0 || !myisalpha(word[i - 1])) && + (*(s + 1) != '$' || (!myisalpha(word[i + k0])))) || + (*s == '$' && i > 0 && myisalpha(word[i - 1]) && + (!myisalpha(word[i + k0])))) { + /** search for followup rules, if: **/ + /** parms.followup and k > 1 and NO '-' in searchstring **/ + char c0 = word[i + k - 1]; + n0 = parms.hash[(uchar)c0]; + + // if (parms.followup && k > 1 && n0 >= 0 + if (k > 1 && n0 >= 0 && p0 != (int)'-' && word[i + k] != '\0' && !parms.rules[n0].empty()) { + /** test follow-up rule for "word[i+k]" **/ + while (parms.rules[n0][0] == c0) { + /** check whole string **/ + k0 = k; + p0 = 5; + s = parms.rules[n0].c_str(); + s++; + while (*s != '\0' && word[i + k0] == *s && + !isdigit((unsigned char)*s) && + strchr("(-<^$", *s) == NULL) { + k0++; + s++; + } + if (*s == '(') { + /** check letters **/ + if (myisalpha(word[i + k0]) && + strchr(s + 1, word[i + k0]) != NULL) { + k0++; + while (*s != ')' && *s != '\0') + s++; + if (*s == ')') + s++; + } + } + while (*s == '-') { + /** "k0" gets NOT reduced **/ + /** because "if (k0 == k)" **/ + s++; + } + if (*s == '<') + s++; + if (isdigit((unsigned char)*s)) { + p0 = *s - '0'; + s++; + } + + if (*s == '\0' + /** *s == '^' cuts **/ + || (*s == '$' && !myisalpha(word[i + k0]))) { + if (k0 == k) { + /** this is just a piece of the string **/ + n0 += 2; + continue; + } + + if (p0 < p) { + /** priority too low **/ + n0 += 2; + continue; + } + /** rule fits; stop search **/ + break; + } + n0 += 2; + } /** End of "while (parms.rules[n0][0] == c0)" **/ + + if (p0 >= p && parms.rules[n0][0] == c0) { + n += 2; + continue; + } + } /** end of follow-up stuff **/ + + /** replace string **/ + s = parms.rules[n + 1].c_str(); + p0 = (!parms.rules[n].empty() && + strchr(parms.rules[n].c_str() + 1, '<') != NULL) + ? 1 + : 0; + if (p0 == 1 && z == 0) { + /** rule with '<' is used **/ + if (!target.empty() && *s != '\0' && + (target[target.size()-1] == c || target[target.size()-1] == *s)) { + target.erase(target.size() - 1); + } + z0 = 1; + z = 1; + k0 = 0; + while (*s != '\0' && word[i + k0] != '\0') { + word[i + k0] = *s; + k0++; + s++; + } + if (k > k0) + strmove(&word[0] + i + k0, &word[0] + i + k); + + /** new "actual letter" **/ + c = word[i]; + } else { /** no '<' rule used **/ + i += k - 1; + z = 0; + while (*s != '\0' && *(s + 1) != '\0' && target.size() < len) { + if (target.empty() || target[target.size()-1] != *s) { + target.push_back(*s); + } + s++; + } + /** new "actual letter" **/ + c = *s; + if (!parms.rules[n].empty() && + strstr(parms.rules[n].c_str() + 1, "^^") != NULL) { + if (c != '\0') { + target.push_back(c); + } + strmove(&word[0], &word[0] + i + 1); + i = 0; + z0 = 1; + } + } + break; + } /** end of follow-up stuff **/ + n += 2; + } /** end of while (parms.rules[n][0] == c) **/ + } /** end of if (n >= 0) **/ + if (z0 == 0) { + if (k && !p0 && target.size() < len && c != '\0') { + /** condense only double letters **/ + target.push_back(c); + /// printf("\n setting \n"); + } + + i++; + z = 0; + k = 0; + } + } /** end of while ((c = word[i]) != '\0') **/ + + return target; +} /** end of function "phonet" **/ diff --git a/plugins/DbChecker/src/worker.cpp b/plugins/DbChecker/src/worker.cpp index 6be8262b5f..e5590bb127 100644 --- a/plugins/DbChecker/src/worker.cpp +++ b/plugins/DbChecker/src/worker.cpp @@ -1,173 +1,173 @@ -/* -Miranda Database Tool -Copyright (C) 2001-2005 Richard Hughes - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "stdafx.h" - -void ProcessingDone(void); - -static bool ConvertOldEvent(DBEVENTINFO &dbei) -{ - if (dbei.flags & DBEF_UTF) - return false; - - if (dbei.flags == 1) { - dbei.flags = DBEF_UTF; - return true; - } - - int msglen = (int)mir_strlen((char *)dbei.pBlob) + 1, msglenW = 0; - if (msglen != (int)dbei.cbBlob) { - int count = ((dbei.cbBlob - msglen) / sizeof(wchar_t)); - wchar_t *p = (wchar_t *)&dbei.pBlob[msglen]; - for (int i = 0; i < count; i++) { - if (p[i] == 0) { - msglenW = i; - break; - } - } - } - - char *utf8str; - if (msglenW > 0 && msglenW <= msglen) - utf8str = mir_utf8encodeW((wchar_t *)&dbei.pBlob[msglen]); - else - utf8str = mir_utf8encode((char *)dbei.pBlob); - - if (utf8str == nullptr) - return false; - - mir_free(dbei.pBlob); - - dbei.flags |= DBEF_UTF; - dbei.cbBlob = (uint32_t)mir_strlen(utf8str); - dbei.pBlob = (uint8_t*)utf8str; - return true; -} - -static bool CompareContents(const DBEVENTINFO &ev1, const DBEVENTINFO &ev2) -{ - if (ev1.cbBlob == 0 && ev2.cbBlob == 0) - return true; - - if (ev1.cbBlob == 0 && ev2.cbBlob != 0 || ev1.cbBlob != 0 && ev2.cbBlob == 0) - return false; - - // both blobs should be compared - if (ev1.pBlob == 0 && ev2.pBlob == 0) - return false; - - return !memcmp(ev1.pBlob, ev2.pBlob, ev1.cbBlob); -} - -void __cdecl WorkerThread(DbToolOptions *opts) -{ - time_t ts = time(nullptr); - - AddToStatus(STATUS_MESSAGE, TranslateT("Database worker thread activated")); - - uint32_t sp = 0; - - if (opts->bMarkRead || opts->bCheckUtf || opts->bCheckDups) { - int nCount = 0, nUtfCount = 0, nDups = 0; - - for (auto &cc : Contacts()) { - DB::ECPTR pCursor(DB::Events(cc)); - DBEVENTINFO dboldev = {}; - while (MEVENT hEvent = pCursor.FetchNext()) { - DB::EventInfo dbei; - if (opts->bCheckUtf || opts->bCheckDups) // read also event's body - dbei.cbBlob = -1; - if (db_event_get(hEvent, &dbei)) - continue; - - if (opts->bMarkRead && !dbei.markedRead()) { - db_event_markRead(cc, hEvent); - nCount++; - } - - if (opts->bCheckUtf && dbei.eventType == EVENTTYPE_MESSAGE) { - if (ConvertOldEvent(dbei)) { - db_event_edit(cc, hEvent, &dbei); - nUtfCount++; - } - } - - if (opts->bCheckDups) { - if (dbei == dboldev && CompareContents(dbei, dboldev)) { - pCursor.DeleteEvent(); - nDups++; - } - else { - mir_free(dboldev.pBlob); - dboldev = dbei; - if (dboldev.cbBlob) { - dboldev.pBlob = (uint8_t *)mir_alloc(dboldev.cbBlob); - memcpy(dboldev.pBlob, dbei.pBlob, dboldev.cbBlob); - } - else dboldev.pBlob = nullptr; - } - } - } - mir_free(dboldev.pBlob); - } - - if (nCount) - AddToStatus(STATUS_MESSAGE, TranslateT("%d events marked as read"), nCount); - - if (nUtfCount) - AddToStatus(STATUS_MESSAGE, TranslateT("UTF-8 encoding fixed in %d events"), nUtfCount); - - if (nDups) - AddToStatus(STATUS_MESSAGE, TranslateT("%d duplicate events removed"), nDups); - } - - DBCHeckCallback callback; - callback.pfnAddLogMessage = AddToStatus; - opts->dbChecker->Start(&callback); - - for (int task = 0;; task++) { - if (callback.spaceProcessed / (callback.spaceUsed / 1000 + 1) > sp) { - sp = callback.spaceProcessed / (callback.spaceUsed / 1000 + 1); - SetProgressBar(sp); - } - WaitForSingleObject(opts->hEventRun, INFINITE); - if (WaitForSingleObject(opts->hEventAbort, 0) == WAIT_OBJECT_0) { - AddToStatus(STATUS_FATAL, TranslateT("Processing aborted by user")); - break; - } - - int ret = opts->dbChecker->CheckDb(task); - if (ret == ERROR_OUT_OF_PAPER) { - opts->dbChecker->Destroy(); - opts->dbChecker = nullptr; - - AddToStatus(STATUS_MESSAGE, TranslateT("Elapsed time: %d sec"), time(nullptr) - ts); - if (errorCount) - AddToStatus(STATUS_SUCCESS, TranslateT("All tasks completed but with errors (%d)"), errorCount); - else - AddToStatus(STATUS_SUCCESS, TranslateT("All tasks completed successfully")); - break; - } - else if (ret != ERROR_SUCCESS) - break; - } - - opts->bFinished = true; - ProcessingDone(); -} +/* +Miranda Database Tool +Copyright (C) 2001-2005 Richard Hughes + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "stdafx.h" + +void ProcessingDone(void); + +static bool ConvertOldEvent(DBEVENTINFO &dbei) +{ + if (dbei.flags & DBEF_UTF) + return false; + + if (dbei.flags == 1) { + dbei.flags = DBEF_UTF; + return true; + } + + int msglen = (int)mir_strlen((char *)dbei.pBlob) + 1, msglenW = 0; + if (msglen != (int)dbei.cbBlob) { + int count = ((dbei.cbBlob - msglen) / sizeof(wchar_t)); + wchar_t *p = (wchar_t *)&dbei.pBlob[msglen]; + for (int i = 0; i < count; i++) { + if (p[i] == 0) { + msglenW = i; + break; + } + } + } + + char *utf8str; + if (msglenW > 0 && msglenW <= msglen) + utf8str = mir_utf8encodeW((wchar_t *)&dbei.pBlob[msglen]); + else + utf8str = mir_utf8encode((char *)dbei.pBlob); + + if (utf8str == nullptr) + return false; + + mir_free(dbei.pBlob); + + dbei.flags |= DBEF_UTF; + dbei.cbBlob = (uint32_t)mir_strlen(utf8str); + dbei.pBlob = (uint8_t*)utf8str; + return true; +} + +static bool CompareContents(const DBEVENTINFO &ev1, const DBEVENTINFO &ev2) +{ + if (ev1.cbBlob == 0 && ev2.cbBlob == 0) + return true; + + if (ev1.cbBlob == 0 && ev2.cbBlob != 0 || ev1.cbBlob != 0 && ev2.cbBlob == 0) + return false; + + // both blobs should be compared + if (ev1.pBlob == 0 && ev2.pBlob == 0) + return false; + + return !memcmp(ev1.pBlob, ev2.pBlob, ev1.cbBlob); +} + +void __cdecl WorkerThread(DbToolOptions *opts) +{ + time_t ts = time(nullptr); + + AddToStatus(STATUS_MESSAGE, TranslateT("Database worker thread activated")); + + uint32_t sp = 0; + + if (opts->bMarkRead || opts->bCheckUtf || opts->bCheckDups) { + int nCount = 0, nUtfCount = 0, nDups = 0; + + for (auto &cc : Contacts()) { + DB::ECPTR pCursor(DB::Events(cc)); + DBEVENTINFO dboldev = {}; + while (MEVENT hEvent = pCursor.FetchNext()) { + DB::EventInfo dbei; + if (opts->bCheckUtf || opts->bCheckDups) // read also event's body + dbei.cbBlob = -1; + if (db_event_get(hEvent, &dbei)) + continue; + + if (opts->bMarkRead && !dbei.markedRead()) { + db_event_markRead(cc, hEvent); + nCount++; + } + + if (opts->bCheckUtf && dbei.eventType == EVENTTYPE_MESSAGE) { + if (ConvertOldEvent(dbei)) { + db_event_edit(cc, hEvent, &dbei); + nUtfCount++; + } + } + + if (opts->bCheckDups) { + if (dbei == dboldev && CompareContents(dbei, dboldev)) { + pCursor.DeleteEvent(); + nDups++; + } + else { + mir_free(dboldev.pBlob); + dboldev = dbei; + if (dboldev.cbBlob) { + dboldev.pBlob = (uint8_t *)mir_alloc(dboldev.cbBlob); + memcpy(dboldev.pBlob, dbei.pBlob, dboldev.cbBlob); + } + else dboldev.pBlob = nullptr; + } + } + } + mir_free(dboldev.pBlob); + } + + if (nCount) + AddToStatus(STATUS_MESSAGE, TranslateT("%d events marked as read"), nCount); + + if (nUtfCount) + AddToStatus(STATUS_MESSAGE, TranslateT("UTF-8 encoding fixed in %d events"), nUtfCount); + + if (nDups) + AddToStatus(STATUS_MESSAGE, TranslateT("%d duplicate events removed"), nDups); + } + + DBCHeckCallback callback; + callback.pfnAddLogMessage = AddToStatus; + opts->dbChecker->Start(&callback); + + for (int task = 0;; task++) { + if (callback.spaceProcessed / (callback.spaceUsed / 1000 + 1) > sp) { + sp = callback.spaceProcessed / (callback.spaceUsed / 1000 + 1); + SetProgressBar(sp); + } + WaitForSingleObject(opts->hEventRun, INFINITE); + if (WaitForSingleObject(opts->hEventAbort, 0) == WAIT_OBJECT_0) { + AddToStatus(STATUS_FATAL, TranslateT("Processing aborted by user")); + break; + } + + int ret = opts->dbChecker->CheckDb(task); + if (ret == ERROR_OUT_OF_PAPER) { + opts->dbChecker->Destroy(); + opts->dbChecker = nullptr; + + AddToStatus(STATUS_MESSAGE, TranslateT("Elapsed time: %d sec"), time(nullptr) - ts); + if (errorCount) + AddToStatus(STATUS_SUCCESS, TranslateT("All tasks completed but with errors (%d)"), errorCount); + else + AddToStatus(STATUS_SUCCESS, TranslateT("All tasks completed successfully")); + break; + } + else if (ret != ERROR_SUCCESS) + break; + } + + opts->bFinished = true; + ProcessingDone(); +} diff --git a/plugins/Dbx_sqlite/src/dbcheck.cpp b/plugins/Dbx_sqlite/src/dbcheck.cpp index 658d48cce6..7019503eec 100644 --- a/plugins/Dbx_sqlite/src/dbcheck.cpp +++ b/plugins/Dbx_sqlite/src/dbcheck.cpp @@ -1,110 +1,110 @@ -#include "stdafx.h" - -///////////////////////////////////////////////////////////////////////////////////////// -// first try to find events with wrong contact ids - -int CDbxSQLite::CheckPhase1() -{ - sqlite3_stmt *pQuery; - int rc = sqlite3_prepare_v2(m_db, "SELECT id, contact_id FROM events WHERE contact_id <> 0 AND contact_id NOT IN (SELECT id FROM contacts)", -1, &pQuery, nullptr); - logError(rc, __FILE__, __LINE__); - if (rc) - return rc; - - while (sqlite3_step(pQuery) == SQLITE_ROW) { - MEVENT hDbEvent = sqlite3_column_int(pQuery, 0); - MCONTACT hContact = sqlite3_column_int(pQuery, 1); - cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned event with wrong contact ID %d, deleting"), hContact)); - DeleteEvent(hDbEvent); - } - - sqlite3_finalize(pQuery); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// then we're wiping orphaned records from Events_srt which have no parent record in Events - -int CDbxSQLite::CheckPhase2() -{ - sqlite3_stmt *pQuery; - int rc = sqlite3_prepare_v2(m_db, "SELECT id, contact_id, timestamp FROM events_srt WHERE id NOT IN (SELECT id FROM events)", -1, &pQuery, nullptr); - logError(rc, __FILE__, __LINE__); - if (rc) - return rc; - - while (sqlite3_step(pQuery) == SQLITE_ROW) { - MEVENT hDbEvent = sqlite3_column_int(pQuery, 0); - MCONTACT hContact = sqlite3_column_int(pQuery, 1); - uint32_t ts = sqlite3_column_int(pQuery, 2); - - DeleteEventSrt(hDbEvent, hContact, ts); - cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned sorting event with wrong event ID %d:%08X, deleting"), hContact, hDbEvent)); - } - - sqlite3_finalize(pQuery); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// now try to find orphans in backward direction: from Events_srt to Events - -int CDbxSQLite::CheckPhase3() -{ - sqlite3_stmt *pQuery; - int rc = sqlite3_prepare_v2(m_db, "SELECT id, contact_id FROM events WHERE id NOT IN (SELECT id FROM events_srt)", -1, &pQuery, nullptr); - logError(rc, __FILE__, __LINE__); - if (rc) - return rc; - - while (sqlite3_step(pQuery) == SQLITE_ROW) { - MEVENT hDbEvent = sqlite3_column_int(pQuery, 0); - MCONTACT hContact = sqlite3_column_int(pQuery, 1); - - DeleteEventMain(hDbEvent); - cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned event with wrong event ID %d:%08X, deleting"), hContact, hDbEvent)); - } - - sqlite3_finalize(pQuery); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// remove settings with wrong contact ids - -int CDbxSQLite::CheckPhase4() -{ - sqlite3_stmt *pQuery; - int rc = sqlite3_prepare_v2(m_db, "SELECT contact_id,module,setting FROM settings WHERE contact_id <> 0 AND contact_id NOT IN (SELECT id FROM contacts)", -1, &pQuery, nullptr); - logError(rc, __FILE__, __LINE__); - if (rc) - return rc; - - while (sqlite3_step(pQuery) == SQLITE_ROW) { - MCONTACT hContact = sqlite3_column_int(pQuery, 0); - auto *szModule = (const char *)sqlite3_column_text(pQuery, 1); - auto *szSetting = (const char *)sqlite3_column_text(pQuery, 2); - - cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned setting [%S:%S] with wrong contact ID %d, deleting"), szModule, szSetting, hContact)); - DeleteContactSettingWorker(hContact, szModule, szSetting); - } - - sqlite3_finalize(pQuery); - return 0; -} - -/////////////////////////////////////////////////////////////////////////////// -// MIDatabaseChecker - -int CDbxSQLite::CheckDb(int phase) -{ - switch (phase) { - case 0: return CheckPhase1(); - case 1: return CheckPhase2(); - case 2: return CheckPhase3(); - case 3: return CheckPhase4(); - } - - DBFlush(true); - return ERROR_OUT_OF_PAPER; -} +#include "stdafx.h" + +///////////////////////////////////////////////////////////////////////////////////////// +// first try to find events with wrong contact ids + +int CDbxSQLite::CheckPhase1() +{ + sqlite3_stmt *pQuery; + int rc = sqlite3_prepare_v2(m_db, "SELECT id, contact_id FROM events WHERE contact_id <> 0 AND contact_id NOT IN (SELECT id FROM contacts)", -1, &pQuery, nullptr); + logError(rc, __FILE__, __LINE__); + if (rc) + return rc; + + while (sqlite3_step(pQuery) == SQLITE_ROW) { + MEVENT hDbEvent = sqlite3_column_int(pQuery, 0); + MCONTACT hContact = sqlite3_column_int(pQuery, 1); + cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned event with wrong contact ID %d, deleting"), hContact)); + DeleteEvent(hDbEvent); + } + + sqlite3_finalize(pQuery); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// then we're wiping orphaned records from Events_srt which have no parent record in Events + +int CDbxSQLite::CheckPhase2() +{ + sqlite3_stmt *pQuery; + int rc = sqlite3_prepare_v2(m_db, "SELECT id, contact_id, timestamp FROM events_srt WHERE id NOT IN (SELECT id FROM events)", -1, &pQuery, nullptr); + logError(rc, __FILE__, __LINE__); + if (rc) + return rc; + + while (sqlite3_step(pQuery) == SQLITE_ROW) { + MEVENT hDbEvent = sqlite3_column_int(pQuery, 0); + MCONTACT hContact = sqlite3_column_int(pQuery, 1); + uint32_t ts = sqlite3_column_int(pQuery, 2); + + DeleteEventSrt(hDbEvent, hContact, ts); + cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned sorting event with wrong event ID %d:%08X, deleting"), hContact, hDbEvent)); + } + + sqlite3_finalize(pQuery); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// now try to find orphans in backward direction: from Events_srt to Events + +int CDbxSQLite::CheckPhase3() +{ + sqlite3_stmt *pQuery; + int rc = sqlite3_prepare_v2(m_db, "SELECT id, contact_id FROM events WHERE id NOT IN (SELECT id FROM events_srt)", -1, &pQuery, nullptr); + logError(rc, __FILE__, __LINE__); + if (rc) + return rc; + + while (sqlite3_step(pQuery) == SQLITE_ROW) { + MEVENT hDbEvent = sqlite3_column_int(pQuery, 0); + MCONTACT hContact = sqlite3_column_int(pQuery, 1); + + DeleteEventMain(hDbEvent); + cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned event with wrong event ID %d:%08X, deleting"), hContact, hDbEvent)); + } + + sqlite3_finalize(pQuery); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// remove settings with wrong contact ids + +int CDbxSQLite::CheckPhase4() +{ + sqlite3_stmt *pQuery; + int rc = sqlite3_prepare_v2(m_db, "SELECT contact_id,module,setting FROM settings WHERE contact_id <> 0 AND contact_id NOT IN (SELECT id FROM contacts)", -1, &pQuery, nullptr); + logError(rc, __FILE__, __LINE__); + if (rc) + return rc; + + while (sqlite3_step(pQuery) == SQLITE_ROW) { + MCONTACT hContact = sqlite3_column_int(pQuery, 0); + auto *szModule = (const char *)sqlite3_column_text(pQuery, 1); + auto *szSetting = (const char *)sqlite3_column_text(pQuery, 2); + + cb->pfnAddLogMessage(STATUS_ERROR, CMStringW(FORMAT, TranslateT("Orphaned setting [%S:%S] with wrong contact ID %d, deleting"), szModule, szSetting, hContact)); + DeleteContactSettingWorker(hContact, szModule, szSetting); + } + + sqlite3_finalize(pQuery); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////// +// MIDatabaseChecker + +int CDbxSQLite::CheckDb(int phase) +{ + switch (phase) { + case 0: return CheckPhase1(); + case 1: return CheckPhase2(); + case 2: return CheckPhase3(); + case 3: return CheckPhase4(); + } + + DBFlush(true); + return ERROR_OUT_OF_PAPER; +} diff --git a/plugins/Dbx_sqlite/src/dbcontacts.cpp b/plugins/Dbx_sqlite/src/dbcontacts.cpp index 1cd6229da3..f66e5840e8 100644 --- a/plugins/Dbx_sqlite/src/dbcontacts.cpp +++ b/plugins/Dbx_sqlite/src/dbcontacts.cpp @@ -1,113 +1,113 @@ -#include "stdafx.h" - -void CDbxSQLite::InitContacts() -{ - sqlite3_stmt *stmt = nullptr; - sqlite3_prepare_v2(m_db, "SELECT contacts.id, COUNT(es.id) FROM contacts LEFT JOIN events_srt es ON es.contact_id = contacts.id GROUP BY contacts.id;", -1, &stmt, nullptr); - int rc = 0; - while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) { - MCONTACT hContact = sqlite3_column_int64(stmt, 0); - DBCachedContact *cc = (hContact) ? m_cache->AddContactToCache(hContact) : &m_system; - cc->m_count = sqlite3_column_int64(stmt, 1); - } - logError(rc, __FILE__, __LINE__); - sqlite3_finalize(stmt); -} - -int CDbxSQLite::GetContactCount() -{ - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("SELECT COUNT(1) FROM contacts LIMIT 1;", qCntCount); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - int count = sqlite3_column_int(stmt, 0); - sqlite3_reset(stmt); - return count; -} - -MCONTACT CDbxSQLite::AddContact() -{ - MCONTACT hContact = INVALID_CONTACT_ID; - { - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("INSERT INTO contacts VALUES (null);", qCntAdd); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - if (rc != SQLITE_DONE) - return INVALID_CONTACT_ID; - hContact = sqlite3_last_insert_rowid(m_db); - DBFlush(); - } - - DBCachedContact *cc = m_cache->AddContactToCache(hContact); - if (cc == nullptr) - return INVALID_CONTACT_ID; - - NotifyEventHooks(g_hevContactAdded, hContact); - return hContact; -} - -int CDbxSQLite::DeleteContact(MCONTACT hContact) -{ - // global contact cannot be removed - if (hContact == 0) - return 1; - - DBCachedContact *cc = m_cache->GetCachedContact(hContact); - if (cc == nullptr) - return 1; - - NotifyEventHooks(g_hevContactDeleted, hContact); - - mir_cslockfull lock(m_csDbAccess); - - sqlite3_stmt *stmt = InitQuery("DELETE FROM events WHERE contact_id = ?;", qCntDelEvents); - sqlite3_bind_int64(stmt, 1, hContact); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - if (rc != SQLITE_DONE) - return 1; - - stmt = InitQuery("DELETE FROM events_srt WHERE contact_id = ?;", qCntDelEventSrt); - sqlite3_bind_int64(stmt, 1, hContact); - rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - if (rc != SQLITE_DONE) - return 1; - - stmt = InitQuery("DELETE FROM settings WHERE contact_id = ?;", qCntDelSettings); - sqlite3_bind_int64(stmt, 1, hContact); - rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - if (rc != SQLITE_DONE) - return 1; - - stmt = InitQuery("DELETE FROM contacts WHERE id = ?;", qCntDel); - sqlite3_bind_int64(stmt, 1, hContact); - rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - if (rc != SQLITE_DONE) - return 1; - - m_cache->FreeCachedContact(hContact); - lock.unlock(); - - DBFlush(); - return 0; -} - -BOOL CDbxSQLite::IsDbContact(MCONTACT hContact) -{ - DBCachedContact *cc = m_cache->GetCachedContact(hContact); - return (cc != nullptr); -} - -int CDbxSQLite::GetContactSize(void) -{ - return sizeof(DBCachedContact); -} +#include "stdafx.h" + +void CDbxSQLite::InitContacts() +{ + sqlite3_stmt *stmt = nullptr; + sqlite3_prepare_v2(m_db, "SELECT contacts.id, COUNT(es.id) FROM contacts LEFT JOIN events_srt es ON es.contact_id = contacts.id GROUP BY contacts.id;", -1, &stmt, nullptr); + int rc = 0; + while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) { + MCONTACT hContact = sqlite3_column_int64(stmt, 0); + DBCachedContact *cc = (hContact) ? m_cache->AddContactToCache(hContact) : &m_system; + cc->m_count = sqlite3_column_int64(stmt, 1); + } + logError(rc, __FILE__, __LINE__); + sqlite3_finalize(stmt); +} + +int CDbxSQLite::GetContactCount() +{ + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("SELECT COUNT(1) FROM contacts LIMIT 1;", qCntCount); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + int count = sqlite3_column_int(stmt, 0); + sqlite3_reset(stmt); + return count; +} + +MCONTACT CDbxSQLite::AddContact() +{ + MCONTACT hContact = INVALID_CONTACT_ID; + { + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("INSERT INTO contacts VALUES (null);", qCntAdd); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + if (rc != SQLITE_DONE) + return INVALID_CONTACT_ID; + hContact = sqlite3_last_insert_rowid(m_db); + DBFlush(); + } + + DBCachedContact *cc = m_cache->AddContactToCache(hContact); + if (cc == nullptr) + return INVALID_CONTACT_ID; + + NotifyEventHooks(g_hevContactAdded, hContact); + return hContact; +} + +int CDbxSQLite::DeleteContact(MCONTACT hContact) +{ + // global contact cannot be removed + if (hContact == 0) + return 1; + + DBCachedContact *cc = m_cache->GetCachedContact(hContact); + if (cc == nullptr) + return 1; + + NotifyEventHooks(g_hevContactDeleted, hContact); + + mir_cslockfull lock(m_csDbAccess); + + sqlite3_stmt *stmt = InitQuery("DELETE FROM events WHERE contact_id = ?;", qCntDelEvents); + sqlite3_bind_int64(stmt, 1, hContact); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + if (rc != SQLITE_DONE) + return 1; + + stmt = InitQuery("DELETE FROM events_srt WHERE contact_id = ?;", qCntDelEventSrt); + sqlite3_bind_int64(stmt, 1, hContact); + rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + if (rc != SQLITE_DONE) + return 1; + + stmt = InitQuery("DELETE FROM settings WHERE contact_id = ?;", qCntDelSettings); + sqlite3_bind_int64(stmt, 1, hContact); + rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + if (rc != SQLITE_DONE) + return 1; + + stmt = InitQuery("DELETE FROM contacts WHERE id = ?;", qCntDel); + sqlite3_bind_int64(stmt, 1, hContact); + rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + if (rc != SQLITE_DONE) + return 1; + + m_cache->FreeCachedContact(hContact); + lock.unlock(); + + DBFlush(); + return 0; +} + +BOOL CDbxSQLite::IsDbContact(MCONTACT hContact) +{ + DBCachedContact *cc = m_cache->GetCachedContact(hContact); + return (cc != nullptr); +} + +int CDbxSQLite::GetContactSize(void) +{ + return sizeof(DBCachedContact); +} diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index f4a4618c2e..c4af7cf487 100644 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -1,699 +1,699 @@ -#include "stdafx.h" - -//TODO: hide it inside cursor class -static const char normal_order_query[] = "SELECT id FROM events_srt WHERE contact_id = ? ORDER BY timestamp, id;"; -static const char normal_order_pos_query[] = "SELECT id FROM events_srt WHERE contact_id = ? AND id >= ? ORDER BY timestamp, id;"; - -static const char reverse_order_query[] = "SELECT id FROM events_srt WHERE contact_id = ? ORDER BY timestamp desc, id DESC;"; -static const char reverse_order_pos_query[] = "SELECT id FROM events_srt WHERE contact_id = ? AND id <= ? ORDER BY timestamp desc, id DESC;"; - -static const char add_event_sort_query[] = "INSERT INTO events_srt(id, contact_id, timestamp) VALUES (?, ?, ?);"; - -void CDbxSQLite::InitEvents() -{ - sqlite3_stmt *stmt = nullptr; - sqlite3_prepare_v2(m_db, "SELECT DISTINCT module FROM events;", -1, &stmt, nullptr); - int rc = 0; - while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) { - const char *module = (char*)sqlite3_column_text(stmt, 0); - if (mir_strlen(module) > 0) - m_modules.insert(mir_strdup(module)); - } - logError(rc, __FILE__, __LINE__); - sqlite3_finalize(stmt); -} - -void CDbxSQLite::UninitEvents() -{ - for (auto &module : m_modules) - mir_free(module); - m_modules.destroy(); -} - -int CDbxSQLite::GetEventCount(MCONTACT hContact) -{ - DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; - if (cc == nullptr) - return 0; - - if (cc->HasCount()) - return cc->m_count; - - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("SELECT COUNT(1) FROM events_srt WHERE contact_id = ? LIMIT 1;", qEvCount); - sqlite3_bind_int64(stmt, 1, hContact); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - cc->m_count = (rc != SQLITE_ROW) ? 0 : sqlite3_column_int64(stmt, 0); - sqlite3_reset(stmt); - return cc->m_count; -} - -MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei) -{ - if (dbei == nullptr) - return 0; - - if (dbei->timestamp == 0) - return 0; - - MCONTACT hNotifyContact = hContact; - DBCachedContact *cc, *ccSub = nullptr; - if (hContact != 0) { - if ((cc = m_cache->GetCachedContact(hContact)) == nullptr) - return 0; - - if (cc->IsSub()) { - ccSub = cc; - if ((cc = m_cache->GetCachedContact(cc->parentID)) == nullptr) - return 0; - - // set default sub to the event's source - if (!(dbei->flags & DBEF_SENT)) - db_mc_setDefault(cc->contactID, hContact, false); - if (db_mc_isEnabled()) - hNotifyContact = cc->contactID; // and add an event to a metahistory - } - } - else cc = &m_system; - - if (cc == nullptr) - return 0; - - if (m_safetyMode) - if (NotifyEventHooks(g_hevEventFiltered, hNotifyContact, (LPARAM)dbei)) - return 0; - - DBEVENTINFO tmp = *dbei; - const char *szEventId; - if (tmp.szId != nullptr) { - tmp.flags |= DBEF_HAS_ID; - szEventId = tmp.szId; - } - else szEventId = ""; - - mir_ptr pCryptBlob; - if (m_bEncrypted) { - size_t len; - uint8_t *pResult = m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len); - if (pResult != nullptr) { - pCryptBlob = tmp.pBlob = pResult; - tmp.cbBlob = (uint16_t)len; - tmp.flags |= DBEF_ENCRYPTED; - } - } - - mir_cslockfull lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("INSERT INTO events(contact_id, module, timestamp, type, flags, data, server_id, is_read) VALUES (?, ?, ?, ?, ?, ?, ?, ?);", qEvAdd); - sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_text(stmt, 2, tmp.szModule, (int)mir_strlen(tmp.szModule), nullptr); - sqlite3_bind_int64(stmt, 3, tmp.timestamp); - sqlite3_bind_int(stmt, 4, tmp.eventType); - sqlite3_bind_int64(stmt, 5, tmp.flags); - sqlite3_bind_blob(stmt, 6, tmp.pBlob, tmp.cbBlob, nullptr); - sqlite3_bind_text(stmt, 7, szEventId, (int)mir_strlen(szEventId), nullptr); - sqlite3_bind_int(stmt, 8, tmp.markedRead()); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - - MEVENT hDbEvent = sqlite3_last_insert_rowid(m_db); - - stmt = InitQuery(add_event_sort_query, qEvAddSrt); - sqlite3_bind_int64(stmt, 1, hDbEvent); - sqlite3_bind_int64(stmt, 2, cc->contactID); - sqlite3_bind_int64(stmt, 3, tmp.timestamp); - rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - - if (ccSub != nullptr) { - stmt = InitQuery(add_event_sort_query, qEvAddSrt); - sqlite3_bind_int64(stmt, 1, hDbEvent); - sqlite3_bind_int64(stmt, 2, ccSub->contactID); - sqlite3_bind_int64(stmt, 3, tmp.timestamp); - rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); //is this necessary ? - } - - char *module = m_modules.find((char *)tmp.szModule); - if (module == nullptr) - m_modules.insert(mir_strdup(tmp.szModule)); - - lock.unlock(); - - DBFlush(); - if (m_safetyMode && !(tmp.flags & DBEF_TEMPORARY)) - NotifyEventHooks(g_hevEventAdded, hNotifyContact, (LPARAM)hDbEvent); - - return hDbEvent; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int CDbxSQLite::DeleteEventMain(MEVENT hDbEvent) -{ - auto *stmt = InitQuery("DELETE FROM events WHERE id = ?;", qEvDel); - sqlite3_bind_int64(stmt, 1, hDbEvent); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - return rc; -} - -int CDbxSQLite::DeleteEventSrt(MEVENT hDbEvent, MCONTACT hContact, uint32_t ts) -{ - auto *stmt = InitQuery("DELETE FROM events_srt WHERE id = ? AND contact_id = ? AND timestamp = ?;", qEvDelSrt); - sqlite3_bind_int64(stmt, 1, hDbEvent); - sqlite3_bind_int64(stmt, 2, hContact); - sqlite3_bind_int64(stmt, 3, ts); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - return rc; -} - -BOOL CDbxSQLite::DeleteEvent(MEVENT hDbEvent) -{ - if (hDbEvent == 0) - return 1; - - MEVENT hContact; - uint32_t ts; - { - sqlite3_stmt *stmt = InitQuery("SELECT contact_id, timestamp FROM events WHERE id = ? LIMIT 1;", qEvGetContact2); - sqlite3_bind_int64(stmt, 1, hDbEvent); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - sqlite3_reset(stmt); - return 2; - } - hContact = sqlite3_column_int64(stmt, 0); - ts = sqlite3_column_int64(stmt, 1); - sqlite3_reset(stmt); - } - - DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; - if (cc == nullptr) - return 1; - - mir_cslockfull lock(m_csDbAccess); - int rc = DeleteEventMain(hDbEvent); - if (rc != SQLITE_DONE) - return 1; - - rc = DeleteEventSrt(hDbEvent, hContact, ts); - if (rc != SQLITE_DONE) - return 1; - - lock.unlock(); - - DBFlush(); - NotifyEventHooks(g_hevEventDeleted, hContact, hDbEvent); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -BOOL CDbxSQLite::EditEvent(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *dbei) -{ - if (dbei == nullptr) - return 1; - - if (dbei->timestamp == 0) - return 1; - - DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; - if (cc == nullptr) - return 1; - - DBEVENTINFO tmp = *dbei; - mir_ptr pCryptBlob; - if (m_bEncrypted) { - size_t len; - uint8_t *pResult = m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len); - if (pResult != nullptr) { - pCryptBlob = tmp.pBlob = pResult; - tmp.cbBlob = (uint16_t)len; - tmp.flags |= DBEF_ENCRYPTED; - } - } - - mir_cslockfull lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("UPDATE events SET module = ?, timestamp = ?, type = ?, flags = ?, data = ?, is_read = ? WHERE id = ?;", qEvEdit); - sqlite3_bind_text(stmt, 1, tmp.szModule, (int)mir_strlen(tmp.szModule), nullptr); - sqlite3_bind_int64(stmt, 2, tmp.timestamp); - sqlite3_bind_int(stmt, 3, tmp.eventType); - sqlite3_bind_int64(stmt, 4, tmp.flags); - sqlite3_bind_blob(stmt, 5, tmp.pBlob, tmp.cbBlob, nullptr); - sqlite3_bind_int(stmt, 6, tmp.markedRead()); - sqlite3_bind_int64(stmt, 7, hDbEvent); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - - char *module = m_modules.find((char *)tmp.szModule); - if (module == nullptr) - m_modules.insert(mir_strdup(tmp.szModule)); - - lock.unlock(); - - DBFlush(); - NotifyEventHooks(g_hevEventEdited, hContact, (LPARAM)hDbEvent); - return 0; -} - -int CDbxSQLite::GetBlobSize(MEVENT hDbEvent) -{ - if (hDbEvent == 0) - return -1; - - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("SELECT LENGTH(data) FROM events WHERE id = ? LIMIT 1;", qEvBlobSize); - sqlite3_bind_int(stmt, 1, hDbEvent); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - sqlite3_reset(stmt); - return -1; - } - - LONG res = sqlite3_column_int64(stmt, 0); - sqlite3_reset(stmt); - return res; -} - -static char g_szId[100]; - -BOOL CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) -{ - if (hDbEvent == 0) - return 1; - - if (dbei == nullptr) - return 1; - - if (dbei->cbBlob > 0 && dbei->pBlob == nullptr) { - dbei->cbBlob = 0; - return 1; - } - - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("SELECT module, timestamp, type, flags, server_id, length(data), data FROM events WHERE id = ? LIMIT 1;", qEvGet); - sqlite3_bind_int64(stmt, 1, hDbEvent); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - sqlite3_reset(stmt); - return 1; - } - - char *module = (char *)sqlite3_column_text(stmt, 0); - dbei->szModule = m_modules.find(module); - if (dbei->szModule == nullptr) - return 1; - - dbei->timestamp = sqlite3_column_int64(stmt, 1); - dbei->eventType = sqlite3_column_int(stmt, 2); - dbei->flags = sqlite3_column_int64(stmt, 3); - - char *pszId = (char *)sqlite3_column_text(stmt, 4); - if (mir_strlen(pszId)) { - mir_strncpy(g_szId, pszId, sizeof(g_szId)); - dbei->szId = g_szId; - } - else dbei->szId = nullptr; - - int32_t cbBlob = sqlite3_column_int64(stmt, 5); - size_t bytesToCopy = cbBlob; - if (dbei->cbBlob == -1) - dbei->pBlob = (uint8_t*)mir_calloc(cbBlob + 2); - else if (dbei->cbBlob < cbBlob) - bytesToCopy = dbei->cbBlob; - - dbei->cbBlob = cbBlob; - if (bytesToCopy && dbei->pBlob) { - uint8_t *data = (uint8_t *)sqlite3_column_blob(stmt, 6); - - if (dbei->flags & DBEF_ENCRYPTED) { - dbei->flags &= ~DBEF_ENCRYPTED; - size_t len; - uint8_t* pBlob = (uint8_t*)m_crypto->decodeBuffer(data, cbBlob, &len); - if (pBlob == nullptr) - return 1; - - memcpy(dbei->pBlob, pBlob, bytesToCopy); - if (bytesToCopy > len) - memset(dbei->pBlob + len, 0, bytesToCopy - len); - - mir_free(pBlob); - } - else memcpy(dbei->pBlob, data, bytesToCopy); - } - sqlite3_reset(stmt); - return 0; -} - -BOOL CDbxSQLite::MarkEventRead(MCONTACT hContact, MEVENT hDbEvent) -{ - if (hDbEvent == 0) - return -1; - - DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; - if (cc == nullptr) - return -1; - - int rows; - { - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("UPDATE events SET flags = flags | 4, is_read = 1 WHERE id = ? AND is_read = 0;", qEvSetFlags); - sqlite3_bind_int64(stmt, 1, hDbEvent); - int rc = sqlite3_step(stmt); - rows = sqlite3_changes(m_db); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - if (rc != SQLITE_DONE) - return -1; - } - - DBFlush(); - NotifyEventHooks(g_hevMarkedRead, hContact, (LPARAM)hDbEvent); - return (rows == 0 ? 0 : DBEF_READ); -} - -MCONTACT CDbxSQLite::GetEventContact(MEVENT hDbEvent) -{ - if (hDbEvent == 0) - return INVALID_CONTACT_ID; - - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("SELECT contact_id FROM events WHERE id = ? LIMIT 1;", qEvGetContact); - sqlite3_bind_int64(stmt, 1, hDbEvent); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - sqlite3_reset(stmt); - return INVALID_CONTACT_ID; - } - MCONTACT hContact = sqlite3_column_int64(stmt, 0); - sqlite3_reset(stmt); - return hContact; -} - -MEVENT CDbxSQLite::FindFirstUnreadEvent(MCONTACT hContact) -{ - DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; - if (cc == nullptr) - return 0; - - mir_cslock lock(m_csDbAccess); - - if (cc->IsMeta()) { - if (cc->nSubs == 0) - return 0; - - CMStringA query("SELECT id FROM events WHERE is_read = 0 AND contact_id IN ("); - for (int k = 0; k < cc->nSubs; k++) - query.AppendFormat("%lu, ", cc->pSubs[k]); - query.Delete(query.GetLength() - 2, 2); - query.Append(") ORDER BY timestamp LIMIT 1;"); - - sqlite3_stmt *stmt; - sqlite3_prepare_v2(m_db, query, -1, &stmt, nullptr); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - sqlite3_finalize(stmt); - return 0; - } - - MEVENT ret = sqlite3_column_int64(stmt, 0); - sqlite3_finalize(stmt); - return ret; - } - - sqlite3_stmt *stmt = InitQuery("SELECT id FROM events WHERE contact_id = ? AND is_read = 0 ORDER BY timestamp LIMIT 1;", qEvFindUnread); - sqlite3_bind_int64(stmt, 1, hContact); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - sqlite3_reset(stmt); - return 0; - } - - MEVENT ret = sqlite3_column_int64(stmt, 0); - sqlite3_reset(stmt); - return ret; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// First/next event - -MEVENT CDbxSQLite::FindFirstEvent(MCONTACT hContact) -{ - DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; - if (cc == nullptr) - return 0; - - mir_cslock lock(m_csDbAccess); - - if (fwd.cur) - sqlite3_reset(fwd.cur); - - fwd.hContact = hContact; - fwd.cur = InitQuery(normal_order_query, qEvFindFirst); - sqlite3_bind_int64(fwd.cur, 1, hContact); - - int rc = sqlite3_step(fwd.cur); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - fwd.clear(); - return 0; - } - return fwd.hEvent = sqlite3_column_int64(fwd.cur, 0); -} - -MEVENT CDbxSQLite::FindNextEvent(MCONTACT hContact, MEVENT hDbEvent) -{ - if (hDbEvent == 0) - return 0; - - DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; - if (cc == nullptr) - return 0; - - if (hContact != fwd.hContact || hDbEvent != fwd.hEvent) { - if (fwd.cur) - sqlite3_reset(fwd.cur); - - fwd.hContact = hContact; - fwd.cur = InitQuery("SELECT id FROM events_srt WHERE contact_id = ? AND id > ? ORDER BY timestamp, id;", qEvFindNext); - sqlite3_bind_int64(fwd.cur, 1, hContact); - sqlite3_bind_int64(fwd.cur, 2, hDbEvent); - } - - int rc = sqlite3_step(fwd.cur); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - fwd.clear(); - return 0; - } - - return fwd.hEvent = sqlite3_column_int64(fwd.cur, 0); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Last/prev event - -MEVENT CDbxSQLite::FindLastEvent(MCONTACT hContact) -{ - DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; - if (cc == nullptr) - return 0; - - mir_cslock lock(m_csDbAccess); - - if (back.cur) - sqlite3_reset(back.cur); - - back.hContact = hContact; - back.cur = InitQuery(reverse_order_query, qEvFindLast); - sqlite3_bind_int64(back.cur, 1, hContact); - int rc = sqlite3_step(back.cur); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - back.clear(); - return 0; - } - - return back.hEvent = sqlite3_column_int64(back.cur, 0); -} - -MEVENT CDbxSQLite::FindPrevEvent(MCONTACT hContact, MEVENT hDbEvent) -{ - if (hDbEvent == 0) - return 0; - - DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; - if (cc == nullptr) - return 0; - - if (hContact != back.hContact || hDbEvent != back.hEvent) { - if (back.cur) - sqlite3_reset(back.cur); - - back.hContact = hContact; - back.cur = InitQuery("SELECT id FROM events_srt WHERE contact_id = ? AND id < ? ORDER BY timestamp desc, id DESC;", qEvFindPrev); - sqlite3_bind_int64(back.cur, 1, hContact); - sqlite3_bind_int64(back.cur, 2, hDbEvent); - } - - int rc = sqlite3_step(back.cur); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - back.clear(); - return 0; - } - - return back.hEvent = sqlite3_column_int64(back.cur, 0); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Metacontacts - -BOOL CDbxSQLite::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) -{ - //TODO: test this - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("SELECT id, timestamp FROM events WHERE contact_id = ?;", qEvMetaMerge); - sqlite3_bind_int64(stmt, 1, ccSub->contactID); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - while (rc == SQLITE_ROW) { - sqlite3_stmt *stmt2 = InitQuery(add_event_sort_query, qEvAddSrt); - sqlite3_bind_int64(stmt2, 1, sqlite3_column_int64(stmt, 0)); - sqlite3_bind_int64(stmt2, 2, ccMeta->contactID); - sqlite3_bind_int64(stmt2, 3, sqlite3_column_int64(stmt, 1)); - int rc2 = sqlite3_step(stmt2); - logError(rc2, __FILE__, __LINE__); - sqlite3_reset(stmt2); - rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - } - - sqlite3_reset(stmt); - DBFlush(); - return TRUE; -} - -BOOL CDbxSQLite::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *) -{ - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("DELETE FROM events_srt WHERE contact_id = ?;", qEvMetaSplit); - sqlite3_bind_int64(stmt, 1, ccMeta->contactID); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - if (rc != SQLITE_DONE) - return 1; - - DBFlush(); - return TRUE; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Server ids - -MEVENT CDbxSQLite::GetEventById(LPCSTR szModule, LPCSTR szId) -{ - if (szModule == nullptr || szId == nullptr) - return 0; - - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("SELECT id, timestamp FROM events WHERE module = ? AND server_id = ? LIMIT 1;", qEvGetById); - sqlite3_bind_text(stmt, 1, szModule, (int)mir_strlen(szModule), nullptr); - sqlite3_bind_text(stmt, 2, szId, (int)mir_strlen(szId), nullptr); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - sqlite3_reset(stmt); - return 0; - } - MEVENT hDbEvent = sqlite3_column_int64(stmt, 0); - sqlite3_reset(stmt); - return hDbEvent; -} - -int CDbxSQLite::UpdateEventId(MEVENT hDbEvent, LPCSTR szId) -{ - if (hDbEvent == 0 || mir_strlen(szId) == 0) - return 1; - - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("UPDATE events SET server_id = ? WHERE id = ?;", qEvUpdateId); - sqlite3_bind_text(stmt, 1, szId, (int)mir_strlen(szId), nullptr); - sqlite3_bind_int64(stmt, 2, hDbEvent); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - int rows = sqlite3_changes(m_db); - sqlite3_reset(stmt); - return (rows == 0) ? 2 : 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Event cursors - -STDMETHODIMP_(DB::EventCursor *) CDbxSQLite::EventCursor(MCONTACT hContact, MEVENT hDbEvent) -{ - return new CDbxSQLiteEventCursor(hContact, m_db, hDbEvent); -} - -STDMETHODIMP_(DB::EventCursor *) CDbxSQLite::EventCursorRev(MCONTACT hContact, MEVENT hDbEvent) -{ - return new CDbxSQLiteEventCursor(hContact, m_db, hDbEvent, true); -} - -CDbxSQLiteEventCursor::CDbxSQLiteEventCursor(MCONTACT _1, sqlite3 *_db, MEVENT hDbEvent, bool reverse) : - EventCursor(_1), m_db(_db) -{ - if (reverse) { - if (!hDbEvent) - sqlite3_prepare_v2(m_db, reverse_order_query, -1, &cursor, nullptr); - else - sqlite3_prepare_v2(m_db, reverse_order_pos_query, -1, &cursor, nullptr); - } - else { - if (!hDbEvent) - sqlite3_prepare_v2(m_db, normal_order_query, -1, &cursor, nullptr); - else - sqlite3_prepare_v2(m_db, normal_order_pos_query, -1, &cursor, nullptr); - } - sqlite3_bind_int64(cursor, 1, hContact); - if (hDbEvent) - sqlite3_bind_int64(cursor, 2, hDbEvent); -} - -CDbxSQLiteEventCursor::~CDbxSQLiteEventCursor() -{ - if (cursor) - sqlite3_reset(cursor); -} - -MEVENT CDbxSQLiteEventCursor::FetchNext() -{ - if (!cursor) - return 0; - - int rc = sqlite3_step(cursor); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_ROW) { - //empty response - //reset sql cursor - sqlite3_reset(cursor); - cursor = nullptr; - return 0; - } - return sqlite3_column_int64(cursor, 0); -} +#include "stdafx.h" + +//TODO: hide it inside cursor class +static const char normal_order_query[] = "SELECT id FROM events_srt WHERE contact_id = ? ORDER BY timestamp, id;"; +static const char normal_order_pos_query[] = "SELECT id FROM events_srt WHERE contact_id = ? AND id >= ? ORDER BY timestamp, id;"; + +static const char reverse_order_query[] = "SELECT id FROM events_srt WHERE contact_id = ? ORDER BY timestamp desc, id DESC;"; +static const char reverse_order_pos_query[] = "SELECT id FROM events_srt WHERE contact_id = ? AND id <= ? ORDER BY timestamp desc, id DESC;"; + +static const char add_event_sort_query[] = "INSERT INTO events_srt(id, contact_id, timestamp) VALUES (?, ?, ?);"; + +void CDbxSQLite::InitEvents() +{ + sqlite3_stmt *stmt = nullptr; + sqlite3_prepare_v2(m_db, "SELECT DISTINCT module FROM events;", -1, &stmt, nullptr); + int rc = 0; + while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) { + const char *module = (char*)sqlite3_column_text(stmt, 0); + if (mir_strlen(module) > 0) + m_modules.insert(mir_strdup(module)); + } + logError(rc, __FILE__, __LINE__); + sqlite3_finalize(stmt); +} + +void CDbxSQLite::UninitEvents() +{ + for (auto &module : m_modules) + mir_free(module); + m_modules.destroy(); +} + +int CDbxSQLite::GetEventCount(MCONTACT hContact) +{ + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return 0; + + if (cc->HasCount()) + return cc->m_count; + + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("SELECT COUNT(1) FROM events_srt WHERE contact_id = ? LIMIT 1;", qEvCount); + sqlite3_bind_int64(stmt, 1, hContact); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + cc->m_count = (rc != SQLITE_ROW) ? 0 : sqlite3_column_int64(stmt, 0); + sqlite3_reset(stmt); + return cc->m_count; +} + +MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei) +{ + if (dbei == nullptr) + return 0; + + if (dbei->timestamp == 0) + return 0; + + MCONTACT hNotifyContact = hContact; + DBCachedContact *cc, *ccSub = nullptr; + if (hContact != 0) { + if ((cc = m_cache->GetCachedContact(hContact)) == nullptr) + return 0; + + if (cc->IsSub()) { + ccSub = cc; + if ((cc = m_cache->GetCachedContact(cc->parentID)) == nullptr) + return 0; + + // set default sub to the event's source + if (!(dbei->flags & DBEF_SENT)) + db_mc_setDefault(cc->contactID, hContact, false); + if (db_mc_isEnabled()) + hNotifyContact = cc->contactID; // and add an event to a metahistory + } + } + else cc = &m_system; + + if (cc == nullptr) + return 0; + + if (m_safetyMode) + if (NotifyEventHooks(g_hevEventFiltered, hNotifyContact, (LPARAM)dbei)) + return 0; + + DBEVENTINFO tmp = *dbei; + const char *szEventId; + if (tmp.szId != nullptr) { + tmp.flags |= DBEF_HAS_ID; + szEventId = tmp.szId; + } + else szEventId = ""; + + mir_ptr pCryptBlob; + if (m_bEncrypted) { + size_t len; + uint8_t *pResult = m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len); + if (pResult != nullptr) { + pCryptBlob = tmp.pBlob = pResult; + tmp.cbBlob = (uint16_t)len; + tmp.flags |= DBEF_ENCRYPTED; + } + } + + mir_cslockfull lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("INSERT INTO events(contact_id, module, timestamp, type, flags, data, server_id, is_read) VALUES (?, ?, ?, ?, ?, ?, ?, ?);", qEvAdd); + sqlite3_bind_int64(stmt, 1, hContact); + sqlite3_bind_text(stmt, 2, tmp.szModule, (int)mir_strlen(tmp.szModule), nullptr); + sqlite3_bind_int64(stmt, 3, tmp.timestamp); + sqlite3_bind_int(stmt, 4, tmp.eventType); + sqlite3_bind_int64(stmt, 5, tmp.flags); + sqlite3_bind_blob(stmt, 6, tmp.pBlob, tmp.cbBlob, nullptr); + sqlite3_bind_text(stmt, 7, szEventId, (int)mir_strlen(szEventId), nullptr); + sqlite3_bind_int(stmt, 8, tmp.markedRead()); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + + MEVENT hDbEvent = sqlite3_last_insert_rowid(m_db); + + stmt = InitQuery(add_event_sort_query, qEvAddSrt); + sqlite3_bind_int64(stmt, 1, hDbEvent); + sqlite3_bind_int64(stmt, 2, cc->contactID); + sqlite3_bind_int64(stmt, 3, tmp.timestamp); + rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + + if (ccSub != nullptr) { + stmt = InitQuery(add_event_sort_query, qEvAddSrt); + sqlite3_bind_int64(stmt, 1, hDbEvent); + sqlite3_bind_int64(stmt, 2, ccSub->contactID); + sqlite3_bind_int64(stmt, 3, tmp.timestamp); + rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); //is this necessary ? + } + + char *module = m_modules.find((char *)tmp.szModule); + if (module == nullptr) + m_modules.insert(mir_strdup(tmp.szModule)); + + lock.unlock(); + + DBFlush(); + if (m_safetyMode && !(tmp.flags & DBEF_TEMPORARY)) + NotifyEventHooks(g_hevEventAdded, hNotifyContact, (LPARAM)hDbEvent); + + return hDbEvent; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int CDbxSQLite::DeleteEventMain(MEVENT hDbEvent) +{ + auto *stmt = InitQuery("DELETE FROM events WHERE id = ?;", qEvDel); + sqlite3_bind_int64(stmt, 1, hDbEvent); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + return rc; +} + +int CDbxSQLite::DeleteEventSrt(MEVENT hDbEvent, MCONTACT hContact, uint32_t ts) +{ + auto *stmt = InitQuery("DELETE FROM events_srt WHERE id = ? AND contact_id = ? AND timestamp = ?;", qEvDelSrt); + sqlite3_bind_int64(stmt, 1, hDbEvent); + sqlite3_bind_int64(stmt, 2, hContact); + sqlite3_bind_int64(stmt, 3, ts); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + return rc; +} + +BOOL CDbxSQLite::DeleteEvent(MEVENT hDbEvent) +{ + if (hDbEvent == 0) + return 1; + + MEVENT hContact; + uint32_t ts; + { + sqlite3_stmt *stmt = InitQuery("SELECT contact_id, timestamp FROM events WHERE id = ? LIMIT 1;", qEvGetContact2); + sqlite3_bind_int64(stmt, 1, hDbEvent); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + sqlite3_reset(stmt); + return 2; + } + hContact = sqlite3_column_int64(stmt, 0); + ts = sqlite3_column_int64(stmt, 1); + sqlite3_reset(stmt); + } + + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return 1; + + mir_cslockfull lock(m_csDbAccess); + int rc = DeleteEventMain(hDbEvent); + if (rc != SQLITE_DONE) + return 1; + + rc = DeleteEventSrt(hDbEvent, hContact, ts); + if (rc != SQLITE_DONE) + return 1; + + lock.unlock(); + + DBFlush(); + NotifyEventHooks(g_hevEventDeleted, hContact, hDbEvent); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +BOOL CDbxSQLite::EditEvent(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *dbei) +{ + if (dbei == nullptr) + return 1; + + if (dbei->timestamp == 0) + return 1; + + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return 1; + + DBEVENTINFO tmp = *dbei; + mir_ptr pCryptBlob; + if (m_bEncrypted) { + size_t len; + uint8_t *pResult = m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len); + if (pResult != nullptr) { + pCryptBlob = tmp.pBlob = pResult; + tmp.cbBlob = (uint16_t)len; + tmp.flags |= DBEF_ENCRYPTED; + } + } + + mir_cslockfull lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("UPDATE events SET module = ?, timestamp = ?, type = ?, flags = ?, data = ?, is_read = ? WHERE id = ?;", qEvEdit); + sqlite3_bind_text(stmt, 1, tmp.szModule, (int)mir_strlen(tmp.szModule), nullptr); + sqlite3_bind_int64(stmt, 2, tmp.timestamp); + sqlite3_bind_int(stmt, 3, tmp.eventType); + sqlite3_bind_int64(stmt, 4, tmp.flags); + sqlite3_bind_blob(stmt, 5, tmp.pBlob, tmp.cbBlob, nullptr); + sqlite3_bind_int(stmt, 6, tmp.markedRead()); + sqlite3_bind_int64(stmt, 7, hDbEvent); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + + char *module = m_modules.find((char *)tmp.szModule); + if (module == nullptr) + m_modules.insert(mir_strdup(tmp.szModule)); + + lock.unlock(); + + DBFlush(); + NotifyEventHooks(g_hevEventEdited, hContact, (LPARAM)hDbEvent); + return 0; +} + +int CDbxSQLite::GetBlobSize(MEVENT hDbEvent) +{ + if (hDbEvent == 0) + return -1; + + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("SELECT LENGTH(data) FROM events WHERE id = ? LIMIT 1;", qEvBlobSize); + sqlite3_bind_int(stmt, 1, hDbEvent); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + sqlite3_reset(stmt); + return -1; + } + + LONG res = sqlite3_column_int64(stmt, 0); + sqlite3_reset(stmt); + return res; +} + +static char g_szId[100]; + +BOOL CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) +{ + if (hDbEvent == 0) + return 1; + + if (dbei == nullptr) + return 1; + + if (dbei->cbBlob > 0 && dbei->pBlob == nullptr) { + dbei->cbBlob = 0; + return 1; + } + + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("SELECT module, timestamp, type, flags, server_id, length(data), data FROM events WHERE id = ? LIMIT 1;", qEvGet); + sqlite3_bind_int64(stmt, 1, hDbEvent); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + sqlite3_reset(stmt); + return 1; + } + + char *module = (char *)sqlite3_column_text(stmt, 0); + dbei->szModule = m_modules.find(module); + if (dbei->szModule == nullptr) + return 1; + + dbei->timestamp = sqlite3_column_int64(stmt, 1); + dbei->eventType = sqlite3_column_int(stmt, 2); + dbei->flags = sqlite3_column_int64(stmt, 3); + + char *pszId = (char *)sqlite3_column_text(stmt, 4); + if (mir_strlen(pszId)) { + mir_strncpy(g_szId, pszId, sizeof(g_szId)); + dbei->szId = g_szId; + } + else dbei->szId = nullptr; + + int32_t cbBlob = sqlite3_column_int64(stmt, 5); + size_t bytesToCopy = cbBlob; + if (dbei->cbBlob == -1) + dbei->pBlob = (uint8_t*)mir_calloc(cbBlob + 2); + else if (dbei->cbBlob < cbBlob) + bytesToCopy = dbei->cbBlob; + + dbei->cbBlob = cbBlob; + if (bytesToCopy && dbei->pBlob) { + uint8_t *data = (uint8_t *)sqlite3_column_blob(stmt, 6); + + if (dbei->flags & DBEF_ENCRYPTED) { + dbei->flags &= ~DBEF_ENCRYPTED; + size_t len; + uint8_t* pBlob = (uint8_t*)m_crypto->decodeBuffer(data, cbBlob, &len); + if (pBlob == nullptr) + return 1; + + memcpy(dbei->pBlob, pBlob, bytesToCopy); + if (bytesToCopy > len) + memset(dbei->pBlob + len, 0, bytesToCopy - len); + + mir_free(pBlob); + } + else memcpy(dbei->pBlob, data, bytesToCopy); + } + sqlite3_reset(stmt); + return 0; +} + +BOOL CDbxSQLite::MarkEventRead(MCONTACT hContact, MEVENT hDbEvent) +{ + if (hDbEvent == 0) + return -1; + + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return -1; + + int rows; + { + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("UPDATE events SET flags = flags | 4, is_read = 1 WHERE id = ? AND is_read = 0;", qEvSetFlags); + sqlite3_bind_int64(stmt, 1, hDbEvent); + int rc = sqlite3_step(stmt); + rows = sqlite3_changes(m_db); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + if (rc != SQLITE_DONE) + return -1; + } + + DBFlush(); + NotifyEventHooks(g_hevMarkedRead, hContact, (LPARAM)hDbEvent); + return (rows == 0 ? 0 : DBEF_READ); +} + +MCONTACT CDbxSQLite::GetEventContact(MEVENT hDbEvent) +{ + if (hDbEvent == 0) + return INVALID_CONTACT_ID; + + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("SELECT contact_id FROM events WHERE id = ? LIMIT 1;", qEvGetContact); + sqlite3_bind_int64(stmt, 1, hDbEvent); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + sqlite3_reset(stmt); + return INVALID_CONTACT_ID; + } + MCONTACT hContact = sqlite3_column_int64(stmt, 0); + sqlite3_reset(stmt); + return hContact; +} + +MEVENT CDbxSQLite::FindFirstUnreadEvent(MCONTACT hContact) +{ + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return 0; + + mir_cslock lock(m_csDbAccess); + + if (cc->IsMeta()) { + if (cc->nSubs == 0) + return 0; + + CMStringA query("SELECT id FROM events WHERE is_read = 0 AND contact_id IN ("); + for (int k = 0; k < cc->nSubs; k++) + query.AppendFormat("%lu, ", cc->pSubs[k]); + query.Delete(query.GetLength() - 2, 2); + query.Append(") ORDER BY timestamp LIMIT 1;"); + + sqlite3_stmt *stmt; + sqlite3_prepare_v2(m_db, query, -1, &stmt, nullptr); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + sqlite3_finalize(stmt); + return 0; + } + + MEVENT ret = sqlite3_column_int64(stmt, 0); + sqlite3_finalize(stmt); + return ret; + } + + sqlite3_stmt *stmt = InitQuery("SELECT id FROM events WHERE contact_id = ? AND is_read = 0 ORDER BY timestamp LIMIT 1;", qEvFindUnread); + sqlite3_bind_int64(stmt, 1, hContact); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + sqlite3_reset(stmt); + return 0; + } + + MEVENT ret = sqlite3_column_int64(stmt, 0); + sqlite3_reset(stmt); + return ret; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// First/next event + +MEVENT CDbxSQLite::FindFirstEvent(MCONTACT hContact) +{ + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return 0; + + mir_cslock lock(m_csDbAccess); + + if (fwd.cur) + sqlite3_reset(fwd.cur); + + fwd.hContact = hContact; + fwd.cur = InitQuery(normal_order_query, qEvFindFirst); + sqlite3_bind_int64(fwd.cur, 1, hContact); + + int rc = sqlite3_step(fwd.cur); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + fwd.clear(); + return 0; + } + return fwd.hEvent = sqlite3_column_int64(fwd.cur, 0); +} + +MEVENT CDbxSQLite::FindNextEvent(MCONTACT hContact, MEVENT hDbEvent) +{ + if (hDbEvent == 0) + return 0; + + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return 0; + + if (hContact != fwd.hContact || hDbEvent != fwd.hEvent) { + if (fwd.cur) + sqlite3_reset(fwd.cur); + + fwd.hContact = hContact; + fwd.cur = InitQuery("SELECT id FROM events_srt WHERE contact_id = ? AND id > ? ORDER BY timestamp, id;", qEvFindNext); + sqlite3_bind_int64(fwd.cur, 1, hContact); + sqlite3_bind_int64(fwd.cur, 2, hDbEvent); + } + + int rc = sqlite3_step(fwd.cur); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + fwd.clear(); + return 0; + } + + return fwd.hEvent = sqlite3_column_int64(fwd.cur, 0); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Last/prev event + +MEVENT CDbxSQLite::FindLastEvent(MCONTACT hContact) +{ + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return 0; + + mir_cslock lock(m_csDbAccess); + + if (back.cur) + sqlite3_reset(back.cur); + + back.hContact = hContact; + back.cur = InitQuery(reverse_order_query, qEvFindLast); + sqlite3_bind_int64(back.cur, 1, hContact); + int rc = sqlite3_step(back.cur); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + back.clear(); + return 0; + } + + return back.hEvent = sqlite3_column_int64(back.cur, 0); +} + +MEVENT CDbxSQLite::FindPrevEvent(MCONTACT hContact, MEVENT hDbEvent) +{ + if (hDbEvent == 0) + return 0; + + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return 0; + + if (hContact != back.hContact || hDbEvent != back.hEvent) { + if (back.cur) + sqlite3_reset(back.cur); + + back.hContact = hContact; + back.cur = InitQuery("SELECT id FROM events_srt WHERE contact_id = ? AND id < ? ORDER BY timestamp desc, id DESC;", qEvFindPrev); + sqlite3_bind_int64(back.cur, 1, hContact); + sqlite3_bind_int64(back.cur, 2, hDbEvent); + } + + int rc = sqlite3_step(back.cur); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + back.clear(); + return 0; + } + + return back.hEvent = sqlite3_column_int64(back.cur, 0); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Metacontacts + +BOOL CDbxSQLite::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) +{ + //TODO: test this + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("SELECT id, timestamp FROM events WHERE contact_id = ?;", qEvMetaMerge); + sqlite3_bind_int64(stmt, 1, ccSub->contactID); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + while (rc == SQLITE_ROW) { + sqlite3_stmt *stmt2 = InitQuery(add_event_sort_query, qEvAddSrt); + sqlite3_bind_int64(stmt2, 1, sqlite3_column_int64(stmt, 0)); + sqlite3_bind_int64(stmt2, 2, ccMeta->contactID); + sqlite3_bind_int64(stmt2, 3, sqlite3_column_int64(stmt, 1)); + int rc2 = sqlite3_step(stmt2); + logError(rc2, __FILE__, __LINE__); + sqlite3_reset(stmt2); + rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + } + + sqlite3_reset(stmt); + DBFlush(); + return TRUE; +} + +BOOL CDbxSQLite::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *) +{ + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("DELETE FROM events_srt WHERE contact_id = ?;", qEvMetaSplit); + sqlite3_bind_int64(stmt, 1, ccMeta->contactID); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + if (rc != SQLITE_DONE) + return 1; + + DBFlush(); + return TRUE; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Server ids + +MEVENT CDbxSQLite::GetEventById(LPCSTR szModule, LPCSTR szId) +{ + if (szModule == nullptr || szId == nullptr) + return 0; + + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("SELECT id, timestamp FROM events WHERE module = ? AND server_id = ? LIMIT 1;", qEvGetById); + sqlite3_bind_text(stmt, 1, szModule, (int)mir_strlen(szModule), nullptr); + sqlite3_bind_text(stmt, 2, szId, (int)mir_strlen(szId), nullptr); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + sqlite3_reset(stmt); + return 0; + } + MEVENT hDbEvent = sqlite3_column_int64(stmt, 0); + sqlite3_reset(stmt); + return hDbEvent; +} + +int CDbxSQLite::UpdateEventId(MEVENT hDbEvent, LPCSTR szId) +{ + if (hDbEvent == 0 || mir_strlen(szId) == 0) + return 1; + + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("UPDATE events SET server_id = ? WHERE id = ?;", qEvUpdateId); + sqlite3_bind_text(stmt, 1, szId, (int)mir_strlen(szId), nullptr); + sqlite3_bind_int64(stmt, 2, hDbEvent); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + int rows = sqlite3_changes(m_db); + sqlite3_reset(stmt); + return (rows == 0) ? 2 : 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Event cursors + +STDMETHODIMP_(DB::EventCursor *) CDbxSQLite::EventCursor(MCONTACT hContact, MEVENT hDbEvent) +{ + return new CDbxSQLiteEventCursor(hContact, m_db, hDbEvent); +} + +STDMETHODIMP_(DB::EventCursor *) CDbxSQLite::EventCursorRev(MCONTACT hContact, MEVENT hDbEvent) +{ + return new CDbxSQLiteEventCursor(hContact, m_db, hDbEvent, true); +} + +CDbxSQLiteEventCursor::CDbxSQLiteEventCursor(MCONTACT _1, sqlite3 *_db, MEVENT hDbEvent, bool reverse) : + EventCursor(_1), m_db(_db) +{ + if (reverse) { + if (!hDbEvent) + sqlite3_prepare_v2(m_db, reverse_order_query, -1, &cursor, nullptr); + else + sqlite3_prepare_v2(m_db, reverse_order_pos_query, -1, &cursor, nullptr); + } + else { + if (!hDbEvent) + sqlite3_prepare_v2(m_db, normal_order_query, -1, &cursor, nullptr); + else + sqlite3_prepare_v2(m_db, normal_order_pos_query, -1, &cursor, nullptr); + } + sqlite3_bind_int64(cursor, 1, hContact); + if (hDbEvent) + sqlite3_bind_int64(cursor, 2, hDbEvent); +} + +CDbxSQLiteEventCursor::~CDbxSQLiteEventCursor() +{ + if (cursor) + sqlite3_reset(cursor); +} + +MEVENT CDbxSQLiteEventCursor::FetchNext() +{ + if (!cursor) + return 0; + + int rc = sqlite3_step(cursor); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_ROW) { + //empty response + //reset sql cursor + sqlite3_reset(cursor); + cursor = nullptr; + return 0; + } + return sqlite3_column_int64(cursor, 0); +} diff --git a/plugins/Dbx_sqlite/src/dbintf.cpp b/plugins/Dbx_sqlite/src/dbintf.cpp index a34551b617..035a651ccf 100644 --- a/plugins/Dbx_sqlite/src/dbintf.cpp +++ b/plugins/Dbx_sqlite/src/dbintf.cpp @@ -1,241 +1,241 @@ -#include "stdafx.h" - -CDbxSQLite::CDbxSQLite(const wchar_t *pwszFileName, bool bReadOnly, bool bShared) : - m_impl(*this), - m_wszFileName(mir_wstrdup(pwszFileName)), - m_safetyMode(true), - m_bReadOnly(bReadOnly), - m_bShared(bShared), - m_modules(1, strcmp) -{ -} - -CDbxSQLite::~CDbxSQLite() -{ - if (m_bTranStarted) { - int rc = sqlite3_exec(m_db, "commit;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - } - - UninitEvents(); - - if (m_db) { - int rc = sqlite3_close(m_db); - logError(rc, __FILE__, __LINE__); - - m_db = nullptr; - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int CDbxSQLite::Create() -{ - ptrA path(mir_utf8encodeW(m_wszFileName)); - int rc = sqlite3_open_v2(path, &m_db, SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_EXCLUSIVE, nullptr); - logError(rc, __FILE__, __LINE__); - if (rc != SQLITE_OK) { - logError(rc, __FILE__, __LINE__); - return 1; - } - - rc = sqlite3_exec(m_db, "CREATE TABLE contacts (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT);", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "CREATE TABLE crypto (id INTEGER NOT NULL PRIMARY KEY, data NOT NULL);", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "CREATE TABLE events (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, contact_id INTEGER NOT NULL, module TEXT NOT NULL," - "timestamp INTEGER NOT NULL, type INTEGER NOT NULL, flags INTEGER NOT NULL, data BLOB, server_id TEXT, is_read INTEGER NOT NULL DEFAULT 0);", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "CREATE INDEX idx_events_contactid_timestamp ON events(contact_id, timestamp);", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "CREATE INDEX idx_events_module_serverid ON events(module, server_id);", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "CREATE INDEX idx_events_isread ON events(contact_id, is_read, timestamp);", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "CREATE TABLE events_srt (id INTEGER NOT NULL, contact_id INTEGER NOT NULL, timestamp INTEGER, PRIMARY KEY(contact_id, timestamp, id));", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "CREATE TABLE settings (contact_id INTEGER NOT NULL, module TEXT NOT NULL, setting TEXT NOT NULL, type INTEGER NOT NULL, value NOT NULL," - "PRIMARY KEY(contact_id, module, setting)) WITHOUT ROWID;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "CREATE INDEX idx_settings_module ON settings(module);", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int CDbxSQLite::Check() -{ - FILE *hFile = _wfopen(m_wszFileName, L"rb"); - if (hFile == INVALID_HANDLE_VALUE) - return EGROKPRF_CANTREAD; - - char header[16] = {}; - size_t size = sizeof(header); - - if (fread(header, sizeof(char), size, hFile) != size) { - fclose(hFile); - return EGROKPRF_CANTREAD; - } - - fclose(hFile); - - if (memcmp(header, SQLITE_HEADER_STR, mir_strlen(SQLITE_HEADER_STR)) != 0) - return EGROKPRF_UNKHEADER; - - sqlite3 *database = nullptr; - ptrA path(mir_utf8encodeW(m_wszFileName)); - int rc = sqlite3_open_v2(path, &database, SQLITE_OPEN_READONLY | SQLITE_OPEN_EXCLUSIVE, nullptr); - if (rc != SQLITE_OK) { - logError(rc, __FILE__, __LINE__); - return EGROKPRF_DAMAGED; - } - - sqlite3_close(database); - - return EGROKPRF_NOERROR; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int CDbxSQLite::Load() -{ - if (!LockName(m_wszFileName)) - return EGROKPRF_CANTREAD; - - ptrA path(mir_utf8encodeW(m_wszFileName)); - int flags = 0; - if (!m_bShared) - flags |= SQLITE_OPEN_EXCLUSIVE; - if (m_bReadOnly) - flags |= SQLITE_OPEN_READONLY; - else - flags |= SQLITE_OPEN_READWRITE; - - int rc = sqlite3_open_v2(path, &m_db, flags, nullptr); - if (rc != SQLITE_OK) { - logError(rc, __FILE__, __LINE__); - return EGROKPRF_CANTREAD; - } - - rc = sqlite3_exec(m_db, "pragma locking_mode = EXCLUSIVE;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - rc = sqlite3_exec(m_db, "pragma synchronous = NORMAL;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - rc = sqlite3_exec(m_db, "pragma foreign_keys = OFF;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - rc = sqlite3_exec(m_db, "pragma journal_mode = OFF;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - if (rc == SQLITE_BUSY) { - sqlite3_close(m_db); - return EGROKPRF_CANTREAD; - } - - InitContacts(); - InitEncryption(); - InitSettings(); - InitEvents(); - - if (InitCrypt()) - return EGROKPRF_CANTREAD; - - m_bTranStarted = true; - rc = sqlite3_exec(m_db, "begin transaction;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - return EGROKPRF_NOERROR; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -BOOL CDbxSQLite::Backup(LPCWSTR profile) -{ - sqlite3 *database = nullptr; - ptrA path(mir_utf8encodeW(profile)); - int rc = sqlite3_open_v2(path, &database, SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_EXCLUSIVE, nullptr); - if (rc != SQLITE_OK) { - logError(rc, __FILE__, __LINE__); - return rc; - } - - mir_cslock lock(m_csDbAccess); - - sqlite3_backup *backup = sqlite3_backup_init(database, "main", m_db, "main"); - if (backup == nullptr) { - sqlite3_close(database); - DeleteFileW(profile); - return ERROR_BACKUP_CONTROLLER; - } - - rc = sqlite3_exec(m_db, "commit;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - logError(sqlite3_backup_step(backup, -1), __FILE__, __LINE__); - logError(sqlite3_backup_finish(backup), __FILE__, __LINE__); - sqlite3_close(database); - - rc = sqlite3_exec(m_db, "begin transaction;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - return 0; -} - -BOOL CDbxSQLite::Compact() -{ - mir_cslock lck(m_csDbAccess); - int rc = sqlite3_exec(m_db, "pragma optimize;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "commit;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "vacuum;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "begin transaction;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - return 0; -} - -void CDbxSQLite::DBFlush(bool bForce) -{ - if (bForce) { - mir_cslock lck(m_csDbAccess); - - int rc = sqlite3_exec(m_db, "commit;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "begin transaction;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - } - else if (m_safetyMode) - m_impl.m_timer.Start(50); -} - -BOOL CDbxSQLite::Flush() -{ - DBFlush(true); - sqlite3_db_cacheflush(m_db); - return ERROR_SUCCESS; -} - -BOOL CDbxSQLite::IsRelational() -{ - return TRUE; -} - -void CDbxSQLite::SetCacheSafetyMode(BOOL value) -{ - // hack to increase import speed - if (!value) - sqlite3_exec(m_db, "pragma synchronous = OFF;", nullptr, nullptr, nullptr); - else - sqlite3_exec(m_db, "pragma synchronous = NORMAL;", nullptr, nullptr, nullptr); - m_safetyMode = value != FALSE; -} +#include "stdafx.h" + +CDbxSQLite::CDbxSQLite(const wchar_t *pwszFileName, bool bReadOnly, bool bShared) : + m_impl(*this), + m_wszFileName(mir_wstrdup(pwszFileName)), + m_safetyMode(true), + m_bReadOnly(bReadOnly), + m_bShared(bShared), + m_modules(1, strcmp) +{ +} + +CDbxSQLite::~CDbxSQLite() +{ + if (m_bTranStarted) { + int rc = sqlite3_exec(m_db, "commit;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + } + + UninitEvents(); + + if (m_db) { + int rc = sqlite3_close(m_db); + logError(rc, __FILE__, __LINE__); + + m_db = nullptr; + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int CDbxSQLite::Create() +{ + ptrA path(mir_utf8encodeW(m_wszFileName)); + int rc = sqlite3_open_v2(path, &m_db, SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_EXCLUSIVE, nullptr); + logError(rc, __FILE__, __LINE__); + if (rc != SQLITE_OK) { + logError(rc, __FILE__, __LINE__); + return 1; + } + + rc = sqlite3_exec(m_db, "CREATE TABLE contacts (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT);", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "CREATE TABLE crypto (id INTEGER NOT NULL PRIMARY KEY, data NOT NULL);", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "CREATE TABLE events (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, contact_id INTEGER NOT NULL, module TEXT NOT NULL," + "timestamp INTEGER NOT NULL, type INTEGER NOT NULL, flags INTEGER NOT NULL, data BLOB, server_id TEXT, is_read INTEGER NOT NULL DEFAULT 0);", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "CREATE INDEX idx_events_contactid_timestamp ON events(contact_id, timestamp);", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "CREATE INDEX idx_events_module_serverid ON events(module, server_id);", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "CREATE INDEX idx_events_isread ON events(contact_id, is_read, timestamp);", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "CREATE TABLE events_srt (id INTEGER NOT NULL, contact_id INTEGER NOT NULL, timestamp INTEGER, PRIMARY KEY(contact_id, timestamp, id));", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "CREATE TABLE settings (contact_id INTEGER NOT NULL, module TEXT NOT NULL, setting TEXT NOT NULL, type INTEGER NOT NULL, value NOT NULL," + "PRIMARY KEY(contact_id, module, setting)) WITHOUT ROWID;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "CREATE INDEX idx_settings_module ON settings(module);", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int CDbxSQLite::Check() +{ + FILE *hFile = _wfopen(m_wszFileName, L"rb"); + if (hFile == INVALID_HANDLE_VALUE) + return EGROKPRF_CANTREAD; + + char header[16] = {}; + size_t size = sizeof(header); + + if (fread(header, sizeof(char), size, hFile) != size) { + fclose(hFile); + return EGROKPRF_CANTREAD; + } + + fclose(hFile); + + if (memcmp(header, SQLITE_HEADER_STR, mir_strlen(SQLITE_HEADER_STR)) != 0) + return EGROKPRF_UNKHEADER; + + sqlite3 *database = nullptr; + ptrA path(mir_utf8encodeW(m_wszFileName)); + int rc = sqlite3_open_v2(path, &database, SQLITE_OPEN_READONLY | SQLITE_OPEN_EXCLUSIVE, nullptr); + if (rc != SQLITE_OK) { + logError(rc, __FILE__, __LINE__); + return EGROKPRF_DAMAGED; + } + + sqlite3_close(database); + + return EGROKPRF_NOERROR; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int CDbxSQLite::Load() +{ + if (!LockName(m_wszFileName)) + return EGROKPRF_CANTREAD; + + ptrA path(mir_utf8encodeW(m_wszFileName)); + int flags = 0; + if (!m_bShared) + flags |= SQLITE_OPEN_EXCLUSIVE; + if (m_bReadOnly) + flags |= SQLITE_OPEN_READONLY; + else + flags |= SQLITE_OPEN_READWRITE; + + int rc = sqlite3_open_v2(path, &m_db, flags, nullptr); + if (rc != SQLITE_OK) { + logError(rc, __FILE__, __LINE__); + return EGROKPRF_CANTREAD; + } + + rc = sqlite3_exec(m_db, "pragma locking_mode = EXCLUSIVE;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + rc = sqlite3_exec(m_db, "pragma synchronous = NORMAL;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + rc = sqlite3_exec(m_db, "pragma foreign_keys = OFF;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + rc = sqlite3_exec(m_db, "pragma journal_mode = OFF;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + if (rc == SQLITE_BUSY) { + sqlite3_close(m_db); + return EGROKPRF_CANTREAD; + } + + InitContacts(); + InitEncryption(); + InitSettings(); + InitEvents(); + + if (InitCrypt()) + return EGROKPRF_CANTREAD; + + m_bTranStarted = true; + rc = sqlite3_exec(m_db, "begin transaction;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + return EGROKPRF_NOERROR; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +BOOL CDbxSQLite::Backup(LPCWSTR profile) +{ + sqlite3 *database = nullptr; + ptrA path(mir_utf8encodeW(profile)); + int rc = sqlite3_open_v2(path, &database, SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_EXCLUSIVE, nullptr); + if (rc != SQLITE_OK) { + logError(rc, __FILE__, __LINE__); + return rc; + } + + mir_cslock lock(m_csDbAccess); + + sqlite3_backup *backup = sqlite3_backup_init(database, "main", m_db, "main"); + if (backup == nullptr) { + sqlite3_close(database); + DeleteFileW(profile); + return ERROR_BACKUP_CONTROLLER; + } + + rc = sqlite3_exec(m_db, "commit;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + logError(sqlite3_backup_step(backup, -1), __FILE__, __LINE__); + logError(sqlite3_backup_finish(backup), __FILE__, __LINE__); + sqlite3_close(database); + + rc = sqlite3_exec(m_db, "begin transaction;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + return 0; +} + +BOOL CDbxSQLite::Compact() +{ + mir_cslock lck(m_csDbAccess); + int rc = sqlite3_exec(m_db, "pragma optimize;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "commit;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "vacuum;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "begin transaction;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + return 0; +} + +void CDbxSQLite::DBFlush(bool bForce) +{ + if (bForce) { + mir_cslock lck(m_csDbAccess); + + int rc = sqlite3_exec(m_db, "commit;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "begin transaction;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + } + else if (m_safetyMode) + m_impl.m_timer.Start(50); +} + +BOOL CDbxSQLite::Flush() +{ + DBFlush(true); + sqlite3_db_cacheflush(m_db); + return ERROR_SUCCESS; +} + +BOOL CDbxSQLite::IsRelational() +{ + return TRUE; +} + +void CDbxSQLite::SetCacheSafetyMode(BOOL value) +{ + // hack to increase import speed + if (!value) + sqlite3_exec(m_db, "pragma synchronous = OFF;", nullptr, nullptr, nullptr); + else + sqlite3_exec(m_db, "pragma synchronous = NORMAL;", nullptr, nullptr, nullptr); + m_safetyMode = value != FALSE; +} diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h index e7a88591c5..35404505cb 100644 --- a/plugins/Dbx_sqlite/src/dbintf.h +++ b/plugins/Dbx_sqlite/src/dbintf.h @@ -1,188 +1,188 @@ -#pragma once - -#define OWN_CACHED_CONTACT - -#include - -struct CQuery -{ - ~CQuery(); - - sqlite3_stmt *pQuery = nullptr; -}; - -struct DBCachedContact : public DBCachedContactBase -{ - int32_t m_count; - - DBCachedContact() : - m_count(-1) - {} - - __forceinline bool HasCount() const { - return m_count > -1; - } -}; - -struct CDbxSQLiteEventCursor : public DB::EventCursor -{ - CDbxSQLiteEventCursor(MCONTACT _1, sqlite3* m_db, MEVENT hDbEvent, bool reverse = false); - ~CDbxSQLiteEventCursor() override; - MEVENT FetchNext() override; - -private: - sqlite3 *m_db; - sqlite3_stmt *cursor; -}; - -class CDbxSQLite : public MDatabaseCommon, public MIDatabaseChecker, public MZeroedObject -{ - ptrW m_wszFileName; - sqlite3 *m_db = nullptr; - - struct { - sqlite3_stmt *cur; - MCONTACT hContact; - MEVENT hEvent; - - void clear() { - if (cur) - sqlite3_reset(cur); - memset(this, 0, sizeof(*this)); - } - } - fwd, back; - - DBCachedContact m_system; - - struct Impl { - CDbxSQLite &pro; - - CTimer m_timer; - void OnTimer(CTimer *pTimer) - { - pTimer->Stop(); - pro.DBFlush(true); - } - - Impl(CDbxSQLite &_p) : - pro(_p), - m_timer(Miranda_GetSystemWindow(), UINT_PTR(this)) - { - m_timer.OnEvent = Callback(this, &Impl::OnTimer); - } - } m_impl; - - bool m_safetyMode, m_bReadOnly, m_bShared, m_bTranStarted; - - // contacts - void InitContacts(); - CQuery qCntCount, qCntAdd, qCntDel, qCntDelSettings, qCntDelEvents, qCntDelEventSrt; - - // encryption - void InitEncryption(); - CQuery qCryptGetMode, qCryptSetMode, qCryptGetProvider, qCryptSetProvider, qCryptGetKey, qCryptSetKey, qCryptEnc1, qCryptEnc2; - - // events - LIST m_modules; - void InitEvents(); - void UninitEvents(); - CQuery qEvCount, qEvAdd, qEvDel, qEvEdit, qEvBlobSize, qEvGet, qEvGetFlags, qEvSetFlags, qEvGetContact, qEvGetContact2; - CQuery qEvFindFirst, qEvFindNext, qEvFindLast, qEvFindPrev, qEvFindUnread, qEvAddSrt, qEvDelSrt, qEvMetaSplit, qEvMetaMerge; - CQuery qEvGetById, qEvUpdateId; - int DeleteEventMain(MEVENT); - int DeleteEventSrt(MEVENT, MCONTACT, uint32_t); - - // settings - void InitSettings(); - CQuery qSettModules, qSettWrite, qSettDel, qSettEnum, qSettChanges; - int DeleteContactSettingWorker(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting); - - void DBFlush(bool bForce = false); - sqlite3_stmt* InitQuery(const char *szQuery, CQuery &stmt); - -public: - CDbxSQLite(const wchar_t *pwszFileName, bool bReadOnly, bool bShared); - ~CDbxSQLite(); - - int Create(); - int Check(); - int Load(); - - STDMETHODIMP_(BOOL) IsRelational(void) override; - STDMETHODIMP_(void) SetCacheSafetyMode(BOOL) override; - - STDMETHODIMP_(int) GetContactCount(void) override; - STDMETHODIMP_(int) DeleteContact(MCONTACT contactID) override; - STDMETHODIMP_(MCONTACT) AddContact(void) override; - STDMETHODIMP_(BOOL) IsDbContact(MCONTACT contactID) override; - STDMETHODIMP_(int) GetContactSize(void) override; - - STDMETHODIMP_(int) GetEventCount(MCONTACT contactID) override; - STDMETHODIMP_(MEVENT) AddEvent(MCONTACT contactID, const DBEVENTINFO *dbe) override; - STDMETHODIMP_(BOOL) DeleteEvent(MEVENT hDbEvent) override; - STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO *dbe) override; - STDMETHODIMP_(int) GetBlobSize(MEVENT hDbEvent) override; - STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe) override; - STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) override; - STDMETHODIMP_(MCONTACT) GetEventContact(MEVENT hDbEvent) override; - STDMETHODIMP_(MEVENT) FindFirstEvent(MCONTACT contactID) override; - STDMETHODIMP_(MEVENT) FindFirstUnreadEvent(MCONTACT contactID) override; - STDMETHODIMP_(MEVENT) FindLastEvent(MCONTACT contactID) override; - STDMETHODIMP_(MEVENT) FindNextEvent(MCONTACT contactID, MEVENT hDbEvent) override; - STDMETHODIMP_(MEVENT) FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent) override; - - STDMETHODIMP_(MEVENT) GetEventById(LPCSTR szModule, LPCSTR szId) override; - STDMETHODIMP_(int) UpdateEventId(MEVENT hDbEvent, LPCSTR szId) override; - - STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam) override; - - STDMETHODIMP_(BOOL) ReadCryptoKey(MBinBuffer&) override; - STDMETHODIMP_(BOOL) StoreCryptoKey() override; - - STDMETHODIMP_(CRYPTO_PROVIDER*) ReadProvider() override; - STDMETHODIMP_(BOOL) StoreProvider(CRYPTO_PROVIDER*) override; - - STDMETHODIMP_(BOOL) EnableEncryption(BOOL) override; - STDMETHODIMP_(BOOL) ReadEncryption() override; - - STDMETHODIMP_(BOOL) WriteContactSettingWorker(MCONTACT contactID, DBCONTACTWRITESETTING &dbcws) override; - STDMETHODIMP_(BOOL) DeleteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting) override; - STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param) override; - - STDMETHODIMP_(BOOL) MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) override; - STDMETHODIMP_(BOOL) MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) override; - - STDMETHODIMP_(BOOL) Compact() override; - STDMETHODIMP_(BOOL) Backup(LPCWSTR) override; - STDMETHODIMP_(BOOL) Flush() override; - - STDMETHODIMP_(DATABASELINK*) GetDriver() override; - - STDMETHODIMP_(DB::EventCursor*) EventCursor(MCONTACT hContact, MEVENT hDbEvent) override; - STDMETHODIMP_(DB::EventCursor*) EventCursorRev(MCONTACT hContact, MEVENT hDbEvent) override; - - //////////////////////////////////////////////////////////////////////////////////////// - // database checker interface implementation - -protected: - STDMETHODIMP_(MIDatabaseChecker *) GetChecker() override - { return this; - } - - STDMETHODIMP_(BOOL) Start(DBCHeckCallback *callback) override - { - cb = callback; - return ERROR_SUCCESS; - } - - STDMETHODIMP_(BOOL) CheckDb(int phase) override; - STDMETHODIMP_(VOID) Destroy() override - {} - - DBCHeckCallback *cb; - int CheckPhase1(void); - int CheckPhase2(void); - int CheckPhase3(void); - int CheckPhase4(void); -}; +#pragma once + +#define OWN_CACHED_CONTACT + +#include + +struct CQuery +{ + ~CQuery(); + + sqlite3_stmt *pQuery = nullptr; +}; + +struct DBCachedContact : public DBCachedContactBase +{ + int32_t m_count; + + DBCachedContact() : + m_count(-1) + {} + + __forceinline bool HasCount() const { + return m_count > -1; + } +}; + +struct CDbxSQLiteEventCursor : public DB::EventCursor +{ + CDbxSQLiteEventCursor(MCONTACT _1, sqlite3* m_db, MEVENT hDbEvent, bool reverse = false); + ~CDbxSQLiteEventCursor() override; + MEVENT FetchNext() override; + +private: + sqlite3 *m_db; + sqlite3_stmt *cursor; +}; + +class CDbxSQLite : public MDatabaseCommon, public MIDatabaseChecker, public MZeroedObject +{ + ptrW m_wszFileName; + sqlite3 *m_db = nullptr; + + struct { + sqlite3_stmt *cur; + MCONTACT hContact; + MEVENT hEvent; + + void clear() { + if (cur) + sqlite3_reset(cur); + memset(this, 0, sizeof(*this)); + } + } + fwd, back; + + DBCachedContact m_system; + + struct Impl { + CDbxSQLite &pro; + + CTimer m_timer; + void OnTimer(CTimer *pTimer) + { + pTimer->Stop(); + pro.DBFlush(true); + } + + Impl(CDbxSQLite &_p) : + pro(_p), + m_timer(Miranda_GetSystemWindow(), UINT_PTR(this)) + { + m_timer.OnEvent = Callback(this, &Impl::OnTimer); + } + } m_impl; + + bool m_safetyMode, m_bReadOnly, m_bShared, m_bTranStarted; + + // contacts + void InitContacts(); + CQuery qCntCount, qCntAdd, qCntDel, qCntDelSettings, qCntDelEvents, qCntDelEventSrt; + + // encryption + void InitEncryption(); + CQuery qCryptGetMode, qCryptSetMode, qCryptGetProvider, qCryptSetProvider, qCryptGetKey, qCryptSetKey, qCryptEnc1, qCryptEnc2; + + // events + LIST m_modules; + void InitEvents(); + void UninitEvents(); + CQuery qEvCount, qEvAdd, qEvDel, qEvEdit, qEvBlobSize, qEvGet, qEvGetFlags, qEvSetFlags, qEvGetContact, qEvGetContact2; + CQuery qEvFindFirst, qEvFindNext, qEvFindLast, qEvFindPrev, qEvFindUnread, qEvAddSrt, qEvDelSrt, qEvMetaSplit, qEvMetaMerge; + CQuery qEvGetById, qEvUpdateId; + int DeleteEventMain(MEVENT); + int DeleteEventSrt(MEVENT, MCONTACT, uint32_t); + + // settings + void InitSettings(); + CQuery qSettModules, qSettWrite, qSettDel, qSettEnum, qSettChanges; + int DeleteContactSettingWorker(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting); + + void DBFlush(bool bForce = false); + sqlite3_stmt* InitQuery(const char *szQuery, CQuery &stmt); + +public: + CDbxSQLite(const wchar_t *pwszFileName, bool bReadOnly, bool bShared); + ~CDbxSQLite(); + + int Create(); + int Check(); + int Load(); + + STDMETHODIMP_(BOOL) IsRelational(void) override; + STDMETHODIMP_(void) SetCacheSafetyMode(BOOL) override; + + STDMETHODIMP_(int) GetContactCount(void) override; + STDMETHODIMP_(int) DeleteContact(MCONTACT contactID) override; + STDMETHODIMP_(MCONTACT) AddContact(void) override; + STDMETHODIMP_(BOOL) IsDbContact(MCONTACT contactID) override; + STDMETHODIMP_(int) GetContactSize(void) override; + + STDMETHODIMP_(int) GetEventCount(MCONTACT contactID) override; + STDMETHODIMP_(MEVENT) AddEvent(MCONTACT contactID, const DBEVENTINFO *dbe) override; + STDMETHODIMP_(BOOL) DeleteEvent(MEVENT hDbEvent) override; + STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO *dbe) override; + STDMETHODIMP_(int) GetBlobSize(MEVENT hDbEvent) override; + STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe) override; + STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) override; + STDMETHODIMP_(MCONTACT) GetEventContact(MEVENT hDbEvent) override; + STDMETHODIMP_(MEVENT) FindFirstEvent(MCONTACT contactID) override; + STDMETHODIMP_(MEVENT) FindFirstUnreadEvent(MCONTACT contactID) override; + STDMETHODIMP_(MEVENT) FindLastEvent(MCONTACT contactID) override; + STDMETHODIMP_(MEVENT) FindNextEvent(MCONTACT contactID, MEVENT hDbEvent) override; + STDMETHODIMP_(MEVENT) FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent) override; + + STDMETHODIMP_(MEVENT) GetEventById(LPCSTR szModule, LPCSTR szId) override; + STDMETHODIMP_(int) UpdateEventId(MEVENT hDbEvent, LPCSTR szId) override; + + STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam) override; + + STDMETHODIMP_(BOOL) ReadCryptoKey(MBinBuffer&) override; + STDMETHODIMP_(BOOL) StoreCryptoKey() override; + + STDMETHODIMP_(CRYPTO_PROVIDER*) ReadProvider() override; + STDMETHODIMP_(BOOL) StoreProvider(CRYPTO_PROVIDER*) override; + + STDMETHODIMP_(BOOL) EnableEncryption(BOOL) override; + STDMETHODIMP_(BOOL) ReadEncryption() override; + + STDMETHODIMP_(BOOL) WriteContactSettingWorker(MCONTACT contactID, DBCONTACTWRITESETTING &dbcws) override; + STDMETHODIMP_(BOOL) DeleteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting) override; + STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param) override; + + STDMETHODIMP_(BOOL) MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) override; + STDMETHODIMP_(BOOL) MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) override; + + STDMETHODIMP_(BOOL) Compact() override; + STDMETHODIMP_(BOOL) Backup(LPCWSTR) override; + STDMETHODIMP_(BOOL) Flush() override; + + STDMETHODIMP_(DATABASELINK*) GetDriver() override; + + STDMETHODIMP_(DB::EventCursor*) EventCursor(MCONTACT hContact, MEVENT hDbEvent) override; + STDMETHODIMP_(DB::EventCursor*) EventCursorRev(MCONTACT hContact, MEVENT hDbEvent) override; + + //////////////////////////////////////////////////////////////////////////////////////// + // database checker interface implementation + +protected: + STDMETHODIMP_(MIDatabaseChecker *) GetChecker() override + { return this; + } + + STDMETHODIMP_(BOOL) Start(DBCHeckCallback *callback) override + { + cb = callback; + return ERROR_SUCCESS; + } + + STDMETHODIMP_(BOOL) CheckDb(int phase) override; + STDMETHODIMP_(VOID) Destroy() override + {} + + DBCHeckCallback *cb; + int CheckPhase1(void); + int CheckPhase2(void); + int CheckPhase3(void); + int CheckPhase4(void); +}; diff --git a/plugins/Dbx_sqlite/src/dbsettings.cpp b/plugins/Dbx_sqlite/src/dbsettings.cpp index 2fe4d3c18e..c4bd196cb4 100644 --- a/plugins/Dbx_sqlite/src/dbsettings.cpp +++ b/plugins/Dbx_sqlite/src/dbsettings.cpp @@ -1,225 +1,225 @@ -#include "stdafx.h" - -void CDbxSQLite::InitSettings() -{ - sqlite3_stmt *stmt = nullptr; - sqlite3_prepare_v2(m_db, "SELECT type, value, contact_id, module, setting FROM settings;", -1, &stmt, nullptr); - while (sqlite3_step(stmt) == SQLITE_ROW) { - MCONTACT hContact = sqlite3_column_int64(stmt, 2); - auto *szModule = (const char *)sqlite3_column_text(stmt, 3); - auto *szSetting = (const char *)sqlite3_column_text(stmt, 4); - - size_t settingNameLen = strlen(szSetting); - size_t moduleNameLen = strlen(szModule); - - char *szCachedSettingName = m_cache->GetCachedSetting(szModule, szSetting, moduleNameLen, settingNameLen); - - DBVARIANT *dbv = m_cache->GetCachedValuePtr(hContact, szCachedSettingName, 1); - if (dbv == nullptr) // garbage! a setting for removed/non-existent contact - continue; - - dbv->type = (int)sqlite3_column_int(stmt, 0); - switch (dbv->type) { - case DBVT_BYTE: - dbv->bVal = sqlite3_column_int(stmt, 1); - break; - - case DBVT_WORD: - dbv->wVal = sqlite3_column_int(stmt, 1); - break; - - case DBVT_DWORD: - dbv->dVal = sqlite3_column_int64(stmt, 1); - break; - - case DBVT_ASCIIZ: - case DBVT_UTF8: - dbv->cchVal = sqlite3_column_bytes(stmt, 1); - { - const char *value = (const char *)sqlite3_column_text(stmt, 1); - dbv->pszVal = (char *)mir_alloc(dbv->cchVal + 1); - memcpy(dbv->pszVal, value, dbv->cchVal); - dbv->pszVal[dbv->cchVal] = 0; - } - break; - - case DBVT_ENCRYPTED: - case DBVT_BLOB: - dbv->cpbVal = sqlite3_column_bytes(stmt, 1); - { - const char *data = (const char *)sqlite3_column_blob(stmt, 1); - dbv->pbVal = (uint8_t *)mir_alloc(dbv->cpbVal + 1); - memcpy(dbv->pbVal, data, dbv->cpbVal); - dbv->pbVal[dbv->cpbVal] = 0; - } - break; - } - } - sqlite3_finalize(stmt); - - FillContactSettings(); - - DBVARIANT dbv; dbv.type = DBVT_BYTE; - if (GetContactSetting(0, "Compatibility", "Sqlite", &dbv)) - dbv.bVal = 0; - - if (dbv.bVal < 1) { - int rc = sqlite3_exec(m_db, "ALTER TABLE events ADD COLUMN is_read INTEGER NOT NULL DEFAULT 0;", 0, 0, 0); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "CREATE INDEX idx_events_isread ON events(contact_id, is_read, timestamp);", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - rc = sqlite3_exec(m_db, "UPDATE events SET is_read=1 WHERE (flags & 6) <> 0;", nullptr, nullptr, nullptr); - logError(rc, __FILE__, __LINE__); - - dbv.type = DBVT_BYTE; - dbv.dVal = 1; - WriteContactSetting(0, "Compatibility", "Sqlite", &dbv); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -BOOL CDbxSQLite::EnumModuleNames(DBMODULEENUMPROC pFunc, void *param) -{ - LIST modules(100); - { - sqlite3_stmt *stmt = InitQuery("SELECT DISTINCT module FROM settings;", qSettModules); - int rc = 0; - while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) { - const char *value = (const char *)sqlite3_column_text(stmt, 0); - modules.insert(mir_strdup(value)); - } - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - } - - int result = -1; - for (auto &module : modules) { - result = pFunc(module, param); - mir_free(module); - } - return result; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -BOOL CDbxSQLite::WriteContactSettingWorker(MCONTACT hContact, DBCONTACTWRITESETTING &dbcws) -{ - sqlite3_stmt *stmt = InitQuery("REPLACE INTO settings(contact_id, module, setting, type, value) VALUES (?, ?, ?, ?, ?);", qSettWrite); - sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_text(stmt, 2, dbcws.szModule, (int)mir_strlen(dbcws.szModule), nullptr); - sqlite3_bind_text(stmt, 3, dbcws.szSetting, (int)mir_strlen(dbcws.szSetting), nullptr); - sqlite3_bind_int(stmt, 4, dbcws.value.type); - switch (dbcws.value.type) { - case DBVT_BYTE: - sqlite3_bind_int(stmt, 5, dbcws.value.bVal); - break; - case DBVT_WORD: - sqlite3_bind_int(stmt, 5, dbcws.value.wVal); - break; - case DBVT_DWORD: - sqlite3_bind_int64(stmt, 5, dbcws.value.dVal); - break; - case DBVT_ASCIIZ: - case DBVT_UTF8: - sqlite3_bind_text(stmt, 5, dbcws.value.pszVal, dbcws.value.cchVal, nullptr); - break; - case DBVT_ENCRYPTED: - case DBVT_BLOB: - sqlite3_bind_blob(stmt, 5, dbcws.value.pbVal, dbcws.value.cpbVal, nullptr); - break; - } - - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - if (rc != SQLITE_DONE) - return 1; - - DBFlush(); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int CDbxSQLite::DeleteContactSettingWorker(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting) -{ - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("DELETE FROM settings WHERE contact_id = ? AND module = ? AND setting = ?;", qSettDel); - sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_text(stmt, 2, szModule, (int)mir_strlen(szModule), nullptr); - sqlite3_bind_text(stmt, 3, szSetting, (int)mir_strlen(szSetting), nullptr); - int rc = sqlite3_step(stmt); - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - return rc; -} - -BOOL CDbxSQLite::DeleteContactSetting(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting) -{ - if (szSetting == nullptr || szModule == nullptr) - return 1; - - if (hContact) { - DBCachedContact *cc = m_cache->GetCachedContact(hContact); - if (cc == nullptr) - return 1; - } - - // if a setting isn't found in cache, then return an error - we don't cache misses anymore - char *szCachedSettingName = m_cache->GetCachedSetting(szModule, szSetting, mir_strlen(szModule), mir_strlen(szSetting)); - if (m_cache->GetCachedValuePtr(hContact, szCachedSettingName, -1) == nullptr) - return 1; - - if (szCachedSettingName[-1] == 0) { // it's not a resident variable - DeleteContactSettingWorker(hContact, szModule, szSetting); - DBFlush(); - } - - // notify - DBCONTACTWRITESETTING dbcws = { 0 }; - dbcws.szModule = szModule; - dbcws.szSetting = szSetting; - dbcws.value.type = DBVT_DELETED; - NotifyEventHooks(g_hevSettingChanged, hContact, (LPARAM)&dbcws); - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -BOOL CDbxSQLite::EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param) -{ - if (szModule == nullptr) - return -1; - - if (hContact) { - DBCachedContact *cc = m_cache->GetCachedContact(hContact); - if (cc == nullptr) - return -1; - } - - LIST settings(100); - { - mir_cslock lock(m_csDbAccess); - sqlite3_stmt *stmt = InitQuery("SELECT setting FROM settings WHERE contact_id = ? AND module = ?;", qSettEnum); - sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_text(stmt, 2, szModule, (int)mir_strlen(szModule), nullptr); - int rc = 0; - while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) { - const char *value = (const char *)sqlite3_column_text(stmt, 0); - settings.insert(mir_strdup(value)); - } - logError(rc, __FILE__, __LINE__); - sqlite3_reset(stmt); - } - - int result = -1; - for (auto &setting : settings) { - result = pfnEnumProc(setting, param); - mir_free(setting); - } - return result; -} +#include "stdafx.h" + +void CDbxSQLite::InitSettings() +{ + sqlite3_stmt *stmt = nullptr; + sqlite3_prepare_v2(m_db, "SELECT type, value, contact_id, module, setting FROM settings;", -1, &stmt, nullptr); + while (sqlite3_step(stmt) == SQLITE_ROW) { + MCONTACT hContact = sqlite3_column_int64(stmt, 2); + auto *szModule = (const char *)sqlite3_column_text(stmt, 3); + auto *szSetting = (const char *)sqlite3_column_text(stmt, 4); + + size_t settingNameLen = strlen(szSetting); + size_t moduleNameLen = strlen(szModule); + + char *szCachedSettingName = m_cache->GetCachedSetting(szModule, szSetting, moduleNameLen, settingNameLen); + + DBVARIANT *dbv = m_cache->GetCachedValuePtr(hContact, szCachedSettingName, 1); + if (dbv == nullptr) // garbage! a setting for removed/non-existent contact + continue; + + dbv->type = (int)sqlite3_column_int(stmt, 0); + switch (dbv->type) { + case DBVT_BYTE: + dbv->bVal = sqlite3_column_int(stmt, 1); + break; + + case DBVT_WORD: + dbv->wVal = sqlite3_column_int(stmt, 1); + break; + + case DBVT_DWORD: + dbv->dVal = sqlite3_column_int64(stmt, 1); + break; + + case DBVT_ASCIIZ: + case DBVT_UTF8: + dbv->cchVal = sqlite3_column_bytes(stmt, 1); + { + const char *value = (const char *)sqlite3_column_text(stmt, 1); + dbv->pszVal = (char *)mir_alloc(dbv->cchVal + 1); + memcpy(dbv->pszVal, value, dbv->cchVal); + dbv->pszVal[dbv->cchVal] = 0; + } + break; + + case DBVT_ENCRYPTED: + case DBVT_BLOB: + dbv->cpbVal = sqlite3_column_bytes(stmt, 1); + { + const char *data = (const char *)sqlite3_column_blob(stmt, 1); + dbv->pbVal = (uint8_t *)mir_alloc(dbv->cpbVal + 1); + memcpy(dbv->pbVal, data, dbv->cpbVal); + dbv->pbVal[dbv->cpbVal] = 0; + } + break; + } + } + sqlite3_finalize(stmt); + + FillContactSettings(); + + DBVARIANT dbv; dbv.type = DBVT_BYTE; + if (GetContactSetting(0, "Compatibility", "Sqlite", &dbv)) + dbv.bVal = 0; + + if (dbv.bVal < 1) { + int rc = sqlite3_exec(m_db, "ALTER TABLE events ADD COLUMN is_read INTEGER NOT NULL DEFAULT 0;", 0, 0, 0); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "CREATE INDEX idx_events_isread ON events(contact_id, is_read, timestamp);", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + rc = sqlite3_exec(m_db, "UPDATE events SET is_read=1 WHERE (flags & 6) <> 0;", nullptr, nullptr, nullptr); + logError(rc, __FILE__, __LINE__); + + dbv.type = DBVT_BYTE; + dbv.dVal = 1; + WriteContactSetting(0, "Compatibility", "Sqlite", &dbv); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +BOOL CDbxSQLite::EnumModuleNames(DBMODULEENUMPROC pFunc, void *param) +{ + LIST modules(100); + { + sqlite3_stmt *stmt = InitQuery("SELECT DISTINCT module FROM settings;", qSettModules); + int rc = 0; + while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) { + const char *value = (const char *)sqlite3_column_text(stmt, 0); + modules.insert(mir_strdup(value)); + } + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + } + + int result = -1; + for (auto &module : modules) { + result = pFunc(module, param); + mir_free(module); + } + return result; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +BOOL CDbxSQLite::WriteContactSettingWorker(MCONTACT hContact, DBCONTACTWRITESETTING &dbcws) +{ + sqlite3_stmt *stmt = InitQuery("REPLACE INTO settings(contact_id, module, setting, type, value) VALUES (?, ?, ?, ?, ?);", qSettWrite); + sqlite3_bind_int64(stmt, 1, hContact); + sqlite3_bind_text(stmt, 2, dbcws.szModule, (int)mir_strlen(dbcws.szModule), nullptr); + sqlite3_bind_text(stmt, 3, dbcws.szSetting, (int)mir_strlen(dbcws.szSetting), nullptr); + sqlite3_bind_int(stmt, 4, dbcws.value.type); + switch (dbcws.value.type) { + case DBVT_BYTE: + sqlite3_bind_int(stmt, 5, dbcws.value.bVal); + break; + case DBVT_WORD: + sqlite3_bind_int(stmt, 5, dbcws.value.wVal); + break; + case DBVT_DWORD: + sqlite3_bind_int64(stmt, 5, dbcws.value.dVal); + break; + case DBVT_ASCIIZ: + case DBVT_UTF8: + sqlite3_bind_text(stmt, 5, dbcws.value.pszVal, dbcws.value.cchVal, nullptr); + break; + case DBVT_ENCRYPTED: + case DBVT_BLOB: + sqlite3_bind_blob(stmt, 5, dbcws.value.pbVal, dbcws.value.cpbVal, nullptr); + break; + } + + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + if (rc != SQLITE_DONE) + return 1; + + DBFlush(); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int CDbxSQLite::DeleteContactSettingWorker(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting) +{ + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("DELETE FROM settings WHERE contact_id = ? AND module = ? AND setting = ?;", qSettDel); + sqlite3_bind_int64(stmt, 1, hContact); + sqlite3_bind_text(stmt, 2, szModule, (int)mir_strlen(szModule), nullptr); + sqlite3_bind_text(stmt, 3, szSetting, (int)mir_strlen(szSetting), nullptr); + int rc = sqlite3_step(stmt); + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + return rc; +} + +BOOL CDbxSQLite::DeleteContactSetting(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting) +{ + if (szSetting == nullptr || szModule == nullptr) + return 1; + + if (hContact) { + DBCachedContact *cc = m_cache->GetCachedContact(hContact); + if (cc == nullptr) + return 1; + } + + // if a setting isn't found in cache, then return an error - we don't cache misses anymore + char *szCachedSettingName = m_cache->GetCachedSetting(szModule, szSetting, mir_strlen(szModule), mir_strlen(szSetting)); + if (m_cache->GetCachedValuePtr(hContact, szCachedSettingName, -1) == nullptr) + return 1; + + if (szCachedSettingName[-1] == 0) { // it's not a resident variable + DeleteContactSettingWorker(hContact, szModule, szSetting); + DBFlush(); + } + + // notify + DBCONTACTWRITESETTING dbcws = { 0 }; + dbcws.szModule = szModule; + dbcws.szSetting = szSetting; + dbcws.value.type = DBVT_DELETED; + NotifyEventHooks(g_hevSettingChanged, hContact, (LPARAM)&dbcws); + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +BOOL CDbxSQLite::EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param) +{ + if (szModule == nullptr) + return -1; + + if (hContact) { + DBCachedContact *cc = m_cache->GetCachedContact(hContact); + if (cc == nullptr) + return -1; + } + + LIST settings(100); + { + mir_cslock lock(m_csDbAccess); + sqlite3_stmt *stmt = InitQuery("SELECT setting FROM settings WHERE contact_id = ? AND module = ?;", qSettEnum); + sqlite3_bind_int64(stmt, 1, hContact); + sqlite3_bind_text(stmt, 2, szModule, (int)mir_strlen(szModule), nullptr); + int rc = 0; + while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) { + const char *value = (const char *)sqlite3_column_text(stmt, 0); + settings.insert(mir_strdup(value)); + } + logError(rc, __FILE__, __LINE__); + sqlite3_reset(stmt); + } + + int result = -1; + for (auto &setting : settings) { + result = pfnEnumProc(setting, param); + mir_free(setting); + } + return result; +} diff --git a/plugins/HTTPServer/docs/data/HTTPMimeTypes b/plugins/HTTPServer/docs/data/HTTPMimeTypes index 8860fdb930..50f1d3c39e 100644 --- a/plugins/HTTPServer/docs/data/HTTPMimeTypes +++ b/plugins/HTTPServer/docs/data/HTTPMimeTypes @@ -1,478 +1,478 @@ -# This file is part of HTTPServer a Miranda IM plugin. -# The file is taken from the apache project. - -# This file controls what Internet media types are sent to the client for -# given file extension(s). Sending the correct media type to the client -# is important so they know how to handle the content of the file. -# Extra types can either be added here -# For more information about Internet media types, -# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type -# registry is at . - -# MIME type Extension -application/EDI-Consent -application/EDI-X12 -application/EDIFACT -application/activemessage -application/andrew-inset ez -application/applefile -application/atomicmail -application/batch-SMTP -application/beep+xml -application/cals-1840 -application/commonground -application/cybercash -application/dca-rft -application/dec-dx -application/dvcs -application/eshop -application/http -application/hyperstudio -application/iges -application/index -application/index.cmd -application/index.obj -application/index.response -application/index.vnd -application/iotp -application/ipp -application/isup -application/font-tdpfr -application/mac-binhex40 hqx -application/mac-compactpro cpt -application/macwriteii -application/marc -application/mathematica -application/mathematica-old -application/msword doc -application/news-message-id -application/news-transmission -application/ocsp-request -application/ocsp-response -application/octet-stream bin dms lha lzh exe class so dll -application/oda oda -application/parityfec -application/pdf pdf -application/pgp-encrypted -application/pgp-keys -application/pgp-signature -application/pkcs10 -application/pkcs7-mime -application/pkcs7-signature -application/pkix-cert -application/pkix-crl -application/pkixcmp -application/postscript ai eps ps -application/prs.alvestrand.titrax-sheet -application/prs.cww -application/prs.nprend -application/qsig -application/remote-printing -application/riscos -application/rtf -application/sdp -application/set-payment -application/set-payment-initiation -application/set-registration -application/set-registration-initiation -application/sgml -application/sgml-open-catalog -application/sieve -application/slate -application/smil smi smil -application/timestamp-query -application/timestamp-reply -application/vemmi -application/vnd.3M.Post-it-Notes -application/vnd.FloGraphIt -application/vnd.accpac.simply.aso -application/vnd.accpac.simply.imp -application/vnd.acucobol -application/vnd.aether.imp -application/vnd.anser-web-certificate-issue-initiation -application/vnd.anser-web-funds-transfer-initiation -application/vnd.audiograph -application/vnd.businessobjects -application/vnd.bmi -application/vnd.canon-cpdl -application/vnd.canon-lips -application/vnd.claymore -application/vnd.commerce-battelle -application/vnd.commonspace -application/vnd.comsocaller -application/vnd.contact.cmsg -application/vnd.cosmocaller -application/vnd.cups-postscript -application/vnd.cups-raster -application/vnd.cups-raw -application/vnd.ctc-posml -application/vnd.cybank -application/vnd.dna -application/vnd.dpgraph -application/vnd.dxr -application/vnd.ecdis-update -application/vnd.ecowin.chart -application/vnd.ecowin.filerequest -application/vnd.ecowin.fileupdate -application/vnd.ecowin.series -application/vnd.ecowin.seriesrequest -application/vnd.ecowin.seriesupdate -application/vnd.enliven -application/vnd.epson.esf -application/vnd.epson.msf -application/vnd.epson.quickanime -application/vnd.epson.salt -application/vnd.epson.ssf -application/vnd.ericsson.quickcall -application/vnd.eudora.data -application/vnd.fdf -application/vnd.ffsns -application/vnd.framemaker -application/vnd.fsc.weblaunch -application/vnd.fujitsu.oasys -application/vnd.fujitsu.oasys2 -application/vnd.fujitsu.oasys3 -application/vnd.fujitsu.oasysgp -application/vnd.fujitsu.oasysprs -application/vnd.fujixerox.ddd -application/vnd.fujixerox.docuworks -application/vnd.fujixerox.docuworks.binder -application/vnd.fut-misnet -application/vnd.grafeq -application/vnd.groove-account -application/vnd.groove-identity-message -application/vnd.groove-injector -application/vnd.groove-tool-message -application/vnd.groove-tool-template -application/vnd.groove-vcard -application/vnd.hhe.lesson-player -application/vnd.hp-HPGL -application/vnd.hp-PCL -application/vnd.hp-PCLXL -application/vnd.hp-hpid -application/vnd.hp-hps -application/vnd.httphone -application/vnd.hzn-3d-crossword -application/vnd.ibm.afplinedata -application/vnd.ibm.MiniPay -application/vnd.ibm.modcap -application/vnd.informix-visionary -application/vnd.intercon.formnet -application/vnd.intertrust.digibox -application/vnd.intertrust.nncp -application/vnd.intu.qbo -application/vnd.intu.qfx -application/vnd.irepository.package+xml -application/vnd.is-xpr -application/vnd.japannet-directory-service -application/vnd.japannet-jpnstore-wakeup -application/vnd.japannet-payment-wakeup -application/vnd.japannet-registration -application/vnd.japannet-registration-wakeup -application/vnd.japannet-setstore-wakeup -application/vnd.japannet-verification -application/vnd.japannet-verification-wakeup -application/vnd.koan -application/vnd.lotus-1-2-3 -application/vnd.lotus-approach -application/vnd.lotus-freelance -application/vnd.lotus-notes -application/vnd.lotus-organizer -application/vnd.lotus-screencam -application/vnd.lotus-wordpro -application/vnd.mcd -application/vnd.mediastation.cdkey -application/vnd.meridian-slingshot -application/vnd.mif mif -application/vnd.minisoft-hp3000-save -application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf -application/vnd.mobius.dis -application/vnd.mobius.msl -application/vnd.mobius.plc -application/vnd.mobius.txf -application/vnd.motorola.flexsuite -application/vnd.motorola.flexsuite.adsi -application/vnd.motorola.flexsuite.fis -application/vnd.motorola.flexsuite.gotap -application/vnd.motorola.flexsuite.kmr -application/vnd.motorola.flexsuite.ttc -application/vnd.motorola.flexsuite.wem -application/vnd.mozilla.xul+xml -application/vnd.ms-artgalry -application/vnd.ms-asf -application/vnd.ms-excel xls -application/vnd.ms-lrm -application/vnd.ms-powerpoint ppt -application/vnd.ms-project -application/vnd.ms-tnef -application/vnd.ms-works -application/vnd.mseq -application/vnd.msign -application/vnd.music-niff -application/vnd.musician -application/vnd.netfpx -application/vnd.noblenet-directory -application/vnd.noblenet-sealer -application/vnd.noblenet-web -application/vnd.novadigm.EDM -application/vnd.novadigm.EDX -application/vnd.novadigm.EXT -application/vnd.osa.netdeploy -application/vnd.palm -application/vnd.pg.format -application/vnd.pg.osasli -application/vnd.powerbuilder6 -application/vnd.powerbuilder6-s -application/vnd.powerbuilder7 -application/vnd.powerbuilder7-s -application/vnd.powerbuilder75 -application/vnd.powerbuilder75-s -application/vnd.previewsystems.box -application/vnd.publishare-delta-tree -application/vnd.pvi.ptid1 -application/vnd.pwg-xhtml-print+xml -application/vnd.rapid -application/vnd.s3sms -application/vnd.seemail -application/vnd.shana.informed.formdata -application/vnd.shana.informed.formtemplate -application/vnd.shana.informed.interchange -application/vnd.shana.informed.package -application/vnd.sss-cod -application/vnd.sss-dtf -application/vnd.sss-ntf -application/vnd.street-stream -application/vnd.svd -application/vnd.swiftview-ics -application/vnd.triscape.mxs -application/vnd.trueapp -application/vnd.truedoc -application/vnd.tve-trigger -application/vnd.ufdl -application/vnd.uplanet.alert -application/vnd.uplanet.alert-wbxml -application/vnd.uplanet.bearer-choice-wbxml -application/vnd.uplanet.bearer-choice -application/vnd.uplanet.cacheop -application/vnd.uplanet.cacheop-wbxml -application/vnd.uplanet.channel -application/vnd.uplanet.channel-wbxml -application/vnd.uplanet.list -application/vnd.uplanet.list-wbxml -application/vnd.uplanet.listcmd -application/vnd.uplanet.listcmd-wbxml -application/vnd.uplanet.signal -application/vnd.vcx -application/vnd.vectorworks -application/vnd.vidsoft.vidconference -application/vnd.visio -application/vnd.vividence.scriptfile -application/vnd.wap.sic -application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo -application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf -application/vnd.xara -application/vnd.xfdl -application/vnd.yellowriver-custom-menu -application/whoispp-query -application/whoispp-response -application/wita -application/wordperfect5.1 -application/x-bcpio bcpio -application/x-cdlink vcd -application/x-chess-pgn pgn -application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-director dcr dir dxr -application/x-dvi dvi -application/x-futuresplash spl -application/x-gtar gtar -application/x-gzip -application/x-hdf hdf -application/x-javascript js -application/x-koan skp skd skt skm -application/x-latex latex -application/x-netcdf nc cdf -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-stuffit sit -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-texinfo texinfo texi -application/x-troff t tr roff -application/x-troff-man man -application/x-troff-me me -application/x-troff-ms ms -application/x-ustar ustar -application/x-wais-source src -application/x400-bp -application/xhtml+xml xhtml xht -application/xml -application/xml-dtd -application/xml-external-parsed-entity -application/zip zip -audio/32kadpcm -audio/basic au snd -audio/g.722.1 -audio/l16 -audio/midi mid midi kar -audio/mp4a-latm -audio/mpa-robust -audio/mpeg mpga mp2 mp3 -audio/parityfec -audio/prs.sid -audio/telephone-event -audio/tone -audio/vnd.cisco.nse -audio/vnd.cns.anp1 -audio/vnd.cns.inf1 -audio/vnd.digital-winds -audio/vnd.everad.plj -audio/vnd.lucent.voice -audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 -audio/vnd.nuera.ecelp7470 -audio/vnd.nuera.ecelp9600 -audio/vnd.octel.sbc -audio/vnd.qcelp -audio/vnd.rhetorex.32kadpcm -audio/vnd.vmx.cvsd -audio/x-aiff aif aiff aifc -audio/x-mod mod -audio/x-mpegurl m3u -audio/x-pn-realaudio ram rm -audio/x-pn-realaudio-plugin rpm -audio/x-realaudio ra -audio/x-wav wav -chemical/x-pdb pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm -image/g3fax -image/gif gif -image/ief ief -image/jpeg jpeg jpg jpe -image/naplps -image/png png -image/prs.btif -image/prs.pti -image/tiff tiff tif -image/vnd.cns.inf2 -image/vnd.djvu djvu djv -image/vnd.dwg -image/vnd.dxf -image/vnd.fastbidsheet -image/vnd.fpx -image/vnd.fst -image/vnd.fujixerox.edmics-mmr -image/vnd.fujixerox.edmics-rlc -image/vnd.mix -image/vnd.net-fpx -image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff -image/x-cmu-raster ras -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -message/delivery-status -message/disposition-notification -message/external-body -message/http -message/news -message/partial -message/rfc822 -message/s-http -model/iges igs iges -model/mesh msh mesh silo -model/vnd.dwf -model/vnd.flatland.3dml -model/vnd.gdl -model/vnd.gs-gdl -model/vnd.gtw -model/vnd.mts -model/vnd.vtu -model/vrml wrl vrml -multipart/alternative -multipart/appledouble -multipart/byteranges -multipart/digest -multipart/encrypted -multipart/form-data -multipart/header-set -multipart/mixed -multipart/parallel -multipart/related -multipart/report -multipart/signed -multipart/voice-message -text/calendar -text/css css -text/directory -text/enriched -text/html html htm -text/parityfec -text/plain asc txt -text/prs.lines.tag -text/rfc822-headers -text/richtext rtx -text/rtf rtf -text/sgml sgml sgm -text/tab-separated-values tsv -text/t140 -text/uri-list -text/vnd.DMClientScript -text/vnd.IPTC.NITF -text/vnd.IPTC.NewsML -text/vnd.abc -text/vnd.curl -text/vnd.flatland.3dml -text/vnd.fly -text/vnd.fmi.flexstor -text/vnd.in3d.3dml -text/vnd.in3d.spot -text/vnd.latex-z -text/vnd.motorola.reflex -text/vnd.ms-mediapackage -text/vnd.wap.si -text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls +# This file is part of HTTPServer a Miranda IM plugin. +# The file is taken from the apache project. + +# This file controls what Internet media types are sent to the client for +# given file extension(s). Sending the correct media type to the client +# is important so they know how to handle the content of the file. +# Extra types can either be added here +# For more information about Internet media types, +# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type +# registry is at . + +# MIME type Extension +application/EDI-Consent +application/EDI-X12 +application/EDIFACT +application/activemessage +application/andrew-inset ez +application/applefile +application/atomicmail +application/batch-SMTP +application/beep+xml +application/cals-1840 +application/commonground +application/cybercash +application/dca-rft +application/dec-dx +application/dvcs +application/eshop +application/http +application/hyperstudio +application/iges +application/index +application/index.cmd +application/index.obj +application/index.response +application/index.vnd +application/iotp +application/ipp +application/isup +application/font-tdpfr +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/macwriteii +application/marc +application/mathematica +application/mathematica-old +application/msword doc +application/news-message-id +application/news-transmission +application/ocsp-request +application/ocsp-response +application/octet-stream bin dms lha lzh exe class so dll +application/oda oda +application/parityfec +application/pdf pdf +application/pgp-encrypted +application/pgp-keys +application/pgp-signature +application/pkcs10 +application/pkcs7-mime +application/pkcs7-signature +application/pkix-cert +application/pkix-crl +application/pkixcmp +application/postscript ai eps ps +application/prs.alvestrand.titrax-sheet +application/prs.cww +application/prs.nprend +application/qsig +application/remote-printing +application/riscos +application/rtf +application/sdp +application/set-payment +application/set-payment-initiation +application/set-registration +application/set-registration-initiation +application/sgml +application/sgml-open-catalog +application/sieve +application/slate +application/smil smi smil +application/timestamp-query +application/timestamp-reply +application/vemmi +application/vnd.3M.Post-it-Notes +application/vnd.FloGraphIt +application/vnd.accpac.simply.aso +application/vnd.accpac.simply.imp +application/vnd.acucobol +application/vnd.aether.imp +application/vnd.anser-web-certificate-issue-initiation +application/vnd.anser-web-funds-transfer-initiation +application/vnd.audiograph +application/vnd.businessobjects +application/vnd.bmi +application/vnd.canon-cpdl +application/vnd.canon-lips +application/vnd.claymore +application/vnd.commerce-battelle +application/vnd.commonspace +application/vnd.comsocaller +application/vnd.contact.cmsg +application/vnd.cosmocaller +application/vnd.cups-postscript +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.ctc-posml +application/vnd.cybank +application/vnd.dna +application/vnd.dpgraph +application/vnd.dxr +application/vnd.ecdis-update +application/vnd.ecowin.chart +application/vnd.ecowin.filerequest +application/vnd.ecowin.fileupdate +application/vnd.ecowin.series +application/vnd.ecowin.seriesrequest +application/vnd.ecowin.seriesupdate +application/vnd.enliven +application/vnd.epson.esf +application/vnd.epson.msf +application/vnd.epson.quickanime +application/vnd.epson.salt +application/vnd.epson.ssf +application/vnd.ericsson.quickcall +application/vnd.eudora.data +application/vnd.fdf +application/vnd.ffsns +application/vnd.framemaker +application/vnd.fsc.weblaunch +application/vnd.fujitsu.oasys +application/vnd.fujitsu.oasys2 +application/vnd.fujitsu.oasys3 +application/vnd.fujitsu.oasysgp +application/vnd.fujitsu.oasysprs +application/vnd.fujixerox.ddd +application/vnd.fujixerox.docuworks +application/vnd.fujixerox.docuworks.binder +application/vnd.fut-misnet +application/vnd.grafeq +application/vnd.groove-account +application/vnd.groove-identity-message +application/vnd.groove-injector +application/vnd.groove-tool-message +application/vnd.groove-tool-template +application/vnd.groove-vcard +application/vnd.hhe.lesson-player +application/vnd.hp-HPGL +application/vnd.hp-PCL +application/vnd.hp-PCLXL +application/vnd.hp-hpid +application/vnd.hp-hps +application/vnd.httphone +application/vnd.hzn-3d-crossword +application/vnd.ibm.afplinedata +application/vnd.ibm.MiniPay +application/vnd.ibm.modcap +application/vnd.informix-visionary +application/vnd.intercon.formnet +application/vnd.intertrust.digibox +application/vnd.intertrust.nncp +application/vnd.intu.qbo +application/vnd.intu.qfx +application/vnd.irepository.package+xml +application/vnd.is-xpr +application/vnd.japannet-directory-service +application/vnd.japannet-jpnstore-wakeup +application/vnd.japannet-payment-wakeup +application/vnd.japannet-registration +application/vnd.japannet-registration-wakeup +application/vnd.japannet-setstore-wakeup +application/vnd.japannet-verification +application/vnd.japannet-verification-wakeup +application/vnd.koan +application/vnd.lotus-1-2-3 +application/vnd.lotus-approach +application/vnd.lotus-freelance +application/vnd.lotus-notes +application/vnd.lotus-organizer +application/vnd.lotus-screencam +application/vnd.lotus-wordpro +application/vnd.mcd +application/vnd.mediastation.cdkey +application/vnd.meridian-slingshot +application/vnd.mif mif +application/vnd.minisoft-hp3000-save +application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf +application/vnd.mobius.dis +application/vnd.mobius.msl +application/vnd.mobius.plc +application/vnd.mobius.txf +application/vnd.motorola.flexsuite +application/vnd.motorola.flexsuite.adsi +application/vnd.motorola.flexsuite.fis +application/vnd.motorola.flexsuite.gotap +application/vnd.motorola.flexsuite.kmr +application/vnd.motorola.flexsuite.ttc +application/vnd.motorola.flexsuite.wem +application/vnd.mozilla.xul+xml +application/vnd.ms-artgalry +application/vnd.ms-asf +application/vnd.ms-excel xls +application/vnd.ms-lrm +application/vnd.ms-powerpoint ppt +application/vnd.ms-project +application/vnd.ms-tnef +application/vnd.ms-works +application/vnd.mseq +application/vnd.msign +application/vnd.music-niff +application/vnd.musician +application/vnd.netfpx +application/vnd.noblenet-directory +application/vnd.noblenet-sealer +application/vnd.noblenet-web +application/vnd.novadigm.EDM +application/vnd.novadigm.EDX +application/vnd.novadigm.EXT +application/vnd.osa.netdeploy +application/vnd.palm +application/vnd.pg.format +application/vnd.pg.osasli +application/vnd.powerbuilder6 +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder7-s +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.previewsystems.box +application/vnd.publishare-delta-tree +application/vnd.pvi.ptid1 +application/vnd.pwg-xhtml-print+xml +application/vnd.rapid +application/vnd.s3sms +application/vnd.seemail +application/vnd.shana.informed.formdata +application/vnd.shana.informed.formtemplate +application/vnd.shana.informed.interchange +application/vnd.shana.informed.package +application/vnd.sss-cod +application/vnd.sss-dtf +application/vnd.sss-ntf +application/vnd.street-stream +application/vnd.svd +application/vnd.swiftview-ics +application/vnd.triscape.mxs +application/vnd.trueapp +application/vnd.truedoc +application/vnd.tve-trigger +application/vnd.ufdl +application/vnd.uplanet.alert +application/vnd.uplanet.alert-wbxml +application/vnd.uplanet.bearer-choice-wbxml +application/vnd.uplanet.bearer-choice +application/vnd.uplanet.cacheop +application/vnd.uplanet.cacheop-wbxml +application/vnd.uplanet.channel +application/vnd.uplanet.channel-wbxml +application/vnd.uplanet.list +application/vnd.uplanet.list-wbxml +application/vnd.uplanet.listcmd +application/vnd.uplanet.listcmd-wbxml +application/vnd.uplanet.signal +application/vnd.vcx +application/vnd.vectorworks +application/vnd.vidsoft.vidconference +application/vnd.visio +application/vnd.vividence.scriptfile +application/vnd.wap.sic +application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo +application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf +application/vnd.xara +application/vnd.xfdl +application/vnd.yellowriver-custom-menu +application/whoispp-query +application/whoispp-response +application/wita +application/wordperfect5.1 +application/x-bcpio bcpio +application/x-cdlink vcd +application/x-chess-pgn pgn +application/x-compress +application/x-cpio cpio +application/x-csh csh +application/x-director dcr dir dxr +application/x-dvi dvi +application/x-futuresplash spl +application/x-gtar gtar +application/x-gzip +application/x-hdf hdf +application/x-javascript js +application/x-koan skp skd skt skm +application/x-latex latex +application/x-netcdf nc cdf +application/x-sh sh +application/x-shar shar +application/x-shockwave-flash swf +application/x-stuffit sit +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl tcl +application/x-tex tex +application/x-texinfo texinfo texi +application/x-troff t tr roff +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-wais-source src +application/x400-bp +application/xhtml+xml xhtml xht +application/xml +application/xml-dtd +application/xml-external-parsed-entity +application/zip zip +audio/32kadpcm +audio/basic au snd +audio/g.722.1 +audio/l16 +audio/midi mid midi kar +audio/mp4a-latm +audio/mpa-robust +audio/mpeg mpga mp2 mp3 +audio/parityfec +audio/prs.sid +audio/telephone-event +audio/tone +audio/vnd.cisco.nse +audio/vnd.cns.anp1 +audio/vnd.cns.inf1 +audio/vnd.digital-winds +audio/vnd.everad.plj +audio/vnd.lucent.voice +audio/vnd.nortel.vbk +audio/vnd.nuera.ecelp4800 +audio/vnd.nuera.ecelp7470 +audio/vnd.nuera.ecelp9600 +audio/vnd.octel.sbc +audio/vnd.qcelp +audio/vnd.rhetorex.32kadpcm +audio/vnd.vmx.cvsd +audio/x-aiff aif aiff aifc +audio/x-mod mod +audio/x-mpegurl m3u +audio/x-pn-realaudio ram rm +audio/x-pn-realaudio-plugin rpm +audio/x-realaudio ra +audio/x-wav wav +chemical/x-pdb pdb +chemical/x-xyz xyz +image/bmp bmp +image/cgm +image/g3fax +image/gif gif +image/ief ief +image/jpeg jpeg jpg jpe +image/naplps +image/png png +image/prs.btif +image/prs.pti +image/tiff tiff tif +image/vnd.cns.inf2 +image/vnd.djvu djvu djv +image/vnd.dwg +image/vnd.dxf +image/vnd.fastbidsheet +image/vnd.fpx +image/vnd.fst +image/vnd.fujixerox.edmics-mmr +image/vnd.fujixerox.edmics-rlc +image/vnd.mix +image/vnd.net-fpx +image/vnd.svf +image/vnd.wap.wbmp wbmp +image/vnd.xiff +image/x-cmu-raster ras +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd +message/delivery-status +message/disposition-notification +message/external-body +message/http +message/news +message/partial +message/rfc822 +message/s-http +model/iges igs iges +model/mesh msh mesh silo +model/vnd.dwf +model/vnd.flatland.3dml +model/vnd.gdl +model/vnd.gs-gdl +model/vnd.gtw +model/vnd.mts +model/vnd.vtu +model/vrml wrl vrml +multipart/alternative +multipart/appledouble +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/form-data +multipart/header-set +multipart/mixed +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/voice-message +text/calendar +text/css css +text/directory +text/enriched +text/html html htm +text/parityfec +text/plain asc txt +text/prs.lines.tag +text/rfc822-headers +text/richtext rtx +text/rtf rtf +text/sgml sgml sgm +text/tab-separated-values tsv +text/t140 +text/uri-list +text/vnd.DMClientScript +text/vnd.IPTC.NITF +text/vnd.IPTC.NewsML +text/vnd.abc +text/vnd.curl +text/vnd.flatland.3dml +text/vnd.fly +text/vnd.fmi.flexstor +text/vnd.in3d.3dml +text/vnd.in3d.spot +text/vnd.latex-z +text/vnd.motorola.reflex +text/vnd.ms-mediapackage +text/vnd.wap.si +text/vnd.wap.sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls text/x-c++hdr hpp hxx hh text/x-c++src cpp,cxx,cc text/x-chdr h -text/x-csrc c -text/x-setext etx -text/xml xml xsl -text/xml-external-parsed-entity -video/mp4v-es -video/mpeg mpeg mpg mpe -video/parityfec -video/pointer -video/quicktime qt mov -video/vnd.fvt -video/vnd.motorola.video -video/vnd.motorola.videop -video/vnd.mpegurl mxu -video/vnd.mts -video/vnd.nokia.interleaved-multimedia -video/vnd.vivo -video/x-msvideo avi -video/x-sgi-movie movie -x-conference/x-cooltalk ice - +text/x-csrc c +text/x-setext etx +text/xml xml xsl +text/xml-external-parsed-entity +video/mp4v-es +video/mpeg mpeg mpg mpe +video/parityfec +video/pointer +video/quicktime qt mov +video/vnd.fvt +video/vnd.motorola.video +video/vnd.motorola.videop +video/vnd.mpegurl mxu +video/vnd.mts +video/vnd.nokia.interleaved-multimedia +video/vnd.vivo +video/x-msvideo avi +video/x-sgi-movie movie +x-conference/x-cooltalk ice + diff --git a/plugins/HTTPServer/src/MimeHandling.h b/plugins/HTTPServer/src/MimeHandling.h index 6a5b3dc61c..768221778f 100644 --- a/plugins/HTTPServer/src/MimeHandling.h +++ b/plugins/HTTPServer/src/MimeHandling.h @@ -11,44 +11,44 @@ extern "C" { /* MIME DB Data structure ---------- ---------- - | mimeType | | mimeType | - |----------| |----------| - ----| next -----------------| next | - |----------| |----------| - | extList --- | extList --- - ---------- | ---------- | - --|--- --|--- - | ext | | ext | - |------| |------| - | next | | next | - --|--- ------ - --|--- - | ext | - |------| - | next | - ------ - */ - - typedef struct _ExtensionListCell { - char* ext; - struct _ExtensionListCell* next; - } ExtensionListCell ; - - - typedef struct _ContentType { - char* mimeType; - ExtensionListCell* extList; - struct _ContentType* next; - } ContentType ; - - typedef ContentType* ContentTypeDB; - typedef ExtensionListCell* ExtensionList; - - - - extern int bInitMimeHandling(); - extern const char * pszGetMimeType(const char * pszFileName); - -#ifdef __cplusplus -} -#endif + | mimeType | | mimeType | + |----------| |----------| + ----| next -----------------| next | + |----------| |----------| + | extList --- | extList --- + ---------- | ---------- | + --|--- --|--- + | ext | | ext | + |------| |------| + | next | | next | + --|--- ------ + --|--- + | ext | + |------| + | next | + ------ + */ + + typedef struct _ExtensionListCell { + char* ext; + struct _ExtensionListCell* next; + } ExtensionListCell ; + + + typedef struct _ContentType { + char* mimeType; + ExtensionListCell* extList; + struct _ContentType* next; + } ContentType ; + + typedef ContentType* ContentTypeDB; + typedef ExtensionListCell* ExtensionList; + + + + extern int bInitMimeHandling(); + extern const char * pszGetMimeType(const char * pszFileName); + +#ifdef __cplusplus +} +#endif diff --git a/plugins/MirOTR/Libgcrypt/doc/gcrypt.info b/plugins/MirOTR/Libgcrypt/doc/gcrypt.info index 0c6c6ee847..0218c09d4d 100644 --- a/plugins/MirOTR/Libgcrypt/doc/gcrypt.info +++ b/plugins/MirOTR/Libgcrypt/doc/gcrypt.info @@ -1,6839 +1,6839 @@ -This is gcrypt.info, produced by makeinfo version 4.13 from gcrypt.texi. - -This manual is for Libgcrypt (version 1.4.6, 9 July 2009), which is -GNU's library of cryptographic building blocks. - - Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free -Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this - document 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. The text of the - license can be found in the section entitled "GNU General Public - License". - -INFO-DIR-SECTION GNU Libraries -START-INFO-DIR-ENTRY -* libgcrypt: (gcrypt). Cryptographic function library. -END-INFO-DIR-ENTRY - - -File: gcrypt.info, Node: Top, Next: Introduction, Up: (dir) - -The Libgcrypt Library -********************* - -This manual is for Libgcrypt (version 1.4.6, 9 July 2009), which is -GNU's library of cryptographic building blocks. - - Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free -Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this - document 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. The text of the - license can be found in the section entitled "GNU General Public - License". - -* Menu: - -* Introduction:: What is Libgcrypt. -* Preparation:: What you should do before using the library. -* Generalities:: General library functions and data types. -* Handler Functions:: Working with handler functions. -* Symmetric cryptography:: How to use symmetric cryptography. -* Public Key cryptography:: How to use public key cryptography. -* Hashing:: How to use hash and MAC algorithms. -* Random Numbers:: How to work with random numbers. -* S-expressions:: How to manage S-expressions. -* MPI library:: How to work with multi-precision-integers. -* Prime numbers:: How to use the Prime number related functions. -* Utilities:: Utility functions. -* Architecture:: How Libgcrypt works internally. - -Appendices - -* Self-Tests:: Description of the self-tests. -* FIPS Mode:: Description of the FIPS mode. -* Library Copying:: The GNU Lesser General Public License - says how you can copy and share Libgcrypt. -* Copying:: The GNU General Public License says how you - can copy and share some parts of Libgcrypt. - -Indices - -* Figures and Tables:: Index of figures and tables. -* Concept Index:: Index of concepts and programs. -* Function and Data Index:: Index of functions, variables and data types. - - -File: gcrypt.info, Node: Introduction, Next: Preparation, Prev: Top, Up: Top - -1 Introduction -************** - -Libgcrypt is a library providing cryptographic building blocks. - -* Menu: - -* Getting Started:: How to use this manual. -* Features:: A glance at Libgcrypt's features. -* Overview:: Overview about the library. - - -File: gcrypt.info, Node: Getting Started, Next: Features, Up: Introduction - -1.1 Getting Started -=================== - -This manual documents the Libgcrypt library application programming -interface (API). All functions and data types provided by the library -are explained. - -The reader is assumed to possess basic knowledge about applied -cryptography. - - This manual can be used in several ways. If read from the beginning -to the end, it gives a good introduction into the library and how it -can be used in an application. Forward references are included where -necessary. Later on, the manual can be used as a reference manual to -get just the information needed about any particular interface of the -library. Experienced programmers might want to start looking at the -examples at the end of the manual, and then only read up those parts of -the interface which are unclear. - - -File: gcrypt.info, Node: Features, Next: Overview, Prev: Getting Started, Up: Introduction - -1.2 Features -============ - -Libgcrypt might have a couple of advantages over other libraries doing -a similar job. - -It's Free Software - Anybody can use, modify, and redistribute it under the terms of - the GNU Lesser General Public License (*note Library Copying::). - Note, that some parts (which are in general not needed by - applications) are subject to the terms of the GNU General Public - License (*note Copying::); please see the README file of the - distribution for of list of these parts. - -It encapsulates the low level cryptography - Libgcrypt provides a high level interface to cryptographic - building blocks using an extensible and flexible API. - - - -File: gcrypt.info, Node: Overview, Prev: Features, Up: Introduction - -1.3 Overview -============ - -The Libgcrypt library is fully thread-safe, where it makes sense to be -thread-safe. Not thread-safe are some cryptographic functions that -modify a certain context stored in handles. If the user really intents -to use such functions from different threads on the same handle, he has -to take care of the serialization of such functions himself. If not -described otherwise, every function is thread-safe. - - Libgcrypt depends on the library `libgpg-error', which contains -common error handling related code for GnuPG components. - - -File: gcrypt.info, Node: Preparation, Next: Generalities, Prev: Introduction, Up: Top - -2 Preparation -************* - -To use Libgcrypt, you have to perform some changes to your sources and -the build system. The necessary changes are small and explained in the -following sections. At the end of this chapter, it is described how -the library is initialized, and how the requirements of the library are -verified. - -* Menu: - -* Header:: What header file you need to include. -* Building sources:: How to build sources using the library. -* Building sources using Automake:: How to build sources with the help of Automake. -* Initializing the library:: How to initialize the library. -* Multi-Threading:: How Libgcrypt can be used in a MT environment. -* Enabling FIPS mode:: How to enable the FIPS mode. - - -File: gcrypt.info, Node: Header, Next: Building sources, Up: Preparation - -2.1 Header -========== - -All interfaces (data types and functions) of the library are defined in -the header file `gcrypt.h'. You must include this in all source files -using the library, either directly or through some other header file, -like this: - - #include - - The name space of Libgcrypt is `gcry_*' for function and type names -and `GCRY*' for other symbols. In addition the same name prefixes with -one prepended underscore are reserved for internal use and should never -be used by an application. Note that Libgcrypt uses libgpg-error, -which uses `gpg_*' as name space for function and type names and -`GPG_*' for other symbols, including all the error codes. - -Certain parts of gcrypt.h may be excluded by defining these macros: - -`GCRYPT_NO_MPI_MACROS' - Do not define the shorthand macros `mpi_*' for `gcry_mpi_*'. - -`GCRYPT_NO_DEPRECATED' - Do not include defintions for deprecated features. This is useful - to make sure that no deprecated features are used. - - -File: gcrypt.info, Node: Building sources, Next: Building sources using Automake, Prev: Header, Up: Preparation - -2.2 Building sources -==================== - -If you want to compile a source file including the `gcrypt.h' header -file, you must make sure that the compiler can find it in the directory -hierarchy. This is accomplished by adding the path to the directory in -which the header file is located to the compilers include file search -path (via the `-I' option). - - However, the path to the include file is determined at the time the -source is configured. To solve this problem, Libgcrypt ships with a -small helper program `libgcrypt-config' that knows the path to the -include file and other configuration options. The options that need to -be added to the compiler invocation at compile time are output by the -`--cflags' option to `libgcrypt-config'. The following example shows -how it can be used at the command line: - - gcc -c foo.c `libgcrypt-config --cflags` - - Adding the output of `libgcrypt-config --cflags' to the compilers -command line will ensure that the compiler can find the Libgcrypt header -file. - - A similar problem occurs when linking the program with the library. -Again, the compiler has to find the library files. For this to work, -the path to the library files has to be added to the library search path -(via the `-L' option). For this, the option `--libs' to -`libgcrypt-config' can be used. For convenience, this option also -outputs all other options that are required to link the program with -the Libgcrypt libraries (in particular, the `-lgcrypt' option). The -example shows how to link `foo.o' with the Libgcrypt library to a -program `foo'. - - gcc -o foo foo.o `libgcrypt-config --libs` - - Of course you can also combine both examples to a single command by -specifying both options to `libgcrypt-config': - - gcc -o foo foo.c `libgcrypt-config --cflags --libs` - - -File: gcrypt.info, Node: Building sources using Automake, Next: Initializing the library, Prev: Building sources, Up: Preparation - -2.3 Building sources using Automake -=================================== - -It is much easier if you use GNU Automake instead of writing your own -Makefiles. If you do that, you do not have to worry about finding and -invoking the `libgcrypt-config' script at all. Libgcrypt provides an -extension to Automake that does all the work for you. - - -- Macro: AM_PATH_LIBGCRYPT ([MINIMUM-VERSION], [ACTION-IF-FOUND], - [ACTION-IF-NOT-FOUND]) - Check whether Libgcrypt (at least version MINIMUM-VERSION, if - given) exists on the host system. If it is found, execute - ACTION-IF-FOUND, otherwise do ACTION-IF-NOT-FOUND, if given. - - Additionally, the function defines `LIBGCRYPT_CFLAGS' to the flags - needed for compilation of the program to find the `gcrypt.h' - header file, and `LIBGCRYPT_LIBS' to the linker flags needed to - link the program to the Libgcrypt library. - - You can use the defined Autoconf variables like this in your -`Makefile.am': - - AM_CPPFLAGS = $(LIBGCRYPT_CFLAGS) - LDADD = $(LIBGCRYPT_LIBS) - - -File: gcrypt.info, Node: Initializing the library, Next: Multi-Threading, Prev: Building sources using Automake, Up: Preparation - -2.4 Initializing the library -============================ - -Before the library can be used, it must initialize itself. This is -achieved by invoking the function `gcry_check_version' described below. - - Also, it is often desirable to check that the version of Libgcrypt -used is indeed one which fits all requirements. Even with binary -compatibility, new features may have been introduced, but due to -problem with the dynamic linker an old version may actually be used. -So you may want to check that the version is okay right after program -startup. - - -- Function: const char * gcry_check_version (const char *REQ_VERSION) - The function `gcry_check_version' initializes some subsystems used - by Libgcrypt and must be invoked before any other function in the - library, with the exception of the `GCRYCTL_SET_THREAD_CBS' command - (called via the `gcry_control' function). *Note Multi-Threading::. - - Furthermore, this function returns the version number of the - library. It can also verify that the version number is higher - than a certain required version number REQ_VERSION, if this value - is not a null pointer. - - Libgcrypt uses a concept known as secure memory, which is a region of -memory set aside for storing sensitive data. Because such memory is a -scarce resource, it needs to be setup in advanced to a fixed size. -Further, most operating systems have special requirements on how that -secure memory can be used. For example, it might be required to install -an application as "setuid(root)" to allow allocating such memory. -Libgcrypt requires a sequence of initialization steps to make sure that -this works correctly. The following examples show the necessary steps. - - If you don't have a need for secure memory, for example if your -application does not use secret keys or other confidential data or it -runs in a controlled environment where key material floating around in -memory is not a problem, you should initialize Libgcrypt this way: - - /* Version check should be the very first call because it - makes sure that important subsystems are intialized. */ - if (!gcry_check_version (GCRYPT_VERSION)) - { - fputs ("libgcrypt version mismatch\n", stderr); - exit (2); - } - - /* Disable secure memory. */ - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); - - /* ... If required, other initialization goes here. */ - - /* Tell Libgcrypt that initialization has completed. */ - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - - If you have to protect your keys or other information in memory -against being swapped out to disk and to enable an automatic overwrite -of used and freed memory, you need to initialize Libgcrypt this way: - - /* Version check should be the very first call because it - makes sure that important subsystems are intialized. */ - if (!gcry_check_version (GCRYPT_VERSION)) - { - fputs ("libgcrypt version mismatch\n", stderr); - exit (2); - } - - /* We don't want to see any warnings, e.g. because we have not yet - parsed program options which might be used to suppress such - warnings. */ - gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN); - - /* ... If required, other initialization goes here. Note that the - process might still be running with increased privileges and that - the secure memory has not been intialized. */ - - /* Allocate a pool of 16k secure memory. This make the secure memory - available and also drops privileges where needed. */ - gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0); - - /* It is now okay to let Libgcrypt complain when there was/is - a problem with the secure memory. */ - gcry_control (GCRYCTL_RESUME_SECMEM_WARN); - - /* ... If required, other initialization goes here. */ - - /* Tell Libgcrypt that initialization has completed. */ - gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); - - It is important that these initialization steps are not done by a -library but by the actual application. A library using Libgcrypt might -want to check for finished initialization using: - - if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) - { - fputs ("libgcrypt has not been initialized\n", stderr); - abort (); - } - - Instead of terminating the process, the library may instead print a -warning and try to initialize Libgcrypt itself. See also the section on -multi-threading below for more pitfalls. - - -File: gcrypt.info, Node: Multi-Threading, Next: Enabling FIPS mode, Prev: Initializing the library, Up: Preparation - -2.5 Multi-Threading -=================== - -As mentioned earlier, the Libgcrypt library is thread-safe if you -adhere to the following requirements: - - * If your application is multi-threaded, you must set the thread - support callbacks with the `GCRYCTL_SET_THREAD_CBS' command - *before* any other function in the library. - - This is easy enough if you are indeed writing an application using - Libgcrypt. It is rather problematic if you are writing a library - instead. Here are some tips what to do if you are writing a - library: - - If your library requires a certain thread package, just initialize - Libgcrypt to use this thread package. If your library supports - multiple thread packages, but needs to be configured, you will - have to implement a way to determine which thread package the - application wants to use with your library anyway. Then configure - Libgcrypt to use this thread package. - - If your library is fully reentrant without any special support by a - thread package, then you are lucky indeed. Unfortunately, this - does not relieve you from doing either of the two above, or use a - third option. The third option is to let the application - initialize Libgcrypt for you. Then you are not using Libgcrypt - transparently, though. - - As if this was not difficult enough, a conflict may arise if two - libraries try to initialize Libgcrypt independently of each - others, and both such libraries are then linked into the same - application. To make it a bit simpler for you, this will probably - work, but only if both libraries have the same requirement for the - thread package. This is currently only supported for the - non-threaded case, GNU Pth and pthread. Support for more thread - packages is easy to add, so contact us if you require it. - - * The function `gcry_check_version' must be called before any other - function in the library, except the `GCRYCTL_SET_THREAD_CBS' - command (called via the `gcry_control' function), because it - initializes the thread support subsystem in Libgcrypt. To achieve - this in multi-threaded programs, you must synchronize the memory - with respect to other threads that also want to use Libgcrypt. - For this, it is sufficient to call `gcry_check_version' before - creating the other threads using Libgcrypt(1). - - * Just like the function `gpg_strerror', the function - `gcry_strerror' is not thread safe. You have to use - `gpg_strerror_r' instead. - - - Libgcrypt contains convenient macros, which define the necessary -thread callbacks for PThread and for GNU Pth: - -`GCRY_THREAD_OPTION_PTH_IMPL' - This macro defines the following (static) symbols: - `gcry_pth_init', `gcry_pth_mutex_init', `gcry_pth_mutex_destroy', - `gcry_pth_mutex_lock', `gcry_pth_mutex_unlock', `gcry_pth_read', - `gcry_pth_write', `gcry_pth_select', `gcry_pth_waitpid', - `gcry_pth_accept', `gcry_pth_connect', `gcry_threads_pth'. - - After including this macro, `gcry_control()' shall be used with a - command of `GCRYCTL_SET_THREAD_CBS' in order to register the - thread callback structure named "gcry_threads_pth". - -`GCRY_THREAD_OPTION_PTHREAD_IMPL' - This macro defines the following (static) symbols: - `gcry_pthread_mutex_init', `gcry_pthread_mutex_destroy', - `gcry_pthread_mutex_lock', `gcry_pthread_mutex_unlock', - `gcry_threads_pthread'. - - After including this macro, `gcry_control()' shall be used with a - command of `GCRYCTL_SET_THREAD_CBS' in order to register the - thread callback structure named "gcry_threads_pthread". - - Note that these macros need to be terminated with a semicolon. Keep -in mind that these are convenient macros for C programmers; C++ -programmers might have to wrap these macros in an "extern C" body. - - ---------- Footnotes ---------- - - (1) At least this is true for POSIX threads, as `pthread_create' is -a function that synchronizes memory with respects to other threads. -There are many functions which have this property, a complete list can -be found in POSIX, IEEE Std 1003.1-2003, Base Definitions, Issue 6, in -the definition of the term "Memory Synchronization". For other thread -packages, more relaxed or more strict rules may apply. - - -File: gcrypt.info, Node: Enabling FIPS mode, Prev: Multi-Threading, Up: Preparation - -2.6 How to enable the FIPS mode -=============================== - -Libgcrypt may be used in a FIPS 140-2 mode. Note, that this does not -necessary mean that Libcgrypt is an appoved FIPS 140-2 module. Check -the NIST database at `http://csrc.nist.gov/groups/STM/cmvp/' to see what -versions of Libgcrypt are approved. - - Because FIPS 140 has certain restrictions on the use of cryptography -which are not always wanted, Libgcrypt needs to be put into FIPS mode -explicitly. Three alternative mechanisms are provided to switch -Libgcrypt into this mode: - - * If the file `/proc/sys/crypto/fips_enabled' exists and contains a - numeric value other than `0', Libgcrypt is put into FIPS mode at - initialization time. Obviously this works only on systems with a - `proc' file system (i.e. GNU/Linux). - - * If the file `/etc/gcrypt/fips_enabled' exists, Libgcrypt is put - into FIPS mode at initialization time. Note that this filename is - hardwired and does not depend on any configuration options. - - * If the application requests FIPS mode using the control command - `GCRYCTL_FORCE_FIPS_MODE'. This must be done prior to any - initialization (i.e. before `gcry_check_version'). - - - In addition to the standard FIPS mode, Libgcrypt may also be put into -an Enforced FIPS mode by writing a non-zero value into the file -`/etc/gcrypt/fips_enabled'. The Enforced FIPS mode helps to detect -applications which don't fulfill all requirements for using Libgcrypt -in FIPS mode (*note FIPS Mode::). - - Once Libgcrypt has been put into FIPS mode, it is not possible to -switch back to standard mode without terminating the process first. If -the logging verbosity level of Libgcrypt has been set to at least 2, -the state transitions and the self-tests are logged. - - -File: gcrypt.info, Node: Generalities, Next: Handler Functions, Prev: Preparation, Up: Top - -3 Generalities -************** - -* Menu: - -* Controlling the library:: Controlling Libgcrypt's behavior. -* Modules:: Description of extension modules. -* Error Handling:: Error codes and such. - - -File: gcrypt.info, Node: Controlling the library, Next: Modules, Up: Generalities - -3.1 Controlling the library -=========================== - - -- Function: gcry_error_t gcry_control (enum gcry_ctl_cmds CMD, ...) - This function can be used to influence the general behavior of - Libgcrypt in several ways. Depending on CMD, more arguments can - or have to be provided. - - `GCRYCTL_ENABLE_M_GUARD; Arguments: none' - This command enables the built-in memory guard. It must not - be used to activate the memory guard after the memory - management has already been used; therefore it can ONLY be - used at initialization time. Note that the memory guard is - NOT used when the user of the library has set his own memory - management callbacks. - - `GCRYCTL_ENABLE_QUICK_RANDOM; Arguments: none' - This command inhibits the use the very secure random quality - level (`GCRY_VERY_STRONG_RANDOM') and degrades all request - down to `GCRY_STRONG_RANDOM'. In general this is not - recommened. However, for some applications the extra quality - random Libgcrypt tries to create is not justified and this - option may help to get better performace. Please check with - a crypto expert whether this option can be used for your - application. - - This option can only be used at initialization time. - - `GCRYCTL_DUMP_RANDOM_STATS; Arguments: none' - This command dumps randum number generator related statistics - to the library's logging stream. - - `GCRYCTL_DUMP_MEMORY_STATS; Arguments: none' - This command dumps memory managment related statistics to the - library's logging stream. - - `GCRYCTL_DUMP_SECMEM_STATS; Arguments: none' - This command dumps secure memory manamgent related statistics - to the library's logging stream. - - `GCRYCTL_DROP_PRIVS; Arguments: none' - This command disables the use of secure memory and drops the - priviliges of the current process. This command has not much - use; the suggested way to disable secure memory is to use - `GCRYCTL_DISABLE_SECMEM' right after initialization. - - `GCRYCTL_DISABLE_SECMEM; Arguments: none' - This command disables the use of secure memory. If this - command is used in FIPS mode, FIPS mode will be disabled and - the function `gcry_fips_mode_active' returns false. However, - in Enforced FIPS mode this command has no effect at all. - - Many applications do not require secure memory, so they - should disable it right away. This command should be - executed right after `gcry_check_version'. - - `GCRYCTL_INIT_SECMEM; Arguments: int nbytes' - This command is used to allocate a pool of secure memory and - thus enabling the use of secure memory. It also drops all - extra privileges the process has (i.e. if it is run as setuid - (root)). If the argument NBYTES is 0, secure memory will be - disabled. The minimum amount of secure memory allocated is - currently 16384 bytes; you may thus use a value of 1 to - request that default size. - - `GCRYCTL_TERM_SECMEM; Arguments: none' - This command zeroises the secure memory and destroys the - handler. The secure memory pool may not be used anymore - after running this command. If the secure memory pool as - already been destroyed, this command has no effect. - Applications might want to run this command from their exit - handler to make sure that the secure memory gets properly - destroyed. This command is not necessarily thread-safe but - that should not be needed in cleanup code. It may be called - from a signal handler. - - `GCRYCTL_DISABLE_SECMEM_WARN; Arguments: none' - Disable warning messages about problems with the secure memory - subsystem. This command should be run right after - `gcry_check_version'. - - `GCRYCTL_SUSPEND_SECMEM_WARN; Arguments: none' - Postpone warning messages from the secure memory subsystem. - *Note the initialization example: sample-use-suspend-secmem, - on how to use it. - - `GCRYCTL_RESUME_SECMEM_WARN; Arguments: none' - Resume warning messages from the secure memory subsystem. - *Note the initialization example: sample-use-resume-secmem, - on how to use it. - - `GCRYCTL_USE_SECURE_RNDPOOL; Arguments: none' - This command tells the PRNG to store random numbers in secure - memory. This command should be run right after - `gcry_check_version' and not later than the command - GCRYCTL_INIT_SECMEM. Note that in FIPS mode the secure - memory is always used. - - `GCRYCTL_SET_RANDOM_SEED_FILE; Arguments: const char *filename' - This command specifies the file, which is to be used as seed - file for the PRNG. If the seed file is registered prior to - initialization of the PRNG, the seed file's content (if it - exists and seems to be valid) is fed into the PRNG pool. - After the seed file has been registered, the PRNG can be - signalled to write out the PRNG pool's content into the seed - file with the following command. - - `GCRYCTL_UPDATE_RANDOM_SEED_FILE; Arguments: none' - Write out the PRNG pool's content into the registered seed - file. - - Multiple instances of the applications sharing the same - random seed file can be started in parallel, in which case - they will read out the same pool and then race for updating - it (the last update overwrites earlier updates). They will - differentiate only by the weak entropy that is added in - read_seed_file based on the PID and clock, and up to 16 bytes - of weak random non-blockingly. The consequence is that the - output of these different instances is correlated to some - extent. In a perfect attack scenario, the attacker can - control (or at least guess) the PID and clock of the - application, and drain the system's entropy pool to reduce - the "up to 16 bytes" above to 0. Then the dependencies of the - inital states of the pools are completely known. Note that - this is not an issue if random of `GCRY_VERY_STRONG_RANDOM' - quality is requested as in this case enough extra entropy - gets mixed. It is also not an issue when using Linux - (rndlinux driver), because this one guarantees to read full - 16 bytes from /dev/urandom and thus there is no way for an - attacker without kernel access to control these 16 bytes. - - `GCRYCTL_SET_VERBOSITY; Arguments: int level' - This command sets the verbosity of the logging. A level of 0 - disables all extra logging whereas positive numbers enable - more verbose logging. The level may be changed at any time - but be aware that no memory synchronization is done so the - effect of this command might not immediately show up in other - threads. This command may even be used prior to - `gcry_check_version'. - - `GCRYCTL_SET_DEBUG_FLAGS; Arguments: unsigned int flags' - Set the debug flag bits as given by the argument. Be aware - that that no memory synchronization is done so the effect of - this command might not immediately show up in other threads. - The debug flags are not considered part of the API and thus - may change without notice. As of now bit 0 enables debugging - of cipher functions and bit 1 debugging of - multi-precision-integers. This command may even be used - prior to `gcry_check_version'. - - `GCRYCTL_CLEAR_DEBUG_FLAGS; Arguments: unsigned int flags' - Set the debug flag bits as given by the argument. Be aware - that that no memory synchronization is done so the effect of - this command might not immediately show up in other threads. - This command may even be used prior to `gcry_check_version'. - - `GCRYCTL_DISABLE_INTERNAL_LOCKING; Arguments: none' - This command does nothing. It exists only for backward - compatibility. - - `GCRYCTL_ANY_INITIALIZATION_P; Arguments: none' - This command returns true if the library has been basically - initialized. Such a basic initialization happens implicitly - with many commands to get certain internal subsystems - running. The common and suggested way to do this basic - intialization is by calling gcry_check_version. - - `GCRYCTL_INITIALIZATION_FINISHED; Arguments: none' - This command tells the libray that the application has - finished the intialization. - - `GCRYCTL_INITIALIZATION_FINISHED_P; Arguments: none' - This command returns true if the command - GCRYCTL_INITIALIZATION_FINISHED has already been run. - - `GCRYCTL_SET_THREAD_CBS; Arguments: struct ath_ops *ath_ops' - This command registers a thread-callback structure. *Note - Multi-Threading::. - - `GCRYCTL_FAST_POLL; Arguments: none' - Run a fast random poll. - - `GCRYCTL_SET_RNDEGD_SOCKET; Arguments: const char *filename' - This command may be used to override the default name of the - EGD socket to connect to. It may be used only during - initialization as it is not thread safe. Changing the socket - name again is not supported. The function may return an - error if the given filename is too long for a local socket - name. - - EGD is an alternative random gatherer, used only on systems - lacking a proper random device. - - `GCRYCTL_PRINT_CONFIG; Arguments: FILE *stream' - This command dumps information pertaining to the - configuration of the library to the given stream. If NULL is - given for STREAM, the log system is used. This command may - be used before the intialization has been finished but not - before a gcry_version_check. - - `GCRYCTL_OPERATIONAL_P; Arguments: none' - This command returns true if the library is in an operational - state. This information makes only sense in FIPS mode. In - contrast to other functions, this is a pure test function and - won't put the library into FIPS mode or change the internal - state. This command may be used before the intialization has - been finished but not before a gcry_version_check. - - `GCRYCTL_FIPS_MODE_P; Arguments: none' - This command returns true if the library is in FIPS mode. - Note, that this is no indication about the current state of - the library. This command may be used before the - intialization has been finished but not before a - gcry_version_check. An application may use this command or - the convenience macro below to check whether FIPS mode is - actually active. - - -- Function: int gcry_fips_mode_active (void) - Returns true if the FIPS mode is active. Note that this - is implemented as a macro. - - `GCRYCTL_FORCE_FIPS_MODE; Arguments: none' - Running this command puts the library into FIPS mode. If the - library is already in FIPS mode, a self-test is triggered and - thus the library will be put into operational state. This - command may be used before a call to gcry_check_version and - that is actually the recommended way to let an application - switch the library into FIPS mode. Note that Libgcrypt will - reject an attempt to switch to fips mode during or after the - intialization. - - `GCRYCTL_SELFTEST; Arguments: none' - This may be used at anytime to have the library run all - implemented self-tests. It works in standard and in FIPS - mode. Returns 0 on success or an error code on failure. - - - - -File: gcrypt.info, Node: Modules, Next: Error Handling, Prev: Controlling the library, Up: Generalities - -3.2 Modules -=========== - -Libgcrypt supports the use of `extension modules', which implement -algorithms in addition to those already built into the library directly. - - -- Data type: gcry_module_t - This data type represents a `module'. - - Functions registering modules provided by the user take a `module -specification structure' as input and return a value of `gcry_module_t' -and an ID that is unique in the modules' category. This ID can be used -to reference the newly registered module. After registering a module -successfully, the new functionality should be able to be used through -the normal functions provided by Libgcrypt until it is unregistered -again. - - -File: gcrypt.info, Node: Error Handling, Prev: Modules, Up: Generalities - -3.3 Error Handling -================== - -Many functions in Libgcrypt can return an error if they fail. For this -reason, the application should always catch the error condition and -take appropriate measures, for example by releasing the resources and -passing the error up to the caller, or by displaying a descriptive -message to the user and cancelling the operation. - - Some error values do not indicate a system error or an error in the -operation, but the result of an operation that failed properly. For -example, if you try to decrypt a tempered message, the decryption will -fail. Another error value actually means that the end of a data buffer -or list has been reached. The following descriptions explain for many -error codes what they mean usually. Some error values have specific -meanings if returned by a certain functions. Such cases are described -in the documentation of those functions. - - Libgcrypt uses the `libgpg-error' library. This allows to share the -error codes with other components of the GnuPG system, and to pass -error values transparently from the crypto engine, or some helper -application of the crypto engine, to the user. This way no information -is lost. As a consequence, Libgcrypt does not use its own identifiers -for error codes, but uses those provided by `libgpg-error'. They -usually start with `GPG_ERR_'. - - However, Libgcrypt does provide aliases for the functions defined in -libgpg-error, which might be preferred for name space consistency. - - Most functions in Libgcrypt return an error code in the case of -failure. For this reason, the application should always catch the -error condition and take appropriate measures, for example by releasing -the resources and passing the error up to the caller, or by displaying -a descriptive message to the user and canceling the operation. - - Some error values do not indicate a system error or an error in the -operation, but the result of an operation that failed properly. - - GnuPG components, including Libgcrypt, use an extra library named -libgpg-error to provide a common error handling scheme. For more -information on libgpg-error, see the according manual. - -* Menu: - -* Error Values:: The error value and what it means. -* Error Sources:: A list of important error sources. -* Error Codes:: A list of important error codes. -* Error Strings:: How to get a descriptive string from a value. - - -File: gcrypt.info, Node: Error Values, Next: Error Sources, Up: Error Handling - -3.3.1 Error Values ------------------- - - -- Data type: gcry_err_code_t - The `gcry_err_code_t' type is an alias for the `libgpg-error' type - `gpg_err_code_t'. The error code indicates the type of an error, - or the reason why an operation failed. - - A list of important error codes can be found in the next section. - - -- Data type: gcry_err_source_t - The `gcry_err_source_t' type is an alias for the `libgpg-error' - type `gpg_err_source_t'. The error source has not a precisely - defined meaning. Sometimes it is the place where the error - happened, sometimes it is the place where an error was encoded - into an error value. Usually the error source will give an - indication to where to look for the problem. This is not always - true, but it is attempted to achieve this goal. - - A list of important error sources can be found in the next section. - - -- Data type: gcry_error_t - The `gcry_error_t' type is an alias for the `libgpg-error' type - `gpg_error_t'. An error value like this has always two - components, an error code and an error source. Both together form - the error value. - - Thus, the error value can not be directly compared against an error - code, but the accessor functions described below must be used. - However, it is guaranteed that only 0 is used to indicate success - (`GPG_ERR_NO_ERROR'), and that in this case all other parts of the - error value are set to 0, too. - - Note that in Libgcrypt, the error source is used purely for - diagnostic purposes. Only the error code should be checked to test - for a certain outcome of a function. The manual only documents the - error code part of an error value. The error source is left - unspecified and might be anything. - - -- Function: gcry_err_code_t gcry_err_code (gcry_error_t ERR) - The static inline function `gcry_err_code' returns the - `gcry_err_code_t' component of the error value ERR. This function - must be used to extract the error code from an error value in - order to compare it with the `GPG_ERR_*' error code macros. - - -- Function: gcry_err_source_t gcry_err_source (gcry_error_t ERR) - The static inline function `gcry_err_source' returns the - `gcry_err_source_t' component of the error value ERR. This - function must be used to extract the error source from an error - value in order to compare it with the `GPG_ERR_SOURCE_*' error - source macros. - - -- Function: gcry_error_t gcry_err_make (gcry_err_source_t SOURCE, - gcry_err_code_t CODE) - The static inline function `gcry_err_make' returns the error value - consisting of the error source SOURCE and the error code CODE. - - This function can be used in callback functions to construct an - error value to return it to the library. - - -- Function: gcry_error_t gcry_error (gcry_err_code_t CODE) - The static inline function `gcry_error' returns the error value - consisting of the default error source and the error code CODE. - - For GCRY applications, the default error source is - `GPG_ERR_SOURCE_USER_1'. You can define `GCRY_ERR_SOURCE_DEFAULT' - before including `gcrypt.h' to change this default. - - This function can be used in callback functions to construct an - error value to return it to the library. - - The `libgpg-error' library provides error codes for all system error -numbers it knows about. If ERR is an unknown error number, the error -code `GPG_ERR_UNKNOWN_ERRNO' is used. The following functions can be -used to construct error values from system errno numbers. - - -- Function: gcry_error_t gcry_err_make_from_errno - (gcry_err_source_t SOURCE, int ERR) - The function `gcry_err_make_from_errno' is like `gcry_err_make', - but it takes a system error like `errno' instead of a - `gcry_err_code_t' error code. - - -- Function: gcry_error_t gcry_error_from_errno (int ERR) - The function `gcry_error_from_errno' is like `gcry_error', but it - takes a system error like `errno' instead of a `gcry_err_code_t' - error code. - - Sometimes you might want to map system error numbers to error codes -directly, or map an error code representing a system error back to the -system error number. The following functions can be used to do that. - - -- Function: gcry_err_code_t gcry_err_code_from_errno (int ERR) - The function `gcry_err_code_from_errno' returns the error code for - the system error ERR. If ERR is not a known system error, the - function returns `GPG_ERR_UNKNOWN_ERRNO'. - - -- Function: int gcry_err_code_to_errno (gcry_err_code_t ERR) - The function `gcry_err_code_to_errno' returns the system error for - the error code ERR. If ERR is not an error code representing a - system error, or if this system error is not defined on this - system, the function returns `0'. - - -File: gcrypt.info, Node: Error Sources, Next: Error Codes, Prev: Error Values, Up: Error Handling - -3.3.2 Error Sources -------------------- - -The library `libgpg-error' defines an error source for every component -of the GnuPG system. The error source part of an error value is not -well defined. As such it is mainly useful to improve the diagnostic -error message for the user. - - If the error code part of an error value is `0', the whole error -value will be `0'. In this case the error source part is of course -`GPG_ERR_SOURCE_UNKNOWN'. - - The list of error sources that might occur in applications using -Libgcrypt is: - -`GPG_ERR_SOURCE_UNKNOWN' - The error source is not known. The value of this error source is - `0'. - -`GPG_ERR_SOURCE_GPGME' - The error source is GPGME itself. - -`GPG_ERR_SOURCE_GPG' - The error source is GnuPG, which is the crypto engine used for the - OpenPGP protocol. - -`GPG_ERR_SOURCE_GPGSM' - The error source is GPGSM, which is the crypto engine used for the - OpenPGP protocol. - -`GPG_ERR_SOURCE_GCRYPT' - The error source is `libgcrypt', which is used by crypto engines - to perform cryptographic operations. - -`GPG_ERR_SOURCE_GPGAGENT' - The error source is `gpg-agent', which is used by crypto engines - to perform operations with the secret key. - -`GPG_ERR_SOURCE_PINENTRY' - The error source is `pinentry', which is used by `gpg-agent' to - query the passphrase to unlock a secret key. - -`GPG_ERR_SOURCE_SCD' - The error source is the SmartCard Daemon, which is used by - `gpg-agent' to delegate operations with the secret key to a - SmartCard. - -`GPG_ERR_SOURCE_KEYBOX' - The error source is `libkbx', a library used by the crypto engines - to manage local keyrings. - -`GPG_ERR_SOURCE_USER_1' - -`GPG_ERR_SOURCE_USER_2' - -`GPG_ERR_SOURCE_USER_3' - -`GPG_ERR_SOURCE_USER_4' - These error sources are not used by any GnuPG component and can be - used by other software. For example, applications using Libgcrypt - can use them to mark error values coming from callback handlers. - Thus `GPG_ERR_SOURCE_USER_1' is the default for errors created - with `gcry_error' and `gcry_error_from_errno', unless you define - `GCRY_ERR_SOURCE_DEFAULT' before including `gcrypt.h'. - - -File: gcrypt.info, Node: Error Codes, Next: Error Strings, Prev: Error Sources, Up: Error Handling - -3.3.3 Error Codes ------------------ - -The library `libgpg-error' defines many error values. The following -list includes the most important error codes. - -`GPG_ERR_EOF' - This value indicates the end of a list, buffer or file. - -`GPG_ERR_NO_ERROR' - This value indicates success. The value of this error code is - `0'. Also, it is guaranteed that an error value made from the - error code `0' will be `0' itself (as a whole). This means that - the error source information is lost for this error code, however, - as this error code indicates that no error occurred, this is - generally not a problem. - -`GPG_ERR_GENERAL' - This value means that something went wrong, but either there is not - enough information about the problem to return a more useful error - value, or there is no separate error value for this type of - problem. - -`GPG_ERR_ENOMEM' - This value means that an out-of-memory condition occurred. - -`GPG_ERR_E...' - System errors are mapped to GPG_ERR_EFOO where FOO is the symbol - for the system error. - -`GPG_ERR_INV_VALUE' - This value means that some user provided data was out of range. - -`GPG_ERR_UNUSABLE_PUBKEY' - This value means that some recipients for a message were invalid. - -`GPG_ERR_UNUSABLE_SECKEY' - This value means that some signers were invalid. - -`GPG_ERR_NO_DATA' - This value means that data was expected where no data was found. - -`GPG_ERR_CONFLICT' - This value means that a conflict of some sort occurred. - -`GPG_ERR_NOT_IMPLEMENTED' - This value indicates that the specific function (or operation) is - not implemented. This error should never happen. It can only - occur if you use certain values or configuration options which do - not work, but for which we think that they should work at some - later time. - -`GPG_ERR_DECRYPT_FAILED' - This value indicates that a decryption operation was unsuccessful. - -`GPG_ERR_WRONG_KEY_USAGE' - This value indicates that a key is not used appropriately. - -`GPG_ERR_NO_SECKEY' - This value indicates that no secret key for the user ID is - available. - -`GPG_ERR_UNSUPPORTED_ALGORITHM' - This value means a verification failed because the cryptographic - algorithm is not supported by the crypto backend. - -`GPG_ERR_BAD_SIGNATURE' - This value means a verification failed because the signature is - bad. - -`GPG_ERR_NO_PUBKEY' - This value means a verification failed because the public key is - not available. - -`GPG_ERR_NOT_OPERATIONAL' - This value means that the library is not yet in state which allows - to use this function. This error code is in particular returned if - Libgcrypt is operated in FIPS mode and the internal state of the - library does not yet or not anymore allow the use of a service. - - This error code is only available with newer libgpg-error - versions, thus you might see "invalid error code" when passing - this to `gpg_strerror'. The numeric value of this error code is - 176. - -`GPG_ERR_USER_1' - -`GPG_ERR_USER_2' - -`...' - -`GPG_ERR_USER_16' - These error codes are not used by any GnuPG component and can be - freely used by other software. Applications using Libgcrypt might - use them to mark specific errors returned by callback handlers if - no suitable error codes (including the system errors) for these - errors exist already. - - -File: gcrypt.info, Node: Error Strings, Prev: Error Codes, Up: Error Handling - -3.3.4 Error Strings -------------------- - - -- Function: const char * gcry_strerror (gcry_error_t ERR) - The function `gcry_strerror' returns a pointer to a statically - allocated string containing a description of the error code - contained in the error value ERR. This string can be used to - output a diagnostic message to the user. - - -- Function: const char * gcry_strsource (gcry_error_t ERR) - The function `gcry_strerror' returns a pointer to a statically - allocated string containing a description of the error source - contained in the error value ERR. This string can be used to - output a diagnostic message to the user. - - The following example illustrates the use of the functions described -above: - - { - gcry_cipher_hd_t handle; - gcry_error_t err = 0; - - err = gcry_cipher_open (&handle, GCRY_CIPHER_AES, - GCRY_CIPHER_MODE_CBC, 0); - if (err) - { - fprintf (stderr, "Failure: %s/%s\n", - gcry_strsource (err), - gcry_strerror (err)); - } - } - - -File: gcrypt.info, Node: Handler Functions, Next: Symmetric cryptography, Prev: Generalities, Up: Top - -4 Handler Functions -******************* - -Libgcrypt makes it possible to install so called `handler functions', -which get called by Libgcrypt in case of certain events. - -* Menu: - -* Progress handler:: Using a progress handler function. -* Allocation handler:: Using special memory allocation functions. -* Error handler:: Using error handler functions. -* Logging handler:: Using a special logging function. - - -File: gcrypt.info, Node: Progress handler, Next: Allocation handler, Up: Handler Functions - -4.1 Progress handler -==================== - -It is often useful to retrieve some feedback while long running -operations are performed. - - -- Data type: gcry_handler_progress_t - Progress handler functions have to be of the type - `gcry_handler_progress_t', which is defined as: - - `void (*gcry_handler_progress_t) (void *, const char *, int, int, - int)' - - The following function may be used to register a handler function for -this purpose. - - -- Function: void gcry_set_progress_handler (gcry_handler_progress_t - CB, void *CB_DATA) - This function installs CB as the `Progress handler' function. It - may be used only during initialization. CB must be defined as - follows: - - void - my_progress_handler (void *CB_DATA, const char *WHAT, - int PRINTCHAR, int CURRENT, int TOTAL) - { - /* Do something. */ - } - - A description of the arguments of the progress handler function - follows. - - CB_DATA - The argument provided in the call to - `gcry_set_progress_handler'. - - WHAT - A string identifying the type of the progress output. The - following values for WHAT are defined: - - `need_entropy' - Not enough entropy is available. TOTAL holds the number - of required bytes. - - `primegen' - Values for PRINTCHAR: - `\n' - Prime generated. - - `!' - Need to refresh the pool of prime numbers. - - `<, >' - Number of bits adjusted. - - `^' - Searching for a generator. - - `.' - Fermat test on 10 candidates failed. - - `:' - Restart with a new random value. - - `+' - Rabin Miller test passed. - - - - -File: gcrypt.info, Node: Allocation handler, Next: Error handler, Prev: Progress handler, Up: Handler Functions - -4.2 Allocation handler -====================== - -It is possible to make Libgcrypt use special memory allocation -functions instead of the built-in ones. - - Memory allocation functions are of the following types: - - -- Data type: gcry_handler_alloc_t - This type is defined as: `void *(*gcry_handler_alloc_t) (size_t - n)'. - - -- Data type: gcry_handler_secure_check_t - This type is defined as: `int *(*gcry_handler_secure_check_t) - (const void *)'. - - -- Data type: gcry_handler_realloc_t - This type is defined as: `void *(*gcry_handler_realloc_t) (void - *p, size_t n)'. - - -- Data type: gcry_handler_free_t - This type is defined as: `void *(*gcry_handler_free_t) (void *)'. - - Special memory allocation functions can be installed with the -following function: - - -- Function: void gcry_set_allocation_handler (gcry_handler_alloc_t - FUNC_ALLOC, gcry_handler_alloc_t FUNC_ALLOC_SECURE, - gcry_handler_secure_check_t FUNC_SECURE_CHECK, - gcry_handler_realloc_t FUNC_REALLOC, gcry_handler_free_t - FUNC_FREE) - Install the provided functions and use them instead of the built-in - functions for doing memory allocation. Using this function is in - general not recommended because the standard Libgcrypt allocation - functions are guaranteed to zeroize memory if needed. - - This function may be used only during initialization and may not be - used in fips mode. - - - -File: gcrypt.info, Node: Error handler, Next: Logging handler, Prev: Allocation handler, Up: Handler Functions - -4.3 Error handler -================= - -The following functions may be used to register handler functions that -are called by Libgcrypt in case certain error conditions occur. They -may and should be registered prior to calling `gcry_check_version'. - - -- Data type: gcry_handler_no_mem_t - This type is defined as: `int (*gcry_handler_no_mem_t) (void *, - size_t, unsigned int)' - - -- Function: void gcry_set_outofcore_handler (gcry_handler_no_mem_t - FUNC_NO_MEM, void *CB_DATA) - This function registers FUNC_NO_MEM as `out-of-core handler', - which means that it will be called in the case of not having enough - memory available. The handler is called with 3 arguments: The - first one is the pointer CB_DATA as set with this function, the - second is the requested memory size and the last being a flag. If - bit 0 of the flag is set, secure memory has been requested. The - handler should either return true to indicate that Libgcrypt - should try again allocating memory or return false to let - Libgcrypt use its default fatal error handler. - - -- Data type: gcry_handler_error_t - This type is defined as: `void (*gcry_handler_error_t) (void *, - int, const char *)' - - -- Function: void gcry_set_fatalerror_handler (gcry_handler_error_t - FUNC_ERROR, void *CB_DATA) - This function registers FUNC_ERROR as `error handler', which means - that it will be called in error conditions. - - -File: gcrypt.info, Node: Logging handler, Prev: Error handler, Up: Handler Functions - -4.4 Logging handler -=================== - - -- Data type: gcry_handler_log_t - This type is defined as: `void (*gcry_handler_log_t) (void *, int, - const char *, va_list)' - - -- Function: void gcry_set_log_handler (gcry_handler_log_t FUNC_LOG, - void *CB_DATA) - This function registers FUNC_LOG as `logging handler', which means - that it will be called in case Libgcrypt wants to log a message. - This function may and should be used prior to calling - `gcry_check_version'. - - -File: gcrypt.info, Node: Symmetric cryptography, Next: Public Key cryptography, Prev: Handler Functions, Up: Top - -5 Symmetric cryptography -************************ - -The cipher functions are used for symmetrical cryptography, i.e. -cryptography using a shared key. The programming model follows an -open/process/close paradigm and is in that similar to other building -blocks provided by Libgcrypt. - -* Menu: - -* Available ciphers:: List of ciphers supported by the library. -* Cipher modules:: How to work with cipher modules. -* Available cipher modes:: List of cipher modes supported by the library. -* Working with cipher handles:: How to perform operations related to cipher handles. -* General cipher functions:: General cipher functions independent of cipher handles. - - -File: gcrypt.info, Node: Available ciphers, Next: Cipher modules, Up: Symmetric cryptography - -5.1 Available ciphers -===================== - -`GCRY_CIPHER_NONE' - This is not a real algorithm but used by some functions as error - return. The value always evaluates to false. - -`GCRY_CIPHER_IDEA' - This is the IDEA algorithm. The constant is provided but there is - currently no implementation for it because the algorithm is - patented. - -`GCRY_CIPHER_3DES' - Triple-DES with 3 Keys as EDE. The key size of this algorithm is - 168 but you have to pass 192 bits because the most significant - bits of each byte are ignored. - -`GCRY_CIPHER_CAST5' - CAST128-5 block cipher algorithm. The key size is 128 bits. - -`GCRY_CIPHER_BLOWFISH' - The blowfish algorithm. The current implementation allows only for - a key size of 128 bits. - -`GCRY_CIPHER_SAFER_SK128' - Reserved and not currently implemented. - -`GCRY_CIPHER_DES_SK' - Reserved and not currently implemented. - -`GCRY_CIPHER_AES' -`GCRY_CIPHER_AES128' -`GCRY_CIPHER_RIJNDAEL' -`GCRY_CIPHER_RIJNDAEL128' - AES (Rijndael) with a 128 bit key. - -`GCRY_CIPHER_AES192' -`GCRY_CIPHER_RIJNDAEL192' - AES (Rijndael) with a 192 bit key. - -`GCRY_CIPHER_AES256' -`GCRY_CIPHER_RIJNDAEL256' - AES (Rijndael) with a 256 bit key. - -`GCRY_CIPHER_TWOFISH' - The Twofish algorithm with a 256 bit key. - -`GCRY_CIPHER_TWOFISH128' - The Twofish algorithm with a 128 bit key. - -`GCRY_CIPHER_ARCFOUR' - An algorithm which is 100% compatible with RSA Inc.'s RC4 - algorithm. Note that this is a stream cipher and must be used - very carefully to avoid a couple of weaknesses. - -`GCRY_CIPHER_DES' - Standard DES with a 56 bit key. You need to pass 64 bit but the - high bits of each byte are ignored. Note, that this is a weak - algorithm which can be broken in reasonable time using a brute - force approach. - -`GCRY_CIPHER_SERPENT128' -`GCRY_CIPHER_SERPENT192' -`GCRY_CIPHER_SERPENT256' - The Serpent cipher from the AES contest. - -`GCRY_CIPHER_RFC2268_40' -`GCRY_CIPHER_RFC2268_128' - Ron's Cipher 2 in the 40 and 128 bit variants. Note, that we - currently only support the 40 bit variant. The identifier for 128 - is reserved for future use. - -`GCRY_CIPHER_SEED' - A 128 bit cipher as described by RFC4269. - -`GCRY_CIPHER_CAMELLIA128' -`GCRY_CIPHER_CAMELLIA192' -`GCRY_CIPHER_CAMELLIA256' - The Camellia cipher by NTT. See - `http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html'. - - - -File: gcrypt.info, Node: Cipher modules, Next: Available cipher modes, Prev: Available ciphers, Up: Symmetric cryptography - -5.2 Cipher modules -================== - -Libgcrypt makes it possible to load additional `cipher modules'; these -ciphers can be used just like the cipher algorithms that are built into -the library directly. For an introduction into extension modules, see -*Note Modules::. - - -- Data type: gcry_cipher_spec_t - This is the `module specification structure' needed for registering - cipher modules, which has to be filled in by the user before it - can be used to register a module. It contains the following - members: - - `const char *name' - The primary name of the algorithm. - - `const char **aliases' - A list of strings that are `aliases' for the algorithm. The - list must be terminated with a NULL element. - - `gcry_cipher_oid_spec_t *oids' - A list of OIDs that are to be associated with the algorithm. - The list's last element must have it's `oid' member set to - NULL. See below for an explanation of this type. - - `size_t blocksize' - The block size of the algorithm, in bytes. - - `size_t keylen' - The length of the key, in bits. - - `size_t contextsize' - The size of the algorithm-specific `context', that should be - allocated for each handle. - - `gcry_cipher_setkey_t setkey' - The function responsible for initializing a handle with a - provided key. See below for a description of this type. - - `gcry_cipher_encrypt_t encrypt' - The function responsible for encrypting a single block. See - below for a description of this type. - - `gcry_cipher_decrypt_t decrypt' - The function responsible for decrypting a single block. See - below for a description of this type. - - `gcry_cipher_stencrypt_t stencrypt' - Like `encrypt', for stream ciphers. See below for a - description of this type. - - `gcry_cipher_stdecrypt_t stdecrypt' - Like `decrypt', for stream ciphers. See below for a - description of this type. - - -- Data type: gcry_cipher_oid_spec_t - This type is used for associating a user-provided algorithm - implementation with certain OIDs. It contains the following - members: - `const char *oid' - Textual representation of the OID. - - `int mode' - Cipher mode for which this OID is valid. - - -- Data type: gcry_cipher_setkey_t - Type for the `setkey' function, defined as: gcry_err_code_t - (*gcry_cipher_setkey_t) (void *c, const unsigned char *key, - unsigned keylen) - - -- Data type: gcry_cipher_encrypt_t - Type for the `encrypt' function, defined as: gcry_err_code_t - (*gcry_cipher_encrypt_t) (void *c, const unsigned char *outbuf, - const unsigned char *inbuf) - - -- Data type: gcry_cipher_decrypt_t - Type for the `decrypt' function, defined as: gcry_err_code_t - (*gcry_cipher_decrypt_t) (void *c, const unsigned char *outbuf, - const unsigned char *inbuf) - - -- Data type: gcry_cipher_stencrypt_t - Type for the `stencrypt' function, defined as: gcry_err_code_t - (*gcry_cipher_stencrypt_t) (void *c, const unsigned char *outbuf, - const unsigned char *, unsigned int n) - - -- Data type: gcry_cipher_stdecrypt_t - Type for the `stdecrypt' function, defined as: gcry_err_code_t - (*gcry_cipher_stdecrypt_t) (void *c, const unsigned char *outbuf, - const unsigned char *, unsigned int n) - - -- Function: gcry_error_t gcry_cipher_register (gcry_cipher_spec_t - *CIPHER, unsigned int *algorithm_id, gcry_module_t *MODULE) - Register a new cipher module whose specification can be found in - CIPHER. On success, a new algorithm ID is stored in ALGORITHM_ID - and a pointer representing this module is stored in MODULE. - - -- Function: void gcry_cipher_unregister (gcry_module_t MODULE) - Unregister the cipher identified by MODULE, which must have been - registered with gcry_cipher_register. - - -- Function: gcry_error_t gcry_cipher_list (int *LIST, int - *LIST_LENGTH) - Get a list consisting of the IDs of the loaded cipher modules. If - LIST is zero, write the number of loaded cipher modules to - LIST_LENGTH and return. If LIST is non-zero, the first - *LIST_LENGTH algorithm IDs are stored in LIST, which must be of - according size. In case there are less cipher modules than - *LIST_LENGTH, *LIST_LENGTH is updated to the correct number. - - -File: gcrypt.info, Node: Available cipher modes, Next: Working with cipher handles, Prev: Cipher modules, Up: Symmetric cryptography - -5.3 Available cipher modes -========================== - -`GCRY_CIPHER_MODE_NONE' - No mode specified. This should not be used. The only exception - is that if Libgcrypt is not used in FIPS mode and if any debug - flag has been set, this mode may be used to bypass the actual - encryption. - -`GCRY_CIPHER_MODE_ECB' - Electronic Codebook mode. - -`GCRY_CIPHER_MODE_CFB' - Cipher Feedback mode. The shift size equals the block size of the - cipher (e.g. for AES it is CFB-128). - -`GCRY_CIPHER_MODE_CBC' - Cipher Block Chaining mode. - -`GCRY_CIPHER_MODE_STREAM' - Stream mode, only to be used with stream cipher algorithms. - -`GCRY_CIPHER_MODE_OFB' - Output Feedback mode. - -`GCRY_CIPHER_MODE_CTR' - Counter mode. - - - -File: gcrypt.info, Node: Working with cipher handles, Next: General cipher functions, Prev: Available cipher modes, Up: Symmetric cryptography - -5.4 Working with cipher handles -=============================== - -To use a cipher algorithm, you must first allocate an according handle. -This is to be done using the open function: - - -- Function: gcry_error_t gcry_cipher_open (gcry_cipher_hd_t *HD, int - ALGO, int MODE, unsigned int FLAGS) - This function creates the context handle required for most of the - other cipher functions and returns a handle to it in `hd'. In - case of an error, an according error code is returned. - - The ID of algorithm to use must be specified via ALGO. See *Note - Available ciphers::, for a list of supported ciphers and the - according constants. - - Besides using the constants directly, the function - `gcry_cipher_map_name' may be used to convert the textual name of - an algorithm into the according numeric ID. - - The cipher mode to use must be specified via MODE. See *Note - Available cipher modes::, for a list of supported cipher modes and - the according constants. Note that some modes are incompatible - with some algorithms - in particular, stream mode - (`GCRY_CIPHER_MODE_STREAM') only works with stream ciphers. Any - block cipher mode (`GCRY_CIPHER_MODE_ECB', `GCRY_CIPHER_MODE_CBC', - `GCRY_CIPHER_MODE_CFB', `GCRY_CIPHER_MODE_OFB' or - `GCRY_CIPHER_MODE_CTR') will work with any block cipher algorithm. - - The third argument FLAGS can either be passed as `0' or as the - bit-wise OR of the following constants. - - `GCRY_CIPHER_SECURE' - Make sure that all operations are allocated in secure memory. - This is useful when the key material is highly confidential. - - `GCRY_CIPHER_ENABLE_SYNC' - This flag enables the CFB sync mode, which is a special - feature of Libgcrypt's CFB mode implementation to allow for - OpenPGP's CFB variant. See `gcry_cipher_sync'. - - `GCRY_CIPHER_CBC_CTS' - Enable cipher text stealing (CTS) for the CBC mode. Cannot - be used simultaneous as GCRY_CIPHER_CBC_MAC. CTS mode makes - it possible to transform data of almost arbitrary size (only - limitation is that it must be greater than the algorithm's - block size). - - `GCRY_CIPHER_CBC_MAC' - Compute CBC-MAC keyed checksums. This is the same as CBC - mode, but only output the last block. Cannot be used - simultaneous as GCRY_CIPHER_CBC_CTS. - - Use the following function to release an existing handle: - - -- Function: void gcry_cipher_close (gcry_cipher_hd_t H) - This function releases the context created by `gcry_cipher_open'. - It also zeroises all sensitive information associated with this - cipher handle. - - In order to use a handle for performing cryptographic operations, a -`key' has to be set first: - - -- Function: gcry_error_t gcry_cipher_setkey (gcry_cipher_hd_t H, - const void *K, size_t L) - Set the key K used for encryption or decryption in the context - denoted by the handle H. The length L (in bytes) of the key K - must match the required length of the algorithm set for this - context or be in the allowed range for algorithms with variable - key size. The function checks this and returns an error if there - is a problem. A caller should always check for an error. - - - Most crypto modes requires an initialization vector (IV), which -usually is a non-secret random string acting as a kind of salt value. -The CTR mode requires a counter, which is also similar to a salt value. -To set the IV or CTR, use these functions: - - -- Function: gcry_error_t gcry_cipher_setiv (gcry_cipher_hd_t H, const - void *K, size_t L) - Set the initialization vector used for encryption or decryption. - The vector is passed as the buffer K of length L bytes and copied - to internal data structures. The function checks that the IV - matches the requirement of the selected algorithm and mode. - - -- Function: gcry_error_t gcry_cipher_setctr (gcry_cipher_hd_t H, - const void *C, size_t L) - Set the counter vector used for encryption or decryption. The - counter is passed as the buffer C of length L bytes and copied to - internal data structures. The function checks that the counter - matches the requirement of the selected algorithm (i.e., it must be - the same size as the block size). - - -- Function: gcry_error_t gcry_cipher_reset (gcry_cipher_hd_t H) - Set the given handle's context back to the state it had after the - last call to gcry_cipher_setkey and clear the initialization - vector. - - Note that gcry_cipher_reset is implemented as a macro. - - The actual encryption and decryption is done by using one of the -following functions. They may be used as often as required to process -all the data. - - -- Function: gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t H, - unsigned char *out, size_t OUTSIZE, const unsigned char *IN, - size_t INLEN) - `gcry_cipher_encrypt' is used to encrypt the data. This function - can either work in place or with two buffers. It uses the cipher - context already setup and described by the handle H. There are 2 - ways to use the function: If IN is passed as `NULL' and INLEN is - `0', in-place encryption of the data in OUT or length OUTSIZE - takes place. With IN being not `NULL', INLEN bytes are encrypted - to the buffer OUT which must have at least a size of INLEN. - OUTSIZE must be set to the allocated size of OUT, so that the - function can check that there is sufficient space. Note that - overlapping buffers are not allowed. - - Depending on the selected algorithms and encryption mode, the - length of the buffers must be a multiple of the block size. - - The function returns `0' on success or an error code. - - -- Function: gcry_error_t gcry_cipher_decrypt (gcry_cipher_hd_t H, - unsigned char *out, size_t OUTSIZE, const unsigned char *IN, - size_t INLEN) - `gcry_cipher_decrypt' is used to decrypt the data. This function - can either work in place or with two buffers. It uses the cipher - context already setup and described by the handle H. There are 2 - ways to use the function: If IN is passed as `NULL' and INLEN is - `0', in-place decryption of the data in OUT or length OUTSIZE - takes place. With IN being not `NULL', INLEN bytes are decrypted - to the buffer OUT which must have at least a size of INLEN. - OUTSIZE must be set to the allocated size of OUT, so that the - function can check that there is sufficient space. Note that - overlapping buffers are not allowed. - - Depending on the selected algorithms and encryption mode, the - length of the buffers must be a multiple of the block size. - - The function returns `0' on success or an error code. - - OpenPGP (as defined in RFC-2440) requires a special sync operation in -some places. The following function is used for this: - - -- Function: gcry_error_t gcry_cipher_sync (gcry_cipher_hd_t H) - Perform the OpenPGP sync operation on context H. Note that this - is a no-op unless the context was created with the flag - `GCRY_CIPHER_ENABLE_SYNC' - - Some of the described functions are implemented as macros utilizing a -catch-all control function. This control function is rarely used -directly but there is nothing which would inhibit it: - - -- Function: gcry_error_t gcry_cipher_ctl (gcry_cipher_hd_t H, int - CMD, void *BUFFER, size_t BUFLEN) - `gcry_cipher_ctl' controls various aspects of the cipher module and - specific cipher contexts. Usually some more specialized functions - or macros are used for this purpose. The semantics of the - function and its parameters depends on the the command CMD and the - passed context handle H. Please see the comments in the source - code (`src/global.c') for details. - - -- Function: gcry_error_t gcry_cipher_info (gcry_cipher_hd_t H, int - WHAT, void *BUFFER, size_t *NBYTES) - `gcry_cipher_info' is used to retrieve various information about a - cipher context or the cipher module in general. - - Currently no information is available. - - -File: gcrypt.info, Node: General cipher functions, Prev: Working with cipher handles, Up: Symmetric cryptography - -5.5 General cipher functions -============================ - -To work with the algorithms, several functions are available to map -algorithm names to the internal identifiers, as well as ways to -retrieve information about an algorithm or the current cipher context. - - -- Function: gcry_error_t gcry_cipher_algo_info (int ALGO, int WHAT, - void *BUFFER, size_t *NBYTES) - This function is used to retrieve information on a specific - algorithm. You pass the cipher algorithm ID as ALGO and the type - of information requested as WHAT. The result is either returned as - the return code of the function or copied to the provided BUFFER - whose allocated length must be available in an integer variable - with the address passed in NBYTES. This variable will also - receive the actual used length of the buffer. - - Here is a list of supported codes for WHAT: - - `GCRYCTL_GET_KEYLEN:' - Return the length of the key. If the algorithm supports - multiple key lengths, the maximum supported value is - returned. The length is returned as number of octets (bytes) - and not as number of bits in NBYTES; BUFFER must be zero. - - `GCRYCTL_GET_BLKLEN:' - Return the block length of the algorithm. The length is - returned as a number of octets in NBYTES; BUFFER must be zero. - - `GCRYCTL_TEST_ALGO:' - Returns `0' when the specified algorithm is available for use. - BUFFER and NBYTES must be zero. - - - - -- Function: const char * gcry_cipher_algo_name (int ALGO) - `gcry_cipher_algo_name' returns a string with the name of the - cipher algorithm ALGO. If the algorithm is not known or another - error occurred, the string `"?"' is returned. This function should - not be used to test for the availability of an algorithm. - - -- Function: int gcry_cipher_map_name (const char *NAME) - `gcry_cipher_map_name' returns the algorithm identifier for the - cipher algorithm described by the string NAME. If this algorithm - is not available `0' is returned. - - -- Function: int gcry_cipher_mode_from_oid (const char *STRING) - Return the cipher mode associated with an ASN.1 object identifier. - The object identifier is expected to be in the IETF-style dotted - decimal notation. The function returns `0' for an unknown object - identifier or when no mode is associated with it. - - -File: gcrypt.info, Node: Public Key cryptography, Next: Hashing, Prev: Symmetric cryptography, Up: Top - -6 Public Key cryptography -************************* - -Public key cryptography, also known as asymmetric cryptography, is an -easy way for key management and to provide digital signatures. -Libgcrypt provides two completely different interfaces to public key -cryptography, this chapter explains the one based on S-expressions. - -* Menu: - -* Available algorithms:: Algorithms supported by the library. -* Used S-expressions:: Introduction into the used S-expression. -* Public key modules:: How to work with public key modules. -* Cryptographic Functions:: Functions for performing the cryptographic actions. -* General public-key related Functions:: General functions, not implementing any cryptography. - -* AC Interface:: Alternative interface to public key functions. - - -File: gcrypt.info, Node: Available algorithms, Next: Used S-expressions, Up: Public Key cryptography - -6.1 Available algorithms -======================== - -Libgcrypt supports the RSA (Rivest-Shamir-Adleman) algorithms as well -as DSA (Digital Signature Algorithm) and Elgamal. The versatile -interface allows to add more algorithms in the future. - - -File: gcrypt.info, Node: Used S-expressions, Next: Public key modules, Prev: Available algorithms, Up: Public Key cryptography - -6.2 Used S-expressions -====================== - -Libgcrypt's API for asymmetric cryptography is based on data structures -called S-expressions (see -`http://people.csail.mit.edu/rivest/sexp.html') and does not work with -contexts as most of the other building blocks of Libgcrypt do. - -The following information are stored in S-expressions: - - keys - - plain text data - - encrypted data - - signatures - - -To describe how Libgcrypt expect keys, we use examples. Note that words -in uppercase indicate parameters whereas lowercase words are literals. - - Note that all MPI (multi-precision-integers) values are expected to -be in `GCRYMPI_FMT_USG' format. An easy way to create S-expressions is -by using `gcry_sexp_build' which allows to pass a string with -printf-like escapes to insert MPI values. - -* Menu: - -* RSA key parameters:: Parameters used with an RSA key. -* DSA key parameters:: Parameters used with a DSA key. -* ECC key parameters:: Parameters used with ECC keys. - - -File: gcrypt.info, Node: RSA key parameters, Next: DSA key parameters, Up: Used S-expressions - -6.2.1 RSA key parameters ------------------------- - -An RSA private key is described by this S-expression: - - (private-key - (rsa - (n N-MPI) - (e E-MPI) - (d D-MPI) - (p P-MPI) - (q Q-MPI) - (u U-MPI))) - -An RSA public key is described by this S-expression: - - (public-key - (rsa - (n N-MPI) - (e E-MPI))) - -N-MPI - RSA public modulus n. - -E-MPI - RSA public exponent e. - -D-MPI - RSA secret exponent d = e^-1 \bmod (p-1)(q-1). - -P-MPI - RSA secret prime p. - -Q-MPI - RSA secret prime q with p < q. - -U-MPI - Multiplicative inverse u = p^-1 \bmod q. - - For signing and decryption the parameters (p, q, u) are optional but -greatly improve the performance. Either all of these optional -parameters must be given or none of them. They are mandatory for -gcry_pk_testkey. - - Note that OpenSSL uses slighly different parameters: q < p and u = -q^-1 \bmod p. To use these parameters you will need to swap the values -and recompute u. Here is example code to do this: - - if (gcry_mpi_cmp (p, q) > 0) - { - gcry_mpi_swap (p, q); - gcry_mpi_invm (u, p, q); - } - - -File: gcrypt.info, Node: DSA key parameters, Next: ECC key parameters, Prev: RSA key parameters, Up: Used S-expressions - -6.2.2 DSA key parameters ------------------------- - -A DSA private key is described by this S-expression: - - (private-key - (dsa - (p P-MPI) - (q Q-MPI) - (g G-MPI) - (y Y-MPI) - (x X-MPI))) - -P-MPI - DSA prime p. - -Q-MPI - DSA group order q (which is a prime divisor of p-1). - -G-MPI - DSA group generator g. - -Y-MPI - DSA public key value y = g^x \bmod p. - -X-MPI - DSA secret exponent x. - - The public key is similar with "private-key" replaced by "public-key" -and no X-MPI. - - -File: gcrypt.info, Node: ECC key parameters, Prev: DSA key parameters, Up: Used S-expressions - -6.2.3 ECC key parameters ------------------------- - -An ECC private key is described by this S-expression: - - (private-key - (ecc - (p P-MPI) - (a A-MPI) - (b B-MPI) - (g G-POINT) - (n N-MPI) - (q Q-POINT) - (d D-MPI))) - -P-MPI - Prime specifying the field GF(p). - -A-MPI -B-MPI - The two coefficients of the Weierstrass equation y^2 = x^3 + ax + b - -G-POINT - Base point g. - -N-MPI - Order of g - -Q-POINT - The point representing the public key Q = dP. - -D-MPI - The private key d - - All point values are encoded in standard format; Libgcrypt does -currently only support uncompressed points, thus the first byte needs to -be `0x04'. - - The public key is similar with "private-key" replaced by "public-key" -and no D-MPI. - - If the domain parameters are well-known, the name of this curve may -be used. For example - - (private-key - (ecc - (curve "NIST P-192") - (q Q-POINT) - (d D-MPI))) - - The `curve' parameter may be given in any case and is used to replace -missing parameters. - -Currently implemented curves are: -`NIST P-192' -`1.2.840.10045.3.1.1' -`prime192v1' -`secp192r1' - The NIST 192 bit curve, its OID, X9.62 and SECP aliases. - -`NIST P-224' -`secp224r1' - The NIST 224 bit curve and its SECP alias. - -`NIST P-256' -`1.2.840.10045.3.1.7' -`prime256v1' -`secp256r1' - The NIST 256 bit curve, its OID, X9.62 and SECP aliases. - -`NIST P-384' -`secp384r1' - The NIST 384 bit curve and its SECP alias. - -`NIST P-521' -`secp521r1' - The NIST 521 bit curve and its SECP alias. - - As usual the OIDs may optionally be prefixed with the string `OID.' -or `oid.'. - - -File: gcrypt.info, Node: Public key modules, Next: Cryptographic Functions, Prev: Used S-expressions, Up: Public Key cryptography - -6.3 Public key modules -====================== - -Libgcrypt makes it possible to load additional `public key modules'; -these public key algorithms can be used just like the algorithms that -are built into the library directly. For an introduction into -extension modules, see *Note Modules::. - - -- Data type: gcry_pk_spec_t - This is the `module specification structure' needed for registering - public key modules, which has to be filled in by the user before it - can be used to register a module. It contains the following - members: - - `const char *name' - The primary name of this algorithm. - - `char **aliases' - A list of strings that are `aliases' for the algorithm. The - list must be terminated with a NULL element. - - `const char *elements_pkey' - String containing the one-letter names of the MPI values - contained in a public key. - - `const char *element_skey' - String containing the one-letter names of the MPI values - contained in a secret key. - - `const char *elements_enc' - String containing the one-letter names of the MPI values that - are the result of an encryption operation using this - algorithm. - - `const char *elements_sig' - String containing the one-letter names of the MPI values that - are the result of a sign operation using this algorithm. - - `const char *elements_grip' - String containing the one-letter names of the MPI values that - are to be included in the `key grip'. - - `int use' - The bitwise-OR of the following flags, depending on the - abilities of the algorithm: - `GCRY_PK_USAGE_SIGN' - The algorithm supports signing and verifying of data. - - `GCRY_PK_USAGE_ENCR' - The algorithm supports the encryption and decryption of - data. - - `gcry_pk_generate_t generate' - The function responsible for generating a new key pair. See - below for a description of this type. - - `gcry_pk_check_secret_key_t check_secret_key' - The function responsible for checking the sanity of a - provided secret key. See below for a description of this - type. - - `gcry_pk_encrypt_t encrypt' - The function responsible for encrypting data. See below for a - description of this type. - - `gcry_pk_decrypt_t decrypt' - The function responsible for decrypting data. See below for a - description of this type. - - `gcry_pk_sign_t sign' - The function responsible for signing data. See below for a - description of this type. - - `gcry_pk_verify_t verify' - The function responsible for verifying that the provided - signature matches the provided data. See below for a - description of this type. - - `gcry_pk_get_nbits_t get_nbits' - The function responsible for returning the number of bits of - a provided key. See below for a description of this type. - - -- Data type: gcry_pk_generate_t - Type for the `generate' function, defined as: gcry_err_code_t - (*gcry_pk_generate_t) (int algo, unsigned int nbits, unsigned long - use_e, gcry_mpi_t *skey, gcry_mpi_t **retfactors) - - -- Data type: gcry_pk_check_secret_key_t - Type for the `check_secret_key' function, defined as: - gcry_err_code_t (*gcry_pk_check_secret_key_t) (int algo, - gcry_mpi_t *skey) - - -- Data type: gcry_pk_encrypt_t - Type for the `encrypt' function, defined as: gcry_err_code_t - (*gcry_pk_encrypt_t) (int algo, gcry_mpi_t *resarr, gcry_mpi_t - data, gcry_mpi_t *pkey, int flags) - - -- Data type: gcry_pk_decrypt_t - Type for the `decrypt' function, defined as: gcry_err_code_t - (*gcry_pk_decrypt_t) (int algo, gcry_mpi_t *result, gcry_mpi_t - *data, gcry_mpi_t *skey, int flags) - - -- Data type: gcry_pk_sign_t - Type for the `sign' function, defined as: gcry_err_code_t - (*gcry_pk_sign_t) (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, - gcry_mpi_t *skey) - - -- Data type: gcry_pk_verify_t - Type for the `verify' function, defined as: gcry_err_code_t - (*gcry_pk_verify_t) (int algo, gcry_mpi_t hash, gcry_mpi_t *data, - gcry_mpi_t *pkey, int (*cmp) (void *, gcry_mpi_t), void *opaquev) - - -- Data type: gcry_pk_get_nbits_t - Type for the `get_nbits' function, defined as: unsigned - (*gcry_pk_get_nbits_t) (int algo, gcry_mpi_t *pkey) - - -- Function: gcry_error_t gcry_pk_register (gcry_pk_spec_t *PUBKEY, - unsigned int *algorithm_id, gcry_module_t *MODULE) - Register a new public key module whose specification can be found - in PUBKEY. On success, a new algorithm ID is stored in - ALGORITHM_ID and a pointer representing this module is stored in - MODULE. - - -- Function: void gcry_pk_unregister (gcry_module_t MODULE) - Unregister the public key module identified by MODULE, which must - have been registered with gcry_pk_register. - - -- Function: gcry_error_t gcry_pk_list (int *LIST, int *LIST_LENGTH) - Get a list consisting of the IDs of the loaded pubkey modules. If - LIST is zero, write the number of loaded pubkey modules to - LIST_LENGTH and return. If LIST is non-zero, the first - *LIST_LENGTH algorithm IDs are stored in LIST, which must be of - according size. In case there are less pubkey modules than - *LIST_LENGTH, *LIST_LENGTH is updated to the correct number. - - -File: gcrypt.info, Node: Cryptographic Functions, Next: General public-key related Functions, Prev: Public key modules, Up: Public Key cryptography - -6.4 Cryptographic Functions -=========================== - -Note that we will in future allow to use keys without p,q and u -specified and may also support other parameters for performance reasons. - -Some functions operating on S-expressions support `flags', that -influence the operation. These flags have to be listed in a -sub-S-expression named `flags'; the following flags are known: - -`pkcs1' - Use PKCS#1 block type 2 padding. - -`no-blinding' - Do not use a technique called `blinding', which is used by default - in order to prevent leaking of secret information. Blinding is - only implemented by RSA, but it might be implemented by other - algorithms in the future as well, when necessary. - -Now that we know the key basics, we can carry on and explain how to -encrypt and decrypt data. In almost all cases the data is a random -session key which is in turn used for the actual encryption of the real -data. There are 2 functions to do this: - - -- Function: gcry_error_t gcry_pk_encrypt (gcry_sexp_t *R_CIPH, - gcry_sexp_t DATA, gcry_sexp_t PKEY) - Obviously a public key must be provided for encryption. It is - expected as an appropriate S-expression (see above) in PKEY. The - data to be encrypted can either be in the simple old format, which - is a very simple S-expression consisting only of one MPI, or it - may be a more complex S-expression which also allows to specify - flags for operation, like e.g. padding rules. - - If you don't want to let Libgcrypt handle the padding, you must - pass an appropriate MPI using this expression for DATA: - - (data - (flags raw) - (value MPI)) - - This has the same semantics as the old style MPI only way. MPI is - the actual data, already padded appropriate for your protocol. - Most systems however use PKCS#1 padding and so you can use this - S-expression for DATA: - - (data - (flags pkcs1) - (value BLOCK)) - - Here, the "flags" list has the "pkcs1" flag which let the function - know that it should provide PKCS#1 block type 2 padding. The - actual data to be encrypted is passed as a string of octets in - BLOCK. The function checks that this data actually can be used - with the given key, does the padding and encrypts it. - - If the function could successfully perform the encryption, the - return value will be 0 and a new S-expression with the encrypted - result is allocated and assigned to the variable at the address of - R_CIPH. The caller is responsible to release this value using - `gcry_sexp_release'. In case of an error, an error code is - returned and R_CIPH will be set to `NULL'. - - The returned S-expression has this format when used with RSA: - - (enc-val - (rsa - (a A-MPI))) - - Where A-MPI is an MPI with the result of the RSA operation. When - using the Elgamal algorithm, the return value will have this - format: - - (enc-val - (elg - (a A-MPI) - (b B-MPI))) - - Where A-MPI and B-MPI are MPIs with the result of the Elgamal - encryption operation. - - -- Function: gcry_error_t gcry_pk_decrypt (gcry_sexp_t *R_PLAIN, - gcry_sexp_t DATA, gcry_sexp_t SKEY) - Obviously a private key must be provided for decryption. It is - expected as an appropriate S-expression (see above) in SKEY. The - data to be decrypted must match the format of the result as - returned by `gcry_pk_encrypt', but should be enlarged with a - `flags' element: - - (enc-val - (flags) - (elg - (a A-MPI) - (b B-MPI))) - - Note that this function currently does not know of any padding - methods and the caller must do any un-padding on his own. - - The function returns 0 on success or an error code. The variable - at the address of R_PLAIN will be set to NULL on error or receive - the decrypted value on success. The format of R_PLAIN is a simple - S-expression part (i.e. not a valid one) with just one MPI if - there was no `flags' element in DATA; if at least an empty `flags' - is passed in DATA, the format is: - - (value PLAINTEXT) - - Another operation commonly performed using public key cryptography is -signing data. In some sense this is even more important than -encryption because digital signatures are an important instrument for -key management. Libgcrypt supports digital signatures using 2 -functions, similar to the encryption functions: - - -- Function: gcry_error_t gcry_pk_sign (gcry_sexp_t *R_SIG, - gcry_sexp_t DATA, gcry_sexp_t SKEY) - This function creates a digital signature for DATA using the - private key SKEY and place it into the variable at the address of - R_SIG. DATA may either be the simple old style S-expression with - just one MPI or a modern and more versatile S-expression which - allows to let Libgcrypt handle padding: - - (data - (flags pkcs1) - (hash HASH-ALGO BLOCK)) - - This example requests to sign the data in BLOCK after applying - PKCS#1 block type 1 style padding. HASH-ALGO is a string with the - hash algorithm to be encoded into the signature, this may be any - hash algorithm name as supported by Libgcrypt. Most likely, this - will be "sha256" or "sha1". It is obvious that the length of - BLOCK must match the size of that message digests; the function - checks that this and other constraints are valid. - - If PKCS#1 padding is not required (because the caller does already - provide a padded value), either the old format or better the - following format should be used: - - (data - (flags raw) - (value MPI)) - - Here, the data to be signed is directly given as an MPI. - - The signature is returned as a newly allocated S-expression in - R_SIG using this format for RSA: - - (sig-val - (rsa - (s S-MPI))) - - Where S-MPI is the result of the RSA sign operation. For DSA the - S-expression returned is: - - (sig-val - (dsa - (r R-MPI) - (s S-MPI))) - - Where R-MPI and S-MPI are the result of the DSA sign operation. - For Elgamal signing (which is slow, yields large numbers and - probably is not as secure as the other algorithms), the same - format is used with "elg" replacing "dsa". - -The operation most commonly used is definitely the verification of a -signature. Libgcrypt provides this function: - - -- Function: gcry_error_t gcry_pk_verify (gcry_sexp_t SIG, - gcry_sexp_t DATA, gcry_sexp_t PKEY) - This is used to check whether the signature SIG matches the DATA. - The public key PKEY must be provided to perform this verification. - This function is similar in its parameters to `gcry_pk_sign' with - the exceptions that the public key is used instead of the private - key and that no signature is created but a signature, in a format - as created by `gcry_pk_sign', is passed to the function in SIG. - - The result is 0 for success (i.e. the data matches the signature), - or an error code where the most relevant code is - `GCRYERR_BAD_SIGNATURE' to indicate that the signature does not - match the provided data. - - - -File: gcrypt.info, Node: General public-key related Functions, Next: AC Interface, Prev: Cryptographic Functions, Up: Public Key cryptography - -6.5 General public-key related Functions -======================================== - -A couple of utility functions are available to retrieve the length of -the key, map algorithm identifiers and perform sanity checks: - - -- Function: const char * gcry_pk_algo_name (int ALGO) - Map the public key algorithm id ALGO to a string representation of - the algorithm name. For unknown algorithms this functions returns - the string `"?"'. This function should not be used to test for the - availability of an algorithm. - - -- Function: int gcry_pk_map_name (const char *NAME) - Map the algorithm NAME to a public key algorithm Id. Returns 0 if - the algorithm name is not known. - - -- Function: int gcry_pk_test_algo (int ALGO) - Return 0 if the public key algorithm ALGO is available for use. - Note that this is implemented as a macro. - - -- Function: unsigned int gcry_pk_get_nbits (gcry_sexp_t KEY) - Return what is commonly referred as the key length for the given - public or private in KEY. - - -- Function: unsigned char * gcry_pk_get_keygrip (gcry_sexp_t KEY, - unsigned char *ARRAY) - Return the so called "keygrip" which is the SHA-1 hash of the - public key parameters expressed in a way depended on the - algorithm. ARRAY must either provide space for 20 bytes or be - `NULL'. In the latter case a newly allocated array of that size is - returned. On success a pointer to the newly allocated space or to - ARRAY is returned. `NULL' is returned to indicate an error which - is most likely an unknown algorithm or one where a "keygrip" has - not yet been defined. The function accepts public or secret keys - in KEY. - - -- Function: gcry_error_t gcry_pk_testkey (gcry_sexp_t KEY) - Return zero if the private key KEY is `sane', an error code - otherwise. Note that it is not possible to check the `saneness' - of a public key. - - - -- Function: gcry_error_t gcry_pk_algo_info (int ALGO, int WHAT, - void *BUFFER, size_t *NBYTES) - Depending on the value of WHAT return various information about - the public key algorithm with the id ALGO. Note that the function - returns `-1' on error and the actual error code must be retrieved - using the function `gcry_errno'. The currently defined values for - WHAT are: - - `GCRYCTL_TEST_ALGO:' - Return 0 if the specified algorithm is available for use. - BUFFER must be `NULL', NBYTES may be passed as `NULL' or - point to a variable with the required usage of the algorithm. - This may be 0 for "don't care" or the bit-wise OR of these - flags: - - `GCRY_PK_USAGE_SIGN' - Algorithm is usable for signing. - - `GCRY_PK_USAGE_ENCR' - Algorithm is usable for encryption. - - Unless you need to test for the allowed usage, it is in - general better to use the macro gcry_pk_test_algo instead. - - `GCRYCTL_GET_ALGO_USAGE:' - Return the usage flags for the given algorithm. An invalid - algorithm return 0. Disabled algorithms are ignored here - because we want to know whether the algorithm is at all - capable of a certain usage. - - `GCRYCTL_GET_ALGO_NPKEY' - Return the number of elements the public key for algorithm - ALGO consist of. Return 0 for an unknown algorithm. - - `GCRYCTL_GET_ALGO_NSKEY' - Return the number of elements the private key for algorithm - ALGO consist of. Note that this value is always larger than - that of the public key. Return 0 for an unknown algorithm. - - `GCRYCTL_GET_ALGO_NSIGN' - Return the number of elements a signature created with the - algorithm ALGO consists of. Return 0 for an unknown - algorithm or for an algorithm not capable of creating - signatures. - - `GCRYCTL_GET_ALGO_NENC' - Return the number of elements a encrypted message created - with the algorithm ALGO consists of. Return 0 for an unknown - algorithm or for an algorithm not capable of encryption. - - Please note that parameters not required should be passed as - `NULL'. - - -- Function: gcry_error_t gcry_pk_ctl (int CMD, void *BUFFER, - size_t BUFLEN) - This is a general purpose function to perform certain control - operations. CMD controls what is to be done. The return value is - 0 for success or an error code. Currently supported values for - CMD are: - - `GCRYCTL_DISABLE_ALGO' - Disable the algorithm given as an algorithm id in BUFFER. - BUFFER must point to an `int' variable with the algorithm id - and BUFLEN must have the value `sizeof (int)'. - - -Libgcrypt also provides a function to generate public key pairs: - - -- Function: gcry_error_t gcry_pk_genkey (gcry_sexp_t *R_KEY, - gcry_sexp_t PARMS) - This function create a new public key pair using information given - in the S-expression PARMS and stores the private and the public key - in one new S-expression at the address given by R_KEY. In case of - an error, R_KEY is set to `NULL'. The return code is 0 for - success or an error code otherwise. - - Here is an example for PARMS to create an 2048 bit RSA key: - - (genkey - (rsa - (nbits 4:2048))) - - To create an Elgamal key, substitute "elg" for "rsa" and to create - a DSA key use "dsa". Valid ranges for the key length depend on the - algorithms; all commonly used key lengths are supported. Currently - supported parameters are: - - `nbits' - This is always required to specify the length of the key. - The argument is a string with a number in C-notation. The - value should be a multiple of 8. - - `curve NAME' - For ECC a named curve may be used instead of giving the - number of requested bits. This allows to request a specific - curve to override a default selection Libgcrypt would have - taken if `nbits' has been given. The available names are - listed with the description of the ECC public key parameters. - - `rsa-use-e' - This is only used with RSA to give a hint for the public - exponent. The value will be used as a base to test for a - usable exponent. Some values are special: - - `0' - Use a secure and fast value. This is currently the - number 41. - - `1' - Use a value as required by some crypto policies. This - is currently the number 65537. - - `2' - Reserved - - `> 2' - Use the given value. - - If this parameter is not used, Libgcrypt uses for historic - reasons 65537. - - `qbits' - This is only meanigful for DSA keys. If it is given the DSA - key is generated with a Q parameyer of this size. If it is - not given or zero Q is deduced from NBITS in this way: - `512 <= N <= 1024' - Q = 160 - - `N = 2048' - Q = 224 - - `N = 3072' - Q = 256 - - `N = 7680' - Q = 384 - - `N = 15360' - Q = 512 - Note that in this case only the values for N, as given in the - table, are allowed. When specifying Q all values of N in the - range 512 to 15680 are valid as long as they are multiples of - 8. - - `transient-key' - This is only meaningful for RSA and DSA keys. This is a flag - with no value. If given the RSA or DSA key is created using - a faster and a somewhat less secure random number generator. - This flag may be used for keys which are only used for a - short time and do not require full cryptographic strength. - - `domain' - This is only meaningful for DLP algorithms. If specified - keys are generated with domain parameters taken from this - list. The exact format of this parameter depends on the - actual algorithm. It is currently only implemented for DSA - using this format: - - (genkey - (dsa - (domain - (p P-MPI) - (q Q-MPI) - (g Q-MPI)))) - - `nbits' and `qbits' may not be specified because they are - derived from the domain parameters. - - `derive-parms' - This is currently only implemented for RSA and DSA keys. It - is not allowed to use this together with a `domain' - specification. If given, it is used to derive the keys using - the given parameters. - - If given for an RSA key the X9.31 key generation algorithm is - used even if libgcrypt is not in FIPS mode. If given for a - DSA key, the FIPS 186 algorithm is used even if libgcrypt is - not in FIPS mode. - - (genkey - (rsa - (nbits 4:1024) - (rsa-use-e 1:3) - (derive-parms - (Xp1 #1A1916DDB29B4EB7EB6732E128#) - (Xp2 #192E8AAC41C576C822D93EA433#) - (Xp #D8CD81F035EC57EFE822955149D3BFF70C53520D - 769D6D76646C7A792E16EBD89FE6FC5B605A6493 - 39DFC925A86A4C6D150B71B9EEA02D68885F5009 - B98BD984#) - (Xq1 #1A5CF72EE770DE50CB09ACCEA9#) - (Xq2 #134E4CAA16D2350A21D775C404#) - (Xq #CC1092495D867E64065DEE3E7955F2EBC7D47A2D - 7C9953388F97DDDC3E1CA19C35CA659EDC2FC325 - 6D29C2627479C086A699A49C4C9CEE7EF7BD1B34 - 321DE34A#)))) - - (genkey - (dsa - (nbits 4:1024) - (derive-parms - (seed SEED-MPI)))) - - `use-x931' - Force the use of the ANSI X9.31 key generation algorithm - instead of the default algorithm. This flag is only - meaningful for RSA and usually not required. Note that this - algorithm is implicitly used if either `derive-parms' is - given or Libgcrypt is in FIPS mode. - - `use-fips186' - Force the use of the FIPS 186 key generation algorithm - instead of the default algorithm. This flag is only - meaningful for DSA and usually not required. Note that this - algorithm is implicitly used if either `derive-parms' is - given or Libgcrypt is in FIPS mode. As of now FIPS 186-2 is - implemented; after the approval of FIPS 186-3 the code will - be changed to implement 186-3. - - `use-fips186-2' - Force the use of the FIPS 186-2 key generation algorithm - instead of the default algorithm. This algorithm is slighlty - different from FIPS 186-3 and allows only 1024 bit keys. - This flag is only meaningful for DSA and only required for - FIPS testing backward compatibility. - - - The key pair is returned in a format depending on the algorithm. - Both private and public keys are returned in one container and may - be accompanied by some miscellaneous information. - - As an example, here is what the Elgamal key generation returns: - - (key-data - (public-key - (elg - (p P-MPI) - (g G-MPI) - (y Y-MPI))) - (private-key - (elg - (p P-MPI) - (g G-MPI) - (y Y-MPI) - (x X-MPI))) - (misc-key-info - (pm1-factors N1 N2 ... NN)) - - As you can see, some of the information is duplicated, but this - provides an easy way to extract either the public or the private - key. Note that the order of the elements is not defined, e.g. the - private key may be stored before the public key. N1 N2 ... NN is a - list of prime numbers used to composite P-MPI; this is in general - not a very useful information and only available if the key - generation algorithm provides them. - - -File: gcrypt.info, Node: AC Interface, Prev: General public-key related Functions, Up: Public Key cryptography - -6.6 Alternative Public Key Interface -==================================== - -This section documents the alternative interface to asymmetric -cryptography (ac) that is not based on S-expressions, but on native C -data structures. As opposed to the pk interface described in the -former chapter, this one follows an open/use/close paradigm like other -building blocks of the library. - - *This interface has a few known problems; most noteworthy an -inherent tendency to leak memory. It might not be available in -forthcoming versions of Libgcrypt.* - -* Menu: - -* Available asymmetric algorithms:: List of algorithms supported by the library. -* Working with sets of data:: How to work with sets of data. -* Working with IO objects:: How to work with IO objects. -* Working with handles:: How to use handles. -* Working with keys:: How to work with keys. -* Using cryptographic functions:: How to perform cryptographic operations. -* Handle-independent functions:: General functions independent of handles. - - -File: gcrypt.info, Node: Available asymmetric algorithms, Next: Working with sets of data, Up: AC Interface - -6.6.1 Available asymmetric algorithms -------------------------------------- - -Libgcrypt supports the RSA (Rivest-Shamir-Adleman) algorithms as well -as DSA (Digital Signature Algorithm) and Elgamal. The versatile -interface allows to add more algorithms in the future. - - -- Data type: gcry_ac_id_t - The following constants are defined for this type: - - `GCRY_AC_RSA' - Rivest-Shamir-Adleman - - `GCRY_AC_DSA' - Digital Signature Algorithm - - `GCRY_AC_ELG' - Elgamal - - `GCRY_AC_ELG_E' - Elgamal, encryption only. - - -File: gcrypt.info, Node: Working with sets of data, Next: Working with IO objects, Prev: Available asymmetric algorithms, Up: AC Interface - -6.6.2 Working with sets of data -------------------------------- - -In the context of this interface the term `data set' refers to a list -of `named MPI values' that is used by functions performing -cryptographic operations; a named MPI value is a an MPI value, -associated with a label. - - Such data sets are used for representing keys, since keys simply -consist of a variable amount of numbers. Furthermore some functions -return data sets to the caller that are to be provided to other -functions. - - This section documents the data types, symbols and functions that are -relevant for working with data sets. - - -- Data type: gcry_ac_data_t - A single data set. - - The following flags are supported: - -`GCRY_AC_FLAG_DEALLOC' - Used for storing data in a data set. If given, the data will be - released by the library. Note that whenever one of the ac - functions is about to release objects because of this flag, the - objects are expected to be stored in memory allocated through the - Libgcrypt memory management. In other words: gcry_free() is used - instead of free(). - -`GCRY_AC_FLAG_COPY' - Used for storing/retrieving data in/from a data set. If given, the - library will create copies of the provided/contained data, which - will then be given to the user/associated with the data set. - - -- Function: gcry_error_t gcry_ac_data_new (gcry_ac_data_t *DATA) - Creates a new, empty data set and stores it in DATA. - - -- Function: void gcry_ac_data_destroy (gcry_ac_data_t DATA) - Destroys the data set DATA. - - -- Function: gcry_error_t gcry_ac_data_set (gcry_ac_data_t DATA, - unsigned int FLAGS, char *NAME, gcry_mpi_t MPI) - Add the value MPI to DATA with the label NAME. If FLAGS contains - GCRY_AC_FLAG_COPY, the data set will contain copies of NAME and - MPI. If FLAGS contains GCRY_AC_FLAG_DEALLOC or GCRY_AC_FLAG_COPY, - the values contained in the data set will be deallocated when they - are to be removed from the data set. - - -- Function: gcry_error_t gcry_ac_data_copy (gcry_ac_data_t *DATA_CP, - gcry_ac_data_t DATA) - Create a copy of the data set DATA and store it in DATA_CP. - FIXME: exact semantics undefined. - - -- Function: unsigned int gcry_ac_data_length (gcry_ac_data_t DATA) - Returns the number of named MPI values inside of the data set DATA. - - -- Function: gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t DATA, - unsigned int FLAGS, char *NAME, gcry_mpi_t *MPI) - Store the value labelled with NAME found in DATA in MPI. If FLAGS - contains GCRY_AC_FLAG_COPY, store a copy of the MPI value - contained in the data set. MPI may be NULL (this might be useful - for checking the existence of an MPI with extracting it). - - -- Function: gcry_error_t gcry_ac_data_get_index (gcry_ac_data_t DATA, - unsigned int flags, unsigned int INDEX, const char **NAME, - gcry_mpi_t *MPI) - Stores in NAME and MPI the named MPI value contained in the data - set DATA with the index IDX. If FLAGS contains GCRY_AC_FLAG_COPY, - store copies of the values contained in the data set. NAME or MPI - may be NULL. - - -- Function: void gcry_ac_data_clear (gcry_ac_data_t DATA) - Destroys any values contained in the data set DATA. - - -- Function: gcry_error_t gcry_ac_data_to_sexp (gcry_ac_data_t DATA, - gcry_sexp_t *SEXP, const char **IDENTIFIERS) - This function converts the data set DATA into a newly created - S-Expression, which is to be stored in SEXP; IDENTIFIERS is a NULL - terminated list of C strings, which specifies the structure of the - S-Expression. - - Example: - - If IDENTIFIERS is a list of pointers to the strings "foo" and - "bar" and if DATA is a data set containing the values "val1 = - 0x01" and "val2 = 0x02", then the resulting S-Expression will look - like this: (foo (bar ((val1 0x01) (val2 0x02))). - - -- Function: gcry_error gcry_ac_data_from_sexp (gcry_ac_data_t *DATA, - gcry_sexp_t SEXP, const char **IDENTIFIERS) - This function converts the S-Expression SEXP into a newly created - data set, which is to be stored in DATA; IDENTIFIERS is a NULL - terminated list of C strings, which specifies the structure of the - S-Expression. If the list of identifiers does not match the - structure of the S-Expression, the function fails. - - -File: gcrypt.info, Node: Working with IO objects, Next: Working with handles, Prev: Working with sets of data, Up: AC Interface - -6.6.3 Working with IO objects ------------------------------ - -Note: IO objects are currently only used in the context of message -encoding/decoding and encryption/signature schemes. - - -- Data type: gcry_ac_io_t - `gcry_ac_io_t' is the type to be used for IO objects. - - IO objects provide an uniform IO layer on top of different underlying -IO mechanisms; either they can be used for providing data to the -library (mode is GCRY_AC_IO_READABLE) or they can be used for -retrieving data from the library (mode is GCRY_AC_IO_WRITABLE). - - IO object need to be initialized by calling on of the following -functions: - - -- Function: void gcry_ac_io_init (gcry_ac_io_t *AC_IO, - gcry_ac_io_mode_t MODE, gcry_ac_io_type_t TYPE, ...); - Initialize AC_IO according to MODE, TYPE and the variable list of - arguments. The list of variable arguments to specify depends on - the given TYPE. - - -- Function: void gcry_ac_io_init_va (gcry_ac_io_t *AC_IO, - gcry_ac_io_mode_t MODE, gcry_ac_io_type_t TYPE, va_list AP); - Initialize AC_IO according to MODE, TYPE and the variable list of - arguments AP. The list of variable arguments to specify depends - on the given TYPE. - - The following types of IO objects exist: - -`GCRY_AC_IO_STRING' - In case of GCRY_AC_IO_READABLE the IO object will provide data - from a memory string. Arguments to specify at initialization time: - `unsigned char *' - Pointer to the beginning of the memory string - - `size_t' - Size of the memory string - In case of GCRY_AC_IO_WRITABLE the object will store retrieved - data in a newly allocated memory string. Arguments to specify at - initialization time: - `unsigned char **' - Pointer to address, at which the pointer to the newly created - memory string is to be stored - - `size_t *' - Pointer to address, at which the size of the newly created - memory string is to be stored - -`GCRY_AC_IO_CALLBACK' - In case of GCRY_AC_IO_READABLE the object will forward read - requests to a provided callback function. Arguments to specify at - initialization time: - `gcry_ac_data_read_cb_t' - Callback function to use - - `void *' - Opaque argument to provide to the callback function - In case of GCRY_AC_IO_WRITABLE the object will forward write - requests to a provided callback function. Arguments to specify at - initialization time: - `gcry_ac_data_write_cb_t' - Callback function to use - - `void *' - Opaque argument to provide to the callback function - - -File: gcrypt.info, Node: Working with handles, Next: Working with keys, Prev: Working with IO objects, Up: AC Interface - -6.6.4 Working with handles --------------------------- - -In order to use an algorithm, an according handle must be created. -This is done using the following function: - - -- Function: gcry_error_t gcry_ac_open (gcry_ac_handle_t *HANDLE, int - ALGORITHM, int FLAGS) - Creates a new handle for the algorithm ALGORITHM and stores it in - HANDLE. FLAGS is not used currently. - - ALGORITHM must be a valid algorithm ID, see *Note Available - asymmetric algorithms::, for a list of supported algorithms and the - according constants. Besides using the listed constants directly, - the functions `gcry_pk_name_to_id' may be used to convert the - textual name of an algorithm into the according numeric ID. - - -- Function: void gcry_ac_close (gcry_ac_handle_t HANDLE) - Destroys the handle HANDLE. - - -File: gcrypt.info, Node: Working with keys, Next: Using cryptographic functions, Prev: Working with handles, Up: AC Interface - -6.6.5 Working with keys ------------------------ - - -- Data type: gcry_ac_key_type_t - Defined constants: - - `GCRY_AC_KEY_SECRET' - Specifies a secret key. - - `GCRY_AC_KEY_PUBLIC' - Specifies a public key. - - -- Data type: gcry_ac_key_t - This type represents a single `key', either a secret one or a - public one. - - -- Data type: gcry_ac_key_pair_t - This type represents a `key pair' containing a secret and a public - key. - - Key data structures can be created in two different ways; a new key -pair can be generated, resulting in ready-to-use key. Alternatively a -key can be initialized from a given data set. - - -- Function: gcry_error_t gcry_ac_key_init (gcry_ac_key_t *KEY, - gcry_ac_handle_t HANDLE, gcry_ac_key_type_t TYPE, - gcry_ac_data_t DATA) - Creates a new key of type TYPE, consisting of the MPI values - contained in the data set DATA and stores it in KEY. - - -- Function: gcry_error_t gcry_ac_key_pair_generate (gcry_ac_handle_t - HANDLE, unsigned int NBITS, void *KEY_SPEC, - gcry_ac_key_pair_t *KEY_PAIR, gcry_mpi_t **MISC_DATA) - Generates a new key pair via the handle HANDLE of NBITS bits and - stores it in KEY_PAIR. - - In case non-standard settings are wanted, a pointer to a structure - of type `gcry_ac_key_spec__t', matching the selected - algorithm, can be given as KEY_SPEC. MISC_DATA is not used yet. - Such a structure does only exist for RSA. A description of the - members of the supported structures follows. - - `gcry_ac_key_spec_rsa_t' - - `gcry_mpi_t e' - Generate the key pair using a special `e'. The value of - `e' has the following meanings: - `= 0' - Let Libgcrypt decide what exponent should be used. - - `= 1' - Request the use of a "secure" exponent; this is - required by some specification to be 65537. - - `> 2' - Try starting at this value until a working exponent - is found. Note that the current implementation - leaks some information about the private key - because the incrementation used is not randomized. - Thus, this function will be changed in the future - to return a random exponent of the given size. - - Example code: - { - gcry_ac_key_pair_t key_pair; - gcry_ac_key_spec_rsa_t rsa_spec; - - rsa_spec.e = gcry_mpi_new (0); - gcry_mpi_set_ui (rsa_spec.e, 1); - - err = gcry_ac_open (&handle, GCRY_AC_RSA, 0); - assert (! err); - - err = gcry_ac_key_pair_generate (handle, 1024, &rsa_spec, - &key_pair, NULL); - assert (! err); - } - - -- Function: gcry_ac_key_t gcry_ac_key_pair_extract - (gcry_ac_key_pair_t KEY_PAIR, gcry_ac_key_type_t WHICH) - Returns the key of type WHICH out of the key pair KEY_PAIR. - - -- Function: void gcry_ac_key_destroy (gcry_ac_key_t KEY) - Destroys the key KEY. - - -- Function: void gcry_ac_key_pair_destroy (gcry_ac_key_pair_t - KEY_PAIR) - Destroys the key pair KEY_PAIR. - - -- Function: gcry_ac_data_t gcry_ac_key_data_get (gcry_ac_key_t KEY) - Returns the data set contained in the key KEY. - - -- Function: gcry_error_t gcry_ac_key_test (gcry_ac_handle_t HANDLE, - gcry_ac_key_t KEY) - Verifies that the private key KEY is sane via HANDLE. - - -- Function: gcry_error_t gcry_ac_key_get_nbits (gcry_ac_handle_t - HANDLE, gcry_ac_key_t KEY, unsigned int *NBITS) - Stores the number of bits of the key KEY in NBITS via HANDLE. - - -- Function: gcry_error_t gcry_ac_key_get_grip (gcry_ac_handle_t - HANDLE, gcry_ac_key_t KEY, unsigned char *KEY_GRIP) - Writes the 20 byte long key grip of the key KEY to KEY_GRIP via - HANDLE. - - -File: gcrypt.info, Node: Using cryptographic functions, Next: Handle-independent functions, Prev: Working with keys, Up: AC Interface - -6.6.6 Using cryptographic functions ------------------------------------ - -The following flags might be relevant: - -`GCRY_AC_FLAG_NO_BLINDING' - Disable any blinding, which might be supported by the chosen - algorithm; blinding is the default. - - There exist two kinds of cryptographic functions available through -the ac interface: primitives, and high-level functions. - - Primitives deal with MPIs (data sets) directly; what they provide is -direct access to the cryptographic operations provided by an algorithm -implementation. - - High-level functions deal with octet strings, according to a -specified "scheme". Schemes make use of "encoding methods", which are -responsible for converting the provided octet strings into MPIs, which -are then forwared to the cryptographic primitives. Since schemes are -to be used for a special purpose in order to achieve a particular -security goal, there exist "encryption schemes" and "signature -schemes". Encoding methods can be used seperately or implicitly -through schemes. - - What follows is a description of the cryptographic primitives. - - -- Function: gcry_error_t gcry_ac_data_encrypt (gcry_ac_handle_t - HANDLE, unsigned int FLAGS, gcry_ac_key_t KEY, gcry_mpi_t - DATA_PLAIN, gcry_ac_data_t *DATA_ENCRYPTED) - Encrypts the plain text MPI value DATA_PLAIN with the key public - KEY under the control of the flags FLAGS and stores the resulting - data set into DATA_ENCRYPTED. - - -- Function: gcry_error_t gcry_ac_data_decrypt (gcry_ac_handle_t - HANDLE, unsigned int FLAGS, gcry_ac_key_t KEY, gcry_mpi_t - *DATA_PLAIN, gcry_ac_data_t DATA_ENCRYPTED) - Decrypts the encrypted data contained in the data set - DATA_ENCRYPTED with the secret key KEY under the control of the - flags FLAGS and stores the resulting plain text MPI value in - DATA_PLAIN. - - -- Function: gcry_error_t gcry_ac_data_sign (gcry_ac_handle_t HANDLE, - gcry_ac_key_t KEY, gcry_mpi_t DATA, gcry_ac_data_t - *DATA_SIGNATURE) - Signs the data contained in DATA with the secret key KEY and - stores the resulting signature in the data set DATA_SIGNATURE. - - -- Function: gcry_error_t gcry_ac_data_verify (gcry_ac_handle_t - HANDLE, gcry_ac_key_t KEY, gcry_mpi_t DATA, gcry_ac_data_t - DATA_SIGNATURE) - Verifies that the signature contained in the data set - DATA_SIGNATURE is indeed the result of signing the data contained - in DATA with the secret key belonging to the public key KEY. - - What follows is a description of the high-level functions. - - The type "gcry_ac_em_t" is used for specifying encoding methods; the -following methods are supported: - -`GCRY_AC_EME_PKCS_V1_5' - PKCS-V1_5 Encoding Method for Encryption. Options must be provided - through a pointer to a correctly initialized object of type - gcry_ac_eme_pkcs_v1_5_t. - -`GCRY_AC_EMSA_PKCS_V1_5' - PKCS-V1_5 Encoding Method for Signatures with Appendix. Options - must be provided through a pointer to a correctly initialized - object of type gcry_ac_emsa_pkcs_v1_5_t. - - Option structure types: - -`gcry_ac_eme_pkcs_v1_5_t' - - `gcry_ac_key_t key' - - `gcry_ac_handle_t handle' - -`gcry_ac_emsa_pkcs_v1_5_t' - - `gcry_md_algo_t md' - - `size_t em_n' - - Encoding methods can be used directly through the following -functions: - - -- Function: gcry_error_t gcry_ac_data_encode (gcry_ac_em_t METHOD, - unsigned int FLAGS, void *OPTIONS, unsigned char *M, size_t - M_N, unsigned char **EM, size_t *EM_N) - Encodes the message contained in M of size M_N according to - METHOD, FLAGS and OPTIONS. The newly created encoded message is - stored in EM and EM_N. - - -- Function: gcry_error_t gcry_ac_data_decode (gcry_ac_em_t METHOD, - unsigned int FLAGS, void *OPTIONS, unsigned char *EM, size_t - EM_N, unsigned char **M, size_t *M_N) - Decodes the message contained in EM of size EM_N according to - METHOD, FLAGS and OPTIONS. The newly created decoded message is - stored in M and M_N. - - The type "gcry_ac_scheme_t" is used for specifying schemes; the -following schemes are supported: - -`GCRY_AC_ES_PKCS_V1_5' - PKCS-V1_5 Encryption Scheme. No options can be provided. - -`GCRY_AC_SSA_PKCS_V1_5' - PKCS-V1_5 Signature Scheme (with Appendix). Options can be - provided through a pointer to a correctly initialized object of - type gcry_ac_ssa_pkcs_v1_5_t. - - Option structure types: - -`gcry_ac_ssa_pkcs_v1_5_t' - - `gcry_md_algo_t md' - - The functions implementing schemes: - - -- Function: gcry_error_t gcry_ac_data_encrypt_scheme - (gcry_ac_handle_t HANDLE, gcry_ac_scheme_t SCHEME, unsigned - int FLAGS, void *OPTS, gcry_ac_key_t KEY, gcry_ac_io_t - *IO_MESSAGE, gcry_ac_io_t *IO_CIPHER) - Encrypts the plain text readable from IO_MESSAGE through HANDLE - with the public key KEY according to SCHEME, FLAGS and OPTS. If - OPTS is not NULL, it has to be a pointer to a structure specific - to the chosen scheme (gcry_ac_es_*_t). The encrypted message is - written to IO_CIPHER. - - -- Function: gcry_error_t gcry_ac_data_decrypt_scheme - (gcry_ac_handle_t HANDLE, gcry_ac_scheme_t SCHEME, unsigned - int FLAGS, void *OPTS, gcry_ac_key_t KEY, gcry_ac_io_t - *IO_CIPHER, gcry_ac_io_t *IO_MESSAGE) - Decrypts the cipher text readable from IO_CIPHER through HANDLE - with the secret key KEY according to SCHEME, FLAGS and OPTS. If - OPTS is not NULL, it has to be a pointer to a structure specific - to the chosen scheme (gcry_ac_es_*_t). The decrypted message is - written to IO_MESSAGE. - - -- Function: gcry_error_t gcry_ac_data_sign_scheme (gcry_ac_handle_t - HANDLE, gcry_ac_scheme_t SCHEME, unsigned int FLAGS, void - *OPTS, gcry_ac_key_t KEY, gcry_ac_io_t *IO_MESSAGE, - gcry_ac_io_t *IO_SIGNATURE) - Signs the message readable from IO_MESSAGE through HANDLE with the - secret key KEY according to SCHEME, FLAGS and OPTS. If OPTS is - not NULL, it has to be a pointer to a structure specific to the - chosen scheme (gcry_ac_ssa_*_t). The signature is written to - IO_SIGNATURE. - - -- Function: gcry_error_t gcry_ac_data_verify_scheme (gcry_ac_handle_t - HANDLE, gcry_ac_scheme_t SCHEME, unsigned int FLAGS, void - *OPTS, gcry_ac_key_t KEY, gcry_ac_io_t *IO_MESSAGE, - gcry_ac_io_t *IO_SIGNATURE) - Verifies through HANDLE that the signature readable from - IO_SIGNATURE is indeed the result of signing the message readable - from IO_MESSAGE with the secret key belonging to the public key - KEY according to SCHEME and OPTS. If OPTS is not NULL, it has to - be an anonymous structure (gcry_ac_ssa_*_t) specific to the chosen - scheme. - - -File: gcrypt.info, Node: Handle-independent functions, Prev: Using cryptographic functions, Up: AC Interface - -6.6.7 Handle-independent functions ----------------------------------- - -These two functions are deprecated; do not use them for new code. - - -- Function: gcry_error_t gcry_ac_id_to_name (gcry_ac_id_t ALGORITHM, - const char **NAME) - Stores the textual representation of the algorithm whose id is - given in ALGORITHM in NAME. Deprecated; use `gcry_pk_algo_name'. - - -- Function: gcry_error_t gcry_ac_name_to_id (const char *NAME, - gcry_ac_id_t *ALGORITHM) - Stores the numeric ID of the algorithm whose textual - representation is contained in NAME in ALGORITHM. Deprecated; use - `gcry_pk_map_name'. - - -File: gcrypt.info, Node: Hashing, Next: Random Numbers, Prev: Public Key cryptography, Up: Top - -7 Hashing -********* - -Libgcrypt provides an easy and consistent to use interface for hashing. -Hashing is buffered and several hash algorithms can be updated at once. -It is possible to compute a MAC using the same routines. The -programming model follows an open/process/close paradigm and is in that -similar to other building blocks provided by Libgcrypt. - - For convenience reasons, a few cyclic redundancy check value -operations are also supported. - -* Menu: - -* Available hash algorithms:: List of hash algorithms supported by the library. -* Hash algorithm modules:: How to work with hash algorithm modules. -* Working with hash algorithms:: List of functions related to hashing. - - -File: gcrypt.info, Node: Available hash algorithms, Next: Hash algorithm modules, Up: Hashing - -7.1 Available hash algorithms -============================= - -`GCRY_MD_NONE' - This is not a real algorithm but used by some functions as an error - return value. This constant is guaranteed to have the value `0'. - -`GCRY_MD_SHA1' - This is the SHA-1 algorithm which yields a message digest of 20 - bytes. Note that SHA-1 begins to show some weaknesses and it is - suggested to fade out its use if strong cryptographic properties - are required. - -`GCRY_MD_RMD160' - This is the 160 bit version of the RIPE message digest - (RIPE-MD-160). Like SHA-1 it also yields a digest of 20 bytes. - This algorithm share a lot of design properties with SHA-1 and - thus it is advisable not to use it for new protocols. - -`GCRY_MD_MD5' - This is the well known MD5 algorithm, which yields a message - digest of 16 bytes. Note that the MD5 algorithm has severe - weaknesses, for example it is easy to compute two messages - yielding the same hash (collision attack). The use of this - algorithm is only justified for non-cryptographic application. - -`GCRY_MD_MD4' - This is the MD4 algorithm, which yields a message digest of 16 - bytes. This algorithms ha severe weaknesses and should not be - used. - -`GCRY_MD_MD2' - This is an reserved identifier for MD-2; there is no - implementation yet. This algorithm has severe weaknesses and - should not be used. - -`GCRY_MD_TIGER' - This is the TIGER/192 algorithm which yields a message digest of - 24 bytes. - -`GCRY_MD_HAVAL' - This is an reserved value for the HAVAL algorithm with 5 passes - and 160 bit. It yields a message digest of 20 bytes. Note that - there is no implementation yet available. - -`GCRY_MD_SHA224' - This is the SHA-224 algorithm which yields a message digest of 28 - bytes. See Change Notice 1 for FIPS 180-2 for the specification. - -`GCRY_MD_SHA256' - This is the SHA-256 algorithm which yields a message digest of 32 - bytes. See FIPS 180-2 for the specification. - -`GCRY_MD_SHA384' - This is the SHA-384 algorithm which yields a message digest of 48 - bytes. See FIPS 180-2 for the specification. - -`GCRY_MD_SHA512' - This is the SHA-384 algorithm which yields a message digest of 64 - bytes. See FIPS 180-2 for the specification. - -`GCRY_MD_CRC32' - This is the ISO 3309 and ITU-T V.42 cyclic redundancy check. It - yields an output of 4 bytes. Note that this is not a hash - algorithm in the cryptographic sense. - -`GCRY_MD_CRC32_RFC1510' - This is the above cyclic redundancy check function, as modified by - RFC 1510. It yields an output of 4 bytes. Note that this is not - a hash algorithm in the cryptographic sense. - -`GCRY_MD_CRC24_RFC2440' - This is the OpenPGP cyclic redundancy check function. It yields an - output of 3 bytes. Note that this is not a hash algorithm in the - cryptographic sense. - -`GCRY_MD_WHIRLPOOL' - This is the Whirlpool algorithm which yields a message digest of 64 - bytes. - - - -File: gcrypt.info, Node: Hash algorithm modules, Next: Working with hash algorithms, Prev: Available hash algorithms, Up: Hashing - -7.2 Hash algorithm modules -========================== - -Libgcrypt makes it possible to load additional `message digest -modules'; these digests can be used just like the message digest -algorithms that are built into the library directly. For an -introduction into extension modules, see *Note Modules::. - - -- Data type: gcry_md_spec_t - This is the `module specification structure' needed for registering - message digest modules, which has to be filled in by the user - before it can be used to register a module. It contains the - following members: - - `const char *name' - The primary name of this algorithm. - - `unsigned char *asnoid' - Array of bytes that form the ASN OID. - - `int asnlen' - Length of bytes in `asnoid'. - - `gcry_md_oid_spec_t *oids' - A list of OIDs that are to be associated with the algorithm. - The list's last element must have it's `oid' member set to - NULL. See below for an explanation of this type. See below - for an explanation of this type. - - `int mdlen' - Length of the message digest algorithm. See below for an - explanation of this type. - - `gcry_md_init_t init' - The function responsible for initializing a handle. See - below for an explanation of this type. - - `gcry_md_write_t write' - The function responsible for writing data into a message - digest context. See below for an explanation of this type. - - `gcry_md_final_t final' - The function responsible for `finalizing' a message digest - context. See below for an explanation of this type. - - `gcry_md_read_t read' - The function responsible for reading out a message digest - result. See below for an explanation of this type. - - `size_t contextsize' - The size of the algorithm-specific `context', that should be - allocated for each handle. - - -- Data type: gcry_md_oid_spec_t - This type is used for associating a user-provided algorithm - implementation with certain OIDs. It contains the following - members: - - `const char *oidstring' - Textual representation of the OID. - - -- Data type: gcry_md_init_t - Type for the `init' function, defined as: void (*gcry_md_init_t) - (void *c) - - -- Data type: gcry_md_write_t - Type for the `write' function, defined as: void (*gcry_md_write_t) - (void *c, unsigned char *buf, size_t nbytes) - - -- Data type: gcry_md_final_t - Type for the `final' function, defined as: void (*gcry_md_final_t) - (void *c) - - -- Data type: gcry_md_read_t - Type for the `read' function, defined as: unsigned char - *(*gcry_md_read_t) (void *c) - - -- Function: gcry_error_t gcry_md_register (gcry_md_spec_t *DIGEST, - unsigned int *algorithm_id, gcry_module_t *MODULE) - Register a new digest module whose specification can be found in - DIGEST. On success, a new algorithm ID is stored in ALGORITHM_ID - and a pointer representing this module is stored in MODULE. - - -- Function: void gcry_md_unregister (gcry_module_t MODULE) - Unregister the digest identified by MODULE, which must have been - registered with gcry_md_register. - - -- Function: gcry_error_t gcry_md_list (int *LIST, int *LIST_LENGTH) - Get a list consisting of the IDs of the loaded message digest - modules. If LIST is zero, write the number of loaded message - digest modules to LIST_LENGTH and return. If LIST is non-zero, - the first *LIST_LENGTH algorithm IDs are stored in LIST, which - must be of according size. In case there are less message digests - modules than *LIST_LENGTH, *LIST_LENGTH is updated to the correct - number. - - -File: gcrypt.info, Node: Working with hash algorithms, Prev: Hash algorithm modules, Up: Hashing - -7.3 Working with hash algorithms -================================ - -To use most of these function it is necessary to create a context; this -is done using: - - -- Function: gcry_error_t gcry_md_open (gcry_md_hd_t *HD, int ALGO, - unsigned int FLAGS) - Create a message digest object for algorithm ALGO. FLAGS may be - given as an bitwise OR of constants described below. ALGO may be - given as `0' if the algorithms to use are later set using - `gcry_md_enable'. HD is guaranteed to either receive a valid - handle or NULL. - - For a list of supported algorithms, see *Note Available hash - algorithms::. - - The flags allowed for MODE are: - - `GCRY_MD_FLAG_SECURE' - Allocate all buffers and the resulting digest in "secure - memory". Use this is the hashed data is highly confidential. - - `GCRY_MD_FLAG_HMAC' - Turn the algorithm into a HMAC message authentication - algorithm. This only works if just one algorithm is enabled - for the handle. Note that the function `gcry_md_setkey' must - be used to set the MAC key. The size of the MAC is equal to - the message digest of the underlying hash algorithm. If you - want CBC message authentication codes based on a cipher, see - *Note Working with cipher handles::. - - - You may use the function `gcry_md_is_enabled' to later check - whether an algorithm has been enabled. - - - If you want to calculate several hash algorithms at the same time, -you have to use the following function right after the `gcry_md_open': - - -- Function: gcry_error_t gcry_md_enable (gcry_md_hd_t H, int ALGO) - Add the message digest algorithm ALGO to the digest object - described by handle H. Duplicated enabling of algorithms is - detected and ignored. - - If the flag `GCRY_MD_FLAG_HMAC' was used, the key for the MAC must -be set using the function: - - -- Function: gcry_error_t gcry_md_setkey (gcry_md_hd_t H, const void - *KEY, size_t KEYLEN) - For use with the HMAC feature, set the MAC key to the value of KEY - of length KEYLEN bytes. There is no restriction on the length of - the key. - - After you are done with the hash calculation, you should release the -resources by using: - - -- Function: void gcry_md_close (gcry_md_hd_t H) - Release all resources of hash context H. H should not be used - after a call to this function. A `NULL' passed as H is ignored. - The function also zeroises all sensitive information associated - with this handle. - - - Often you have to do several hash operations using the same -algorithm. To avoid the overhead of creating and releasing context, a -reset function is provided: - - -- Function: void gcry_md_reset (gcry_md_hd_t H) - Reset the current context to its initial state. This is - effectively identical to a close followed by an open and enabling - all currently active algorithms. - - Often it is necessary to start hashing some data and then continue to -hash different data. To avoid hashing the same data several times -(which might not even be possible if the data is received from a pipe), -a snapshot of the current hash context can be taken and turned into a -new context: - - -- Function: gcry_error_t gcry_md_copy (gcry_md_hd_t *HANDLE_DST, - gcry_md_hd_t HANDLE_SRC) - Create a new digest object as an exact copy of the object - described by handle HANDLE_SRC and store it in HANDLE_DST. The - context is not reset and you can continue to hash data using this - context and independently using the original context. - - Now that we have prepared everything to calculate hashes, it is time -to see how it is actually done. There are two ways for this, one to -update the hash with a block of memory and one macro to update the hash -by just one character. Both methods can be used on the same hash -context. - - -- Function: void gcry_md_write (gcry_md_hd_t H, const void *BUFFER, - size_t LENGTH) - Pass LENGTH bytes of the data in BUFFER to the digest object with - handle H to update the digest values. This function should be used - for large blocks of data. - - -- Function: void gcry_md_putc (gcry_md_hd_t H, int C) - Pass the byte in C to the digest object with handle H to update - the digest value. This is an efficient function, implemented as a - macro to buffer the data before an actual update. - - The semantics of the hash functions do not provide for reading out -intermediate message digests because the calculation must be finalized -first. This finalization may for example include the number of bytes -hashed in the message digest or some padding. - - -- Function: void gcry_md_final (gcry_md_hd_t H) - Finalize the message digest calculation. This is not really needed - because `gcry_md_read' does this implicitly. After this has been - done no further updates (by means of `gcry_md_write' or - `gcry_md_putc' are allowed. Only the first call to this function - has an effect. It is implemented as a macro. - - The way to read out the calculated message digest is by using the -function: - - -- Function: unsigned char * gcry_md_read (gcry_md_hd_t H, int ALGO) - `gcry_md_read' returns the message digest after finalizing the - calculation. This function may be used as often as required but - it will always return the same value for one handle. The returned - message digest is allocated within the message context and - therefore valid until the handle is released or reseted (using - `gcry_md_close' or `gcry_md_reset'. ALGO may be given as 0 to - return the only enabled message digest or it may specify one of - the enabled algorithms. The function does return `NULL' if the - requested algorithm has not been enabled. - - Because it is often necessary to get the message digest of one block -of memory, a fast convenience function is available for this task: - - -- Function: void gcry_md_hash_buffer (int ALGO, void *DIGEST, const - void *BUFFER, size_t LENGTH); - `gcry_md_hash_buffer' is a shortcut function to calculate a message - digest of a buffer. This function does not require a context and - immediately returns the message digest of the LENGTH bytes at - BUFFER. DIGEST must be allocated by the caller, large enough to - hold the message digest yielded by the the specified algorithm - ALGO. This required size may be obtained by using the function - `gcry_md_get_algo_dlen'. - - Note that this function will abort the process if an unavailable - algorithm is used. - - Hash algorithms are identified by internal algorithm numbers (see -`gcry_md_open' for a list). However, in most applications they are -used by names, so two functions are available to map between string -representations and hash algorithm identifiers. - - -- Function: const char * gcry_md_algo_name (int ALGO) - Map the digest algorithm id ALGO to a string representation of the - algorithm name. For unknown algorithms this function returns the - string `"?"'. This function should not be used to test for the - availability of an algorithm. - - -- Function: int gcry_md_map_name (const char *NAME) - Map the algorithm with NAME to a digest algorithm identifier. - Returns 0 if the algorithm name is not known. Names representing - ASN.1 object identifiers are recognized if the IETF dotted format - is used and the OID is prefixed with either "`oid.'" or "`OID.'". - For a list of supported OIDs, see the source code at - `cipher/md.c'. This function should not be used to test for the - availability of an algorithm. - - -- Function: gcry_error_t gcry_md_get_asnoid (int ALGO, void *BUFFER, - size_t *LENGTH) - Return an DER encoded ASN.1 OID for the algorithm ALGO in the user - allocated BUFFER. LENGTH must point to variable with the available - size of BUFFER and receives after return the actual size of the - returned OID. The returned error code may be `GPG_ERR_TOO_SHORT' - if the provided buffer is to short to receive the OID; it is - possible to call the function with `NULL' for BUFFER to have it - only return the required size. The function returns 0 on success. - - - To test whether an algorithm is actually available for use, the -following macro should be used: - - -- Function: gcry_error_t gcry_md_test_algo (int ALGO) - The macro returns 0 if the algorithm ALGO is available for use. - - If the length of a message digest is not known, it can be retrieved -using the following function: - - -- Function: unsigned int gcry_md_get_algo_dlen (int ALGO) - Retrieve the length in bytes of the digest yielded by algorithm - ALGO. This is often used prior to `gcry_md_read' to allocate - sufficient memory for the digest. - - In some situations it might be hard to remember the algorithm used -for the ongoing hashing. The following function might be used to get -that information: - - -- Function: int gcry_md_get_algo (gcry_md_hd_t H) - Retrieve the algorithm used with the handle H. Note that this - does not work reliable if more than one algorithm is enabled in H. - - The following macro might also be useful: - - -- Function: int gcry_md_is_secure (gcry_md_hd_t H) - This function returns true when the digest object H is allocated - in "secure memory"; i.e. H was created with the - `GCRY_MD_FLAG_SECURE'. - - -- Function: int gcry_md_is_enabled (gcry_md_hd_t H, int ALGO) - This function returns true when the algorithm ALGO has been - enabled for the digest object H. - - Tracking bugs related to hashing is often a cumbersome task which -requires to add a lot of printf statements into the code. Libgcrypt -provides an easy way to avoid this. The actual data hashed can be -written to files on request. - - -- Function: void gcry_md_debug (gcry_md_hd_t H, const char *SUFFIX) - Enable debugging for the digest object with handle H. This - creates create files named `dbgmd-.' while doing the - actual hashing. SUFFIX is the string part in the filename. The - number is a counter incremented for each new hashing. The data in - the file is the raw data as passed to `gcry_md_write' or - `gcry_md_putc'. If `NULL' is used for SUFFIX, the debugging is - stopped and the file closed. This is only rarely required because - `gcry_md_close' implicitly stops debugging. - - The following two deprecated macros are used for debugging by old -code. They shopuld be replaced by `gcry_md_debug'. - - -- Function: void gcry_md_start_debug (gcry_md_hd_t H, const char - *SUFFIX) - Enable debugging for the digest object with handle H. This - creates create files named `dbgmd-.' while doing the - actual hashing. SUFFIX is the string part in the filename. The - number is a counter incremented for each new hashing. The data in - the file is the raw data as passed to `gcry_md_write' or - `gcry_md_putc'. - - -- Function: void gcry_md_stop_debug (gcry_md_hd_t H, int RESERVED) - Stop debugging on handle H. RESERVED should be specified as 0. - This function is usually not required because `gcry_md_close' does - implicitly stop debugging. - - -File: gcrypt.info, Node: Random Numbers, Next: S-expressions, Prev: Hashing, Up: Top - -8 Random Numbers -**************** - -* Menu: - -* Quality of random numbers:: Libgcrypt uses different quality levels. -* Retrieving random numbers:: How to retrieve random numbers. - - -File: gcrypt.info, Node: Quality of random numbers, Next: Retrieving random numbers, Up: Random Numbers - -8.1 Quality of random numbers -============================= - -Libgcypt offers random numbers of different quality levels: - - -- Data type: gcry_random_level_t - The constants for the random quality levels are of this enum type. - -`GCRY_WEAK_RANDOM' - For all functions, except for `gcry_mpi_randomize', this level maps - to GCRY_STRONG_RANDOM. If you do not want this, consider using - `gcry_create_nonce'. - -`GCRY_STRONG_RANDOM' - Use this level for session keys and similar purposes. - -`GCRY_VERY_STRONG_RANDOM' - Use this level for long term key material. - - -File: gcrypt.info, Node: Retrieving random numbers, Prev: Quality of random numbers, Up: Random Numbers - -8.2 Retrieving random numbers -============================= - - -- Function: void gcry_randomize (unsigned char *BUFFER, size_t - LENGTH, enum gcry_random_level LEVEL) - Fill BUFFER with LENGTH random bytes using a random quality as - defined by LEVEL. - - -- Function: void * gcry_random_bytes (size_t NBYTES, enum - gcry_random_level LEVEL) - Convenience function to allocate a memory block consisting of - NBYTES fresh random bytes using a random quality as defined by - LEVEL. - - -- Function: void * gcry_random_bytes_secure (size_t NBYTES, enum - gcry_random_level LEVEL) - Convenience function to allocate a memory block consisting of - NBYTES fresh random bytes using a random quality as defined by - LEVEL. This function differs from `gcry_random_bytes' in that the - returned buffer is allocated in a "secure" area of the memory. - - -- Function: void gcry_create_nonce (unsigned char *BUFFER, size_t - LENGTH) - Fill BUFFER with LENGTH unpredictable bytes. This is commonly - called a nonce and may also be used for initialization vectors and - padding. This is an extra function nearly independent of the - other random function for 3 reasons: It better protects the - regular random generator's internal state, provides better - performance and does not drain the precious entropy pool. - - - -File: gcrypt.info, Node: S-expressions, Next: MPI library, Prev: Random Numbers, Up: Top - -9 S-expressions -*************** - -S-expressions are used by the public key functions to pass complex data -structures around. These LISP like objects are used by some -cryptographic protocols (cf. RFC-2692) and Libgcrypt provides functions -to parse and construct them. For detailed information, see `Ron -Rivest, code and description of S-expressions, -`http://theory.lcs.mit.edu/~rivest/sexp.html''. - -* Menu: - -* Data types for S-expressions:: Data types related with S-expressions. -* Working with S-expressions:: How to work with S-expressions. - - -File: gcrypt.info, Node: Data types for S-expressions, Next: Working with S-expressions, Up: S-expressions - -9.1 Data types for S-expressions -================================ - - -- Data type: gcry_sexp_t - The `gcry_sexp_t' type describes an object with the Libgcrypt - internal representation of an S-expression. - - -File: gcrypt.info, Node: Working with S-expressions, Prev: Data types for S-expressions, Up: S-expressions - -9.2 Working with S-expressions -============================== - -There are several functions to create an Libgcrypt S-expression object -from its external representation or from a string template. There is -also a function to convert the internal representation back into one of -the external formats: - - -- Function: gcry_error_t gcry_sexp_new (gcry_sexp_t *R_SEXP, - const void *BUFFER, size_t LENGTH, int AUTODETECT) - This is the generic function to create an new S-expression object - from its external representation in BUFFER of LENGTH bytes. On - success the result is stored at the address given by R_SEXP. With - AUTODETECT set to 0, the data in BUFFER is expected to be in - canonized format, with AUTODETECT set to 1 the parses any of the - defined external formats. If BUFFER does not hold a valid - S-expression an error code is returned and R_SEXP set to `NULL'. - Note that the caller is responsible for releasing the newly - allocated S-expression using `gcry_sexp_release'. - - -- Function: gcry_error_t gcry_sexp_create (gcry_sexp_t *R_SEXP, - void *BUFFER, size_t LENGTH, int AUTODETECT, - void (*FREEFNC)(void*)) - This function is identical to `gcry_sexp_new' but has an extra - argument FREEFNC, which, when not set to `NULL', is expected to be - a function to release the BUFFER; most likely the standard `free' - function is used for this argument. This has the effect of - transferring the ownership of BUFFER to the created object in - R_SEXP. The advantage of using this function is that Libgcrypt - might decide to directly use the provided buffer and thus avoid - extra copying. - - -- Function: gcry_error_t gcry_sexp_sscan (gcry_sexp_t *R_SEXP, - size_t *ERROFF, const char *BUFFER, size_t LENGTH) - This is another variant of the above functions. It behaves nearly - identical but provides an ERROFF argument which will receive the - offset into the buffer where the parsing stopped on error. - - -- Function: gcry_error_t gcry_sexp_build (gcry_sexp_t *R_SEXP, - size_t *ERROFF, const char *FORMAT, ...) - This function creates an internal S-expression from the string - template FORMAT and stores it at the address of R_SEXP. If there - is a parsing error, the function returns an appropriate error code - and stores the offset into FORMAT where the parsing stopped in - ERROFF. The function supports a couple of printf-like formatting - characters and expects arguments for some of these escape - sequences right after FORMAT. The following format characters are - defined: - - `%m' - The next argument is expected to be of type `gcry_mpi_t' and - a copy of its value is inserted into the resulting - S-expression. - - `%s' - The next argument is expected to be of type `char *' and that - string is inserted into the resulting S-expression. - - `%d' - The next argument is expected to be of type `int' and its - value is inserted into the resulting S-expression. - - `%b' - The next argument is expected to be of type `int' directly - followed by an argument of type `char *'. This represents a - buffer of given length to be inserted into the resulting - S-expression. - - `%S' - The next argument is expected to be of type `gcry_sexp_t' and - a copy of that S-expression is embedded in the resulting - S-expression. The argument needs to be a regular - S-expression, starting with a parenthesis. - - - No other format characters are defined and would return an error. - Note that the format character `%%' does not exists, because a - percent sign is not a valid character in an S-expression. - - -- Function: void gcry_sexp_release (gcry_sexp_t SEXP) - Release the S-expression object SEXP. If the S-expression is - stored in secure memory it explicitly zeroises that memory; note - that this is done in addition to the zeroisation always done when - freeing secure memory. - -The next 2 functions are used to convert the internal representation -back into a regular external S-expression format and to show the -structure for debugging. - - -- Function: size_t gcry_sexp_sprint (gcry_sexp_t SEXP, int MODE, - char *BUFFER, size_t MAXLENGTH) - Copies the S-expression object SEXP into BUFFER using the format - specified in MODE. MAXLENGTH must be set to the allocated length - of BUFFER. The function returns the actual length of valid bytes - put into BUFFER or 0 if the provided buffer is too short. Passing - `NULL' for BUFFER returns the required length for BUFFER. For - convenience reasons an extra byte with value 0 is appended to the - buffer. - - The following formats are supported: - - `GCRYSEXP_FMT_DEFAULT' - Returns a convenient external S-expression representation. - - `GCRYSEXP_FMT_CANON' - Return the S-expression in canonical format. - - `GCRYSEXP_FMT_BASE64' - Not currently supported. - - `GCRYSEXP_FMT_ADVANCED' - Returns the S-expression in advanced format. - - -- Function: void gcry_sexp_dump (gcry_sexp_t SEXP) - Dumps SEXP in a format suitable for debugging to Libgcrypt's - logging stream. - -Often canonical encoding is used in the external representation. The -following function can be used to check for valid encoding and to learn -the length of the S-expression" - - -- Function: size_t gcry_sexp_canon_len (const unsigned char *BUFFER, - size_t LENGTH, size_t *ERROFF, int *ERRCODE) - Scan the canonical encoded BUFFER with implicit length values and - return the actual length this S-expression uses. For a valid - S-expression it should never return 0. If LENGTH is not 0, the - maximum length to scan is given; this can be used for syntax - checks of data passed from outside. ERRCODE and ERROFF may both be - passed as `NULL'. - - -There are functions to parse S-expressions and retrieve elements: - - -- Function: gcry_sexp_t gcry_sexp_find_token (const gcry_sexp_t LIST, - const char *TOKEN, size_t TOKLEN) - Scan the S-expression for a sublist with a type (the car of the - list) matching the string TOKEN. If TOKLEN is not 0, the token is - assumed to be raw memory of this length. The function returns a - newly allocated S-expression consisting of the found sublist or - `NULL' when not found. - - -- Function: int gcry_sexp_length (const gcry_sexp_t LIST) - Return the length of the LIST. For a valid S-expression this - should be at least 1. - - -- Function: gcry_sexp_t gcry_sexp_nth (const gcry_sexp_t LIST, - int NUMBER) - Create and return a new S-expression from the element with index - NUMBER in LIST. Note that the first element has the index 0. If - there is no such element, `NULL' is returned. - - -- Function: gcry_sexp_t gcry_sexp_car (const gcry_sexp_t LIST) - Create and return a new S-expression from the first element in - LIST; this called the "type" and should always exist and be a - string. `NULL' is returned in case of a problem. - - -- Function: gcry_sexp_t gcry_sexp_cdr (const gcry_sexp_t LIST) - Create and return a new list form all elements except for the - first one. Note that this function may return an invalid - S-expression because it is not guaranteed, that the type exists - and is a string. However, for parsing a complex S-expression it - might be useful for intermediate lists. Returns `NULL' on error. - - -- Function: const char * gcry_sexp_nth_data (const gcry_sexp_t LIST, - int NUMBER, size_t *DATALEN) - This function is used to get data from a LIST. A pointer to the - actual data with index NUMBER is returned and the length of this - data will be stored to DATALEN. If there is no data at the given - index or the index represents another list, `NULL' is returned. - *Caution:* The returned pointer is valid as long as LIST is not - modified or released. - - Here is an example on how to extract and print the surname (Meier) - from the S-expression `(Name Otto Meier (address Burgplatz 3))': - - size_t len; - const char *name; - - name = gcry_sexp_nth_data (list, 2, &len); - printf ("my name is %.*s\n", (int)len, name); - - -- Function: char * gcry_sexp_nth_string (gcry_sexp_t LIST, int NUMBER) - This function is used to get and convert data from a LIST. The - data is assumed to be a Nul terminated string. The caller must - release this returned value using `gcry_free'. If there is no - data at the given index, the index represents a list or the value - can't be converted to a string, `NULL' is returned. - - -- Function: gcry_mpi_t gcry_sexp_nth_mpi (gcry_sexp_t LIST, - int NUMBER, int MPIFMT) - This function is used to get and convert data from a LIST. This - data is assumed to be an MPI stored in the format described by - MPIFMT and returned as a standard Libgcrypt MPI. The caller must - release this returned value using `gcry_mpi_release'. If there is - no data at the given index, the index represents a list or the - value can't be converted to an MPI, `NULL' is returned. - - -File: gcrypt.info, Node: MPI library, Next: Prime numbers, Prev: S-expressions, Up: Top - -10 MPI library -************** - -* Menu: - -* Data types:: MPI related data types. -* Basic functions:: First steps with MPI numbers. -* MPI formats:: External representation of MPIs. -* Calculations:: Performing MPI calculations. -* Comparisons:: How to compare MPI values. -* Bit manipulations:: How to access single bits of MPI values. -* Miscellaneous:: Miscellaneous MPI functions. - - Public key cryptography is based on mathematics with large numbers. -To implement the public key functions, a library for handling these -large numbers is required. Because of the general usefulness of such a -library, its interface is exposed by Libgcrypt. In the context of -Libgcrypt and in most other applications, these large numbers are -called MPIs (multi-precision-integers). - - -File: gcrypt.info, Node: Data types, Next: Basic functions, Up: MPI library - -10.1 Data types -=============== - - -- Data type: gcry_mpi_t - This type represents an object to hold an MPI. - - -File: gcrypt.info, Node: Basic functions, Next: MPI formats, Prev: Data types, Up: MPI library - -10.2 Basic functions -==================== - -To work with MPIs, storage must be allocated and released for the -numbers. This can be done with one of these functions: - - -- Function: gcry_mpi_t gcry_mpi_new (unsigned int NBITS) - Allocate a new MPI object, initialize it to 0 and initially - allocate enough memory for a number of at least NBITS. This - pre-allocation is only a small performance issue and not actually - necessary because Libgcrypt automatically re-allocates the - required memory. - - -- Function: gcry_mpi_t gcry_mpi_snew (unsigned int NBITS) - This is identical to `gcry_mpi_new' but allocates the MPI in the so - called "secure memory" which in turn will take care that all - derived values will also be stored in this "secure memory". Use - this for highly confidential data like private key parameters. - - -- Function: gcry_mpi_t gcry_mpi_copy (const gcry_mpi_t A) - Create a new MPI as the exact copy of A. - - -- Function: void gcry_mpi_release (gcry_mpi_t A) - Release the MPI A and free all associated resources. Passing - `NULL' is allowed and ignored. When a MPI stored in the "secure - memory" is released, that memory gets wiped out immediately. - -The simplest operations are used to assign a new value to an MPI: - - -- Function: gcry_mpi_t gcry_mpi_set (gcry_mpi_t W, const gcry_mpi_t U) - Assign the value of U to W and return W. If `NULL' is passed for - W, a new MPI is allocated, set to the value of U and returned. - - -- Function: gcry_mpi_t gcry_mpi_set_ui (gcry_mpi_t W, unsigned long U) - Assign the value of U to W and return W. If `NULL' is passed for - W, a new MPI is allocated, set to the value of U and returned. - This function takes an `unsigned int' as type for U and thus it is - only possible to set W to small values (usually up to the word - size of the CPU). - - -- Function: void gcry_mpi_swap (gcry_mpi_t A, gcry_mpi_t B) - Swap the values of A and B. - - -File: gcrypt.info, Node: MPI formats, Next: Calculations, Prev: Basic functions, Up: MPI library - -10.3 MPI formats -================ - -The following functions are used to convert between an external -representation of an MPI and the internal one of Libgcrypt. - - -- Function: gcry_error_t gcry_mpi_scan (gcry_mpi_t *R_MPI, - enum gcry_mpi_format FORMAT, const unsigned char *BUFFER, - size_t BUFLEN, size_t *NSCANNED) - Convert the external representation of an integer stored in BUFFER - with a length of BUFLEN into a newly created MPI returned which - will be stored at the address of R_MPI. For certain formats the - length argument is not required and should be passed as `0'. - After a successful operation the variable NSCANNED receives the - number of bytes actually scanned unless NSCANNED was given as - `NULL'. FORMAT describes the format of the MPI as stored in BUFFER: - - `GCRYMPI_FMT_STD' - 2-complement stored without a length header. - - `GCRYMPI_FMT_PGP' - As used by OpenPGP (only defined as unsigned). This is - basically `GCRYMPI_FMT_STD' with a 2 byte big endian length - header. - - `GCRYMPI_FMT_SSH' - As used in the Secure Shell protocol. This is - `GCRYMPI_FMT_STD' with a 4 byte big endian header. - - `GCRYMPI_FMT_HEX' - Stored as a C style string with each byte of the MPI encoded - as 2 hex digits. When using this format, BUFLEN must be zero. - - `GCRYMPI_FMT_USG' - Simple unsigned integer. - - Note that all of the above formats store the integer in big-endian - format (MSB first). - - -- Function: gcry_error_t gcry_mpi_print (enum gcry_mpi_format FORMAT, - unsigned char *BUFFER, size_t BUFLEN, size_t *NWRITTEN, - const gcry_mpi_t A) - Convert the MPI A into an external representation described by - FORMAT (see above) and store it in the provided BUFFER which has a - usable length of at least the BUFLEN bytes. If NWRITTEN is not - NULL, it will receive the number of bytes actually stored in - BUFFER after a successful operation. - - -- Function: gcry_error_t gcry_mpi_aprint - (enum gcry_mpi_format FORMAT, unsigned char **BUFFER, - size_t *NBYTES, const gcry_mpi_t A) - Convert the MPI A into an external representation described by - FORMAT (see above) and store it in a newly allocated buffer which - address will be stored in the variable BUFFER points to. The - number of bytes stored in this buffer will be stored in the - variable NBYTES points to, unless NBYTES is `NULL'. - - -- Function: void gcry_mpi_dump (const gcry_mpi_t A) - Dump the value of A in a format suitable for debugging to - Libgcrypt's logging stream. Note that one leading space but no - trailing space or linefeed will be printed. It is okay to pass - `NULL' for A. - - -File: gcrypt.info, Node: Calculations, Next: Comparisons, Prev: MPI formats, Up: MPI library - -10.4 Calculations -================= - -Basic arithmetic operations: - - -- Function: void gcry_mpi_add (gcry_mpi_t W, gcry_mpi_t U, - gcry_mpi_t V) - W = U + V. - - -- Function: void gcry_mpi_add_ui (gcry_mpi_t W, gcry_mpi_t U, - unsigned long V) - W = U + V. Note that V is an unsigned integer. - - -- Function: void gcry_mpi_addm (gcry_mpi_t W, gcry_mpi_t U, - gcry_mpi_t V, gcry_mpi_t M) - W = U + V \bmod M. - - -- Function: void gcry_mpi_sub (gcry_mpi_t W, gcry_mpi_t U, - gcry_mpi_t V) - W = U - V. - - -- Function: void gcry_mpi_sub_ui (gcry_mpi_t W, gcry_mpi_t U, - unsigned long V) - W = U - V. V is an unsigned integer. - - -- Function: void gcry_mpi_subm (gcry_mpi_t W, gcry_mpi_t U, - gcry_mpi_t V, gcry_mpi_t M) - W = U - V \bmod M. - - -- Function: void gcry_mpi_mul (gcry_mpi_t W, gcry_mpi_t U, - gcry_mpi_t V) - W = U * V. - - -- Function: void gcry_mpi_mul_ui (gcry_mpi_t W, gcry_mpi_t U, - unsigned long V) - W = U * V. V is an unsigned integer. - - -- Function: void gcry_mpi_mulm (gcry_mpi_t W, gcry_mpi_t U, - gcry_mpi_t V, gcry_mpi_t M) - W = U * V \bmod M. - - -- Function: void gcry_mpi_mul_2exp (gcry_mpi_t W, gcry_mpi_t U, - unsigned long E) - W = U * 2^e. - - -- Function: void gcry_mpi_div (gcry_mpi_t Q, gcry_mpi_t R, - gcry_mpi_t DIVIDEND, gcry_mpi_t DIVISOR, int ROUND) - Q = DIVIDEND / DIVISOR, R = DIVIDEND \bmod DIVISOR. Q and R may - be passed as `NULL'. ROUND should be negative or 0. - - -- Function: void gcry_mpi_mod (gcry_mpi_t R, gcry_mpi_t DIVIDEND, - gcry_mpi_t DIVISOR) - R = DIVIDEND \bmod DIVISOR. - - -- Function: void gcry_mpi_powm (gcry_mpi_t W, const gcry_mpi_t B, - const gcry_mpi_t E, const gcry_mpi_t M) - W = B^e \bmod M. - - -- Function: int gcry_mpi_gcd (gcry_mpi_t G, gcry_mpi_t A, - gcry_mpi_t B) - Set G to the greatest common divisor of A and B. Return true if - the G is 1. - - -- Function: int gcry_mpi_invm (gcry_mpi_t X, gcry_mpi_t A, - gcry_mpi_t M) - Set X to the multiplicative inverse of A \bmod M. Return true if - the inverse exists. - - -File: gcrypt.info, Node: Comparisons, Next: Bit manipulations, Prev: Calculations, Up: MPI library - -10.5 Comparisons -================ - -The next 2 functions are used to compare MPIs: - - -- Function: int gcry_mpi_cmp (const gcry_mpi_t U, const gcry_mpi_t V) - Compare the multi-precision-integers number U and V returning 0 - for equality, a positive value for U > V and a negative for U < V. - - -- Function: int gcry_mpi_cmp_ui (const gcry_mpi_t U, unsigned long V) - Compare the multi-precision-integers number U with the unsigned - integer V returning 0 for equality, a positive value for U > V and - a negative for U < V. - - -File: gcrypt.info, Node: Bit manipulations, Next: Miscellaneous, Prev: Comparisons, Up: MPI library - -10.6 Bit manipulations -====================== - -There are a couple of functions to get information on arbitrary bits in -an MPI and to set or clear them: - - -- Function: unsigned int gcry_mpi_get_nbits (gcry_mpi_t A) - Return the number of bits required to represent A. - - -- Function: int gcry_mpi_test_bit (gcry_mpi_t A, unsigned int N) - Return true if bit number N (counting from 0) is set in A. - - -- Function: void gcry_mpi_set_bit (gcry_mpi_t A, unsigned int N) - Set bit number N in A. - - -- Function: void gcry_mpi_clear_bit (gcry_mpi_t A, unsigned int N) - Clear bit number N in A. - - -- Function: void gcry_mpi_set_highbit (gcry_mpi_t A, unsigned int N) - Set bit number N in A and clear all bits greater than N. - - -- Function: void gcry_mpi_clear_highbit (gcry_mpi_t A, unsigned int N) - Clear bit number N in A and all bits greater than N. - - -- Function: void gcry_mpi_rshift (gcry_mpi_t X, gcry_mpi_t A, - unsigned int N) - Shift the value of A by N bits to the right and store the result - in X. - - -- Function: void gcry_mpi_lshift (gcry_mpi_t X, gcry_mpi_t A, - unsigned int N) - Shift the value of A by N bits to the left and store the result in - X. - - -File: gcrypt.info, Node: Miscellaneous, Prev: Bit manipulations, Up: MPI library - -10.7 Miscellaneous -================== - - -- Function: gcry_mpi_t gcry_mpi_set_opaque (gcry_mpi_t A, void *P, - unsigned int NBITS) - Store NBITS of the value P points to in A and mark A as an opaque - value (i.e. an value that can't be used for any math calculation - and is only used to store an arbitrary bit pattern in A). - - WARNING: Never use an opaque MPI for actual math operations. The - only valid functions are gcry_mpi_get_opaque and gcry_mpi_release. - Use gcry_mpi_scan to convert a string of arbitrary bytes into an - MPI. - - - -- Function: void * gcry_mpi_get_opaque (gcry_mpi_t A, - unsigned int *NBITS) - Return a pointer to an opaque value stored in A and return its - size in NBITS. Note that the returned pointer is still owned by A - and that the function should never be used for an non-opaque MPI. - - -- Function: void gcry_mpi_set_flag (gcry_mpi_t A, - enum gcry_mpi_flag FLAG) - Set the FLAG for the MPI A. Currently only the flag - `GCRYMPI_FLAG_SECURE' is allowed to convert A into an MPI stored - in "secure memory". - - -- Function: void gcry_mpi_clear_flag (gcry_mpi_t A, - enum gcry_mpi_flag FLAG) - Clear FLAG for the multi-precision-integers A. Note that this - function is currently useless as no flags are allowed. - - -- Function: int gcry_mpi_get_flag (gcry_mpi_t A, - enum gcry_mpi_flag FLAG) - Return true when the FLAG is set for A. - - -- Function: void gcry_mpi_randomize (gcry_mpi_t W, - unsigned int NBITS, enum gcry_random_level LEVEL) - Set the multi-precision-integers W to a random value of NBITS, - using random data quality of level LEVEL. In case NBITS is not a - multiple of a byte, NBITS is rounded up to the next byte boundary. - When using a LEVEL of `GCRY_WEAK_RANDOM' this function makes use of - `gcry_create_nonce'. - - -File: gcrypt.info, Node: Prime numbers, Next: Utilities, Prev: MPI library, Up: Top - -11 Prime numbers -**************** - -* Menu: - -* Generation:: Generation of new prime numbers. -* Checking:: Checking if a given number is prime. - - -File: gcrypt.info, Node: Generation, Next: Checking, Up: Prime numbers - -11.1 Generation -=============== - - -- Function: gcry_error_t gcry_prime_generate (gcry_mpi_t - *PRIME,unsigned int PRIME_BITS, unsigned int FACTOR_BITS, - gcry_mpi_t **FACTORS, gcry_prime_check_func_t CB_FUNC, void - *CB_ARG, gcry_random_level_t RANDOM_LEVEL, unsigned int FLAGS) - Generate a new prime number of PRIME_BITS bits and store it in - PRIME. If FACTOR_BITS is non-zero, one of the prime factors of - (PRIME - 1) / 2 must be FACTOR_BITS bits long. If FACTORS is - non-zero, allocate a new, `NULL'-terminated array holding the - prime factors and store it in FACTORS. FLAGS might be used to - influence the prime number generation process. - - -- Function: gcry_error_t gcry_prime_group_generator (gcry_mpi_t *R_G, - gcry_mpi_t PRIME, gcry_mpi_t *FACTORS, gcry_mpi_t START_G) - Find a generator for PRIME where the factorization of (PRIME-1) is - in the `NULL' terminated array FACTORS. Return the generator as a - newly allocated MPI in R_G. If START_G is not NULL, use this as - the start for the search. - - -- Function: void gcry_prime_release_factors (gcry_mpi_t *FACTORS) - Convenience function to release the FACTORS array. - - -File: gcrypt.info, Node: Checking, Prev: Generation, Up: Prime numbers - -11.2 Checking -============= - - -- Function: gcry_error_t gcry_prime_check (gcry_mpi_t P, unsigned int - FLAGS) - Check wether the number P is prime. Returns zero in case P is - indeed a prime, returns `GPG_ERR_NO_PRIME' in case P is not a - prime and a different error code in case something went horribly - wrong. - - -File: gcrypt.info, Node: Utilities, Next: Architecture, Prev: Prime numbers, Up: Top - -12 Utilities -************ - -* Menu: - -* Memory allocation:: Functions related with memory allocation. - - -File: gcrypt.info, Node: Memory allocation, Up: Utilities - -12.1 Memory allocation -====================== - - -- Function: void * gcry_malloc (size_t N) - This function tries to allocate N bytes of memory. On success it - returns a pointer to the memory area, in an out-of-core condition, - it returns NULL. - - -- Function: void * gcry_malloc_secure (size_t N) - Like `gcry_malloc', but uses secure memory. - - -- Function: void * gcry_calloc (size_t N, size_t M) - This function allocates a cleared block of memory (i.e. - initialized with zero bytes) long enough to contain a vector of N - elements, each of size M bytes. On success it returns a pointer - to the memory block; in an out-of-core condition, it returns NULL. - - -- Function: void * gcry_calloc_secure (size_t N, size_t M) - Like `gcry_calloc', but uses secure memory. - - -- Function: void * gcry_realloc (void *P, size_t N) - This function tries to resize the memory area pointed to by P to N - bytes. On success it returns a pointer to the new memory area, in - an out-of-core condition, it returns NULL. Depending on whether - the memory pointed to by P is secure memory or not, gcry_realloc - tries to use secure memory as well. - - -- Function: void gcry_free (void *P) - Release the memory area pointed to by P. - - -File: gcrypt.info, Node: Architecture, Next: Self-Tests, Prev: Utilities, Up: Top - -13 Architecture -*************** - -This chapter describes the internal architecture of Libgcrypt. - - Libgcrypt is a function library written in ISO C-90. Any compliant -compiler should be able to build Libgcrypt as long as the target is -either a POSIX platform or compatible to the API used by Windows NT. -Provisions have been take so that the library can be directly used from -C++ applications; however building with a C++ compiler is not supported. - - Building Libgcrypt is done by using the common `./configure && make' -approach. The configure command is included in the source distribution -and as a portable shell script it works on any Unix-alike system. The -result of running the configure script are a C header file -(`config.h'), customized Makefiles, the setup of symbolic links and a -few other things. After that the make tool builds and optionally -installs the library and the documentation. See the files `INSTALL' -and `README' in the source distribution on how to do this. - - Libgcrypt is developed using a Subversion(1) repository. Although -all released versions are tagged in this repository, they should not be -used to build production versions of Libgcrypt. Instead released -tarballs should be used. These tarballs are available from several -places with the master copy at . -Announcements of new releases are posted to the - mailing list(2). - - [image src="libgcrypt-modules.png" alt="Libgcrypt subsystems"] -Figure 13.1: Libgcrypt subsystems - - Libgcrypt consists of several subsystems (*note Figure 13.1: -fig:subsystems.) and all these subsystems provide a public API; this -includes the helper subsystems like the one for S-expressions. The API -style depends on the subsystem; in general an open-use-close approach -is implemented. The open returns a handle to a context used for all -further operations on this handle, several functions may then be used -on this handle and a final close function releases all resources -associated with the handle. - -* Menu: - -* Public-Key Subsystem Architecture:: About public keys. -* Symmetric Encryption Subsystem Architecture:: About standard ciphers. -* Hashing and MACing Subsystem Architecture:: About hashing. -* Multi-Precision-Integer Subsystem Architecture:: About big integers. -* Prime-Number-Generator Subsystem Architecture:: About prime numbers. -* Random-Number Subsystem Architecture:: About random stuff. - - ---------- Footnotes ---------- - - (1) A version control system available for many platforms - - (2) See `http://www.gnupg.org/documentation/mailing-lists.en.html' -for details. - - -File: gcrypt.info, Node: Public-Key Subsystem Architecture, Next: Symmetric Encryption Subsystem Architecture, Up: Architecture - -13.1 Public-Key Architecture -============================ - -Libgcrypt implements two interfaces for public key cryptography: The -standard interface is PK interface using functions in the `gcry_pk_' -name space. The AC interface in an alternative one which is now -deprecated and will not be further described. The AC interface is also -disabled in FIPS mode. - - Because public key cryptography is almost always used to process -small amounts of data (hash values or session keys), the interface is -not implemented using the open-use-close paradigm, but with single -self-contained functions. Due to the wide variety of parameters -required by different algorithms S-expressions, as flexible way to -convey these parameters, are used. There is a set of helper functions -to work with these S-expressions. - - Aside of functions to register new algorithms, map algorithms names -to algorithms identifiers and to lookup properties of a key, the -following main functions are available: - -`gcry_pk_encrypt' - Encrypt data using a public key. - -`gcry_pk_decrypt' - Decrypt data using a private key. - -`gcry_pk_sign' - Sign data using a private key. - -`gcry_pk_verify' - Verify that a signature matches the data. - -`gcry_pk_testkey' - Perform a consistency over a public or private key. - -`gcry_pk_genkey' - Create a new public/private key pair. - - - With the help of the module registration system all these functions -lookup the module implementing the algorithm and pass the actual work -to that module. The parsing of the S-expression input and the -construction of S-expression for the return values is done by the high -level code (`cipher/pubkey.c'). Thus the internal interface between -the algorithm modules and the high level functions passes data in a -custom format. The interface to the modules is published -(`gcrypt-modules.h') so that it can used to register external -implementations of algorithms with Libgcrypt. However, for some -algorithms this module interface is to limited and thus for the -internal modules an extra interface is sometimes used to convey more -information. - - By default Libgcrypt uses a blinding technique for RSA decryption to -mitigate real world timing attacks over a network: Instead of using the -RSA decryption directly, a blinded value y = x r^e \bmod n is decrypted -and the unblinded value x' = y' r^-1 \bmod n returned. The blinding -value r is a random value with the size of the modulus n and generated -with `GCRY_WEAK_RANDOM' random level. - - The algorithm used for RSA and DSA key generation depends on whether -Libgcrypt is operated in standard or in FIPS mode. In standard mode an -algorithm based on the Lim-Lee prime number generator is used. In FIPS -mode RSA keys are generated as specified in ANSI X9.31 (1998) and DSA -keys as specified in FIPS 186-2. - - -File: gcrypt.info, Node: Symmetric Encryption Subsystem Architecture, Next: Hashing and MACing Subsystem Architecture, Prev: Public-Key Subsystem Architecture, Up: Architecture - -13.2 Symmetric Encryption Subsystem Architecture -================================================ - -The interface to work with symmetric encryption algorithms is made up -of functions from the `gcry_cipher_' name space. The implementation -follows the open-use-close paradigm and uses registered algorithm -modules for the actual work. Unless a module implements optimized -cipher mode implementations, the high level code (`cipher/cipher.c') -implements the modes and calls the core algorithm functions to process -each block. - - The most important functions are: - -`gcry_cipher_open' - Create a new instance to encrypt or decrypt using a specified - algorithm and mode. - -`gcry_cipher_close' - Release an instance. - -`gcry_cipher_setkey' - Set a key to be used for encryption or decryption. - -`gcry_cipher_setiv' - Set an initialization vector to be used for encryption or - decryption. - -`gcry_cipher_encrypt' -`gcry_cipher_decrypt' - Encrypt or decrypt data. These functions may be called with - arbitrary amounts of data and as often as needed to encrypt or - decrypt all data. - - - There are also functions to query properties of algorithms or -context, like block length, key length, map names or to enable features -like padding methods. - - -File: gcrypt.info, Node: Hashing and MACing Subsystem Architecture, Next: Multi-Precision-Integer Subsystem Architecture, Prev: Symmetric Encryption Subsystem Architecture, Up: Architecture - -13.3 Hashing and MACing Subsystem Architecture -============================================== - -The interface to work with message digests and CRC algorithms is made -up of functions from the `gcry_md_' name space. The implementation -follows the open-use-close paradigm and uses registered algorithm -modules for the actual work. Although CRC algorithms are not -considered cryptographic hash algorithms, they share enough properties -so that it makes sense to handle them in the same way. It is possible -to use several algorithms at once with one context and thus compute -them all on the same data. - - The most important functions are: - -`gcry_md_open' - Create a new message digest instance and optionally enable one - algorithm. A flag may be used to turn the message digest algorithm - into a HMAC algorithm. - -`gcry_md_enable' - Enable an additional algorithm for the instance. - -`gcry_md_setkey' - Set the key for the MAC. - -`gcry_md_write' - Pass more data for computing the message digest to an instance. - -`gcry_md_putc' - Buffered version of `gcry_md_write' implemented as a macro. - -`gcry_md_read' - Finalize the computation of the message digest or HMAC and return - the result. - -`gcry_md_close' - Release an instance - -`gcry_md_hash_buffer' - Convenience function to directly compute a message digest over a - memory buffer without the need to create an instance first. - - - There are also functions to query properties of algorithms or the -instance, like enabled algorithms, digest length, map algorithm names. -it is also possible to reset an instance or to copy the current state -of an instance at any time. Debug functions to write the hashed data -to files are available as well. - - -File: gcrypt.info, Node: Multi-Precision-Integer Subsystem Architecture, Next: Prime-Number-Generator Subsystem Architecture, Prev: Hashing and MACing Subsystem Architecture, Up: Architecture - -13.4 Multi-Precision-Integer Subsystem Architecture -=================================================== - -The implementation of Libgcrypt's big integer computation code is based -on an old release of GNU Multi-Precision Library (GMP). The decision -not to use the GMP library directly was due to stalled development at -that time and due to security requirements which could not be provided -by the code in GMP. As GMP does, Libgcrypt provides high performance -assembler implementations of low level code for several CPUS to gain -much better performance than with a generic C implementation. - -Major features of Libgcrypt's multi-precision-integer code compared to -GMP are: - - * Avoidance of stack based allocations to allow protection against - swapping out of sensitive data and for easy zeroing of sensitive - intermediate results. - - * Optional use of secure memory and tracking of its use so that - results are also put into secure memory. - - * MPIs are identified by a handle (implemented as a pointer) to give - better control over allocations and to augment them with extra - properties like opaque data. - - * Removal of unnecessary code to reduce complexity. - - * Functions specialized for public key cryptography. - - - -File: gcrypt.info, Node: Prime-Number-Generator Subsystem Architecture, Next: Random-Number Subsystem Architecture, Prev: Multi-Precision-Integer Subsystem Architecture, Up: Architecture - -13.5 Prime-Number-Generator Subsystem Architecture -================================================== - -Libgcrypt provides an interface to its prime number generator. These -functions make use of the internal prime number generator which is -required for the generation for public key key pairs. The plain prime -checking function is exported as well. - - The generation of random prime numbers is based on the Lim and Lee -algorithm to create practically save primes.(1) This algorithm creates -a pool of smaller primes, select a few of them to create candidate -primes of the form 2 * p_0 * p_1 * ... * p_n + 1, tests the candidate -for primality and permutates the pool until a prime has been found. It -is possible to clamp one of the small primes to a certain size to help -DSA style algorithms. Because most of the small primes in the pool are -not used for the resulting prime number, they are saved for later use -(see `save_pool_prime' and `get_pool_prime' in `cipher/primegen.c'). -The prime generator optionally supports the finding of an appropriate -generator. - -The primality test works in three steps: - - 1. The standard sieve algorithm using the primes up to 4999 is used - as a quick first check. - - 2. A Fermat test filters out almost all non-primes. - - 3. A 5 round Rabin-Miller test is finally used. The first round uses - a witness of 2, whereas the next rounds use a random witness. - - - To support the generation of RSA and DSA keys in FIPS mode according -to X9.31 and FIPS 186-2, Libgcrypt implements two additional prime -generation functions: `_gcry_derive_x931_prime' and -`_gcry_generate_fips186_2_prime'. These functions are internal and not -available through the public API. - - ---------- Footnotes ---------- - - (1) Chae Hoon Lim and Pil Joong Lee. A key recovery attack on -discrete log-based shemes using a prime order subgroup. In Burton S. -Kaliski Jr., editor, Advances in Cryptology: Crypto '97, pages -249­-263, Berlin / Heidelberg / New York, 1997. Springer-Verlag. -Described on page 260. - - -File: gcrypt.info, Node: Random-Number Subsystem Architecture, Prev: Prime-Number-Generator Subsystem Architecture, Up: Architecture - -13.6 Random-Number Subsystem Architecture -========================================= - -Libgcrypt provides 3 levels or random quality: The level -`GCRY_VERY_STRONG_RANDOM' usually used for key generation, the level -`GCRY_STRONG_RANDOM' for all other strong random requirements and the -function `gcry_create_nonce' which is used for weaker usages like -nonces. There is also a level `GCRY_WEAK_RANDOM' which in general maps -to `GCRY_STRONG_RANDOM' except when used with the function -`gcry_mpi_randomize', where it randomizes an multi-precision-integer -using the `gcry_create_nonce' function. - -There are two distinct random generators available: - - * The Continuously Seeded Pseudo Random Number Generator (CSPRNG), - which is based on the classic GnuPG derived big pool - implementation. Implemented in `random/random-csprng.c' and used - by default. - - * A FIPS approved ANSI X9.31 PRNG using AES with a 128 bit key. - Implemented in `random/random-fips.c' and used if Libgcrypt is in - FIPS mode. - -Both generators make use of so-called entropy gathering modules: - -rndlinux - Uses the operating system provided `/dev/random' and - `/dev/urandom' devices. - -rndunix - Runs several operating system commands to collect entropy from - sources like virtual machine and process statistics. It is a kind - of poor-man's `/dev/random' implementation. It is not available in - FIPS mode. - -rndegd - Uses the operating system provided Entropy Gathering Daemon (EGD). - The EGD basically uses the same algorithms as rndunix does. - However as a system daemon it keeps on running and thus can serve - several processes requiring entropy input and does not waste - collected entropy if the application does not need all the - collected entropy. It is not available in FIPS mode. - -rndw32 - Targeted for the Microsoft Windows OS. It uses certain properties - of that system and is the only gathering module available for that - OS. - -rndhw - Extra module to collect additional entropy by utilizing a hardware - random number generator. As of now the only supported hardware - RNG is the Padlock engine of VIA (Centaur) CPUs. It is not - available in FIPS mode. - - -* Menu: - -* CSPRNG Description:: Description of the CSPRNG. -* FIPS PRNG Description:: Description of the FIPS X9.31 PRNG. - - -File: gcrypt.info, Node: CSPRNG Description, Next: FIPS PRNG Description, Up: Random-Number Subsystem Architecture - -13.6.1 Description of the CSPRNG --------------------------------- - -This random number generator is loosely modelled after the one -described in Peter Gutmann's paper: "Software Generation of Practically -Strong Random Numbers".(1) - - A pool of 600 bytes is used and mixed using the core RIPE-MD160 hash -transform function. Several extra features are used to make the robust -against a wide variety of attacks and to protect against failures of -subsystems. The state of the generator may be saved to a file and -initially seed form a file. - - Depending on how Libgcrypt was build the generator is able to select -the best working entropy gathering module. It makes use of the slow -and fast collection methods and requires the pool to initially seeded -form the slow gatherer or a seed file. An entropy estimation is used -to mix in enough data from the gather modules before returning the -actual random output. Process fork detection and protection is -implemented. - - The implementation of the nonce generator (for `gcry_create_nonce') -is a straightforward repeated hash design: A 28 byte buffer is -initially seeded with the PID and the time in seconds in the first 20 -bytes and with 8 bytes of random taken from the `GCRY_STRONG_RANDOM' -generator. Random numbers are then created by hashing all the 28 bytes -with SHA-1 and saving that again in the first 20 bytes. The hash is -also returned as result. - - ---------- Footnotes ---------- - - (1) Also described in chapter 6 of his book "Cryptographic Security -Architecture", New York, 2004, ISBN 0-387-95387-6. - - -File: gcrypt.info, Node: FIPS PRNG Description, Prev: CSPRNG Description, Up: Random-Number Subsystem Architecture - -13.6.2 Description of the FIPS X9.31 PRNG ------------------------------------------ - -The core of this deterministic random number generator is implemented -according to the document "NIST-Recommended Random Number Generator -Based on ANSI X9.31 Appendix A.2.4 Using the 3-Key Triple DES and AES -Algorithms", dated 2005-01-31. This implementation uses the AES -variant. - - The generator is based on contexts to utilize the same core functions -for all random levels as required by the high-level interface. All -random generators return their data in 128 bit blocks. If the caller -requests less bits, the extra bits are not used. The key for each -generator is only set once at the first time a generator context is -used. The seed value is set along with the key and again after 1000 -output blocks. - - On Unix like systems the `GCRY_VERY_STRONG_RANDOM' and -`GCRY_STRONG_RANDOM' generators are keyed and seeded using the rndlinux -module with the `/dev/radnom' device. Thus these generators may block -until the OS kernel has collected enough entropy. When used with -Microsoft Windows the rndw32 module is used instead. - - The generator used for `gcry_create_nonce' is keyed and seeded from -the `GCRY_STRONG_RANDOM' generator. Thus is may also block if the -`GCRY_STRONG_RANDOM' generator has not yet been used before and thus -gets initialized on the first use by `gcry_create_nonce'. This special -treatment is justified by the weaker requirements for a nonce generator -and to save precious kernel entropy for use by the "real" random -generators. - - A self-test facility uses a separate context to check the -functionality of the core X9.31 functions using a known answers test. -During runtime each output block is compared to the previous one to -detect a stucked generator. - - The DT value for the generator is made up of the current time down to -microseconds (if available) and a free running 64 bit counter. When -used with the test context the DT value is taken from the context and -incremented on each use. - - -File: gcrypt.info, Node: Self-Tests, Next: FIPS Mode, Prev: Architecture, Up: Top - -Appendix A Description of the Self-Tests -**************************************** - -In addition to the build time regression test suite, Libgcrypt -implements self-tests to be performed at runtime. Which self-tests are -actually used depends on the mode Libgcrypt is used in. In standard -mode a limited set of self-tests is run at the time an algorithm is -first used. Note that not all algorithms feature a self-test in -standard mode. The `GCRYCTL_SELFTEST' control command may be used to -run all implemented self-tests at any time; this will even run more -tests than those run in FIPS mode. - - If any of the self-tests fails, the library immediately returns an -error code to the caller. If Libgcrypt is in FIPS mode the self-tests -will be performed within the "Self-Test" state and any failure puts the -library into the "Error" state. - -A.1 Power-Up Tests -================== - -Power-up tests are only performed if Libgcrypt is in FIPS mode. - -A.1.1 Symmetric Cipher Algorithm Power-Up Tests ------------------------------------------------ - -The following symmetric encryption algorithm tests are run during -power-up: - -3DES - To test the 3DES 3-key EDE encryption in ECB mode these tests are - run: - 1. A known answer test is run on a 64 bit test vector processed - by 64 rounds of Single-DES block encryption and decryption - using a key changed with each round. - - 2. A known answer test is run on a 64 bit test vector processed - by 16 rounds of 2-key and 3-key Triple-DES block encryption - and decryptions using a key changed with each round. - - 3. 10 known answer tests using 3-key Triple-DES EDE encryption, - comparing the ciphertext to the known value, then running a - decryption and comparing it to the initial plaintext. - (`cipher/des.c:selftest') - -AES-128 - A known answer tests is run using one test vector and one test key - with AES in ECB mode. (`cipher/rijndael.c:selftest_basic_128') - -AES-192 - A known answer tests is run using one test vector and one test key - with AES in ECB mode. (`cipher/rijndael.c:selftest_basic_192') - -AES-256 - A known answer tests is run using one test vector and one test key - with AES in ECB mode. (`cipher/rijndael.c:selftest_basic_256') - -A.1.2 Hash Algorithm Power-Up Tests ------------------------------------ - -The following hash algorithm tests are run during power-up: - -SHA-1 - A known answer test using the string `"abc"' is run. - (`cipher/sha1.c:selftests_sha1') - -SHA-224 - A known answer test using the string `"abc"' is run. - (`cipher/sha256.c:selftests_sha224') - -SHA-256 - A known answer test using the string `"abc"' is run. - (`cipher/sha256.c:selftests_sha256') - -SHA-384 - A known answer test using the string `"abc"' is run. - (`cipher/sha512.c:selftests_sha384') - -SHA-512 - A known answer test using the string `"abc"' is run. - (`cipher/sha512.c:selftests_sha512') - -A.1.3 MAC Algorithm Power-Up Tests ----------------------------------- - -The following MAC algorithm tests are run during power-up: - -HMAC SHA-1 - A known answer test using 9 byte of data and a 64 byte key is run. - (`cipher/hmac-tests.c:selftests_sha1') - -HMAC SHA-224 - A known answer test using 28 byte of data and a 4 byte key is run. - (`cipher/hmac-tests.c:selftests_sha224') - -HMAC SHA-256 - A known answer test using 28 byte of data and a 4 byte key is run. - (`cipher/hmac-tests.c:selftests_sha256') - -HMAC SHA-384 - A known answer test using 28 byte of data and a 4 byte key is run. - (`cipher/hmac-tests.c:selftests_sha384') - -HMAC SHA-512 - A known answer test using 28 byte of data and a 4 byte key is run. - (`cipher/hmac-tests.c:selftests_sha512') - -A.1.4 Random Number Power-Up Test ---------------------------------- - -The DRNG is tested during power-up this way: - - 1. Requesting one block of random using the public interface to check - general working and the duplicated block detection. - - 2. 3 know answer tests using pre-defined keys, seed and initial DT - values. For each test 3 blocks of 16 bytes are requested and - compared to the expected result. The DT value is incremented for - each block. - -A.1.5 Public Key Algorithm Power-Up Tests ------------------------------------------ - -The public key algorithms are tested during power-up: - -RSA - A pre-defined 1024 bit RSA key is used and these tests are run in - turn: - 1. Conversion of S-expression to internal format. - (`cipher/rsa.c:selftests_rsa') - - 2. Private key consistency check. (`cipher/rsa.c:selftests_rsa') - - 3. A pre-defined 20 byte value is signed with PKCS#1 padding for - SHA-1. The result is verified using the public key against - the original data and against modified data. - (`cipher/rsa.c:selftest_sign_1024') - - 4. A 1000 bit random value is encrypted and checked that it does - not match the orginal random value. The encrtypted result is - then decrypted and checked that it macthes the original - random value. (`cipher/rsa.c:selftest_encr_1024') - -DSA - A pre-defined 1024 bit DSA key is used and these tests are run in - turn: - 1. Conversion of S-expression to internal format. - (`cipher/dsa.c:selftests_dsa') - - 2. Private key consistency check. (`cipher/dsa.c:selftests_dsa') - - 3. A pre-defined 20 byte value is signed with PKCS#1 padding for - SHA-1. The result is verified using the public key against - the original data and against modified data. - (`cipher/dsa.c:selftest_sign_1024') - -A.1.6 Integrity Power-Up Tests ------------------------------- - -The integrity of the Libgcrypt is tested during power-up but only if -checking has been enabled at build time. The check works by computing -a HMAC SHA-256 checksum over the file used to load Libgcrypt into -memory. That checksum is compared against a checksum stored in a file -of the same name but with a single dot as a prefix and a suffix of -`.hmac'. - -A.1.7 Critical Functions Power-Up Tests ---------------------------------------- - -The 3DES weak key detection is tested during power-up by calling the -detection function with keys taken from a table listening all weak -keys. The table itself is protected using a SHA-1 hash. -(`cipher/des.c:selftest') - -A.2 Conditional Tests -===================== - -The conditional tests are performed if a certain contidion is met. -This may occur at any time; the library does not necessary enter the -"Self-Test" state to run these tests but will transit to the "Error" -state if a test failed. - -A.2.1 Key-Pair Generation Tests -------------------------------- - -After an asymmetric key-pair has been generated, Libgcrypt runs a -pair-wise consistency tests on the generated key. On failure the -generated key is not used, an error code is returned and, if in FIPS -mode, the library is put into the "Error" state. - -RSA - The test uses a random number 64 bits less the size of the modulus - as plaintext and runs an encryption and decryption operation in - turn. The encrypted value is checked to not match the plaintext - and the result of the decryption is checked to match the plaintext. - - A new random number of the same size is generated, signed and - verified to test the correctness of the signing operation. As a - second signing test, the signature is modified by incrementing its - value and then verified with the expected result that the - verification fails. (`cipher/rsa.c:test_keys') - -DSA - The test uses a random number of the size of the Q parameter to - create a signature and then checks that the signature verifies. - As a second signing test, the data is modified by incrementing its - value and then verified against the signature with the expected - result that the verification fails. (`cipher/dsa.c:test_keys') - -A.2.2 Software Load Tests -------------------------- - -Loading of extra modules into libgcrypt is disabled in FIPS mode and -thus no tests are implemented. (`cipher/cipher.c:_gcry_cipher_register', -`cipher/md.c:_gcry_md_register', `cipher/pubkey.c:_gcry_pk_register') - -A.2.3 Manual Key Entry Tests ----------------------------- - -A manual key entry feature is not implemented in Libgcrypt. - -A.2.4 Continuous RNG Tests --------------------------- - -The continuous random number test is only used in FIPS mode. The RNG -generates blocks of 128 bit size; the first block generated per context -is saved in the context and another block is generated to be returned -to the caller. Each block is compared against the saved block and then -stored in the context. If a duplicated block is detected an error is -signaled and the libray is put into the "Fatal-Error" state. -(`random/random-fips.c:x931_aes_driver') - -A.3 Application Requested Tests -=============================== - -The application may requests tests at any time by means of the -`GCRYCTL_SELFTEST' control command. Note that using these tests is not -FIPS conform: Although Libgcrypt rejects all application requests for -services while running self-tests, it does not ensure that no other -operations of Libgcrypt are still being executed. Thus, in FIPS mode -an application requesting self-tests needs to power-cycle Libgcrypt -instead. - - When self-tests are requested, Libgcrypt runs all the tests it does -during power-up as well as a few extra checks as described below. - -A.3.1 Symmetric Cipher Algorithm Tests --------------------------------------- - -The following symmetric encryption algorithm tests are run in addition -to the power-up tests: - -AES-128 - A known answer tests with test vectors taken from NIST SP800-38a - and using the high level functions is run for block modes CFB and - OFB. - - -A.3.2 Hash Algorithm Tests --------------------------- - -The following hash algorithm tests are run in addition to the power-up -tests: - -SHA-1 -SHA-224 -SHA-256 - 1. A known answer test using a 56 byte string is run. - - 2. A known answer test using a string of one million letters "a" - is run. - (`cipher/sha1.c:selftests_sha1', - `cipher/sha256.c:selftests_sha224', - `cipher/sha256.c:selftests_sha256') - -SHA-384 - -SHA-512 - 1. A known answer test using a 112 byte string is run. - - 2. A known answer test using a string of one million letters "a" - is run. - (`cipher/sha512.c:selftests_sha384', - `cipher/sha512.c:selftests_sha512') - -A.3.3 MAC Algorithm Tests -------------------------- - -The following MAC algorithm tests are run in addition to the power-up -tests: - -HMAC SHA-1 - 1. A known answer test using 9 byte of data and a 20 byte key is - run. - - 2. A known answer test using 9 byte of data and a 100 byte key - is run. - - 3. A known answer test using 9 byte of data and a 49 byte key is - run. - (`cipher/hmac-tests.c:selftests_sha1') - -HMAC SHA-224 -HMAC SHA-256 -HMAC SHA-384 -HMAC SHA-512 - 1. A known answer test using 9 byte of data and a 20 byte key is - run. - - 2. A known answer test using 50 byte of data and a 20 byte key - is run. - - 3. A known answer test using 50 byte of data and a 26 byte key - is run. - - 4. A known answer test using 54 byte of data and a 131 byte key - is run. - - 5. A known answer test using 152 byte of data and a 131 byte key - is run. - (`cipher/hmac-tests.c:selftests_sha224', - `cipher/hmac-tests.c:selftests_sha256', - `cipher/hmac-tests.c:selftests_sha384', - `cipher/hmac-tests.c:selftests_sha512') - - -File: gcrypt.info, Node: FIPS Mode, Next: Library Copying, Prev: Self-Tests, Up: Top - -Appendix B Description of the FIPS Mode -*************************************** - -This appendix gives detailed information pertaining to the FIPS mode. -In particular, the changes to the standard mode and the finite state -machine are described. The self-tests required in this mode are -described in the appendix on self-tests. - -B.1 Restrictions in FIPS Mode -============================= - -If Libgcrypt is used in FIPS mode these restrictions are effective: - - * The cryptographic algorithms are restricted to this list: - - GCRY_CIPHER_3DES - 3 key EDE Triple-DES symmetric encryption. - - GCRY_CIPHER_AES128 - AES 128 bit symmetric encryption. - - GCRY_CIPHER_AES192 - AES 192 bit symmetric encryption. - - GCRY_CIPHER_AES256 - AES 256 bit symmetric encryption. - - GCRY_MD_SHA1 - SHA-1 message digest. - - GCRY_MD_SHA224 - SHA-224 message digest. - - GCRY_MD_SHA256 - SHA-256 message digest. - - GCRY_MD_SHA384 - SHA-384 message digest. - - GCRY_MD_SHA512 - SHA-512 message digest. - - GCRY_MD_SHA1,GCRY_MD_FLAG_HMAC - HMAC using a SHA-1 message digest. - - GCRY_MD_SHA224,GCRY_MD_FLAG_HMAC - HMAC using a SHA-224 message digest. - - GCRY_MD_SHA256,GCRY_MD_FLAG_HMAC - HMAC using a SHA-256 message digest. - - GCRY_MD_SHA384,GCRY_MD_FLAG_HMAC - HMAC using a SHA-384 message digest. - - GCRY_MD_SHA512,GCRY_MD_FLAG_HMAC - HMAC using a SHA-512 message digest. - - GCRY_PK_RSA - RSA encryption and signing. - - GCRY_PK_DSA - DSA signing. - - Note that the CRC algorithms are not considered cryptographic - algorithms and thus are in addition available. - - * RSA key generation refuses to create a key with a keysize of less - than 1024 bits. - - * DSA key generation refuses to create a key with a keysize other - than 1024 bits. - - * The `transient-key' flag for RSA and DSA key generation is ignored. - - * Support for the VIA Padlock engine is disabled. - - * FIPS mode may only be used on systems with a /dev/random device. - Switching into FIPS mode on other systems will fail at runtime. - - * Saving and loading a random seed file is ignored. - - * An X9.31 style random number generator is used in place of the - large-pool-CSPRNG generator. - - * The command `GCRYCTL_ENABLE_QUICK_RANDOM' is ignored. - - * The Alternative Public Key Interface (`gcry_ac_xxx') is not - supported and all API calls return an error. - - * Registration of external modules is not supported. - - * Message digest debugging is disabled. - - * All debug output related to cryptographic data is suppressed. - - * On-the-fly self-tests are not performed, instead self-tests are run - before entering operational state. - - * The function `gcry_set_allocation_handler' may not be used. If it - is used Libgcrypt disables FIPS mode unless Enforced FIPS mode is - enabled, in which case Libgcrypt will enter the error state. - - * The digest algorithm MD5 may not be used. If it is used Libgcrypt - disables FIPS mode unless Enforced FIPS mode is enabled, in which - case Libgcrypt will enter the error state. - - * In Enforced FIPS mode the command `GCRYCTL_DISABLE_SECMEM' is - ignored. In standard FIPS mode it disables FIPS mode. - - * A handler set by `gcry_set_outofcore_handler' is ignored. - - * A handler set by `gcry_set_fatalerror_handler' is ignored. - - - Note that when we speak about disabling FIPS mode, it merely means -that the function `gcry_fips_mode_active' returns false; it does not -mean that any non FIPS algorithms are allowed. - -B.2 FIPS Finite State Machine -============================= - -The FIPS mode of libgcrypt implements a finite state machine (FSM) using -8 states (*note tbl:fips-states::) and checks at runtime that only valid -transitions (*note tbl:fips-state-transitions::) may happen. - - [image src="fips-fsm.png" alt="FIPS FSM Diagram"] -Figure B.1: FIPS mode state diagram - -States used by the FIPS FSM: -Power-Off - Libgcrypt is not runtime linked to another application. This - usually means that the library is not loaded into main memory. - This state is documentation only. - -Power-On - Libgcrypt is loaded into memory and API calls may be made. - Compiler introducted constructor functions may be run. Note that - Libgcrypt does not implement any arbitrary constructor functions - to be called by the operating system - -Init - The Libgcrypt initialization functions are performed and the - library has not yet run any self-test. - -Self-Test - Libgcrypt is performing self-tests. - -Operational - Libgcrypt is in the operational state and all interfaces may be - used. - -Error - Libgrypt is in the error state. When calling any FIPS relevant - interfaces they either return an error (`GPG_ERR_NOT_OPERATIONAL') - or put Libgcrypt into the Fatal-Error state and won't return. - -Fatal-Error - Libgcrypt is in a non-recoverable error state and will - automatically transit into the Shutdown state. - -Shutdown - Libgcrypt is about to be terminated and removed from the memory. - The application may at this point still runing cleanup handlers. - - -Table B.1: FIPS mode states - -The valid state transitions (*note Figure B.1: fig:fips-fsm.) are: -`1' - Power-Off to Power-On is implicitly done by the OS loading - Libgcrypt as a shared library and having it linked to an - application. - -`2' - Power-On to Init is triggered by the application calling the - Libgcrypt intialization function `gcry_check_version'. - -`3' - Init to Self-Test is either triggred by a dedicated API call or - implicit by invoking a libgrypt service conrolled by the FSM. - -`4' - Self-Test to Operational is triggered after all self-tests passed - successfully. - -`5' - Operational to Shutdown is an artifical state without any direct - action in Libgcrypt. When reaching the Shutdown state the library - is deinitialized and can't return to any other state again. - -`6' - Shutdown to Power-off is the process of removing Libgcrypt from the - computer's memory. For obvious reasons the Power-Off state can't - be represented within Libgcrypt and thus this transition is for - documentation only. - -`7' - Operational to Error is triggered if Libgcrypt detected an - application error which can't be returned to the caller but still - allows Libgcrypt to properly run. In the Error state all FIPS - relevant interfaces return an error code. - -`8' - Error to Shutdown is similar to the Operational to Shutdown - transition (5). - -`9' - Error to Fatal-Error is triggred if Libgrypt detects an fatal error - while already being in Error state. - -`10' - Fatal-Error to Shutdown is automatically entered by Libgcrypt - after having reported the error. - -`11' - Power-On to Shutdown is an artifical state to document that - Libgcrypt has not ye been initializaed but the process is about to - terminate. - -`12' - Power-On to Fatal-Error will be triggerd if certain Libgcrypt - functions are used without having reached the Init state. - -`13' - Self-Test to Fatal-Error is triggred by severe errors in Libgcrypt - while running self-tests. - -`14' - Self-Test to Error is triggred by a failed self-test. - -`15' - Operational to Fatal-Error is triggered if Libcrypt encountered a - non-recoverable error. - -`16' - Operational to Self-Test is triggred if the application requested - to run the self-tests again. - -`17' - Error to Self-Test is triggered if the application has requested - to run self-tests to get to get back into operational state after - an error. - -`18' - Init to Error is triggered by errors in the initialization code. - -`19' - Init to Fatal-Error is triggered by non-recoverable errors in the - initialization code. - -`20' - Error to Error is triggered by errors while already in the Error - state. - - -Table B.2: FIPS mode state transitions - -B.3 FIPS Miscellaneous Information -================================== - -Libgcrypt does not do any key management on itself; the application -needs to care about it. Keys which are passed to Libgcrypt should be -allocated in secure memory as available with the functions -`gcry_malloc_secure' and `gcry_calloc_secure'. By calling `gcry_free' -on this memory, the memory and thus the keys are overwritten with zero -bytes before releasing the memory. - - For use with the random number generator, Libgcrypt generates 3 -internal keys which are stored in the encryption contexts used by the -RNG. These keys are stored in secure memory for the lifetime of the -process. Application are required to use `GCRYCTL_TERM_SECMEM' before -process termination. This will zero out the entire secure memory and -thus also the encryption contexts with these keys. - - -File: gcrypt.info, Node: Library Copying, Next: Copying, Prev: FIPS Mode, Up: Top - -GNU Lesser General Public License -********************************* - - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - [This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence the - version number 2.1.] - -Preamble -======== - -The licenses for most software are designed to take away your freedom -to share and change it. By contrast, the GNU General Public Licenses -are intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software--typically libraries--of the Free -Software Foundation and other authors who decide to use it. You can use -it too, but we suggest you first think carefully about whether this -license or the ordinary General Public License is the better strategy to -use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of it -in new free programs; and that you are informed that you can do these -things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know that -what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and is -quite different from the ordinary General Public License. We use this -license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does _Less_ to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of free -software. For example, permission to use the GNU C Library in non-free -programs enables many more people to use the whole GNU operating -system, as well as its variant, the GNU/Linux operating system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run that -program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License Agreement applies to any software library or other - program which contains a notice placed by the copyright holder or - other authorized party saying it may be distributed under the - terms of this Lesser General Public License (also called "this - License"). Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data - prepared so as to be conveniently linked with application programs - (which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work - which has been distributed under these terms. A "work based on the - Library" means either the Library or any derivative work under - copyright law: that is to say, a work containing the Library or a - portion of it, either verbatim or with modifications and/or - translated straightforwardly into another language. (Hereinafter, - translation is included without limitation in the term - "modification".) - - "Source code" for a work means the preferred form of the work for - making modifications to it. For a library, complete source code - means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to - control compilation and installation of the library. - - Activities other than copying, distribution and modification are - not covered by this License; they are outside its scope. The act - of running a program using the Library is not restricted, and - output from such a program is covered only if its contents - constitute a work based on the Library (independent of the use of - the Library in a tool for writing it). Whether that is true - depends on what the Library does and what the program that uses - the Library does. - - 1. You may copy and distribute verbatim copies of the Library's - complete source code as you receive it, in any medium, provided - that you conspicuously and appropriately publish on each copy an - appropriate copyright notice and disclaimer of warranty; keep - intact all the notices that refer to this License and to the - absence of any warranty; and distribute a copy of this License - along with the Library. - - You may charge a fee for the physical act of transferring a copy, - and you may at your option offer warranty protection in exchange - for a fee. - - 2. You may modify your copy or copies of the Library or any portion - of it, thus forming a work based on the Library, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a. The modified work must itself be a software library. - - b. You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c. You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d. If a facility in the modified Library refers to a function or - a table of data to be supplied by an application program that - uses the facility, other than as an argument passed when the - facility is invoked, then you must make a good faith effort - to ensure that, in the event an application does not supply - such function or table, the facility still operates, and - performs whatever part of its purpose remains meaningful. - - (For example, a function in a library to compute square roots - has a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function - must be optional: if the application does not supply it, the - square root function must still compute square roots.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the - Library, and can be reasonably considered independent and separate - works in themselves, then this License, and its terms, do not - apply to those sections when you distribute them as separate - works. But when you distribute the same sections as part of a - whole which is a work based on the Library, the distribution of - the whole must be on the terms of this License, whose permissions - for other licensees extend to the entire whole, and thus to each - and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or - contest your rights to work written entirely by you; rather, the - intent is to exercise the right to control the distribution of - derivative or collective works based on the Library. - - In addition, mere aggregation of another work not based on the - Library with the Library (or with a work based on the Library) on - a volume of a storage or distribution medium does not bring the - other work under the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public - License instead of this License to a given copy of the Library. - To do this, you must alter all the notices that refer to this - License, so that they refer to the ordinary GNU General Public - License, version 2, instead of to this License. (If a newer - version than version 2 of the ordinary GNU General Public License - has appeared, then you can specify that version instead if you - wish.) Do not make any other change in these notices. - - Once this change is made in a given copy, it is irreversible for - that copy, so the ordinary GNU General Public License applies to - all subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of - the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or - derivative of it, under Section 2) in object code or executable - form under the terms of Sections 1 and 2 above provided that you - accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software - interchange. - - If distribution of object code is made by offering access to copy - from a designated place, then offering equivalent access to copy - the source code from the same place satisfies the requirement to - distribute the source code, even though third parties are not - compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the - Library, but is designed to work with the Library by being - compiled or linked with it, is called a "work that uses the - Library". Such a work, in isolation, is not a derivative work of - the Library, and therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library - creates an executable that is a derivative of the Library (because - it contains portions of the Library), rather than a "work that - uses the library". The executable is therefore covered by this - License. Section 6 states terms for distribution of such - executables. - - When a "work that uses the Library" uses material from a header - file that is part of the Library, the object code for the work may - be a derivative work of the Library even though the source code is - not. Whether this is true is especially significant if the work - can be linked without the Library, or if the work is itself a - library. The threshold for this to be true is not precisely - defined by law. - - If such an object file uses only numerical parameters, data - structure layouts and accessors, and small macros and small inline - functions (ten lines or less in length), then the use of the object - file is unrestricted, regardless of whether it is legally a - derivative work. (Executables containing this object code plus - portions of the Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may - distribute the object code for the work under the terms of Section - 6. Any executables containing that work also fall under Section 6, - whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or - link a "work that uses the Library" with the Library to produce a - work containing portions of the Library, and distribute that work - under terms of your choice, provided that the terms permit - modification of the work for the customer's own use and reverse - engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the - Library is used in it and that the Library and its use are covered - by this License. You must supply a copy of this License. If the - work during execution displays copyright notices, you must include - the copyright notice for the Library among them, as well as a - reference directing the user to the copy of this License. Also, - you must do one of these things: - - a. Accompany the work with the complete corresponding - machine-readable source code for the Library including - whatever changes were used in the work (which must be - distributed under Sections 1 and 2 above); and, if the work - is an executable linked with the Library, with the complete - machine-readable "work that uses the Library", as object code - and/or source code, so that the user can modify the Library - and then relink to produce a modified executable containing - the modified Library. (It is understood that the user who - changes the contents of definitions files in the Library will - not necessarily be able to recompile the application to use - the modified definitions.) - - b. Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run - time a copy of the library already present on the user's - computer system, rather than copying library functions into - the executable, and (2) will operate properly with a modified - version of the library, if the user installs one, as long as - the modified version is interface-compatible with the version - that the work was made with. - - c. Accompany the work with a written offer, valid for at least - three years, to give the same user the materials specified in - Subsection 6a, above, for a charge no more than the cost of - performing this distribution. - - d. If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the - above specified materials from the same place. - - e. Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the - Library" must include any data and utility programs needed for - reproducing the executable from it. However, as a special - exception, the materials to be distributed need not include - anything that is normally distributed (in either source or binary - form) with the major components (compiler, kernel, and so on) of - the operating system on which the executable runs, unless that - component itself accompanies the executable. - - It may happen that this requirement contradicts the license - restrictions of other proprietary libraries that do not normally - accompany the operating system. Such a contradiction means you - cannot use both them and the Library together in an executable - that you distribute. - - 7. You may place library facilities that are a work based on the - Library side-by-side in a single library together with other - library facilities not covered by this License, and distribute - such a combined library, provided that the separate distribution - of the work based on the Library and of the other library - facilities is otherwise permitted, and provided that you do these - two things: - - a. Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b. Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same - work. - - 8. You may not copy, modify, sublicense, link with, or distribute the - Library except as expressly provided under this License. Any - attempt otherwise to copy, modify, sublicense, link with, or - distribute the Library is void, and will automatically terminate - your rights under this License. However, parties who have - received copies, or rights, from you under this License will not - have their licenses terminated so long as such parties remain in - full compliance. - - 9. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify - or distribute the Library or its derivative works. These actions - are prohibited by law if you do not accept this License. - Therefore, by modifying or distributing the Library (or any work - based on the Library), you indicate your acceptance of this - License to do so, and all its terms and conditions for copying, - distributing or modifying the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the - Library), the recipient automatically receives a license from the - original licensor to copy, distribute, link with or modify the - Library subject to these terms and conditions. You may not impose - any further restrictions on the recipients' exercise of the rights - granted herein. You are not responsible for enforcing compliance - by third parties with this License. - - 11. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent - issues), conditions are imposed on you (whether by court order, - agreement or otherwise) that contradict the conditions of this - License, they do not excuse you from the conditions of this - License. If you cannot distribute so as to satisfy simultaneously - your obligations under this License and any other pertinent - obligations, then as a consequence you may not distribute the - Library at all. For example, if a patent license would not permit - royalty-free redistribution of the Library by all those who - receive copies directly or indirectly through you, then the only - way you could satisfy both it and this License would be to refrain - entirely from distribution of the Library. - - If any portion of this section is held invalid or unenforceable - under any particular circumstance, the balance of the section is - intended to apply, and the section as a whole is intended to apply - in other circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of - any such claims; this section has the sole purpose of protecting - the integrity of the free software distribution system which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is - willing to distribute software through any other system and a - licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed - to be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in - certain countries either by patents or by copyrighted interfaces, - the original copyright holder who places the Library under this - License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only - in or among countries not thus excluded. In such case, this - License incorporates the limitation as if written in the body of - this License. - - 13. The Free Software Foundation may publish revised and/or new - versions of the Lesser General Public License from time to time. - Such new versions will be similar in spirit to the present version, - but may differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the - Library specifies a version number of this License which applies - to it and "any later version", you have the option of following - the terms and conditions either of that version or of any later - version published by the Free Software Foundation. If the Library - does not specify a license version number, you may choose any - version ever published by the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free - programs whose distribution conditions are incompatible with these, - write to the author to ask for permission. For software which is - copyrighted by the Free Software Foundation, write to the Free - Software Foundation; we sometimes make exceptions for this. Our - decision will be guided by the two goals of preserving the free - status of all derivatives of our free software and of promoting - the sharing and reuse of software generally. - - NO WARRANTY - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE - LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT - HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT - WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE - QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE - LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY - SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY - MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE - LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, - INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF - DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU - OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY - OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS -How to Apply These Terms to Your New Libraries -============================================== - -If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of -the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should have -at least the "copyright" line and a pointer to where the full notice is -found. - - ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. - Copyright (C) YEAR NAME OF AUTHOR - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or (at - your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, - USA. - - Also add information on how to contact you by electronic and paper -mail. - - You should also get your employer (if you work as a programmer) or -your school, if any, to sign a "copyright disclaimer" for the library, -if necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the library - `Frob' (a library for tweaking knobs) written by James Random Hacker. - - SIGNATURE OF TY COON, 1 April 1990 - Ty Coon, President of Vice - - That's all there is to it! - - -File: gcrypt.info, Node: Copying, Next: Figures and Tables, Prev: Library Copying, Up: Top - -GNU General Public License -************************** - - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -Preamble -======== - -The licenses for most software are designed to take away your freedom -to share and change it. By contrast, the GNU General Public License is -intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it in -new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, -and (2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 1. This License applies to any program or other work which contains a - notice placed by the copyright holder saying it may be distributed - under the terms of this General Public License. The "Program", - below, refers to any such program or work, and a "work based on - the Program" means either the Program or any derivative work under - copyright law: that is to say, a work containing the Program or a - portion of it, either verbatim or with modifications and/or - translated into another language. (Hereinafter, translation is - included without limitation in the term "modification".) Each - licensee is addressed as "you". - - Activities other than copying, distribution and modification are - not covered by this License; they are outside its scope. The act - of running the Program is not restricted, and the output from the - Program is covered only if its contents constitute a work based on - the Program (independent of having been made by running the - Program). Whether that is true depends on what the Program does. - - 2. You may copy and distribute verbatim copies of the Program's - source code as you receive it, in any medium, provided that you - conspicuously and appropriately publish on each copy an appropriate - copyright notice and disclaimer of warranty; keep intact all the - notices that refer to this License and to the absence of any - warranty; and give any other recipients of the Program a copy of - this License along with the Program. - - You may charge a fee for the physical act of transferring a copy, - and you may at your option offer warranty protection in exchange - for a fee. - - 3. You may modify your copy or copies of the Program or any portion - of it, thus forming a work based on the Program, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a. You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b. You must cause any work that you distribute or publish, that - in whole or in part contains or is derived from the Program - or any part thereof, to be licensed as a whole at no charge - to all third parties under the terms of this License. - - c. If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display - an announcement including an appropriate copyright notice and - a notice that there is no warranty (or else, saying that you - provide a warranty) and that users may redistribute the - program under these conditions, and telling the user how to - view a copy of this License. (Exception: if the Program - itself is interactive but does not normally print such an - announcement, your work based on the Program is not required - to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the - Program, and can be reasonably considered independent and separate - works in themselves, then this License, and its terms, do not - apply to those sections when you distribute them as separate - works. But when you distribute the same sections as part of a - whole which is a work based on the Program, the distribution of - the whole must be on the terms of this License, whose permissions - for other licensees extend to the entire whole, and thus to each - and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or - contest your rights to work written entirely by you; rather, the - intent is to exercise the right to control the distribution of - derivative or collective works based on the Program. - - In addition, mere aggregation of another work not based on the - Program with the Program (or with a work based on the Program) on - a volume of a storage or distribution medium does not bring the - other work under the scope of this License. - - 4. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms - of Sections 1 and 2 above provided that you also do one of the - following: - - a. Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of - Sections 1 and 2 above on a medium customarily used for - software interchange; or, - - b. Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a - medium customarily used for software interchange; or, - - c. Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with - such an offer, in accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete - source code means all the source code for all modules it contains, - plus any associated interface definition files, plus the scripts - used to control compilation and installation of the executable. - However, as a special exception, the source code distributed need - not include anything that is normally distributed (in either - source or binary form) with the major components (compiler, - kernel, and so on) of the operating system on which the executable - runs, unless that component itself accompanies the executable. - - If distribution of executable or object code is made by offering - access to copy from a designated place, then offering equivalent - access to copy the source code from the same place counts as - distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - 5. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt - otherwise to copy, modify, sublicense or distribute the Program is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 6. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify - or distribute the Program or its derivative works. These actions - are prohibited by law if you do not accept this License. - Therefore, by modifying or distributing the Program (or any work - based on the Program), you indicate your acceptance of this - License to do so, and all its terms and conditions for copying, - distributing or modifying the Program or works based on it. - - 7. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program - subject to these terms and conditions. You may not impose any - further restrictions on the recipients' exercise of the rights - granted herein. You are not responsible for enforcing compliance - by third parties to this License. - - 8. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent - issues), conditions are imposed on you (whether by court order, - agreement or otherwise) that contradict the conditions of this - License, they do not excuse you from the conditions of this - License. If you cannot distribute so as to satisfy simultaneously - your obligations under this License and any other pertinent - obligations, then as a consequence you may not distribute the - Program at all. For example, if a patent license would not permit - royalty-free redistribution of the Program by all those who - receive copies directly or indirectly through you, then the only - way you could satisfy both it and this License would be to refrain - entirely from distribution of the Program. - - If any portion of this section is held invalid or unenforceable - under any particular circumstance, the balance of the section is - intended to apply and the section as a whole is intended to apply - in other circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of - any such claims; this section has the sole purpose of protecting - the integrity of the free software distribution system, which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is - willing to distribute software through any other system and a - licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed - to be a consequence of the rest of this License. - - 9. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, - the original copyright holder who places the Program under this - License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only - in or among countries not thus excluded. In such case, this - License incorporates the limitation as if written in the body of - this License. - - 10. The Free Software Foundation may publish revised and/or new - versions of the General Public License from time to time. Such - new versions will be similar in spirit to the present version, but - may differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the - Program specifies a version number of this License which applies - to it and "any later version", you have the option of following - the terms and conditions either of that version or of any later - version published by the Free Software Foundation. If the Program - does not specify a version number of this License, you may choose - any version ever published by the Free Software Foundation. - - 11. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the - author to ask for permission. For software which is copyrighted - by the Free Software Foundation, write to the Free Software - Foundation; we sometimes make exceptions for this. Our decision - will be guided by the two goals of preserving the free status of - all derivatives of our free software and of promoting the sharing - and reuse of software generally. - - NO WARRANTY - 12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE - LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT - HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT - WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE - QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE - PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY - SERVICING, REPAIR OR CORRECTION. - - 13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY - MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE - LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, - INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF - DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU - OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY - OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS -How to Apply These Terms to Your New Programs -============================================= - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these -terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - ONE LINE TO GIVE THE PROGRAM'S NAME AND AN IDEA OF WHAT IT DOES. - Copyright (C) 19YY NAME OF AUTHOR - - 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. - - Also add information on how to contact you by electronic and paper -mail. - - If the program is interactive, make it output a short notice like -this when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details - type `show w'. This is free software, and you are welcome - to redistribute it under certain conditions; type `show c' - for details. - - The hypothetical commands `show w' and `show c' should show the -appropriate parts of the General Public License. Of course, the -commands you use may be called something other than `show w' and `show -c'; they could even be mouse-clicks or menu items--whatever suits your -program. - - You should also get your employer (if you work as a programmer) or -your school, if any, to sign a "copyright disclaimer" for the program, -if necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright - interest in the program `Gnomovision' - (which makes passes at compilers) written - by James Hacker. - - SIGNATURE OF TY COON, 1 April 1989 - Ty Coon, President of Vice - - This General Public License does not permit incorporating your -program into proprietary programs. If your program is a subroutine -library, you may consider it more useful to permit linking proprietary -applications with the library. If this is what you want to do, use the -GNU Library General Public License instead of this License. - - -File: gcrypt.info, Node: Figures and Tables, Next: Concept Index, Prev: Copying, Up: Top - -List of Figures and Tables -************************** - -* Menu: - -* Figure 13.1: Libgcrypt subsystems: fig:subsystems. -* Figure B.1: FIPS mode state ...: fig:fips-fsm. - -* Menu: - -* Table B.1: FIPS mode states: tbl:fips-states. -* Table B.2: FIPS mode state ...: tbl:fips-state-transitions. - - -File: gcrypt.info, Node: Concept Index, Next: Function and Data Index, Prev: Figures and Tables, Up: Top - -Concept Index -************* - -[index] -* Menu: - -* 3DES: Available ciphers. (line 16) -* Advanced Encryption Standard: Available ciphers. (line 37) -* AES: Available ciphers. (line 37) -* Arcfour: Available ciphers. (line 54) -* Blowfish: Available ciphers. (line 24) -* Camellia: Available ciphers. (line 81) -* CAST5: Available ciphers. (line 21) -* CBC, Cipher Block Chaining mode: Available cipher modes. - (line 20) -* CBC-MAC: Working with cipher handles. - (line 52) -* CFB, Cipher Feedback mode: Available cipher modes. - (line 16) -* cipher text stealing: Working with cipher handles. - (line 45) -* CRC32: Available hash algorithms. - (line 6) -* CTR, Counter mode: Available cipher modes. - (line 29) -* DES: Available ciphers. (line 59) -* DES-EDE: Available ciphers. (line 16) -* Digital Encryption Standard: Available ciphers. (line 16) -* ECB, Electronic Codebook mode: Available cipher modes. - (line 13) -* Enforced FIPS mode: Enabling FIPS mode. (line 30) -* error codes: Error Values. (line 6) -* error codes, list of <1>: Error Codes. (line 6) -* error codes, list of: Error Sources. (line 6) -* error codes, printing of: Error Strings. (line 6) -* error sources: Error Values. (line 6) -* error sources, printing of: Error Strings. (line 6) -* error strings: Error Strings. (line 6) -* error values: Error Values. (line 6) -* error values, printing of: Error Strings. (line 6) -* FIPS 140: Enabling FIPS mode. (line 6) -* FIPS 186 <1>: Public-Key Subsystem Architecture. - (line 63) -* FIPS 186: General public-key related Functions. - (line 256) -* FIPS mode: Enabling FIPS mode. (line 6) -* GPL, GNU General Public License: Copying. (line 6) -* HAVAL: Available hash algorithms. - (line 6) -* HMAC: Working with hash algorithms. - (line 27) -* IDEA: Available ciphers. (line 11) -* LGPL, GNU Lesser General Public License: Library Copying. (line 6) -* MD2, MD4, MD5: Available hash algorithms. - (line 6) -* OFB, Output Feedback mode: Available cipher modes. - (line 26) -* RC2: Available ciphers. (line 71) -* RC4: Available ciphers. (line 54) -* rfc-2268: Available ciphers. (line 71) -* Rijndael: Available ciphers. (line 37) -* RIPE-MD-160: Available hash algorithms. - (line 6) -* Seed (cipher): Available ciphers. (line 76) -* Serpent: Available ciphers. (line 67) -* SHA-1: Available hash algorithms. - (line 6) -* SHA-224, SHA-256, SHA-384, SHA-512: Available hash algorithms. - (line 6) -* sync mode (OpenPGP): Working with cipher handles. - (line 40) -* TIGER: Available hash algorithms. - (line 6) -* Triple-DES: Available ciphers. (line 16) -* Twofish: Available ciphers. (line 48) -* Whirlpool: Available hash algorithms. - (line 6) -* X9.31 <1>: Public-Key Subsystem Architecture. - (line 63) -* X9.31: General public-key related Functions. - (line 249) - - -File: gcrypt.info, Node: Function and Data Index, Prev: Concept Index, Up: Top - -Function and Data Index -*********************** - -[index] -* Menu: - -* AM_PATH_LIBGCRYPT: Building sources using Automake. - (line 13) -* gcry_ac_close: Working with handles. - (line 21) -* gcry_ac_data_clear: Working with sets of data. - (line 75) -* gcry_ac_data_copy: Working with sets of data. - (line 53) -* gcry_ac_data_decode: Using cryptographic functions. - (line 100) -* gcry_ac_data_decrypt: Using cryptographic functions. - (line 40) -* gcry_ac_data_decrypt_scheme: Using cryptographic functions. - (line 137) -* gcry_ac_data_destroy: Working with sets of data. - (line 41) -* gcry_ac_data_encode: Using cryptographic functions. - (line 93) -* gcry_ac_data_encrypt: Using cryptographic functions. - (line 33) -* gcry_ac_data_encrypt_scheme: Using cryptographic functions. - (line 127) -* gcry_ac_data_from_sexp: Working with sets of data. - (line 93) -* gcry_ac_data_get_index: Working with sets of data. - (line 69) -* gcry_ac_data_get_name: Working with sets of data. - (line 61) -* gcry_ac_data_length: Working with sets of data. - (line 57) -* gcry_ac_data_new: Working with sets of data. - (line 38) -* gcry_ac_data_set: Working with sets of data. - (line 45) -* gcry_ac_data_sign: Using cryptographic functions. - (line 48) -* gcry_ac_data_sign_scheme: Using cryptographic functions. - (line 147) -* gcry_ac_data_t: Working with sets of data. - (line 20) -* gcry_ac_data_to_sexp: Working with sets of data. - (line 79) -* gcry_ac_data_verify: Using cryptographic functions. - (line 54) -* gcry_ac_data_verify_scheme: Using cryptographic functions. - (line 157) -* gcry_ac_id_t: Available asymmetric algorithms. - (line 11) -* gcry_ac_id_to_name: Handle-independent functions. - (line 10) -* gcry_ac_io_init: Working with IO objects. - (line 22) -* gcry_ac_io_init_va: Working with IO objects. - (line 28) -* gcry_ac_io_t: Working with IO objects. - (line 10) -* gcry_ac_key_data_get: Working with keys. (line 93) -* gcry_ac_key_destroy: Working with keys. (line 86) -* gcry_ac_key_get_grip: Working with keys. (line 105) -* gcry_ac_key_get_nbits: Working with keys. (line 101) -* gcry_ac_key_init: Working with keys. (line 30) -* gcry_ac_key_pair_destroy: Working with keys. (line 90) -* gcry_ac_key_pair_extract: Working with keys. (line 83) -* gcry_ac_key_pair_generate: Working with keys. (line 36) -* gcry_ac_key_pair_t: Working with keys. (line 20) -* gcry_ac_key_t: Working with keys. (line 16) -* gcry_ac_key_test: Working with keys. (line 97) -* gcry_ac_key_type_t: Working with keys. (line 7) -* gcry_ac_name_to_id: Handle-independent functions. - (line 15) -* gcry_ac_open: Working with handles. - (line 11) -* gcry_calloc: Memory allocation. (line 15) -* gcry_calloc_secure: Memory allocation. (line 21) -* gcry_check_version: Initializing the library. - (line 17) -* gcry_cipher_algo_info: General cipher functions. - (line 12) -* gcry_cipher_algo_name: General cipher functions. - (line 39) -* gcry_cipher_close: Working with cipher handles. - (line 59) -* gcry_cipher_ctl: Working with cipher handles. - (line 159) -* gcry_cipher_decrypt: Working with cipher handles. - (line 129) -* gcry_cipher_decrypt_t: Cipher modules. (line 80) -* gcry_cipher_encrypt: Working with cipher handles. - (line 110) -* gcry_cipher_encrypt_t: Cipher modules. (line 75) -* gcry_cipher_info: Working with cipher handles. - (line 168) -* gcry_cipher_list: Cipher modules. (line 106) -* gcry_cipher_map_name: General cipher functions. - (line 45) -* gcry_cipher_mode_from_oid: General cipher functions. - (line 50) -* gcry_cipher_oid_spec_t: Cipher modules. (line 60) -* gcry_cipher_open: Working with cipher handles. - (line 11) -* gcry_cipher_register: Cipher modules. (line 96) -* gcry_cipher_reset: Working with cipher handles. - (line 97) -* gcry_cipher_setctr: Working with cipher handles. - (line 90) -* gcry_cipher_setiv: Working with cipher handles. - (line 83) -* gcry_cipher_setkey: Working with cipher handles. - (line 68) -* gcry_cipher_setkey_t: Cipher modules. (line 70) -* gcry_cipher_spec_t: Cipher modules. (line 12) -* gcry_cipher_stdecrypt_t: Cipher modules. (line 90) -* gcry_cipher_stencrypt_t: Cipher modules. (line 85) -* gcry_cipher_sync: Working with cipher handles. - (line 149) -* gcry_cipher_unregister: Cipher modules. (line 101) -* gcry_control: Controlling the library. - (line 7) -* gcry_create_nonce: Retrieving random numbers. - (line 26) -* gcry_err_code: Error Values. (line 43) -* gcry_err_code_from_errno: Error Values. (line 95) -* gcry_err_code_t: Error Values. (line 7) -* gcry_err_code_to_errno: Error Values. (line 100) -* gcry_err_make: Error Values. (line 57) -* gcry_err_make_from_errno: Error Values. (line 81) -* gcry_err_source: Error Values. (line 49) -* gcry_err_source_t: Error Values. (line 14) -* gcry_error: Error Values. (line 64) -* gcry_error_from_errno: Error Values. (line 86) -* gcry_error_t: Error Values. (line 25) -* gcry_fips_mode_active: Controlling the library. - (line 221) -* gcry_free: Memory allocation. (line 31) -* gcry_handler_alloc_t: Allocation handler. (line 12) -* gcry_handler_error_t: Error handler. (line 27) -* gcry_handler_free_t: Allocation handler. (line 24) -* gcry_handler_log_t: Logging handler. (line 7) -* gcry_handler_no_mem_t: Error handler. (line 11) -* gcry_handler_progress_t: Progress handler. (line 10) -* gcry_handler_realloc_t: Allocation handler. (line 20) -* gcry_handler_secure_check_t: Allocation handler. (line 16) -* gcry_malloc: Memory allocation. (line 7) -* gcry_malloc_secure: Memory allocation. (line 12) -* gcry_md_algo_name: Working with hash algorithms. - (line 154) -* gcry_md_close: Working with hash algorithms. - (line 61) -* gcry_md_copy: Working with hash algorithms. - (line 84) -* gcry_md_debug: Working with hash algorithms. - (line 218) -* gcry_md_enable: Working with hash algorithms. - (line 44) -* gcry_md_final: Working with hash algorithms. - (line 112) -* gcry_md_final_t: Hash algorithm modules. - (line 73) -* gcry_md_get_algo: Working with hash algorithms. - (line 198) -* gcry_md_get_algo_dlen: Working with hash algorithms. - (line 189) -* gcry_md_get_asnoid: Working with hash algorithms. - (line 170) -* gcry_md_hash_buffer: Working with hash algorithms. - (line 137) -* gcry_md_init_t: Hash algorithm modules. - (line 65) -* gcry_md_is_enabled: Working with hash algorithms. - (line 209) -* gcry_md_is_secure: Working with hash algorithms. - (line 204) -* gcry_md_list: Hash algorithm modules. - (line 91) -* gcry_md_map_name: Working with hash algorithms. - (line 160) -* gcry_md_oid_spec_t: Hash algorithm modules. - (line 57) -* gcry_md_open: Working with hash algorithms. - (line 11) -* gcry_md_putc: Working with hash algorithms. - (line 102) -* gcry_md_read: Working with hash algorithms. - (line 122) -* gcry_md_read_t: Hash algorithm modules. - (line 77) -* gcry_md_register: Hash algorithm modules. - (line 82) -* gcry_md_reset: Working with hash algorithms. - (line 72) -* gcry_md_setkey: Working with hash algorithms. - (line 53) -* gcry_md_spec_t: Hash algorithm modules. - (line 12) -* gcry_md_start_debug: Working with hash algorithms. - (line 232) -* gcry_md_stop_debug: Working with hash algorithms. - (line 240) -* gcry_md_test_algo: Working with hash algorithms. - (line 183) -* gcry_md_unregister: Hash algorithm modules. - (line 87) -* gcry_md_write: Working with hash algorithms. - (line 97) -* gcry_md_write_t: Hash algorithm modules. - (line 69) -* gcry_module_t: Modules. (line 10) -* gcry_mpi_add: Calculations. (line 10) -* gcry_mpi_add_ui: Calculations. (line 14) -* gcry_mpi_addm: Calculations. (line 18) -* gcry_mpi_aprint: MPI formats. (line 54) -* gcry_mpi_clear_bit: Bit manipulations. (line 19) -* gcry_mpi_clear_flag: Miscellaneous. (line 32) -* gcry_mpi_clear_highbit: Bit manipulations. (line 25) -* gcry_mpi_cmp: Comparisons. (line 9) -* gcry_mpi_cmp_ui: Comparisons. (line 13) -* gcry_mpi_copy: Basic functions. (line 23) -* gcry_mpi_div: Calculations. (line 50) -* gcry_mpi_dump: MPI formats. (line 61) -* gcry_mpi_gcd: Calculations. (line 63) -* gcry_mpi_get_flag: Miscellaneous. (line 37) -* gcry_mpi_get_nbits: Bit manipulations. (line 10) -* gcry_mpi_get_opaque: Miscellaneous. (line 20) -* gcry_mpi_invm: Calculations. (line 68) -* gcry_mpi_lshift: Bit manipulations. (line 34) -* gcry_mpi_mod: Calculations. (line 55) -* gcry_mpi_mul: Calculations. (line 34) -* gcry_mpi_mul_2exp: Calculations. (line 46) -* gcry_mpi_mul_ui: Calculations. (line 38) -* gcry_mpi_mulm: Calculations. (line 42) -* gcry_mpi_new: Basic functions. (line 10) -* gcry_mpi_powm: Calculations. (line 59) -* gcry_mpi_print: MPI formats. (line 45) -* gcry_mpi_randomize: Miscellaneous. (line 41) -* gcry_mpi_release: Basic functions. (line 26) -* gcry_mpi_rshift: Bit manipulations. (line 29) -* gcry_mpi_scan: MPI formats. (line 12) -* gcry_mpi_set: Basic functions. (line 33) -* gcry_mpi_set_bit: Bit manipulations. (line 16) -* gcry_mpi_set_flag: Miscellaneous. (line 26) -* gcry_mpi_set_highbit: Bit manipulations. (line 22) -* gcry_mpi_set_opaque: Miscellaneous. (line 8) -* gcry_mpi_set_ui: Basic functions. (line 37) -* gcry_mpi_snew: Basic functions. (line 17) -* gcry_mpi_sub: Calculations. (line 22) -* gcry_mpi_sub_ui: Calculations. (line 26) -* gcry_mpi_subm: Calculations. (line 30) -* gcry_mpi_swap: Basic functions. (line 44) -* gcry_mpi_t: Data types. (line 7) -* gcry_mpi_test_bit: Bit manipulations. (line 13) -* gcry_pk_algo_info: General public-key related Functions. - (line 47) -* gcry_pk_algo_name: General public-key related Functions. - (line 10) -* gcry_pk_check_secret_key_t: Public key modules. (line 91) -* gcry_pk_ctl: General public-key related Functions. - (line 100) -* gcry_pk_decrypt: Cryptographic Functions. - (line 85) -* gcry_pk_decrypt_t: Public key modules. (line 101) -* gcry_pk_encrypt: Cryptographic Functions. - (line 29) -* gcry_pk_encrypt_t: Public key modules. (line 96) -* gcry_pk_generate_t: Public key modules. (line 86) -* gcry_pk_genkey: General public-key related Functions. - (line 115) -* gcry_pk_get_keygrip: General public-key related Functions. - (line 29) -* gcry_pk_get_nbits: General public-key related Functions. - (line 24) -* gcry_pk_get_nbits_t: Public key modules. (line 116) -* gcry_pk_list: Public key modules. (line 131) -* gcry_pk_map_name: General public-key related Functions. - (line 16) -* gcry_pk_register: Public key modules. (line 121) -* gcry_pk_sign: Cryptographic Functions. - (line 117) -* gcry_pk_sign_t: Public key modules. (line 106) -* gcry_pk_spec_t: Public key modules. (line 12) -* gcry_pk_test_algo: General public-key related Functions. - (line 20) -* gcry_pk_testkey: General public-key related Functions. - (line 40) -* gcry_pk_unregister: Public key modules. (line 127) -* gcry_pk_verify: Cryptographic Functions. - (line 170) -* gcry_pk_verify_t: Public key modules. (line 111) -* gcry_prime_check: Checking. (line 8) -* gcry_prime_generate: Generation. (line 10) -* gcry_prime_group_generator: Generation. (line 19) -* gcry_prime_release_factors: Generation. (line 25) -* gcry_random_bytes: Retrieving random numbers. - (line 13) -* gcry_random_bytes_secure: Retrieving random numbers. - (line 19) -* gcry_random_level_t: Quality of random numbers. - (line 9) -* gcry_randomize: Retrieving random numbers. - (line 8) -* gcry_realloc: Memory allocation. (line 24) -* gcry_set_allocation_handler: Allocation handler. (line 34) -* gcry_set_fatalerror_handler: Error handler. (line 32) -* gcry_set_log_handler: Logging handler. (line 12) -* gcry_set_outofcore_handler: Error handler. (line 16) -* gcry_set_progress_handler: Progress handler. (line 21) -* gcry_sexp_build: Working with S-expressions. - (line 43) -* gcry_sexp_canon_len: Working with S-expressions. - (line 126) -* gcry_sexp_car: Working with S-expressions. - (line 155) -* gcry_sexp_cdr: Working with S-expressions. - (line 160) -* gcry_sexp_create: Working with S-expressions. - (line 26) -* gcry_sexp_dump: Working with S-expressions. - (line 117) -* gcry_sexp_find_token: Working with S-expressions. - (line 138) -* gcry_sexp_length: Working with S-expressions. - (line 145) -* gcry_sexp_new: Working with S-expressions. - (line 13) -* gcry_sexp_nth: Working with S-expressions. - (line 150) -* gcry_sexp_nth_data: Working with S-expressions. - (line 168) -* gcry_sexp_nth_mpi: Working with S-expressions. - (line 193) -* gcry_sexp_nth_string: Working with S-expressions. - (line 185) -* gcry_sexp_release: Working with S-expressions. - (line 83) -* gcry_sexp_sprint: Working with S-expressions. - (line 94) -* gcry_sexp_sscan: Working with S-expressions. - (line 37) -* gcry_sexp_t: Data types for S-expressions. - (line 7) -* gcry_strerror: Error Strings. (line 7) -* gcry_strsource: Error Strings. (line 13) - - - -Tag Table: -Node: Top775 -Node: Introduction2994 -Node: Getting Started3366 -Node: Features4247 -Node: Overview5031 -Node: Preparation5662 -Node: Header6519 -Node: Building sources7589 -Node: Building sources using Automake9503 -Node: Initializing the library10685 -Ref: sample-use-suspend-secmem13860 -Ref: sample-use-resume-secmem14480 -Node: Multi-Threading15376 -Ref: Multi-Threading-Footnote-119389 -Node: Enabling FIPS mode19797 -Node: Generalities21663 -Node: Controlling the library21988 -Node: Modules34155 -Node: Error Handling34934 -Node: Error Values37457 -Node: Error Sources42397 -Node: Error Codes44668 -Node: Error Strings48153 -Node: Handler Functions49336 -Node: Progress handler49895 -Node: Allocation handler51891 -Node: Error handler53442 -Node: Logging handler55009 -Node: Symmetric cryptography55601 -Node: Available ciphers56406 -Node: Cipher modules58913 -Node: Available cipher modes63437 -Node: Working with cipher handles64316 -Node: General cipher functions72631 -Node: Public Key cryptography75149 -Node: Available algorithms76064 -Node: Used S-expressions76413 -Node: RSA key parameters77525 -Node: DSA key parameters78800 -Node: ECC key parameters79458 -Node: Public key modules81223 -Node: Cryptographic Functions86807 -Node: General public-key related Functions94287 -Node: AC Interface106576 -Node: Available asymmetric algorithms107711 -Node: Working with sets of data108380 -Node: Working with IO objects112882 -Node: Working with handles115602 -Node: Working with keys116549 -Node: Using cryptographic functions120631 -Node: Handle-independent functions127538 -Node: Hashing128286 -Node: Available hash algorithms129077 -Node: Hash algorithm modules132184 -Node: Working with hash algorithms136032 -Node: Random Numbers147334 -Node: Quality of random numbers147608 -Node: Retrieving random numbers148292 -Node: S-expressions149776 -Node: Data types for S-expressions150418 -Node: Working with S-expressions150742 -Node: MPI library160113 -Node: Data types161071 -Node: Basic functions161265 -Node: MPI formats163333 -Node: Calculations166216 -Node: Comparisons168470 -Node: Bit manipulations169114 -Node: Miscellaneous170429 -Node: Prime numbers172398 -Node: Generation172668 -Node: Checking173952 -Node: Utilities174365 -Node: Memory allocation174558 -Node: Architecture175885 -Ref: fig:subsystems177405 -Ref: Architecture-Footnote-1178490 -Ref: Architecture-Footnote-2178552 -Node: Public-Key Subsystem Architecture178636 -Node: Symmetric Encryption Subsystem Architecture181577 -Node: Hashing and MACing Subsystem Architecture183024 -Node: Multi-Precision-Integer Subsystem Architecture184948 -Node: Prime-Number-Generator Subsystem Architecture186389 -Ref: Prime-Number-Generator Subsystem Architecture-Footnote-1188320 -Node: Random-Number Subsystem Architecture188607 -Node: CSPRNG Description191096 -Ref: CSPRNG Description-Footnote-1192658 -Node: FIPS PRNG Description192781 -Node: Self-Tests194916 -Node: FIPS Mode206607 -Ref: fig:fips-fsm210587 -Ref: tbl:fips-states210689 -Ref: tbl:fips-state-transitions211942 -Node: Library Copying215556 -Node: Copying243674 -Node: Figures and Tables262848 -Node: Concept Index263258 -Node: Function and Data Index268823 - -End Tag Table +This is gcrypt.info, produced by makeinfo version 4.13 from gcrypt.texi. + +This manual is for Libgcrypt (version 1.4.6, 9 July 2009), which is +GNU's library of cryptographic building blocks. + + Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free +Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document 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. The text of the + license can be found in the section entitled "GNU General Public + License". + +INFO-DIR-SECTION GNU Libraries +START-INFO-DIR-ENTRY +* libgcrypt: (gcrypt). Cryptographic function library. +END-INFO-DIR-ENTRY + + +File: gcrypt.info, Node: Top, Next: Introduction, Up: (dir) + +The Libgcrypt Library +********************* + +This manual is for Libgcrypt (version 1.4.6, 9 July 2009), which is +GNU's library of cryptographic building blocks. + + Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free +Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document 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. The text of the + license can be found in the section entitled "GNU General Public + License". + +* Menu: + +* Introduction:: What is Libgcrypt. +* Preparation:: What you should do before using the library. +* Generalities:: General library functions and data types. +* Handler Functions:: Working with handler functions. +* Symmetric cryptography:: How to use symmetric cryptography. +* Public Key cryptography:: How to use public key cryptography. +* Hashing:: How to use hash and MAC algorithms. +* Random Numbers:: How to work with random numbers. +* S-expressions:: How to manage S-expressions. +* MPI library:: How to work with multi-precision-integers. +* Prime numbers:: How to use the Prime number related functions. +* Utilities:: Utility functions. +* Architecture:: How Libgcrypt works internally. + +Appendices + +* Self-Tests:: Description of the self-tests. +* FIPS Mode:: Description of the FIPS mode. +* Library Copying:: The GNU Lesser General Public License + says how you can copy and share Libgcrypt. +* Copying:: The GNU General Public License says how you + can copy and share some parts of Libgcrypt. + +Indices + +* Figures and Tables:: Index of figures and tables. +* Concept Index:: Index of concepts and programs. +* Function and Data Index:: Index of functions, variables and data types. + + +File: gcrypt.info, Node: Introduction, Next: Preparation, Prev: Top, Up: Top + +1 Introduction +************** + +Libgcrypt is a library providing cryptographic building blocks. + +* Menu: + +* Getting Started:: How to use this manual. +* Features:: A glance at Libgcrypt's features. +* Overview:: Overview about the library. + + +File: gcrypt.info, Node: Getting Started, Next: Features, Up: Introduction + +1.1 Getting Started +=================== + +This manual documents the Libgcrypt library application programming +interface (API). All functions and data types provided by the library +are explained. + +The reader is assumed to possess basic knowledge about applied +cryptography. + + This manual can be used in several ways. If read from the beginning +to the end, it gives a good introduction into the library and how it +can be used in an application. Forward references are included where +necessary. Later on, the manual can be used as a reference manual to +get just the information needed about any particular interface of the +library. Experienced programmers might want to start looking at the +examples at the end of the manual, and then only read up those parts of +the interface which are unclear. + + +File: gcrypt.info, Node: Features, Next: Overview, Prev: Getting Started, Up: Introduction + +1.2 Features +============ + +Libgcrypt might have a couple of advantages over other libraries doing +a similar job. + +It's Free Software + Anybody can use, modify, and redistribute it under the terms of + the GNU Lesser General Public License (*note Library Copying::). + Note, that some parts (which are in general not needed by + applications) are subject to the terms of the GNU General Public + License (*note Copying::); please see the README file of the + distribution for of list of these parts. + +It encapsulates the low level cryptography + Libgcrypt provides a high level interface to cryptographic + building blocks using an extensible and flexible API. + + + +File: gcrypt.info, Node: Overview, Prev: Features, Up: Introduction + +1.3 Overview +============ + +The Libgcrypt library is fully thread-safe, where it makes sense to be +thread-safe. Not thread-safe are some cryptographic functions that +modify a certain context stored in handles. If the user really intents +to use such functions from different threads on the same handle, he has +to take care of the serialization of such functions himself. If not +described otherwise, every function is thread-safe. + + Libgcrypt depends on the library `libgpg-error', which contains +common error handling related code for GnuPG components. + + +File: gcrypt.info, Node: Preparation, Next: Generalities, Prev: Introduction, Up: Top + +2 Preparation +************* + +To use Libgcrypt, you have to perform some changes to your sources and +the build system. The necessary changes are small and explained in the +following sections. At the end of this chapter, it is described how +the library is initialized, and how the requirements of the library are +verified. + +* Menu: + +* Header:: What header file you need to include. +* Building sources:: How to build sources using the library. +* Building sources using Automake:: How to build sources with the help of Automake. +* Initializing the library:: How to initialize the library. +* Multi-Threading:: How Libgcrypt can be used in a MT environment. +* Enabling FIPS mode:: How to enable the FIPS mode. + + +File: gcrypt.info, Node: Header, Next: Building sources, Up: Preparation + +2.1 Header +========== + +All interfaces (data types and functions) of the library are defined in +the header file `gcrypt.h'. You must include this in all source files +using the library, either directly or through some other header file, +like this: + + #include + + The name space of Libgcrypt is `gcry_*' for function and type names +and `GCRY*' for other symbols. In addition the same name prefixes with +one prepended underscore are reserved for internal use and should never +be used by an application. Note that Libgcrypt uses libgpg-error, +which uses `gpg_*' as name space for function and type names and +`GPG_*' for other symbols, including all the error codes. + +Certain parts of gcrypt.h may be excluded by defining these macros: + +`GCRYPT_NO_MPI_MACROS' + Do not define the shorthand macros `mpi_*' for `gcry_mpi_*'. + +`GCRYPT_NO_DEPRECATED' + Do not include defintions for deprecated features. This is useful + to make sure that no deprecated features are used. + + +File: gcrypt.info, Node: Building sources, Next: Building sources using Automake, Prev: Header, Up: Preparation + +2.2 Building sources +==================== + +If you want to compile a source file including the `gcrypt.h' header +file, you must make sure that the compiler can find it in the directory +hierarchy. This is accomplished by adding the path to the directory in +which the header file is located to the compilers include file search +path (via the `-I' option). + + However, the path to the include file is determined at the time the +source is configured. To solve this problem, Libgcrypt ships with a +small helper program `libgcrypt-config' that knows the path to the +include file and other configuration options. The options that need to +be added to the compiler invocation at compile time are output by the +`--cflags' option to `libgcrypt-config'. The following example shows +how it can be used at the command line: + + gcc -c foo.c `libgcrypt-config --cflags` + + Adding the output of `libgcrypt-config --cflags' to the compilers +command line will ensure that the compiler can find the Libgcrypt header +file. + + A similar problem occurs when linking the program with the library. +Again, the compiler has to find the library files. For this to work, +the path to the library files has to be added to the library search path +(via the `-L' option). For this, the option `--libs' to +`libgcrypt-config' can be used. For convenience, this option also +outputs all other options that are required to link the program with +the Libgcrypt libraries (in particular, the `-lgcrypt' option). The +example shows how to link `foo.o' with the Libgcrypt library to a +program `foo'. + + gcc -o foo foo.o `libgcrypt-config --libs` + + Of course you can also combine both examples to a single command by +specifying both options to `libgcrypt-config': + + gcc -o foo foo.c `libgcrypt-config --cflags --libs` + + +File: gcrypt.info, Node: Building sources using Automake, Next: Initializing the library, Prev: Building sources, Up: Preparation + +2.3 Building sources using Automake +=================================== + +It is much easier if you use GNU Automake instead of writing your own +Makefiles. If you do that, you do not have to worry about finding and +invoking the `libgcrypt-config' script at all. Libgcrypt provides an +extension to Automake that does all the work for you. + + -- Macro: AM_PATH_LIBGCRYPT ([MINIMUM-VERSION], [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND]) + Check whether Libgcrypt (at least version MINIMUM-VERSION, if + given) exists on the host system. If it is found, execute + ACTION-IF-FOUND, otherwise do ACTION-IF-NOT-FOUND, if given. + + Additionally, the function defines `LIBGCRYPT_CFLAGS' to the flags + needed for compilation of the program to find the `gcrypt.h' + header file, and `LIBGCRYPT_LIBS' to the linker flags needed to + link the program to the Libgcrypt library. + + You can use the defined Autoconf variables like this in your +`Makefile.am': + + AM_CPPFLAGS = $(LIBGCRYPT_CFLAGS) + LDADD = $(LIBGCRYPT_LIBS) + + +File: gcrypt.info, Node: Initializing the library, Next: Multi-Threading, Prev: Building sources using Automake, Up: Preparation + +2.4 Initializing the library +============================ + +Before the library can be used, it must initialize itself. This is +achieved by invoking the function `gcry_check_version' described below. + + Also, it is often desirable to check that the version of Libgcrypt +used is indeed one which fits all requirements. Even with binary +compatibility, new features may have been introduced, but due to +problem with the dynamic linker an old version may actually be used. +So you may want to check that the version is okay right after program +startup. + + -- Function: const char * gcry_check_version (const char *REQ_VERSION) + The function `gcry_check_version' initializes some subsystems used + by Libgcrypt and must be invoked before any other function in the + library, with the exception of the `GCRYCTL_SET_THREAD_CBS' command + (called via the `gcry_control' function). *Note Multi-Threading::. + + Furthermore, this function returns the version number of the + library. It can also verify that the version number is higher + than a certain required version number REQ_VERSION, if this value + is not a null pointer. + + Libgcrypt uses a concept known as secure memory, which is a region of +memory set aside for storing sensitive data. Because such memory is a +scarce resource, it needs to be setup in advanced to a fixed size. +Further, most operating systems have special requirements on how that +secure memory can be used. For example, it might be required to install +an application as "setuid(root)" to allow allocating such memory. +Libgcrypt requires a sequence of initialization steps to make sure that +this works correctly. The following examples show the necessary steps. + + If you don't have a need for secure memory, for example if your +application does not use secret keys or other confidential data or it +runs in a controlled environment where key material floating around in +memory is not a problem, you should initialize Libgcrypt this way: + + /* Version check should be the very first call because it + makes sure that important subsystems are intialized. */ + if (!gcry_check_version (GCRYPT_VERSION)) + { + fputs ("libgcrypt version mismatch\n", stderr); + exit (2); + } + + /* Disable secure memory. */ + gcry_control (GCRYCTL_DISABLE_SECMEM, 0); + + /* ... If required, other initialization goes here. */ + + /* Tell Libgcrypt that initialization has completed. */ + gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); + + If you have to protect your keys or other information in memory +against being swapped out to disk and to enable an automatic overwrite +of used and freed memory, you need to initialize Libgcrypt this way: + + /* Version check should be the very first call because it + makes sure that important subsystems are intialized. */ + if (!gcry_check_version (GCRYPT_VERSION)) + { + fputs ("libgcrypt version mismatch\n", stderr); + exit (2); + } + + /* We don't want to see any warnings, e.g. because we have not yet + parsed program options which might be used to suppress such + warnings. */ + gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN); + + /* ... If required, other initialization goes here. Note that the + process might still be running with increased privileges and that + the secure memory has not been intialized. */ + + /* Allocate a pool of 16k secure memory. This make the secure memory + available and also drops privileges where needed. */ + gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0); + + /* It is now okay to let Libgcrypt complain when there was/is + a problem with the secure memory. */ + gcry_control (GCRYCTL_RESUME_SECMEM_WARN); + + /* ... If required, other initialization goes here. */ + + /* Tell Libgcrypt that initialization has completed. */ + gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); + + It is important that these initialization steps are not done by a +library but by the actual application. A library using Libgcrypt might +want to check for finished initialization using: + + if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) + { + fputs ("libgcrypt has not been initialized\n", stderr); + abort (); + } + + Instead of terminating the process, the library may instead print a +warning and try to initialize Libgcrypt itself. See also the section on +multi-threading below for more pitfalls. + + +File: gcrypt.info, Node: Multi-Threading, Next: Enabling FIPS mode, Prev: Initializing the library, Up: Preparation + +2.5 Multi-Threading +=================== + +As mentioned earlier, the Libgcrypt library is thread-safe if you +adhere to the following requirements: + + * If your application is multi-threaded, you must set the thread + support callbacks with the `GCRYCTL_SET_THREAD_CBS' command + *before* any other function in the library. + + This is easy enough if you are indeed writing an application using + Libgcrypt. It is rather problematic if you are writing a library + instead. Here are some tips what to do if you are writing a + library: + + If your library requires a certain thread package, just initialize + Libgcrypt to use this thread package. If your library supports + multiple thread packages, but needs to be configured, you will + have to implement a way to determine which thread package the + application wants to use with your library anyway. Then configure + Libgcrypt to use this thread package. + + If your library is fully reentrant without any special support by a + thread package, then you are lucky indeed. Unfortunately, this + does not relieve you from doing either of the two above, or use a + third option. The third option is to let the application + initialize Libgcrypt for you. Then you are not using Libgcrypt + transparently, though. + + As if this was not difficult enough, a conflict may arise if two + libraries try to initialize Libgcrypt independently of each + others, and both such libraries are then linked into the same + application. To make it a bit simpler for you, this will probably + work, but only if both libraries have the same requirement for the + thread package. This is currently only supported for the + non-threaded case, GNU Pth and pthread. Support for more thread + packages is easy to add, so contact us if you require it. + + * The function `gcry_check_version' must be called before any other + function in the library, except the `GCRYCTL_SET_THREAD_CBS' + command (called via the `gcry_control' function), because it + initializes the thread support subsystem in Libgcrypt. To achieve + this in multi-threaded programs, you must synchronize the memory + with respect to other threads that also want to use Libgcrypt. + For this, it is sufficient to call `gcry_check_version' before + creating the other threads using Libgcrypt(1). + + * Just like the function `gpg_strerror', the function + `gcry_strerror' is not thread safe. You have to use + `gpg_strerror_r' instead. + + + Libgcrypt contains convenient macros, which define the necessary +thread callbacks for PThread and for GNU Pth: + +`GCRY_THREAD_OPTION_PTH_IMPL' + This macro defines the following (static) symbols: + `gcry_pth_init', `gcry_pth_mutex_init', `gcry_pth_mutex_destroy', + `gcry_pth_mutex_lock', `gcry_pth_mutex_unlock', `gcry_pth_read', + `gcry_pth_write', `gcry_pth_select', `gcry_pth_waitpid', + `gcry_pth_accept', `gcry_pth_connect', `gcry_threads_pth'. + + After including this macro, `gcry_control()' shall be used with a + command of `GCRYCTL_SET_THREAD_CBS' in order to register the + thread callback structure named "gcry_threads_pth". + +`GCRY_THREAD_OPTION_PTHREAD_IMPL' + This macro defines the following (static) symbols: + `gcry_pthread_mutex_init', `gcry_pthread_mutex_destroy', + `gcry_pthread_mutex_lock', `gcry_pthread_mutex_unlock', + `gcry_threads_pthread'. + + After including this macro, `gcry_control()' shall be used with a + command of `GCRYCTL_SET_THREAD_CBS' in order to register the + thread callback structure named "gcry_threads_pthread". + + Note that these macros need to be terminated with a semicolon. Keep +in mind that these are convenient macros for C programmers; C++ +programmers might have to wrap these macros in an "extern C" body. + + ---------- Footnotes ---------- + + (1) At least this is true for POSIX threads, as `pthread_create' is +a function that synchronizes memory with respects to other threads. +There are many functions which have this property, a complete list can +be found in POSIX, IEEE Std 1003.1-2003, Base Definitions, Issue 6, in +the definition of the term "Memory Synchronization". For other thread +packages, more relaxed or more strict rules may apply. + + +File: gcrypt.info, Node: Enabling FIPS mode, Prev: Multi-Threading, Up: Preparation + +2.6 How to enable the FIPS mode +=============================== + +Libgcrypt may be used in a FIPS 140-2 mode. Note, that this does not +necessary mean that Libcgrypt is an appoved FIPS 140-2 module. Check +the NIST database at `http://csrc.nist.gov/groups/STM/cmvp/' to see what +versions of Libgcrypt are approved. + + Because FIPS 140 has certain restrictions on the use of cryptography +which are not always wanted, Libgcrypt needs to be put into FIPS mode +explicitly. Three alternative mechanisms are provided to switch +Libgcrypt into this mode: + + * If the file `/proc/sys/crypto/fips_enabled' exists and contains a + numeric value other than `0', Libgcrypt is put into FIPS mode at + initialization time. Obviously this works only on systems with a + `proc' file system (i.e. GNU/Linux). + + * If the file `/etc/gcrypt/fips_enabled' exists, Libgcrypt is put + into FIPS mode at initialization time. Note that this filename is + hardwired and does not depend on any configuration options. + + * If the application requests FIPS mode using the control command + `GCRYCTL_FORCE_FIPS_MODE'. This must be done prior to any + initialization (i.e. before `gcry_check_version'). + + + In addition to the standard FIPS mode, Libgcrypt may also be put into +an Enforced FIPS mode by writing a non-zero value into the file +`/etc/gcrypt/fips_enabled'. The Enforced FIPS mode helps to detect +applications which don't fulfill all requirements for using Libgcrypt +in FIPS mode (*note FIPS Mode::). + + Once Libgcrypt has been put into FIPS mode, it is not possible to +switch back to standard mode without terminating the process first. If +the logging verbosity level of Libgcrypt has been set to at least 2, +the state transitions and the self-tests are logged. + + +File: gcrypt.info, Node: Generalities, Next: Handler Functions, Prev: Preparation, Up: Top + +3 Generalities +************** + +* Menu: + +* Controlling the library:: Controlling Libgcrypt's behavior. +* Modules:: Description of extension modules. +* Error Handling:: Error codes and such. + + +File: gcrypt.info, Node: Controlling the library, Next: Modules, Up: Generalities + +3.1 Controlling the library +=========================== + + -- Function: gcry_error_t gcry_control (enum gcry_ctl_cmds CMD, ...) + This function can be used to influence the general behavior of + Libgcrypt in several ways. Depending on CMD, more arguments can + or have to be provided. + + `GCRYCTL_ENABLE_M_GUARD; Arguments: none' + This command enables the built-in memory guard. It must not + be used to activate the memory guard after the memory + management has already been used; therefore it can ONLY be + used at initialization time. Note that the memory guard is + NOT used when the user of the library has set his own memory + management callbacks. + + `GCRYCTL_ENABLE_QUICK_RANDOM; Arguments: none' + This command inhibits the use the very secure random quality + level (`GCRY_VERY_STRONG_RANDOM') and degrades all request + down to `GCRY_STRONG_RANDOM'. In general this is not + recommened. However, for some applications the extra quality + random Libgcrypt tries to create is not justified and this + option may help to get better performace. Please check with + a crypto expert whether this option can be used for your + application. + + This option can only be used at initialization time. + + `GCRYCTL_DUMP_RANDOM_STATS; Arguments: none' + This command dumps randum number generator related statistics + to the library's logging stream. + + `GCRYCTL_DUMP_MEMORY_STATS; Arguments: none' + This command dumps memory managment related statistics to the + library's logging stream. + + `GCRYCTL_DUMP_SECMEM_STATS; Arguments: none' + This command dumps secure memory manamgent related statistics + to the library's logging stream. + + `GCRYCTL_DROP_PRIVS; Arguments: none' + This command disables the use of secure memory and drops the + priviliges of the current process. This command has not much + use; the suggested way to disable secure memory is to use + `GCRYCTL_DISABLE_SECMEM' right after initialization. + + `GCRYCTL_DISABLE_SECMEM; Arguments: none' + This command disables the use of secure memory. If this + command is used in FIPS mode, FIPS mode will be disabled and + the function `gcry_fips_mode_active' returns false. However, + in Enforced FIPS mode this command has no effect at all. + + Many applications do not require secure memory, so they + should disable it right away. This command should be + executed right after `gcry_check_version'. + + `GCRYCTL_INIT_SECMEM; Arguments: int nbytes' + This command is used to allocate a pool of secure memory and + thus enabling the use of secure memory. It also drops all + extra privileges the process has (i.e. if it is run as setuid + (root)). If the argument NBYTES is 0, secure memory will be + disabled. The minimum amount of secure memory allocated is + currently 16384 bytes; you may thus use a value of 1 to + request that default size. + + `GCRYCTL_TERM_SECMEM; Arguments: none' + This command zeroises the secure memory and destroys the + handler. The secure memory pool may not be used anymore + after running this command. If the secure memory pool as + already been destroyed, this command has no effect. + Applications might want to run this command from their exit + handler to make sure that the secure memory gets properly + destroyed. This command is not necessarily thread-safe but + that should not be needed in cleanup code. It may be called + from a signal handler. + + `GCRYCTL_DISABLE_SECMEM_WARN; Arguments: none' + Disable warning messages about problems with the secure memory + subsystem. This command should be run right after + `gcry_check_version'. + + `GCRYCTL_SUSPEND_SECMEM_WARN; Arguments: none' + Postpone warning messages from the secure memory subsystem. + *Note the initialization example: sample-use-suspend-secmem, + on how to use it. + + `GCRYCTL_RESUME_SECMEM_WARN; Arguments: none' + Resume warning messages from the secure memory subsystem. + *Note the initialization example: sample-use-resume-secmem, + on how to use it. + + `GCRYCTL_USE_SECURE_RNDPOOL; Arguments: none' + This command tells the PRNG to store random numbers in secure + memory. This command should be run right after + `gcry_check_version' and not later than the command + GCRYCTL_INIT_SECMEM. Note that in FIPS mode the secure + memory is always used. + + `GCRYCTL_SET_RANDOM_SEED_FILE; Arguments: const char *filename' + This command specifies the file, which is to be used as seed + file for the PRNG. If the seed file is registered prior to + initialization of the PRNG, the seed file's content (if it + exists and seems to be valid) is fed into the PRNG pool. + After the seed file has been registered, the PRNG can be + signalled to write out the PRNG pool's content into the seed + file with the following command. + + `GCRYCTL_UPDATE_RANDOM_SEED_FILE; Arguments: none' + Write out the PRNG pool's content into the registered seed + file. + + Multiple instances of the applications sharing the same + random seed file can be started in parallel, in which case + they will read out the same pool and then race for updating + it (the last update overwrites earlier updates). They will + differentiate only by the weak entropy that is added in + read_seed_file based on the PID and clock, and up to 16 bytes + of weak random non-blockingly. The consequence is that the + output of these different instances is correlated to some + extent. In a perfect attack scenario, the attacker can + control (or at least guess) the PID and clock of the + application, and drain the system's entropy pool to reduce + the "up to 16 bytes" above to 0. Then the dependencies of the + inital states of the pools are completely known. Note that + this is not an issue if random of `GCRY_VERY_STRONG_RANDOM' + quality is requested as in this case enough extra entropy + gets mixed. It is also not an issue when using Linux + (rndlinux driver), because this one guarantees to read full + 16 bytes from /dev/urandom and thus there is no way for an + attacker without kernel access to control these 16 bytes. + + `GCRYCTL_SET_VERBOSITY; Arguments: int level' + This command sets the verbosity of the logging. A level of 0 + disables all extra logging whereas positive numbers enable + more verbose logging. The level may be changed at any time + but be aware that no memory synchronization is done so the + effect of this command might not immediately show up in other + threads. This command may even be used prior to + `gcry_check_version'. + + `GCRYCTL_SET_DEBUG_FLAGS; Arguments: unsigned int flags' + Set the debug flag bits as given by the argument. Be aware + that that no memory synchronization is done so the effect of + this command might not immediately show up in other threads. + The debug flags are not considered part of the API and thus + may change without notice. As of now bit 0 enables debugging + of cipher functions and bit 1 debugging of + multi-precision-integers. This command may even be used + prior to `gcry_check_version'. + + `GCRYCTL_CLEAR_DEBUG_FLAGS; Arguments: unsigned int flags' + Set the debug flag bits as given by the argument. Be aware + that that no memory synchronization is done so the effect of + this command might not immediately show up in other threads. + This command may even be used prior to `gcry_check_version'. + + `GCRYCTL_DISABLE_INTERNAL_LOCKING; Arguments: none' + This command does nothing. It exists only for backward + compatibility. + + `GCRYCTL_ANY_INITIALIZATION_P; Arguments: none' + This command returns true if the library has been basically + initialized. Such a basic initialization happens implicitly + with many commands to get certain internal subsystems + running. The common and suggested way to do this basic + intialization is by calling gcry_check_version. + + `GCRYCTL_INITIALIZATION_FINISHED; Arguments: none' + This command tells the libray that the application has + finished the intialization. + + `GCRYCTL_INITIALIZATION_FINISHED_P; Arguments: none' + This command returns true if the command + GCRYCTL_INITIALIZATION_FINISHED has already been run. + + `GCRYCTL_SET_THREAD_CBS; Arguments: struct ath_ops *ath_ops' + This command registers a thread-callback structure. *Note + Multi-Threading::. + + `GCRYCTL_FAST_POLL; Arguments: none' + Run a fast random poll. + + `GCRYCTL_SET_RNDEGD_SOCKET; Arguments: const char *filename' + This command may be used to override the default name of the + EGD socket to connect to. It may be used only during + initialization as it is not thread safe. Changing the socket + name again is not supported. The function may return an + error if the given filename is too long for a local socket + name. + + EGD is an alternative random gatherer, used only on systems + lacking a proper random device. + + `GCRYCTL_PRINT_CONFIG; Arguments: FILE *stream' + This command dumps information pertaining to the + configuration of the library to the given stream. If NULL is + given for STREAM, the log system is used. This command may + be used before the intialization has been finished but not + before a gcry_version_check. + + `GCRYCTL_OPERATIONAL_P; Arguments: none' + This command returns true if the library is in an operational + state. This information makes only sense in FIPS mode. In + contrast to other functions, this is a pure test function and + won't put the library into FIPS mode or change the internal + state. This command may be used before the intialization has + been finished but not before a gcry_version_check. + + `GCRYCTL_FIPS_MODE_P; Arguments: none' + This command returns true if the library is in FIPS mode. + Note, that this is no indication about the current state of + the library. This command may be used before the + intialization has been finished but not before a + gcry_version_check. An application may use this command or + the convenience macro below to check whether FIPS mode is + actually active. + + -- Function: int gcry_fips_mode_active (void) + Returns true if the FIPS mode is active. Note that this + is implemented as a macro. + + `GCRYCTL_FORCE_FIPS_MODE; Arguments: none' + Running this command puts the library into FIPS mode. If the + library is already in FIPS mode, a self-test is triggered and + thus the library will be put into operational state. This + command may be used before a call to gcry_check_version and + that is actually the recommended way to let an application + switch the library into FIPS mode. Note that Libgcrypt will + reject an attempt to switch to fips mode during or after the + intialization. + + `GCRYCTL_SELFTEST; Arguments: none' + This may be used at anytime to have the library run all + implemented self-tests. It works in standard and in FIPS + mode. Returns 0 on success or an error code on failure. + + + + +File: gcrypt.info, Node: Modules, Next: Error Handling, Prev: Controlling the library, Up: Generalities + +3.2 Modules +=========== + +Libgcrypt supports the use of `extension modules', which implement +algorithms in addition to those already built into the library directly. + + -- Data type: gcry_module_t + This data type represents a `module'. + + Functions registering modules provided by the user take a `module +specification structure' as input and return a value of `gcry_module_t' +and an ID that is unique in the modules' category. This ID can be used +to reference the newly registered module. After registering a module +successfully, the new functionality should be able to be used through +the normal functions provided by Libgcrypt until it is unregistered +again. + + +File: gcrypt.info, Node: Error Handling, Prev: Modules, Up: Generalities + +3.3 Error Handling +================== + +Many functions in Libgcrypt can return an error if they fail. For this +reason, the application should always catch the error condition and +take appropriate measures, for example by releasing the resources and +passing the error up to the caller, or by displaying a descriptive +message to the user and cancelling the operation. + + Some error values do not indicate a system error or an error in the +operation, but the result of an operation that failed properly. For +example, if you try to decrypt a tempered message, the decryption will +fail. Another error value actually means that the end of a data buffer +or list has been reached. The following descriptions explain for many +error codes what they mean usually. Some error values have specific +meanings if returned by a certain functions. Such cases are described +in the documentation of those functions. + + Libgcrypt uses the `libgpg-error' library. This allows to share the +error codes with other components of the GnuPG system, and to pass +error values transparently from the crypto engine, or some helper +application of the crypto engine, to the user. This way no information +is lost. As a consequence, Libgcrypt does not use its own identifiers +for error codes, but uses those provided by `libgpg-error'. They +usually start with `GPG_ERR_'. + + However, Libgcrypt does provide aliases for the functions defined in +libgpg-error, which might be preferred for name space consistency. + + Most functions in Libgcrypt return an error code in the case of +failure. For this reason, the application should always catch the +error condition and take appropriate measures, for example by releasing +the resources and passing the error up to the caller, or by displaying +a descriptive message to the user and canceling the operation. + + Some error values do not indicate a system error or an error in the +operation, but the result of an operation that failed properly. + + GnuPG components, including Libgcrypt, use an extra library named +libgpg-error to provide a common error handling scheme. For more +information on libgpg-error, see the according manual. + +* Menu: + +* Error Values:: The error value and what it means. +* Error Sources:: A list of important error sources. +* Error Codes:: A list of important error codes. +* Error Strings:: How to get a descriptive string from a value. + + +File: gcrypt.info, Node: Error Values, Next: Error Sources, Up: Error Handling + +3.3.1 Error Values +------------------ + + -- Data type: gcry_err_code_t + The `gcry_err_code_t' type is an alias for the `libgpg-error' type + `gpg_err_code_t'. The error code indicates the type of an error, + or the reason why an operation failed. + + A list of important error codes can be found in the next section. + + -- Data type: gcry_err_source_t + The `gcry_err_source_t' type is an alias for the `libgpg-error' + type `gpg_err_source_t'. The error source has not a precisely + defined meaning. Sometimes it is the place where the error + happened, sometimes it is the place where an error was encoded + into an error value. Usually the error source will give an + indication to where to look for the problem. This is not always + true, but it is attempted to achieve this goal. + + A list of important error sources can be found in the next section. + + -- Data type: gcry_error_t + The `gcry_error_t' type is an alias for the `libgpg-error' type + `gpg_error_t'. An error value like this has always two + components, an error code and an error source. Both together form + the error value. + + Thus, the error value can not be directly compared against an error + code, but the accessor functions described below must be used. + However, it is guaranteed that only 0 is used to indicate success + (`GPG_ERR_NO_ERROR'), and that in this case all other parts of the + error value are set to 0, too. + + Note that in Libgcrypt, the error source is used purely for + diagnostic purposes. Only the error code should be checked to test + for a certain outcome of a function. The manual only documents the + error code part of an error value. The error source is left + unspecified and might be anything. + + -- Function: gcry_err_code_t gcry_err_code (gcry_error_t ERR) + The static inline function `gcry_err_code' returns the + `gcry_err_code_t' component of the error value ERR. This function + must be used to extract the error code from an error value in + order to compare it with the `GPG_ERR_*' error code macros. + + -- Function: gcry_err_source_t gcry_err_source (gcry_error_t ERR) + The static inline function `gcry_err_source' returns the + `gcry_err_source_t' component of the error value ERR. This + function must be used to extract the error source from an error + value in order to compare it with the `GPG_ERR_SOURCE_*' error + source macros. + + -- Function: gcry_error_t gcry_err_make (gcry_err_source_t SOURCE, + gcry_err_code_t CODE) + The static inline function `gcry_err_make' returns the error value + consisting of the error source SOURCE and the error code CODE. + + This function can be used in callback functions to construct an + error value to return it to the library. + + -- Function: gcry_error_t gcry_error (gcry_err_code_t CODE) + The static inline function `gcry_error' returns the error value + consisting of the default error source and the error code CODE. + + For GCRY applications, the default error source is + `GPG_ERR_SOURCE_USER_1'. You can define `GCRY_ERR_SOURCE_DEFAULT' + before including `gcrypt.h' to change this default. + + This function can be used in callback functions to construct an + error value to return it to the library. + + The `libgpg-error' library provides error codes for all system error +numbers it knows about. If ERR is an unknown error number, the error +code `GPG_ERR_UNKNOWN_ERRNO' is used. The following functions can be +used to construct error values from system errno numbers. + + -- Function: gcry_error_t gcry_err_make_from_errno + (gcry_err_source_t SOURCE, int ERR) + The function `gcry_err_make_from_errno' is like `gcry_err_make', + but it takes a system error like `errno' instead of a + `gcry_err_code_t' error code. + + -- Function: gcry_error_t gcry_error_from_errno (int ERR) + The function `gcry_error_from_errno' is like `gcry_error', but it + takes a system error like `errno' instead of a `gcry_err_code_t' + error code. + + Sometimes you might want to map system error numbers to error codes +directly, or map an error code representing a system error back to the +system error number. The following functions can be used to do that. + + -- Function: gcry_err_code_t gcry_err_code_from_errno (int ERR) + The function `gcry_err_code_from_errno' returns the error code for + the system error ERR. If ERR is not a known system error, the + function returns `GPG_ERR_UNKNOWN_ERRNO'. + + -- Function: int gcry_err_code_to_errno (gcry_err_code_t ERR) + The function `gcry_err_code_to_errno' returns the system error for + the error code ERR. If ERR is not an error code representing a + system error, or if this system error is not defined on this + system, the function returns `0'. + + +File: gcrypt.info, Node: Error Sources, Next: Error Codes, Prev: Error Values, Up: Error Handling + +3.3.2 Error Sources +------------------- + +The library `libgpg-error' defines an error source for every component +of the GnuPG system. The error source part of an error value is not +well defined. As such it is mainly useful to improve the diagnostic +error message for the user. + + If the error code part of an error value is `0', the whole error +value will be `0'. In this case the error source part is of course +`GPG_ERR_SOURCE_UNKNOWN'. + + The list of error sources that might occur in applications using +Libgcrypt is: + +`GPG_ERR_SOURCE_UNKNOWN' + The error source is not known. The value of this error source is + `0'. + +`GPG_ERR_SOURCE_GPGME' + The error source is GPGME itself. + +`GPG_ERR_SOURCE_GPG' + The error source is GnuPG, which is the crypto engine used for the + OpenPGP protocol. + +`GPG_ERR_SOURCE_GPGSM' + The error source is GPGSM, which is the crypto engine used for the + OpenPGP protocol. + +`GPG_ERR_SOURCE_GCRYPT' + The error source is `libgcrypt', which is used by crypto engines + to perform cryptographic operations. + +`GPG_ERR_SOURCE_GPGAGENT' + The error source is `gpg-agent', which is used by crypto engines + to perform operations with the secret key. + +`GPG_ERR_SOURCE_PINENTRY' + The error source is `pinentry', which is used by `gpg-agent' to + query the passphrase to unlock a secret key. + +`GPG_ERR_SOURCE_SCD' + The error source is the SmartCard Daemon, which is used by + `gpg-agent' to delegate operations with the secret key to a + SmartCard. + +`GPG_ERR_SOURCE_KEYBOX' + The error source is `libkbx', a library used by the crypto engines + to manage local keyrings. + +`GPG_ERR_SOURCE_USER_1' + +`GPG_ERR_SOURCE_USER_2' + +`GPG_ERR_SOURCE_USER_3' + +`GPG_ERR_SOURCE_USER_4' + These error sources are not used by any GnuPG component and can be + used by other software. For example, applications using Libgcrypt + can use them to mark error values coming from callback handlers. + Thus `GPG_ERR_SOURCE_USER_1' is the default for errors created + with `gcry_error' and `gcry_error_from_errno', unless you define + `GCRY_ERR_SOURCE_DEFAULT' before including `gcrypt.h'. + + +File: gcrypt.info, Node: Error Codes, Next: Error Strings, Prev: Error Sources, Up: Error Handling + +3.3.3 Error Codes +----------------- + +The library `libgpg-error' defines many error values. The following +list includes the most important error codes. + +`GPG_ERR_EOF' + This value indicates the end of a list, buffer or file. + +`GPG_ERR_NO_ERROR' + This value indicates success. The value of this error code is + `0'. Also, it is guaranteed that an error value made from the + error code `0' will be `0' itself (as a whole). This means that + the error source information is lost for this error code, however, + as this error code indicates that no error occurred, this is + generally not a problem. + +`GPG_ERR_GENERAL' + This value means that something went wrong, but either there is not + enough information about the problem to return a more useful error + value, or there is no separate error value for this type of + problem. + +`GPG_ERR_ENOMEM' + This value means that an out-of-memory condition occurred. + +`GPG_ERR_E...' + System errors are mapped to GPG_ERR_EFOO where FOO is the symbol + for the system error. + +`GPG_ERR_INV_VALUE' + This value means that some user provided data was out of range. + +`GPG_ERR_UNUSABLE_PUBKEY' + This value means that some recipients for a message were invalid. + +`GPG_ERR_UNUSABLE_SECKEY' + This value means that some signers were invalid. + +`GPG_ERR_NO_DATA' + This value means that data was expected where no data was found. + +`GPG_ERR_CONFLICT' + This value means that a conflict of some sort occurred. + +`GPG_ERR_NOT_IMPLEMENTED' + This value indicates that the specific function (or operation) is + not implemented. This error should never happen. It can only + occur if you use certain values or configuration options which do + not work, but for which we think that they should work at some + later time. + +`GPG_ERR_DECRYPT_FAILED' + This value indicates that a decryption operation was unsuccessful. + +`GPG_ERR_WRONG_KEY_USAGE' + This value indicates that a key is not used appropriately. + +`GPG_ERR_NO_SECKEY' + This value indicates that no secret key for the user ID is + available. + +`GPG_ERR_UNSUPPORTED_ALGORITHM' + This value means a verification failed because the cryptographic + algorithm is not supported by the crypto backend. + +`GPG_ERR_BAD_SIGNATURE' + This value means a verification failed because the signature is + bad. + +`GPG_ERR_NO_PUBKEY' + This value means a verification failed because the public key is + not available. + +`GPG_ERR_NOT_OPERATIONAL' + This value means that the library is not yet in state which allows + to use this function. This error code is in particular returned if + Libgcrypt is operated in FIPS mode and the internal state of the + library does not yet or not anymore allow the use of a service. + + This error code is only available with newer libgpg-error + versions, thus you might see "invalid error code" when passing + this to `gpg_strerror'. The numeric value of this error code is + 176. + +`GPG_ERR_USER_1' + +`GPG_ERR_USER_2' + +`...' + +`GPG_ERR_USER_16' + These error codes are not used by any GnuPG component and can be + freely used by other software. Applications using Libgcrypt might + use them to mark specific errors returned by callback handlers if + no suitable error codes (including the system errors) for these + errors exist already. + + +File: gcrypt.info, Node: Error Strings, Prev: Error Codes, Up: Error Handling + +3.3.4 Error Strings +------------------- + + -- Function: const char * gcry_strerror (gcry_error_t ERR) + The function `gcry_strerror' returns a pointer to a statically + allocated string containing a description of the error code + contained in the error value ERR. This string can be used to + output a diagnostic message to the user. + + -- Function: const char * gcry_strsource (gcry_error_t ERR) + The function `gcry_strerror' returns a pointer to a statically + allocated string containing a description of the error source + contained in the error value ERR. This string can be used to + output a diagnostic message to the user. + + The following example illustrates the use of the functions described +above: + + { + gcry_cipher_hd_t handle; + gcry_error_t err = 0; + + err = gcry_cipher_open (&handle, GCRY_CIPHER_AES, + GCRY_CIPHER_MODE_CBC, 0); + if (err) + { + fprintf (stderr, "Failure: %s/%s\n", + gcry_strsource (err), + gcry_strerror (err)); + } + } + + +File: gcrypt.info, Node: Handler Functions, Next: Symmetric cryptography, Prev: Generalities, Up: Top + +4 Handler Functions +******************* + +Libgcrypt makes it possible to install so called `handler functions', +which get called by Libgcrypt in case of certain events. + +* Menu: + +* Progress handler:: Using a progress handler function. +* Allocation handler:: Using special memory allocation functions. +* Error handler:: Using error handler functions. +* Logging handler:: Using a special logging function. + + +File: gcrypt.info, Node: Progress handler, Next: Allocation handler, Up: Handler Functions + +4.1 Progress handler +==================== + +It is often useful to retrieve some feedback while long running +operations are performed. + + -- Data type: gcry_handler_progress_t + Progress handler functions have to be of the type + `gcry_handler_progress_t', which is defined as: + + `void (*gcry_handler_progress_t) (void *, const char *, int, int, + int)' + + The following function may be used to register a handler function for +this purpose. + + -- Function: void gcry_set_progress_handler (gcry_handler_progress_t + CB, void *CB_DATA) + This function installs CB as the `Progress handler' function. It + may be used only during initialization. CB must be defined as + follows: + + void + my_progress_handler (void *CB_DATA, const char *WHAT, + int PRINTCHAR, int CURRENT, int TOTAL) + { + /* Do something. */ + } + + A description of the arguments of the progress handler function + follows. + + CB_DATA + The argument provided in the call to + `gcry_set_progress_handler'. + + WHAT + A string identifying the type of the progress output. The + following values for WHAT are defined: + + `need_entropy' + Not enough entropy is available. TOTAL holds the number + of required bytes. + + `primegen' + Values for PRINTCHAR: + `\n' + Prime generated. + + `!' + Need to refresh the pool of prime numbers. + + `<, >' + Number of bits adjusted. + + `^' + Searching for a generator. + + `.' + Fermat test on 10 candidates failed. + + `:' + Restart with a new random value. + + `+' + Rabin Miller test passed. + + + + +File: gcrypt.info, Node: Allocation handler, Next: Error handler, Prev: Progress handler, Up: Handler Functions + +4.2 Allocation handler +====================== + +It is possible to make Libgcrypt use special memory allocation +functions instead of the built-in ones. + + Memory allocation functions are of the following types: + + -- Data type: gcry_handler_alloc_t + This type is defined as: `void *(*gcry_handler_alloc_t) (size_t + n)'. + + -- Data type: gcry_handler_secure_check_t + This type is defined as: `int *(*gcry_handler_secure_check_t) + (const void *)'. + + -- Data type: gcry_handler_realloc_t + This type is defined as: `void *(*gcry_handler_realloc_t) (void + *p, size_t n)'. + + -- Data type: gcry_handler_free_t + This type is defined as: `void *(*gcry_handler_free_t) (void *)'. + + Special memory allocation functions can be installed with the +following function: + + -- Function: void gcry_set_allocation_handler (gcry_handler_alloc_t + FUNC_ALLOC, gcry_handler_alloc_t FUNC_ALLOC_SECURE, + gcry_handler_secure_check_t FUNC_SECURE_CHECK, + gcry_handler_realloc_t FUNC_REALLOC, gcry_handler_free_t + FUNC_FREE) + Install the provided functions and use them instead of the built-in + functions for doing memory allocation. Using this function is in + general not recommended because the standard Libgcrypt allocation + functions are guaranteed to zeroize memory if needed. + + This function may be used only during initialization and may not be + used in fips mode. + + + +File: gcrypt.info, Node: Error handler, Next: Logging handler, Prev: Allocation handler, Up: Handler Functions + +4.3 Error handler +================= + +The following functions may be used to register handler functions that +are called by Libgcrypt in case certain error conditions occur. They +may and should be registered prior to calling `gcry_check_version'. + + -- Data type: gcry_handler_no_mem_t + This type is defined as: `int (*gcry_handler_no_mem_t) (void *, + size_t, unsigned int)' + + -- Function: void gcry_set_outofcore_handler (gcry_handler_no_mem_t + FUNC_NO_MEM, void *CB_DATA) + This function registers FUNC_NO_MEM as `out-of-core handler', + which means that it will be called in the case of not having enough + memory available. The handler is called with 3 arguments: The + first one is the pointer CB_DATA as set with this function, the + second is the requested memory size and the last being a flag. If + bit 0 of the flag is set, secure memory has been requested. The + handler should either return true to indicate that Libgcrypt + should try again allocating memory or return false to let + Libgcrypt use its default fatal error handler. + + -- Data type: gcry_handler_error_t + This type is defined as: `void (*gcry_handler_error_t) (void *, + int, const char *)' + + -- Function: void gcry_set_fatalerror_handler (gcry_handler_error_t + FUNC_ERROR, void *CB_DATA) + This function registers FUNC_ERROR as `error handler', which means + that it will be called in error conditions. + + +File: gcrypt.info, Node: Logging handler, Prev: Error handler, Up: Handler Functions + +4.4 Logging handler +=================== + + -- Data type: gcry_handler_log_t + This type is defined as: `void (*gcry_handler_log_t) (void *, int, + const char *, va_list)' + + -- Function: void gcry_set_log_handler (gcry_handler_log_t FUNC_LOG, + void *CB_DATA) + This function registers FUNC_LOG as `logging handler', which means + that it will be called in case Libgcrypt wants to log a message. + This function may and should be used prior to calling + `gcry_check_version'. + + +File: gcrypt.info, Node: Symmetric cryptography, Next: Public Key cryptography, Prev: Handler Functions, Up: Top + +5 Symmetric cryptography +************************ + +The cipher functions are used for symmetrical cryptography, i.e. +cryptography using a shared key. The programming model follows an +open/process/close paradigm and is in that similar to other building +blocks provided by Libgcrypt. + +* Menu: + +* Available ciphers:: List of ciphers supported by the library. +* Cipher modules:: How to work with cipher modules. +* Available cipher modes:: List of cipher modes supported by the library. +* Working with cipher handles:: How to perform operations related to cipher handles. +* General cipher functions:: General cipher functions independent of cipher handles. + + +File: gcrypt.info, Node: Available ciphers, Next: Cipher modules, Up: Symmetric cryptography + +5.1 Available ciphers +===================== + +`GCRY_CIPHER_NONE' + This is not a real algorithm but used by some functions as error + return. The value always evaluates to false. + +`GCRY_CIPHER_IDEA' + This is the IDEA algorithm. The constant is provided but there is + currently no implementation for it because the algorithm is + patented. + +`GCRY_CIPHER_3DES' + Triple-DES with 3 Keys as EDE. The key size of this algorithm is + 168 but you have to pass 192 bits because the most significant + bits of each byte are ignored. + +`GCRY_CIPHER_CAST5' + CAST128-5 block cipher algorithm. The key size is 128 bits. + +`GCRY_CIPHER_BLOWFISH' + The blowfish algorithm. The current implementation allows only for + a key size of 128 bits. + +`GCRY_CIPHER_SAFER_SK128' + Reserved and not currently implemented. + +`GCRY_CIPHER_DES_SK' + Reserved and not currently implemented. + +`GCRY_CIPHER_AES' +`GCRY_CIPHER_AES128' +`GCRY_CIPHER_RIJNDAEL' +`GCRY_CIPHER_RIJNDAEL128' + AES (Rijndael) with a 128 bit key. + +`GCRY_CIPHER_AES192' +`GCRY_CIPHER_RIJNDAEL192' + AES (Rijndael) with a 192 bit key. + +`GCRY_CIPHER_AES256' +`GCRY_CIPHER_RIJNDAEL256' + AES (Rijndael) with a 256 bit key. + +`GCRY_CIPHER_TWOFISH' + The Twofish algorithm with a 256 bit key. + +`GCRY_CIPHER_TWOFISH128' + The Twofish algorithm with a 128 bit key. + +`GCRY_CIPHER_ARCFOUR' + An algorithm which is 100% compatible with RSA Inc.'s RC4 + algorithm. Note that this is a stream cipher and must be used + very carefully to avoid a couple of weaknesses. + +`GCRY_CIPHER_DES' + Standard DES with a 56 bit key. You need to pass 64 bit but the + high bits of each byte are ignored. Note, that this is a weak + algorithm which can be broken in reasonable time using a brute + force approach. + +`GCRY_CIPHER_SERPENT128' +`GCRY_CIPHER_SERPENT192' +`GCRY_CIPHER_SERPENT256' + The Serpent cipher from the AES contest. + +`GCRY_CIPHER_RFC2268_40' +`GCRY_CIPHER_RFC2268_128' + Ron's Cipher 2 in the 40 and 128 bit variants. Note, that we + currently only support the 40 bit variant. The identifier for 128 + is reserved for future use. + +`GCRY_CIPHER_SEED' + A 128 bit cipher as described by RFC4269. + +`GCRY_CIPHER_CAMELLIA128' +`GCRY_CIPHER_CAMELLIA192' +`GCRY_CIPHER_CAMELLIA256' + The Camellia cipher by NTT. See + `http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html'. + + + +File: gcrypt.info, Node: Cipher modules, Next: Available cipher modes, Prev: Available ciphers, Up: Symmetric cryptography + +5.2 Cipher modules +================== + +Libgcrypt makes it possible to load additional `cipher modules'; these +ciphers can be used just like the cipher algorithms that are built into +the library directly. For an introduction into extension modules, see +*Note Modules::. + + -- Data type: gcry_cipher_spec_t + This is the `module specification structure' needed for registering + cipher modules, which has to be filled in by the user before it + can be used to register a module. It contains the following + members: + + `const char *name' + The primary name of the algorithm. + + `const char **aliases' + A list of strings that are `aliases' for the algorithm. The + list must be terminated with a NULL element. + + `gcry_cipher_oid_spec_t *oids' + A list of OIDs that are to be associated with the algorithm. + The list's last element must have it's `oid' member set to + NULL. See below for an explanation of this type. + + `size_t blocksize' + The block size of the algorithm, in bytes. + + `size_t keylen' + The length of the key, in bits. + + `size_t contextsize' + The size of the algorithm-specific `context', that should be + allocated for each handle. + + `gcry_cipher_setkey_t setkey' + The function responsible for initializing a handle with a + provided key. See below for a description of this type. + + `gcry_cipher_encrypt_t encrypt' + The function responsible for encrypting a single block. See + below for a description of this type. + + `gcry_cipher_decrypt_t decrypt' + The function responsible for decrypting a single block. See + below for a description of this type. + + `gcry_cipher_stencrypt_t stencrypt' + Like `encrypt', for stream ciphers. See below for a + description of this type. + + `gcry_cipher_stdecrypt_t stdecrypt' + Like `decrypt', for stream ciphers. See below for a + description of this type. + + -- Data type: gcry_cipher_oid_spec_t + This type is used for associating a user-provided algorithm + implementation with certain OIDs. It contains the following + members: + `const char *oid' + Textual representation of the OID. + + `int mode' + Cipher mode for which this OID is valid. + + -- Data type: gcry_cipher_setkey_t + Type for the `setkey' function, defined as: gcry_err_code_t + (*gcry_cipher_setkey_t) (void *c, const unsigned char *key, + unsigned keylen) + + -- Data type: gcry_cipher_encrypt_t + Type for the `encrypt' function, defined as: gcry_err_code_t + (*gcry_cipher_encrypt_t) (void *c, const unsigned char *outbuf, + const unsigned char *inbuf) + + -- Data type: gcry_cipher_decrypt_t + Type for the `decrypt' function, defined as: gcry_err_code_t + (*gcry_cipher_decrypt_t) (void *c, const unsigned char *outbuf, + const unsigned char *inbuf) + + -- Data type: gcry_cipher_stencrypt_t + Type for the `stencrypt' function, defined as: gcry_err_code_t + (*gcry_cipher_stencrypt_t) (void *c, const unsigned char *outbuf, + const unsigned char *, unsigned int n) + + -- Data type: gcry_cipher_stdecrypt_t + Type for the `stdecrypt' function, defined as: gcry_err_code_t + (*gcry_cipher_stdecrypt_t) (void *c, const unsigned char *outbuf, + const unsigned char *, unsigned int n) + + -- Function: gcry_error_t gcry_cipher_register (gcry_cipher_spec_t + *CIPHER, unsigned int *algorithm_id, gcry_module_t *MODULE) + Register a new cipher module whose specification can be found in + CIPHER. On success, a new algorithm ID is stored in ALGORITHM_ID + and a pointer representing this module is stored in MODULE. + + -- Function: void gcry_cipher_unregister (gcry_module_t MODULE) + Unregister the cipher identified by MODULE, which must have been + registered with gcry_cipher_register. + + -- Function: gcry_error_t gcry_cipher_list (int *LIST, int + *LIST_LENGTH) + Get a list consisting of the IDs of the loaded cipher modules. If + LIST is zero, write the number of loaded cipher modules to + LIST_LENGTH and return. If LIST is non-zero, the first + *LIST_LENGTH algorithm IDs are stored in LIST, which must be of + according size. In case there are less cipher modules than + *LIST_LENGTH, *LIST_LENGTH is updated to the correct number. + + +File: gcrypt.info, Node: Available cipher modes, Next: Working with cipher handles, Prev: Cipher modules, Up: Symmetric cryptography + +5.3 Available cipher modes +========================== + +`GCRY_CIPHER_MODE_NONE' + No mode specified. This should not be used. The only exception + is that if Libgcrypt is not used in FIPS mode and if any debug + flag has been set, this mode may be used to bypass the actual + encryption. + +`GCRY_CIPHER_MODE_ECB' + Electronic Codebook mode. + +`GCRY_CIPHER_MODE_CFB' + Cipher Feedback mode. The shift size equals the block size of the + cipher (e.g. for AES it is CFB-128). + +`GCRY_CIPHER_MODE_CBC' + Cipher Block Chaining mode. + +`GCRY_CIPHER_MODE_STREAM' + Stream mode, only to be used with stream cipher algorithms. + +`GCRY_CIPHER_MODE_OFB' + Output Feedback mode. + +`GCRY_CIPHER_MODE_CTR' + Counter mode. + + + +File: gcrypt.info, Node: Working with cipher handles, Next: General cipher functions, Prev: Available cipher modes, Up: Symmetric cryptography + +5.4 Working with cipher handles +=============================== + +To use a cipher algorithm, you must first allocate an according handle. +This is to be done using the open function: + + -- Function: gcry_error_t gcry_cipher_open (gcry_cipher_hd_t *HD, int + ALGO, int MODE, unsigned int FLAGS) + This function creates the context handle required for most of the + other cipher functions and returns a handle to it in `hd'. In + case of an error, an according error code is returned. + + The ID of algorithm to use must be specified via ALGO. See *Note + Available ciphers::, for a list of supported ciphers and the + according constants. + + Besides using the constants directly, the function + `gcry_cipher_map_name' may be used to convert the textual name of + an algorithm into the according numeric ID. + + The cipher mode to use must be specified via MODE. See *Note + Available cipher modes::, for a list of supported cipher modes and + the according constants. Note that some modes are incompatible + with some algorithms - in particular, stream mode + (`GCRY_CIPHER_MODE_STREAM') only works with stream ciphers. Any + block cipher mode (`GCRY_CIPHER_MODE_ECB', `GCRY_CIPHER_MODE_CBC', + `GCRY_CIPHER_MODE_CFB', `GCRY_CIPHER_MODE_OFB' or + `GCRY_CIPHER_MODE_CTR') will work with any block cipher algorithm. + + The third argument FLAGS can either be passed as `0' or as the + bit-wise OR of the following constants. + + `GCRY_CIPHER_SECURE' + Make sure that all operations are allocated in secure memory. + This is useful when the key material is highly confidential. + + `GCRY_CIPHER_ENABLE_SYNC' + This flag enables the CFB sync mode, which is a special + feature of Libgcrypt's CFB mode implementation to allow for + OpenPGP's CFB variant. See `gcry_cipher_sync'. + + `GCRY_CIPHER_CBC_CTS' + Enable cipher text stealing (CTS) for the CBC mode. Cannot + be used simultaneous as GCRY_CIPHER_CBC_MAC. CTS mode makes + it possible to transform data of almost arbitrary size (only + limitation is that it must be greater than the algorithm's + block size). + + `GCRY_CIPHER_CBC_MAC' + Compute CBC-MAC keyed checksums. This is the same as CBC + mode, but only output the last block. Cannot be used + simultaneous as GCRY_CIPHER_CBC_CTS. + + Use the following function to release an existing handle: + + -- Function: void gcry_cipher_close (gcry_cipher_hd_t H) + This function releases the context created by `gcry_cipher_open'. + It also zeroises all sensitive information associated with this + cipher handle. + + In order to use a handle for performing cryptographic operations, a +`key' has to be set first: + + -- Function: gcry_error_t gcry_cipher_setkey (gcry_cipher_hd_t H, + const void *K, size_t L) + Set the key K used for encryption or decryption in the context + denoted by the handle H. The length L (in bytes) of the key K + must match the required length of the algorithm set for this + context or be in the allowed range for algorithms with variable + key size. The function checks this and returns an error if there + is a problem. A caller should always check for an error. + + + Most crypto modes requires an initialization vector (IV), which +usually is a non-secret random string acting as a kind of salt value. +The CTR mode requires a counter, which is also similar to a salt value. +To set the IV or CTR, use these functions: + + -- Function: gcry_error_t gcry_cipher_setiv (gcry_cipher_hd_t H, const + void *K, size_t L) + Set the initialization vector used for encryption or decryption. + The vector is passed as the buffer K of length L bytes and copied + to internal data structures. The function checks that the IV + matches the requirement of the selected algorithm and mode. + + -- Function: gcry_error_t gcry_cipher_setctr (gcry_cipher_hd_t H, + const void *C, size_t L) + Set the counter vector used for encryption or decryption. The + counter is passed as the buffer C of length L bytes and copied to + internal data structures. The function checks that the counter + matches the requirement of the selected algorithm (i.e., it must be + the same size as the block size). + + -- Function: gcry_error_t gcry_cipher_reset (gcry_cipher_hd_t H) + Set the given handle's context back to the state it had after the + last call to gcry_cipher_setkey and clear the initialization + vector. + + Note that gcry_cipher_reset is implemented as a macro. + + The actual encryption and decryption is done by using one of the +following functions. They may be used as often as required to process +all the data. + + -- Function: gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t H, + unsigned char *out, size_t OUTSIZE, const unsigned char *IN, + size_t INLEN) + `gcry_cipher_encrypt' is used to encrypt the data. This function + can either work in place or with two buffers. It uses the cipher + context already setup and described by the handle H. There are 2 + ways to use the function: If IN is passed as `NULL' and INLEN is + `0', in-place encryption of the data in OUT or length OUTSIZE + takes place. With IN being not `NULL', INLEN bytes are encrypted + to the buffer OUT which must have at least a size of INLEN. + OUTSIZE must be set to the allocated size of OUT, so that the + function can check that there is sufficient space. Note that + overlapping buffers are not allowed. + + Depending on the selected algorithms and encryption mode, the + length of the buffers must be a multiple of the block size. + + The function returns `0' on success or an error code. + + -- Function: gcry_error_t gcry_cipher_decrypt (gcry_cipher_hd_t H, + unsigned char *out, size_t OUTSIZE, const unsigned char *IN, + size_t INLEN) + `gcry_cipher_decrypt' is used to decrypt the data. This function + can either work in place or with two buffers. It uses the cipher + context already setup and described by the handle H. There are 2 + ways to use the function: If IN is passed as `NULL' and INLEN is + `0', in-place decryption of the data in OUT or length OUTSIZE + takes place. With IN being not `NULL', INLEN bytes are decrypted + to the buffer OUT which must have at least a size of INLEN. + OUTSIZE must be set to the allocated size of OUT, so that the + function can check that there is sufficient space. Note that + overlapping buffers are not allowed. + + Depending on the selected algorithms and encryption mode, the + length of the buffers must be a multiple of the block size. + + The function returns `0' on success or an error code. + + OpenPGP (as defined in RFC-2440) requires a special sync operation in +some places. The following function is used for this: + + -- Function: gcry_error_t gcry_cipher_sync (gcry_cipher_hd_t H) + Perform the OpenPGP sync operation on context H. Note that this + is a no-op unless the context was created with the flag + `GCRY_CIPHER_ENABLE_SYNC' + + Some of the described functions are implemented as macros utilizing a +catch-all control function. This control function is rarely used +directly but there is nothing which would inhibit it: + + -- Function: gcry_error_t gcry_cipher_ctl (gcry_cipher_hd_t H, int + CMD, void *BUFFER, size_t BUFLEN) + `gcry_cipher_ctl' controls various aspects of the cipher module and + specific cipher contexts. Usually some more specialized functions + or macros are used for this purpose. The semantics of the + function and its parameters depends on the the command CMD and the + passed context handle H. Please see the comments in the source + code (`src/global.c') for details. + + -- Function: gcry_error_t gcry_cipher_info (gcry_cipher_hd_t H, int + WHAT, void *BUFFER, size_t *NBYTES) + `gcry_cipher_info' is used to retrieve various information about a + cipher context or the cipher module in general. + + Currently no information is available. + + +File: gcrypt.info, Node: General cipher functions, Prev: Working with cipher handles, Up: Symmetric cryptography + +5.5 General cipher functions +============================ + +To work with the algorithms, several functions are available to map +algorithm names to the internal identifiers, as well as ways to +retrieve information about an algorithm or the current cipher context. + + -- Function: gcry_error_t gcry_cipher_algo_info (int ALGO, int WHAT, + void *BUFFER, size_t *NBYTES) + This function is used to retrieve information on a specific + algorithm. You pass the cipher algorithm ID as ALGO and the type + of information requested as WHAT. The result is either returned as + the return code of the function or copied to the provided BUFFER + whose allocated length must be available in an integer variable + with the address passed in NBYTES. This variable will also + receive the actual used length of the buffer. + + Here is a list of supported codes for WHAT: + + `GCRYCTL_GET_KEYLEN:' + Return the length of the key. If the algorithm supports + multiple key lengths, the maximum supported value is + returned. The length is returned as number of octets (bytes) + and not as number of bits in NBYTES; BUFFER must be zero. + + `GCRYCTL_GET_BLKLEN:' + Return the block length of the algorithm. The length is + returned as a number of octets in NBYTES; BUFFER must be zero. + + `GCRYCTL_TEST_ALGO:' + Returns `0' when the specified algorithm is available for use. + BUFFER and NBYTES must be zero. + + + + -- Function: const char * gcry_cipher_algo_name (int ALGO) + `gcry_cipher_algo_name' returns a string with the name of the + cipher algorithm ALGO. If the algorithm is not known or another + error occurred, the string `"?"' is returned. This function should + not be used to test for the availability of an algorithm. + + -- Function: int gcry_cipher_map_name (const char *NAME) + `gcry_cipher_map_name' returns the algorithm identifier for the + cipher algorithm described by the string NAME. If this algorithm + is not available `0' is returned. + + -- Function: int gcry_cipher_mode_from_oid (const char *STRING) + Return the cipher mode associated with an ASN.1 object identifier. + The object identifier is expected to be in the IETF-style dotted + decimal notation. The function returns `0' for an unknown object + identifier or when no mode is associated with it. + + +File: gcrypt.info, Node: Public Key cryptography, Next: Hashing, Prev: Symmetric cryptography, Up: Top + +6 Public Key cryptography +************************* + +Public key cryptography, also known as asymmetric cryptography, is an +easy way for key management and to provide digital signatures. +Libgcrypt provides two completely different interfaces to public key +cryptography, this chapter explains the one based on S-expressions. + +* Menu: + +* Available algorithms:: Algorithms supported by the library. +* Used S-expressions:: Introduction into the used S-expression. +* Public key modules:: How to work with public key modules. +* Cryptographic Functions:: Functions for performing the cryptographic actions. +* General public-key related Functions:: General functions, not implementing any cryptography. + +* AC Interface:: Alternative interface to public key functions. + + +File: gcrypt.info, Node: Available algorithms, Next: Used S-expressions, Up: Public Key cryptography + +6.1 Available algorithms +======================== + +Libgcrypt supports the RSA (Rivest-Shamir-Adleman) algorithms as well +as DSA (Digital Signature Algorithm) and Elgamal. The versatile +interface allows to add more algorithms in the future. + + +File: gcrypt.info, Node: Used S-expressions, Next: Public key modules, Prev: Available algorithms, Up: Public Key cryptography + +6.2 Used S-expressions +====================== + +Libgcrypt's API for asymmetric cryptography is based on data structures +called S-expressions (see +`http://people.csail.mit.edu/rivest/sexp.html') and does not work with +contexts as most of the other building blocks of Libgcrypt do. + +The following information are stored in S-expressions: + + keys + + plain text data + + encrypted data + + signatures + + +To describe how Libgcrypt expect keys, we use examples. Note that words +in uppercase indicate parameters whereas lowercase words are literals. + + Note that all MPI (multi-precision-integers) values are expected to +be in `GCRYMPI_FMT_USG' format. An easy way to create S-expressions is +by using `gcry_sexp_build' which allows to pass a string with +printf-like escapes to insert MPI values. + +* Menu: + +* RSA key parameters:: Parameters used with an RSA key. +* DSA key parameters:: Parameters used with a DSA key. +* ECC key parameters:: Parameters used with ECC keys. + + +File: gcrypt.info, Node: RSA key parameters, Next: DSA key parameters, Up: Used S-expressions + +6.2.1 RSA key parameters +------------------------ + +An RSA private key is described by this S-expression: + + (private-key + (rsa + (n N-MPI) + (e E-MPI) + (d D-MPI) + (p P-MPI) + (q Q-MPI) + (u U-MPI))) + +An RSA public key is described by this S-expression: + + (public-key + (rsa + (n N-MPI) + (e E-MPI))) + +N-MPI + RSA public modulus n. + +E-MPI + RSA public exponent e. + +D-MPI + RSA secret exponent d = e^-1 \bmod (p-1)(q-1). + +P-MPI + RSA secret prime p. + +Q-MPI + RSA secret prime q with p < q. + +U-MPI + Multiplicative inverse u = p^-1 \bmod q. + + For signing and decryption the parameters (p, q, u) are optional but +greatly improve the performance. Either all of these optional +parameters must be given or none of them. They are mandatory for +gcry_pk_testkey. + + Note that OpenSSL uses slighly different parameters: q < p and u = +q^-1 \bmod p. To use these parameters you will need to swap the values +and recompute u. Here is example code to do this: + + if (gcry_mpi_cmp (p, q) > 0) + { + gcry_mpi_swap (p, q); + gcry_mpi_invm (u, p, q); + } + + +File: gcrypt.info, Node: DSA key parameters, Next: ECC key parameters, Prev: RSA key parameters, Up: Used S-expressions + +6.2.2 DSA key parameters +------------------------ + +A DSA private key is described by this S-expression: + + (private-key + (dsa + (p P-MPI) + (q Q-MPI) + (g G-MPI) + (y Y-MPI) + (x X-MPI))) + +P-MPI + DSA prime p. + +Q-MPI + DSA group order q (which is a prime divisor of p-1). + +G-MPI + DSA group generator g. + +Y-MPI + DSA public key value y = g^x \bmod p. + +X-MPI + DSA secret exponent x. + + The public key is similar with "private-key" replaced by "public-key" +and no X-MPI. + + +File: gcrypt.info, Node: ECC key parameters, Prev: DSA key parameters, Up: Used S-expressions + +6.2.3 ECC key parameters +------------------------ + +An ECC private key is described by this S-expression: + + (private-key + (ecc + (p P-MPI) + (a A-MPI) + (b B-MPI) + (g G-POINT) + (n N-MPI) + (q Q-POINT) + (d D-MPI))) + +P-MPI + Prime specifying the field GF(p). + +A-MPI +B-MPI + The two coefficients of the Weierstrass equation y^2 = x^3 + ax + b + +G-POINT + Base point g. + +N-MPI + Order of g + +Q-POINT + The point representing the public key Q = dP. + +D-MPI + The private key d + + All point values are encoded in standard format; Libgcrypt does +currently only support uncompressed points, thus the first byte needs to +be `0x04'. + + The public key is similar with "private-key" replaced by "public-key" +and no D-MPI. + + If the domain parameters are well-known, the name of this curve may +be used. For example + + (private-key + (ecc + (curve "NIST P-192") + (q Q-POINT) + (d D-MPI))) + + The `curve' parameter may be given in any case and is used to replace +missing parameters. + +Currently implemented curves are: +`NIST P-192' +`1.2.840.10045.3.1.1' +`prime192v1' +`secp192r1' + The NIST 192 bit curve, its OID, X9.62 and SECP aliases. + +`NIST P-224' +`secp224r1' + The NIST 224 bit curve and its SECP alias. + +`NIST P-256' +`1.2.840.10045.3.1.7' +`prime256v1' +`secp256r1' + The NIST 256 bit curve, its OID, X9.62 and SECP aliases. + +`NIST P-384' +`secp384r1' + The NIST 384 bit curve and its SECP alias. + +`NIST P-521' +`secp521r1' + The NIST 521 bit curve and its SECP alias. + + As usual the OIDs may optionally be prefixed with the string `OID.' +or `oid.'. + + +File: gcrypt.info, Node: Public key modules, Next: Cryptographic Functions, Prev: Used S-expressions, Up: Public Key cryptography + +6.3 Public key modules +====================== + +Libgcrypt makes it possible to load additional `public key modules'; +these public key algorithms can be used just like the algorithms that +are built into the library directly. For an introduction into +extension modules, see *Note Modules::. + + -- Data type: gcry_pk_spec_t + This is the `module specification structure' needed for registering + public key modules, which has to be filled in by the user before it + can be used to register a module. It contains the following + members: + + `const char *name' + The primary name of this algorithm. + + `char **aliases' + A list of strings that are `aliases' for the algorithm. The + list must be terminated with a NULL element. + + `const char *elements_pkey' + String containing the one-letter names of the MPI values + contained in a public key. + + `const char *element_skey' + String containing the one-letter names of the MPI values + contained in a secret key. + + `const char *elements_enc' + String containing the one-letter names of the MPI values that + are the result of an encryption operation using this + algorithm. + + `const char *elements_sig' + String containing the one-letter names of the MPI values that + are the result of a sign operation using this algorithm. + + `const char *elements_grip' + String containing the one-letter names of the MPI values that + are to be included in the `key grip'. + + `int use' + The bitwise-OR of the following flags, depending on the + abilities of the algorithm: + `GCRY_PK_USAGE_SIGN' + The algorithm supports signing and verifying of data. + + `GCRY_PK_USAGE_ENCR' + The algorithm supports the encryption and decryption of + data. + + `gcry_pk_generate_t generate' + The function responsible for generating a new key pair. See + below for a description of this type. + + `gcry_pk_check_secret_key_t check_secret_key' + The function responsible for checking the sanity of a + provided secret key. See below for a description of this + type. + + `gcry_pk_encrypt_t encrypt' + The function responsible for encrypting data. See below for a + description of this type. + + `gcry_pk_decrypt_t decrypt' + The function responsible for decrypting data. See below for a + description of this type. + + `gcry_pk_sign_t sign' + The function responsible for signing data. See below for a + description of this type. + + `gcry_pk_verify_t verify' + The function responsible for verifying that the provided + signature matches the provided data. See below for a + description of this type. + + `gcry_pk_get_nbits_t get_nbits' + The function responsible for returning the number of bits of + a provided key. See below for a description of this type. + + -- Data type: gcry_pk_generate_t + Type for the `generate' function, defined as: gcry_err_code_t + (*gcry_pk_generate_t) (int algo, unsigned int nbits, unsigned long + use_e, gcry_mpi_t *skey, gcry_mpi_t **retfactors) + + -- Data type: gcry_pk_check_secret_key_t + Type for the `check_secret_key' function, defined as: + gcry_err_code_t (*gcry_pk_check_secret_key_t) (int algo, + gcry_mpi_t *skey) + + -- Data type: gcry_pk_encrypt_t + Type for the `encrypt' function, defined as: gcry_err_code_t + (*gcry_pk_encrypt_t) (int algo, gcry_mpi_t *resarr, gcry_mpi_t + data, gcry_mpi_t *pkey, int flags) + + -- Data type: gcry_pk_decrypt_t + Type for the `decrypt' function, defined as: gcry_err_code_t + (*gcry_pk_decrypt_t) (int algo, gcry_mpi_t *result, gcry_mpi_t + *data, gcry_mpi_t *skey, int flags) + + -- Data type: gcry_pk_sign_t + Type for the `sign' function, defined as: gcry_err_code_t + (*gcry_pk_sign_t) (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, + gcry_mpi_t *skey) + + -- Data type: gcry_pk_verify_t + Type for the `verify' function, defined as: gcry_err_code_t + (*gcry_pk_verify_t) (int algo, gcry_mpi_t hash, gcry_mpi_t *data, + gcry_mpi_t *pkey, int (*cmp) (void *, gcry_mpi_t), void *opaquev) + + -- Data type: gcry_pk_get_nbits_t + Type for the `get_nbits' function, defined as: unsigned + (*gcry_pk_get_nbits_t) (int algo, gcry_mpi_t *pkey) + + -- Function: gcry_error_t gcry_pk_register (gcry_pk_spec_t *PUBKEY, + unsigned int *algorithm_id, gcry_module_t *MODULE) + Register a new public key module whose specification can be found + in PUBKEY. On success, a new algorithm ID is stored in + ALGORITHM_ID and a pointer representing this module is stored in + MODULE. + + -- Function: void gcry_pk_unregister (gcry_module_t MODULE) + Unregister the public key module identified by MODULE, which must + have been registered with gcry_pk_register. + + -- Function: gcry_error_t gcry_pk_list (int *LIST, int *LIST_LENGTH) + Get a list consisting of the IDs of the loaded pubkey modules. If + LIST is zero, write the number of loaded pubkey modules to + LIST_LENGTH and return. If LIST is non-zero, the first + *LIST_LENGTH algorithm IDs are stored in LIST, which must be of + according size. In case there are less pubkey modules than + *LIST_LENGTH, *LIST_LENGTH is updated to the correct number. + + +File: gcrypt.info, Node: Cryptographic Functions, Next: General public-key related Functions, Prev: Public key modules, Up: Public Key cryptography + +6.4 Cryptographic Functions +=========================== + +Note that we will in future allow to use keys without p,q and u +specified and may also support other parameters for performance reasons. + +Some functions operating on S-expressions support `flags', that +influence the operation. These flags have to be listed in a +sub-S-expression named `flags'; the following flags are known: + +`pkcs1' + Use PKCS#1 block type 2 padding. + +`no-blinding' + Do not use a technique called `blinding', which is used by default + in order to prevent leaking of secret information. Blinding is + only implemented by RSA, but it might be implemented by other + algorithms in the future as well, when necessary. + +Now that we know the key basics, we can carry on and explain how to +encrypt and decrypt data. In almost all cases the data is a random +session key which is in turn used for the actual encryption of the real +data. There are 2 functions to do this: + + -- Function: gcry_error_t gcry_pk_encrypt (gcry_sexp_t *R_CIPH, + gcry_sexp_t DATA, gcry_sexp_t PKEY) + Obviously a public key must be provided for encryption. It is + expected as an appropriate S-expression (see above) in PKEY. The + data to be encrypted can either be in the simple old format, which + is a very simple S-expression consisting only of one MPI, or it + may be a more complex S-expression which also allows to specify + flags for operation, like e.g. padding rules. + + If you don't want to let Libgcrypt handle the padding, you must + pass an appropriate MPI using this expression for DATA: + + (data + (flags raw) + (value MPI)) + + This has the same semantics as the old style MPI only way. MPI is + the actual data, already padded appropriate for your protocol. + Most systems however use PKCS#1 padding and so you can use this + S-expression for DATA: + + (data + (flags pkcs1) + (value BLOCK)) + + Here, the "flags" list has the "pkcs1" flag which let the function + know that it should provide PKCS#1 block type 2 padding. The + actual data to be encrypted is passed as a string of octets in + BLOCK. The function checks that this data actually can be used + with the given key, does the padding and encrypts it. + + If the function could successfully perform the encryption, the + return value will be 0 and a new S-expression with the encrypted + result is allocated and assigned to the variable at the address of + R_CIPH. The caller is responsible to release this value using + `gcry_sexp_release'. In case of an error, an error code is + returned and R_CIPH will be set to `NULL'. + + The returned S-expression has this format when used with RSA: + + (enc-val + (rsa + (a A-MPI))) + + Where A-MPI is an MPI with the result of the RSA operation. When + using the Elgamal algorithm, the return value will have this + format: + + (enc-val + (elg + (a A-MPI) + (b B-MPI))) + + Where A-MPI and B-MPI are MPIs with the result of the Elgamal + encryption operation. + + -- Function: gcry_error_t gcry_pk_decrypt (gcry_sexp_t *R_PLAIN, + gcry_sexp_t DATA, gcry_sexp_t SKEY) + Obviously a private key must be provided for decryption. It is + expected as an appropriate S-expression (see above) in SKEY. The + data to be decrypted must match the format of the result as + returned by `gcry_pk_encrypt', but should be enlarged with a + `flags' element: + + (enc-val + (flags) + (elg + (a A-MPI) + (b B-MPI))) + + Note that this function currently does not know of any padding + methods and the caller must do any un-padding on his own. + + The function returns 0 on success or an error code. The variable + at the address of R_PLAIN will be set to NULL on error or receive + the decrypted value on success. The format of R_PLAIN is a simple + S-expression part (i.e. not a valid one) with just one MPI if + there was no `flags' element in DATA; if at least an empty `flags' + is passed in DATA, the format is: + + (value PLAINTEXT) + + Another operation commonly performed using public key cryptography is +signing data. In some sense this is even more important than +encryption because digital signatures are an important instrument for +key management. Libgcrypt supports digital signatures using 2 +functions, similar to the encryption functions: + + -- Function: gcry_error_t gcry_pk_sign (gcry_sexp_t *R_SIG, + gcry_sexp_t DATA, gcry_sexp_t SKEY) + This function creates a digital signature for DATA using the + private key SKEY and place it into the variable at the address of + R_SIG. DATA may either be the simple old style S-expression with + just one MPI or a modern and more versatile S-expression which + allows to let Libgcrypt handle padding: + + (data + (flags pkcs1) + (hash HASH-ALGO BLOCK)) + + This example requests to sign the data in BLOCK after applying + PKCS#1 block type 1 style padding. HASH-ALGO is a string with the + hash algorithm to be encoded into the signature, this may be any + hash algorithm name as supported by Libgcrypt. Most likely, this + will be "sha256" or "sha1". It is obvious that the length of + BLOCK must match the size of that message digests; the function + checks that this and other constraints are valid. + + If PKCS#1 padding is not required (because the caller does already + provide a padded value), either the old format or better the + following format should be used: + + (data + (flags raw) + (value MPI)) + + Here, the data to be signed is directly given as an MPI. + + The signature is returned as a newly allocated S-expression in + R_SIG using this format for RSA: + + (sig-val + (rsa + (s S-MPI))) + + Where S-MPI is the result of the RSA sign operation. For DSA the + S-expression returned is: + + (sig-val + (dsa + (r R-MPI) + (s S-MPI))) + + Where R-MPI and S-MPI are the result of the DSA sign operation. + For Elgamal signing (which is slow, yields large numbers and + probably is not as secure as the other algorithms), the same + format is used with "elg" replacing "dsa". + +The operation most commonly used is definitely the verification of a +signature. Libgcrypt provides this function: + + -- Function: gcry_error_t gcry_pk_verify (gcry_sexp_t SIG, + gcry_sexp_t DATA, gcry_sexp_t PKEY) + This is used to check whether the signature SIG matches the DATA. + The public key PKEY must be provided to perform this verification. + This function is similar in its parameters to `gcry_pk_sign' with + the exceptions that the public key is used instead of the private + key and that no signature is created but a signature, in a format + as created by `gcry_pk_sign', is passed to the function in SIG. + + The result is 0 for success (i.e. the data matches the signature), + or an error code where the most relevant code is + `GCRYERR_BAD_SIGNATURE' to indicate that the signature does not + match the provided data. + + + +File: gcrypt.info, Node: General public-key related Functions, Next: AC Interface, Prev: Cryptographic Functions, Up: Public Key cryptography + +6.5 General public-key related Functions +======================================== + +A couple of utility functions are available to retrieve the length of +the key, map algorithm identifiers and perform sanity checks: + + -- Function: const char * gcry_pk_algo_name (int ALGO) + Map the public key algorithm id ALGO to a string representation of + the algorithm name. For unknown algorithms this functions returns + the string `"?"'. This function should not be used to test for the + availability of an algorithm. + + -- Function: int gcry_pk_map_name (const char *NAME) + Map the algorithm NAME to a public key algorithm Id. Returns 0 if + the algorithm name is not known. + + -- Function: int gcry_pk_test_algo (int ALGO) + Return 0 if the public key algorithm ALGO is available for use. + Note that this is implemented as a macro. + + -- Function: unsigned int gcry_pk_get_nbits (gcry_sexp_t KEY) + Return what is commonly referred as the key length for the given + public or private in KEY. + + -- Function: unsigned char * gcry_pk_get_keygrip (gcry_sexp_t KEY, + unsigned char *ARRAY) + Return the so called "keygrip" which is the SHA-1 hash of the + public key parameters expressed in a way depended on the + algorithm. ARRAY must either provide space for 20 bytes or be + `NULL'. In the latter case a newly allocated array of that size is + returned. On success a pointer to the newly allocated space or to + ARRAY is returned. `NULL' is returned to indicate an error which + is most likely an unknown algorithm or one where a "keygrip" has + not yet been defined. The function accepts public or secret keys + in KEY. + + -- Function: gcry_error_t gcry_pk_testkey (gcry_sexp_t KEY) + Return zero if the private key KEY is `sane', an error code + otherwise. Note that it is not possible to check the `saneness' + of a public key. + + + -- Function: gcry_error_t gcry_pk_algo_info (int ALGO, int WHAT, + void *BUFFER, size_t *NBYTES) + Depending on the value of WHAT return various information about + the public key algorithm with the id ALGO. Note that the function + returns `-1' on error and the actual error code must be retrieved + using the function `gcry_errno'. The currently defined values for + WHAT are: + + `GCRYCTL_TEST_ALGO:' + Return 0 if the specified algorithm is available for use. + BUFFER must be `NULL', NBYTES may be passed as `NULL' or + point to a variable with the required usage of the algorithm. + This may be 0 for "don't care" or the bit-wise OR of these + flags: + + `GCRY_PK_USAGE_SIGN' + Algorithm is usable for signing. + + `GCRY_PK_USAGE_ENCR' + Algorithm is usable for encryption. + + Unless you need to test for the allowed usage, it is in + general better to use the macro gcry_pk_test_algo instead. + + `GCRYCTL_GET_ALGO_USAGE:' + Return the usage flags for the given algorithm. An invalid + algorithm return 0. Disabled algorithms are ignored here + because we want to know whether the algorithm is at all + capable of a certain usage. + + `GCRYCTL_GET_ALGO_NPKEY' + Return the number of elements the public key for algorithm + ALGO consist of. Return 0 for an unknown algorithm. + + `GCRYCTL_GET_ALGO_NSKEY' + Return the number of elements the private key for algorithm + ALGO consist of. Note that this value is always larger than + that of the public key. Return 0 for an unknown algorithm. + + `GCRYCTL_GET_ALGO_NSIGN' + Return the number of elements a signature created with the + algorithm ALGO consists of. Return 0 for an unknown + algorithm or for an algorithm not capable of creating + signatures. + + `GCRYCTL_GET_ALGO_NENC' + Return the number of elements a encrypted message created + with the algorithm ALGO consists of. Return 0 for an unknown + algorithm or for an algorithm not capable of encryption. + + Please note that parameters not required should be passed as + `NULL'. + + -- Function: gcry_error_t gcry_pk_ctl (int CMD, void *BUFFER, + size_t BUFLEN) + This is a general purpose function to perform certain control + operations. CMD controls what is to be done. The return value is + 0 for success or an error code. Currently supported values for + CMD are: + + `GCRYCTL_DISABLE_ALGO' + Disable the algorithm given as an algorithm id in BUFFER. + BUFFER must point to an `int' variable with the algorithm id + and BUFLEN must have the value `sizeof (int)'. + + +Libgcrypt also provides a function to generate public key pairs: + + -- Function: gcry_error_t gcry_pk_genkey (gcry_sexp_t *R_KEY, + gcry_sexp_t PARMS) + This function create a new public key pair using information given + in the S-expression PARMS and stores the private and the public key + in one new S-expression at the address given by R_KEY. In case of + an error, R_KEY is set to `NULL'. The return code is 0 for + success or an error code otherwise. + + Here is an example for PARMS to create an 2048 bit RSA key: + + (genkey + (rsa + (nbits 4:2048))) + + To create an Elgamal key, substitute "elg" for "rsa" and to create + a DSA key use "dsa". Valid ranges for the key length depend on the + algorithms; all commonly used key lengths are supported. Currently + supported parameters are: + + `nbits' + This is always required to specify the length of the key. + The argument is a string with a number in C-notation. The + value should be a multiple of 8. + + `curve NAME' + For ECC a named curve may be used instead of giving the + number of requested bits. This allows to request a specific + curve to override a default selection Libgcrypt would have + taken if `nbits' has been given. The available names are + listed with the description of the ECC public key parameters. + + `rsa-use-e' + This is only used with RSA to give a hint for the public + exponent. The value will be used as a base to test for a + usable exponent. Some values are special: + + `0' + Use a secure and fast value. This is currently the + number 41. + + `1' + Use a value as required by some crypto policies. This + is currently the number 65537. + + `2' + Reserved + + `> 2' + Use the given value. + + If this parameter is not used, Libgcrypt uses for historic + reasons 65537. + + `qbits' + This is only meanigful for DSA keys. If it is given the DSA + key is generated with a Q parameyer of this size. If it is + not given or zero Q is deduced from NBITS in this way: + `512 <= N <= 1024' + Q = 160 + + `N = 2048' + Q = 224 + + `N = 3072' + Q = 256 + + `N = 7680' + Q = 384 + + `N = 15360' + Q = 512 + Note that in this case only the values for N, as given in the + table, are allowed. When specifying Q all values of N in the + range 512 to 15680 are valid as long as they are multiples of + 8. + + `transient-key' + This is only meaningful for RSA and DSA keys. This is a flag + with no value. If given the RSA or DSA key is created using + a faster and a somewhat less secure random number generator. + This flag may be used for keys which are only used for a + short time and do not require full cryptographic strength. + + `domain' + This is only meaningful for DLP algorithms. If specified + keys are generated with domain parameters taken from this + list. The exact format of this parameter depends on the + actual algorithm. It is currently only implemented for DSA + using this format: + + (genkey + (dsa + (domain + (p P-MPI) + (q Q-MPI) + (g Q-MPI)))) + + `nbits' and `qbits' may not be specified because they are + derived from the domain parameters. + + `derive-parms' + This is currently only implemented for RSA and DSA keys. It + is not allowed to use this together with a `domain' + specification. If given, it is used to derive the keys using + the given parameters. + + If given for an RSA key the X9.31 key generation algorithm is + used even if libgcrypt is not in FIPS mode. If given for a + DSA key, the FIPS 186 algorithm is used even if libgcrypt is + not in FIPS mode. + + (genkey + (rsa + (nbits 4:1024) + (rsa-use-e 1:3) + (derive-parms + (Xp1 #1A1916DDB29B4EB7EB6732E128#) + (Xp2 #192E8AAC41C576C822D93EA433#) + (Xp #D8CD81F035EC57EFE822955149D3BFF70C53520D + 769D6D76646C7A792E16EBD89FE6FC5B605A6493 + 39DFC925A86A4C6D150B71B9EEA02D68885F5009 + B98BD984#) + (Xq1 #1A5CF72EE770DE50CB09ACCEA9#) + (Xq2 #134E4CAA16D2350A21D775C404#) + (Xq #CC1092495D867E64065DEE3E7955F2EBC7D47A2D + 7C9953388F97DDDC3E1CA19C35CA659EDC2FC325 + 6D29C2627479C086A699A49C4C9CEE7EF7BD1B34 + 321DE34A#)))) + + (genkey + (dsa + (nbits 4:1024) + (derive-parms + (seed SEED-MPI)))) + + `use-x931' + Force the use of the ANSI X9.31 key generation algorithm + instead of the default algorithm. This flag is only + meaningful for RSA and usually not required. Note that this + algorithm is implicitly used if either `derive-parms' is + given or Libgcrypt is in FIPS mode. + + `use-fips186' + Force the use of the FIPS 186 key generation algorithm + instead of the default algorithm. This flag is only + meaningful for DSA and usually not required. Note that this + algorithm is implicitly used if either `derive-parms' is + given or Libgcrypt is in FIPS mode. As of now FIPS 186-2 is + implemented; after the approval of FIPS 186-3 the code will + be changed to implement 186-3. + + `use-fips186-2' + Force the use of the FIPS 186-2 key generation algorithm + instead of the default algorithm. This algorithm is slighlty + different from FIPS 186-3 and allows only 1024 bit keys. + This flag is only meaningful for DSA and only required for + FIPS testing backward compatibility. + + + The key pair is returned in a format depending on the algorithm. + Both private and public keys are returned in one container and may + be accompanied by some miscellaneous information. + + As an example, here is what the Elgamal key generation returns: + + (key-data + (public-key + (elg + (p P-MPI) + (g G-MPI) + (y Y-MPI))) + (private-key + (elg + (p P-MPI) + (g G-MPI) + (y Y-MPI) + (x X-MPI))) + (misc-key-info + (pm1-factors N1 N2 ... NN)) + + As you can see, some of the information is duplicated, but this + provides an easy way to extract either the public or the private + key. Note that the order of the elements is not defined, e.g. the + private key may be stored before the public key. N1 N2 ... NN is a + list of prime numbers used to composite P-MPI; this is in general + not a very useful information and only available if the key + generation algorithm provides them. + + +File: gcrypt.info, Node: AC Interface, Prev: General public-key related Functions, Up: Public Key cryptography + +6.6 Alternative Public Key Interface +==================================== + +This section documents the alternative interface to asymmetric +cryptography (ac) that is not based on S-expressions, but on native C +data structures. As opposed to the pk interface described in the +former chapter, this one follows an open/use/close paradigm like other +building blocks of the library. + + *This interface has a few known problems; most noteworthy an +inherent tendency to leak memory. It might not be available in +forthcoming versions of Libgcrypt.* + +* Menu: + +* Available asymmetric algorithms:: List of algorithms supported by the library. +* Working with sets of data:: How to work with sets of data. +* Working with IO objects:: How to work with IO objects. +* Working with handles:: How to use handles. +* Working with keys:: How to work with keys. +* Using cryptographic functions:: How to perform cryptographic operations. +* Handle-independent functions:: General functions independent of handles. + + +File: gcrypt.info, Node: Available asymmetric algorithms, Next: Working with sets of data, Up: AC Interface + +6.6.1 Available asymmetric algorithms +------------------------------------- + +Libgcrypt supports the RSA (Rivest-Shamir-Adleman) algorithms as well +as DSA (Digital Signature Algorithm) and Elgamal. The versatile +interface allows to add more algorithms in the future. + + -- Data type: gcry_ac_id_t + The following constants are defined for this type: + + `GCRY_AC_RSA' + Rivest-Shamir-Adleman + + `GCRY_AC_DSA' + Digital Signature Algorithm + + `GCRY_AC_ELG' + Elgamal + + `GCRY_AC_ELG_E' + Elgamal, encryption only. + + +File: gcrypt.info, Node: Working with sets of data, Next: Working with IO objects, Prev: Available asymmetric algorithms, Up: AC Interface + +6.6.2 Working with sets of data +------------------------------- + +In the context of this interface the term `data set' refers to a list +of `named MPI values' that is used by functions performing +cryptographic operations; a named MPI value is a an MPI value, +associated with a label. + + Such data sets are used for representing keys, since keys simply +consist of a variable amount of numbers. Furthermore some functions +return data sets to the caller that are to be provided to other +functions. + + This section documents the data types, symbols and functions that are +relevant for working with data sets. + + -- Data type: gcry_ac_data_t + A single data set. + + The following flags are supported: + +`GCRY_AC_FLAG_DEALLOC' + Used for storing data in a data set. If given, the data will be + released by the library. Note that whenever one of the ac + functions is about to release objects because of this flag, the + objects are expected to be stored in memory allocated through the + Libgcrypt memory management. In other words: gcry_free() is used + instead of free(). + +`GCRY_AC_FLAG_COPY' + Used for storing/retrieving data in/from a data set. If given, the + library will create copies of the provided/contained data, which + will then be given to the user/associated with the data set. + + -- Function: gcry_error_t gcry_ac_data_new (gcry_ac_data_t *DATA) + Creates a new, empty data set and stores it in DATA. + + -- Function: void gcry_ac_data_destroy (gcry_ac_data_t DATA) + Destroys the data set DATA. + + -- Function: gcry_error_t gcry_ac_data_set (gcry_ac_data_t DATA, + unsigned int FLAGS, char *NAME, gcry_mpi_t MPI) + Add the value MPI to DATA with the label NAME. If FLAGS contains + GCRY_AC_FLAG_COPY, the data set will contain copies of NAME and + MPI. If FLAGS contains GCRY_AC_FLAG_DEALLOC or GCRY_AC_FLAG_COPY, + the values contained in the data set will be deallocated when they + are to be removed from the data set. + + -- Function: gcry_error_t gcry_ac_data_copy (gcry_ac_data_t *DATA_CP, + gcry_ac_data_t DATA) + Create a copy of the data set DATA and store it in DATA_CP. + FIXME: exact semantics undefined. + + -- Function: unsigned int gcry_ac_data_length (gcry_ac_data_t DATA) + Returns the number of named MPI values inside of the data set DATA. + + -- Function: gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t DATA, + unsigned int FLAGS, char *NAME, gcry_mpi_t *MPI) + Store the value labelled with NAME found in DATA in MPI. If FLAGS + contains GCRY_AC_FLAG_COPY, store a copy of the MPI value + contained in the data set. MPI may be NULL (this might be useful + for checking the existence of an MPI with extracting it). + + -- Function: gcry_error_t gcry_ac_data_get_index (gcry_ac_data_t DATA, + unsigned int flags, unsigned int INDEX, const char **NAME, + gcry_mpi_t *MPI) + Stores in NAME and MPI the named MPI value contained in the data + set DATA with the index IDX. If FLAGS contains GCRY_AC_FLAG_COPY, + store copies of the values contained in the data set. NAME or MPI + may be NULL. + + -- Function: void gcry_ac_data_clear (gcry_ac_data_t DATA) + Destroys any values contained in the data set DATA. + + -- Function: gcry_error_t gcry_ac_data_to_sexp (gcry_ac_data_t DATA, + gcry_sexp_t *SEXP, const char **IDENTIFIERS) + This function converts the data set DATA into a newly created + S-Expression, which is to be stored in SEXP; IDENTIFIERS is a NULL + terminated list of C strings, which specifies the structure of the + S-Expression. + + Example: + + If IDENTIFIERS is a list of pointers to the strings "foo" and + "bar" and if DATA is a data set containing the values "val1 = + 0x01" and "val2 = 0x02", then the resulting S-Expression will look + like this: (foo (bar ((val1 0x01) (val2 0x02))). + + -- Function: gcry_error gcry_ac_data_from_sexp (gcry_ac_data_t *DATA, + gcry_sexp_t SEXP, const char **IDENTIFIERS) + This function converts the S-Expression SEXP into a newly created + data set, which is to be stored in DATA; IDENTIFIERS is a NULL + terminated list of C strings, which specifies the structure of the + S-Expression. If the list of identifiers does not match the + structure of the S-Expression, the function fails. + + +File: gcrypt.info, Node: Working with IO objects, Next: Working with handles, Prev: Working with sets of data, Up: AC Interface + +6.6.3 Working with IO objects +----------------------------- + +Note: IO objects are currently only used in the context of message +encoding/decoding and encryption/signature schemes. + + -- Data type: gcry_ac_io_t + `gcry_ac_io_t' is the type to be used for IO objects. + + IO objects provide an uniform IO layer on top of different underlying +IO mechanisms; either they can be used for providing data to the +library (mode is GCRY_AC_IO_READABLE) or they can be used for +retrieving data from the library (mode is GCRY_AC_IO_WRITABLE). + + IO object need to be initialized by calling on of the following +functions: + + -- Function: void gcry_ac_io_init (gcry_ac_io_t *AC_IO, + gcry_ac_io_mode_t MODE, gcry_ac_io_type_t TYPE, ...); + Initialize AC_IO according to MODE, TYPE and the variable list of + arguments. The list of variable arguments to specify depends on + the given TYPE. + + -- Function: void gcry_ac_io_init_va (gcry_ac_io_t *AC_IO, + gcry_ac_io_mode_t MODE, gcry_ac_io_type_t TYPE, va_list AP); + Initialize AC_IO according to MODE, TYPE and the variable list of + arguments AP. The list of variable arguments to specify depends + on the given TYPE. + + The following types of IO objects exist: + +`GCRY_AC_IO_STRING' + In case of GCRY_AC_IO_READABLE the IO object will provide data + from a memory string. Arguments to specify at initialization time: + `unsigned char *' + Pointer to the beginning of the memory string + + `size_t' + Size of the memory string + In case of GCRY_AC_IO_WRITABLE the object will store retrieved + data in a newly allocated memory string. Arguments to specify at + initialization time: + `unsigned char **' + Pointer to address, at which the pointer to the newly created + memory string is to be stored + + `size_t *' + Pointer to address, at which the size of the newly created + memory string is to be stored + +`GCRY_AC_IO_CALLBACK' + In case of GCRY_AC_IO_READABLE the object will forward read + requests to a provided callback function. Arguments to specify at + initialization time: + `gcry_ac_data_read_cb_t' + Callback function to use + + `void *' + Opaque argument to provide to the callback function + In case of GCRY_AC_IO_WRITABLE the object will forward write + requests to a provided callback function. Arguments to specify at + initialization time: + `gcry_ac_data_write_cb_t' + Callback function to use + + `void *' + Opaque argument to provide to the callback function + + +File: gcrypt.info, Node: Working with handles, Next: Working with keys, Prev: Working with IO objects, Up: AC Interface + +6.6.4 Working with handles +-------------------------- + +In order to use an algorithm, an according handle must be created. +This is done using the following function: + + -- Function: gcry_error_t gcry_ac_open (gcry_ac_handle_t *HANDLE, int + ALGORITHM, int FLAGS) + Creates a new handle for the algorithm ALGORITHM and stores it in + HANDLE. FLAGS is not used currently. + + ALGORITHM must be a valid algorithm ID, see *Note Available + asymmetric algorithms::, for a list of supported algorithms and the + according constants. Besides using the listed constants directly, + the functions `gcry_pk_name_to_id' may be used to convert the + textual name of an algorithm into the according numeric ID. + + -- Function: void gcry_ac_close (gcry_ac_handle_t HANDLE) + Destroys the handle HANDLE. + + +File: gcrypt.info, Node: Working with keys, Next: Using cryptographic functions, Prev: Working with handles, Up: AC Interface + +6.6.5 Working with keys +----------------------- + + -- Data type: gcry_ac_key_type_t + Defined constants: + + `GCRY_AC_KEY_SECRET' + Specifies a secret key. + + `GCRY_AC_KEY_PUBLIC' + Specifies a public key. + + -- Data type: gcry_ac_key_t + This type represents a single `key', either a secret one or a + public one. + + -- Data type: gcry_ac_key_pair_t + This type represents a `key pair' containing a secret and a public + key. + + Key data structures can be created in two different ways; a new key +pair can be generated, resulting in ready-to-use key. Alternatively a +key can be initialized from a given data set. + + -- Function: gcry_error_t gcry_ac_key_init (gcry_ac_key_t *KEY, + gcry_ac_handle_t HANDLE, gcry_ac_key_type_t TYPE, + gcry_ac_data_t DATA) + Creates a new key of type TYPE, consisting of the MPI values + contained in the data set DATA and stores it in KEY. + + -- Function: gcry_error_t gcry_ac_key_pair_generate (gcry_ac_handle_t + HANDLE, unsigned int NBITS, void *KEY_SPEC, + gcry_ac_key_pair_t *KEY_PAIR, gcry_mpi_t **MISC_DATA) + Generates a new key pair via the handle HANDLE of NBITS bits and + stores it in KEY_PAIR. + + In case non-standard settings are wanted, a pointer to a structure + of type `gcry_ac_key_spec__t', matching the selected + algorithm, can be given as KEY_SPEC. MISC_DATA is not used yet. + Such a structure does only exist for RSA. A description of the + members of the supported structures follows. + + `gcry_ac_key_spec_rsa_t' + + `gcry_mpi_t e' + Generate the key pair using a special `e'. The value of + `e' has the following meanings: + `= 0' + Let Libgcrypt decide what exponent should be used. + + `= 1' + Request the use of a "secure" exponent; this is + required by some specification to be 65537. + + `> 2' + Try starting at this value until a working exponent + is found. Note that the current implementation + leaks some information about the private key + because the incrementation used is not randomized. + Thus, this function will be changed in the future + to return a random exponent of the given size. + + Example code: + { + gcry_ac_key_pair_t key_pair; + gcry_ac_key_spec_rsa_t rsa_spec; + + rsa_spec.e = gcry_mpi_new (0); + gcry_mpi_set_ui (rsa_spec.e, 1); + + err = gcry_ac_open (&handle, GCRY_AC_RSA, 0); + assert (! err); + + err = gcry_ac_key_pair_generate (handle, 1024, &rsa_spec, + &key_pair, NULL); + assert (! err); + } + + -- Function: gcry_ac_key_t gcry_ac_key_pair_extract + (gcry_ac_key_pair_t KEY_PAIR, gcry_ac_key_type_t WHICH) + Returns the key of type WHICH out of the key pair KEY_PAIR. + + -- Function: void gcry_ac_key_destroy (gcry_ac_key_t KEY) + Destroys the key KEY. + + -- Function: void gcry_ac_key_pair_destroy (gcry_ac_key_pair_t + KEY_PAIR) + Destroys the key pair KEY_PAIR. + + -- Function: gcry_ac_data_t gcry_ac_key_data_get (gcry_ac_key_t KEY) + Returns the data set contained in the key KEY. + + -- Function: gcry_error_t gcry_ac_key_test (gcry_ac_handle_t HANDLE, + gcry_ac_key_t KEY) + Verifies that the private key KEY is sane via HANDLE. + + -- Function: gcry_error_t gcry_ac_key_get_nbits (gcry_ac_handle_t + HANDLE, gcry_ac_key_t KEY, unsigned int *NBITS) + Stores the number of bits of the key KEY in NBITS via HANDLE. + + -- Function: gcry_error_t gcry_ac_key_get_grip (gcry_ac_handle_t + HANDLE, gcry_ac_key_t KEY, unsigned char *KEY_GRIP) + Writes the 20 byte long key grip of the key KEY to KEY_GRIP via + HANDLE. + + +File: gcrypt.info, Node: Using cryptographic functions, Next: Handle-independent functions, Prev: Working with keys, Up: AC Interface + +6.6.6 Using cryptographic functions +----------------------------------- + +The following flags might be relevant: + +`GCRY_AC_FLAG_NO_BLINDING' + Disable any blinding, which might be supported by the chosen + algorithm; blinding is the default. + + There exist two kinds of cryptographic functions available through +the ac interface: primitives, and high-level functions. + + Primitives deal with MPIs (data sets) directly; what they provide is +direct access to the cryptographic operations provided by an algorithm +implementation. + + High-level functions deal with octet strings, according to a +specified "scheme". Schemes make use of "encoding methods", which are +responsible for converting the provided octet strings into MPIs, which +are then forwared to the cryptographic primitives. Since schemes are +to be used for a special purpose in order to achieve a particular +security goal, there exist "encryption schemes" and "signature +schemes". Encoding methods can be used seperately or implicitly +through schemes. + + What follows is a description of the cryptographic primitives. + + -- Function: gcry_error_t gcry_ac_data_encrypt (gcry_ac_handle_t + HANDLE, unsigned int FLAGS, gcry_ac_key_t KEY, gcry_mpi_t + DATA_PLAIN, gcry_ac_data_t *DATA_ENCRYPTED) + Encrypts the plain text MPI value DATA_PLAIN with the key public + KEY under the control of the flags FLAGS and stores the resulting + data set into DATA_ENCRYPTED. + + -- Function: gcry_error_t gcry_ac_data_decrypt (gcry_ac_handle_t + HANDLE, unsigned int FLAGS, gcry_ac_key_t KEY, gcry_mpi_t + *DATA_PLAIN, gcry_ac_data_t DATA_ENCRYPTED) + Decrypts the encrypted data contained in the data set + DATA_ENCRYPTED with the secret key KEY under the control of the + flags FLAGS and stores the resulting plain text MPI value in + DATA_PLAIN. + + -- Function: gcry_error_t gcry_ac_data_sign (gcry_ac_handle_t HANDLE, + gcry_ac_key_t KEY, gcry_mpi_t DATA, gcry_ac_data_t + *DATA_SIGNATURE) + Signs the data contained in DATA with the secret key KEY and + stores the resulting signature in the data set DATA_SIGNATURE. + + -- Function: gcry_error_t gcry_ac_data_verify (gcry_ac_handle_t + HANDLE, gcry_ac_key_t KEY, gcry_mpi_t DATA, gcry_ac_data_t + DATA_SIGNATURE) + Verifies that the signature contained in the data set + DATA_SIGNATURE is indeed the result of signing the data contained + in DATA with the secret key belonging to the public key KEY. + + What follows is a description of the high-level functions. + + The type "gcry_ac_em_t" is used for specifying encoding methods; the +following methods are supported: + +`GCRY_AC_EME_PKCS_V1_5' + PKCS-V1_5 Encoding Method for Encryption. Options must be provided + through a pointer to a correctly initialized object of type + gcry_ac_eme_pkcs_v1_5_t. + +`GCRY_AC_EMSA_PKCS_V1_5' + PKCS-V1_5 Encoding Method for Signatures with Appendix. Options + must be provided through a pointer to a correctly initialized + object of type gcry_ac_emsa_pkcs_v1_5_t. + + Option structure types: + +`gcry_ac_eme_pkcs_v1_5_t' + + `gcry_ac_key_t key' + + `gcry_ac_handle_t handle' + +`gcry_ac_emsa_pkcs_v1_5_t' + + `gcry_md_algo_t md' + + `size_t em_n' + + Encoding methods can be used directly through the following +functions: + + -- Function: gcry_error_t gcry_ac_data_encode (gcry_ac_em_t METHOD, + unsigned int FLAGS, void *OPTIONS, unsigned char *M, size_t + M_N, unsigned char **EM, size_t *EM_N) + Encodes the message contained in M of size M_N according to + METHOD, FLAGS and OPTIONS. The newly created encoded message is + stored in EM and EM_N. + + -- Function: gcry_error_t gcry_ac_data_decode (gcry_ac_em_t METHOD, + unsigned int FLAGS, void *OPTIONS, unsigned char *EM, size_t + EM_N, unsigned char **M, size_t *M_N) + Decodes the message contained in EM of size EM_N according to + METHOD, FLAGS and OPTIONS. The newly created decoded message is + stored in M and M_N. + + The type "gcry_ac_scheme_t" is used for specifying schemes; the +following schemes are supported: + +`GCRY_AC_ES_PKCS_V1_5' + PKCS-V1_5 Encryption Scheme. No options can be provided. + +`GCRY_AC_SSA_PKCS_V1_5' + PKCS-V1_5 Signature Scheme (with Appendix). Options can be + provided through a pointer to a correctly initialized object of + type gcry_ac_ssa_pkcs_v1_5_t. + + Option structure types: + +`gcry_ac_ssa_pkcs_v1_5_t' + + `gcry_md_algo_t md' + + The functions implementing schemes: + + -- Function: gcry_error_t gcry_ac_data_encrypt_scheme + (gcry_ac_handle_t HANDLE, gcry_ac_scheme_t SCHEME, unsigned + int FLAGS, void *OPTS, gcry_ac_key_t KEY, gcry_ac_io_t + *IO_MESSAGE, gcry_ac_io_t *IO_CIPHER) + Encrypts the plain text readable from IO_MESSAGE through HANDLE + with the public key KEY according to SCHEME, FLAGS and OPTS. If + OPTS is not NULL, it has to be a pointer to a structure specific + to the chosen scheme (gcry_ac_es_*_t). The encrypted message is + written to IO_CIPHER. + + -- Function: gcry_error_t gcry_ac_data_decrypt_scheme + (gcry_ac_handle_t HANDLE, gcry_ac_scheme_t SCHEME, unsigned + int FLAGS, void *OPTS, gcry_ac_key_t KEY, gcry_ac_io_t + *IO_CIPHER, gcry_ac_io_t *IO_MESSAGE) + Decrypts the cipher text readable from IO_CIPHER through HANDLE + with the secret key KEY according to SCHEME, FLAGS and OPTS. If + OPTS is not NULL, it has to be a pointer to a structure specific + to the chosen scheme (gcry_ac_es_*_t). The decrypted message is + written to IO_MESSAGE. + + -- Function: gcry_error_t gcry_ac_data_sign_scheme (gcry_ac_handle_t + HANDLE, gcry_ac_scheme_t SCHEME, unsigned int FLAGS, void + *OPTS, gcry_ac_key_t KEY, gcry_ac_io_t *IO_MESSAGE, + gcry_ac_io_t *IO_SIGNATURE) + Signs the message readable from IO_MESSAGE through HANDLE with the + secret key KEY according to SCHEME, FLAGS and OPTS. If OPTS is + not NULL, it has to be a pointer to a structure specific to the + chosen scheme (gcry_ac_ssa_*_t). The signature is written to + IO_SIGNATURE. + + -- Function: gcry_error_t gcry_ac_data_verify_scheme (gcry_ac_handle_t + HANDLE, gcry_ac_scheme_t SCHEME, unsigned int FLAGS, void + *OPTS, gcry_ac_key_t KEY, gcry_ac_io_t *IO_MESSAGE, + gcry_ac_io_t *IO_SIGNATURE) + Verifies through HANDLE that the signature readable from + IO_SIGNATURE is indeed the result of signing the message readable + from IO_MESSAGE with the secret key belonging to the public key + KEY according to SCHEME and OPTS. If OPTS is not NULL, it has to + be an anonymous structure (gcry_ac_ssa_*_t) specific to the chosen + scheme. + + +File: gcrypt.info, Node: Handle-independent functions, Prev: Using cryptographic functions, Up: AC Interface + +6.6.7 Handle-independent functions +---------------------------------- + +These two functions are deprecated; do not use them for new code. + + -- Function: gcry_error_t gcry_ac_id_to_name (gcry_ac_id_t ALGORITHM, + const char **NAME) + Stores the textual representation of the algorithm whose id is + given in ALGORITHM in NAME. Deprecated; use `gcry_pk_algo_name'. + + -- Function: gcry_error_t gcry_ac_name_to_id (const char *NAME, + gcry_ac_id_t *ALGORITHM) + Stores the numeric ID of the algorithm whose textual + representation is contained in NAME in ALGORITHM. Deprecated; use + `gcry_pk_map_name'. + + +File: gcrypt.info, Node: Hashing, Next: Random Numbers, Prev: Public Key cryptography, Up: Top + +7 Hashing +********* + +Libgcrypt provides an easy and consistent to use interface for hashing. +Hashing is buffered and several hash algorithms can be updated at once. +It is possible to compute a MAC using the same routines. The +programming model follows an open/process/close paradigm and is in that +similar to other building blocks provided by Libgcrypt. + + For convenience reasons, a few cyclic redundancy check value +operations are also supported. + +* Menu: + +* Available hash algorithms:: List of hash algorithms supported by the library. +* Hash algorithm modules:: How to work with hash algorithm modules. +* Working with hash algorithms:: List of functions related to hashing. + + +File: gcrypt.info, Node: Available hash algorithms, Next: Hash algorithm modules, Up: Hashing + +7.1 Available hash algorithms +============================= + +`GCRY_MD_NONE' + This is not a real algorithm but used by some functions as an error + return value. This constant is guaranteed to have the value `0'. + +`GCRY_MD_SHA1' + This is the SHA-1 algorithm which yields a message digest of 20 + bytes. Note that SHA-1 begins to show some weaknesses and it is + suggested to fade out its use if strong cryptographic properties + are required. + +`GCRY_MD_RMD160' + This is the 160 bit version of the RIPE message digest + (RIPE-MD-160). Like SHA-1 it also yields a digest of 20 bytes. + This algorithm share a lot of design properties with SHA-1 and + thus it is advisable not to use it for new protocols. + +`GCRY_MD_MD5' + This is the well known MD5 algorithm, which yields a message + digest of 16 bytes. Note that the MD5 algorithm has severe + weaknesses, for example it is easy to compute two messages + yielding the same hash (collision attack). The use of this + algorithm is only justified for non-cryptographic application. + +`GCRY_MD_MD4' + This is the MD4 algorithm, which yields a message digest of 16 + bytes. This algorithms ha severe weaknesses and should not be + used. + +`GCRY_MD_MD2' + This is an reserved identifier for MD-2; there is no + implementation yet. This algorithm has severe weaknesses and + should not be used. + +`GCRY_MD_TIGER' + This is the TIGER/192 algorithm which yields a message digest of + 24 bytes. + +`GCRY_MD_HAVAL' + This is an reserved value for the HAVAL algorithm with 5 passes + and 160 bit. It yields a message digest of 20 bytes. Note that + there is no implementation yet available. + +`GCRY_MD_SHA224' + This is the SHA-224 algorithm which yields a message digest of 28 + bytes. See Change Notice 1 for FIPS 180-2 for the specification. + +`GCRY_MD_SHA256' + This is the SHA-256 algorithm which yields a message digest of 32 + bytes. See FIPS 180-2 for the specification. + +`GCRY_MD_SHA384' + This is the SHA-384 algorithm which yields a message digest of 48 + bytes. See FIPS 180-2 for the specification. + +`GCRY_MD_SHA512' + This is the SHA-384 algorithm which yields a message digest of 64 + bytes. See FIPS 180-2 for the specification. + +`GCRY_MD_CRC32' + This is the ISO 3309 and ITU-T V.42 cyclic redundancy check. It + yields an output of 4 bytes. Note that this is not a hash + algorithm in the cryptographic sense. + +`GCRY_MD_CRC32_RFC1510' + This is the above cyclic redundancy check function, as modified by + RFC 1510. It yields an output of 4 bytes. Note that this is not + a hash algorithm in the cryptographic sense. + +`GCRY_MD_CRC24_RFC2440' + This is the OpenPGP cyclic redundancy check function. It yields an + output of 3 bytes. Note that this is not a hash algorithm in the + cryptographic sense. + +`GCRY_MD_WHIRLPOOL' + This is the Whirlpool algorithm which yields a message digest of 64 + bytes. + + + +File: gcrypt.info, Node: Hash algorithm modules, Next: Working with hash algorithms, Prev: Available hash algorithms, Up: Hashing + +7.2 Hash algorithm modules +========================== + +Libgcrypt makes it possible to load additional `message digest +modules'; these digests can be used just like the message digest +algorithms that are built into the library directly. For an +introduction into extension modules, see *Note Modules::. + + -- Data type: gcry_md_spec_t + This is the `module specification structure' needed for registering + message digest modules, which has to be filled in by the user + before it can be used to register a module. It contains the + following members: + + `const char *name' + The primary name of this algorithm. + + `unsigned char *asnoid' + Array of bytes that form the ASN OID. + + `int asnlen' + Length of bytes in `asnoid'. + + `gcry_md_oid_spec_t *oids' + A list of OIDs that are to be associated with the algorithm. + The list's last element must have it's `oid' member set to + NULL. See below for an explanation of this type. See below + for an explanation of this type. + + `int mdlen' + Length of the message digest algorithm. See below for an + explanation of this type. + + `gcry_md_init_t init' + The function responsible for initializing a handle. See + below for an explanation of this type. + + `gcry_md_write_t write' + The function responsible for writing data into a message + digest context. See below for an explanation of this type. + + `gcry_md_final_t final' + The function responsible for `finalizing' a message digest + context. See below for an explanation of this type. + + `gcry_md_read_t read' + The function responsible for reading out a message digest + result. See below for an explanation of this type. + + `size_t contextsize' + The size of the algorithm-specific `context', that should be + allocated for each handle. + + -- Data type: gcry_md_oid_spec_t + This type is used for associating a user-provided algorithm + implementation with certain OIDs. It contains the following + members: + + `const char *oidstring' + Textual representation of the OID. + + -- Data type: gcry_md_init_t + Type for the `init' function, defined as: void (*gcry_md_init_t) + (void *c) + + -- Data type: gcry_md_write_t + Type for the `write' function, defined as: void (*gcry_md_write_t) + (void *c, unsigned char *buf, size_t nbytes) + + -- Data type: gcry_md_final_t + Type for the `final' function, defined as: void (*gcry_md_final_t) + (void *c) + + -- Data type: gcry_md_read_t + Type for the `read' function, defined as: unsigned char + *(*gcry_md_read_t) (void *c) + + -- Function: gcry_error_t gcry_md_register (gcry_md_spec_t *DIGEST, + unsigned int *algorithm_id, gcry_module_t *MODULE) + Register a new digest module whose specification can be found in + DIGEST. On success, a new algorithm ID is stored in ALGORITHM_ID + and a pointer representing this module is stored in MODULE. + + -- Function: void gcry_md_unregister (gcry_module_t MODULE) + Unregister the digest identified by MODULE, which must have been + registered with gcry_md_register. + + -- Function: gcry_error_t gcry_md_list (int *LIST, int *LIST_LENGTH) + Get a list consisting of the IDs of the loaded message digest + modules. If LIST is zero, write the number of loaded message + digest modules to LIST_LENGTH and return. If LIST is non-zero, + the first *LIST_LENGTH algorithm IDs are stored in LIST, which + must be of according size. In case there are less message digests + modules than *LIST_LENGTH, *LIST_LENGTH is updated to the correct + number. + + +File: gcrypt.info, Node: Working with hash algorithms, Prev: Hash algorithm modules, Up: Hashing + +7.3 Working with hash algorithms +================================ + +To use most of these function it is necessary to create a context; this +is done using: + + -- Function: gcry_error_t gcry_md_open (gcry_md_hd_t *HD, int ALGO, + unsigned int FLAGS) + Create a message digest object for algorithm ALGO. FLAGS may be + given as an bitwise OR of constants described below. ALGO may be + given as `0' if the algorithms to use are later set using + `gcry_md_enable'. HD is guaranteed to either receive a valid + handle or NULL. + + For a list of supported algorithms, see *Note Available hash + algorithms::. + + The flags allowed for MODE are: + + `GCRY_MD_FLAG_SECURE' + Allocate all buffers and the resulting digest in "secure + memory". Use this is the hashed data is highly confidential. + + `GCRY_MD_FLAG_HMAC' + Turn the algorithm into a HMAC message authentication + algorithm. This only works if just one algorithm is enabled + for the handle. Note that the function `gcry_md_setkey' must + be used to set the MAC key. The size of the MAC is equal to + the message digest of the underlying hash algorithm. If you + want CBC message authentication codes based on a cipher, see + *Note Working with cipher handles::. + + + You may use the function `gcry_md_is_enabled' to later check + whether an algorithm has been enabled. + + + If you want to calculate several hash algorithms at the same time, +you have to use the following function right after the `gcry_md_open': + + -- Function: gcry_error_t gcry_md_enable (gcry_md_hd_t H, int ALGO) + Add the message digest algorithm ALGO to the digest object + described by handle H. Duplicated enabling of algorithms is + detected and ignored. + + If the flag `GCRY_MD_FLAG_HMAC' was used, the key for the MAC must +be set using the function: + + -- Function: gcry_error_t gcry_md_setkey (gcry_md_hd_t H, const void + *KEY, size_t KEYLEN) + For use with the HMAC feature, set the MAC key to the value of KEY + of length KEYLEN bytes. There is no restriction on the length of + the key. + + After you are done with the hash calculation, you should release the +resources by using: + + -- Function: void gcry_md_close (gcry_md_hd_t H) + Release all resources of hash context H. H should not be used + after a call to this function. A `NULL' passed as H is ignored. + The function also zeroises all sensitive information associated + with this handle. + + + Often you have to do several hash operations using the same +algorithm. To avoid the overhead of creating and releasing context, a +reset function is provided: + + -- Function: void gcry_md_reset (gcry_md_hd_t H) + Reset the current context to its initial state. This is + effectively identical to a close followed by an open and enabling + all currently active algorithms. + + Often it is necessary to start hashing some data and then continue to +hash different data. To avoid hashing the same data several times +(which might not even be possible if the data is received from a pipe), +a snapshot of the current hash context can be taken and turned into a +new context: + + -- Function: gcry_error_t gcry_md_copy (gcry_md_hd_t *HANDLE_DST, + gcry_md_hd_t HANDLE_SRC) + Create a new digest object as an exact copy of the object + described by handle HANDLE_SRC and store it in HANDLE_DST. The + context is not reset and you can continue to hash data using this + context and independently using the original context. + + Now that we have prepared everything to calculate hashes, it is time +to see how it is actually done. There are two ways for this, one to +update the hash with a block of memory and one macro to update the hash +by just one character. Both methods can be used on the same hash +context. + + -- Function: void gcry_md_write (gcry_md_hd_t H, const void *BUFFER, + size_t LENGTH) + Pass LENGTH bytes of the data in BUFFER to the digest object with + handle H to update the digest values. This function should be used + for large blocks of data. + + -- Function: void gcry_md_putc (gcry_md_hd_t H, int C) + Pass the byte in C to the digest object with handle H to update + the digest value. This is an efficient function, implemented as a + macro to buffer the data before an actual update. + + The semantics of the hash functions do not provide for reading out +intermediate message digests because the calculation must be finalized +first. This finalization may for example include the number of bytes +hashed in the message digest or some padding. + + -- Function: void gcry_md_final (gcry_md_hd_t H) + Finalize the message digest calculation. This is not really needed + because `gcry_md_read' does this implicitly. After this has been + done no further updates (by means of `gcry_md_write' or + `gcry_md_putc' are allowed. Only the first call to this function + has an effect. It is implemented as a macro. + + The way to read out the calculated message digest is by using the +function: + + -- Function: unsigned char * gcry_md_read (gcry_md_hd_t H, int ALGO) + `gcry_md_read' returns the message digest after finalizing the + calculation. This function may be used as often as required but + it will always return the same value for one handle. The returned + message digest is allocated within the message context and + therefore valid until the handle is released or reseted (using + `gcry_md_close' or `gcry_md_reset'. ALGO may be given as 0 to + return the only enabled message digest or it may specify one of + the enabled algorithms. The function does return `NULL' if the + requested algorithm has not been enabled. + + Because it is often necessary to get the message digest of one block +of memory, a fast convenience function is available for this task: + + -- Function: void gcry_md_hash_buffer (int ALGO, void *DIGEST, const + void *BUFFER, size_t LENGTH); + `gcry_md_hash_buffer' is a shortcut function to calculate a message + digest of a buffer. This function does not require a context and + immediately returns the message digest of the LENGTH bytes at + BUFFER. DIGEST must be allocated by the caller, large enough to + hold the message digest yielded by the the specified algorithm + ALGO. This required size may be obtained by using the function + `gcry_md_get_algo_dlen'. + + Note that this function will abort the process if an unavailable + algorithm is used. + + Hash algorithms are identified by internal algorithm numbers (see +`gcry_md_open' for a list). However, in most applications they are +used by names, so two functions are available to map between string +representations and hash algorithm identifiers. + + -- Function: const char * gcry_md_algo_name (int ALGO) + Map the digest algorithm id ALGO to a string representation of the + algorithm name. For unknown algorithms this function returns the + string `"?"'. This function should not be used to test for the + availability of an algorithm. + + -- Function: int gcry_md_map_name (const char *NAME) + Map the algorithm with NAME to a digest algorithm identifier. + Returns 0 if the algorithm name is not known. Names representing + ASN.1 object identifiers are recognized if the IETF dotted format + is used and the OID is prefixed with either "`oid.'" or "`OID.'". + For a list of supported OIDs, see the source code at + `cipher/md.c'. This function should not be used to test for the + availability of an algorithm. + + -- Function: gcry_error_t gcry_md_get_asnoid (int ALGO, void *BUFFER, + size_t *LENGTH) + Return an DER encoded ASN.1 OID for the algorithm ALGO in the user + allocated BUFFER. LENGTH must point to variable with the available + size of BUFFER and receives after return the actual size of the + returned OID. The returned error code may be `GPG_ERR_TOO_SHORT' + if the provided buffer is to short to receive the OID; it is + possible to call the function with `NULL' for BUFFER to have it + only return the required size. The function returns 0 on success. + + + To test whether an algorithm is actually available for use, the +following macro should be used: + + -- Function: gcry_error_t gcry_md_test_algo (int ALGO) + The macro returns 0 if the algorithm ALGO is available for use. + + If the length of a message digest is not known, it can be retrieved +using the following function: + + -- Function: unsigned int gcry_md_get_algo_dlen (int ALGO) + Retrieve the length in bytes of the digest yielded by algorithm + ALGO. This is often used prior to `gcry_md_read' to allocate + sufficient memory for the digest. + + In some situations it might be hard to remember the algorithm used +for the ongoing hashing. The following function might be used to get +that information: + + -- Function: int gcry_md_get_algo (gcry_md_hd_t H) + Retrieve the algorithm used with the handle H. Note that this + does not work reliable if more than one algorithm is enabled in H. + + The following macro might also be useful: + + -- Function: int gcry_md_is_secure (gcry_md_hd_t H) + This function returns true when the digest object H is allocated + in "secure memory"; i.e. H was created with the + `GCRY_MD_FLAG_SECURE'. + + -- Function: int gcry_md_is_enabled (gcry_md_hd_t H, int ALGO) + This function returns true when the algorithm ALGO has been + enabled for the digest object H. + + Tracking bugs related to hashing is often a cumbersome task which +requires to add a lot of printf statements into the code. Libgcrypt +provides an easy way to avoid this. The actual data hashed can be +written to files on request. + + -- Function: void gcry_md_debug (gcry_md_hd_t H, const char *SUFFIX) + Enable debugging for the digest object with handle H. This + creates create files named `dbgmd-.' while doing the + actual hashing. SUFFIX is the string part in the filename. The + number is a counter incremented for each new hashing. The data in + the file is the raw data as passed to `gcry_md_write' or + `gcry_md_putc'. If `NULL' is used for SUFFIX, the debugging is + stopped and the file closed. This is only rarely required because + `gcry_md_close' implicitly stops debugging. + + The following two deprecated macros are used for debugging by old +code. They shopuld be replaced by `gcry_md_debug'. + + -- Function: void gcry_md_start_debug (gcry_md_hd_t H, const char + *SUFFIX) + Enable debugging for the digest object with handle H. This + creates create files named `dbgmd-.' while doing the + actual hashing. SUFFIX is the string part in the filename. The + number is a counter incremented for each new hashing. The data in + the file is the raw data as passed to `gcry_md_write' or + `gcry_md_putc'. + + -- Function: void gcry_md_stop_debug (gcry_md_hd_t H, int RESERVED) + Stop debugging on handle H. RESERVED should be specified as 0. + This function is usually not required because `gcry_md_close' does + implicitly stop debugging. + + +File: gcrypt.info, Node: Random Numbers, Next: S-expressions, Prev: Hashing, Up: Top + +8 Random Numbers +**************** + +* Menu: + +* Quality of random numbers:: Libgcrypt uses different quality levels. +* Retrieving random numbers:: How to retrieve random numbers. + + +File: gcrypt.info, Node: Quality of random numbers, Next: Retrieving random numbers, Up: Random Numbers + +8.1 Quality of random numbers +============================= + +Libgcypt offers random numbers of different quality levels: + + -- Data type: gcry_random_level_t + The constants for the random quality levels are of this enum type. + +`GCRY_WEAK_RANDOM' + For all functions, except for `gcry_mpi_randomize', this level maps + to GCRY_STRONG_RANDOM. If you do not want this, consider using + `gcry_create_nonce'. + +`GCRY_STRONG_RANDOM' + Use this level for session keys and similar purposes. + +`GCRY_VERY_STRONG_RANDOM' + Use this level for long term key material. + + +File: gcrypt.info, Node: Retrieving random numbers, Prev: Quality of random numbers, Up: Random Numbers + +8.2 Retrieving random numbers +============================= + + -- Function: void gcry_randomize (unsigned char *BUFFER, size_t + LENGTH, enum gcry_random_level LEVEL) + Fill BUFFER with LENGTH random bytes using a random quality as + defined by LEVEL. + + -- Function: void * gcry_random_bytes (size_t NBYTES, enum + gcry_random_level LEVEL) + Convenience function to allocate a memory block consisting of + NBYTES fresh random bytes using a random quality as defined by + LEVEL. + + -- Function: void * gcry_random_bytes_secure (size_t NBYTES, enum + gcry_random_level LEVEL) + Convenience function to allocate a memory block consisting of + NBYTES fresh random bytes using a random quality as defined by + LEVEL. This function differs from `gcry_random_bytes' in that the + returned buffer is allocated in a "secure" area of the memory. + + -- Function: void gcry_create_nonce (unsigned char *BUFFER, size_t + LENGTH) + Fill BUFFER with LENGTH unpredictable bytes. This is commonly + called a nonce and may also be used for initialization vectors and + padding. This is an extra function nearly independent of the + other random function for 3 reasons: It better protects the + regular random generator's internal state, provides better + performance and does not drain the precious entropy pool. + + + +File: gcrypt.info, Node: S-expressions, Next: MPI library, Prev: Random Numbers, Up: Top + +9 S-expressions +*************** + +S-expressions are used by the public key functions to pass complex data +structures around. These LISP like objects are used by some +cryptographic protocols (cf. RFC-2692) and Libgcrypt provides functions +to parse and construct them. For detailed information, see `Ron +Rivest, code and description of S-expressions, +`http://theory.lcs.mit.edu/~rivest/sexp.html''. + +* Menu: + +* Data types for S-expressions:: Data types related with S-expressions. +* Working with S-expressions:: How to work with S-expressions. + + +File: gcrypt.info, Node: Data types for S-expressions, Next: Working with S-expressions, Up: S-expressions + +9.1 Data types for S-expressions +================================ + + -- Data type: gcry_sexp_t + The `gcry_sexp_t' type describes an object with the Libgcrypt + internal representation of an S-expression. + + +File: gcrypt.info, Node: Working with S-expressions, Prev: Data types for S-expressions, Up: S-expressions + +9.2 Working with S-expressions +============================== + +There are several functions to create an Libgcrypt S-expression object +from its external representation or from a string template. There is +also a function to convert the internal representation back into one of +the external formats: + + -- Function: gcry_error_t gcry_sexp_new (gcry_sexp_t *R_SEXP, + const void *BUFFER, size_t LENGTH, int AUTODETECT) + This is the generic function to create an new S-expression object + from its external representation in BUFFER of LENGTH bytes. On + success the result is stored at the address given by R_SEXP. With + AUTODETECT set to 0, the data in BUFFER is expected to be in + canonized format, with AUTODETECT set to 1 the parses any of the + defined external formats. If BUFFER does not hold a valid + S-expression an error code is returned and R_SEXP set to `NULL'. + Note that the caller is responsible for releasing the newly + allocated S-expression using `gcry_sexp_release'. + + -- Function: gcry_error_t gcry_sexp_create (gcry_sexp_t *R_SEXP, + void *BUFFER, size_t LENGTH, int AUTODETECT, + void (*FREEFNC)(void*)) + This function is identical to `gcry_sexp_new' but has an extra + argument FREEFNC, which, when not set to `NULL', is expected to be + a function to release the BUFFER; most likely the standard `free' + function is used for this argument. This has the effect of + transferring the ownership of BUFFER to the created object in + R_SEXP. The advantage of using this function is that Libgcrypt + might decide to directly use the provided buffer and thus avoid + extra copying. + + -- Function: gcry_error_t gcry_sexp_sscan (gcry_sexp_t *R_SEXP, + size_t *ERROFF, const char *BUFFER, size_t LENGTH) + This is another variant of the above functions. It behaves nearly + identical but provides an ERROFF argument which will receive the + offset into the buffer where the parsing stopped on error. + + -- Function: gcry_error_t gcry_sexp_build (gcry_sexp_t *R_SEXP, + size_t *ERROFF, const char *FORMAT, ...) + This function creates an internal S-expression from the string + template FORMAT and stores it at the address of R_SEXP. If there + is a parsing error, the function returns an appropriate error code + and stores the offset into FORMAT where the parsing stopped in + ERROFF. The function supports a couple of printf-like formatting + characters and expects arguments for some of these escape + sequences right after FORMAT. The following format characters are + defined: + + `%m' + The next argument is expected to be of type `gcry_mpi_t' and + a copy of its value is inserted into the resulting + S-expression. + + `%s' + The next argument is expected to be of type `char *' and that + string is inserted into the resulting S-expression. + + `%d' + The next argument is expected to be of type `int' and its + value is inserted into the resulting S-expression. + + `%b' + The next argument is expected to be of type `int' directly + followed by an argument of type `char *'. This represents a + buffer of given length to be inserted into the resulting + S-expression. + + `%S' + The next argument is expected to be of type `gcry_sexp_t' and + a copy of that S-expression is embedded in the resulting + S-expression. The argument needs to be a regular + S-expression, starting with a parenthesis. + + + No other format characters are defined and would return an error. + Note that the format character `%%' does not exists, because a + percent sign is not a valid character in an S-expression. + + -- Function: void gcry_sexp_release (gcry_sexp_t SEXP) + Release the S-expression object SEXP. If the S-expression is + stored in secure memory it explicitly zeroises that memory; note + that this is done in addition to the zeroisation always done when + freeing secure memory. + +The next 2 functions are used to convert the internal representation +back into a regular external S-expression format and to show the +structure for debugging. + + -- Function: size_t gcry_sexp_sprint (gcry_sexp_t SEXP, int MODE, + char *BUFFER, size_t MAXLENGTH) + Copies the S-expression object SEXP into BUFFER using the format + specified in MODE. MAXLENGTH must be set to the allocated length + of BUFFER. The function returns the actual length of valid bytes + put into BUFFER or 0 if the provided buffer is too short. Passing + `NULL' for BUFFER returns the required length for BUFFER. For + convenience reasons an extra byte with value 0 is appended to the + buffer. + + The following formats are supported: + + `GCRYSEXP_FMT_DEFAULT' + Returns a convenient external S-expression representation. + + `GCRYSEXP_FMT_CANON' + Return the S-expression in canonical format. + + `GCRYSEXP_FMT_BASE64' + Not currently supported. + + `GCRYSEXP_FMT_ADVANCED' + Returns the S-expression in advanced format. + + -- Function: void gcry_sexp_dump (gcry_sexp_t SEXP) + Dumps SEXP in a format suitable for debugging to Libgcrypt's + logging stream. + +Often canonical encoding is used in the external representation. The +following function can be used to check for valid encoding and to learn +the length of the S-expression" + + -- Function: size_t gcry_sexp_canon_len (const unsigned char *BUFFER, + size_t LENGTH, size_t *ERROFF, int *ERRCODE) + Scan the canonical encoded BUFFER with implicit length values and + return the actual length this S-expression uses. For a valid + S-expression it should never return 0. If LENGTH is not 0, the + maximum length to scan is given; this can be used for syntax + checks of data passed from outside. ERRCODE and ERROFF may both be + passed as `NULL'. + + +There are functions to parse S-expressions and retrieve elements: + + -- Function: gcry_sexp_t gcry_sexp_find_token (const gcry_sexp_t LIST, + const char *TOKEN, size_t TOKLEN) + Scan the S-expression for a sublist with a type (the car of the + list) matching the string TOKEN. If TOKLEN is not 0, the token is + assumed to be raw memory of this length. The function returns a + newly allocated S-expression consisting of the found sublist or + `NULL' when not found. + + -- Function: int gcry_sexp_length (const gcry_sexp_t LIST) + Return the length of the LIST. For a valid S-expression this + should be at least 1. + + -- Function: gcry_sexp_t gcry_sexp_nth (const gcry_sexp_t LIST, + int NUMBER) + Create and return a new S-expression from the element with index + NUMBER in LIST. Note that the first element has the index 0. If + there is no such element, `NULL' is returned. + + -- Function: gcry_sexp_t gcry_sexp_car (const gcry_sexp_t LIST) + Create and return a new S-expression from the first element in + LIST; this called the "type" and should always exist and be a + string. `NULL' is returned in case of a problem. + + -- Function: gcry_sexp_t gcry_sexp_cdr (const gcry_sexp_t LIST) + Create and return a new list form all elements except for the + first one. Note that this function may return an invalid + S-expression because it is not guaranteed, that the type exists + and is a string. However, for parsing a complex S-expression it + might be useful for intermediate lists. Returns `NULL' on error. + + -- Function: const char * gcry_sexp_nth_data (const gcry_sexp_t LIST, + int NUMBER, size_t *DATALEN) + This function is used to get data from a LIST. A pointer to the + actual data with index NUMBER is returned and the length of this + data will be stored to DATALEN. If there is no data at the given + index or the index represents another list, `NULL' is returned. + *Caution:* The returned pointer is valid as long as LIST is not + modified or released. + + Here is an example on how to extract and print the surname (Meier) + from the S-expression `(Name Otto Meier (address Burgplatz 3))': + + size_t len; + const char *name; + + name = gcry_sexp_nth_data (list, 2, &len); + printf ("my name is %.*s\n", (int)len, name); + + -- Function: char * gcry_sexp_nth_string (gcry_sexp_t LIST, int NUMBER) + This function is used to get and convert data from a LIST. The + data is assumed to be a Nul terminated string. The caller must + release this returned value using `gcry_free'. If there is no + data at the given index, the index represents a list or the value + can't be converted to a string, `NULL' is returned. + + -- Function: gcry_mpi_t gcry_sexp_nth_mpi (gcry_sexp_t LIST, + int NUMBER, int MPIFMT) + This function is used to get and convert data from a LIST. This + data is assumed to be an MPI stored in the format described by + MPIFMT and returned as a standard Libgcrypt MPI. The caller must + release this returned value using `gcry_mpi_release'. If there is + no data at the given index, the index represents a list or the + value can't be converted to an MPI, `NULL' is returned. + + +File: gcrypt.info, Node: MPI library, Next: Prime numbers, Prev: S-expressions, Up: Top + +10 MPI library +************** + +* Menu: + +* Data types:: MPI related data types. +* Basic functions:: First steps with MPI numbers. +* MPI formats:: External representation of MPIs. +* Calculations:: Performing MPI calculations. +* Comparisons:: How to compare MPI values. +* Bit manipulations:: How to access single bits of MPI values. +* Miscellaneous:: Miscellaneous MPI functions. + + Public key cryptography is based on mathematics with large numbers. +To implement the public key functions, a library for handling these +large numbers is required. Because of the general usefulness of such a +library, its interface is exposed by Libgcrypt. In the context of +Libgcrypt and in most other applications, these large numbers are +called MPIs (multi-precision-integers). + + +File: gcrypt.info, Node: Data types, Next: Basic functions, Up: MPI library + +10.1 Data types +=============== + + -- Data type: gcry_mpi_t + This type represents an object to hold an MPI. + + +File: gcrypt.info, Node: Basic functions, Next: MPI formats, Prev: Data types, Up: MPI library + +10.2 Basic functions +==================== + +To work with MPIs, storage must be allocated and released for the +numbers. This can be done with one of these functions: + + -- Function: gcry_mpi_t gcry_mpi_new (unsigned int NBITS) + Allocate a new MPI object, initialize it to 0 and initially + allocate enough memory for a number of at least NBITS. This + pre-allocation is only a small performance issue and not actually + necessary because Libgcrypt automatically re-allocates the + required memory. + + -- Function: gcry_mpi_t gcry_mpi_snew (unsigned int NBITS) + This is identical to `gcry_mpi_new' but allocates the MPI in the so + called "secure memory" which in turn will take care that all + derived values will also be stored in this "secure memory". Use + this for highly confidential data like private key parameters. + + -- Function: gcry_mpi_t gcry_mpi_copy (const gcry_mpi_t A) + Create a new MPI as the exact copy of A. + + -- Function: void gcry_mpi_release (gcry_mpi_t A) + Release the MPI A and free all associated resources. Passing + `NULL' is allowed and ignored. When a MPI stored in the "secure + memory" is released, that memory gets wiped out immediately. + +The simplest operations are used to assign a new value to an MPI: + + -- Function: gcry_mpi_t gcry_mpi_set (gcry_mpi_t W, const gcry_mpi_t U) + Assign the value of U to W and return W. If `NULL' is passed for + W, a new MPI is allocated, set to the value of U and returned. + + -- Function: gcry_mpi_t gcry_mpi_set_ui (gcry_mpi_t W, unsigned long U) + Assign the value of U to W and return W. If `NULL' is passed for + W, a new MPI is allocated, set to the value of U and returned. + This function takes an `unsigned int' as type for U and thus it is + only possible to set W to small values (usually up to the word + size of the CPU). + + -- Function: void gcry_mpi_swap (gcry_mpi_t A, gcry_mpi_t B) + Swap the values of A and B. + + +File: gcrypt.info, Node: MPI formats, Next: Calculations, Prev: Basic functions, Up: MPI library + +10.3 MPI formats +================ + +The following functions are used to convert between an external +representation of an MPI and the internal one of Libgcrypt. + + -- Function: gcry_error_t gcry_mpi_scan (gcry_mpi_t *R_MPI, + enum gcry_mpi_format FORMAT, const unsigned char *BUFFER, + size_t BUFLEN, size_t *NSCANNED) + Convert the external representation of an integer stored in BUFFER + with a length of BUFLEN into a newly created MPI returned which + will be stored at the address of R_MPI. For certain formats the + length argument is not required and should be passed as `0'. + After a successful operation the variable NSCANNED receives the + number of bytes actually scanned unless NSCANNED was given as + `NULL'. FORMAT describes the format of the MPI as stored in BUFFER: + + `GCRYMPI_FMT_STD' + 2-complement stored without a length header. + + `GCRYMPI_FMT_PGP' + As used by OpenPGP (only defined as unsigned). This is + basically `GCRYMPI_FMT_STD' with a 2 byte big endian length + header. + + `GCRYMPI_FMT_SSH' + As used in the Secure Shell protocol. This is + `GCRYMPI_FMT_STD' with a 4 byte big endian header. + + `GCRYMPI_FMT_HEX' + Stored as a C style string with each byte of the MPI encoded + as 2 hex digits. When using this format, BUFLEN must be zero. + + `GCRYMPI_FMT_USG' + Simple unsigned integer. + + Note that all of the above formats store the integer in big-endian + format (MSB first). + + -- Function: gcry_error_t gcry_mpi_print (enum gcry_mpi_format FORMAT, + unsigned char *BUFFER, size_t BUFLEN, size_t *NWRITTEN, + const gcry_mpi_t A) + Convert the MPI A into an external representation described by + FORMAT (see above) and store it in the provided BUFFER which has a + usable length of at least the BUFLEN bytes. If NWRITTEN is not + NULL, it will receive the number of bytes actually stored in + BUFFER after a successful operation. + + -- Function: gcry_error_t gcry_mpi_aprint + (enum gcry_mpi_format FORMAT, unsigned char **BUFFER, + size_t *NBYTES, const gcry_mpi_t A) + Convert the MPI A into an external representation described by + FORMAT (see above) and store it in a newly allocated buffer which + address will be stored in the variable BUFFER points to. The + number of bytes stored in this buffer will be stored in the + variable NBYTES points to, unless NBYTES is `NULL'. + + -- Function: void gcry_mpi_dump (const gcry_mpi_t A) + Dump the value of A in a format suitable for debugging to + Libgcrypt's logging stream. Note that one leading space but no + trailing space or linefeed will be printed. It is okay to pass + `NULL' for A. + + +File: gcrypt.info, Node: Calculations, Next: Comparisons, Prev: MPI formats, Up: MPI library + +10.4 Calculations +================= + +Basic arithmetic operations: + + -- Function: void gcry_mpi_add (gcry_mpi_t W, gcry_mpi_t U, + gcry_mpi_t V) + W = U + V. + + -- Function: void gcry_mpi_add_ui (gcry_mpi_t W, gcry_mpi_t U, + unsigned long V) + W = U + V. Note that V is an unsigned integer. + + -- Function: void gcry_mpi_addm (gcry_mpi_t W, gcry_mpi_t U, + gcry_mpi_t V, gcry_mpi_t M) + W = U + V \bmod M. + + -- Function: void gcry_mpi_sub (gcry_mpi_t W, gcry_mpi_t U, + gcry_mpi_t V) + W = U - V. + + -- Function: void gcry_mpi_sub_ui (gcry_mpi_t W, gcry_mpi_t U, + unsigned long V) + W = U - V. V is an unsigned integer. + + -- Function: void gcry_mpi_subm (gcry_mpi_t W, gcry_mpi_t U, + gcry_mpi_t V, gcry_mpi_t M) + W = U - V \bmod M. + + -- Function: void gcry_mpi_mul (gcry_mpi_t W, gcry_mpi_t U, + gcry_mpi_t V) + W = U * V. + + -- Function: void gcry_mpi_mul_ui (gcry_mpi_t W, gcry_mpi_t U, + unsigned long V) + W = U * V. V is an unsigned integer. + + -- Function: void gcry_mpi_mulm (gcry_mpi_t W, gcry_mpi_t U, + gcry_mpi_t V, gcry_mpi_t M) + W = U * V \bmod M. + + -- Function: void gcry_mpi_mul_2exp (gcry_mpi_t W, gcry_mpi_t U, + unsigned long E) + W = U * 2^e. + + -- Function: void gcry_mpi_div (gcry_mpi_t Q, gcry_mpi_t R, + gcry_mpi_t DIVIDEND, gcry_mpi_t DIVISOR, int ROUND) + Q = DIVIDEND / DIVISOR, R = DIVIDEND \bmod DIVISOR. Q and R may + be passed as `NULL'. ROUND should be negative or 0. + + -- Function: void gcry_mpi_mod (gcry_mpi_t R, gcry_mpi_t DIVIDEND, + gcry_mpi_t DIVISOR) + R = DIVIDEND \bmod DIVISOR. + + -- Function: void gcry_mpi_powm (gcry_mpi_t W, const gcry_mpi_t B, + const gcry_mpi_t E, const gcry_mpi_t M) + W = B^e \bmod M. + + -- Function: int gcry_mpi_gcd (gcry_mpi_t G, gcry_mpi_t A, + gcry_mpi_t B) + Set G to the greatest common divisor of A and B. Return true if + the G is 1. + + -- Function: int gcry_mpi_invm (gcry_mpi_t X, gcry_mpi_t A, + gcry_mpi_t M) + Set X to the multiplicative inverse of A \bmod M. Return true if + the inverse exists. + + +File: gcrypt.info, Node: Comparisons, Next: Bit manipulations, Prev: Calculations, Up: MPI library + +10.5 Comparisons +================ + +The next 2 functions are used to compare MPIs: + + -- Function: int gcry_mpi_cmp (const gcry_mpi_t U, const gcry_mpi_t V) + Compare the multi-precision-integers number U and V returning 0 + for equality, a positive value for U > V and a negative for U < V. + + -- Function: int gcry_mpi_cmp_ui (const gcry_mpi_t U, unsigned long V) + Compare the multi-precision-integers number U with the unsigned + integer V returning 0 for equality, a positive value for U > V and + a negative for U < V. + + +File: gcrypt.info, Node: Bit manipulations, Next: Miscellaneous, Prev: Comparisons, Up: MPI library + +10.6 Bit manipulations +====================== + +There are a couple of functions to get information on arbitrary bits in +an MPI and to set or clear them: + + -- Function: unsigned int gcry_mpi_get_nbits (gcry_mpi_t A) + Return the number of bits required to represent A. + + -- Function: int gcry_mpi_test_bit (gcry_mpi_t A, unsigned int N) + Return true if bit number N (counting from 0) is set in A. + + -- Function: void gcry_mpi_set_bit (gcry_mpi_t A, unsigned int N) + Set bit number N in A. + + -- Function: void gcry_mpi_clear_bit (gcry_mpi_t A, unsigned int N) + Clear bit number N in A. + + -- Function: void gcry_mpi_set_highbit (gcry_mpi_t A, unsigned int N) + Set bit number N in A and clear all bits greater than N. + + -- Function: void gcry_mpi_clear_highbit (gcry_mpi_t A, unsigned int N) + Clear bit number N in A and all bits greater than N. + + -- Function: void gcry_mpi_rshift (gcry_mpi_t X, gcry_mpi_t A, + unsigned int N) + Shift the value of A by N bits to the right and store the result + in X. + + -- Function: void gcry_mpi_lshift (gcry_mpi_t X, gcry_mpi_t A, + unsigned int N) + Shift the value of A by N bits to the left and store the result in + X. + + +File: gcrypt.info, Node: Miscellaneous, Prev: Bit manipulations, Up: MPI library + +10.7 Miscellaneous +================== + + -- Function: gcry_mpi_t gcry_mpi_set_opaque (gcry_mpi_t A, void *P, + unsigned int NBITS) + Store NBITS of the value P points to in A and mark A as an opaque + value (i.e. an value that can't be used for any math calculation + and is only used to store an arbitrary bit pattern in A). + + WARNING: Never use an opaque MPI for actual math operations. The + only valid functions are gcry_mpi_get_opaque and gcry_mpi_release. + Use gcry_mpi_scan to convert a string of arbitrary bytes into an + MPI. + + + -- Function: void * gcry_mpi_get_opaque (gcry_mpi_t A, + unsigned int *NBITS) + Return a pointer to an opaque value stored in A and return its + size in NBITS. Note that the returned pointer is still owned by A + and that the function should never be used for an non-opaque MPI. + + -- Function: void gcry_mpi_set_flag (gcry_mpi_t A, + enum gcry_mpi_flag FLAG) + Set the FLAG for the MPI A. Currently only the flag + `GCRYMPI_FLAG_SECURE' is allowed to convert A into an MPI stored + in "secure memory". + + -- Function: void gcry_mpi_clear_flag (gcry_mpi_t A, + enum gcry_mpi_flag FLAG) + Clear FLAG for the multi-precision-integers A. Note that this + function is currently useless as no flags are allowed. + + -- Function: int gcry_mpi_get_flag (gcry_mpi_t A, + enum gcry_mpi_flag FLAG) + Return true when the FLAG is set for A. + + -- Function: void gcry_mpi_randomize (gcry_mpi_t W, + unsigned int NBITS, enum gcry_random_level LEVEL) + Set the multi-precision-integers W to a random value of NBITS, + using random data quality of level LEVEL. In case NBITS is not a + multiple of a byte, NBITS is rounded up to the next byte boundary. + When using a LEVEL of `GCRY_WEAK_RANDOM' this function makes use of + `gcry_create_nonce'. + + +File: gcrypt.info, Node: Prime numbers, Next: Utilities, Prev: MPI library, Up: Top + +11 Prime numbers +**************** + +* Menu: + +* Generation:: Generation of new prime numbers. +* Checking:: Checking if a given number is prime. + + +File: gcrypt.info, Node: Generation, Next: Checking, Up: Prime numbers + +11.1 Generation +=============== + + -- Function: gcry_error_t gcry_prime_generate (gcry_mpi_t + *PRIME,unsigned int PRIME_BITS, unsigned int FACTOR_BITS, + gcry_mpi_t **FACTORS, gcry_prime_check_func_t CB_FUNC, void + *CB_ARG, gcry_random_level_t RANDOM_LEVEL, unsigned int FLAGS) + Generate a new prime number of PRIME_BITS bits and store it in + PRIME. If FACTOR_BITS is non-zero, one of the prime factors of + (PRIME - 1) / 2 must be FACTOR_BITS bits long. If FACTORS is + non-zero, allocate a new, `NULL'-terminated array holding the + prime factors and store it in FACTORS. FLAGS might be used to + influence the prime number generation process. + + -- Function: gcry_error_t gcry_prime_group_generator (gcry_mpi_t *R_G, + gcry_mpi_t PRIME, gcry_mpi_t *FACTORS, gcry_mpi_t START_G) + Find a generator for PRIME where the factorization of (PRIME-1) is + in the `NULL' terminated array FACTORS. Return the generator as a + newly allocated MPI in R_G. If START_G is not NULL, use this as + the start for the search. + + -- Function: void gcry_prime_release_factors (gcry_mpi_t *FACTORS) + Convenience function to release the FACTORS array. + + +File: gcrypt.info, Node: Checking, Prev: Generation, Up: Prime numbers + +11.2 Checking +============= + + -- Function: gcry_error_t gcry_prime_check (gcry_mpi_t P, unsigned int + FLAGS) + Check wether the number P is prime. Returns zero in case P is + indeed a prime, returns `GPG_ERR_NO_PRIME' in case P is not a + prime and a different error code in case something went horribly + wrong. + + +File: gcrypt.info, Node: Utilities, Next: Architecture, Prev: Prime numbers, Up: Top + +12 Utilities +************ + +* Menu: + +* Memory allocation:: Functions related with memory allocation. + + +File: gcrypt.info, Node: Memory allocation, Up: Utilities + +12.1 Memory allocation +====================== + + -- Function: void * gcry_malloc (size_t N) + This function tries to allocate N bytes of memory. On success it + returns a pointer to the memory area, in an out-of-core condition, + it returns NULL. + + -- Function: void * gcry_malloc_secure (size_t N) + Like `gcry_malloc', but uses secure memory. + + -- Function: void * gcry_calloc (size_t N, size_t M) + This function allocates a cleared block of memory (i.e. + initialized with zero bytes) long enough to contain a vector of N + elements, each of size M bytes. On success it returns a pointer + to the memory block; in an out-of-core condition, it returns NULL. + + -- Function: void * gcry_calloc_secure (size_t N, size_t M) + Like `gcry_calloc', but uses secure memory. + + -- Function: void * gcry_realloc (void *P, size_t N) + This function tries to resize the memory area pointed to by P to N + bytes. On success it returns a pointer to the new memory area, in + an out-of-core condition, it returns NULL. Depending on whether + the memory pointed to by P is secure memory or not, gcry_realloc + tries to use secure memory as well. + + -- Function: void gcry_free (void *P) + Release the memory area pointed to by P. + + +File: gcrypt.info, Node: Architecture, Next: Self-Tests, Prev: Utilities, Up: Top + +13 Architecture +*************** + +This chapter describes the internal architecture of Libgcrypt. + + Libgcrypt is a function library written in ISO C-90. Any compliant +compiler should be able to build Libgcrypt as long as the target is +either a POSIX platform or compatible to the API used by Windows NT. +Provisions have been take so that the library can be directly used from +C++ applications; however building with a C++ compiler is not supported. + + Building Libgcrypt is done by using the common `./configure && make' +approach. The configure command is included in the source distribution +and as a portable shell script it works on any Unix-alike system. The +result of running the configure script are a C header file +(`config.h'), customized Makefiles, the setup of symbolic links and a +few other things. After that the make tool builds and optionally +installs the library and the documentation. See the files `INSTALL' +and `README' in the source distribution on how to do this. + + Libgcrypt is developed using a Subversion(1) repository. Although +all released versions are tagged in this repository, they should not be +used to build production versions of Libgcrypt. Instead released +tarballs should be used. These tarballs are available from several +places with the master copy at . +Announcements of new releases are posted to the + mailing list(2). + + [image src="libgcrypt-modules.png" alt="Libgcrypt subsystems"] +Figure 13.1: Libgcrypt subsystems + + Libgcrypt consists of several subsystems (*note Figure 13.1: +fig:subsystems.) and all these subsystems provide a public API; this +includes the helper subsystems like the one for S-expressions. The API +style depends on the subsystem; in general an open-use-close approach +is implemented. The open returns a handle to a context used for all +further operations on this handle, several functions may then be used +on this handle and a final close function releases all resources +associated with the handle. + +* Menu: + +* Public-Key Subsystem Architecture:: About public keys. +* Symmetric Encryption Subsystem Architecture:: About standard ciphers. +* Hashing and MACing Subsystem Architecture:: About hashing. +* Multi-Precision-Integer Subsystem Architecture:: About big integers. +* Prime-Number-Generator Subsystem Architecture:: About prime numbers. +* Random-Number Subsystem Architecture:: About random stuff. + + ---------- Footnotes ---------- + + (1) A version control system available for many platforms + + (2) See `http://www.gnupg.org/documentation/mailing-lists.en.html' +for details. + + +File: gcrypt.info, Node: Public-Key Subsystem Architecture, Next: Symmetric Encryption Subsystem Architecture, Up: Architecture + +13.1 Public-Key Architecture +============================ + +Libgcrypt implements two interfaces for public key cryptography: The +standard interface is PK interface using functions in the `gcry_pk_' +name space. The AC interface in an alternative one which is now +deprecated and will not be further described. The AC interface is also +disabled in FIPS mode. + + Because public key cryptography is almost always used to process +small amounts of data (hash values or session keys), the interface is +not implemented using the open-use-close paradigm, but with single +self-contained functions. Due to the wide variety of parameters +required by different algorithms S-expressions, as flexible way to +convey these parameters, are used. There is a set of helper functions +to work with these S-expressions. + + Aside of functions to register new algorithms, map algorithms names +to algorithms identifiers and to lookup properties of a key, the +following main functions are available: + +`gcry_pk_encrypt' + Encrypt data using a public key. + +`gcry_pk_decrypt' + Decrypt data using a private key. + +`gcry_pk_sign' + Sign data using a private key. + +`gcry_pk_verify' + Verify that a signature matches the data. + +`gcry_pk_testkey' + Perform a consistency over a public or private key. + +`gcry_pk_genkey' + Create a new public/private key pair. + + + With the help of the module registration system all these functions +lookup the module implementing the algorithm and pass the actual work +to that module. The parsing of the S-expression input and the +construction of S-expression for the return values is done by the high +level code (`cipher/pubkey.c'). Thus the internal interface between +the algorithm modules and the high level functions passes data in a +custom format. The interface to the modules is published +(`gcrypt-modules.h') so that it can used to register external +implementations of algorithms with Libgcrypt. However, for some +algorithms this module interface is to limited and thus for the +internal modules an extra interface is sometimes used to convey more +information. + + By default Libgcrypt uses a blinding technique for RSA decryption to +mitigate real world timing attacks over a network: Instead of using the +RSA decryption directly, a blinded value y = x r^e \bmod n is decrypted +and the unblinded value x' = y' r^-1 \bmod n returned. The blinding +value r is a random value with the size of the modulus n and generated +with `GCRY_WEAK_RANDOM' random level. + + The algorithm used for RSA and DSA key generation depends on whether +Libgcrypt is operated in standard or in FIPS mode. In standard mode an +algorithm based on the Lim-Lee prime number generator is used. In FIPS +mode RSA keys are generated as specified in ANSI X9.31 (1998) and DSA +keys as specified in FIPS 186-2. + + +File: gcrypt.info, Node: Symmetric Encryption Subsystem Architecture, Next: Hashing and MACing Subsystem Architecture, Prev: Public-Key Subsystem Architecture, Up: Architecture + +13.2 Symmetric Encryption Subsystem Architecture +================================================ + +The interface to work with symmetric encryption algorithms is made up +of functions from the `gcry_cipher_' name space. The implementation +follows the open-use-close paradigm and uses registered algorithm +modules for the actual work. Unless a module implements optimized +cipher mode implementations, the high level code (`cipher/cipher.c') +implements the modes and calls the core algorithm functions to process +each block. + + The most important functions are: + +`gcry_cipher_open' + Create a new instance to encrypt or decrypt using a specified + algorithm and mode. + +`gcry_cipher_close' + Release an instance. + +`gcry_cipher_setkey' + Set a key to be used for encryption or decryption. + +`gcry_cipher_setiv' + Set an initialization vector to be used for encryption or + decryption. + +`gcry_cipher_encrypt' +`gcry_cipher_decrypt' + Encrypt or decrypt data. These functions may be called with + arbitrary amounts of data and as often as needed to encrypt or + decrypt all data. + + + There are also functions to query properties of algorithms or +context, like block length, key length, map names or to enable features +like padding methods. + + +File: gcrypt.info, Node: Hashing and MACing Subsystem Architecture, Next: Multi-Precision-Integer Subsystem Architecture, Prev: Symmetric Encryption Subsystem Architecture, Up: Architecture + +13.3 Hashing and MACing Subsystem Architecture +============================================== + +The interface to work with message digests and CRC algorithms is made +up of functions from the `gcry_md_' name space. The implementation +follows the open-use-close paradigm and uses registered algorithm +modules for the actual work. Although CRC algorithms are not +considered cryptographic hash algorithms, they share enough properties +so that it makes sense to handle them in the same way. It is possible +to use several algorithms at once with one context and thus compute +them all on the same data. + + The most important functions are: + +`gcry_md_open' + Create a new message digest instance and optionally enable one + algorithm. A flag may be used to turn the message digest algorithm + into a HMAC algorithm. + +`gcry_md_enable' + Enable an additional algorithm for the instance. + +`gcry_md_setkey' + Set the key for the MAC. + +`gcry_md_write' + Pass more data for computing the message digest to an instance. + +`gcry_md_putc' + Buffered version of `gcry_md_write' implemented as a macro. + +`gcry_md_read' + Finalize the computation of the message digest or HMAC and return + the result. + +`gcry_md_close' + Release an instance + +`gcry_md_hash_buffer' + Convenience function to directly compute a message digest over a + memory buffer without the need to create an instance first. + + + There are also functions to query properties of algorithms or the +instance, like enabled algorithms, digest length, map algorithm names. +it is also possible to reset an instance or to copy the current state +of an instance at any time. Debug functions to write the hashed data +to files are available as well. + + +File: gcrypt.info, Node: Multi-Precision-Integer Subsystem Architecture, Next: Prime-Number-Generator Subsystem Architecture, Prev: Hashing and MACing Subsystem Architecture, Up: Architecture + +13.4 Multi-Precision-Integer Subsystem Architecture +=================================================== + +The implementation of Libgcrypt's big integer computation code is based +on an old release of GNU Multi-Precision Library (GMP). The decision +not to use the GMP library directly was due to stalled development at +that time and due to security requirements which could not be provided +by the code in GMP. As GMP does, Libgcrypt provides high performance +assembler implementations of low level code for several CPUS to gain +much better performance than with a generic C implementation. + +Major features of Libgcrypt's multi-precision-integer code compared to +GMP are: + + * Avoidance of stack based allocations to allow protection against + swapping out of sensitive data and for easy zeroing of sensitive + intermediate results. + + * Optional use of secure memory and tracking of its use so that + results are also put into secure memory. + + * MPIs are identified by a handle (implemented as a pointer) to give + better control over allocations and to augment them with extra + properties like opaque data. + + * Removal of unnecessary code to reduce complexity. + + * Functions specialized for public key cryptography. + + + +File: gcrypt.info, Node: Prime-Number-Generator Subsystem Architecture, Next: Random-Number Subsystem Architecture, Prev: Multi-Precision-Integer Subsystem Architecture, Up: Architecture + +13.5 Prime-Number-Generator Subsystem Architecture +================================================== + +Libgcrypt provides an interface to its prime number generator. These +functions make use of the internal prime number generator which is +required for the generation for public key key pairs. The plain prime +checking function is exported as well. + + The generation of random prime numbers is based on the Lim and Lee +algorithm to create practically save primes.(1) This algorithm creates +a pool of smaller primes, select a few of them to create candidate +primes of the form 2 * p_0 * p_1 * ... * p_n + 1, tests the candidate +for primality and permutates the pool until a prime has been found. It +is possible to clamp one of the small primes to a certain size to help +DSA style algorithms. Because most of the small primes in the pool are +not used for the resulting prime number, they are saved for later use +(see `save_pool_prime' and `get_pool_prime' in `cipher/primegen.c'). +The prime generator optionally supports the finding of an appropriate +generator. + +The primality test works in three steps: + + 1. The standard sieve algorithm using the primes up to 4999 is used + as a quick first check. + + 2. A Fermat test filters out almost all non-primes. + + 3. A 5 round Rabin-Miller test is finally used. The first round uses + a witness of 2, whereas the next rounds use a random witness. + + + To support the generation of RSA and DSA keys in FIPS mode according +to X9.31 and FIPS 186-2, Libgcrypt implements two additional prime +generation functions: `_gcry_derive_x931_prime' and +`_gcry_generate_fips186_2_prime'. These functions are internal and not +available through the public API. + + ---------- Footnotes ---------- + + (1) Chae Hoon Lim and Pil Joong Lee. A key recovery attack on +discrete log-based shemes using a prime order subgroup. In Burton S. +Kaliski Jr., editor, Advances in Cryptology: Crypto '97, pages +249­-263, Berlin / Heidelberg / New York, 1997. Springer-Verlag. +Described on page 260. + + +File: gcrypt.info, Node: Random-Number Subsystem Architecture, Prev: Prime-Number-Generator Subsystem Architecture, Up: Architecture + +13.6 Random-Number Subsystem Architecture +========================================= + +Libgcrypt provides 3 levels or random quality: The level +`GCRY_VERY_STRONG_RANDOM' usually used for key generation, the level +`GCRY_STRONG_RANDOM' for all other strong random requirements and the +function `gcry_create_nonce' which is used for weaker usages like +nonces. There is also a level `GCRY_WEAK_RANDOM' which in general maps +to `GCRY_STRONG_RANDOM' except when used with the function +`gcry_mpi_randomize', where it randomizes an multi-precision-integer +using the `gcry_create_nonce' function. + +There are two distinct random generators available: + + * The Continuously Seeded Pseudo Random Number Generator (CSPRNG), + which is based on the classic GnuPG derived big pool + implementation. Implemented in `random/random-csprng.c' and used + by default. + + * A FIPS approved ANSI X9.31 PRNG using AES with a 128 bit key. + Implemented in `random/random-fips.c' and used if Libgcrypt is in + FIPS mode. + +Both generators make use of so-called entropy gathering modules: + +rndlinux + Uses the operating system provided `/dev/random' and + `/dev/urandom' devices. + +rndunix + Runs several operating system commands to collect entropy from + sources like virtual machine and process statistics. It is a kind + of poor-man's `/dev/random' implementation. It is not available in + FIPS mode. + +rndegd + Uses the operating system provided Entropy Gathering Daemon (EGD). + The EGD basically uses the same algorithms as rndunix does. + However as a system daemon it keeps on running and thus can serve + several processes requiring entropy input and does not waste + collected entropy if the application does not need all the + collected entropy. It is not available in FIPS mode. + +rndw32 + Targeted for the Microsoft Windows OS. It uses certain properties + of that system and is the only gathering module available for that + OS. + +rndhw + Extra module to collect additional entropy by utilizing a hardware + random number generator. As of now the only supported hardware + RNG is the Padlock engine of VIA (Centaur) CPUs. It is not + available in FIPS mode. + + +* Menu: + +* CSPRNG Description:: Description of the CSPRNG. +* FIPS PRNG Description:: Description of the FIPS X9.31 PRNG. + + +File: gcrypt.info, Node: CSPRNG Description, Next: FIPS PRNG Description, Up: Random-Number Subsystem Architecture + +13.6.1 Description of the CSPRNG +-------------------------------- + +This random number generator is loosely modelled after the one +described in Peter Gutmann's paper: "Software Generation of Practically +Strong Random Numbers".(1) + + A pool of 600 bytes is used and mixed using the core RIPE-MD160 hash +transform function. Several extra features are used to make the robust +against a wide variety of attacks and to protect against failures of +subsystems. The state of the generator may be saved to a file and +initially seed form a file. + + Depending on how Libgcrypt was build the generator is able to select +the best working entropy gathering module. It makes use of the slow +and fast collection methods and requires the pool to initially seeded +form the slow gatherer or a seed file. An entropy estimation is used +to mix in enough data from the gather modules before returning the +actual random output. Process fork detection and protection is +implemented. + + The implementation of the nonce generator (for `gcry_create_nonce') +is a straightforward repeated hash design: A 28 byte buffer is +initially seeded with the PID and the time in seconds in the first 20 +bytes and with 8 bytes of random taken from the `GCRY_STRONG_RANDOM' +generator. Random numbers are then created by hashing all the 28 bytes +with SHA-1 and saving that again in the first 20 bytes. The hash is +also returned as result. + + ---------- Footnotes ---------- + + (1) Also described in chapter 6 of his book "Cryptographic Security +Architecture", New York, 2004, ISBN 0-387-95387-6. + + +File: gcrypt.info, Node: FIPS PRNG Description, Prev: CSPRNG Description, Up: Random-Number Subsystem Architecture + +13.6.2 Description of the FIPS X9.31 PRNG +----------------------------------------- + +The core of this deterministic random number generator is implemented +according to the document "NIST-Recommended Random Number Generator +Based on ANSI X9.31 Appendix A.2.4 Using the 3-Key Triple DES and AES +Algorithms", dated 2005-01-31. This implementation uses the AES +variant. + + The generator is based on contexts to utilize the same core functions +for all random levels as required by the high-level interface. All +random generators return their data in 128 bit blocks. If the caller +requests less bits, the extra bits are not used. The key for each +generator is only set once at the first time a generator context is +used. The seed value is set along with the key and again after 1000 +output blocks. + + On Unix like systems the `GCRY_VERY_STRONG_RANDOM' and +`GCRY_STRONG_RANDOM' generators are keyed and seeded using the rndlinux +module with the `/dev/radnom' device. Thus these generators may block +until the OS kernel has collected enough entropy. When used with +Microsoft Windows the rndw32 module is used instead. + + The generator used for `gcry_create_nonce' is keyed and seeded from +the `GCRY_STRONG_RANDOM' generator. Thus is may also block if the +`GCRY_STRONG_RANDOM' generator has not yet been used before and thus +gets initialized on the first use by `gcry_create_nonce'. This special +treatment is justified by the weaker requirements for a nonce generator +and to save precious kernel entropy for use by the "real" random +generators. + + A self-test facility uses a separate context to check the +functionality of the core X9.31 functions using a known answers test. +During runtime each output block is compared to the previous one to +detect a stucked generator. + + The DT value for the generator is made up of the current time down to +microseconds (if available) and a free running 64 bit counter. When +used with the test context the DT value is taken from the context and +incremented on each use. + + +File: gcrypt.info, Node: Self-Tests, Next: FIPS Mode, Prev: Architecture, Up: Top + +Appendix A Description of the Self-Tests +**************************************** + +In addition to the build time regression test suite, Libgcrypt +implements self-tests to be performed at runtime. Which self-tests are +actually used depends on the mode Libgcrypt is used in. In standard +mode a limited set of self-tests is run at the time an algorithm is +first used. Note that not all algorithms feature a self-test in +standard mode. The `GCRYCTL_SELFTEST' control command may be used to +run all implemented self-tests at any time; this will even run more +tests than those run in FIPS mode. + + If any of the self-tests fails, the library immediately returns an +error code to the caller. If Libgcrypt is in FIPS mode the self-tests +will be performed within the "Self-Test" state and any failure puts the +library into the "Error" state. + +A.1 Power-Up Tests +================== + +Power-up tests are only performed if Libgcrypt is in FIPS mode. + +A.1.1 Symmetric Cipher Algorithm Power-Up Tests +----------------------------------------------- + +The following symmetric encryption algorithm tests are run during +power-up: + +3DES + To test the 3DES 3-key EDE encryption in ECB mode these tests are + run: + 1. A known answer test is run on a 64 bit test vector processed + by 64 rounds of Single-DES block encryption and decryption + using a key changed with each round. + + 2. A known answer test is run on a 64 bit test vector processed + by 16 rounds of 2-key and 3-key Triple-DES block encryption + and decryptions using a key changed with each round. + + 3. 10 known answer tests using 3-key Triple-DES EDE encryption, + comparing the ciphertext to the known value, then running a + decryption and comparing it to the initial plaintext. + (`cipher/des.c:selftest') + +AES-128 + A known answer tests is run using one test vector and one test key + with AES in ECB mode. (`cipher/rijndael.c:selftest_basic_128') + +AES-192 + A known answer tests is run using one test vector and one test key + with AES in ECB mode. (`cipher/rijndael.c:selftest_basic_192') + +AES-256 + A known answer tests is run using one test vector and one test key + with AES in ECB mode. (`cipher/rijndael.c:selftest_basic_256') + +A.1.2 Hash Algorithm Power-Up Tests +----------------------------------- + +The following hash algorithm tests are run during power-up: + +SHA-1 + A known answer test using the string `"abc"' is run. + (`cipher/sha1.c:selftests_sha1') + +SHA-224 + A known answer test using the string `"abc"' is run. + (`cipher/sha256.c:selftests_sha224') + +SHA-256 + A known answer test using the string `"abc"' is run. + (`cipher/sha256.c:selftests_sha256') + +SHA-384 + A known answer test using the string `"abc"' is run. + (`cipher/sha512.c:selftests_sha384') + +SHA-512 + A known answer test using the string `"abc"' is run. + (`cipher/sha512.c:selftests_sha512') + +A.1.3 MAC Algorithm Power-Up Tests +---------------------------------- + +The following MAC algorithm tests are run during power-up: + +HMAC SHA-1 + A known answer test using 9 byte of data and a 64 byte key is run. + (`cipher/hmac-tests.c:selftests_sha1') + +HMAC SHA-224 + A known answer test using 28 byte of data and a 4 byte key is run. + (`cipher/hmac-tests.c:selftests_sha224') + +HMAC SHA-256 + A known answer test using 28 byte of data and a 4 byte key is run. + (`cipher/hmac-tests.c:selftests_sha256') + +HMAC SHA-384 + A known answer test using 28 byte of data and a 4 byte key is run. + (`cipher/hmac-tests.c:selftests_sha384') + +HMAC SHA-512 + A known answer test using 28 byte of data and a 4 byte key is run. + (`cipher/hmac-tests.c:selftests_sha512') + +A.1.4 Random Number Power-Up Test +--------------------------------- + +The DRNG is tested during power-up this way: + + 1. Requesting one block of random using the public interface to check + general working and the duplicated block detection. + + 2. 3 know answer tests using pre-defined keys, seed and initial DT + values. For each test 3 blocks of 16 bytes are requested and + compared to the expected result. The DT value is incremented for + each block. + +A.1.5 Public Key Algorithm Power-Up Tests +----------------------------------------- + +The public key algorithms are tested during power-up: + +RSA + A pre-defined 1024 bit RSA key is used and these tests are run in + turn: + 1. Conversion of S-expression to internal format. + (`cipher/rsa.c:selftests_rsa') + + 2. Private key consistency check. (`cipher/rsa.c:selftests_rsa') + + 3. A pre-defined 20 byte value is signed with PKCS#1 padding for + SHA-1. The result is verified using the public key against + the original data and against modified data. + (`cipher/rsa.c:selftest_sign_1024') + + 4. A 1000 bit random value is encrypted and checked that it does + not match the orginal random value. The encrtypted result is + then decrypted and checked that it macthes the original + random value. (`cipher/rsa.c:selftest_encr_1024') + +DSA + A pre-defined 1024 bit DSA key is used and these tests are run in + turn: + 1. Conversion of S-expression to internal format. + (`cipher/dsa.c:selftests_dsa') + + 2. Private key consistency check. (`cipher/dsa.c:selftests_dsa') + + 3. A pre-defined 20 byte value is signed with PKCS#1 padding for + SHA-1. The result is verified using the public key against + the original data and against modified data. + (`cipher/dsa.c:selftest_sign_1024') + +A.1.6 Integrity Power-Up Tests +------------------------------ + +The integrity of the Libgcrypt is tested during power-up but only if +checking has been enabled at build time. The check works by computing +a HMAC SHA-256 checksum over the file used to load Libgcrypt into +memory. That checksum is compared against a checksum stored in a file +of the same name but with a single dot as a prefix and a suffix of +`.hmac'. + +A.1.7 Critical Functions Power-Up Tests +--------------------------------------- + +The 3DES weak key detection is tested during power-up by calling the +detection function with keys taken from a table listening all weak +keys. The table itself is protected using a SHA-1 hash. +(`cipher/des.c:selftest') + +A.2 Conditional Tests +===================== + +The conditional tests are performed if a certain contidion is met. +This may occur at any time; the library does not necessary enter the +"Self-Test" state to run these tests but will transit to the "Error" +state if a test failed. + +A.2.1 Key-Pair Generation Tests +------------------------------- + +After an asymmetric key-pair has been generated, Libgcrypt runs a +pair-wise consistency tests on the generated key. On failure the +generated key is not used, an error code is returned and, if in FIPS +mode, the library is put into the "Error" state. + +RSA + The test uses a random number 64 bits less the size of the modulus + as plaintext and runs an encryption and decryption operation in + turn. The encrypted value is checked to not match the plaintext + and the result of the decryption is checked to match the plaintext. + + A new random number of the same size is generated, signed and + verified to test the correctness of the signing operation. As a + second signing test, the signature is modified by incrementing its + value and then verified with the expected result that the + verification fails. (`cipher/rsa.c:test_keys') + +DSA + The test uses a random number of the size of the Q parameter to + create a signature and then checks that the signature verifies. + As a second signing test, the data is modified by incrementing its + value and then verified against the signature with the expected + result that the verification fails. (`cipher/dsa.c:test_keys') + +A.2.2 Software Load Tests +------------------------- + +Loading of extra modules into libgcrypt is disabled in FIPS mode and +thus no tests are implemented. (`cipher/cipher.c:_gcry_cipher_register', +`cipher/md.c:_gcry_md_register', `cipher/pubkey.c:_gcry_pk_register') + +A.2.3 Manual Key Entry Tests +---------------------------- + +A manual key entry feature is not implemented in Libgcrypt. + +A.2.4 Continuous RNG Tests +-------------------------- + +The continuous random number test is only used in FIPS mode. The RNG +generates blocks of 128 bit size; the first block generated per context +is saved in the context and another block is generated to be returned +to the caller. Each block is compared against the saved block and then +stored in the context. If a duplicated block is detected an error is +signaled and the libray is put into the "Fatal-Error" state. +(`random/random-fips.c:x931_aes_driver') + +A.3 Application Requested Tests +=============================== + +The application may requests tests at any time by means of the +`GCRYCTL_SELFTEST' control command. Note that using these tests is not +FIPS conform: Although Libgcrypt rejects all application requests for +services while running self-tests, it does not ensure that no other +operations of Libgcrypt are still being executed. Thus, in FIPS mode +an application requesting self-tests needs to power-cycle Libgcrypt +instead. + + When self-tests are requested, Libgcrypt runs all the tests it does +during power-up as well as a few extra checks as described below. + +A.3.1 Symmetric Cipher Algorithm Tests +-------------------------------------- + +The following symmetric encryption algorithm tests are run in addition +to the power-up tests: + +AES-128 + A known answer tests with test vectors taken from NIST SP800-38a + and using the high level functions is run for block modes CFB and + OFB. + + +A.3.2 Hash Algorithm Tests +-------------------------- + +The following hash algorithm tests are run in addition to the power-up +tests: + +SHA-1 +SHA-224 +SHA-256 + 1. A known answer test using a 56 byte string is run. + + 2. A known answer test using a string of one million letters "a" + is run. + (`cipher/sha1.c:selftests_sha1', + `cipher/sha256.c:selftests_sha224', + `cipher/sha256.c:selftests_sha256') + +SHA-384 + +SHA-512 + 1. A known answer test using a 112 byte string is run. + + 2. A known answer test using a string of one million letters "a" + is run. + (`cipher/sha512.c:selftests_sha384', + `cipher/sha512.c:selftests_sha512') + +A.3.3 MAC Algorithm Tests +------------------------- + +The following MAC algorithm tests are run in addition to the power-up +tests: + +HMAC SHA-1 + 1. A known answer test using 9 byte of data and a 20 byte key is + run. + + 2. A known answer test using 9 byte of data and a 100 byte key + is run. + + 3. A known answer test using 9 byte of data and a 49 byte key is + run. + (`cipher/hmac-tests.c:selftests_sha1') + +HMAC SHA-224 +HMAC SHA-256 +HMAC SHA-384 +HMAC SHA-512 + 1. A known answer test using 9 byte of data and a 20 byte key is + run. + + 2. A known answer test using 50 byte of data and a 20 byte key + is run. + + 3. A known answer test using 50 byte of data and a 26 byte key + is run. + + 4. A known answer test using 54 byte of data and a 131 byte key + is run. + + 5. A known answer test using 152 byte of data and a 131 byte key + is run. + (`cipher/hmac-tests.c:selftests_sha224', + `cipher/hmac-tests.c:selftests_sha256', + `cipher/hmac-tests.c:selftests_sha384', + `cipher/hmac-tests.c:selftests_sha512') + + +File: gcrypt.info, Node: FIPS Mode, Next: Library Copying, Prev: Self-Tests, Up: Top + +Appendix B Description of the FIPS Mode +*************************************** + +This appendix gives detailed information pertaining to the FIPS mode. +In particular, the changes to the standard mode and the finite state +machine are described. The self-tests required in this mode are +described in the appendix on self-tests. + +B.1 Restrictions in FIPS Mode +============================= + +If Libgcrypt is used in FIPS mode these restrictions are effective: + + * The cryptographic algorithms are restricted to this list: + + GCRY_CIPHER_3DES + 3 key EDE Triple-DES symmetric encryption. + + GCRY_CIPHER_AES128 + AES 128 bit symmetric encryption. + + GCRY_CIPHER_AES192 + AES 192 bit symmetric encryption. + + GCRY_CIPHER_AES256 + AES 256 bit symmetric encryption. + + GCRY_MD_SHA1 + SHA-1 message digest. + + GCRY_MD_SHA224 + SHA-224 message digest. + + GCRY_MD_SHA256 + SHA-256 message digest. + + GCRY_MD_SHA384 + SHA-384 message digest. + + GCRY_MD_SHA512 + SHA-512 message digest. + + GCRY_MD_SHA1,GCRY_MD_FLAG_HMAC + HMAC using a SHA-1 message digest. + + GCRY_MD_SHA224,GCRY_MD_FLAG_HMAC + HMAC using a SHA-224 message digest. + + GCRY_MD_SHA256,GCRY_MD_FLAG_HMAC + HMAC using a SHA-256 message digest. + + GCRY_MD_SHA384,GCRY_MD_FLAG_HMAC + HMAC using a SHA-384 message digest. + + GCRY_MD_SHA512,GCRY_MD_FLAG_HMAC + HMAC using a SHA-512 message digest. + + GCRY_PK_RSA + RSA encryption and signing. + + GCRY_PK_DSA + DSA signing. + + Note that the CRC algorithms are not considered cryptographic + algorithms and thus are in addition available. + + * RSA key generation refuses to create a key with a keysize of less + than 1024 bits. + + * DSA key generation refuses to create a key with a keysize other + than 1024 bits. + + * The `transient-key' flag for RSA and DSA key generation is ignored. + + * Support for the VIA Padlock engine is disabled. + + * FIPS mode may only be used on systems with a /dev/random device. + Switching into FIPS mode on other systems will fail at runtime. + + * Saving and loading a random seed file is ignored. + + * An X9.31 style random number generator is used in place of the + large-pool-CSPRNG generator. + + * The command `GCRYCTL_ENABLE_QUICK_RANDOM' is ignored. + + * The Alternative Public Key Interface (`gcry_ac_xxx') is not + supported and all API calls return an error. + + * Registration of external modules is not supported. + + * Message digest debugging is disabled. + + * All debug output related to cryptographic data is suppressed. + + * On-the-fly self-tests are not performed, instead self-tests are run + before entering operational state. + + * The function `gcry_set_allocation_handler' may not be used. If it + is used Libgcrypt disables FIPS mode unless Enforced FIPS mode is + enabled, in which case Libgcrypt will enter the error state. + + * The digest algorithm MD5 may not be used. If it is used Libgcrypt + disables FIPS mode unless Enforced FIPS mode is enabled, in which + case Libgcrypt will enter the error state. + + * In Enforced FIPS mode the command `GCRYCTL_DISABLE_SECMEM' is + ignored. In standard FIPS mode it disables FIPS mode. + + * A handler set by `gcry_set_outofcore_handler' is ignored. + + * A handler set by `gcry_set_fatalerror_handler' is ignored. + + + Note that when we speak about disabling FIPS mode, it merely means +that the function `gcry_fips_mode_active' returns false; it does not +mean that any non FIPS algorithms are allowed. + +B.2 FIPS Finite State Machine +============================= + +The FIPS mode of libgcrypt implements a finite state machine (FSM) using +8 states (*note tbl:fips-states::) and checks at runtime that only valid +transitions (*note tbl:fips-state-transitions::) may happen. + + [image src="fips-fsm.png" alt="FIPS FSM Diagram"] +Figure B.1: FIPS mode state diagram + +States used by the FIPS FSM: +Power-Off + Libgcrypt is not runtime linked to another application. This + usually means that the library is not loaded into main memory. + This state is documentation only. + +Power-On + Libgcrypt is loaded into memory and API calls may be made. + Compiler introducted constructor functions may be run. Note that + Libgcrypt does not implement any arbitrary constructor functions + to be called by the operating system + +Init + The Libgcrypt initialization functions are performed and the + library has not yet run any self-test. + +Self-Test + Libgcrypt is performing self-tests. + +Operational + Libgcrypt is in the operational state and all interfaces may be + used. + +Error + Libgrypt is in the error state. When calling any FIPS relevant + interfaces they either return an error (`GPG_ERR_NOT_OPERATIONAL') + or put Libgcrypt into the Fatal-Error state and won't return. + +Fatal-Error + Libgcrypt is in a non-recoverable error state and will + automatically transit into the Shutdown state. + +Shutdown + Libgcrypt is about to be terminated and removed from the memory. + The application may at this point still runing cleanup handlers. + + +Table B.1: FIPS mode states + +The valid state transitions (*note Figure B.1: fig:fips-fsm.) are: +`1' + Power-Off to Power-On is implicitly done by the OS loading + Libgcrypt as a shared library and having it linked to an + application. + +`2' + Power-On to Init is triggered by the application calling the + Libgcrypt intialization function `gcry_check_version'. + +`3' + Init to Self-Test is either triggred by a dedicated API call or + implicit by invoking a libgrypt service conrolled by the FSM. + +`4' + Self-Test to Operational is triggered after all self-tests passed + successfully. + +`5' + Operational to Shutdown is an artifical state without any direct + action in Libgcrypt. When reaching the Shutdown state the library + is deinitialized and can't return to any other state again. + +`6' + Shutdown to Power-off is the process of removing Libgcrypt from the + computer's memory. For obvious reasons the Power-Off state can't + be represented within Libgcrypt and thus this transition is for + documentation only. + +`7' + Operational to Error is triggered if Libgcrypt detected an + application error which can't be returned to the caller but still + allows Libgcrypt to properly run. In the Error state all FIPS + relevant interfaces return an error code. + +`8' + Error to Shutdown is similar to the Operational to Shutdown + transition (5). + +`9' + Error to Fatal-Error is triggred if Libgrypt detects an fatal error + while already being in Error state. + +`10' + Fatal-Error to Shutdown is automatically entered by Libgcrypt + after having reported the error. + +`11' + Power-On to Shutdown is an artifical state to document that + Libgcrypt has not ye been initializaed but the process is about to + terminate. + +`12' + Power-On to Fatal-Error will be triggerd if certain Libgcrypt + functions are used without having reached the Init state. + +`13' + Self-Test to Fatal-Error is triggred by severe errors in Libgcrypt + while running self-tests. + +`14' + Self-Test to Error is triggred by a failed self-test. + +`15' + Operational to Fatal-Error is triggered if Libcrypt encountered a + non-recoverable error. + +`16' + Operational to Self-Test is triggred if the application requested + to run the self-tests again. + +`17' + Error to Self-Test is triggered if the application has requested + to run self-tests to get to get back into operational state after + an error. + +`18' + Init to Error is triggered by errors in the initialization code. + +`19' + Init to Fatal-Error is triggered by non-recoverable errors in the + initialization code. + +`20' + Error to Error is triggered by errors while already in the Error + state. + + +Table B.2: FIPS mode state transitions + +B.3 FIPS Miscellaneous Information +================================== + +Libgcrypt does not do any key management on itself; the application +needs to care about it. Keys which are passed to Libgcrypt should be +allocated in secure memory as available with the functions +`gcry_malloc_secure' and `gcry_calloc_secure'. By calling `gcry_free' +on this memory, the memory and thus the keys are overwritten with zero +bytes before releasing the memory. + + For use with the random number generator, Libgcrypt generates 3 +internal keys which are stored in the encryption contexts used by the +RNG. These keys are stored in secure memory for the lifetime of the +process. Application are required to use `GCRYCTL_TERM_SECMEM' before +process termination. This will zero out the entire secure memory and +thus also the encryption contexts with these keys. + + +File: gcrypt.info, Node: Library Copying, Next: Copying, Prev: FIPS Mode, Up: Top + +GNU Lesser General Public License +********************************* + + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence the + version number 2.1.] + +Preamble +======== + +The licenses for most software are designed to take away your freedom +to share and change it. By contrast, the GNU General Public Licenses +are intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software--typically libraries--of the Free +Software Foundation and other authors who decide to use it. You can use +it too, but we suggest you first think carefully about whether this +license or the ordinary General Public License is the better strategy to +use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of it +in new free programs; and that you are informed that you can do these +things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know that +what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and is +quite different from the ordinary General Public License. We use this +license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does _Less_ to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of free +software. For example, permission to use the GNU C Library in non-free +programs enables many more people to use the whole GNU operating +system, as well as its variant, the GNU/Linux operating system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run that +program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 0. This License Agreement applies to any software library or other + program which contains a notice placed by the copyright holder or + other authorized party saying it may be distributed under the + terms of this Lesser General Public License (also called "this + License"). Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work + which has been distributed under these terms. A "work based on the + Library" means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or + translated straightforwardly into another language. (Hereinafter, + translation is included without limitation in the term + "modification".) + + "Source code" for a work means the preferred form of the work for + making modifications to it. For a library, complete source code + means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to + control compilation and installation of the library. + + Activities other than copying, distribution and modification are + not covered by this License; they are outside its scope. The act + of running a program using the Library is not restricted, and + output from such a program is covered only if its contents + constitute a work based on the Library (independent of the use of + the Library in a tool for writing it). Whether that is true + depends on what the Library does and what the program that uses + the Library does. + + 1. You may copy and distribute verbatim copies of the Library's + complete source code as you receive it, in any medium, provided + that you conspicuously and appropriately publish on each copy an + appropriate copyright notice and disclaimer of warranty; keep + intact all the notices that refer to this License and to the + absence of any warranty; and distribute a copy of this License + along with the Library. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange + for a fee. + + 2. You may modify your copy or copies of the Library or any portion + of it, thus forming a work based on the Library, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a. The modified work must itself be a software library. + + b. You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c. You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d. If a facility in the modified Library refers to a function or + a table of data to be supplied by an application program that + uses the facility, other than as an argument passed when the + facility is invoked, then you must make a good faith effort + to ensure that, in the event an application does not supply + such function or table, the facility still operates, and + performs whatever part of its purpose remains meaningful. + + (For example, a function in a library to compute square roots + has a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function + must be optional: if the application does not supply it, the + square root function must still compute square roots.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the + Library, and can be reasonably considered independent and separate + works in themselves, then this License, and its terms, do not + apply to those sections when you distribute them as separate + works. But when you distribute the same sections as part of a + whole which is a work based on the Library, the distribution of + the whole must be on the terms of this License, whose permissions + for other licensees extend to the entire whole, and thus to each + and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Library. + + In addition, mere aggregation of another work not based on the + Library with the Library (or with a work based on the Library) on + a volume of a storage or distribution medium does not bring the + other work under the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public + License instead of this License to a given copy of the Library. + To do this, you must alter all the notices that refer to this + License, so that they refer to the ordinary GNU General Public + License, version 2, instead of to this License. (If a newer + version than version 2 of the ordinary GNU General Public License + has appeared, then you can specify that version instead if you + wish.) Do not make any other change in these notices. + + Once this change is made in a given copy, it is irreversible for + that copy, so the ordinary GNU General Public License applies to + all subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of + the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or + derivative of it, under Section 2) in object code or executable + form under the terms of Sections 1 and 2 above provided that you + accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software + interchange. + + If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy + the source code from the same place satisfies the requirement to + distribute the source code, even though third parties are not + compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the + Library, but is designed to work with the Library by being + compiled or linked with it, is called a "work that uses the + Library". Such a work, in isolation, is not a derivative work of + the Library, and therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library + creates an executable that is a derivative of the Library (because + it contains portions of the Library), rather than a "work that + uses the library". The executable is therefore covered by this + License. Section 6 states terms for distribution of such + executables. + + When a "work that uses the Library" uses material from a header + file that is part of the Library, the object code for the work may + be a derivative work of the Library even though the source code is + not. Whether this is true is especially significant if the work + can be linked without the Library, or if the work is itself a + library. The threshold for this to be true is not precisely + defined by law. + + If such an object file uses only numerical parameters, data + structure layouts and accessors, and small macros and small inline + functions (ten lines or less in length), then the use of the object + file is unrestricted, regardless of whether it is legally a + derivative work. (Executables containing this object code plus + portions of the Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section + 6. Any executables containing that work also fall under Section 6, + whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or + link a "work that uses the Library" with the Library to produce a + work containing portions of the Library, and distribute that work + under terms of your choice, provided that the terms permit + modification of the work for the customer's own use and reverse + engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered + by this License. You must supply a copy of this License. If the + work during execution displays copyright notices, you must include + the copyright notice for the Library among them, as well as a + reference directing the user to the copy of this License. Also, + you must do one of these things: + + a. Accompany the work with the complete corresponding + machine-readable source code for the Library including + whatever changes were used in the work (which must be + distributed under Sections 1 and 2 above); and, if the work + is an executable linked with the Library, with the complete + machine-readable "work that uses the Library", as object code + and/or source code, so that the user can modify the Library + and then relink to produce a modified executable containing + the modified Library. (It is understood that the user who + changes the contents of definitions files in the Library will + not necessarily be able to recompile the application to use + the modified definitions.) + + b. Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run + time a copy of the library already present on the user's + computer system, rather than copying library functions into + the executable, and (2) will operate properly with a modified + version of the library, if the user installs one, as long as + the modified version is interface-compatible with the version + that the work was made with. + + c. Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d. If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the + above specified materials from the same place. + + e. Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the + Library" must include any data and utility programs needed for + reproducing the executable from it. However, as a special + exception, the materials to be distributed need not include + anything that is normally distributed (in either source or binary + form) with the major components (compiler, kernel, and so on) of + the operating system on which the executable runs, unless that + component itself accompanies the executable. + + It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you + cannot use both them and the Library together in an executable + that you distribute. + + 7. You may place library facilities that are a work based on the + Library side-by-side in a single library together with other + library facilities not covered by this License, and distribute + such a combined library, provided that the separate distribution + of the work based on the Library and of the other library + facilities is otherwise permitted, and provided that you do these + two things: + + a. Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b. Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same + work. + + 8. You may not copy, modify, sublicense, link with, or distribute the + Library except as expressly provided under this License. Any + attempt otherwise to copy, modify, sublicense, link with, or + distribute the Library is void, and will automatically terminate + your rights under this License. However, parties who have + received copies, or rights, from you under this License will not + have their licenses terminated so long as such parties remain in + full compliance. + + 9. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify + or distribute the Library or its derivative works. These actions + are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Library (or any work + based on the Library), you indicate your acceptance of this + License to do so, and all its terms and conditions for copying, + distributing or modifying the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the + Library), the recipient automatically receives a license from the + original licensor to copy, distribute, link with or modify the + Library subject to these terms and conditions. You may not impose + any further restrictions on the recipients' exercise of the rights + granted herein. You are not responsible for enforcing compliance + by third parties with this License. + + 11. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent + issues), conditions are imposed on you (whether by court order, + agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this + License. If you cannot distribute so as to satisfy simultaneously + your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the + Library at all. For example, if a patent license would not permit + royalty-free redistribution of the Library by all those who + receive copies directly or indirectly through you, then the only + way you could satisfy both it and this License would be to refrain + entirely from distribution of the Library. + + If any portion of this section is held invalid or unenforceable + under any particular circumstance, the balance of the section is + intended to apply, and the section as a whole is intended to apply + in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of + any such claims; this section has the sole purpose of protecting + the integrity of the free software distribution system which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is + willing to distribute software through any other system and a + licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed + to be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in + certain countries either by patents or by copyrighted interfaces, + the original copyright holder who places the Library under this + License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only + in or among countries not thus excluded. In such case, this + License incorporates the limitation as if written in the body of + this License. + + 13. The Free Software Foundation may publish revised and/or new + versions of the Lesser General Public License from time to time. + Such new versions will be similar in spirit to the present version, + but may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Library specifies a version number of this License which applies + to it and "any later version", you have the option of following + the terms and conditions either of that version or of any later + version published by the Free Software Foundation. If the Library + does not specify a license version number, you may choose any + version ever published by the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free + programs whose distribution conditions are incompatible with these, + write to the author to ask for permission. For software which is + copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free + status of all derivatives of our free software and of promoting + the sharing and reuse of software generally. + + NO WARRANTY + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE + LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE + QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE + LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY + SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY + OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Libraries +============================================== + +If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of +the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should have +at least the "copyright" line and a pointer to where the full notice is +found. + + ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. + Copyright (C) YEAR NAME OF AUTHOR + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at + your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, + USA. + + Also add information on how to contact you by electronic and paper +mail. + + You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the library + `Frob' (a library for tweaking knobs) written by James Random Hacker. + + SIGNATURE OF TY COON, 1 April 1990 + Ty Coon, President of Vice + + That's all there is to it! + + +File: gcrypt.info, Node: Copying, Next: Figures and Tables, Prev: Library Copying, Up: Top + +GNU General Public License +************************** + + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Preamble +======== + +The licenses for most software are designed to take away your freedom +to share and change it. By contrast, the GNU General Public License is +intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it in +new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, +and (2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 1. This License applies to any program or other work which contains a + notice placed by the copyright holder saying it may be distributed + under the terms of this General Public License. The "Program", + below, refers to any such program or work, and a "work based on + the Program" means either the Program or any derivative work under + copyright law: that is to say, a work containing the Program or a + portion of it, either verbatim or with modifications and/or + translated into another language. (Hereinafter, translation is + included without limitation in the term "modification".) Each + licensee is addressed as "you". + + Activities other than copying, distribution and modification are + not covered by this License; they are outside its scope. The act + of running the Program is not restricted, and the output from the + Program is covered only if its contents constitute a work based on + the Program (independent of having been made by running the + Program). Whether that is true depends on what the Program does. + + 2. You may copy and distribute verbatim copies of the Program's + source code as you receive it, in any medium, provided that you + conspicuously and appropriately publish on each copy an appropriate + copyright notice and disclaimer of warranty; keep intact all the + notices that refer to this License and to the absence of any + warranty; and give any other recipients of the Program a copy of + this License along with the Program. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange + for a fee. + + 3. You may modify your copy or copies of the Program or any portion + of it, thus forming a work based on the Program, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a. You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b. You must cause any work that you distribute or publish, that + in whole or in part contains or is derived from the Program + or any part thereof, to be licensed as a whole at no charge + to all third parties under the terms of this License. + + c. If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display + an announcement including an appropriate copyright notice and + a notice that there is no warranty (or else, saying that you + provide a warranty) and that users may redistribute the + program under these conditions, and telling the user how to + view a copy of this License. (Exception: if the Program + itself is interactive but does not normally print such an + announcement, your work based on the Program is not required + to print an announcement.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the + Program, and can be reasonably considered independent and separate + works in themselves, then this License, and its terms, do not + apply to those sections when you distribute them as separate + works. But when you distribute the same sections as part of a + whole which is a work based on the Program, the distribution of + the whole must be on the terms of this License, whose permissions + for other licensees extend to the entire whole, and thus to each + and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Program. + + In addition, mere aggregation of another work not based on the + Program with the Program (or with a work based on the Program) on + a volume of a storage or distribution medium does not bring the + other work under the scope of this License. + + 4. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms + of Sections 1 and 2 above provided that you also do one of the + following: + + a. Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Sections 1 and 2 above on a medium customarily used for + software interchange; or, + + b. Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange; or, + + c. Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with + such an offer, in accord with Subsection b above.) + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete + source code means all the source code for all modules it contains, + plus any associated interface definition files, plus the scripts + used to control compilation and installation of the executable. + However, as a special exception, the source code distributed need + not include anything that is normally distributed (in either + source or binary form) with the major components (compiler, + kernel, and so on) of the operating system on which the executable + runs, unless that component itself accompanies the executable. + + If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + 5. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this + License. However, parties who have received copies, or rights, + from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 6. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify + or distribute the Program or its derivative works. These actions + are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Program (or any work + based on the Program), you indicate your acceptance of this + License to do so, and all its terms and conditions for copying, + distributing or modifying the Program or works based on it. + + 7. Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program + subject to these terms and conditions. You may not impose any + further restrictions on the recipients' exercise of the rights + granted herein. You are not responsible for enforcing compliance + by third parties to this License. + + 8. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent + issues), conditions are imposed on you (whether by court order, + agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this + License. If you cannot distribute so as to satisfy simultaneously + your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the + Program at all. For example, if a patent license would not permit + royalty-free redistribution of the Program by all those who + receive copies directly or indirectly through you, then the only + way you could satisfy both it and this License would be to refrain + entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable + under any particular circumstance, the balance of the section is + intended to apply and the section as a whole is intended to apply + in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of + any such claims; this section has the sole purpose of protecting + the integrity of the free software distribution system, which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is + willing to distribute software through any other system and a + licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed + to be a consequence of the rest of this License. + + 9. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, + the original copyright holder who places the Program under this + License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only + in or among countries not thus excluded. In such case, this + License incorporates the limitation as if written in the body of + this License. + + 10. The Free Software Foundation may publish revised and/or new + versions of the General Public License from time to time. Such + new versions will be similar in spirit to the present version, but + may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Program specifies a version number of this License which applies + to it and "any later version", you have the option of following + the terms and conditions either of that version or of any later + version published by the Free Software Foundation. If the Program + does not specify a version number of this License, you may choose + any version ever published by the Free Software Foundation. + + 11. If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the + author to ask for permission. For software which is copyrighted + by the Free Software Foundation, write to the Free Software + Foundation; we sometimes make exceptions for this. Our decision + will be guided by the two goals of preserving the free status of + all derivatives of our free software and of promoting the sharing + and reuse of software generally. + + NO WARRANTY + 12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE + LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE + QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE + PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY + SERVICING, REPAIR OR CORRECTION. + + 13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY + OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Programs +============================================= + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + ONE LINE TO GIVE THE PROGRAM'S NAME AND AN IDEA OF WHAT IT DOES. + Copyright (C) 19YY NAME OF AUTHOR + + 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. + + Also add information on how to contact you by electronic and paper +mail. + + If the program is interactive, make it output a short notice like +this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details + type `show w'. This is free software, and you are welcome + to redistribute it under certain conditions; type `show c' + for details. + + The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. + + You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the program, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright + interest in the program `Gnomovision' + (which makes passes at compilers) written + by James Hacker. + + SIGNATURE OF TY COON, 1 April 1989 + Ty Coon, President of Vice + + This General Public License does not permit incorporating your +program into proprietary programs. If your program is a subroutine +library, you may consider it more useful to permit linking proprietary +applications with the library. If this is what you want to do, use the +GNU Library General Public License instead of this License. + + +File: gcrypt.info, Node: Figures and Tables, Next: Concept Index, Prev: Copying, Up: Top + +List of Figures and Tables +************************** + +* Menu: + +* Figure 13.1: Libgcrypt subsystems: fig:subsystems. +* Figure B.1: FIPS mode state ...: fig:fips-fsm. + +* Menu: + +* Table B.1: FIPS mode states: tbl:fips-states. +* Table B.2: FIPS mode state ...: tbl:fips-state-transitions. + + +File: gcrypt.info, Node: Concept Index, Next: Function and Data Index, Prev: Figures and Tables, Up: Top + +Concept Index +************* + +[index] +* Menu: + +* 3DES: Available ciphers. (line 16) +* Advanced Encryption Standard: Available ciphers. (line 37) +* AES: Available ciphers. (line 37) +* Arcfour: Available ciphers. (line 54) +* Blowfish: Available ciphers. (line 24) +* Camellia: Available ciphers. (line 81) +* CAST5: Available ciphers. (line 21) +* CBC, Cipher Block Chaining mode: Available cipher modes. + (line 20) +* CBC-MAC: Working with cipher handles. + (line 52) +* CFB, Cipher Feedback mode: Available cipher modes. + (line 16) +* cipher text stealing: Working with cipher handles. + (line 45) +* CRC32: Available hash algorithms. + (line 6) +* CTR, Counter mode: Available cipher modes. + (line 29) +* DES: Available ciphers. (line 59) +* DES-EDE: Available ciphers. (line 16) +* Digital Encryption Standard: Available ciphers. (line 16) +* ECB, Electronic Codebook mode: Available cipher modes. + (line 13) +* Enforced FIPS mode: Enabling FIPS mode. (line 30) +* error codes: Error Values. (line 6) +* error codes, list of <1>: Error Codes. (line 6) +* error codes, list of: Error Sources. (line 6) +* error codes, printing of: Error Strings. (line 6) +* error sources: Error Values. (line 6) +* error sources, printing of: Error Strings. (line 6) +* error strings: Error Strings. (line 6) +* error values: Error Values. (line 6) +* error values, printing of: Error Strings. (line 6) +* FIPS 140: Enabling FIPS mode. (line 6) +* FIPS 186 <1>: Public-Key Subsystem Architecture. + (line 63) +* FIPS 186: General public-key related Functions. + (line 256) +* FIPS mode: Enabling FIPS mode. (line 6) +* GPL, GNU General Public License: Copying. (line 6) +* HAVAL: Available hash algorithms. + (line 6) +* HMAC: Working with hash algorithms. + (line 27) +* IDEA: Available ciphers. (line 11) +* LGPL, GNU Lesser General Public License: Library Copying. (line 6) +* MD2, MD4, MD5: Available hash algorithms. + (line 6) +* OFB, Output Feedback mode: Available cipher modes. + (line 26) +* RC2: Available ciphers. (line 71) +* RC4: Available ciphers. (line 54) +* rfc-2268: Available ciphers. (line 71) +* Rijndael: Available ciphers. (line 37) +* RIPE-MD-160: Available hash algorithms. + (line 6) +* Seed (cipher): Available ciphers. (line 76) +* Serpent: Available ciphers. (line 67) +* SHA-1: Available hash algorithms. + (line 6) +* SHA-224, SHA-256, SHA-384, SHA-512: Available hash algorithms. + (line 6) +* sync mode (OpenPGP): Working with cipher handles. + (line 40) +* TIGER: Available hash algorithms. + (line 6) +* Triple-DES: Available ciphers. (line 16) +* Twofish: Available ciphers. (line 48) +* Whirlpool: Available hash algorithms. + (line 6) +* X9.31 <1>: Public-Key Subsystem Architecture. + (line 63) +* X9.31: General public-key related Functions. + (line 249) + + +File: gcrypt.info, Node: Function and Data Index, Prev: Concept Index, Up: Top + +Function and Data Index +*********************** + +[index] +* Menu: + +* AM_PATH_LIBGCRYPT: Building sources using Automake. + (line 13) +* gcry_ac_close: Working with handles. + (line 21) +* gcry_ac_data_clear: Working with sets of data. + (line 75) +* gcry_ac_data_copy: Working with sets of data. + (line 53) +* gcry_ac_data_decode: Using cryptographic functions. + (line 100) +* gcry_ac_data_decrypt: Using cryptographic functions. + (line 40) +* gcry_ac_data_decrypt_scheme: Using cryptographic functions. + (line 137) +* gcry_ac_data_destroy: Working with sets of data. + (line 41) +* gcry_ac_data_encode: Using cryptographic functions. + (line 93) +* gcry_ac_data_encrypt: Using cryptographic functions. + (line 33) +* gcry_ac_data_encrypt_scheme: Using cryptographic functions. + (line 127) +* gcry_ac_data_from_sexp: Working with sets of data. + (line 93) +* gcry_ac_data_get_index: Working with sets of data. + (line 69) +* gcry_ac_data_get_name: Working with sets of data. + (line 61) +* gcry_ac_data_length: Working with sets of data. + (line 57) +* gcry_ac_data_new: Working with sets of data. + (line 38) +* gcry_ac_data_set: Working with sets of data. + (line 45) +* gcry_ac_data_sign: Using cryptographic functions. + (line 48) +* gcry_ac_data_sign_scheme: Using cryptographic functions. + (line 147) +* gcry_ac_data_t: Working with sets of data. + (line 20) +* gcry_ac_data_to_sexp: Working with sets of data. + (line 79) +* gcry_ac_data_verify: Using cryptographic functions. + (line 54) +* gcry_ac_data_verify_scheme: Using cryptographic functions. + (line 157) +* gcry_ac_id_t: Available asymmetric algorithms. + (line 11) +* gcry_ac_id_to_name: Handle-independent functions. + (line 10) +* gcry_ac_io_init: Working with IO objects. + (line 22) +* gcry_ac_io_init_va: Working with IO objects. + (line 28) +* gcry_ac_io_t: Working with IO objects. + (line 10) +* gcry_ac_key_data_get: Working with keys. (line 93) +* gcry_ac_key_destroy: Working with keys. (line 86) +* gcry_ac_key_get_grip: Working with keys. (line 105) +* gcry_ac_key_get_nbits: Working with keys. (line 101) +* gcry_ac_key_init: Working with keys. (line 30) +* gcry_ac_key_pair_destroy: Working with keys. (line 90) +* gcry_ac_key_pair_extract: Working with keys. (line 83) +* gcry_ac_key_pair_generate: Working with keys. (line 36) +* gcry_ac_key_pair_t: Working with keys. (line 20) +* gcry_ac_key_t: Working with keys. (line 16) +* gcry_ac_key_test: Working with keys. (line 97) +* gcry_ac_key_type_t: Working with keys. (line 7) +* gcry_ac_name_to_id: Handle-independent functions. + (line 15) +* gcry_ac_open: Working with handles. + (line 11) +* gcry_calloc: Memory allocation. (line 15) +* gcry_calloc_secure: Memory allocation. (line 21) +* gcry_check_version: Initializing the library. + (line 17) +* gcry_cipher_algo_info: General cipher functions. + (line 12) +* gcry_cipher_algo_name: General cipher functions. + (line 39) +* gcry_cipher_close: Working with cipher handles. + (line 59) +* gcry_cipher_ctl: Working with cipher handles. + (line 159) +* gcry_cipher_decrypt: Working with cipher handles. + (line 129) +* gcry_cipher_decrypt_t: Cipher modules. (line 80) +* gcry_cipher_encrypt: Working with cipher handles. + (line 110) +* gcry_cipher_encrypt_t: Cipher modules. (line 75) +* gcry_cipher_info: Working with cipher handles. + (line 168) +* gcry_cipher_list: Cipher modules. (line 106) +* gcry_cipher_map_name: General cipher functions. + (line 45) +* gcry_cipher_mode_from_oid: General cipher functions. + (line 50) +* gcry_cipher_oid_spec_t: Cipher modules. (line 60) +* gcry_cipher_open: Working with cipher handles. + (line 11) +* gcry_cipher_register: Cipher modules. (line 96) +* gcry_cipher_reset: Working with cipher handles. + (line 97) +* gcry_cipher_setctr: Working with cipher handles. + (line 90) +* gcry_cipher_setiv: Working with cipher handles. + (line 83) +* gcry_cipher_setkey: Working with cipher handles. + (line 68) +* gcry_cipher_setkey_t: Cipher modules. (line 70) +* gcry_cipher_spec_t: Cipher modules. (line 12) +* gcry_cipher_stdecrypt_t: Cipher modules. (line 90) +* gcry_cipher_stencrypt_t: Cipher modules. (line 85) +* gcry_cipher_sync: Working with cipher handles. + (line 149) +* gcry_cipher_unregister: Cipher modules. (line 101) +* gcry_control: Controlling the library. + (line 7) +* gcry_create_nonce: Retrieving random numbers. + (line 26) +* gcry_err_code: Error Values. (line 43) +* gcry_err_code_from_errno: Error Values. (line 95) +* gcry_err_code_t: Error Values. (line 7) +* gcry_err_code_to_errno: Error Values. (line 100) +* gcry_err_make: Error Values. (line 57) +* gcry_err_make_from_errno: Error Values. (line 81) +* gcry_err_source: Error Values. (line 49) +* gcry_err_source_t: Error Values. (line 14) +* gcry_error: Error Values. (line 64) +* gcry_error_from_errno: Error Values. (line 86) +* gcry_error_t: Error Values. (line 25) +* gcry_fips_mode_active: Controlling the library. + (line 221) +* gcry_free: Memory allocation. (line 31) +* gcry_handler_alloc_t: Allocation handler. (line 12) +* gcry_handler_error_t: Error handler. (line 27) +* gcry_handler_free_t: Allocation handler. (line 24) +* gcry_handler_log_t: Logging handler. (line 7) +* gcry_handler_no_mem_t: Error handler. (line 11) +* gcry_handler_progress_t: Progress handler. (line 10) +* gcry_handler_realloc_t: Allocation handler. (line 20) +* gcry_handler_secure_check_t: Allocation handler. (line 16) +* gcry_malloc: Memory allocation. (line 7) +* gcry_malloc_secure: Memory allocation. (line 12) +* gcry_md_algo_name: Working with hash algorithms. + (line 154) +* gcry_md_close: Working with hash algorithms. + (line 61) +* gcry_md_copy: Working with hash algorithms. + (line 84) +* gcry_md_debug: Working with hash algorithms. + (line 218) +* gcry_md_enable: Working with hash algorithms. + (line 44) +* gcry_md_final: Working with hash algorithms. + (line 112) +* gcry_md_final_t: Hash algorithm modules. + (line 73) +* gcry_md_get_algo: Working with hash algorithms. + (line 198) +* gcry_md_get_algo_dlen: Working with hash algorithms. + (line 189) +* gcry_md_get_asnoid: Working with hash algorithms. + (line 170) +* gcry_md_hash_buffer: Working with hash algorithms. + (line 137) +* gcry_md_init_t: Hash algorithm modules. + (line 65) +* gcry_md_is_enabled: Working with hash algorithms. + (line 209) +* gcry_md_is_secure: Working with hash algorithms. + (line 204) +* gcry_md_list: Hash algorithm modules. + (line 91) +* gcry_md_map_name: Working with hash algorithms. + (line 160) +* gcry_md_oid_spec_t: Hash algorithm modules. + (line 57) +* gcry_md_open: Working with hash algorithms. + (line 11) +* gcry_md_putc: Working with hash algorithms. + (line 102) +* gcry_md_read: Working with hash algorithms. + (line 122) +* gcry_md_read_t: Hash algorithm modules. + (line 77) +* gcry_md_register: Hash algorithm modules. + (line 82) +* gcry_md_reset: Working with hash algorithms. + (line 72) +* gcry_md_setkey: Working with hash algorithms. + (line 53) +* gcry_md_spec_t: Hash algorithm modules. + (line 12) +* gcry_md_start_debug: Working with hash algorithms. + (line 232) +* gcry_md_stop_debug: Working with hash algorithms. + (line 240) +* gcry_md_test_algo: Working with hash algorithms. + (line 183) +* gcry_md_unregister: Hash algorithm modules. + (line 87) +* gcry_md_write: Working with hash algorithms. + (line 97) +* gcry_md_write_t: Hash algorithm modules. + (line 69) +* gcry_module_t: Modules. (line 10) +* gcry_mpi_add: Calculations. (line 10) +* gcry_mpi_add_ui: Calculations. (line 14) +* gcry_mpi_addm: Calculations. (line 18) +* gcry_mpi_aprint: MPI formats. (line 54) +* gcry_mpi_clear_bit: Bit manipulations. (line 19) +* gcry_mpi_clear_flag: Miscellaneous. (line 32) +* gcry_mpi_clear_highbit: Bit manipulations. (line 25) +* gcry_mpi_cmp: Comparisons. (line 9) +* gcry_mpi_cmp_ui: Comparisons. (line 13) +* gcry_mpi_copy: Basic functions. (line 23) +* gcry_mpi_div: Calculations. (line 50) +* gcry_mpi_dump: MPI formats. (line 61) +* gcry_mpi_gcd: Calculations. (line 63) +* gcry_mpi_get_flag: Miscellaneous. (line 37) +* gcry_mpi_get_nbits: Bit manipulations. (line 10) +* gcry_mpi_get_opaque: Miscellaneous. (line 20) +* gcry_mpi_invm: Calculations. (line 68) +* gcry_mpi_lshift: Bit manipulations. (line 34) +* gcry_mpi_mod: Calculations. (line 55) +* gcry_mpi_mul: Calculations. (line 34) +* gcry_mpi_mul_2exp: Calculations. (line 46) +* gcry_mpi_mul_ui: Calculations. (line 38) +* gcry_mpi_mulm: Calculations. (line 42) +* gcry_mpi_new: Basic functions. (line 10) +* gcry_mpi_powm: Calculations. (line 59) +* gcry_mpi_print: MPI formats. (line 45) +* gcry_mpi_randomize: Miscellaneous. (line 41) +* gcry_mpi_release: Basic functions. (line 26) +* gcry_mpi_rshift: Bit manipulations. (line 29) +* gcry_mpi_scan: MPI formats. (line 12) +* gcry_mpi_set: Basic functions. (line 33) +* gcry_mpi_set_bit: Bit manipulations. (line 16) +* gcry_mpi_set_flag: Miscellaneous. (line 26) +* gcry_mpi_set_highbit: Bit manipulations. (line 22) +* gcry_mpi_set_opaque: Miscellaneous. (line 8) +* gcry_mpi_set_ui: Basic functions. (line 37) +* gcry_mpi_snew: Basic functions. (line 17) +* gcry_mpi_sub: Calculations. (line 22) +* gcry_mpi_sub_ui: Calculations. (line 26) +* gcry_mpi_subm: Calculations. (line 30) +* gcry_mpi_swap: Basic functions. (line 44) +* gcry_mpi_t: Data types. (line 7) +* gcry_mpi_test_bit: Bit manipulations. (line 13) +* gcry_pk_algo_info: General public-key related Functions. + (line 47) +* gcry_pk_algo_name: General public-key related Functions. + (line 10) +* gcry_pk_check_secret_key_t: Public key modules. (line 91) +* gcry_pk_ctl: General public-key related Functions. + (line 100) +* gcry_pk_decrypt: Cryptographic Functions. + (line 85) +* gcry_pk_decrypt_t: Public key modules. (line 101) +* gcry_pk_encrypt: Cryptographic Functions. + (line 29) +* gcry_pk_encrypt_t: Public key modules. (line 96) +* gcry_pk_generate_t: Public key modules. (line 86) +* gcry_pk_genkey: General public-key related Functions. + (line 115) +* gcry_pk_get_keygrip: General public-key related Functions. + (line 29) +* gcry_pk_get_nbits: General public-key related Functions. + (line 24) +* gcry_pk_get_nbits_t: Public key modules. (line 116) +* gcry_pk_list: Public key modules. (line 131) +* gcry_pk_map_name: General public-key related Functions. + (line 16) +* gcry_pk_register: Public key modules. (line 121) +* gcry_pk_sign: Cryptographic Functions. + (line 117) +* gcry_pk_sign_t: Public key modules. (line 106) +* gcry_pk_spec_t: Public key modules. (line 12) +* gcry_pk_test_algo: General public-key related Functions. + (line 20) +* gcry_pk_testkey: General public-key related Functions. + (line 40) +* gcry_pk_unregister: Public key modules. (line 127) +* gcry_pk_verify: Cryptographic Functions. + (line 170) +* gcry_pk_verify_t: Public key modules. (line 111) +* gcry_prime_check: Checking. (line 8) +* gcry_prime_generate: Generation. (line 10) +* gcry_prime_group_generator: Generation. (line 19) +* gcry_prime_release_factors: Generation. (line 25) +* gcry_random_bytes: Retrieving random numbers. + (line 13) +* gcry_random_bytes_secure: Retrieving random numbers. + (line 19) +* gcry_random_level_t: Quality of random numbers. + (line 9) +* gcry_randomize: Retrieving random numbers. + (line 8) +* gcry_realloc: Memory allocation. (line 24) +* gcry_set_allocation_handler: Allocation handler. (line 34) +* gcry_set_fatalerror_handler: Error handler. (line 32) +* gcry_set_log_handler: Logging handler. (line 12) +* gcry_set_outofcore_handler: Error handler. (line 16) +* gcry_set_progress_handler: Progress handler. (line 21) +* gcry_sexp_build: Working with S-expressions. + (line 43) +* gcry_sexp_canon_len: Working with S-expressions. + (line 126) +* gcry_sexp_car: Working with S-expressions. + (line 155) +* gcry_sexp_cdr: Working with S-expressions. + (line 160) +* gcry_sexp_create: Working with S-expressions. + (line 26) +* gcry_sexp_dump: Working with S-expressions. + (line 117) +* gcry_sexp_find_token: Working with S-expressions. + (line 138) +* gcry_sexp_length: Working with S-expressions. + (line 145) +* gcry_sexp_new: Working with S-expressions. + (line 13) +* gcry_sexp_nth: Working with S-expressions. + (line 150) +* gcry_sexp_nth_data: Working with S-expressions. + (line 168) +* gcry_sexp_nth_mpi: Working with S-expressions. + (line 193) +* gcry_sexp_nth_string: Working with S-expressions. + (line 185) +* gcry_sexp_release: Working with S-expressions. + (line 83) +* gcry_sexp_sprint: Working with S-expressions. + (line 94) +* gcry_sexp_sscan: Working with S-expressions. + (line 37) +* gcry_sexp_t: Data types for S-expressions. + (line 7) +* gcry_strerror: Error Strings. (line 7) +* gcry_strsource: Error Strings. (line 13) + + + +Tag Table: +Node: Top775 +Node: Introduction2994 +Node: Getting Started3366 +Node: Features4247 +Node: Overview5031 +Node: Preparation5662 +Node: Header6519 +Node: Building sources7589 +Node: Building sources using Automake9503 +Node: Initializing the library10685 +Ref: sample-use-suspend-secmem13860 +Ref: sample-use-resume-secmem14480 +Node: Multi-Threading15376 +Ref: Multi-Threading-Footnote-119389 +Node: Enabling FIPS mode19797 +Node: Generalities21663 +Node: Controlling the library21988 +Node: Modules34155 +Node: Error Handling34934 +Node: Error Values37457 +Node: Error Sources42397 +Node: Error Codes44668 +Node: Error Strings48153 +Node: Handler Functions49336 +Node: Progress handler49895 +Node: Allocation handler51891 +Node: Error handler53442 +Node: Logging handler55009 +Node: Symmetric cryptography55601 +Node: Available ciphers56406 +Node: Cipher modules58913 +Node: Available cipher modes63437 +Node: Working with cipher handles64316 +Node: General cipher functions72631 +Node: Public Key cryptography75149 +Node: Available algorithms76064 +Node: Used S-expressions76413 +Node: RSA key parameters77525 +Node: DSA key parameters78800 +Node: ECC key parameters79458 +Node: Public key modules81223 +Node: Cryptographic Functions86807 +Node: General public-key related Functions94287 +Node: AC Interface106576 +Node: Available asymmetric algorithms107711 +Node: Working with sets of data108380 +Node: Working with IO objects112882 +Node: Working with handles115602 +Node: Working with keys116549 +Node: Using cryptographic functions120631 +Node: Handle-independent functions127538 +Node: Hashing128286 +Node: Available hash algorithms129077 +Node: Hash algorithm modules132184 +Node: Working with hash algorithms136032 +Node: Random Numbers147334 +Node: Quality of random numbers147608 +Node: Retrieving random numbers148292 +Node: S-expressions149776 +Node: Data types for S-expressions150418 +Node: Working with S-expressions150742 +Node: MPI library160113 +Node: Data types161071 +Node: Basic functions161265 +Node: MPI formats163333 +Node: Calculations166216 +Node: Comparisons168470 +Node: Bit manipulations169114 +Node: Miscellaneous170429 +Node: Prime numbers172398 +Node: Generation172668 +Node: Checking173952 +Node: Utilities174365 +Node: Memory allocation174558 +Node: Architecture175885 +Ref: fig:subsystems177405 +Ref: Architecture-Footnote-1178490 +Ref: Architecture-Footnote-2178552 +Node: Public-Key Subsystem Architecture178636 +Node: Symmetric Encryption Subsystem Architecture181577 +Node: Hashing and MACing Subsystem Architecture183024 +Node: Multi-Precision-Integer Subsystem Architecture184948 +Node: Prime-Number-Generator Subsystem Architecture186389 +Ref: Prime-Number-Generator Subsystem Architecture-Footnote-1188320 +Node: Random-Number Subsystem Architecture188607 +Node: CSPRNG Description191096 +Ref: CSPRNG Description-Footnote-1192658 +Node: FIPS PRNG Description192781 +Node: Self-Tests194916 +Node: FIPS Mode206607 +Ref: fig:fips-fsm210587 +Ref: tbl:fips-states210689 +Ref: tbl:fips-state-transitions211942 +Node: Library Copying215556 +Node: Copying243674 +Node: Figures and Tables262848 +Node: Concept Index263258 +Node: Function and Data Index268823 + +End Tag Table diff --git a/plugins/TabSRMM/docs/readme.txt b/plugins/TabSRMM/docs/readme.txt index e91c651548..7ba3967deb 100644 --- a/plugins/TabSRMM/docs/readme.txt +++ b/plugins/TabSRMM/docs/readme.txt @@ -1,7 +1,7 @@ - tabbed SRMM plugin for Miranda NG - ---------------------------------------- - -Online resources at: http://wiki.miranda.or.at, http://blog.miranda.or.at and + tabbed SRMM plugin for Miranda NG + ---------------------------------------- + +Online resources at: http://wiki.miranda.or.at, http://blog.miranda.or.at and http://forum.miranda.or.at ---------------------------------------------------------- @@ -9,12 +9,12 @@ http://forum.miranda.or.at Version: 3.0 Created: August 2009 -1. Overview ------------ - -tabSRMM is an advanced messaging module for Miranda NG. It adds many new options and features to make instant messaging more -enjoyable and allows you to tweak almost every aspect of the message window to -fit your needs. +1. Overview +----------- + +tabSRMM is an advanced messaging module for Miranda NG. It adds many new options and features to make instant messaging more +enjoyable and allows you to tweak almost every aspect of the message window to +fit your needs. 2. Some features: ----------------- @@ -107,13 +107,13 @@ the development phase. I cannot name you all here, because it's just too many. sometimes hard to find, bugs, and for suggesting features. * "Mad Cluster" for the madmod patch which added a number of useful and often - requested new features to the plugin. - -* Joergen Persson for the original MUC ("multiuser chat") module for - Miranda NG. Large parts of tabSRMM's multiuser chat integration are based - on his code. - ------------- + requested new features to the plugin. + +* Joergen Persson for the original MUC ("multiuser chat") module for + Miranda NG. Large parts of tabSRMM's multiuser chat integration are based + on his code. + +------------ License: GPL ------------ diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index be8566f188..9b4e11b583 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -1,603 +1,603 @@ -///////////////////////////////////////////////////////////////////////////////////////// -// Miranda NG: the free IM client for Microsoft* Windows* -// -// Copyright (C) 2012-23 Miranda NG team, -// Copyright (c) 2000-09 Miranda ICQ/IM project, -// all portions of this codebase are copyrighted to the people -// listed in contributors.txt. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// you should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -// part of tabSRMM messaging plugin for Miranda. -// -// (C) 2005-2010 by silvercircle _at_ gmail _dot_ com and contributors -// -// Implements a queued, asynchronous sending system for tabSRMM. - -#include "stdafx.h" - -SendQueue *sendQueue = nullptr; - -///////////////////////////////////////////////////////////////////////////////////////// -// searches the queue for a message belonging to the given contact which has been marked -// as "failed" by either the ACKRESULT_FAILED or a timeout handler -// returns: zero-based queue index or -1 if none was found - -int SendQueue::findNextFailed(const CMsgDialog *dat) const -{ - if (dat) - for (int i = 0; i < NR_SENDJOBS; i++) - if (m_jobs[i].hContact == dat->m_hContact && m_jobs[i].iStatus == SQ_ERROR) - return i; - - return -1; -} - -void SendQueue::handleError(CMsgDialog *dat, const int iEntry) const -{ - if (!dat) return; - - dat->m_iCurrentQueueError = iEntry; - logError(dat, iEntry, m_jobs[iEntry].pwszErrorMsg); - recallFailed(dat, iEntry); - showErrorControls(dat, TRUE); - ::HandleIconFeedback(dat, PluginConfig.g_iconErr); -} - -///////////////////////////////////////////////////////////////////////////////////////// -//add a message to the sending queue. -// iLen = required size of the memory block to hold the message - -int SendQueue::addTo(CMsgDialog *dat, size_t iLen, int dwFlags) -{ - int i; - int iFound = NR_SENDJOBS; - - if (m_currentIndex >= NR_SENDJOBS) { - _DebugPopup(dat->m_hContact, L"Send queue full"); - return 0; - } - - // find a mir_free entry in the send queue... - for (i = 0; i < NR_SENDJOBS; i++) { - if (m_jobs[i].hContact != 0 || m_jobs[i].iStatus != 0) { - // this entry is used, check if it's orphaned and can be removed... - if (m_jobs[i].hOwnerWnd && IsWindow(m_jobs[i].hOwnerWnd)) // window exists, do not reuse it - continue; - if (time(0) - m_jobs[i].dwTime < 120) // non-acked entry, but not old enough, don't re-use it - continue; - clearJob(i); - iFound = i; - goto entry_found; - } - iFound = i; - break; - } -entry_found: - if (iFound == NR_SENDJOBS) { - _DebugPopup(dat->m_hContact, L"Send queue full"); - return 0; - } - - SendJob &job = m_jobs[iFound]; - job.szSendBuffer = (char*)mir_alloc(iLen); - memcpy(job.szSendBuffer, dat->m_sendBuffer, iLen); - - job.dwFlags = dwFlags; - job.dwTime = time(0); - - HWND hwndDlg = dat->GetHwnd(); - - dat->m_cache->saveHistory(); - ::SetDlgItemText(hwndDlg, IDC_SRMM_MESSAGE, L""); - ::SetFocus(GetDlgItem(hwndDlg, IDC_SRMM_MESSAGE)); - - dat->UpdateSaveAndSendButton(); - sendQueued(dat, iFound); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// threshold for word - wrapping when sending messages in chunks - -#define SPLIT_WORD_CUTOFF 20 - -static void DoSplitSendA(LPVOID param) -{ - Thread_SetName("TabSRMM: DoSplitSendA"); - - SendJob *job = sendQueue->getJobByIndex((INT_PTR)param); - - size_t iLen = mir_strlen(job->szSendBuffer); - ptrA szBegin((char*)mir_alloc(iLen + 1)); - char *szTemp = szBegin; - memcpy(szTemp, job->szSendBuffer, iLen + 1); - - bool fFirstSend = false, fSplitting = true; - size_t iCur = 0; - do { - iCur += job->chunkSize; - if (iCur > iLen) - fSplitting = FALSE; - - if (fSplitting) { - job->iAcksNeeded++; - - char *szSaved = &szBegin[iCur]; - size_t iSavedCur = iCur; - for (int i = 0; iCur; i++, iCur--) { - if (szBegin[iCur] == ' ') { - szSaved = &szBegin[iCur]; - break; - } - if (i == SPLIT_WORD_CUTOFF) { - iCur = iSavedCur; - szSaved = &szBegin[iCur]; - break; - } - } - - char savedChar = *szSaved; - *szSaved = 0; - int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); - if (!fFirstSend) { - job->iSendId = id; - fFirstSend = TRUE; - PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SPLITSENDACK, (WPARAM)param, 0); - } - *szSaved = savedChar; - szTemp = szSaved; - if (savedChar == ' ') { - szTemp++; - iCur++; - } - } - else { - int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); - if (!fFirstSend) { - job->iSendId = id; - fFirstSend = TRUE; - PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SPLITSENDACK, (WPARAM)param, 0); - } - } - Sleep(500L); - } - while (fSplitting); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// return effective length of the message in bytes (utf-8 encoded) - -size_t SendQueue::getSendLength(const int iEntry) -{ - SendJob &p = m_jobs[iEntry]; - p.iSendLength = mir_strlen(p.szSendBuffer); - return p.iSendLength; -} - -int SendQueue::sendQueued(CMsgDialog *dat, const int iEntry) -{ - HWND hwndDlg = dat->GetHwnd(); - CContactCache *ccActive = CContactCache::getContactCache(dat->m_hContact); - - if (dat->m_sendMode & SMODE_MULTIPLE) { - int iJobs = 0; - size_t iMinLength = 0; - - m_jobs[iEntry].iStatus = SQ_INPROGRESS; - m_jobs[iEntry].hContact = ccActive->getActiveContact(); - m_jobs[iEntry].hOwnerWnd = hwndDlg; - - size_t iSendLength = getSendLength(iEntry); - - for (auto &hContact : Contacts()) { - HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0); - if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) { - CContactCache *c = CContactCache::getContactCache(hContact); - iMinLength = (iMinLength == 0 ? c->getMaxMessageLength() : min(c->getMaxMessageLength(), iMinLength)); - } - } - - if (iSendLength >= iMinLength) { - wchar_t tszError[256]; - mir_snwprintf(tszError, TranslateT("The message cannot be sent delayed or to multiple contacts, because it exceeds the maximum allowed message length of %d bytes"), iMinLength); - dat->ActivateTooltip(IDC_SRMM_MESSAGE, tszError); - sendQueue->clearJob(iEntry); - return 0; - } - - for (auto &hContact : Contacts()) { - HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0); - if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) { - doSendLater(iEntry, nullptr, hContact, false); - iJobs++; - } - } - - sendQueue->clearJob(iEntry); - if (iJobs) - SendLater::flushQueue(); // force queue processing - return 0; - } - - size_t iMaxSize = dat->m_cache->getMaxMessageLength(); - - if (M.GetByte("autosplit", 0) && !(dat->m_sendMode & SMODE_SENDLATER)) { - // determine send buffer length - BOOL fSplit = FALSE; - if (getSendLength(iEntry) >= iMaxSize) - fSplit = true; - - if (!fSplit) - goto send_unsplitted; - - m_jobs[iEntry].hContact = ccActive->getActiveContact(); - m_jobs[iEntry].hOwnerWnd = hwndDlg; - m_jobs[iEntry].iStatus = SQ_INPROGRESS; - m_jobs[iEntry].iAcksNeeded = 1; - m_jobs[iEntry].chunkSize = (int)iMaxSize; - - uint32_t dwOldFlags = m_jobs[iEntry].dwFlags; - mir_forkthread(DoSplitSendA, (LPVOID)iEntry); - m_jobs[iEntry].dwFlags = dwOldFlags; - } - else { - send_unsplitted: - m_jobs[iEntry].hContact = ccActive->getActiveContact(); - m_jobs[iEntry].hOwnerWnd = hwndDlg; - m_jobs[iEntry].iStatus = SQ_INPROGRESS; - m_jobs[iEntry].iAcksNeeded = 1; - if (dat->m_sendMode & SMODE_SENDLATER) { - wchar_t tszError[256]; - - size_t iSendLength = getSendLength(iEntry); - if (iSendLength >= iMaxSize) { - mir_snwprintf(tszError, TranslateT("The message cannot be sent delayed or to multiple contacts, because it exceeds the maximum allowed message length of %d bytes"), iMaxSize); - dat->ActivateTooltip(IDC_SRMM_MESSAGE, tszError); - clearJob(iEntry); - return 0; - } - doSendLater(iEntry, dat); - clearJob(iEntry); - return 0; - } - m_jobs[iEntry].iSendId = ProtoChainSend(dat->m_hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer); - - if (dat->m_sendMode & SMODE_NOACK) { // fake the ack if we are not interested in receiving real acks - ACKDATA ack = {}; - ack.hContact = dat->m_hContact; - ack.hProcess = (HANDLE)m_jobs[iEntry].iSendId; - ack.type = ACKTYPE_MESSAGE; - ack.result = ACKRESULT_SUCCESS; - SendMessage(hwndDlg, HM_EVENTSENT, (WPARAM)MAKELONG(iEntry, 0), (LPARAM)&ack); - } - else SetTimer(hwndDlg, TIMERID_MSGSEND + iEntry, PluginConfig.m_MsgTimeout, nullptr); - } - - dat->m_iOpenJobs++; - m_currentIndex++; - - // give icon feedback... - if (dat->m_pContainer->m_hwndActive == hwndDlg) - dat->UpdateReadChars(); - - if (!(dat->m_sendMode & SMODE_NOACK)) - ::HandleIconFeedback(dat, PluginConfig.g_IconSend); - - if (g_plugin.bAutoMin) - ::SendMessage(dat->m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); - return 0; -} - -void SendQueue::clearJob(const int iIndex) -{ - SendJob &job = m_jobs[iIndex]; - mir_free(job.szSendBuffer); - SecureZeroMemory(&job, sizeof(SendJob)); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// this is called when : -// -// ) a delivery has completed successfully -// ) user decided to cancel a failed send -// it removes the completed / canceled send job from the queue and schedules the next job to send (if any) - -void SendQueue::checkQueue(const CMsgDialog *dat) const -{ - if (dat) { - HWND hwndDlg = dat->GetHwnd(); - - if (dat->m_iOpenJobs == 0) - ::HandleIconFeedback(const_cast(dat), (HICON)INVALID_HANDLE_VALUE); - else if (!(dat->m_sendMode & SMODE_NOACK)) - ::HandleIconFeedback(const_cast(dat), PluginConfig.g_IconSend); - - if (dat->m_pContainer->m_hwndActive == hwndDlg) - dat->UpdateReadChars(); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// logs an error message to the message window.Optionally, appends the original message -// from the given sendJob (queue index) - -void SendQueue::logError(CMsgDialog *dat, int iSendJobIndex, const wchar_t *szErrMsg) const -{ - if (dat == nullptr) - return; - - size_t iMsgLen; - DBEVENTINFO dbei = {}; - dbei.eventType = EVENTTYPE_ERRMSG; - if (iSendJobIndex >= 0) { - dbei.pBlob = (uint8_t *)m_jobs[iSendJobIndex].szSendBuffer; - iMsgLen = mir_strlen(m_jobs[iSendJobIndex].szSendBuffer) + 1; - } - else { - iMsgLen = 0; - dbei.pBlob = nullptr; - } - - dbei.flags = DBEF_SENT | DBEF_UTF; - dbei.cbBlob = (int)iMsgLen; - dbei.timestamp = time(0); - dbei.szModule = (char *)szErrMsg; - dat->LogEvent(dbei); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// show or hide the error control button bar on top of the window - -void SendQueue::showErrorControls(CMsgDialog *dat, const int showCmd) const -{ - UINT myerrorControls[] = { IDC_STATICERRORICON, IDC_STATICTEXT, IDC_RETRY, IDC_CANCELSEND, IDC_MSGSENDLATER }; - HWND hwndDlg = dat->GetHwnd(); - - if (showCmd) { - TCITEM item = {}; - dat->m_hTabIcon = PluginConfig.g_iconErr; - item.mask = TCIF_IMAGE; - item.iImage = 0; - TabCtrl_SetItem(dat->m_pContainer->m_hwndTabs, dat->m_iTabID, &item); - dat->m_bErrorState = true; - } - else { - dat->m_bErrorState = false; - dat->m_hTabIcon = dat->m_hTabStatusIcon; - } - - for (int i = 0; i < 5; i++) - if (IsWindow(GetDlgItem(hwndDlg, myerrorControls[i]))) - Utils::showDlgControl(hwndDlg, myerrorControls[i], showCmd ? SW_SHOW : SW_HIDE); - - SendMessage(hwndDlg, WM_SIZE, 0, 0); - dat->DM_ScrollToBottom(0, 1); - if (m_jobs[0].hContact != 0) - dat->EnableSending(TRUE); -} - -void SendQueue::recallFailed(CMsgDialog *dat, int iEntry) const -{ - if (dat == nullptr) - return; - - int iLen = GetWindowTextLength(GetDlgItem(dat->GetHwnd(), IDC_SRMM_MESSAGE)); - dat->NotifyDeliveryFailure(); - if (iLen != 0) - return; - - // message area is empty, so we can recall the failed message... - SETTEXTEX stx = { ST_DEFAULT, CP_UTF8 }; - SendDlgItemMessage(dat->GetHwnd(), IDC_SRMM_MESSAGE, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)m_jobs[iEntry].szSendBuffer); - dat->UpdateSaveAndSendButton(); - SendDlgItemMessage(dat->GetHwnd(), IDC_SRMM_MESSAGE, EM_SETSEL, -1, -1); -} - -int SendQueue::ackMessage(CMsgDialog *dat, WPARAM wParam, LPARAM lParam) -{ - ACKDATA *ack = (ACKDATA *)lParam; - - int iFound = (int)(LOWORD(wParam)); - if (iFound < 0 || iFound > _countof(m_jobs)) - return 0; - - SendJob &job = m_jobs[iFound]; - - if (job.iStatus == SQ_ERROR) { // received ack for a job which is already in error state... - if (dat) { - if (dat->m_iCurrentQueueError == iFound) { - dat->m_iCurrentQueueError = -1; - showErrorControls(dat, FALSE); - } - } - // we must discard this job, because there is no message window open to handle the - // error properly. But we display a tray notification to inform the user about the problem. - else goto inform_and_discard; - } - - // failed acks are only handled when the window is still open. with no window open, they will be *silently* discarded - - if (ack->result == ACKRESULT_FAILED) { - if (dat) { - // "hard" errors are handled differently in multisend. There is no option to retry - once failed, they - // are discarded and the user is notified with a small log message. - if (!NEN::bNoSounds && !dat->m_pContainer->cfg.flags.m_bNoSound) - Skin_PlaySound("SendError"); - - replaceStrW(job.pwszErrorMsg, CMStringW(FORMAT, TranslateT("Delivery failure: %s"), (wchar_t*)ack->lParam)); - job.iStatus = SQ_ERROR; - KillTimer(dat->GetHwnd(), TIMERID_MSGSEND + iFound); - if (!dat->m_bErrorState) - handleError(dat, iFound); - return 0; - } - - inform_and_discard: - _DebugPopup(job.hContact, TranslateT("A message delivery has failed after the contacts chat window was closed. You may want to resend the last message")); - clearJob(iFound); - return 0; - } - - DBEVENTINFO dbei = {}; - dbei.eventType = EVENTTYPE_MESSAGE; - dbei.flags = DBEF_SENT | DBEF_UTF; - dbei.szModule = Proto_GetBaseAccountName(job.hContact); - dbei.timestamp = time(0); - dbei.cbBlob = (int)mir_strlen(job.szSendBuffer) + 1; - - if (dat) - dat->m_cache->updateStats(TSessionStats::BYTES_SENT, dbei.cbBlob - 1); - else { - CContactCache *cc = CContactCache::getContactCache(job.hContact); - cc->updateStats(TSessionStats::BYTES_SENT, dbei.cbBlob - 1); - } - - if (job.dwFlags & PREF_RTL) - dbei.flags |= DBEF_RTL; - dbei.pBlob = (uint8_t*)job.szSendBuffer; - dbei.szId = (char *)ack->lParam; - - MessageWindowEvent evt = { job.iSendId, job.hContact, &dbei }; - NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt); - - job.szSendBuffer = (char*)dbei.pBlob; - MEVENT hNewEvent = db_event_replace(job.hContact, &dbei); - - if (dat) - if (!NEN::bNoSounds && !dat->m_pContainer->cfg.flags.m_bNoSound) - Skin_PlaySound("SendMsg"); - - Srmm_Broadcast(DM_APPENDMCEVENT, job.hContact, hNewEvent); - - job.iSendId = 0; - job.iAcksNeeded--; - - if (job.iAcksNeeded == 0) { // everything sent - clearJob(iFound); - if (dat) { - KillTimer(dat->GetHwnd(), TIMERID_MSGSEND + iFound); - dat->m_iOpenJobs--; - } - m_currentIndex--; - } - if (dat) { - checkQueue(dat); - - int iNextFailed = findNextFailed(dat); - if (iNextFailed >= 0 && !dat->m_bErrorState) - handleError(dat, iNextFailed); - else { - if (g_plugin.bAutoClose) { - if (g_plugin.bCloseSend) - SendMessage(dat->GetHwnd(), WM_CLOSE, 0, 1); - else - SendMessage(dat->m_pContainer->m_hwnd, WM_CLOSE, 0, 0); - } - } - } - return 0; -} - -LRESULT SendQueue::WarnPendingJobs(unsigned int) -{ - return MessageBox(nullptr, - TranslateT("There are unsent messages waiting for confirmation.\nIf you close the window now, Miranda will try to send them but may be unable to inform you about possible delivery errors.\nDo you really want to close the window(s)?"), - TranslateT("Message window warning"), MB_YESNO | MB_ICONHAND); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// This just adds the message to the database for later delivery and -// adds the contact to the list of contacts that have queued messages -// -// @param iJobIndex int: index of the send job -// dat: Message window data -// fAddHeader: add the "message was sent delayed" header (default = true) -// hContact : contact to which the job should be added (default = hOwner of the send job) -// -// @return the index on success, -1 on failure - -int SendQueue::doSendLater(int iJobIndex, CMsgDialog *dat, MCONTACT hContact, bool fIsSendLater) -{ - const wchar_t *szNote = nullptr; - - if (fIsSendLater && dat) { - if (SendLater::Avail) - szNote = TranslateT("Message successfully queued for later delivery.\nIt will be sent as soon as possible and a popup will inform you about the result."); - else - szNote = TranslateT("The send later feature is not available on this protocol."); - - T2Utf utfText(szNote); - DBEVENTINFO dbei = {}; - dbei.eventType = EVENTTYPE_MESSAGE; - dbei.flags = DBEF_SENT | DBEF_UTF; - dbei.szModule = Proto_GetBaseAccountName(dat->m_hContact); - dbei.timestamp = time(0); - dbei.cbBlob = (int)mir_strlen(utfText) + 1; - dbei.pBlob = (uint8_t*)(char*)utfText; - dat->LogEvent(dbei); - - if (dat->m_hDbEventFirst == 0) - dat->RemakeLog(); - dat->m_cache->saveHistory(); - dat->EnableSendButton(false); - if (dat->m_pContainer->m_hwndActive == dat->GetHwnd()) - dat->UpdateReadChars(); - SendDlgItemMessage(dat->GetHwnd(), IDC_CLOSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL]); - SendDlgItemMessage(dat->GetHwnd(), IDC_CLOSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close session"), BATF_UNICODE); - dat->m_bSaveBtn = false; - - if (!SendLater::Avail) - return 0; - } - - if (iJobIndex < 0 || iJobIndex >= NR_SENDJOBS) - return -1; - - SendJob *job = &m_jobs[iJobIndex]; - char szKeyName[20]; - wchar_t tszHeader[150]; - - if (fIsSendLater) { - time_t now = time(0); - wchar_t tszTimestamp[30]; - wcsftime(tszTimestamp, _countof(tszTimestamp), L"%Y.%m.%d - %H:%M", _localtime32((__time32_t *)&now)); - mir_snprintf(szKeyName, "S%d", (int)now); - mir_snwprintf(tszHeader, TranslateT("\n(Sent delayed. Original timestamp %s)"), tszTimestamp); - } - else mir_snwprintf(tszHeader, L"M%d|", (int)time(0)); - - T2Utf utf_header(tszHeader); - size_t required = mir_strlen(utf_header) + mir_strlen(job->szSendBuffer) + 10; - char *tszMsg = reinterpret_cast(mir_alloc(required)); - - if (fIsSendLater) { - mir_snprintf(tszMsg, required, "%s%s", job->szSendBuffer, utf_header.get()); - db_set_s(hContact ? hContact : job->hContact, "SendLater", szKeyName, tszMsg); - } - else { - mir_snprintf(tszMsg, required, "%s%s", utf_header.get(), job->szSendBuffer); - SendLater::addJob(tszMsg, (void*)hContact); - } - mir_free(tszMsg); - - if (fIsSendLater) { - int iCount = db_get_dw(hContact ? hContact : job->hContact, "SendLater", "count", 0); - iCount++; - db_set_dw(hContact ? hContact : job->hContact, "SendLater", "count", iCount); - SendLater::addContact(hContact ? hContact : job->hContact); - } - return iJobIndex; -} +///////////////////////////////////////////////////////////////////////////////////////// +// Miranda NG: the free IM client for Microsoft* Windows* +// +// Copyright (C) 2012-23 Miranda NG team, +// Copyright (c) 2000-09 Miranda ICQ/IM project, +// all portions of this codebase are copyrighted to the people +// listed in contributors.txt. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// you should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +// part of tabSRMM messaging plugin for Miranda. +// +// (C) 2005-2010 by silvercircle _at_ gmail _dot_ com and contributors +// +// Implements a queued, asynchronous sending system for tabSRMM. + +#include "stdafx.h" + +SendQueue *sendQueue = nullptr; + +///////////////////////////////////////////////////////////////////////////////////////// +// searches the queue for a message belonging to the given contact which has been marked +// as "failed" by either the ACKRESULT_FAILED or a timeout handler +// returns: zero-based queue index or -1 if none was found + +int SendQueue::findNextFailed(const CMsgDialog *dat) const +{ + if (dat) + for (int i = 0; i < NR_SENDJOBS; i++) + if (m_jobs[i].hContact == dat->m_hContact && m_jobs[i].iStatus == SQ_ERROR) + return i; + + return -1; +} + +void SendQueue::handleError(CMsgDialog *dat, const int iEntry) const +{ + if (!dat) return; + + dat->m_iCurrentQueueError = iEntry; + logError(dat, iEntry, m_jobs[iEntry].pwszErrorMsg); + recallFailed(dat, iEntry); + showErrorControls(dat, TRUE); + ::HandleIconFeedback(dat, PluginConfig.g_iconErr); +} + +///////////////////////////////////////////////////////////////////////////////////////// +//add a message to the sending queue. +// iLen = required size of the memory block to hold the message + +int SendQueue::addTo(CMsgDialog *dat, size_t iLen, int dwFlags) +{ + int i; + int iFound = NR_SENDJOBS; + + if (m_currentIndex >= NR_SENDJOBS) { + _DebugPopup(dat->m_hContact, L"Send queue full"); + return 0; + } + + // find a mir_free entry in the send queue... + for (i = 0; i < NR_SENDJOBS; i++) { + if (m_jobs[i].hContact != 0 || m_jobs[i].iStatus != 0) { + // this entry is used, check if it's orphaned and can be removed... + if (m_jobs[i].hOwnerWnd && IsWindow(m_jobs[i].hOwnerWnd)) // window exists, do not reuse it + continue; + if (time(0) - m_jobs[i].dwTime < 120) // non-acked entry, but not old enough, don't re-use it + continue; + clearJob(i); + iFound = i; + goto entry_found; + } + iFound = i; + break; + } +entry_found: + if (iFound == NR_SENDJOBS) { + _DebugPopup(dat->m_hContact, L"Send queue full"); + return 0; + } + + SendJob &job = m_jobs[iFound]; + job.szSendBuffer = (char*)mir_alloc(iLen); + memcpy(job.szSendBuffer, dat->m_sendBuffer, iLen); + + job.dwFlags = dwFlags; + job.dwTime = time(0); + + HWND hwndDlg = dat->GetHwnd(); + + dat->m_cache->saveHistory(); + ::SetDlgItemText(hwndDlg, IDC_SRMM_MESSAGE, L""); + ::SetFocus(GetDlgItem(hwndDlg, IDC_SRMM_MESSAGE)); + + dat->UpdateSaveAndSendButton(); + sendQueued(dat, iFound); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// threshold for word - wrapping when sending messages in chunks + +#define SPLIT_WORD_CUTOFF 20 + +static void DoSplitSendA(LPVOID param) +{ + Thread_SetName("TabSRMM: DoSplitSendA"); + + SendJob *job = sendQueue->getJobByIndex((INT_PTR)param); + + size_t iLen = mir_strlen(job->szSendBuffer); + ptrA szBegin((char*)mir_alloc(iLen + 1)); + char *szTemp = szBegin; + memcpy(szTemp, job->szSendBuffer, iLen + 1); + + bool fFirstSend = false, fSplitting = true; + size_t iCur = 0; + do { + iCur += job->chunkSize; + if (iCur > iLen) + fSplitting = FALSE; + + if (fSplitting) { + job->iAcksNeeded++; + + char *szSaved = &szBegin[iCur]; + size_t iSavedCur = iCur; + for (int i = 0; iCur; i++, iCur--) { + if (szBegin[iCur] == ' ') { + szSaved = &szBegin[iCur]; + break; + } + if (i == SPLIT_WORD_CUTOFF) { + iCur = iSavedCur; + szSaved = &szBegin[iCur]; + break; + } + } + + char savedChar = *szSaved; + *szSaved = 0; + int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); + if (!fFirstSend) { + job->iSendId = id; + fFirstSend = TRUE; + PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SPLITSENDACK, (WPARAM)param, 0); + } + *szSaved = savedChar; + szTemp = szSaved; + if (savedChar == ' ') { + szTemp++; + iCur++; + } + } + else { + int id = ProtoChainSend(job->hContact, PSS_MESSAGE, job->dwFlags, (LPARAM)szTemp); + if (!fFirstSend) { + job->iSendId = id; + fFirstSend = TRUE; + PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SPLITSENDACK, (WPARAM)param, 0); + } + } + Sleep(500L); + } + while (fSplitting); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// return effective length of the message in bytes (utf-8 encoded) + +size_t SendQueue::getSendLength(const int iEntry) +{ + SendJob &p = m_jobs[iEntry]; + p.iSendLength = mir_strlen(p.szSendBuffer); + return p.iSendLength; +} + +int SendQueue::sendQueued(CMsgDialog *dat, const int iEntry) +{ + HWND hwndDlg = dat->GetHwnd(); + CContactCache *ccActive = CContactCache::getContactCache(dat->m_hContact); + + if (dat->m_sendMode & SMODE_MULTIPLE) { + int iJobs = 0; + size_t iMinLength = 0; + + m_jobs[iEntry].iStatus = SQ_INPROGRESS; + m_jobs[iEntry].hContact = ccActive->getActiveContact(); + m_jobs[iEntry].hOwnerWnd = hwndDlg; + + size_t iSendLength = getSendLength(iEntry); + + for (auto &hContact : Contacts()) { + HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0); + if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) { + CContactCache *c = CContactCache::getContactCache(hContact); + iMinLength = (iMinLength == 0 ? c->getMaxMessageLength() : min(c->getMaxMessageLength(), iMinLength)); + } + } + + if (iSendLength >= iMinLength) { + wchar_t tszError[256]; + mir_snwprintf(tszError, TranslateT("The message cannot be sent delayed or to multiple contacts, because it exceeds the maximum allowed message length of %d bytes"), iMinLength); + dat->ActivateTooltip(IDC_SRMM_MESSAGE, tszError); + sendQueue->clearJob(iEntry); + return 0; + } + + for (auto &hContact : Contacts()) { + HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0); + if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) { + doSendLater(iEntry, nullptr, hContact, false); + iJobs++; + } + } + + sendQueue->clearJob(iEntry); + if (iJobs) + SendLater::flushQueue(); // force queue processing + return 0; + } + + size_t iMaxSize = dat->m_cache->getMaxMessageLength(); + + if (M.GetByte("autosplit", 0) && !(dat->m_sendMode & SMODE_SENDLATER)) { + // determine send buffer length + BOOL fSplit = FALSE; + if (getSendLength(iEntry) >= iMaxSize) + fSplit = true; + + if (!fSplit) + goto send_unsplitted; + + m_jobs[iEntry].hContact = ccActive->getActiveContact(); + m_jobs[iEntry].hOwnerWnd = hwndDlg; + m_jobs[iEntry].iStatus = SQ_INPROGRESS; + m_jobs[iEntry].iAcksNeeded = 1; + m_jobs[iEntry].chunkSize = (int)iMaxSize; + + uint32_t dwOldFlags = m_jobs[iEntry].dwFlags; + mir_forkthread(DoSplitSendA, (LPVOID)iEntry); + m_jobs[iEntry].dwFlags = dwOldFlags; + } + else { + send_unsplitted: + m_jobs[iEntry].hContact = ccActive->getActiveContact(); + m_jobs[iEntry].hOwnerWnd = hwndDlg; + m_jobs[iEntry].iStatus = SQ_INPROGRESS; + m_jobs[iEntry].iAcksNeeded = 1; + if (dat->m_sendMode & SMODE_SENDLATER) { + wchar_t tszError[256]; + + size_t iSendLength = getSendLength(iEntry); + if (iSendLength >= iMaxSize) { + mir_snwprintf(tszError, TranslateT("The message cannot be sent delayed or to multiple contacts, because it exceeds the maximum allowed message length of %d bytes"), iMaxSize); + dat->ActivateTooltip(IDC_SRMM_MESSAGE, tszError); + clearJob(iEntry); + return 0; + } + doSendLater(iEntry, dat); + clearJob(iEntry); + return 0; + } + m_jobs[iEntry].iSendId = ProtoChainSend(dat->m_hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer); + + if (dat->m_sendMode & SMODE_NOACK) { // fake the ack if we are not interested in receiving real acks + ACKDATA ack = {}; + ack.hContact = dat->m_hContact; + ack.hProcess = (HANDLE)m_jobs[iEntry].iSendId; + ack.type = ACKTYPE_MESSAGE; + ack.result = ACKRESULT_SUCCESS; + SendMessage(hwndDlg, HM_EVENTSENT, (WPARAM)MAKELONG(iEntry, 0), (LPARAM)&ack); + } + else SetTimer(hwndDlg, TIMERID_MSGSEND + iEntry, PluginConfig.m_MsgTimeout, nullptr); + } + + dat->m_iOpenJobs++; + m_currentIndex++; + + // give icon feedback... + if (dat->m_pContainer->m_hwndActive == hwndDlg) + dat->UpdateReadChars(); + + if (!(dat->m_sendMode & SMODE_NOACK)) + ::HandleIconFeedback(dat, PluginConfig.g_IconSend); + + if (g_plugin.bAutoMin) + ::SendMessage(dat->m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); + return 0; +} + +void SendQueue::clearJob(const int iIndex) +{ + SendJob &job = m_jobs[iIndex]; + mir_free(job.szSendBuffer); + SecureZeroMemory(&job, sizeof(SendJob)); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// this is called when : +// +// ) a delivery has completed successfully +// ) user decided to cancel a failed send +// it removes the completed / canceled send job from the queue and schedules the next job to send (if any) + +void SendQueue::checkQueue(const CMsgDialog *dat) const +{ + if (dat) { + HWND hwndDlg = dat->GetHwnd(); + + if (dat->m_iOpenJobs == 0) + ::HandleIconFeedback(const_cast(dat), (HICON)INVALID_HANDLE_VALUE); + else if (!(dat->m_sendMode & SMODE_NOACK)) + ::HandleIconFeedback(const_cast(dat), PluginConfig.g_IconSend); + + if (dat->m_pContainer->m_hwndActive == hwndDlg) + dat->UpdateReadChars(); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// logs an error message to the message window.Optionally, appends the original message +// from the given sendJob (queue index) + +void SendQueue::logError(CMsgDialog *dat, int iSendJobIndex, const wchar_t *szErrMsg) const +{ + if (dat == nullptr) + return; + + size_t iMsgLen; + DBEVENTINFO dbei = {}; + dbei.eventType = EVENTTYPE_ERRMSG; + if (iSendJobIndex >= 0) { + dbei.pBlob = (uint8_t *)m_jobs[iSendJobIndex].szSendBuffer; + iMsgLen = mir_strlen(m_jobs[iSendJobIndex].szSendBuffer) + 1; + } + else { + iMsgLen = 0; + dbei.pBlob = nullptr; + } + + dbei.flags = DBEF_SENT | DBEF_UTF; + dbei.cbBlob = (int)iMsgLen; + dbei.timestamp = time(0); + dbei.szModule = (char *)szErrMsg; + dat->LogEvent(dbei); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// show or hide the error control button bar on top of the window + +void SendQueue::showErrorControls(CMsgDialog *dat, const int showCmd) const +{ + UINT myerrorControls[] = { IDC_STATICERRORICON, IDC_STATICTEXT, IDC_RETRY, IDC_CANCELSEND, IDC_MSGSENDLATER }; + HWND hwndDlg = dat->GetHwnd(); + + if (showCmd) { + TCITEM item = {}; + dat->m_hTabIcon = PluginConfig.g_iconErr; + item.mask = TCIF_IMAGE; + item.iImage = 0; + TabCtrl_SetItem(dat->m_pContainer->m_hwndTabs, dat->m_iTabID, &item); + dat->m_bErrorState = true; + } + else { + dat->m_bErrorState = false; + dat->m_hTabIcon = dat->m_hTabStatusIcon; + } + + for (int i = 0; i < 5; i++) + if (IsWindow(GetDlgItem(hwndDlg, myerrorControls[i]))) + Utils::showDlgControl(hwndDlg, myerrorControls[i], showCmd ? SW_SHOW : SW_HIDE); + + SendMessage(hwndDlg, WM_SIZE, 0, 0); + dat->DM_ScrollToBottom(0, 1); + if (m_jobs[0].hContact != 0) + dat->EnableSending(TRUE); +} + +void SendQueue::recallFailed(CMsgDialog *dat, int iEntry) const +{ + if (dat == nullptr) + return; + + int iLen = GetWindowTextLength(GetDlgItem(dat->GetHwnd(), IDC_SRMM_MESSAGE)); + dat->NotifyDeliveryFailure(); + if (iLen != 0) + return; + + // message area is empty, so we can recall the failed message... + SETTEXTEX stx = { ST_DEFAULT, CP_UTF8 }; + SendDlgItemMessage(dat->GetHwnd(), IDC_SRMM_MESSAGE, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)m_jobs[iEntry].szSendBuffer); + dat->UpdateSaveAndSendButton(); + SendDlgItemMessage(dat->GetHwnd(), IDC_SRMM_MESSAGE, EM_SETSEL, -1, -1); +} + +int SendQueue::ackMessage(CMsgDialog *dat, WPARAM wParam, LPARAM lParam) +{ + ACKDATA *ack = (ACKDATA *)lParam; + + int iFound = (int)(LOWORD(wParam)); + if (iFound < 0 || iFound > _countof(m_jobs)) + return 0; + + SendJob &job = m_jobs[iFound]; + + if (job.iStatus == SQ_ERROR) { // received ack for a job which is already in error state... + if (dat) { + if (dat->m_iCurrentQueueError == iFound) { + dat->m_iCurrentQueueError = -1; + showErrorControls(dat, FALSE); + } + } + // we must discard this job, because there is no message window open to handle the + // error properly. But we display a tray notification to inform the user about the problem. + else goto inform_and_discard; + } + + // failed acks are only handled when the window is still open. with no window open, they will be *silently* discarded + + if (ack->result == ACKRESULT_FAILED) { + if (dat) { + // "hard" errors are handled differently in multisend. There is no option to retry - once failed, they + // are discarded and the user is notified with a small log message. + if (!NEN::bNoSounds && !dat->m_pContainer->cfg.flags.m_bNoSound) + Skin_PlaySound("SendError"); + + replaceStrW(job.pwszErrorMsg, CMStringW(FORMAT, TranslateT("Delivery failure: %s"), (wchar_t*)ack->lParam)); + job.iStatus = SQ_ERROR; + KillTimer(dat->GetHwnd(), TIMERID_MSGSEND + iFound); + if (!dat->m_bErrorState) + handleError(dat, iFound); + return 0; + } + + inform_and_discard: + _DebugPopup(job.hContact, TranslateT("A message delivery has failed after the contacts chat window was closed. You may want to resend the last message")); + clearJob(iFound); + return 0; + } + + DBEVENTINFO dbei = {}; + dbei.eventType = EVENTTYPE_MESSAGE; + dbei.flags = DBEF_SENT | DBEF_UTF; + dbei.szModule = Proto_GetBaseAccountName(job.hContact); + dbei.timestamp = time(0); + dbei.cbBlob = (int)mir_strlen(job.szSendBuffer) + 1; + + if (dat) + dat->m_cache->updateStats(TSessionStats::BYTES_SENT, dbei.cbBlob - 1); + else { + CContactCache *cc = CContactCache::getContactCache(job.hContact); + cc->updateStats(TSessionStats::BYTES_SENT, dbei.cbBlob - 1); + } + + if (job.dwFlags & PREF_RTL) + dbei.flags |= DBEF_RTL; + dbei.pBlob = (uint8_t*)job.szSendBuffer; + dbei.szId = (char *)ack->lParam; + + MessageWindowEvent evt = { job.iSendId, job.hContact, &dbei }; + NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt); + + job.szSendBuffer = (char*)dbei.pBlob; + MEVENT hNewEvent = db_event_replace(job.hContact, &dbei); + + if (dat) + if (!NEN::bNoSounds && !dat->m_pContainer->cfg.flags.m_bNoSound) + Skin_PlaySound("SendMsg"); + + Srmm_Broadcast(DM_APPENDMCEVENT, job.hContact, hNewEvent); + + job.iSendId = 0; + job.iAcksNeeded--; + + if (job.iAcksNeeded == 0) { // everything sent + clearJob(iFound); + if (dat) { + KillTimer(dat->GetHwnd(), TIMERID_MSGSEND + iFound); + dat->m_iOpenJobs--; + } + m_currentIndex--; + } + if (dat) { + checkQueue(dat); + + int iNextFailed = findNextFailed(dat); + if (iNextFailed >= 0 && !dat->m_bErrorState) + handleError(dat, iNextFailed); + else { + if (g_plugin.bAutoClose) { + if (g_plugin.bCloseSend) + SendMessage(dat->GetHwnd(), WM_CLOSE, 0, 1); + else + SendMessage(dat->m_pContainer->m_hwnd, WM_CLOSE, 0, 0); + } + } + } + return 0; +} + +LRESULT SendQueue::WarnPendingJobs(unsigned int) +{ + return MessageBox(nullptr, + TranslateT("There are unsent messages waiting for confirmation.\nIf you close the window now, Miranda will try to send them but may be unable to inform you about possible delivery errors.\nDo you really want to close the window(s)?"), + TranslateT("Message window warning"), MB_YESNO | MB_ICONHAND); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// This just adds the message to the database for later delivery and +// adds the contact to the list of contacts that have queued messages +// +// @param iJobIndex int: index of the send job +// dat: Message window data +// fAddHeader: add the "message was sent delayed" header (default = true) +// hContact : contact to which the job should be added (default = hOwner of the send job) +// +// @return the index on success, -1 on failure + +int SendQueue::doSendLater(int iJobIndex, CMsgDialog *dat, MCONTACT hContact, bool fIsSendLater) +{ + const wchar_t *szNote = nullptr; + + if (fIsSendLater && dat) { + if (SendLater::Avail) + szNote = TranslateT("Message successfully queued for later delivery.\nIt will be sent as soon as possible and a popup will inform you about the result."); + else + szNote = TranslateT("The send later feature is not available on this protocol."); + + T2Utf utfText(szNote); + DBEVENTINFO dbei = {}; + dbei.eventType = EVENTTYPE_MESSAGE; + dbei.flags = DBEF_SENT | DBEF_UTF; + dbei.szModule = Proto_GetBaseAccountName(dat->m_hContact); + dbei.timestamp = time(0); + dbei.cbBlob = (int)mir_strlen(utfText) + 1; + dbei.pBlob = (uint8_t*)(char*)utfText; + dat->LogEvent(dbei); + + if (dat->m_hDbEventFirst == 0) + dat->RemakeLog(); + dat->m_cache->saveHistory(); + dat->EnableSendButton(false); + if (dat->m_pContainer->m_hwndActive == dat->GetHwnd()) + dat->UpdateReadChars(); + SendDlgItemMessage(dat->GetHwnd(), IDC_CLOSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL]); + SendDlgItemMessage(dat->GetHwnd(), IDC_CLOSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close session"), BATF_UNICODE); + dat->m_bSaveBtn = false; + + if (!SendLater::Avail) + return 0; + } + + if (iJobIndex < 0 || iJobIndex >= NR_SENDJOBS) + return -1; + + SendJob *job = &m_jobs[iJobIndex]; + char szKeyName[20]; + wchar_t tszHeader[150]; + + if (fIsSendLater) { + time_t now = time(0); + wchar_t tszTimestamp[30]; + wcsftime(tszTimestamp, _countof(tszTimestamp), L"%Y.%m.%d - %H:%M", _localtime32((__time32_t *)&now)); + mir_snprintf(szKeyName, "S%d", (int)now); + mir_snwprintf(tszHeader, TranslateT("\n(Sent delayed. Original timestamp %s)"), tszTimestamp); + } + else mir_snwprintf(tszHeader, L"M%d|", (int)time(0)); + + T2Utf utf_header(tszHeader); + size_t required = mir_strlen(utf_header) + mir_strlen(job->szSendBuffer) + 10; + char *tszMsg = reinterpret_cast(mir_alloc(required)); + + if (fIsSendLater) { + mir_snprintf(tszMsg, required, "%s%s", job->szSendBuffer, utf_header.get()); + db_set_s(hContact ? hContact : job->hContact, "SendLater", szKeyName, tszMsg); + } + else { + mir_snprintf(tszMsg, required, "%s%s", utf_header.get(), job->szSendBuffer); + SendLater::addJob(tszMsg, (void*)hContact); + } + mir_free(tszMsg); + + if (fIsSendLater) { + int iCount = db_get_dw(hContact ? hContact : job->hContact, "SendLater", "count", 0); + iCount++; + db_set_dw(hContact ? hContact : job->hContact, "SendLater", "count", iCount); + SendLater::addContact(hContact ? hContact : job->hContact); + } + return iJobIndex; +} diff --git a/plugins/WinterSpeak/src/Observer.h b/plugins/WinterSpeak/src/Observer.h index ec52b2c4d3..a66bd0ace7 100644 --- a/plugins/WinterSpeak/src/Observer.h +++ b/plugins/WinterSpeak/src/Observer.h @@ -1,17 +1,17 @@ #pragma once -class Subject; +class Subject; -class Observer -{ - public: - virtual ~Observer(); - - //-------------------------------------------------------------------------- +class Observer +{ + public: + virtual ~Observer(); + + //-------------------------------------------------------------------------- // Description : Called by a subject that this observer is observing // to signify a change in state - // Parameters : subject - the subject that changed - //-------------------------------------------------------------------------- - virtual void update(Subject &subject) = 0; + // Parameters : subject - the subject that changed + //-------------------------------------------------------------------------- + virtual void update(Subject &subject) = 0; }; \ No newline at end of file diff --git a/protocols/Discord/CMakeLists.txt b/protocols/Discord/CMakeLists.txt index a227eff6df..d0502167ed 100644 --- a/protocols/Discord/CMakeLists.txt +++ b/protocols/Discord/CMakeLists.txt @@ -1,5 +1,5 @@ -file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc") -set(TARGET Discord) -include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake) -target_link_libraries(${TARGET} Zlib libjson) +file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc") +set(TARGET Discord) +include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake) +target_link_libraries(${TARGET} Zlib libjson) add_subdirectory(proto_discord) \ No newline at end of file diff --git a/protocols/Discord/discord.vcxproj b/protocols/Discord/discord.vcxproj index ac4c73bd0f..e2f19b6be9 100644 --- a/protocols/Discord/discord.vcxproj +++ b/protocols/Discord/discord.vcxproj @@ -1,66 +1,66 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {88928401-2CE8-4568-AAA7-226141870CBF} - Discord - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - {01F9E227-06F5-4BED-907F-402CA7DFAFE6} - false - - - - - {f6a9340e-b8d9-4c75-be30-47dc66d0abc7} - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {88928401-2CE8-4568-AAA7-226141870CBF} + Discord + + + + + + + + + + + + + + + + + + + Create + + + + + + + + + + + {01F9E227-06F5-4BED-907F-402CA7DFAFE6} + false + + + + + {f6a9340e-b8d9-4c75-be30-47dc66d0abc7} + + + + + + \ No newline at end of file diff --git a/protocols/Discord/discord.vcxproj.filters b/protocols/Discord/discord.vcxproj.filters index 18314b26b0..f8b955739b 100644 --- a/protocols/Discord/discord.vcxproj.filters +++ b/protocols/Discord/discord.vcxproj.filters @@ -1,73 +1,73 @@ - - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - + + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + Resource Files + + \ No newline at end of file diff --git a/protocols/Discord/proto_discord/CMakeLists.txt b/protocols/Discord/proto_discord/CMakeLists.txt index 5ea6891fa1..48da532df6 100644 --- a/protocols/Discord/proto_discord/CMakeLists.txt +++ b/protocols/Discord/proto_discord/CMakeLists.txt @@ -1,2 +1,2 @@ -set(TARGET Proto_Discord) +set(TARGET Proto_Discord) include(${CMAKE_SOURCE_DIR}/cmake/icons.cmake) \ No newline at end of file diff --git a/protocols/Discord/proto_discord/Proto_Discord.vcxproj b/protocols/Discord/proto_discord/Proto_Discord.vcxproj index 8ce8962a22..a17e91b938 100644 --- a/protocols/Discord/proto_discord/Proto_Discord.vcxproj +++ b/protocols/Discord/proto_discord/Proto_Discord.vcxproj @@ -1,34 +1,34 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - Proto_Discord - {6B8BA5EE-3815-44A6-A13B-2A22E8B3A311} - - - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + Proto_Discord + {6B8BA5EE-3815-44A6-A13B-2A22E8B3A311} + + + + + + + + + + \ No newline at end of file diff --git a/protocols/Discord/proto_discord/Proto_Discord.vcxproj.filters b/protocols/Discord/proto_discord/Proto_Discord.vcxproj.filters index 3f512b9b20..a86aceb510 100644 --- a/protocols/Discord/proto_discord/Proto_Discord.vcxproj.filters +++ b/protocols/Discord/proto_discord/Proto_Discord.vcxproj.filters @@ -1,14 +1,14 @@ - - - - - - Header Files - - - - - Resource Files - - + + + + + + Header Files + + + + + Resource Files + + \ No newline at end of file diff --git a/protocols/Discord/proto_discord/res/Proto_Discord.rc b/protocols/Discord/proto_discord/res/Proto_Discord.rc index 13d3153e3e..fb320d064b 100644 --- a/protocols/Discord/proto_discord/res/Proto_Discord.rc +++ b/protocols/Discord/proto_discord/res/Proto_Discord.rc @@ -1,74 +1,74 @@ -// Microsoft Visual C++ generated resource script. -// -#include "..\src\resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Russian (Russia) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "..\\src\\resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON "Offline.ico" -IDI_ICON2 ICON "Online.ico" -IDI_ICON3 ICON "Away.ico" -IDI_ICON4 ICON "Invisible.ico" -IDI_ICON5 ICON "NA.ico" -IDI_ICON6 ICON "DND.ico" -#endif // Russian (Russia) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian (Russia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "Offline.ico" +IDI_ICON2 ICON "Online.ico" +IDI_ICON3 ICON "Away.ico" +IDI_ICON4 ICON "Invisible.ico" +IDI_ICON5 ICON "NA.ico" +IDI_ICON6 ICON "DND.ico" +#endif // Russian (Russia) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/protocols/Discord/proto_discord/src/resource.h b/protocols/Discord/proto_discord/src/resource.h index 70e0dd0372..1a283a2809 100644 --- a/protocols/Discord/proto_discord/src/resource.h +++ b/protocols/Discord/proto_discord/src/resource.h @@ -1,23 +1,23 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Proto_ICQ.rc -// -#define IDI_ICON1 105 -#define IDI_ICON2 104 -#define IDI_ICON3 128 -#define IDI_ICON4 130 -#define IDI_ICON5 131 -#define IDI_ICON6 158 -#define IDI_ICON7 159 -#define IDI_ICON8 129 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 110 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Proto_ICQ.rc +// +#define IDI_ICON1 105 +#define IDI_ICON2 104 +#define IDI_ICON3 128 +#define IDI_ICON4 130 +#define IDI_ICON5 131 +#define IDI_ICON6 158 +#define IDI_ICON7 159 +#define IDI_ICON8 129 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 110 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/protocols/Discord/res/discord.rc b/protocols/Discord/res/discord.rc index 6fac650624..780cae5613 100644 --- a/protocols/Discord/res/discord.rc +++ b/protocols/Discord/res/discord.rc @@ -1,159 +1,159 @@ -// Microsoft Visual C++ generated resource script. -// -#include "..\src\resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "..\\src\\resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_MAIN ICON "discord.ico" - -IDI_GROUPCHAT ICON "groupchat.ico" - -IDI_VOICE_CALL ICON "voiceCall.ico" - -IDI_VOICE_ENDED ICON "voiceEnded.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_OPTIONS_ACCOUNT DIALOGEX 0, 0, 305, 144 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "User details",IDC_STATIC,7,7,291,46 - LTEXT "E-mail:",IDC_STATIC,17,20,61,8,0,WS_EX_RIGHT - EDITTEXT IDC_USERNAME,84,18,123,13,ES_AUTOHSCROLL - LTEXT "Password:",IDC_STATIC,17,36,61,8,0,WS_EX_RIGHT - EDITTEXT IDC_PASSWORD,84,34,123,13,ES_PASSWORD | ES_AUTOHSCROLL - GROUPBOX "Contacts",IDC_STATIC,7,54,291,86 - LTEXT "Default group:",IDC_STATIC,17,73,61,8,0,WS_EX_RIGHT - EDITTEXT IDC_GROUP,84,71,123,13,ES_AUTOHSCROLL - CONTROL "Enable guilds (servers)",IDC_USEGUILDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,90,275,10 - CONTROL "Do not open chat windows on creation",IDC_HIDECHATS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,102,248,10 - CONTROL "Use subgroups for server channels (requires restart)",IDC_USEGROUPS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,114,248,10 - CONTROL "Delete messages in Miranda when they are deleted from server",IDC_DELETE_MSGS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,126,275,10 -END - -IDD_OPTIONS_ACCMGR DIALOGEX 0, 0, 200, 88 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "User details",IDC_STATIC,7,7,178,46 - LTEXT "E-mail:",IDC_STATIC,17,20,69,8,0,WS_EX_RIGHT - EDITTEXT IDC_USERNAME,92,18,86,13,ES_AUTOHSCROLL - LTEXT "Password:",IDC_STATIC,17,36,69,8,0,WS_EX_RIGHT - EDITTEXT IDC_PASSWORD,92,34,86,13,ES_PASSWORD | ES_AUTOHSCROLL - GROUPBOX "Contacts",IDC_STATIC,7,56,178,28 - LTEXT "Default group:",IDC_STATIC,17,67,69,8,0,WS_EX_RIGHT - EDITTEXT IDC_GROUP,92,65,86,13,ES_AUTOHSCROLL -END - -IDD_EXTSEARCH DIALOGEX 0, 0, 114, 55 -STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU -EXSTYLE WS_EX_TRANSPARENT | WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "Nick:",IDC_STATIC,6,7,99,8 - EDITTEXT IDC_NICK,3,18,103,12,0,WS_EX_CLIENTEDGE -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_OPTIONS_ACCOUNT, DIALOG - BEGIN - END - - IDD_OPTIONS_ACCMGR, DIALOG - BEGIN - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// AFX_DIALOG_LAYOUT -// - -IDD_OPTIONS_ACCOUNT AFX_DIALOG_LAYOUT -BEGIN - 0 -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_MAIN ICON "discord.ico" + +IDI_GROUPCHAT ICON "groupchat.ico" + +IDI_VOICE_CALL ICON "voiceCall.ico" + +IDI_VOICE_ENDED ICON "voiceEnded.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_OPTIONS_ACCOUNT DIALOGEX 0, 0, 305, 144 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "User details",IDC_STATIC,7,7,291,46 + LTEXT "E-mail:",IDC_STATIC,17,20,61,8,0,WS_EX_RIGHT + EDITTEXT IDC_USERNAME,84,18,123,13,ES_AUTOHSCROLL + LTEXT "Password:",IDC_STATIC,17,36,61,8,0,WS_EX_RIGHT + EDITTEXT IDC_PASSWORD,84,34,123,13,ES_PASSWORD | ES_AUTOHSCROLL + GROUPBOX "Contacts",IDC_STATIC,7,54,291,86 + LTEXT "Default group:",IDC_STATIC,17,73,61,8,0,WS_EX_RIGHT + EDITTEXT IDC_GROUP,84,71,123,13,ES_AUTOHSCROLL + CONTROL "Enable guilds (servers)",IDC_USEGUILDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,90,275,10 + CONTROL "Do not open chat windows on creation",IDC_HIDECHATS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,102,248,10 + CONTROL "Use subgroups for server channels (requires restart)",IDC_USEGROUPS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,114,248,10 + CONTROL "Delete messages in Miranda when they are deleted from server",IDC_DELETE_MSGS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,126,275,10 +END + +IDD_OPTIONS_ACCMGR DIALOGEX 0, 0, 200, 88 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "User details",IDC_STATIC,7,7,178,46 + LTEXT "E-mail:",IDC_STATIC,17,20,69,8,0,WS_EX_RIGHT + EDITTEXT IDC_USERNAME,92,18,86,13,ES_AUTOHSCROLL + LTEXT "Password:",IDC_STATIC,17,36,69,8,0,WS_EX_RIGHT + EDITTEXT IDC_PASSWORD,92,34,86,13,ES_PASSWORD | ES_AUTOHSCROLL + GROUPBOX "Contacts",IDC_STATIC,7,56,178,28 + LTEXT "Default group:",IDC_STATIC,17,67,69,8,0,WS_EX_RIGHT + EDITTEXT IDC_GROUP,92,65,86,13,ES_AUTOHSCROLL +END + +IDD_EXTSEARCH DIALOGEX 0, 0, 114, 55 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU +EXSTYLE WS_EX_TRANSPARENT | WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Nick:",IDC_STATIC,6,7,99,8 + EDITTEXT IDC_NICK,3,18,103,12,0,WS_EX_CLIENTEDGE +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_OPTIONS_ACCOUNT, DIALOG + BEGIN + END + + IDD_OPTIONS_ACCMGR, DIALOG + BEGIN + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_OPTIONS_ACCOUNT AFX_DIALOG_LAYOUT +BEGIN + 0 +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/protocols/Discord/res/version.rc b/protocols/Discord/res/version.rc index 5a5ddd63ed..bd3c22d943 100644 --- a/protocols/Discord/res/version.rc +++ b/protocols/Discord/res/version.rc @@ -1,9 +1,9 @@ -// Microsoft Visual C++ generated resource script. -// -#ifdef APSTUDIO_INVOKED -#error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - -#include "..\src\version.h" - -#include "..\..\build\Version.rc" +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + +#include "..\src\version.h" + +#include "..\..\build\Version.rc" diff --git a/protocols/Discord/src/avatars.cpp b/protocols/Discord/src/avatars.cpp index aef0a76e48..fc49a7ec1a 100644 --- a/protocols/Discord/src/avatars.cpp +++ b/protocols/Discord/src/avatars.cpp @@ -1,205 +1,205 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -CMStringW CDiscordProto::GetAvatarFilename(MCONTACT hContact) -{ - CMStringW wszResult(FORMAT, L"%s\\%S", VARSW(L"%miranda_avatarcache%"), m_szModuleName); - CreateDirectoryTreeW(wszResult); - - wszResult.AppendChar('\\'); - - const wchar_t* szFileType = ProtoGetAvatarExtension(getByte(hContact, "AvatarType", PA_FORMAT_PNG)); - wszResult.AppendFormat(L"%lld%s", getId(hContact, DB_KEY_ID), szFileType); - return wszResult; -} - -INT_PTR CDiscordProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) -{ - int res = 0; - - switch (wParam) { - case AF_MAXSIZE: - ((POINT*)lParam)->x = ((POINT*)lParam)->y = 128; - break; - - case AF_FORMATSUPPORTED: - res = lParam == PA_FORMAT_PNG || lParam == PA_FORMAT_GIF || lParam == PA_FORMAT_JPEG; - break; - - case AF_ENABLED: - case AF_DONTNEEDDELAYS: - case AF_FETCHIFPROTONOTVISIBLE: - case AF_FETCHIFCONTACTOFFLINE: - return 1; - } - - return res; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) -{ - PROTO_AVATAR_INFORMATION ai = { 0 }; - ai.format = PA_FORMAT_UNKNOWN; - ai.hContact = (UINT_PTR)pReq->pUserInfo; - - if (reply->resultCode != 200) { -LBL_Error: - ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai); - return; - } - - if (auto *pszHdr = Netlib_GetHeader(reply, "Content-Type")) - ai.format = ProtoGetAvatarFormatByMimeType(pszHdr); - - if (ai.format == PA_FORMAT_UNKNOWN) { - debugLogA("unknown avatar mime type"); - goto LBL_Error; - } - - setByte(ai.hContact, "AvatarType", ai.format); - mir_wstrncpy(ai.filename, GetAvatarFilename(ai.hContact), _countof(ai.filename)); - - FILE *out = _wfopen(ai.filename, L"wb"); - if (out == nullptr) { - debugLogA("cannot open avatar file %S for writing", ai.filename); - goto LBL_Error; - } - - fwrite(reply->pData, 1, reply->dataLength, out); - fclose(out); - - if (ai.hContact) - ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai); - else - ReportSelfAvatarChanged(); -} - -bool CDiscordProto::RetrieveAvatar(MCONTACT hContact) -{ - ptrA szAvatarHash(getStringA(hContact, DB_KEY_AVHASH)); - SnowFlake id = getId(hContact, DB_KEY_ID); - if (id == 0 || szAvatarHash == nullptr) - return false; - - CMStringA szUrl(FORMAT, "https://cdn.discordapp.com/avatars/%lld/%s.jpg", id, szAvatarHash.get()); - AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, szUrl, &CDiscordProto::OnReceiveAvatar); - pReq->pUserInfo = (void*)hContact; - Push(pReq); - return true; -} - -INT_PTR CDiscordProto::GetAvatarInfo(WPARAM flags, LPARAM lParam) -{ - PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION *)lParam; - - CMStringW wszFileName(GetAvatarFilename(pai->hContact)); - if (!wszFileName.IsEmpty()) { - mir_wstrncpy(pai->filename, wszFileName, _countof(pai->filename)); - - bool bFileExist = _waccess(wszFileName, 0) == 0; - - // if we still need to load an avatar - if ((flags & GAIF_FORCE) || !bFileExist) { - if (RetrieveAvatar(pai->hContact)) - return GAIR_WAITFOR; - } - else if (bFileExist) - return GAIR_SUCCESS; - } - - return GAIR_NOAVATAR; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::GetMyAvatar(WPARAM wParam, LPARAM lParam) -{ - if (!wParam || !lParam) - return -3; - - wchar_t* buf = (wchar_t*)wParam; - int size = (int)lParam; - - PROTO_AVATAR_INFORMATION ai = {}; - switch (GetAvatarInfo(0, (LPARAM)&ai)) { - case GAIR_SUCCESS: - wcsncpy_s(buf, size, ai.filename, _TRUNCATE); - return 0; - - case GAIR_WAITFOR: - return -1; - } - - return -2; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::SetMyAvatar(WPARAM, LPARAM lParam) -{ - CMStringW wszFileName(GetAvatarFilename(0)); - - const wchar_t *pwszFilename = (const wchar_t*)lParam; - if (pwszFilename == nullptr) { // remove my avatar file - delSetting(DB_KEY_AVHASH); - DeleteFile(wszFileName); - } - - CMStringA szPayload("data:"); - - const char *szMimeType = ProtoGetAvatarMimeType(ProtoGetAvatarFileFormat(pwszFilename)); - if (szMimeType == nullptr) { - debugLogA("invalid file format for avatar %S", pwszFilename); - return 1; - } - szPayload.AppendFormat("%s;base64,", szMimeType); - FILE *in = _wfopen(pwszFilename, L"rb"); - if (in == nullptr) { - debugLogA("cannot open avatar file %S for reading", pwszFilename); - return 2; - } - - int iFileLength = _filelength(_fileno(in)); - ptrA szFileContents((char*)mir_alloc(iFileLength)); - fread(szFileContents, 1, iFileLength, in); - fclose(in); - szPayload.Append(ptrA(mir_base64_encode(szFileContents.get(), iFileLength))); - - JSONNode root; root << CHAR_PARAM("avatar", szPayload); - Push(new AsyncHttpRequest(this, REQUEST_PATCH, "/users/@me", nullptr, &root)); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::CheckAvatarChange(MCONTACT hContact, const CMStringW &wszNewHash) -{ - if (wszNewHash.IsEmpty()) - return; - - ptrW wszOldAvatar(getWStringA(hContact, DB_KEY_AVHASH)); - - // if avatar's hash changed, we need to request a new one - if (mir_wstrcmp(wszNewHash, wszOldAvatar)) { - setWString(hContact, DB_KEY_AVHASH, wszNewHash); - RetrieveAvatar(hContact); - } -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +CMStringW CDiscordProto::GetAvatarFilename(MCONTACT hContact) +{ + CMStringW wszResult(FORMAT, L"%s\\%S", VARSW(L"%miranda_avatarcache%"), m_szModuleName); + CreateDirectoryTreeW(wszResult); + + wszResult.AppendChar('\\'); + + const wchar_t* szFileType = ProtoGetAvatarExtension(getByte(hContact, "AvatarType", PA_FORMAT_PNG)); + wszResult.AppendFormat(L"%lld%s", getId(hContact, DB_KEY_ID), szFileType); + return wszResult; +} + +INT_PTR CDiscordProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) +{ + int res = 0; + + switch (wParam) { + case AF_MAXSIZE: + ((POINT*)lParam)->x = ((POINT*)lParam)->y = 128; + break; + + case AF_FORMATSUPPORTED: + res = lParam == PA_FORMAT_PNG || lParam == PA_FORMAT_GIF || lParam == PA_FORMAT_JPEG; + break; + + case AF_ENABLED: + case AF_DONTNEEDDELAYS: + case AF_FETCHIFPROTONOTVISIBLE: + case AF_FETCHIFCONTACTOFFLINE: + return 1; + } + + return res; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) +{ + PROTO_AVATAR_INFORMATION ai = { 0 }; + ai.format = PA_FORMAT_UNKNOWN; + ai.hContact = (UINT_PTR)pReq->pUserInfo; + + if (reply->resultCode != 200) { +LBL_Error: + ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai); + return; + } + + if (auto *pszHdr = Netlib_GetHeader(reply, "Content-Type")) + ai.format = ProtoGetAvatarFormatByMimeType(pszHdr); + + if (ai.format == PA_FORMAT_UNKNOWN) { + debugLogA("unknown avatar mime type"); + goto LBL_Error; + } + + setByte(ai.hContact, "AvatarType", ai.format); + mir_wstrncpy(ai.filename, GetAvatarFilename(ai.hContact), _countof(ai.filename)); + + FILE *out = _wfopen(ai.filename, L"wb"); + if (out == nullptr) { + debugLogA("cannot open avatar file %S for writing", ai.filename); + goto LBL_Error; + } + + fwrite(reply->pData, 1, reply->dataLength, out); + fclose(out); + + if (ai.hContact) + ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai); + else + ReportSelfAvatarChanged(); +} + +bool CDiscordProto::RetrieveAvatar(MCONTACT hContact) +{ + ptrA szAvatarHash(getStringA(hContact, DB_KEY_AVHASH)); + SnowFlake id = getId(hContact, DB_KEY_ID); + if (id == 0 || szAvatarHash == nullptr) + return false; + + CMStringA szUrl(FORMAT, "https://cdn.discordapp.com/avatars/%lld/%s.jpg", id, szAvatarHash.get()); + AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, szUrl, &CDiscordProto::OnReceiveAvatar); + pReq->pUserInfo = (void*)hContact; + Push(pReq); + return true; +} + +INT_PTR CDiscordProto::GetAvatarInfo(WPARAM flags, LPARAM lParam) +{ + PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION *)lParam; + + CMStringW wszFileName(GetAvatarFilename(pai->hContact)); + if (!wszFileName.IsEmpty()) { + mir_wstrncpy(pai->filename, wszFileName, _countof(pai->filename)); + + bool bFileExist = _waccess(wszFileName, 0) == 0; + + // if we still need to load an avatar + if ((flags & GAIF_FORCE) || !bFileExist) { + if (RetrieveAvatar(pai->hContact)) + return GAIR_WAITFOR; + } + else if (bFileExist) + return GAIR_SUCCESS; + } + + return GAIR_NOAVATAR; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::GetMyAvatar(WPARAM wParam, LPARAM lParam) +{ + if (!wParam || !lParam) + return -3; + + wchar_t* buf = (wchar_t*)wParam; + int size = (int)lParam; + + PROTO_AVATAR_INFORMATION ai = {}; + switch (GetAvatarInfo(0, (LPARAM)&ai)) { + case GAIR_SUCCESS: + wcsncpy_s(buf, size, ai.filename, _TRUNCATE); + return 0; + + case GAIR_WAITFOR: + return -1; + } + + return -2; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::SetMyAvatar(WPARAM, LPARAM lParam) +{ + CMStringW wszFileName(GetAvatarFilename(0)); + + const wchar_t *pwszFilename = (const wchar_t*)lParam; + if (pwszFilename == nullptr) { // remove my avatar file + delSetting(DB_KEY_AVHASH); + DeleteFile(wszFileName); + } + + CMStringA szPayload("data:"); + + const char *szMimeType = ProtoGetAvatarMimeType(ProtoGetAvatarFileFormat(pwszFilename)); + if (szMimeType == nullptr) { + debugLogA("invalid file format for avatar %S", pwszFilename); + return 1; + } + szPayload.AppendFormat("%s;base64,", szMimeType); + FILE *in = _wfopen(pwszFilename, L"rb"); + if (in == nullptr) { + debugLogA("cannot open avatar file %S for reading", pwszFilename); + return 2; + } + + int iFileLength = _filelength(_fileno(in)); + ptrA szFileContents((char*)mir_alloc(iFileLength)); + fread(szFileContents, 1, iFileLength, in); + fclose(in); + szPayload.Append(ptrA(mir_base64_encode(szFileContents.get(), iFileLength))); + + JSONNode root; root << CHAR_PARAM("avatar", szPayload); + Push(new AsyncHttpRequest(this, REQUEST_PATCH, "/users/@me", nullptr, &root)); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::CheckAvatarChange(MCONTACT hContact, const CMStringW &wszNewHash) +{ + if (wszNewHash.IsEmpty()) + return; + + ptrW wszOldAvatar(getWStringA(hContact, DB_KEY_AVHASH)); + + // if avatar's hash changed, we need to request a new one + if (mir_wstrcmp(wszNewHash, wszOldAvatar)) { + setWString(hContact, DB_KEY_AVHASH, wszNewHash); + RetrieveAvatar(hContact); + } +} diff --git a/protocols/Discord/src/connection.cpp b/protocols/Discord/src/connection.cpp index a85d5738a0..d98d6e4ec8 100644 --- a/protocols/Discord/src/connection.cpp +++ b/protocols/Discord/src/connection.cpp @@ -1,123 +1,123 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -void CDiscordProto::ExecuteRequest(AsyncHttpRequest *pReq) -{ - CMStringA str; - - pReq->szUrl = pReq->m_szUrl.GetBuffer(); - if (!pReq->m_szParam.IsEmpty()) { - if (pReq->requestType == REQUEST_GET) { - str.Format("%s?%s", pReq->m_szUrl.c_str(), pReq->m_szParam.c_str()); - pReq->szUrl = str.GetBuffer(); - } - else { - pReq->pData = mir_strdup(pReq->m_szParam); - pReq->dataLength = pReq->m_szParam.GetLength(); - } - } - - if (pReq->m_bMainSite) { - pReq->flags |= NLHRF_PERSISTENT; - pReq->nlc = m_hAPIConnection; - pReq->AddHeader("Cookie", m_szCookie); - } - - bool bRetryable = pReq->nlc != nullptr; - debugLogA("Executing request #%d:\n%s", pReq->m_iReqNum, pReq->szUrl); - -LBL_Retry: - NLHR_PTR reply(Netlib_HttpTransaction(m_hNetlibUser, pReq)); - if (reply == nullptr) { - debugLogA("Request %d failed", pReq->m_iReqNum); - - if (pReq->m_bMainSite) { - if (IsStatusConnecting(m_iStatus)) - ConnectionFailed(LOGINERR_NONETWORK); - m_hAPIConnection = nullptr; - } - - if (bRetryable) { - debugLogA("Attempt to retry request #%d", pReq->m_iReqNum); - pReq->nlc = nullptr; - bRetryable = false; - goto LBL_Retry; - } - } - else { - if (pReq->m_pFunc != nullptr) - (this->*(pReq->m_pFunc))(reply, pReq); - - if (pReq->m_bMainSite) - m_hAPIConnection = reply->nlc; - } - delete pReq; -} - -void CDiscordProto::OnLoggedIn() -{ - debugLogA("CDiscordProto::OnLoggedIn"); - m_bOnline = true; - SetServerStatus(m_iDesiredStatus); -} - -void CDiscordProto::OnLoggedOut() -{ - debugLogA("CDiscordProto::OnLoggedOut"); - m_bOnline = false; - m_bTerminated = true; - m_iGatewaySeq = 0; - m_szTempToken = nullptr; - m_szCookie.Empty(); - m_szWSCookie.Empty(); - - m_impl.m_heartBeat.StopSafe(); - - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE); - m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - - setAllContactStatuses(ID_STATUS_OFFLINE, false); -} - -void CDiscordProto::ShutdownSession() -{ - if (m_bTerminated) - return; - - debugLogA("CDiscordProto::ShutdownSession"); - - // shutdown all resources - if (m_hWorkerThread) - SetEvent(m_evRequestsQueue); - if (m_hGatewayConnection) - Netlib_Shutdown(m_hGatewayConnection); - if (m_hAPIConnection) - Netlib_Shutdown(m_hAPIConnection); - - OnLoggedOut(); -} - -void CDiscordProto::ConnectionFailed(int iReason) -{ - debugLogA("CDiscordProto::ConnectionFailed -> reason %d", iReason); - delSetting("AccessToken"); - - ProtoBroadcastAck(0, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, iReason); - ShutdownSession(); -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +void CDiscordProto::ExecuteRequest(AsyncHttpRequest *pReq) +{ + CMStringA str; + + pReq->szUrl = pReq->m_szUrl.GetBuffer(); + if (!pReq->m_szParam.IsEmpty()) { + if (pReq->requestType == REQUEST_GET) { + str.Format("%s?%s", pReq->m_szUrl.c_str(), pReq->m_szParam.c_str()); + pReq->szUrl = str.GetBuffer(); + } + else { + pReq->pData = mir_strdup(pReq->m_szParam); + pReq->dataLength = pReq->m_szParam.GetLength(); + } + } + + if (pReq->m_bMainSite) { + pReq->flags |= NLHRF_PERSISTENT; + pReq->nlc = m_hAPIConnection; + pReq->AddHeader("Cookie", m_szCookie); + } + + bool bRetryable = pReq->nlc != nullptr; + debugLogA("Executing request #%d:\n%s", pReq->m_iReqNum, pReq->szUrl); + +LBL_Retry: + NLHR_PTR reply(Netlib_HttpTransaction(m_hNetlibUser, pReq)); + if (reply == nullptr) { + debugLogA("Request %d failed", pReq->m_iReqNum); + + if (pReq->m_bMainSite) { + if (IsStatusConnecting(m_iStatus)) + ConnectionFailed(LOGINERR_NONETWORK); + m_hAPIConnection = nullptr; + } + + if (bRetryable) { + debugLogA("Attempt to retry request #%d", pReq->m_iReqNum); + pReq->nlc = nullptr; + bRetryable = false; + goto LBL_Retry; + } + } + else { + if (pReq->m_pFunc != nullptr) + (this->*(pReq->m_pFunc))(reply, pReq); + + if (pReq->m_bMainSite) + m_hAPIConnection = reply->nlc; + } + delete pReq; +} + +void CDiscordProto::OnLoggedIn() +{ + debugLogA("CDiscordProto::OnLoggedIn"); + m_bOnline = true; + SetServerStatus(m_iDesiredStatus); +} + +void CDiscordProto::OnLoggedOut() +{ + debugLogA("CDiscordProto::OnLoggedOut"); + m_bOnline = false; + m_bTerminated = true; + m_iGatewaySeq = 0; + m_szTempToken = nullptr; + m_szCookie.Empty(); + m_szWSCookie.Empty(); + + m_impl.m_heartBeat.StopSafe(); + + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE); + m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; + + setAllContactStatuses(ID_STATUS_OFFLINE, false); +} + +void CDiscordProto::ShutdownSession() +{ + if (m_bTerminated) + return; + + debugLogA("CDiscordProto::ShutdownSession"); + + // shutdown all resources + if (m_hWorkerThread) + SetEvent(m_evRequestsQueue); + if (m_hGatewayConnection) + Netlib_Shutdown(m_hGatewayConnection); + if (m_hAPIConnection) + Netlib_Shutdown(m_hAPIConnection); + + OnLoggedOut(); +} + +void CDiscordProto::ConnectionFailed(int iReason) +{ + debugLogA("CDiscordProto::ConnectionFailed -> reason %d", iReason); + delSetting("AccessToken"); + + ProtoBroadcastAck(0, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, iReason); + ShutdownSession(); +} diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index 5d79feb9fe..7554fa669c 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -1,592 +1,592 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -#pragma pack(4) - -///////////////////////////////////////////////////////////////////////////////////////// - -struct CDiscordCommand -{ - const wchar_t *szCommandId; - GatewayHandlerFunc pFunc; -} -static handlers[] = // these structures must me sorted alphabetically -{ - { L"CALL_CREATE", &CDiscordProto::OnCommandCallCreated }, - { L"CALL_DELETE", &CDiscordProto::OnCommandCallDeleted }, - { L"CALL_UPDATE", &CDiscordProto::OnCommandCallUpdated }, - - { L"CHANNEL_CREATE", &CDiscordProto::OnCommandChannelCreated }, - { L"CHANNEL_DELETE", &CDiscordProto::OnCommandChannelDeleted }, - { L"CHANNEL_UPDATE", &CDiscordProto::OnCommandChannelUpdated }, - - { L"GUILD_CREATE", &CDiscordProto::OnCommandGuildCreated }, - { L"GUILD_DELETE", &CDiscordProto::OnCommandGuildDeleted }, - { L"GUILD_MEMBER_ADD", &CDiscordProto::OnCommandGuildMemberAdded }, - { L"GUILD_MEMBER_LIST_UPDATE", &CDiscordProto::OnCommandGuildMemberListUpdate }, - { L"GUILD_MEMBER_REMOVE", &CDiscordProto::OnCommandGuildMemberRemoved }, - { L"GUILD_MEMBER_UPDATE", &CDiscordProto::OnCommandGuildMemberUpdated }, - { L"GUILD_ROLE_CREATE", &CDiscordProto::OnCommandRoleCreated }, - { L"GUILD_ROLE_DELETE", &CDiscordProto::OnCommandRoleDeleted }, - { L"GUILD_ROLE_UPDATE", &CDiscordProto::OnCommandRoleCreated }, - - { L"MESSAGE_ACK", &CDiscordProto::OnCommandMessageAck }, - { L"MESSAGE_CREATE", &CDiscordProto::OnCommandMessageCreate }, - { L"MESSAGE_DELETE", &CDiscordProto::OnCommandMessageDelete }, - { L"MESSAGE_UPDATE", &CDiscordProto::OnCommandMessageUpdate }, - - { L"PRESENCE_UPDATE", &CDiscordProto::OnCommandPresence }, - - { L"READY", &CDiscordProto::OnCommandReady }, - - { L"RELATIONSHIP_ADD", &CDiscordProto::OnCommandFriendAdded }, - { L"RELATIONSHIP_REMOVE", &CDiscordProto::OnCommandFriendRemoved }, - - { L"TYPING_START", &CDiscordProto::OnCommandTyping }, - - { L"USER_SETTINGS_UPDATE", &CDiscordProto::OnCommandUserSettingsUpdate }, - { L"USER_UPDATE", &CDiscordProto::OnCommandUserUpdate }, -}; - -static int __cdecl pSearchFunc(const void *p1, const void *p2) -{ - return wcscmp(((CDiscordCommand*)p1)->szCommandId, ((CDiscordCommand*)p2)->szCommandId); -} - -GatewayHandlerFunc CDiscordProto::GetHandler(const wchar_t *pwszCommand) -{ - CDiscordCommand tmp = { pwszCommand, nullptr }; - CDiscordCommand *p = (CDiscordCommand*)bsearch(&tmp, handlers, _countof(handlers), sizeof(handlers[0]), pSearchFunc); - return (p != nullptr) ? p->pFunc : nullptr; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// channel operations - -void CDiscordProto::OnCommandChannelCreated(const JSONNode &pRoot) -{ - SnowFlake guildId = ::getId(pRoot["guild_id"]); - if (guildId == 0) - PreparePrivateChannel(pRoot); - else { - // group channel for a guild - CDiscordGuild *pGuild = FindGuild(guildId); - if (pGuild && m_bUseGroupchats) { - CDiscordUser *pUser = ProcessGuildChannel(pGuild, pRoot); - if (pUser) - CreateChat(pGuild, pUser); - } - } -} - -void CDiscordProto::OnCommandChannelDeleted(const JSONNode &pRoot) -{ - CDiscordUser *pUser = FindUserByChannel(::getId(pRoot["id"])); - if (pUser == nullptr) - return; - - SnowFlake guildId = ::getId(pRoot["guild_id"]); - if (guildId == 0) { - pUser->channelId = pUser->lastMsgId = 0; - delSetting(pUser->hContact, DB_KEY_CHANNELID); - } - else { - CDiscordGuild *pGuild = FindGuild(guildId); - if (pGuild != nullptr) - Chat_Terminate(m_szModuleName, pUser->wszUsername, true); - } -} - -void CDiscordProto::OnCommandChannelUpdated(const JSONNode &pRoot) -{ - CDiscordUser *pUser = FindUserByChannel(::getId(pRoot["id"])); - if (pUser == nullptr) - return; - - pUser->lastMsgId = ::getId(pRoot["last_message_id"]); - - SnowFlake guildId = ::getId(pRoot["guild_id"]); - if (guildId != 0) { - CDiscordGuild *pGuild = FindGuild(guildId); - if (pGuild == nullptr) - return; - - CMStringW wszName = pRoot["name"].as_mstring(); - if (!wszName.IsEmpty()) { - CMStringW wszNewName = pGuild->wszName + L"#" + wszName; - Chat_ChangeSessionName(m_szModuleName, pUser->wszUsername, wszNewName); - } - - CMStringW wszTopic = pRoot["topic"].as_mstring(); - Chat_SetStatusbarText(m_szModuleName, pUser->wszUsername, wszTopic); - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_TOPIC }; - gce.pszID.w = pUser->wszUsername; - gce.pszText.w = wszTopic; - gce.time = time(0); - Chat_Event(&gce); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// reading a new message - -void CDiscordProto::OnCommandFriendAdded(const JSONNode &pRoot) -{ - CDiscordUser *pUser = PrepareUser(pRoot["user"]); - pUser->bIsPrivate = true; - ProcessType(pUser, pRoot); -} - -void CDiscordProto::OnCommandFriendRemoved(const JSONNode &pRoot) -{ - SnowFlake id = ::getId(pRoot["id"]); - CDiscordUser *pUser = FindUser(id); - if (pUser != nullptr) { - if (pUser->hContact) - if (pUser->bIsPrivate) - db_delete_contact(pUser->hContact); - - arUsers.remove(pUser); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// guild synchronization - -void CDiscordProto::OnCommandGuildCreated(const JSONNode &pRoot) -{ - if (m_bUseGroupchats) - ProcessGuild(pRoot); -} - -void CDiscordProto::OnCommandGuildDeleted(const JSONNode &pRoot) -{ - CDiscordGuild *pGuild = FindGuild(::getId(pRoot["id"])); - if (pGuild == nullptr) - return; - - for (auto &it : arUsers.rev_iter()) - if (it->pGuild == pGuild) { - Chat_Terminate(m_szModuleName, it->wszUsername, true); - arUsers.removeItem(&it); - } - - Chat_Terminate(m_szModuleName, pRoot["name"].as_mstring(), true); - - arGuilds.remove(pGuild); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// guild members - -void CDiscordProto::OnCommandGuildMemberAdded(const JSONNode&) -{ -} - -void CDiscordProto::OnCommandGuildMemberListUpdate(const JSONNode &pRoot) -{ - auto *pGuild = FindGuild(::getId(pRoot["guild_id"])); - if (pGuild == nullptr) - return; - - int iStatus = 0; - - for (auto &ops: pRoot["ops"]) { - for (auto &it : ops["items"]) { - auto &item = it.at((size_t)0); - if (!mir_strcmp(item .name(), "group")) { - iStatus = item ["id"].as_string() == "online" ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE; - continue; - } - - if (!mir_strcmp(item .name(), "member")) { - bool bNew = false; - auto *pm = ProcessGuildUser(pGuild, item, &bNew); - pm->iStatus = iStatus; - - if (bNew) - AddGuildUser(pGuild, *pm); - else if (iStatus) { - CMStringW wszUserId(FORMAT, L"%lld", pm->userId); - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_SETCONTACTSTATUS }; - gce.time = time(0); - gce.pszUID.w = wszUserId; - - for (auto &cc : pGuild->arChannels) { - if (!cc->bIsGroup) - continue; - - gce.pszID.w = cc->wszChannelName; - gce.dwItemData = iStatus; - Chat_Event(&gce); - } - } - } - } - } - - pGuild->bSynced = true; -} - -void CDiscordProto::OnCommandGuildMemberRemoved(const JSONNode &pRoot) -{ - CDiscordGuild *pGuild = FindGuild(::getId(pRoot["guild_id"])); - if (pGuild == nullptr) - return; - - CMStringW wszUserId = pRoot["user"]["id"].as_mstring(); - - for (auto &pUser : arUsers) { - if (pUser->pGuild != pGuild) - continue; - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_PART }; - gce.pszUID.w = pUser->wszUsername; - gce.time = time(0); - gce.pszUID.w = wszUserId; - Chat_Event(&gce); - } -} - -void CDiscordProto::OnCommandGuildMemberUpdated(const JSONNode &pRoot) -{ - CDiscordGuild *pGuild = FindGuild(::getId(pRoot["guild_id"])); - if (pGuild == nullptr) - return; - - CMStringW wszUserId = pRoot["user"]["id"].as_mstring(); - CDiscordGuildMember *gm = pGuild->FindUser(_wtoi64(wszUserId)); - if (gm == nullptr) - return; - - gm->wszDiscordId = pRoot["user"]["username"].as_mstring() + L"#" + pRoot["user"]["discriminator"].as_mstring(); - gm->wszNick = pRoot["nick"].as_mstring(); - if (gm->wszNick.IsEmpty()) - gm->wszNick = pRoot["user"]["username"].as_mstring(); - - for (auto &it : arUsers) { - if (it->pGuild != pGuild) - continue; - - CMStringW wszOldNick; - SESSION_INFO *si = g_chatApi.SM_FindSession(it->wszUsername, m_szModuleName); - if (si != nullptr) { - USERINFO *ui = g_chatApi.UM_FindUser(si, wszUserId); - if (ui != nullptr) - wszOldNick = ui->pszNick; - } - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_NICK }; - gce.pszID.w = it->wszUsername; - gce.time = time(0); - gce.pszUID.w = wszUserId; - gce.pszNick.w = wszOldNick; - gce.pszText.w = gm->wszNick; - Chat_Event(&gce); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// roles - -void CDiscordProto::OnCommandRoleCreated(const JSONNode &pRoot) -{ - CDiscordGuild *pGuild = FindGuild(::getId(pRoot["guild_id"])); - if (pGuild != nullptr) - ProcessRole(pGuild, pRoot["role"]); -} - -void CDiscordProto::OnCommandRoleDeleted(const JSONNode &pRoot) -{ - CDiscordGuild *pGuild = FindGuild(::getId(pRoot["guild_id"])); - if (pGuild == nullptr) - return; - - SnowFlake id = ::getId(pRoot["role_id"]); - CDiscordRole *pRole = pGuild->arRoles.find((CDiscordRole*)&id); - if (pRole == nullptr) - return; - - int iOldPosition = pRole->position; - pGuild->arRoles.remove(pRole); - - for (auto &it : pGuild->arRoles) - if (it->position > iOldPosition) - it->position--; - - for (auto &it : arUsers) { - if (it->pGuild != pGuild) - continue; - - SESSION_INFO *si = g_chatApi.SM_FindSession(it->wszUsername, m_szModuleName); - if (si != nullptr) { - g_chatApi.TM_RemoveAll(&si->pStatuses); - BuildStatusList(pGuild, si); - } - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// reading a new message - -void CDiscordProto::OnCommandMessageCreate(const JSONNode &pRoot) -{ - OnCommandMessage(pRoot, true); -} - -void CDiscordProto::OnCommandMessageUpdate(const JSONNode &pRoot) -{ - OnCommandMessage(pRoot, false); -} - -void CDiscordProto::OnCommandMessage(const JSONNode &pRoot, bool bIsNew) -{ - CMStringW wszMessageId = pRoot["id"].as_mstring(); - CMStringW wszUserId = pRoot["author"]["id"].as_mstring(); - SnowFlake userId = _wtoi64(wszUserId); - SnowFlake msgId = _wtoi64(wszMessageId); - - // try to find a sender by his channel - SnowFlake channelId = ::getId(pRoot["channel_id"]); - CDiscordUser *pUser = FindUserByChannel(channelId); - if (pUser == nullptr) { - debugLogA("skipping message with unknown channel id=%lld", channelId); - return; - } - - char szMsgId[100]; - _i64toa_s(msgId, szMsgId, _countof(szMsgId), 10); - - COwnMessage ownMsg(::getId(pRoot["nonce"]), 0); - COwnMessage *p = arOwnMessages.find(&ownMsg); - if (p != nullptr) { // own message? skip it - ProtoBroadcastAck(pUser->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)p->reqId, (LPARAM)szMsgId); - debugLogA("skipping own message with nonce=%lld, id=%lld", ownMsg.nonce, msgId); - } - else { - CMStringW wszText = PrepareMessageText(pRoot); - if (wszText.IsEmpty()) - return; - - // old message? try to restore it from database - bool bOurMessage = userId == m_ownId; - if (!bIsNew) { - MEVENT hOldEvent = db_event_getById(m_szModuleName, szMsgId); - if (hOldEvent) { - DB::EventInfo dbei; - dbei.cbBlob = -1; - if (!db_event_get(hOldEvent, &dbei)) { - ptrW wszOldText(DbEvent_GetTextW(&dbei, CP_UTF8)); - if (wszOldText) - wszText.Insert(0, wszOldText); - if (dbei.flags & DBEF_SENT) - bOurMessage = true; - } - } - } - - const JSONNode &edited = pRoot["edited_timestamp"]; - if (!edited.isnull()) - wszText.AppendFormat(L" (%s %s)", TranslateT("edited at"), edited.as_mstring().c_str()); - - if (pUser->bIsPrivate && !pUser->bIsGroup) { - // if a message has myself as an author, add some flags - PROTORECVEVENT recv = {}; - if (bOurMessage) - recv.flags = PREF_CREATEREAD | PREF_SENT; - - debugLogA("store a message from private user %lld, channel id %lld", pUser->id, pUser->channelId); - ptrA buf(mir_utf8encodeW(wszText)); - - recv.timestamp = (uint32_t)StringToDate(pRoot["timestamp"].as_mstring()); - recv.szMessage = buf; - recv.szMsgId = szMsgId; - ProtoChainRecvMsg(pUser->hContact, &recv); - } - else { - debugLogA("store a message into the group channel id %lld", channelId); - - SESSION_INFO *si = g_chatApi.SM_FindSession(pUser->wszUsername, m_szModuleName); - if (si == nullptr) { - debugLogA("message to unknown channel %lld ignored", channelId); - return; - } - - ProcessChatUser(pUser, wszUserId, pRoot); - - ParseSpecialChars(si, wszText); - wszText.Replace(L"%", L"%%"); - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_MESSAGE }; - gce.pszID.w = pUser->wszUsername; - gce.dwFlags = GCEF_ADDTOLOG; - gce.pszUID.w = wszUserId; - gce.pszText.w = wszText; - gce.time = (uint32_t)StringToDate(pRoot["timestamp"].as_mstring()); - gce.bIsMe = bOurMessage; - Chat_Event(&gce); - - debugLogW(L"New channel %s message from %s: %s", si->ptszID, gce.pszUID.w, gce.pszText.w); - } - } - - pUser->lastMsgId = msgId; - - SnowFlake lastId = getId(pUser->hContact, DB_KEY_LASTMSGID); // as stored in a database - if (lastId < msgId) - setId(pUser->hContact, DB_KEY_LASTMSGID, msgId); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// someone changed its status - -void CDiscordProto::OnCommandMessageAck(const JSONNode &pRoot) -{ - CDiscordUser *pUser = FindUserByChannel(pRoot["channel_id"]); - if (pUser != nullptr) - pUser->lastMsgId = ::getId(pRoot["message_id"]); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// message deleted - -void CDiscordProto::OnCommandMessageDelete(const JSONNode &pRoot) -{ - if (!m_bSyncDeleteMsgs) - return; - - CMStringA msgid(pRoot["id"].as_mstring()); - if (!msgid.IsEmpty()) { - MEVENT hEvent = db_event_getById(m_szModuleName, msgid); - if (hEvent) - db_event_delete(hEvent); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// someone changed its status - -void CDiscordProto::OnCommandPresence(const JSONNode &pRoot) -{ - auto *pGuild = FindGuild(::getId(pRoot["user"]["guild_id"])); - if (pGuild == nullptr) - ProcessPresence(pRoot); - // else - // pGuild->ProcessPresence(pRoot); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// gateway session start - -void CDiscordProto::OnCommandReady(const JSONNode &pRoot) -{ - OnLoggedIn(); - - GatewaySendHeartbeat(); - m_impl.m_heartBeat.StartSafe(m_iHartbeatInterval); - - m_szGatewaySessionId = pRoot["session_id"].as_mstring(); - - if (m_bUseGroupchats) - for (auto &it : pRoot["guilds"]) - ProcessGuild(it); - - for (auto &it : pRoot["relationships"]) { - CDiscordUser *pUser = PrepareUser(it["user"]); - ProcessType(pUser, it); - } - - for (auto &it : pRoot["presences"]) - ProcessPresence(it); - - for (auto &it : pRoot["private_channels"]) - PreparePrivateChannel(it); - - for (auto &it : pRoot["read_state"]) { - CDiscordUser *pUser = FindUserByChannel(::getId(it["id"])); - if (pUser != nullptr) - pUser->lastReadId = ::getId(it["last_message_id"]); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// UTN support - -void CDiscordProto::OnCommandTyping(const JSONNode &pRoot) -{ - SnowFlake channelId = ::getId(pRoot["channel_id"]); - debugLogA("user typing notification: channelid=%lld", channelId); - - CDiscordUser *pChannel = FindUserByChannel(channelId); - if (pChannel == nullptr) { - debugLogA("channel with id=%lld is not found", channelId); - return; - } - - // both private groupchats & guild channels are chat rooms for Miranda - if (pChannel->pGuild) { - debugLogA("user is typing in a group channel"); - - CMStringW wszUerId = pRoot["user_id"].as_mstring(); - ProcessGuildUser(pChannel->pGuild, pRoot); // never returns null - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_TYPING }; - gce.pszID.w = pChannel->wszUsername; - gce.pszUID.w = wszUerId; - gce.dwItemData = 1; - gce.time = time(0); - Chat_Event(&gce); - } - else { - debugLogA("user is typing in his private channel"); - CallService(MS_PROTO_CONTACTISTYPING, pChannel->hContact, 20); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// User info update - -void CDiscordProto::OnCommandUserUpdate(const JSONNode &pRoot) -{ - SnowFlake id = ::getId(pRoot["id"]); - - MCONTACT hContact; - if (id != m_ownId) { - CDiscordUser *pUser = FindUser(id); - if (pUser == nullptr) - return; - - hContact = pUser->hContact; - } - else hContact = 0; - - // force rereading avatar - CheckAvatarChange(hContact, pRoot["avatar"].as_mstring()); -} - -void CDiscordProto::OnCommandUserSettingsUpdate(const JSONNode &pRoot) -{ - int iStatus = StrToStatus(pRoot["status"].as_mstring()); - if (iStatus != 0) { - int iOldStatus = m_iStatus; m_iStatus = iStatus; - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); - } -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +#pragma pack(4) + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CDiscordCommand +{ + const wchar_t *szCommandId; + GatewayHandlerFunc pFunc; +} +static handlers[] = // these structures must me sorted alphabetically +{ + { L"CALL_CREATE", &CDiscordProto::OnCommandCallCreated }, + { L"CALL_DELETE", &CDiscordProto::OnCommandCallDeleted }, + { L"CALL_UPDATE", &CDiscordProto::OnCommandCallUpdated }, + + { L"CHANNEL_CREATE", &CDiscordProto::OnCommandChannelCreated }, + { L"CHANNEL_DELETE", &CDiscordProto::OnCommandChannelDeleted }, + { L"CHANNEL_UPDATE", &CDiscordProto::OnCommandChannelUpdated }, + + { L"GUILD_CREATE", &CDiscordProto::OnCommandGuildCreated }, + { L"GUILD_DELETE", &CDiscordProto::OnCommandGuildDeleted }, + { L"GUILD_MEMBER_ADD", &CDiscordProto::OnCommandGuildMemberAdded }, + { L"GUILD_MEMBER_LIST_UPDATE", &CDiscordProto::OnCommandGuildMemberListUpdate }, + { L"GUILD_MEMBER_REMOVE", &CDiscordProto::OnCommandGuildMemberRemoved }, + { L"GUILD_MEMBER_UPDATE", &CDiscordProto::OnCommandGuildMemberUpdated }, + { L"GUILD_ROLE_CREATE", &CDiscordProto::OnCommandRoleCreated }, + { L"GUILD_ROLE_DELETE", &CDiscordProto::OnCommandRoleDeleted }, + { L"GUILD_ROLE_UPDATE", &CDiscordProto::OnCommandRoleCreated }, + + { L"MESSAGE_ACK", &CDiscordProto::OnCommandMessageAck }, + { L"MESSAGE_CREATE", &CDiscordProto::OnCommandMessageCreate }, + { L"MESSAGE_DELETE", &CDiscordProto::OnCommandMessageDelete }, + { L"MESSAGE_UPDATE", &CDiscordProto::OnCommandMessageUpdate }, + + { L"PRESENCE_UPDATE", &CDiscordProto::OnCommandPresence }, + + { L"READY", &CDiscordProto::OnCommandReady }, + + { L"RELATIONSHIP_ADD", &CDiscordProto::OnCommandFriendAdded }, + { L"RELATIONSHIP_REMOVE", &CDiscordProto::OnCommandFriendRemoved }, + + { L"TYPING_START", &CDiscordProto::OnCommandTyping }, + + { L"USER_SETTINGS_UPDATE", &CDiscordProto::OnCommandUserSettingsUpdate }, + { L"USER_UPDATE", &CDiscordProto::OnCommandUserUpdate }, +}; + +static int __cdecl pSearchFunc(const void *p1, const void *p2) +{ + return wcscmp(((CDiscordCommand*)p1)->szCommandId, ((CDiscordCommand*)p2)->szCommandId); +} + +GatewayHandlerFunc CDiscordProto::GetHandler(const wchar_t *pwszCommand) +{ + CDiscordCommand tmp = { pwszCommand, nullptr }; + CDiscordCommand *p = (CDiscordCommand*)bsearch(&tmp, handlers, _countof(handlers), sizeof(handlers[0]), pSearchFunc); + return (p != nullptr) ? p->pFunc : nullptr; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// channel operations + +void CDiscordProto::OnCommandChannelCreated(const JSONNode &pRoot) +{ + SnowFlake guildId = ::getId(pRoot["guild_id"]); + if (guildId == 0) + PreparePrivateChannel(pRoot); + else { + // group channel for a guild + CDiscordGuild *pGuild = FindGuild(guildId); + if (pGuild && m_bUseGroupchats) { + CDiscordUser *pUser = ProcessGuildChannel(pGuild, pRoot); + if (pUser) + CreateChat(pGuild, pUser); + } + } +} + +void CDiscordProto::OnCommandChannelDeleted(const JSONNode &pRoot) +{ + CDiscordUser *pUser = FindUserByChannel(::getId(pRoot["id"])); + if (pUser == nullptr) + return; + + SnowFlake guildId = ::getId(pRoot["guild_id"]); + if (guildId == 0) { + pUser->channelId = pUser->lastMsgId = 0; + delSetting(pUser->hContact, DB_KEY_CHANNELID); + } + else { + CDiscordGuild *pGuild = FindGuild(guildId); + if (pGuild != nullptr) + Chat_Terminate(m_szModuleName, pUser->wszUsername, true); + } +} + +void CDiscordProto::OnCommandChannelUpdated(const JSONNode &pRoot) +{ + CDiscordUser *pUser = FindUserByChannel(::getId(pRoot["id"])); + if (pUser == nullptr) + return; + + pUser->lastMsgId = ::getId(pRoot["last_message_id"]); + + SnowFlake guildId = ::getId(pRoot["guild_id"]); + if (guildId != 0) { + CDiscordGuild *pGuild = FindGuild(guildId); + if (pGuild == nullptr) + return; + + CMStringW wszName = pRoot["name"].as_mstring(); + if (!wszName.IsEmpty()) { + CMStringW wszNewName = pGuild->wszName + L"#" + wszName; + Chat_ChangeSessionName(m_szModuleName, pUser->wszUsername, wszNewName); + } + + CMStringW wszTopic = pRoot["topic"].as_mstring(); + Chat_SetStatusbarText(m_szModuleName, pUser->wszUsername, wszTopic); + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_TOPIC }; + gce.pszID.w = pUser->wszUsername; + gce.pszText.w = wszTopic; + gce.time = time(0); + Chat_Event(&gce); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// reading a new message + +void CDiscordProto::OnCommandFriendAdded(const JSONNode &pRoot) +{ + CDiscordUser *pUser = PrepareUser(pRoot["user"]); + pUser->bIsPrivate = true; + ProcessType(pUser, pRoot); +} + +void CDiscordProto::OnCommandFriendRemoved(const JSONNode &pRoot) +{ + SnowFlake id = ::getId(pRoot["id"]); + CDiscordUser *pUser = FindUser(id); + if (pUser != nullptr) { + if (pUser->hContact) + if (pUser->bIsPrivate) + db_delete_contact(pUser->hContact); + + arUsers.remove(pUser); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// guild synchronization + +void CDiscordProto::OnCommandGuildCreated(const JSONNode &pRoot) +{ + if (m_bUseGroupchats) + ProcessGuild(pRoot); +} + +void CDiscordProto::OnCommandGuildDeleted(const JSONNode &pRoot) +{ + CDiscordGuild *pGuild = FindGuild(::getId(pRoot["id"])); + if (pGuild == nullptr) + return; + + for (auto &it : arUsers.rev_iter()) + if (it->pGuild == pGuild) { + Chat_Terminate(m_szModuleName, it->wszUsername, true); + arUsers.removeItem(&it); + } + + Chat_Terminate(m_szModuleName, pRoot["name"].as_mstring(), true); + + arGuilds.remove(pGuild); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// guild members + +void CDiscordProto::OnCommandGuildMemberAdded(const JSONNode&) +{ +} + +void CDiscordProto::OnCommandGuildMemberListUpdate(const JSONNode &pRoot) +{ + auto *pGuild = FindGuild(::getId(pRoot["guild_id"])); + if (pGuild == nullptr) + return; + + int iStatus = 0; + + for (auto &ops: pRoot["ops"]) { + for (auto &it : ops["items"]) { + auto &item = it.at((size_t)0); + if (!mir_strcmp(item .name(), "group")) { + iStatus = item ["id"].as_string() == "online" ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE; + continue; + } + + if (!mir_strcmp(item .name(), "member")) { + bool bNew = false; + auto *pm = ProcessGuildUser(pGuild, item, &bNew); + pm->iStatus = iStatus; + + if (bNew) + AddGuildUser(pGuild, *pm); + else if (iStatus) { + CMStringW wszUserId(FORMAT, L"%lld", pm->userId); + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_SETCONTACTSTATUS }; + gce.time = time(0); + gce.pszUID.w = wszUserId; + + for (auto &cc : pGuild->arChannels) { + if (!cc->bIsGroup) + continue; + + gce.pszID.w = cc->wszChannelName; + gce.dwItemData = iStatus; + Chat_Event(&gce); + } + } + } + } + } + + pGuild->bSynced = true; +} + +void CDiscordProto::OnCommandGuildMemberRemoved(const JSONNode &pRoot) +{ + CDiscordGuild *pGuild = FindGuild(::getId(pRoot["guild_id"])); + if (pGuild == nullptr) + return; + + CMStringW wszUserId = pRoot["user"]["id"].as_mstring(); + + for (auto &pUser : arUsers) { + if (pUser->pGuild != pGuild) + continue; + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_PART }; + gce.pszUID.w = pUser->wszUsername; + gce.time = time(0); + gce.pszUID.w = wszUserId; + Chat_Event(&gce); + } +} + +void CDiscordProto::OnCommandGuildMemberUpdated(const JSONNode &pRoot) +{ + CDiscordGuild *pGuild = FindGuild(::getId(pRoot["guild_id"])); + if (pGuild == nullptr) + return; + + CMStringW wszUserId = pRoot["user"]["id"].as_mstring(); + CDiscordGuildMember *gm = pGuild->FindUser(_wtoi64(wszUserId)); + if (gm == nullptr) + return; + + gm->wszDiscordId = pRoot["user"]["username"].as_mstring() + L"#" + pRoot["user"]["discriminator"].as_mstring(); + gm->wszNick = pRoot["nick"].as_mstring(); + if (gm->wszNick.IsEmpty()) + gm->wszNick = pRoot["user"]["username"].as_mstring(); + + for (auto &it : arUsers) { + if (it->pGuild != pGuild) + continue; + + CMStringW wszOldNick; + SESSION_INFO *si = g_chatApi.SM_FindSession(it->wszUsername, m_szModuleName); + if (si != nullptr) { + USERINFO *ui = g_chatApi.UM_FindUser(si, wszUserId); + if (ui != nullptr) + wszOldNick = ui->pszNick; + } + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_NICK }; + gce.pszID.w = it->wszUsername; + gce.time = time(0); + gce.pszUID.w = wszUserId; + gce.pszNick.w = wszOldNick; + gce.pszText.w = gm->wszNick; + Chat_Event(&gce); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// roles + +void CDiscordProto::OnCommandRoleCreated(const JSONNode &pRoot) +{ + CDiscordGuild *pGuild = FindGuild(::getId(pRoot["guild_id"])); + if (pGuild != nullptr) + ProcessRole(pGuild, pRoot["role"]); +} + +void CDiscordProto::OnCommandRoleDeleted(const JSONNode &pRoot) +{ + CDiscordGuild *pGuild = FindGuild(::getId(pRoot["guild_id"])); + if (pGuild == nullptr) + return; + + SnowFlake id = ::getId(pRoot["role_id"]); + CDiscordRole *pRole = pGuild->arRoles.find((CDiscordRole*)&id); + if (pRole == nullptr) + return; + + int iOldPosition = pRole->position; + pGuild->arRoles.remove(pRole); + + for (auto &it : pGuild->arRoles) + if (it->position > iOldPosition) + it->position--; + + for (auto &it : arUsers) { + if (it->pGuild != pGuild) + continue; + + SESSION_INFO *si = g_chatApi.SM_FindSession(it->wszUsername, m_szModuleName); + if (si != nullptr) { + g_chatApi.TM_RemoveAll(&si->pStatuses); + BuildStatusList(pGuild, si); + } + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// reading a new message + +void CDiscordProto::OnCommandMessageCreate(const JSONNode &pRoot) +{ + OnCommandMessage(pRoot, true); +} + +void CDiscordProto::OnCommandMessageUpdate(const JSONNode &pRoot) +{ + OnCommandMessage(pRoot, false); +} + +void CDiscordProto::OnCommandMessage(const JSONNode &pRoot, bool bIsNew) +{ + CMStringW wszMessageId = pRoot["id"].as_mstring(); + CMStringW wszUserId = pRoot["author"]["id"].as_mstring(); + SnowFlake userId = _wtoi64(wszUserId); + SnowFlake msgId = _wtoi64(wszMessageId); + + // try to find a sender by his channel + SnowFlake channelId = ::getId(pRoot["channel_id"]); + CDiscordUser *pUser = FindUserByChannel(channelId); + if (pUser == nullptr) { + debugLogA("skipping message with unknown channel id=%lld", channelId); + return; + } + + char szMsgId[100]; + _i64toa_s(msgId, szMsgId, _countof(szMsgId), 10); + + COwnMessage ownMsg(::getId(pRoot["nonce"]), 0); + COwnMessage *p = arOwnMessages.find(&ownMsg); + if (p != nullptr) { // own message? skip it + ProtoBroadcastAck(pUser->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)p->reqId, (LPARAM)szMsgId); + debugLogA("skipping own message with nonce=%lld, id=%lld", ownMsg.nonce, msgId); + } + else { + CMStringW wszText = PrepareMessageText(pRoot); + if (wszText.IsEmpty()) + return; + + // old message? try to restore it from database + bool bOurMessage = userId == m_ownId; + if (!bIsNew) { + MEVENT hOldEvent = db_event_getById(m_szModuleName, szMsgId); + if (hOldEvent) { + DB::EventInfo dbei; + dbei.cbBlob = -1; + if (!db_event_get(hOldEvent, &dbei)) { + ptrW wszOldText(DbEvent_GetTextW(&dbei, CP_UTF8)); + if (wszOldText) + wszText.Insert(0, wszOldText); + if (dbei.flags & DBEF_SENT) + bOurMessage = true; + } + } + } + + const JSONNode &edited = pRoot["edited_timestamp"]; + if (!edited.isnull()) + wszText.AppendFormat(L" (%s %s)", TranslateT("edited at"), edited.as_mstring().c_str()); + + if (pUser->bIsPrivate && !pUser->bIsGroup) { + // if a message has myself as an author, add some flags + PROTORECVEVENT recv = {}; + if (bOurMessage) + recv.flags = PREF_CREATEREAD | PREF_SENT; + + debugLogA("store a message from private user %lld, channel id %lld", pUser->id, pUser->channelId); + ptrA buf(mir_utf8encodeW(wszText)); + + recv.timestamp = (uint32_t)StringToDate(pRoot["timestamp"].as_mstring()); + recv.szMessage = buf; + recv.szMsgId = szMsgId; + ProtoChainRecvMsg(pUser->hContact, &recv); + } + else { + debugLogA("store a message into the group channel id %lld", channelId); + + SESSION_INFO *si = g_chatApi.SM_FindSession(pUser->wszUsername, m_szModuleName); + if (si == nullptr) { + debugLogA("message to unknown channel %lld ignored", channelId); + return; + } + + ProcessChatUser(pUser, wszUserId, pRoot); + + ParseSpecialChars(si, wszText); + wszText.Replace(L"%", L"%%"); + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_MESSAGE }; + gce.pszID.w = pUser->wszUsername; + gce.dwFlags = GCEF_ADDTOLOG; + gce.pszUID.w = wszUserId; + gce.pszText.w = wszText; + gce.time = (uint32_t)StringToDate(pRoot["timestamp"].as_mstring()); + gce.bIsMe = bOurMessage; + Chat_Event(&gce); + + debugLogW(L"New channel %s message from %s: %s", si->ptszID, gce.pszUID.w, gce.pszText.w); + } + } + + pUser->lastMsgId = msgId; + + SnowFlake lastId = getId(pUser->hContact, DB_KEY_LASTMSGID); // as stored in a database + if (lastId < msgId) + setId(pUser->hContact, DB_KEY_LASTMSGID, msgId); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// someone changed its status + +void CDiscordProto::OnCommandMessageAck(const JSONNode &pRoot) +{ + CDiscordUser *pUser = FindUserByChannel(pRoot["channel_id"]); + if (pUser != nullptr) + pUser->lastMsgId = ::getId(pRoot["message_id"]); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// message deleted + +void CDiscordProto::OnCommandMessageDelete(const JSONNode &pRoot) +{ + if (!m_bSyncDeleteMsgs) + return; + + CMStringA msgid(pRoot["id"].as_mstring()); + if (!msgid.IsEmpty()) { + MEVENT hEvent = db_event_getById(m_szModuleName, msgid); + if (hEvent) + db_event_delete(hEvent); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// someone changed its status + +void CDiscordProto::OnCommandPresence(const JSONNode &pRoot) +{ + auto *pGuild = FindGuild(::getId(pRoot["user"]["guild_id"])); + if (pGuild == nullptr) + ProcessPresence(pRoot); + // else + // pGuild->ProcessPresence(pRoot); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// gateway session start + +void CDiscordProto::OnCommandReady(const JSONNode &pRoot) +{ + OnLoggedIn(); + + GatewaySendHeartbeat(); + m_impl.m_heartBeat.StartSafe(m_iHartbeatInterval); + + m_szGatewaySessionId = pRoot["session_id"].as_mstring(); + + if (m_bUseGroupchats) + for (auto &it : pRoot["guilds"]) + ProcessGuild(it); + + for (auto &it : pRoot["relationships"]) { + CDiscordUser *pUser = PrepareUser(it["user"]); + ProcessType(pUser, it); + } + + for (auto &it : pRoot["presences"]) + ProcessPresence(it); + + for (auto &it : pRoot["private_channels"]) + PreparePrivateChannel(it); + + for (auto &it : pRoot["read_state"]) { + CDiscordUser *pUser = FindUserByChannel(::getId(it["id"])); + if (pUser != nullptr) + pUser->lastReadId = ::getId(it["last_message_id"]); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// UTN support + +void CDiscordProto::OnCommandTyping(const JSONNode &pRoot) +{ + SnowFlake channelId = ::getId(pRoot["channel_id"]); + debugLogA("user typing notification: channelid=%lld", channelId); + + CDiscordUser *pChannel = FindUserByChannel(channelId); + if (pChannel == nullptr) { + debugLogA("channel with id=%lld is not found", channelId); + return; + } + + // both private groupchats & guild channels are chat rooms for Miranda + if (pChannel->pGuild) { + debugLogA("user is typing in a group channel"); + + CMStringW wszUerId = pRoot["user_id"].as_mstring(); + ProcessGuildUser(pChannel->pGuild, pRoot); // never returns null + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_TYPING }; + gce.pszID.w = pChannel->wszUsername; + gce.pszUID.w = wszUerId; + gce.dwItemData = 1; + gce.time = time(0); + Chat_Event(&gce); + } + else { + debugLogA("user is typing in his private channel"); + CallService(MS_PROTO_CONTACTISTYPING, pChannel->hContact, 20); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// User info update + +void CDiscordProto::OnCommandUserUpdate(const JSONNode &pRoot) +{ + SnowFlake id = ::getId(pRoot["id"]); + + MCONTACT hContact; + if (id != m_ownId) { + CDiscordUser *pUser = FindUser(id); + if (pUser == nullptr) + return; + + hContact = pUser->hContact; + } + else hContact = 0; + + // force rereading avatar + CheckAvatarChange(hContact, pRoot["avatar"].as_mstring()); +} + +void CDiscordProto::OnCommandUserSettingsUpdate(const JSONNode &pRoot) +{ + int iStatus = StrToStatus(pRoot["status"].as_mstring()); + if (iStatus != 0) { + int iOldStatus = m_iStatus; m_iStatus = iStatus; + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); + } +} diff --git a/protocols/Discord/src/gateway.cpp b/protocols/Discord/src/gateway.cpp index 82c3b70eb5..0530945c3e 100644 --- a/protocols/Discord/src/gateway.cpp +++ b/protocols/Discord/src/gateway.cpp @@ -1,346 +1,346 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -////////////////////////////////////////////////////////////////////////////////////// -// sends a piece of JSON to a server via a websocket, masked - -bool CDiscordProto::GatewaySend(const JSONNode &pRoot) -{ - if (m_hGatewayConnection == nullptr) - return false; - - json_string szText = pRoot.write(); - debugLogA("Gateway send: %s", szText.c_str()); - WebSocket_SendText(m_hGatewayConnection, szText.c_str()); - return true; -} - -////////////////////////////////////////////////////////////////////////////////////// -// gateway worker thread - -void CDiscordProto::GatewayThread(void*) -{ - while (GatewayThreadWorker()) - ; - ShutdownSession(); -} - -bool CDiscordProto::GatewayThreadWorker() -{ - NETLIBHTTPHEADER hdrs[] = - { - { "Origin", "https://discord.com" }, - { 0, 0 }, - { 0, 0 }, - }; - - if (!m_szWSCookie.IsEmpty()) { - hdrs[1].szName = "Cookie"; - hdrs[1].szValue = m_szWSCookie.GetBuffer(); - } - - NLHR_PTR pReply(WebSocket_Connect(m_hGatewayNetlibUser, m_szGateway + "/?encoding=json&v=8", hdrs)); - if (pReply == nullptr) { - debugLogA("Gateway connection failed, exiting"); - return false; - } - - if (auto *pszNewCookie = Netlib_GetHeader(pReply, "Set-Cookie")) { - char *p = strchr(pszNewCookie, ';'); - if (p) *p = 0; - - m_szWSCookie = pszNewCookie; - } - - if (pReply->resultCode != 101) { - // if there's no cookie & Miranda is bounced with error 404, simply apply the cookie and try again - if (pReply->resultCode == 404) { - if (hdrs[1].szName == nullptr) - return true; - - m_szWSCookie.Empty(); // don't use the same cookie twice - } - return false; - } - - // succeeded! - debugLogA("Gateway connection succeeded"); - m_hGatewayConnection = pReply->nlc; - - bool bExit = false; - int offset = 0; - MBinBuffer netbuf; - - while (!bExit) { - if (m_bTerminated) - break; - - unsigned char buf[2048]; - int bufSize = Netlib_Recv(m_hGatewayConnection, (char*)buf + offset, _countof(buf) - offset, MSG_NODUMP); - if (bufSize == 0) { - debugLogA("Gateway connection gracefully closed"); - bExit = !m_bTerminated; - break; - } - if (bufSize < 0) { - debugLogA("Gateway connection error, exiting"); - break; - } - - WSHeader hdr; - if (!WebSocket_InitHeader(hdr, buf, bufSize)) { - offset += bufSize; - continue; - } - offset = 0; - - debugLogA("Got packet: buffer = %d, opcode = %d, headerSize = %d, final = %d, masked = %d", bufSize, hdr.opCode, hdr.headerSize, hdr.bIsFinal, hdr.bIsMasked); - - // we have some additional data, not only opcode - if ((size_t)bufSize > hdr.headerSize) { - size_t currPacketSize = bufSize - hdr.headerSize; - netbuf.append(buf, bufSize); - while (currPacketSize < hdr.payloadSize) { - int result = Netlib_Recv(m_hGatewayConnection, (char*)buf, _countof(buf), MSG_NODUMP); - if (result == 0) { - debugLogA("Gateway connection gracefully closed"); - bExit = !m_bTerminated; - break; - } - if (result < 0) { - debugLogA("Gateway connection error, exiting"); - break; - } - currPacketSize += result; - netbuf.append(buf, result); - } - } - - // read all payloads from the current buffer, one by one - size_t prevSize = 0; - while (true) { - switch (hdr.opCode) { - case 0: // text packet - case 1: // binary packet - case 2: // continuation - if (hdr.bIsFinal) { - // process a packet here - CMStringA szJson((char*)netbuf.data() + hdr.headerSize, (int)hdr.payloadSize); - debugLogA("JSON received:\n%s", szJson.c_str()); - JSONNode root = JSONNode::parse(szJson); - if (root) - bExit = GatewayProcess(root); - } - break; - - case 8: // close - debugLogA("server required to exit"); - bExit = true; // simply reconnect, don't exit - break; - - case 9: // ping - debugLogA("ping received"); - Netlib_Send(m_hGatewayConnection, (char*)buf + hdr.headerSize, bufSize - int(hdr.headerSize), 0); - break; - } - - if (hdr.bIsFinal) - netbuf.remove(hdr.headerSize + hdr.payloadSize); - - if (netbuf.length() == 0) - break; - - // if we have not enough data for header, continue reading - if (!WebSocket_InitHeader(hdr, netbuf.data(), netbuf.length())) - break; - - // if we have not enough data for data, continue reading - if (hdr.headerSize + hdr.payloadSize > netbuf.length()) - break; - - debugLogA("Got inner packet: buffer = %d, opcode = %d, headerSize = %d, payloadSize = %d, final = %d, masked = %d", netbuf.length(), hdr.opCode, hdr.headerSize, hdr.payloadSize, hdr.bIsFinal, hdr.bIsMasked); - if (prevSize == netbuf.length()) { - netbuf.remove(prevSize); - debugLogA("dropping current packet, exiting"); - break; - } - - prevSize = netbuf.length(); - } - } - - Netlib_CloseHandle(m_hGatewayConnection); - m_hGatewayConnection = nullptr; - return bExit; -} - -////////////////////////////////////////////////////////////////////////////////////// -// handles server commands - -bool CDiscordProto::GatewayProcess(const JSONNode &pRoot) -{ - int opCode = pRoot["op"].as_int(); - switch (opCode) { - case OPCODE_DISPATCH: // process incoming command - { - int iSeq = pRoot["s"].as_int(); - if (iSeq != 0) - m_iGatewaySeq = iSeq; - - CMStringW wszCommand = pRoot["t"].as_mstring(); - debugLogA("got a server command to dispatch: %S", wszCommand.c_str()); - - GatewayHandlerFunc pFunc = GetHandler(wszCommand); - if (pFunc) - (this->*pFunc)(pRoot["d"]); - } - break; - - case OPCODE_RECONNECT: // we need to reconnect asap - debugLogA("we need to reconnect, leaving worker thread"); - return true; - - case OPCODE_INVALID_SESSION: // session invalidated - if (pRoot["d"].as_bool()) // session can be resumed - GatewaySendResume(); - else { - Sleep(5000); // 5 seconds - recommended timeout - GatewaySendIdentify(); - } - break; - - case OPCODE_HELLO: // hello - m_iHartbeatInterval = pRoot["d"]["heartbeat_interval"].as_int(); - - GatewaySendIdentify(); - break; - - case OPCODE_HEARTBEAT_ACK: // heartbeat ack - break; - - default: - debugLogA("ACHTUNG! Unknown opcode: %d, report it to developer", opCode); - } - - return false; -} - -////////////////////////////////////////////////////////////////////////////////////// -// requests to be sent to a gateway - -void CDiscordProto::GatewaySendGuildInfo(CDiscordGuild *pGuild) -{ - if (!pGuild->arChannels.getCount()) - return; - - JSONNode a1(JSON_ARRAY); a1 << INT_PARAM("", 0) << INT_PARAM("", 99); - - CMStringA szId(FORMAT, "%lld", pGuild->arChannels[0]->id); - JSONNode chl(JSON_ARRAY); chl.set_name(szId.c_str()); chl << a1; - - JSONNode channels; channels.set_name("channels"); channels << chl; - - JSONNode payload; payload.set_name("d"); - payload << SINT64_PARAM("guild_id", pGuild->id) << BOOL_PARAM("typing", true) << BOOL_PARAM("activities", true) << BOOL_PARAM("presences", true) << channels; - - JSONNode root; - root << INT_PARAM("op", OPCODE_REQUEST_SYNC_CHANNEL) << payload; - GatewaySend(root); -} - -void CDiscordProto::GatewaySendHeartbeat() -{ - // we don't send heartbeat packets until we get logged in - if (!m_iHartbeatInterval || !m_iGatewaySeq) - return; - - JSONNode root; - root << INT_PARAM("op", OPCODE_HEARTBEAT) << INT_PARAM("d", m_iGatewaySeq); - GatewaySend(root); -} - -void CDiscordProto::GatewaySendIdentify() -{ - if (m_szAccessToken == nullptr) { - ConnectionFailed(LOGINERR_WRONGPASSWORD); - return; - } - - char szOs[256]; - OS_GetDisplayString(szOs, _countof(szOs)); - - char szVersion[256]; - Miranda_GetVersionText(szVersion, _countof(szVersion)); - - JSONNode props; props.set_name("properties"); - props << CHAR_PARAM("os", szOs) << CHAR_PARAM("browser", "Chrome") << CHAR_PARAM("device", szVersion) - << CHAR_PARAM("referrer", "https://miranda-ng.org") << CHAR_PARAM("referring_domain", "miranda-ng.org"); - - JSONNode payload; payload.set_name("d"); - payload << CHAR_PARAM("token", m_szAccessToken) << props << BOOL_PARAM("compress", false) << INT_PARAM("large_threshold", 250); - - JSONNode root; - root << INT_PARAM("op", OPCODE_IDENTIFY) << payload; - GatewaySend(root); -} - -void CDiscordProto::GatewaySendResume() -{ - char szRandom[40]; - uint8_t random[16]; - Utils_GetRandom(random, _countof(random)); - bin2hex(random, _countof(random), szRandom); - - JSONNode root; - root << CHAR_PARAM("token", szRandom) << CHAR_PARAM("session_id", m_szGatewaySessionId) << INT_PARAM("seq", m_iGatewaySeq); - GatewaySend(root); -} - -bool CDiscordProto::GatewaySendStatus(int iStatus, const wchar_t *pwszStatusText) -{ - if (iStatus == ID_STATUS_OFFLINE) { - Push(new AsyncHttpRequest(this, REQUEST_POST, "/auth/logout", nullptr)); - return true; - } - - const char *pszStatus; - switch (iStatus) { - case ID_STATUS_AWAY: - case ID_STATUS_NA: - pszStatus = "idle"; break; - case ID_STATUS_DND: - pszStatus = "dnd"; break; - case ID_STATUS_INVISIBLE: - pszStatus = "invisible"; break; - default: - pszStatus = "online"; break; - } - - JSONNode payload; payload.set_name("d"); - payload << INT64_PARAM("since", __int64(time(0)) * 1000) << BOOL_PARAM("afk", true) << CHAR_PARAM("status", pszStatus); - if (pwszStatusText == nullptr) - payload << CHAR_PARAM("game", nullptr); - else { - JSONNode game; game.set_name("game"); game << WCHAR_PARAM("name", pwszStatusText) << INT_PARAM("type", 0); - payload << game; - } - - JSONNode root; root << INT_PARAM("op", OPCODE_STATUS_UPDATE) << payload; - return GatewaySend(root); -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +////////////////////////////////////////////////////////////////////////////////////// +// sends a piece of JSON to a server via a websocket, masked + +bool CDiscordProto::GatewaySend(const JSONNode &pRoot) +{ + if (m_hGatewayConnection == nullptr) + return false; + + json_string szText = pRoot.write(); + debugLogA("Gateway send: %s", szText.c_str()); + WebSocket_SendText(m_hGatewayConnection, szText.c_str()); + return true; +} + +////////////////////////////////////////////////////////////////////////////////////// +// gateway worker thread + +void CDiscordProto::GatewayThread(void*) +{ + while (GatewayThreadWorker()) + ; + ShutdownSession(); +} + +bool CDiscordProto::GatewayThreadWorker() +{ + NETLIBHTTPHEADER hdrs[] = + { + { "Origin", "https://discord.com" }, + { 0, 0 }, + { 0, 0 }, + }; + + if (!m_szWSCookie.IsEmpty()) { + hdrs[1].szName = "Cookie"; + hdrs[1].szValue = m_szWSCookie.GetBuffer(); + } + + NLHR_PTR pReply(WebSocket_Connect(m_hGatewayNetlibUser, m_szGateway + "/?encoding=json&v=8", hdrs)); + if (pReply == nullptr) { + debugLogA("Gateway connection failed, exiting"); + return false; + } + + if (auto *pszNewCookie = Netlib_GetHeader(pReply, "Set-Cookie")) { + char *p = strchr(pszNewCookie, ';'); + if (p) *p = 0; + + m_szWSCookie = pszNewCookie; + } + + if (pReply->resultCode != 101) { + // if there's no cookie & Miranda is bounced with error 404, simply apply the cookie and try again + if (pReply->resultCode == 404) { + if (hdrs[1].szName == nullptr) + return true; + + m_szWSCookie.Empty(); // don't use the same cookie twice + } + return false; + } + + // succeeded! + debugLogA("Gateway connection succeeded"); + m_hGatewayConnection = pReply->nlc; + + bool bExit = false; + int offset = 0; + MBinBuffer netbuf; + + while (!bExit) { + if (m_bTerminated) + break; + + unsigned char buf[2048]; + int bufSize = Netlib_Recv(m_hGatewayConnection, (char*)buf + offset, _countof(buf) - offset, MSG_NODUMP); + if (bufSize == 0) { + debugLogA("Gateway connection gracefully closed"); + bExit = !m_bTerminated; + break; + } + if (bufSize < 0) { + debugLogA("Gateway connection error, exiting"); + break; + } + + WSHeader hdr; + if (!WebSocket_InitHeader(hdr, buf, bufSize)) { + offset += bufSize; + continue; + } + offset = 0; + + debugLogA("Got packet: buffer = %d, opcode = %d, headerSize = %d, final = %d, masked = %d", bufSize, hdr.opCode, hdr.headerSize, hdr.bIsFinal, hdr.bIsMasked); + + // we have some additional data, not only opcode + if ((size_t)bufSize > hdr.headerSize) { + size_t currPacketSize = bufSize - hdr.headerSize; + netbuf.append(buf, bufSize); + while (currPacketSize < hdr.payloadSize) { + int result = Netlib_Recv(m_hGatewayConnection, (char*)buf, _countof(buf), MSG_NODUMP); + if (result == 0) { + debugLogA("Gateway connection gracefully closed"); + bExit = !m_bTerminated; + break; + } + if (result < 0) { + debugLogA("Gateway connection error, exiting"); + break; + } + currPacketSize += result; + netbuf.append(buf, result); + } + } + + // read all payloads from the current buffer, one by one + size_t prevSize = 0; + while (true) { + switch (hdr.opCode) { + case 0: // text packet + case 1: // binary packet + case 2: // continuation + if (hdr.bIsFinal) { + // process a packet here + CMStringA szJson((char*)netbuf.data() + hdr.headerSize, (int)hdr.payloadSize); + debugLogA("JSON received:\n%s", szJson.c_str()); + JSONNode root = JSONNode::parse(szJson); + if (root) + bExit = GatewayProcess(root); + } + break; + + case 8: // close + debugLogA("server required to exit"); + bExit = true; // simply reconnect, don't exit + break; + + case 9: // ping + debugLogA("ping received"); + Netlib_Send(m_hGatewayConnection, (char*)buf + hdr.headerSize, bufSize - int(hdr.headerSize), 0); + break; + } + + if (hdr.bIsFinal) + netbuf.remove(hdr.headerSize + hdr.payloadSize); + + if (netbuf.length() == 0) + break; + + // if we have not enough data for header, continue reading + if (!WebSocket_InitHeader(hdr, netbuf.data(), netbuf.length())) + break; + + // if we have not enough data for data, continue reading + if (hdr.headerSize + hdr.payloadSize > netbuf.length()) + break; + + debugLogA("Got inner packet: buffer = %d, opcode = %d, headerSize = %d, payloadSize = %d, final = %d, masked = %d", netbuf.length(), hdr.opCode, hdr.headerSize, hdr.payloadSize, hdr.bIsFinal, hdr.bIsMasked); + if (prevSize == netbuf.length()) { + netbuf.remove(prevSize); + debugLogA("dropping current packet, exiting"); + break; + } + + prevSize = netbuf.length(); + } + } + + Netlib_CloseHandle(m_hGatewayConnection); + m_hGatewayConnection = nullptr; + return bExit; +} + +////////////////////////////////////////////////////////////////////////////////////// +// handles server commands + +bool CDiscordProto::GatewayProcess(const JSONNode &pRoot) +{ + int opCode = pRoot["op"].as_int(); + switch (opCode) { + case OPCODE_DISPATCH: // process incoming command + { + int iSeq = pRoot["s"].as_int(); + if (iSeq != 0) + m_iGatewaySeq = iSeq; + + CMStringW wszCommand = pRoot["t"].as_mstring(); + debugLogA("got a server command to dispatch: %S", wszCommand.c_str()); + + GatewayHandlerFunc pFunc = GetHandler(wszCommand); + if (pFunc) + (this->*pFunc)(pRoot["d"]); + } + break; + + case OPCODE_RECONNECT: // we need to reconnect asap + debugLogA("we need to reconnect, leaving worker thread"); + return true; + + case OPCODE_INVALID_SESSION: // session invalidated + if (pRoot["d"].as_bool()) // session can be resumed + GatewaySendResume(); + else { + Sleep(5000); // 5 seconds - recommended timeout + GatewaySendIdentify(); + } + break; + + case OPCODE_HELLO: // hello + m_iHartbeatInterval = pRoot["d"]["heartbeat_interval"].as_int(); + + GatewaySendIdentify(); + break; + + case OPCODE_HEARTBEAT_ACK: // heartbeat ack + break; + + default: + debugLogA("ACHTUNG! Unknown opcode: %d, report it to developer", opCode); + } + + return false; +} + +////////////////////////////////////////////////////////////////////////////////////// +// requests to be sent to a gateway + +void CDiscordProto::GatewaySendGuildInfo(CDiscordGuild *pGuild) +{ + if (!pGuild->arChannels.getCount()) + return; + + JSONNode a1(JSON_ARRAY); a1 << INT_PARAM("", 0) << INT_PARAM("", 99); + + CMStringA szId(FORMAT, "%lld", pGuild->arChannels[0]->id); + JSONNode chl(JSON_ARRAY); chl.set_name(szId.c_str()); chl << a1; + + JSONNode channels; channels.set_name("channels"); channels << chl; + + JSONNode payload; payload.set_name("d"); + payload << SINT64_PARAM("guild_id", pGuild->id) << BOOL_PARAM("typing", true) << BOOL_PARAM("activities", true) << BOOL_PARAM("presences", true) << channels; + + JSONNode root; + root << INT_PARAM("op", OPCODE_REQUEST_SYNC_CHANNEL) << payload; + GatewaySend(root); +} + +void CDiscordProto::GatewaySendHeartbeat() +{ + // we don't send heartbeat packets until we get logged in + if (!m_iHartbeatInterval || !m_iGatewaySeq) + return; + + JSONNode root; + root << INT_PARAM("op", OPCODE_HEARTBEAT) << INT_PARAM("d", m_iGatewaySeq); + GatewaySend(root); +} + +void CDiscordProto::GatewaySendIdentify() +{ + if (m_szAccessToken == nullptr) { + ConnectionFailed(LOGINERR_WRONGPASSWORD); + return; + } + + char szOs[256]; + OS_GetDisplayString(szOs, _countof(szOs)); + + char szVersion[256]; + Miranda_GetVersionText(szVersion, _countof(szVersion)); + + JSONNode props; props.set_name("properties"); + props << CHAR_PARAM("os", szOs) << CHAR_PARAM("browser", "Chrome") << CHAR_PARAM("device", szVersion) + << CHAR_PARAM("referrer", "https://miranda-ng.org") << CHAR_PARAM("referring_domain", "miranda-ng.org"); + + JSONNode payload; payload.set_name("d"); + payload << CHAR_PARAM("token", m_szAccessToken) << props << BOOL_PARAM("compress", false) << INT_PARAM("large_threshold", 250); + + JSONNode root; + root << INT_PARAM("op", OPCODE_IDENTIFY) << payload; + GatewaySend(root); +} + +void CDiscordProto::GatewaySendResume() +{ + char szRandom[40]; + uint8_t random[16]; + Utils_GetRandom(random, _countof(random)); + bin2hex(random, _countof(random), szRandom); + + JSONNode root; + root << CHAR_PARAM("token", szRandom) << CHAR_PARAM("session_id", m_szGatewaySessionId) << INT_PARAM("seq", m_iGatewaySeq); + GatewaySend(root); +} + +bool CDiscordProto::GatewaySendStatus(int iStatus, const wchar_t *pwszStatusText) +{ + if (iStatus == ID_STATUS_OFFLINE) { + Push(new AsyncHttpRequest(this, REQUEST_POST, "/auth/logout", nullptr)); + return true; + } + + const char *pszStatus; + switch (iStatus) { + case ID_STATUS_AWAY: + case ID_STATUS_NA: + pszStatus = "idle"; break; + case ID_STATUS_DND: + pszStatus = "dnd"; break; + case ID_STATUS_INVISIBLE: + pszStatus = "invisible"; break; + default: + pszStatus = "online"; break; + } + + JSONNode payload; payload.set_name("d"); + payload << INT64_PARAM("since", __int64(time(0)) * 1000) << BOOL_PARAM("afk", true) << CHAR_PARAM("status", pszStatus); + if (pwszStatusText == nullptr) + payload << CHAR_PARAM("game", nullptr); + else { + JSONNode game; game.set_name("game"); game << WCHAR_PARAM("name", pwszStatusText) << INT_PARAM("type", 0); + payload << game; + } + + JSONNode root; root << INT_PARAM("op", OPCODE_STATUS_UPDATE) << payload; + return GatewaySend(root); +} diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp index f34e35c93a..146f8de1fe 100644 --- a/protocols/Discord/src/groupchat.cpp +++ b/protocols/Discord/src/groupchat.cpp @@ -1,235 +1,235 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -enum { - IDM_CANCEL, - IDM_COPY_ID, - - IDM_CHANGENICK, IDM_CHANGETOPIC, IDM_RENAME, IDM_DESTROY -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -void BuildStatusList(const CDiscordGuild *pGuild, SESSION_INFO *si) -{ - Chat_AddGroup(si, L"@owner"); - - for (auto &it : pGuild->arRoles) - Chat_AddGroup(si, it->wszName); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static gc_item sttLogListItems[] = -{ - { LPGENW("Change &nickname"), IDM_CHANGENICK, MENU_ITEM }, - { LPGENW("Channel control"), FALSE, MENU_NEWPOPUP }, - { LPGENW("Change &topic"), IDM_CHANGETOPIC, MENU_POPUPITEM }, - { LPGENW("&Rename channel"), IDM_RENAME, MENU_POPUPITEM }, - { nullptr, 0, MENU_POPUPSEPARATOR }, - { LPGENW("&Destroy channel"), IDM_DESTROY, MENU_POPUPITEM }, -}; - -static gc_item sttNicklistItems[] = -{ - { LPGENW("Copy ID"), IDM_COPY_ID, MENU_ITEM }, -}; - -int CDiscordProto::GroupchatMenuHook(WPARAM, LPARAM lParam) -{ - GCMENUITEMS* gcmi = (GCMENUITEMS*)lParam; - if (gcmi == nullptr) - return 0; - - if (mir_strcmpi(gcmi->pszModule, m_szModuleName)) - return 0; - - CDiscordUser *pChat = FindUserByChannel(_wtoi64(gcmi->pszID)); - if (pChat == nullptr) - return 0; - - if (gcmi->Type == MENU_ON_LOG) - Chat_AddMenuItems(gcmi->hMenu, _countof(sttLogListItems), sttLogListItems, &g_plugin); - else if (gcmi->Type == MENU_ON_NICKLIST) - Chat_AddMenuItems(gcmi->hMenu, _countof(sttNicklistItems), sttNicklistItems, &g_plugin); - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::Chat_SendPrivateMessage(GCHOOK *gch) -{ - SnowFlake userId = _wtoi64(gch->ptszUID); - - MCONTACT hContact; - CDiscordUser *pUser = FindUser(userId); - if (pUser == nullptr) { - PROTOSEARCHRESULT psr = { sizeof(psr) }; - psr.id.w = (wchar_t*)gch->ptszUID; - psr.nick.w = (wchar_t*)gch->ptszNick; - if ((hContact = AddToList(PALF_TEMPORARY, &psr)) == 0) - return; - - setId(hContact, DB_KEY_ID, userId); - setId(hContact, DB_KEY_CHANNELID, _wtoi64(gch->si->ptszID)); - setWString(hContact, DB_KEY_NICK, gch->ptszNick); - Contact::Hide(hContact); - db_set_dw(hContact, "Ignore", "Mask1", 0); - } - else hContact = pUser->hContact; - - CallService(MS_MSG_SENDMESSAGE, hContact, 0); -} - -void CDiscordProto::Chat_ProcessLogMenu(GCHOOK *gch) -{ - CDiscordUser *pUser = FindUserByChannel(_wtoi64(gch->si->ptszID)); - if (pUser == nullptr) - return; - - ENTER_STRING es = {}; - es.szModuleName = m_szModuleName; - - switch (gch->dwData) { - case IDM_DESTROY: - if (IDYES == MessageBox(nullptr, TranslateT("Do you really want to destroy this channel? This action is non-revertable."), m_tszUserName, MB_YESNO | MB_ICONQUESTION)) { - CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str()); - Push(new AsyncHttpRequest(this, REQUEST_DELETE, szUrl, nullptr)); - } - break; - - case IDM_RENAME: - es.caption = TranslateT("Enter new channel name:"); - es.type = ESF_COMBO; - es.szDataPrefix = "chat_rename"; - if (EnterString(&es)) { - JSONNode root; root << WCHAR_PARAM("name", es.ptszResult); - CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str()); - Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root)); - mir_free(es.ptszResult); - } - break; - - case IDM_CHANGETOPIC: - es.caption = TranslateT("Enter new topic:"); - es.type = ESF_RICHEDIT; - es.szDataPrefix = "chat_topic"; - if (EnterString(&es)) { - JSONNode root; root << WCHAR_PARAM("topic", es.ptszResult); - CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str()); - Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root)); - mir_free(es.ptszResult); - } - break; - - case IDM_CHANGENICK: - es.caption = TranslateT("Enter your new nick name:"); - es.type = ESF_COMBO; - es.szDataPrefix = "chat_nick"; - es.recentCount = 5; - if (EnterString(&es)) { - JSONNode root; root << WCHAR_PARAM("nick", es.ptszResult); - CMStringA szUrl(FORMAT, "/guilds/%lld/members/@me/nick", pUser->pGuild->id); - Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root)); - mir_free(es.ptszResult); - } - break; - } -} - -void CDiscordProto::Chat_ProcessNickMenu(GCHOOK* gch) -{ - auto *pChannel = FindUserByChannel(_wtoi64(gch->si->ptszID)); - if (pChannel == nullptr || pChannel->pGuild == nullptr) - return; - - auto* pUser = pChannel->pGuild->FindUser(_wtoi64(gch->ptszUID)); - if (pUser == nullptr) - return; - - switch (gch->dwData) { - case IDM_COPY_ID: - CopyId(pUser->wszDiscordId); - break; - } -} - -int CDiscordProto::GroupchatEventHook(WPARAM, LPARAM lParam) -{ - GCHOOK *gch = (GCHOOK*)lParam; - if (gch == nullptr) - return 0; - - if (mir_strcmpi(gch->si->pszModule, m_szModuleName)) - return 0; - - switch (gch->iType) { - case GC_USER_MESSAGE: - if (m_bOnline && mir_wstrlen(gch->ptszText) > 0) { - CMStringW wszText(gch->ptszText); - wszText.TrimRight(); - - int pos = wszText.Find(':'); - if (pos != -1) { - auto wszWord = wszText.Left(pos); - wszWord.Trim(); - if (auto *si = g_chatApi.SM_FindSession(gch->si->ptszID, gch->si->pszModule)) { - USERINFO *pUser = nullptr; - - for (auto &U : si->getUserList()) - if (wszWord == U->pszNick) { - pUser = U; - break; - } - - if (pUser) { - wszText.Delete(0, pos); - wszText.Insert(0, L"<@" + CMStringW(pUser->pszUID) + L">"); - } - } - } - - Chat_UnescapeTags(wszText.GetBuffer()); - - JSONNode body; body << WCHAR_PARAM("content", wszText); - CMStringA szUrl(FORMAT, "/channels/%S/messages", gch->si->ptszID); - Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr, &body)); - } - break; - - case GC_USER_PRIVMESS: - Chat_SendPrivateMessage(gch); - break; - - case GC_USER_LOGMENU: - Chat_ProcessLogMenu(gch); - break; - - case GC_USER_NICKLISTMENU: - Chat_ProcessNickMenu(gch); - break; - - case GC_USER_TYPNOTIFY: - UserIsTyping(gch->si->hContact, (int)gch->dwData); - break; - } - - return 1; -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +enum { + IDM_CANCEL, + IDM_COPY_ID, + + IDM_CHANGENICK, IDM_CHANGETOPIC, IDM_RENAME, IDM_DESTROY +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +void BuildStatusList(const CDiscordGuild *pGuild, SESSION_INFO *si) +{ + Chat_AddGroup(si, L"@owner"); + + for (auto &it : pGuild->arRoles) + Chat_AddGroup(si, it->wszName); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static gc_item sttLogListItems[] = +{ + { LPGENW("Change &nickname"), IDM_CHANGENICK, MENU_ITEM }, + { LPGENW("Channel control"), FALSE, MENU_NEWPOPUP }, + { LPGENW("Change &topic"), IDM_CHANGETOPIC, MENU_POPUPITEM }, + { LPGENW("&Rename channel"), IDM_RENAME, MENU_POPUPITEM }, + { nullptr, 0, MENU_POPUPSEPARATOR }, + { LPGENW("&Destroy channel"), IDM_DESTROY, MENU_POPUPITEM }, +}; + +static gc_item sttNicklistItems[] = +{ + { LPGENW("Copy ID"), IDM_COPY_ID, MENU_ITEM }, +}; + +int CDiscordProto::GroupchatMenuHook(WPARAM, LPARAM lParam) +{ + GCMENUITEMS* gcmi = (GCMENUITEMS*)lParam; + if (gcmi == nullptr) + return 0; + + if (mir_strcmpi(gcmi->pszModule, m_szModuleName)) + return 0; + + CDiscordUser *pChat = FindUserByChannel(_wtoi64(gcmi->pszID)); + if (pChat == nullptr) + return 0; + + if (gcmi->Type == MENU_ON_LOG) + Chat_AddMenuItems(gcmi->hMenu, _countof(sttLogListItems), sttLogListItems, &g_plugin); + else if (gcmi->Type == MENU_ON_NICKLIST) + Chat_AddMenuItems(gcmi->hMenu, _countof(sttNicklistItems), sttNicklistItems, &g_plugin); + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::Chat_SendPrivateMessage(GCHOOK *gch) +{ + SnowFlake userId = _wtoi64(gch->ptszUID); + + MCONTACT hContact; + CDiscordUser *pUser = FindUser(userId); + if (pUser == nullptr) { + PROTOSEARCHRESULT psr = { sizeof(psr) }; + psr.id.w = (wchar_t*)gch->ptszUID; + psr.nick.w = (wchar_t*)gch->ptszNick; + if ((hContact = AddToList(PALF_TEMPORARY, &psr)) == 0) + return; + + setId(hContact, DB_KEY_ID, userId); + setId(hContact, DB_KEY_CHANNELID, _wtoi64(gch->si->ptszID)); + setWString(hContact, DB_KEY_NICK, gch->ptszNick); + Contact::Hide(hContact); + db_set_dw(hContact, "Ignore", "Mask1", 0); + } + else hContact = pUser->hContact; + + CallService(MS_MSG_SENDMESSAGE, hContact, 0); +} + +void CDiscordProto::Chat_ProcessLogMenu(GCHOOK *gch) +{ + CDiscordUser *pUser = FindUserByChannel(_wtoi64(gch->si->ptszID)); + if (pUser == nullptr) + return; + + ENTER_STRING es = {}; + es.szModuleName = m_szModuleName; + + switch (gch->dwData) { + case IDM_DESTROY: + if (IDYES == MessageBox(nullptr, TranslateT("Do you really want to destroy this channel? This action is non-revertable."), m_tszUserName, MB_YESNO | MB_ICONQUESTION)) { + CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str()); + Push(new AsyncHttpRequest(this, REQUEST_DELETE, szUrl, nullptr)); + } + break; + + case IDM_RENAME: + es.caption = TranslateT("Enter new channel name:"); + es.type = ESF_COMBO; + es.szDataPrefix = "chat_rename"; + if (EnterString(&es)) { + JSONNode root; root << WCHAR_PARAM("name", es.ptszResult); + CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str()); + Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root)); + mir_free(es.ptszResult); + } + break; + + case IDM_CHANGETOPIC: + es.caption = TranslateT("Enter new topic:"); + es.type = ESF_RICHEDIT; + es.szDataPrefix = "chat_topic"; + if (EnterString(&es)) { + JSONNode root; root << WCHAR_PARAM("topic", es.ptszResult); + CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str()); + Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root)); + mir_free(es.ptszResult); + } + break; + + case IDM_CHANGENICK: + es.caption = TranslateT("Enter your new nick name:"); + es.type = ESF_COMBO; + es.szDataPrefix = "chat_nick"; + es.recentCount = 5; + if (EnterString(&es)) { + JSONNode root; root << WCHAR_PARAM("nick", es.ptszResult); + CMStringA szUrl(FORMAT, "/guilds/%lld/members/@me/nick", pUser->pGuild->id); + Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root)); + mir_free(es.ptszResult); + } + break; + } +} + +void CDiscordProto::Chat_ProcessNickMenu(GCHOOK* gch) +{ + auto *pChannel = FindUserByChannel(_wtoi64(gch->si->ptszID)); + if (pChannel == nullptr || pChannel->pGuild == nullptr) + return; + + auto* pUser = pChannel->pGuild->FindUser(_wtoi64(gch->ptszUID)); + if (pUser == nullptr) + return; + + switch (gch->dwData) { + case IDM_COPY_ID: + CopyId(pUser->wszDiscordId); + break; + } +} + +int CDiscordProto::GroupchatEventHook(WPARAM, LPARAM lParam) +{ + GCHOOK *gch = (GCHOOK*)lParam; + if (gch == nullptr) + return 0; + + if (mir_strcmpi(gch->si->pszModule, m_szModuleName)) + return 0; + + switch (gch->iType) { + case GC_USER_MESSAGE: + if (m_bOnline && mir_wstrlen(gch->ptszText) > 0) { + CMStringW wszText(gch->ptszText); + wszText.TrimRight(); + + int pos = wszText.Find(':'); + if (pos != -1) { + auto wszWord = wszText.Left(pos); + wszWord.Trim(); + if (auto *si = g_chatApi.SM_FindSession(gch->si->ptszID, gch->si->pszModule)) { + USERINFO *pUser = nullptr; + + for (auto &U : si->getUserList()) + if (wszWord == U->pszNick) { + pUser = U; + break; + } + + if (pUser) { + wszText.Delete(0, pos); + wszText.Insert(0, L"<@" + CMStringW(pUser->pszUID) + L">"); + } + } + } + + Chat_UnescapeTags(wszText.GetBuffer()); + + JSONNode body; body << WCHAR_PARAM("content", wszText); + CMStringA szUrl(FORMAT, "/channels/%S/messages", gch->si->ptszID); + Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr, &body)); + } + break; + + case GC_USER_PRIVMESS: + Chat_SendPrivateMessage(gch); + break; + + case GC_USER_LOGMENU: + Chat_ProcessLogMenu(gch); + break; + + case GC_USER_NICKLISTMENU: + Chat_ProcessNickMenu(gch); + break; + + case GC_USER_TYPNOTIFY: + UserIsTyping(gch->si->hContact, (int)gch->dwData); + break; + } + + return 1; +} diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp index d05ff80863..760437ceb0 100644 --- a/protocols/Discord/src/guilds.cpp +++ b/protocols/Discord/src/guilds.cpp @@ -1,413 +1,413 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -int compareUsers(const CDiscordUser *p1, const CDiscordUser *p2); - -static int compareRoles(const CDiscordRole *p1, const CDiscordRole *p2) -{ - return compareInt64(p1->id, p2->id); -} - -static int compareChatUsers(const CDiscordGuildMember *p1, const CDiscordGuildMember *p2) -{ - return compareInt64(p1->userId, p2->userId); -} - -CDiscordGuild::CDiscordGuild(SnowFlake _id) : - id(_id), - arChannels(10, compareUsers), - arChatUsers(30, compareChatUsers), - arRoles(10, compareRoles) -{ -} - -CDiscordGuild::~CDiscordGuild() -{ -} - -CDiscordUser::~CDiscordUser() -{ - if (pGuild != nullptr) - pGuild->arChannels.remove(this); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// reads a presence block from json - -void CDiscordProto::ProcessPresence(const JSONNode &root) -{ - auto userId = ::getId(root["user"]["id"]); - CDiscordUser *pUser = FindUser(userId); - if (pUser == nullptr) { - debugLogA("Presence from unknown user id %lld ignored", userId); - return; - } - - setWord(pUser->hContact, "Status", StrToStatus(root["status"].as_mstring())); - - CheckAvatarChange(pUser->hContact, root["user"]["avatar"].as_mstring()); - - for (auto &act : root["activities"]) { - CMStringW wszStatus(act["state"].as_mstring()); - if (!wszStatus.IsEmpty()) - db_set_ws(pUser->hContact, "CList", "StatusMsg", wszStatus); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// reads a role from json - -void CDiscordProto::ProcessRole(CDiscordGuild *guild, const JSONNode &role) -{ - SnowFlake id = ::getId(role["id"]); - CDiscordRole *p = guild->arRoles.find((CDiscordRole*)&id); - if (p == nullptr) { - p = new CDiscordRole(); - p->id = id; - guild->arRoles.insert(p); - } - - p->color = role["color"].as_int(); - p->position = role["position"].as_int(); - p->permissions = role["permissions"].as_int(); - p->wszName = role["name"].as_mstring(); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static void sttSetGroupName(MCONTACT hContact, const wchar_t *pwszGroupName) -{ - ptrW wszOldName(Clist_GetGroup(hContact)); - if (wszOldName != nullptr) { - ptrW wszChatGroup(Chat_GetGroup()); - if (mir_wstrcmpi(wszOldName, wszChatGroup)) - return; // custom group, don't touch it - } - - Clist_SetGroup(hContact, pwszGroupName); -} - -void CDiscordProto::BatchChatCreate(void *param) -{ - CDiscordGuild *pGuild = (CDiscordGuild*)param; - - for (auto &it : pGuild->arChannels) - if (!it->bIsPrivate && !it->bIsGroup) - CreateChat(pGuild, it); -} - -void CDiscordProto::CreateChat(CDiscordGuild *pGuild, CDiscordUser *pUser) -{ - SESSION_INFO *si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, pUser->wszUsername, pUser->wszChannelName); - si->pParent = pGuild->pParentSi; - pUser->hContact = si->hContact; - setId(pUser->hContact, DB_KEY_ID, pUser->channelId); - setId(pUser->hContact, DB_KEY_CHANNELID, pUser->channelId); - - SnowFlake oldMsgId = getId(pUser->hContact, DB_KEY_LASTMSGID); - if (oldMsgId == 0) - RetrieveHistory(pUser, MSG_BEFORE, pUser->lastMsgId, 20); - else if (!pUser->bSynced && pUser->lastMsgId > oldMsgId) { - pUser->bSynced = true; - RetrieveHistory(pUser, MSG_AFTER, oldMsgId, 99); - } - - if (m_bUseGuildGroups) { - if (pUser->parentId) { - CDiscordUser *pParent = FindUserByChannel(pUser->parentId); - if (pParent != nullptr) - sttSetGroupName(pUser->hContact, pParent->wszChannelName); - } - else sttSetGroupName(pUser->hContact, Clist_GroupGetName(pGuild->groupId)); - } - - BuildStatusList(pGuild, si); - - Chat_Control(m_szModuleName, pUser->wszUsername, m_bHideGroupchats ? WINDOW_HIDDEN : SESSION_INITDONE); - Chat_Control(m_szModuleName, pUser->wszUsername, SESSION_ONLINE); - - if (!pUser->wszTopic.IsEmpty()) { - Chat_SetStatusbarText(m_szModuleName, pUser->wszUsername, pUser->wszTopic); - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_TOPIC }; - gce.pszID.w = pUser->wszUsername; - gce.time = time(0); - gce.pszText.w = pUser->wszTopic; - Chat_Event(&gce); - } -} - -void CDiscordProto::ProcessGuild(const JSONNode &pRoot) -{ - SnowFlake guildId = ::getId(pRoot["id"]); - - CDiscordGuild *pGuild = FindGuild(guildId); - if (pGuild == nullptr) { - pGuild = new CDiscordGuild(guildId); - pGuild->LoadFromFile(); - arGuilds.insert(pGuild); - } - - pGuild->ownerId = ::getId(pRoot["owner_id"]); - pGuild->wszName = pRoot["name"].as_mstring(); - if (m_bUseGuildGroups) - pGuild->groupId = Clist_GroupCreate(Clist_GroupExists(m_wszDefaultGroup), pGuild->wszName); - - SESSION_INFO *si = Chat_NewSession(GCW_SERVER, m_szModuleName, pGuild->wszName, pGuild->wszName, pGuild); - if (si == nullptr) - return; - - pGuild->pParentSi = (SESSION_INFO*)si; - pGuild->hContact = si->hContact; - setId(pGuild->hContact, DB_KEY_CHANNELID, guildId); - - Chat_Control(m_szModuleName, pGuild->wszName, WINDOW_HIDDEN); - Chat_Control(m_szModuleName, pGuild->wszName, SESSION_ONLINE); - - for (auto &it : pRoot["roles"]) - ProcessRole(pGuild, it); - - BuildStatusList(pGuild, si); - - for (auto &it : pRoot["channels"]) - ProcessGuildChannel(pGuild, it); - - if (!pGuild->bSynced && getByte(si->hContact, "EnableSync")) - GatewaySendGuildInfo(pGuild); - - // store all guild members - for (auto &it : pRoot["members"]) { - auto *pm = ProcessGuildUser(pGuild, it); - - CMStringW wszNick = it["nick"].as_mstring(); - if (!wszNick.IsEmpty()) - pm->wszNick = wszNick; - - pm->iStatus = ID_STATUS_OFFLINE; - } - - // parse online statuses - for (auto &it : pRoot["presences"]) { - CDiscordGuildMember *gm = pGuild->FindUser(::getId(it["user"]["id"])); - if (gm != nullptr) - gm->iStatus = StrToStatus(it["status"].as_mstring()); - } - - for (auto &it : pGuild->arChatUsers) - AddGuildUser(pGuild, *it); - - if (!m_bTerminated) - ForkThread(&CDiscordProto::BatchChatCreate, pGuild); - - pGuild->bSynced = true; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -CDiscordUser* CDiscordProto::ProcessGuildChannel(CDiscordGuild *pGuild, const JSONNode &pch) -{ - CMStringW wszChannelId = pch["id"].as_mstring(); - SnowFlake channelId = _wtoi64(wszChannelId); - CMStringW wszName = pch["name"].as_mstring(); - CDiscordUser *pUser; - - // filter our all channels but the text ones - switch (pch["type"].as_int()) { - case 4: // channel group - if (!m_bUseGuildGroups) // ignore groups when they aren't enabled - return nullptr; - - pUser = FindUserByChannel(channelId); - if (pUser == nullptr) { - // missing channel - create it - pUser = new CDiscordUser(channelId); - pUser->bIsPrivate = false; - pUser->channelId = channelId; - pUser->bIsGroup = true; - arUsers.insert(pUser); - - pGuild->arChannels.insert(pUser); - - MGROUP grpId = Clist_GroupCreate(pGuild->groupId, wszName); - pUser->wszChannelName = Clist_GroupGetName(grpId); - } - return pUser; - - case 0: // text channel - pUser = FindUserByChannel(channelId); - if (pUser == nullptr) { - // missing channel - create it - pUser = new CDiscordUser(channelId); - pUser->bIsPrivate = false; - pUser->channelId = channelId; - arUsers.insert(pUser); - } - - if (pGuild->arChannels.find(pUser) == nullptr) - pGuild->arChannels.insert(pUser); - - pUser->wszUsername = wszChannelId; - if (m_bUseGuildGroups) - pUser->wszChannelName = L"#" + wszName; - else - pUser->wszChannelName = pGuild->wszName + L"#" + wszName; - pUser->wszTopic = pch["topic"].as_mstring(); - pUser->pGuild = pGuild; - pUser->lastMsgId = ::getId(pch["last_message_id"]); - pUser->parentId = _wtoi64(pch["parent_id"].as_mstring()); - return pUser; - } - - return nullptr; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -CDiscordGuildMember* CDiscordProto::ProcessGuildUser(CDiscordGuild *pGuild, const JSONNode &pRoot, bool *pbNew) -{ - auto& pUser = pRoot["user"]; - - bool bNew = false; - CMStringW wszUserId = pUser["id"].as_mstring(); - SnowFlake userId = _wtoi64(wszUserId); - CDiscordGuildMember *pm = pGuild->FindUser(userId); - if (pm == nullptr) { - pm = new CDiscordGuildMember(userId); - pGuild->arChatUsers.insert(pm); - bNew = true; - } - - pm->wszDiscordId = pUser["username"].as_mstring() + L"#" + pUser["discriminator"].as_mstring(); - pm->wszNick = pRoot["nick"].as_mstring(); - if (pm->wszNick.IsEmpty()) - pm->wszNick = pUser["username"].as_mstring(); - else - bNew = true; - - if (userId == pGuild->ownerId) - pm->wszRole = L"@owner"; - else { - CDiscordRole *pRole = nullptr; - for (auto &itr : pRoot["roles"]) { - SnowFlake roleId = ::getId(itr); - if (pRole = pGuild->arRoles.find((CDiscordRole *)&roleId)) - break; - } - pm->wszRole = (pRole == nullptr) ? L"@everyone" : pRole->wszName; - } - - if (pbNew) - *pbNew = bNew; - return pm; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::ProcessChatUser(CDiscordUser *pChat, const CMStringW &wszUserId, const JSONNode &pRoot) -{ - // input data control - SnowFlake userId = _wtoi64(wszUserId); - CDiscordGuild *pGuild = pChat->pGuild; - if (pGuild == nullptr || userId == 0) - return; - - // does user exist? if yes, there's nothing to do - auto *pm = pGuild->FindUser(userId); - if (pm != nullptr) - return; - - // otherwise let's create a user and insert him into all guild's chats - pm = new CDiscordGuildMember(userId); - pm->wszDiscordId = pRoot["author"]["username"].as_mstring() + L"#" + pRoot["author"]["discriminator"].as_mstring(); - pm->wszNick = pRoot["nick"].as_mstring(); - if (pm->wszNick.IsEmpty()) - pm->wszNick = pRoot["author"]["username"].as_mstring(); - pGuild->arChatUsers.insert(pm); - - debugLogA("add missing user to chat: id=%lld, nick=%S", userId, pm->wszNick.c_str()); - AddGuildUser(pGuild, *pm); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::AddGuildUser(CDiscordGuild *pGuild, const CDiscordGuildMember &pUser) -{ - int flags = 0; - switch (pUser.iStatus) { - case ID_STATUS_ONLINE: case ID_STATUS_NA: case ID_STATUS_DND: - flags = 1; - break; - } - - auto *pStatus = g_chatApi.TM_FindStatus(pGuild->pParentSi->pStatuses, pUser.wszRole); - - wchar_t wszUserId[100]; - _i64tow_s(pUser.userId, wszUserId, _countof(wszUserId), 10); - - auto *pu = g_chatApi.UM_AddUser(pGuild->pParentSi, wszUserId, pUser.wszNick, (pStatus) ? pStatus->iStatus : 0); - pu->iStatusEx = flags; - if (pUser.userId == m_ownId) - pGuild->pParentSi->pMe = pu; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordGuild::LoadFromFile() -{ - int fileNo = _wopen(GetCacheFile(), O_TEXT | O_RDONLY); - if (fileNo == -1) - return; - - int fSize = ::filelength(fileNo); - ptrA json((char*)mir_alloc(fSize + 1)); - read(fileNo, json, fSize); - close(fileNo); - - JSONNode cached = JSONNode::parse(json); - for (auto &it : cached) { - SnowFlake userId = getId(it["id"]); - auto *pUser = FindUser(userId); - if (pUser == nullptr) { - pUser = new CDiscordGuildMember(userId); - arChatUsers.insert(pUser); - } - - pUser->wszNick = it["n"].as_mstring(); - pUser->wszRole = it["r"].as_mstring(); - } -} - -void CDiscordGuild ::SaveToFile() -{ - JSONNode members(JSON_ARRAY); - for (auto &it : arChatUsers) { - JSONNode member; - member << INT64_PARAM("id", it->userId) << WCHAR_PARAM("n", it->wszNick) << WCHAR_PARAM("r", it->wszRole); - members << member; - } - - CMStringW wszFileName(GetCacheFile()); - CreatePathToFileW(wszFileName); - int fileNo = _wopen(wszFileName, O_CREAT | O_TRUNC | O_TEXT | O_WRONLY); - if (fileNo != -1) { - std::string json = members.write_formatted(); - write(fileNo, json.c_str(), (int)json.size()); - close(fileNo); - } -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +int compareUsers(const CDiscordUser *p1, const CDiscordUser *p2); + +static int compareRoles(const CDiscordRole *p1, const CDiscordRole *p2) +{ + return compareInt64(p1->id, p2->id); +} + +static int compareChatUsers(const CDiscordGuildMember *p1, const CDiscordGuildMember *p2) +{ + return compareInt64(p1->userId, p2->userId); +} + +CDiscordGuild::CDiscordGuild(SnowFlake _id) : + id(_id), + arChannels(10, compareUsers), + arChatUsers(30, compareChatUsers), + arRoles(10, compareRoles) +{ +} + +CDiscordGuild::~CDiscordGuild() +{ +} + +CDiscordUser::~CDiscordUser() +{ + if (pGuild != nullptr) + pGuild->arChannels.remove(this); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// reads a presence block from json + +void CDiscordProto::ProcessPresence(const JSONNode &root) +{ + auto userId = ::getId(root["user"]["id"]); + CDiscordUser *pUser = FindUser(userId); + if (pUser == nullptr) { + debugLogA("Presence from unknown user id %lld ignored", userId); + return; + } + + setWord(pUser->hContact, "Status", StrToStatus(root["status"].as_mstring())); + + CheckAvatarChange(pUser->hContact, root["user"]["avatar"].as_mstring()); + + for (auto &act : root["activities"]) { + CMStringW wszStatus(act["state"].as_mstring()); + if (!wszStatus.IsEmpty()) + db_set_ws(pUser->hContact, "CList", "StatusMsg", wszStatus); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// reads a role from json + +void CDiscordProto::ProcessRole(CDiscordGuild *guild, const JSONNode &role) +{ + SnowFlake id = ::getId(role["id"]); + CDiscordRole *p = guild->arRoles.find((CDiscordRole*)&id); + if (p == nullptr) { + p = new CDiscordRole(); + p->id = id; + guild->arRoles.insert(p); + } + + p->color = role["color"].as_int(); + p->position = role["position"].as_int(); + p->permissions = role["permissions"].as_int(); + p->wszName = role["name"].as_mstring(); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static void sttSetGroupName(MCONTACT hContact, const wchar_t *pwszGroupName) +{ + ptrW wszOldName(Clist_GetGroup(hContact)); + if (wszOldName != nullptr) { + ptrW wszChatGroup(Chat_GetGroup()); + if (mir_wstrcmpi(wszOldName, wszChatGroup)) + return; // custom group, don't touch it + } + + Clist_SetGroup(hContact, pwszGroupName); +} + +void CDiscordProto::BatchChatCreate(void *param) +{ + CDiscordGuild *pGuild = (CDiscordGuild*)param; + + for (auto &it : pGuild->arChannels) + if (!it->bIsPrivate && !it->bIsGroup) + CreateChat(pGuild, it); +} + +void CDiscordProto::CreateChat(CDiscordGuild *pGuild, CDiscordUser *pUser) +{ + SESSION_INFO *si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, pUser->wszUsername, pUser->wszChannelName); + si->pParent = pGuild->pParentSi; + pUser->hContact = si->hContact; + setId(pUser->hContact, DB_KEY_ID, pUser->channelId); + setId(pUser->hContact, DB_KEY_CHANNELID, pUser->channelId); + + SnowFlake oldMsgId = getId(pUser->hContact, DB_KEY_LASTMSGID); + if (oldMsgId == 0) + RetrieveHistory(pUser, MSG_BEFORE, pUser->lastMsgId, 20); + else if (!pUser->bSynced && pUser->lastMsgId > oldMsgId) { + pUser->bSynced = true; + RetrieveHistory(pUser, MSG_AFTER, oldMsgId, 99); + } + + if (m_bUseGuildGroups) { + if (pUser->parentId) { + CDiscordUser *pParent = FindUserByChannel(pUser->parentId); + if (pParent != nullptr) + sttSetGroupName(pUser->hContact, pParent->wszChannelName); + } + else sttSetGroupName(pUser->hContact, Clist_GroupGetName(pGuild->groupId)); + } + + BuildStatusList(pGuild, si); + + Chat_Control(m_szModuleName, pUser->wszUsername, m_bHideGroupchats ? WINDOW_HIDDEN : SESSION_INITDONE); + Chat_Control(m_szModuleName, pUser->wszUsername, SESSION_ONLINE); + + if (!pUser->wszTopic.IsEmpty()) { + Chat_SetStatusbarText(m_szModuleName, pUser->wszUsername, pUser->wszTopic); + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_TOPIC }; + gce.pszID.w = pUser->wszUsername; + gce.time = time(0); + gce.pszText.w = pUser->wszTopic; + Chat_Event(&gce); + } +} + +void CDiscordProto::ProcessGuild(const JSONNode &pRoot) +{ + SnowFlake guildId = ::getId(pRoot["id"]); + + CDiscordGuild *pGuild = FindGuild(guildId); + if (pGuild == nullptr) { + pGuild = new CDiscordGuild(guildId); + pGuild->LoadFromFile(); + arGuilds.insert(pGuild); + } + + pGuild->ownerId = ::getId(pRoot["owner_id"]); + pGuild->wszName = pRoot["name"].as_mstring(); + if (m_bUseGuildGroups) + pGuild->groupId = Clist_GroupCreate(Clist_GroupExists(m_wszDefaultGroup), pGuild->wszName); + + SESSION_INFO *si = Chat_NewSession(GCW_SERVER, m_szModuleName, pGuild->wszName, pGuild->wszName, pGuild); + if (si == nullptr) + return; + + pGuild->pParentSi = (SESSION_INFO*)si; + pGuild->hContact = si->hContact; + setId(pGuild->hContact, DB_KEY_CHANNELID, guildId); + + Chat_Control(m_szModuleName, pGuild->wszName, WINDOW_HIDDEN); + Chat_Control(m_szModuleName, pGuild->wszName, SESSION_ONLINE); + + for (auto &it : pRoot["roles"]) + ProcessRole(pGuild, it); + + BuildStatusList(pGuild, si); + + for (auto &it : pRoot["channels"]) + ProcessGuildChannel(pGuild, it); + + if (!pGuild->bSynced && getByte(si->hContact, "EnableSync")) + GatewaySendGuildInfo(pGuild); + + // store all guild members + for (auto &it : pRoot["members"]) { + auto *pm = ProcessGuildUser(pGuild, it); + + CMStringW wszNick = it["nick"].as_mstring(); + if (!wszNick.IsEmpty()) + pm->wszNick = wszNick; + + pm->iStatus = ID_STATUS_OFFLINE; + } + + // parse online statuses + for (auto &it : pRoot["presences"]) { + CDiscordGuildMember *gm = pGuild->FindUser(::getId(it["user"]["id"])); + if (gm != nullptr) + gm->iStatus = StrToStatus(it["status"].as_mstring()); + } + + for (auto &it : pGuild->arChatUsers) + AddGuildUser(pGuild, *it); + + if (!m_bTerminated) + ForkThread(&CDiscordProto::BatchChatCreate, pGuild); + + pGuild->bSynced = true; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +CDiscordUser* CDiscordProto::ProcessGuildChannel(CDiscordGuild *pGuild, const JSONNode &pch) +{ + CMStringW wszChannelId = pch["id"].as_mstring(); + SnowFlake channelId = _wtoi64(wszChannelId); + CMStringW wszName = pch["name"].as_mstring(); + CDiscordUser *pUser; + + // filter our all channels but the text ones + switch (pch["type"].as_int()) { + case 4: // channel group + if (!m_bUseGuildGroups) // ignore groups when they aren't enabled + return nullptr; + + pUser = FindUserByChannel(channelId); + if (pUser == nullptr) { + // missing channel - create it + pUser = new CDiscordUser(channelId); + pUser->bIsPrivate = false; + pUser->channelId = channelId; + pUser->bIsGroup = true; + arUsers.insert(pUser); + + pGuild->arChannels.insert(pUser); + + MGROUP grpId = Clist_GroupCreate(pGuild->groupId, wszName); + pUser->wszChannelName = Clist_GroupGetName(grpId); + } + return pUser; + + case 0: // text channel + pUser = FindUserByChannel(channelId); + if (pUser == nullptr) { + // missing channel - create it + pUser = new CDiscordUser(channelId); + pUser->bIsPrivate = false; + pUser->channelId = channelId; + arUsers.insert(pUser); + } + + if (pGuild->arChannels.find(pUser) == nullptr) + pGuild->arChannels.insert(pUser); + + pUser->wszUsername = wszChannelId; + if (m_bUseGuildGroups) + pUser->wszChannelName = L"#" + wszName; + else + pUser->wszChannelName = pGuild->wszName + L"#" + wszName; + pUser->wszTopic = pch["topic"].as_mstring(); + pUser->pGuild = pGuild; + pUser->lastMsgId = ::getId(pch["last_message_id"]); + pUser->parentId = _wtoi64(pch["parent_id"].as_mstring()); + return pUser; + } + + return nullptr; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +CDiscordGuildMember* CDiscordProto::ProcessGuildUser(CDiscordGuild *pGuild, const JSONNode &pRoot, bool *pbNew) +{ + auto& pUser = pRoot["user"]; + + bool bNew = false; + CMStringW wszUserId = pUser["id"].as_mstring(); + SnowFlake userId = _wtoi64(wszUserId); + CDiscordGuildMember *pm = pGuild->FindUser(userId); + if (pm == nullptr) { + pm = new CDiscordGuildMember(userId); + pGuild->arChatUsers.insert(pm); + bNew = true; + } + + pm->wszDiscordId = pUser["username"].as_mstring() + L"#" + pUser["discriminator"].as_mstring(); + pm->wszNick = pRoot["nick"].as_mstring(); + if (pm->wszNick.IsEmpty()) + pm->wszNick = pUser["username"].as_mstring(); + else + bNew = true; + + if (userId == pGuild->ownerId) + pm->wszRole = L"@owner"; + else { + CDiscordRole *pRole = nullptr; + for (auto &itr : pRoot["roles"]) { + SnowFlake roleId = ::getId(itr); + if (pRole = pGuild->arRoles.find((CDiscordRole *)&roleId)) + break; + } + pm->wszRole = (pRole == nullptr) ? L"@everyone" : pRole->wszName; + } + + if (pbNew) + *pbNew = bNew; + return pm; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::ProcessChatUser(CDiscordUser *pChat, const CMStringW &wszUserId, const JSONNode &pRoot) +{ + // input data control + SnowFlake userId = _wtoi64(wszUserId); + CDiscordGuild *pGuild = pChat->pGuild; + if (pGuild == nullptr || userId == 0) + return; + + // does user exist? if yes, there's nothing to do + auto *pm = pGuild->FindUser(userId); + if (pm != nullptr) + return; + + // otherwise let's create a user and insert him into all guild's chats + pm = new CDiscordGuildMember(userId); + pm->wszDiscordId = pRoot["author"]["username"].as_mstring() + L"#" + pRoot["author"]["discriminator"].as_mstring(); + pm->wszNick = pRoot["nick"].as_mstring(); + if (pm->wszNick.IsEmpty()) + pm->wszNick = pRoot["author"]["username"].as_mstring(); + pGuild->arChatUsers.insert(pm); + + debugLogA("add missing user to chat: id=%lld, nick=%S", userId, pm->wszNick.c_str()); + AddGuildUser(pGuild, *pm); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::AddGuildUser(CDiscordGuild *pGuild, const CDiscordGuildMember &pUser) +{ + int flags = 0; + switch (pUser.iStatus) { + case ID_STATUS_ONLINE: case ID_STATUS_NA: case ID_STATUS_DND: + flags = 1; + break; + } + + auto *pStatus = g_chatApi.TM_FindStatus(pGuild->pParentSi->pStatuses, pUser.wszRole); + + wchar_t wszUserId[100]; + _i64tow_s(pUser.userId, wszUserId, _countof(wszUserId), 10); + + auto *pu = g_chatApi.UM_AddUser(pGuild->pParentSi, wszUserId, pUser.wszNick, (pStatus) ? pStatus->iStatus : 0); + pu->iStatusEx = flags; + if (pUser.userId == m_ownId) + pGuild->pParentSi->pMe = pu; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordGuild::LoadFromFile() +{ + int fileNo = _wopen(GetCacheFile(), O_TEXT | O_RDONLY); + if (fileNo == -1) + return; + + int fSize = ::filelength(fileNo); + ptrA json((char*)mir_alloc(fSize + 1)); + read(fileNo, json, fSize); + close(fileNo); + + JSONNode cached = JSONNode::parse(json); + for (auto &it : cached) { + SnowFlake userId = getId(it["id"]); + auto *pUser = FindUser(userId); + if (pUser == nullptr) { + pUser = new CDiscordGuildMember(userId); + arChatUsers.insert(pUser); + } + + pUser->wszNick = it["n"].as_mstring(); + pUser->wszRole = it["r"].as_mstring(); + } +} + +void CDiscordGuild ::SaveToFile() +{ + JSONNode members(JSON_ARRAY); + for (auto &it : arChatUsers) { + JSONNode member; + member << INT64_PARAM("id", it->userId) << WCHAR_PARAM("n", it->wszNick) << WCHAR_PARAM("r", it->wszRole); + members << member; + } + + CMStringW wszFileName(GetCacheFile()); + CreatePathToFileW(wszFileName); + int fileNo = _wopen(wszFileName, O_CREAT | O_TRUNC | O_TEXT | O_WRONLY); + if (fileNo != -1) { + std::string json = members.write_formatted(); + write(fileNo, json.c_str(), (int)json.size()); + close(fileNo); + } +} diff --git a/protocols/Discord/src/http.cpp b/protocols/Discord/src/http.cpp index 2facf00af7..f65451f9ce 100644 --- a/protocols/Discord/src/http.cpp +++ b/protocols/Discord/src/http.cpp @@ -1,155 +1,155 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -void CDiscordProto::Push(AsyncHttpRequest *pReq, int iTimeout) -{ - pReq->timeout = iTimeout; - { - mir_cslock lck(m_csHttpQueue); - m_arHttpQueue.insert(pReq); - } - SetEvent(m_evRequestsQueue); -} - -void CDiscordProto::SaveToken(const JSONNode &data) -{ - CMStringA szToken = data["token"].as_mstring(); - if (!szToken.IsEmpty()) - m_szTempToken = szToken.Detach(); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static LONG g_reqNum = 0; - -AsyncHttpRequest::AsyncHttpRequest(CDiscordProto *ppro, int iRequestType, LPCSTR _url, MTHttpRequestHandler pFunc, JSONNode *pRoot) -{ - if (*_url == '/') { // relative url leads to a site - m_szUrl = "https://discord.com/api/v8"; - m_szUrl += _url; - m_bMainSite = true; - } - else { - m_szUrl = _url; - m_bMainSite = false; - } - - flags = NLHRF_HTTP11 | NLHRF_REDIRECT | NLHRF_SSL; - if (ppro->m_szAccessToken != nullptr) { - AddHeader("Authorization", ppro->m_szAccessToken); - flags |= NLHRF_DUMPASTEXT | NLHRF_NODUMPHEADERS; - } - else flags |= NLHRF_NODUMPSEND; - - if (pRoot != nullptr) { - ptrW text(json_write(pRoot)); - pData = mir_utf8encodeW(text); - dataLength = (int)mir_strlen(pData); - - AddHeader("Content-Type", "application/json"); - } - - m_pFunc = pFunc; - requestType = iRequestType; - m_iErrorCode = 0; - m_iReqNum = ::InterlockedIncrement(&g_reqNum); -} - -JsonReply::JsonReply(NETLIBHTTPREQUEST *pReply) -{ - if (pReply == nullptr) { - m_errorCode = 500; - return; - } - - m_errorCode = pReply->resultCode; - - m_root = json_parse(pReply->pData); - if (m_root == nullptr) - m_errorCode = 500; -} - -JsonReply::~JsonReply() -{ - json_delete(m_root); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::ServerThread(void*) -{ - m_szAccessToken = getStringA("AccessToken"); - m_hAPIConnection = nullptr; - m_bTerminated = false; - - debugLogA("CDiscordProto::WorkerThread: %s", "entering"); - - if (m_szAccessToken != nullptr) - RetrieveMyInfo(); // try to receive a response from server - else { - if (mir_wstrlen(m_wszEmail) == 0) { - ConnectionFailed(LOGINERR_BADUSERID); - return; - } - - ptrW wszPassword(getWStringA(DB_KEY_PASSWORD)); - if (wszPassword == nullptr) { - ConnectionFailed(LOGINERR_WRONGPASSWORD); - return; - } - - JSONNode root; root << WCHAR_PARAM("email", m_wszEmail) << WCHAR_PARAM("password", wszPassword); - Push(new AsyncHttpRequest(this, REQUEST_POST, "/auth/login", &CDiscordProto::OnReceiveToken, &root)); - } - - while (true) { - WaitForSingleObject(m_evRequestsQueue, 1000); - if (m_bTerminated) - break; - - AsyncHttpRequest *pReq; - bool need_sleep = false; - while (true) { - { - mir_cslock lck(m_csHttpQueue); - if (m_arHttpQueue.getCount() == 0) - break; - - pReq = m_arHttpQueue[0]; - m_arHttpQueue.remove(0); - need_sleep = (m_arHttpQueue.getCount() > 1); - } - if (m_bTerminated) - break; - ExecuteRequest(pReq); - if (need_sleep) { - Sleep(330); - debugLogA("CDiscordProto::WorkerThread: %s", "need to sleep"); - } - } - } - - m_hWorkerThread = nullptr; - if (m_hAPIConnection) { - Netlib_CloseHandle(m_hAPIConnection); - m_hAPIConnection = nullptr; - } - - debugLogA("CDiscordProto::WorkerThread: %s", "leaving"); -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +void CDiscordProto::Push(AsyncHttpRequest *pReq, int iTimeout) +{ + pReq->timeout = iTimeout; + { + mir_cslock lck(m_csHttpQueue); + m_arHttpQueue.insert(pReq); + } + SetEvent(m_evRequestsQueue); +} + +void CDiscordProto::SaveToken(const JSONNode &data) +{ + CMStringA szToken = data["token"].as_mstring(); + if (!szToken.IsEmpty()) + m_szTempToken = szToken.Detach(); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static LONG g_reqNum = 0; + +AsyncHttpRequest::AsyncHttpRequest(CDiscordProto *ppro, int iRequestType, LPCSTR _url, MTHttpRequestHandler pFunc, JSONNode *pRoot) +{ + if (*_url == '/') { // relative url leads to a site + m_szUrl = "https://discord.com/api/v8"; + m_szUrl += _url; + m_bMainSite = true; + } + else { + m_szUrl = _url; + m_bMainSite = false; + } + + flags = NLHRF_HTTP11 | NLHRF_REDIRECT | NLHRF_SSL; + if (ppro->m_szAccessToken != nullptr) { + AddHeader("Authorization", ppro->m_szAccessToken); + flags |= NLHRF_DUMPASTEXT | NLHRF_NODUMPHEADERS; + } + else flags |= NLHRF_NODUMPSEND; + + if (pRoot != nullptr) { + ptrW text(json_write(pRoot)); + pData = mir_utf8encodeW(text); + dataLength = (int)mir_strlen(pData); + + AddHeader("Content-Type", "application/json"); + } + + m_pFunc = pFunc; + requestType = iRequestType; + m_iErrorCode = 0; + m_iReqNum = ::InterlockedIncrement(&g_reqNum); +} + +JsonReply::JsonReply(NETLIBHTTPREQUEST *pReply) +{ + if (pReply == nullptr) { + m_errorCode = 500; + return; + } + + m_errorCode = pReply->resultCode; + + m_root = json_parse(pReply->pData); + if (m_root == nullptr) + m_errorCode = 500; +} + +JsonReply::~JsonReply() +{ + json_delete(m_root); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::ServerThread(void*) +{ + m_szAccessToken = getStringA("AccessToken"); + m_hAPIConnection = nullptr; + m_bTerminated = false; + + debugLogA("CDiscordProto::WorkerThread: %s", "entering"); + + if (m_szAccessToken != nullptr) + RetrieveMyInfo(); // try to receive a response from server + else { + if (mir_wstrlen(m_wszEmail) == 0) { + ConnectionFailed(LOGINERR_BADUSERID); + return; + } + + ptrW wszPassword(getWStringA(DB_KEY_PASSWORD)); + if (wszPassword == nullptr) { + ConnectionFailed(LOGINERR_WRONGPASSWORD); + return; + } + + JSONNode root; root << WCHAR_PARAM("email", m_wszEmail) << WCHAR_PARAM("password", wszPassword); + Push(new AsyncHttpRequest(this, REQUEST_POST, "/auth/login", &CDiscordProto::OnReceiveToken, &root)); + } + + while (true) { + WaitForSingleObject(m_evRequestsQueue, 1000); + if (m_bTerminated) + break; + + AsyncHttpRequest *pReq; + bool need_sleep = false; + while (true) { + { + mir_cslock lck(m_csHttpQueue); + if (m_arHttpQueue.getCount() == 0) + break; + + pReq = m_arHttpQueue[0]; + m_arHttpQueue.remove(0); + need_sleep = (m_arHttpQueue.getCount() > 1); + } + if (m_bTerminated) + break; + ExecuteRequest(pReq); + if (need_sleep) { + Sleep(330); + debugLogA("CDiscordProto::WorkerThread: %s", "need to sleep"); + } + } + } + + m_hWorkerThread = nullptr; + if (m_hAPIConnection) { + Netlib_CloseHandle(m_hAPIConnection); + m_hAPIConnection = nullptr; + } + + debugLogA("CDiscordProto::WorkerThread: %s", "leaving"); +} diff --git a/protocols/Discord/src/main.cpp b/protocols/Discord/src/main.cpp index c615047d00..98f0b120de 100644 --- a/protocols/Discord/src/main.cpp +++ b/protocols/Discord/src/main.cpp @@ -1,71 +1,71 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -CMPlugin g_plugin; - -///////////////////////////////////////////////////////////////////////////////////////// - -PLUGININFOEX pluginInfoEx = { - sizeof(PLUGININFOEX), - __PLUGIN_NAME, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - __DESCRIPTION, - __AUTHOR, - __COPYRIGHT, - __AUTHORWEB, - UNICODE_AWARE, - // {88928401-2CE8-4568-AAA7-226141870CBF} - { 0x88928401, 0x2ce8, 0x4568, { 0xaa, 0xa7, 0x22, 0x61, 0x41, 0x87, 0x0c, 0xbf } } -}; - -CMPlugin::CMPlugin() : - ACCPROTOPLUGIN("Discord", pluginInfoEx) -{ - SetUniqueId(DB_KEY_ID); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Interface information - -extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; - -///////////////////////////////////////////////////////////////////////////////////////// -// Load - -IconItem g_iconList[] = -{ - { LPGEN("Main icon"), "main", IDI_MAIN }, - { LPGEN("Group chats"), "groupchat", IDI_GROUPCHAT }, - { LPGEN("Call"), "voicecall", IDI_VOICE_CALL }, - { LPGEN("Call ended"), "voiceend", IDI_VOICE_ENDED } -}; - -static int OnModulesLoaded(WPARAM, LPARAM) -{ - g_plugin.bVoiceService = ServiceExists(MS_VOICESERVICE_REGISTER); - return 0; -} - -int CMPlugin::Load() -{ - HookEvent(ME_SYSTEM_MODULESLOADED, &OnModulesLoaded); - - g_plugin.registerIcon("Protocols/Discord", g_iconList); - return 0; -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +CMPlugin g_plugin; + +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + // {88928401-2CE8-4568-AAA7-226141870CBF} + { 0x88928401, 0x2ce8, 0x4568, { 0xaa, 0xa7, 0x22, 0x61, 0x41, 0x87, 0x0c, 0xbf } } +}; + +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("Discord", pluginInfoEx) +{ + SetUniqueId(DB_KEY_ID); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Interface information + +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; + +///////////////////////////////////////////////////////////////////////////////////////// +// Load + +IconItem g_iconList[] = +{ + { LPGEN("Main icon"), "main", IDI_MAIN }, + { LPGEN("Group chats"), "groupchat", IDI_GROUPCHAT }, + { LPGEN("Call"), "voicecall", IDI_VOICE_CALL }, + { LPGEN("Call ended"), "voiceend", IDI_VOICE_ENDED } +}; + +static int OnModulesLoaded(WPARAM, LPARAM) +{ + g_plugin.bVoiceService = ServiceExists(MS_VOICESERVICE_REGISTER); + return 0; +} + +int CMPlugin::Load() +{ + HookEvent(ME_SYSTEM_MODULESLOADED, &OnModulesLoaded); + + g_plugin.registerIcon("Protocols/Discord", g_iconList); + return 0; +} diff --git a/protocols/Discord/src/menus.cpp b/protocols/Discord/src/menus.cpp index e88d91aa43..cc928221f3 100644 --- a/protocols/Discord/src/menus.cpp +++ b/protocols/Discord/src/menus.cpp @@ -1,172 +1,172 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -INT_PTR CDiscordProto::OnMenuCopyId(WPARAM hContact, LPARAM) -{ - CopyId(CMStringW(FORMAT, L"%s#%d", getMStringW(hContact, DB_KEY_NICK).c_str(), getDword(hContact, DB_KEY_DISCR))); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::OnMenuCreateChannel(WPARAM hContact, LPARAM) -{ - ENTER_STRING es = { m_szModuleName, "channel_name", TranslateT("Enter channel name"), nullptr, ESF_COMBO, 5 }; - if (EnterString(&es)) { - JSONNode roles(JSON_ARRAY); roles.set_name("permission_overwrites"); - JSONNode root; root << INT_PARAM("type", 0) << WCHAR_PARAM("name", es.ptszResult) << roles; - CMStringA szUrl(FORMAT, "/guilds/%lld/channels", getId(hContact, DB_KEY_CHANNELID)); - Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr, &root)); - mir_free(es.ptszResult); - } - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::OnMenuJoinGuild(WPARAM, LPARAM) -{ - ENTER_STRING es = { m_szModuleName, "guild_name", TranslateT("Enter invitation code you received"), nullptr, ESF_COMBO, 5 }; - if (EnterString(&es)) { - CMStringA szUrl(FORMAT, "/invite/%S", es.ptszResult); - Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr)); - mir_free(es.ptszResult); - } - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::OnMenuLeaveGuild(WPARAM hContact, LPARAM) -{ - if (IDYES == MessageBox(nullptr, TranslateT("Do you really want to leave the guild?"), m_tszUserName, MB_ICONQUESTION | MB_YESNOCANCEL)) { - CMStringA szUrl(FORMAT, "/users/@me/guilds/%lld", getId(hContact, DB_KEY_CHANNELID)); - Push(new AsyncHttpRequest(this, REQUEST_DELETE, szUrl, nullptr)); - } - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::OnMenuLoadHistory(WPARAM hContact, LPARAM) -{ - auto *pUser = FindUser(getId(hContact, DB_KEY_ID)); - if (pUser) { - RetrieveHistory(pUser, MSG_AFTER, 0, 100); - delSetting(hContact, DB_KEY_LASTMSGID); - } - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::OnMenuToggleSync(WPARAM hContact, LPARAM) -{ - bool bEnabled = !getBool(hContact, "EnableSync"); - setByte(hContact, "EnableSync", bEnabled); - - if (bEnabled) - if (auto *pGuild = FindGuild(getId(hContact, DB_KEY_CHANNELID))) - GatewaySendGuildInfo(pGuild); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int CDiscordProto::OnMenuPrebuild(WPARAM hContact, LPARAM) -{ - // "Leave guild" menu item should be visible only for the guild contacts - bool bIsGuild = getByte(hContact, "ChatRoom") == 2; - Menu_ShowItem(m_hMenuLeaveGuild, bIsGuild); - Menu_ShowItem(m_hMenuCreateChannel, bIsGuild); - Menu_ShowItem(m_hMenuToggleSync, bIsGuild); - - if (!bIsGuild && getWord(hContact, "ApparentMode") != 0) - Menu_ShowItem(GetMenuItem(PROTO_MENU_REQ_AUTH), true); - - if (getByte(hContact, "EnableSync")) - Menu_ModifyItem(m_hMenuToggleSync, LPGENW("Disable sync"), Skin_GetIconHandle(SKINICON_CHAT_LEAVE)); - else - Menu_ModifyItem(m_hMenuToggleSync, LPGENW("Enable sync"), Skin_GetIconHandle(SKINICON_CHAT_JOIN)); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Protocol menu items - -void CDiscordProto::OnBuildProtoMenu() -{ - CMenuItem mi(&g_plugin); - mi.root = Menu_GetProtocolRoot(this); - mi.flags = CMIF_UNMOVABLE; - - mi.pszService = "/JoinGuild"; - CreateProtoService(mi.pszService, &CDiscordProto::OnMenuJoinGuild); - mi.name.a = LPGEN("Join guild"); - mi.position = 200001; - mi.hIcolibItem = g_iconList[1].hIcolib; - Menu_AddProtoMenuItem(&mi, m_szModuleName); - - mi.pszService = "/CopyId"; - CreateProtoService(mi.pszService, &CDiscordProto::OnMenuCopyId); - mi.name.a = LPGEN("Copy my Discord ID"); - mi.position = 200002; - mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERONLINE); - Menu_AddProtoMenuItem(&mi, m_szModuleName); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Contact menu items - -void CDiscordProto::InitMenus() -{ - CMenuItem mi(&g_plugin); - mi.pszService = "/LeaveGuild"; - CreateProtoService(mi.pszService, &CDiscordProto::OnMenuLeaveGuild); - SET_UID(mi, 0x6EF11AD6, 0x6111, 0x4E29, 0xBA, 0x8B, 0xA7, 0xB2, 0xE0, 0x22, 0xE1, 0x8C); - mi.name.a = LPGEN("Leave guild"); - mi.position = -200001000; - mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_LEAVE); - m_hMenuLeaveGuild = Menu_AddContactMenuItem(&mi, m_szModuleName); - - mi.pszService = "/CreateChannel"; - CreateProtoService(mi.pszService, &CDiscordProto::OnMenuCreateChannel); - SET_UID(mi, 0x6EF11AD6, 0x6111, 0x4E29, 0xBA, 0x8B, 0xA7, 0xB2, 0xE0, 0x22, 0xE1, 0x8D); - mi.name.a = LPGEN("Create new channel"); - mi.position = -200001001; - mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_ADDCONTACT); - m_hMenuCreateChannel = Menu_AddContactMenuItem(&mi, m_szModuleName); - - SET_UID(mi, 0x6EF11AD6, 0x6111, 0x4E29, 0xBA, 0x8B, 0xA7, 0xB2, 0xE0, 0x22, 0xE1, 0x8E); - mi.pszService = "/CopyId"; - mi.name.a = LPGEN("Copy ID"); - mi.position = -200001002; - mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERONLINE); - Menu_AddContactMenuItem(&mi, m_szModuleName); - - mi.pszService = "/ToggleSync"; - CreateProtoService(mi.pszService, &CDiscordProto::OnMenuToggleSync); - SET_UID(mi, 0x6EF11AD6, 0x6111, 0x4E29, 0xBA, 0x8B, 0xA7, 0xB2, 0xE0, 0x22, 0xE1, 0x8F); - mi.name.a = LPGEN("Enable guild sync"); - mi.position = -200001003; - mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN); - m_hMenuToggleSync = Menu_AddContactMenuItem(&mi, m_szModuleName); - - HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CDiscordProto::OnMenuPrebuild); -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +INT_PTR CDiscordProto::OnMenuCopyId(WPARAM hContact, LPARAM) +{ + CopyId(CMStringW(FORMAT, L"%s#%d", getMStringW(hContact, DB_KEY_NICK).c_str(), getDword(hContact, DB_KEY_DISCR))); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::OnMenuCreateChannel(WPARAM hContact, LPARAM) +{ + ENTER_STRING es = { m_szModuleName, "channel_name", TranslateT("Enter channel name"), nullptr, ESF_COMBO, 5 }; + if (EnterString(&es)) { + JSONNode roles(JSON_ARRAY); roles.set_name("permission_overwrites"); + JSONNode root; root << INT_PARAM("type", 0) << WCHAR_PARAM("name", es.ptszResult) << roles; + CMStringA szUrl(FORMAT, "/guilds/%lld/channels", getId(hContact, DB_KEY_CHANNELID)); + Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr, &root)); + mir_free(es.ptszResult); + } + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::OnMenuJoinGuild(WPARAM, LPARAM) +{ + ENTER_STRING es = { m_szModuleName, "guild_name", TranslateT("Enter invitation code you received"), nullptr, ESF_COMBO, 5 }; + if (EnterString(&es)) { + CMStringA szUrl(FORMAT, "/invite/%S", es.ptszResult); + Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr)); + mir_free(es.ptszResult); + } + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::OnMenuLeaveGuild(WPARAM hContact, LPARAM) +{ + if (IDYES == MessageBox(nullptr, TranslateT("Do you really want to leave the guild?"), m_tszUserName, MB_ICONQUESTION | MB_YESNOCANCEL)) { + CMStringA szUrl(FORMAT, "/users/@me/guilds/%lld", getId(hContact, DB_KEY_CHANNELID)); + Push(new AsyncHttpRequest(this, REQUEST_DELETE, szUrl, nullptr)); + } + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::OnMenuLoadHistory(WPARAM hContact, LPARAM) +{ + auto *pUser = FindUser(getId(hContact, DB_KEY_ID)); + if (pUser) { + RetrieveHistory(pUser, MSG_AFTER, 0, 100); + delSetting(hContact, DB_KEY_LASTMSGID); + } + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::OnMenuToggleSync(WPARAM hContact, LPARAM) +{ + bool bEnabled = !getBool(hContact, "EnableSync"); + setByte(hContact, "EnableSync", bEnabled); + + if (bEnabled) + if (auto *pGuild = FindGuild(getId(hContact, DB_KEY_CHANNELID))) + GatewaySendGuildInfo(pGuild); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int CDiscordProto::OnMenuPrebuild(WPARAM hContact, LPARAM) +{ + // "Leave guild" menu item should be visible only for the guild contacts + bool bIsGuild = getByte(hContact, "ChatRoom") == 2; + Menu_ShowItem(m_hMenuLeaveGuild, bIsGuild); + Menu_ShowItem(m_hMenuCreateChannel, bIsGuild); + Menu_ShowItem(m_hMenuToggleSync, bIsGuild); + + if (!bIsGuild && getWord(hContact, "ApparentMode") != 0) + Menu_ShowItem(GetMenuItem(PROTO_MENU_REQ_AUTH), true); + + if (getByte(hContact, "EnableSync")) + Menu_ModifyItem(m_hMenuToggleSync, LPGENW("Disable sync"), Skin_GetIconHandle(SKINICON_CHAT_LEAVE)); + else + Menu_ModifyItem(m_hMenuToggleSync, LPGENW("Enable sync"), Skin_GetIconHandle(SKINICON_CHAT_JOIN)); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Protocol menu items + +void CDiscordProto::OnBuildProtoMenu() +{ + CMenuItem mi(&g_plugin); + mi.root = Menu_GetProtocolRoot(this); + mi.flags = CMIF_UNMOVABLE; + + mi.pszService = "/JoinGuild"; + CreateProtoService(mi.pszService, &CDiscordProto::OnMenuJoinGuild); + mi.name.a = LPGEN("Join guild"); + mi.position = 200001; + mi.hIcolibItem = g_iconList[1].hIcolib; + Menu_AddProtoMenuItem(&mi, m_szModuleName); + + mi.pszService = "/CopyId"; + CreateProtoService(mi.pszService, &CDiscordProto::OnMenuCopyId); + mi.name.a = LPGEN("Copy my Discord ID"); + mi.position = 200002; + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERONLINE); + Menu_AddProtoMenuItem(&mi, m_szModuleName); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Contact menu items + +void CDiscordProto::InitMenus() +{ + CMenuItem mi(&g_plugin); + mi.pszService = "/LeaveGuild"; + CreateProtoService(mi.pszService, &CDiscordProto::OnMenuLeaveGuild); + SET_UID(mi, 0x6EF11AD6, 0x6111, 0x4E29, 0xBA, 0x8B, 0xA7, 0xB2, 0xE0, 0x22, 0xE1, 0x8C); + mi.name.a = LPGEN("Leave guild"); + mi.position = -200001000; + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_LEAVE); + m_hMenuLeaveGuild = Menu_AddContactMenuItem(&mi, m_szModuleName); + + mi.pszService = "/CreateChannel"; + CreateProtoService(mi.pszService, &CDiscordProto::OnMenuCreateChannel); + SET_UID(mi, 0x6EF11AD6, 0x6111, 0x4E29, 0xBA, 0x8B, 0xA7, 0xB2, 0xE0, 0x22, 0xE1, 0x8D); + mi.name.a = LPGEN("Create new channel"); + mi.position = -200001001; + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_ADDCONTACT); + m_hMenuCreateChannel = Menu_AddContactMenuItem(&mi, m_szModuleName); + + SET_UID(mi, 0x6EF11AD6, 0x6111, 0x4E29, 0xBA, 0x8B, 0xA7, 0xB2, 0xE0, 0x22, 0xE1, 0x8E); + mi.pszService = "/CopyId"; + mi.name.a = LPGEN("Copy ID"); + mi.position = -200001002; + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERONLINE); + Menu_AddContactMenuItem(&mi, m_szModuleName); + + mi.pszService = "/ToggleSync"; + CreateProtoService(mi.pszService, &CDiscordProto::OnMenuToggleSync); + SET_UID(mi, 0x6EF11AD6, 0x6111, 0x4E29, 0xBA, 0x8B, 0xA7, 0xB2, 0xE0, 0x22, 0xE1, 0x8F); + mi.name.a = LPGEN("Enable guild sync"); + mi.position = -200001003; + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN); + m_hMenuToggleSync = Menu_AddContactMenuItem(&mi, m_szModuleName); + + HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CDiscordProto::OnMenuPrebuild); +} diff --git a/protocols/Discord/src/options.cpp b/protocols/Discord/src/options.cpp index 86f3519df8..3ced623311 100644 --- a/protocols/Discord/src/options.cpp +++ b/protocols/Discord/src/options.cpp @@ -1,100 +1,100 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -///////////////////////////////////////////////////////////////////////////////////////// - -class CDiscardAccountOptions : public CProtoDlgBase -{ - CCtrlCheck chkUseChats, chkHideChats, chkUseGroups, chkDeleteMsgs; - CCtrlEdit m_edGroup, m_edUserName, m_edPassword; - ptrW m_wszOldGroup; - -public: - CDiscardAccountOptions(CDiscordProto *ppro, int iDlgID, bool bFullDlg) : - CProtoDlgBase(ppro, iDlgID), - m_edGroup(this, IDC_GROUP), - m_edUserName(this, IDC_USERNAME), - m_edPassword(this, IDC_PASSWORD), - chkUseChats(this, IDC_USEGUILDS), - chkHideChats(this, IDC_HIDECHATS), - chkUseGroups(this, IDC_USEGROUPS), - chkDeleteMsgs(this, IDC_DELETE_MSGS), - m_wszOldGroup(mir_wstrdup(ppro->m_wszDefaultGroup)) - { - CreateLink(m_edGroup, ppro->m_wszDefaultGroup); - CreateLink(m_edUserName, ppro->m_wszEmail); - if (bFullDlg) { - CreateLink(chkUseChats, ppro->m_bUseGroupchats); - CreateLink(chkHideChats, ppro->m_bHideGroupchats); - CreateLink(chkUseGroups, ppro->m_bUseGuildGroups); - CreateLink(chkDeleteMsgs, ppro->m_bSyncDeleteMsgs); - - chkUseChats.OnChange = Callback(this, &CDiscardAccountOptions::onChange_GroupChats); - } - } - - bool OnInitDialog() override - { - ptrW buf(m_proto->getWStringA(DB_KEY_PASSWORD)); - if (buf) - m_edPassword.SetText(buf); - return true; - } - - bool OnApply() override - { - if (mir_wstrcmp(m_proto->m_wszDefaultGroup, m_wszOldGroup)) - Clist_GroupCreate(0, m_proto->m_wszDefaultGroup); - - ptrW buf(m_edPassword.GetText()); - m_proto->setWString(DB_KEY_PASSWORD, buf); - return true; - } - - void onChange_GroupChats(CCtrlCheck*) - { - bool bEnabled = chkUseChats.GetState(); - chkHideChats.Enable(bEnabled); - chkUseGroups.Enable(bEnabled); - } -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::SvcCreateAccMgrUI(WPARAM, LPARAM hwndParent) -{ - CDiscardAccountOptions *pDlg = new CDiscardAccountOptions(this, IDD_OPTIONS_ACCMGR, false); - pDlg->SetParent((HWND)hwndParent); - pDlg->Create(); - return (INT_PTR)pDlg->GetHwnd(); -} - -int CDiscordProto::OnOptionsInit(WPARAM wParam, LPARAM) -{ - OPTIONSDIALOGPAGE odp = {}; - odp.szTitle.w = m_tszUserName; - odp.flags = ODPF_UNICODE; - odp.szGroup.w = LPGENW("Network"); - - odp.position = 1; - odp.szTab.w = LPGENW("Account"); - odp.pDialog = new CDiscardAccountOptions(this, IDD_OPTIONS_ACCOUNT, true); - g_plugin.addOptions(wParam, &odp); - return 0; -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +///////////////////////////////////////////////////////////////////////////////////////// + +class CDiscardAccountOptions : public CProtoDlgBase +{ + CCtrlCheck chkUseChats, chkHideChats, chkUseGroups, chkDeleteMsgs; + CCtrlEdit m_edGroup, m_edUserName, m_edPassword; + ptrW m_wszOldGroup; + +public: + CDiscardAccountOptions(CDiscordProto *ppro, int iDlgID, bool bFullDlg) : + CProtoDlgBase(ppro, iDlgID), + m_edGroup(this, IDC_GROUP), + m_edUserName(this, IDC_USERNAME), + m_edPassword(this, IDC_PASSWORD), + chkUseChats(this, IDC_USEGUILDS), + chkHideChats(this, IDC_HIDECHATS), + chkUseGroups(this, IDC_USEGROUPS), + chkDeleteMsgs(this, IDC_DELETE_MSGS), + m_wszOldGroup(mir_wstrdup(ppro->m_wszDefaultGroup)) + { + CreateLink(m_edGroup, ppro->m_wszDefaultGroup); + CreateLink(m_edUserName, ppro->m_wszEmail); + if (bFullDlg) { + CreateLink(chkUseChats, ppro->m_bUseGroupchats); + CreateLink(chkHideChats, ppro->m_bHideGroupchats); + CreateLink(chkUseGroups, ppro->m_bUseGuildGroups); + CreateLink(chkDeleteMsgs, ppro->m_bSyncDeleteMsgs); + + chkUseChats.OnChange = Callback(this, &CDiscardAccountOptions::onChange_GroupChats); + } + } + + bool OnInitDialog() override + { + ptrW buf(m_proto->getWStringA(DB_KEY_PASSWORD)); + if (buf) + m_edPassword.SetText(buf); + return true; + } + + bool OnApply() override + { + if (mir_wstrcmp(m_proto->m_wszDefaultGroup, m_wszOldGroup)) + Clist_GroupCreate(0, m_proto->m_wszDefaultGroup); + + ptrW buf(m_edPassword.GetText()); + m_proto->setWString(DB_KEY_PASSWORD, buf); + return true; + } + + void onChange_GroupChats(CCtrlCheck*) + { + bool bEnabled = chkUseChats.GetState(); + chkHideChats.Enable(bEnabled); + chkUseGroups.Enable(bEnabled); + } +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::SvcCreateAccMgrUI(WPARAM, LPARAM hwndParent) +{ + CDiscardAccountOptions *pDlg = new CDiscardAccountOptions(this, IDD_OPTIONS_ACCMGR, false); + pDlg->SetParent((HWND)hwndParent); + pDlg->Create(); + return (INT_PTR)pDlg->GetHwnd(); +} + +int CDiscordProto::OnOptionsInit(WPARAM wParam, LPARAM) +{ + OPTIONSDIALOGPAGE odp = {}; + odp.szTitle.w = m_tszUserName; + odp.flags = ODPF_UNICODE; + odp.szGroup.w = LPGENW("Network"); + + odp.position = 1; + odp.szTab.w = LPGENW("Account"); + odp.pDialog = new CDiscardAccountOptions(this, IDD_OPTIONS_ACCOUNT, true); + g_plugin.addOptions(wParam, &odp); + return 0; +} diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index 972c6ec312..2bd02f704d 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -1,768 +1,768 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -static int compareMessages(const COwnMessage *p1, const COwnMessage *p2) -{ - return compareInt64(p1->nonce, p2->nonce); -} - -static int compareRequests(const AsyncHttpRequest *p1, const AsyncHttpRequest *p2) -{ - return p1->m_iReqNum - p2->m_iReqNum; -} - -int compareUsers(const CDiscordUser *p1, const CDiscordUser *p2) -{ - return compareInt64(p1->id, p2->id); -} - -static int compareGuilds(const CDiscordGuild *p1, const CDiscordGuild *p2) -{ - return compareInt64(p1->id, p2->id); -} - -CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) : - PROTO(proto_name, username), - m_impl(*this), - m_arHttpQueue(10, compareRequests), - m_evRequestsQueue(CreateEvent(nullptr, FALSE, FALSE, nullptr)), - arUsers(10, compareUsers), - arGuilds(1, compareGuilds), - arMarkReadQueue(1, compareUsers), - arOwnMessages(1, compareMessages), - arVoiceCalls(1), - - m_wszEmail(this, "Email", L""), - m_wszDefaultGroup(this, "GroupName", DB_KEYVAL_GROUP), - m_bUseGroupchats(this, "UseGroupChats", true), - m_bHideGroupchats(this, "HideChats", true), - m_bUseGuildGroups(this, "UseGuildGroups", false), - m_bSyncDeleteMsgs(this, "DeleteServerMsgs", true) -{ - // Services - CreateProtoService(PS_CREATEACCMGRUI, &CDiscordProto::SvcCreateAccMgrUI); - - CreateProtoService(PS_GETAVATARINFO, &CDiscordProto::GetAvatarInfo); - CreateProtoService(PS_GETAVATARCAPS, &CDiscordProto::GetAvatarCaps); - CreateProtoService(PS_GETMYAVATAR, &CDiscordProto::GetMyAvatar); - CreateProtoService(PS_SETMYAVATAR, &CDiscordProto::SetMyAvatar); - - CreateProtoService(PS_MENU_REQAUTH, &CDiscordProto::RequestFriendship); - CreateProtoService(PS_MENU_LOADHISTORY, &CDiscordProto::OnMenuLoadHistory); - - CreateProtoService(PS_VOICE_CAPS, &CDiscordProto::VoiceCaps); - - // Events - HookProtoEvent(ME_OPT_INITIALISE, &CDiscordProto::OnOptionsInit); - HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CDiscordProto::OnDbEventRead); - HookProtoEvent(ME_PROTO_ACCLISTCHANGED, &CDiscordProto::OnAccountChanged); - - HookProtoEvent(PE_VOICE_CALL_STATE, &CDiscordProto::OnVoiceState); - - // database - db_set_resident(m_szModuleName, "XStatusMsg"); - - // custom events - DBEVENTTYPEDESCR dbEventType = {}; - dbEventType.module = m_szModuleName; - dbEventType.flags = DETF_HISTORY | DETF_MSGWINDOW; - - dbEventType.eventType = EVENT_INCOMING_CALL; - dbEventType.descr = Translate("Incoming call"); - dbEventType.eventIcon = g_plugin.getIconHandle(IDI_VOICE_CALL); - DbEvent_RegisterType(&dbEventType); - - dbEventType.eventType = EVENT_CALL_FINISHED; - dbEventType.descr = Translate("Call ended"); - dbEventType.eventIcon = g_plugin.getIconHandle(IDI_VOICE_ENDED); - DbEvent_RegisterType(&dbEventType); - - // Groupchat initialization - GCREGISTER gcr = {}; - gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR; - gcr.ptszDispName = m_tszUserName; - gcr.pszModule = m_szModuleName; - Chat_Register(&gcr); - - // Network initialization - CMStringW descr; - NETLIBUSER nlu = {}; - - nlu.szSettingsModule = m_szModuleName; - nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; - descr.Format(TranslateT("%s server connection"), m_tszUserName); - nlu.szDescriptiveName.w = descr.GetBuffer(); - m_hNetlibUser = Netlib_RegisterUser(&nlu); - - CMStringA module(FORMAT, "%s.Gateway", m_szModuleName); - nlu.szSettingsModule = module.GetBuffer(); - nlu.flags = NUF_OUTGOING | NUF_UNICODE; - descr.Format(TranslateT("%s gateway connection"), m_tszUserName); - nlu.szDescriptiveName.w = descr.GetBuffer(); - m_hGatewayNetlibUser = Netlib_RegisterUser(&nlu); -} - -CDiscordProto::~CDiscordProto() -{ - debugLogA("CDiscordProto::~CDiscordProto"); - - for (auto &msg : m_wszStatusMsg) - mir_free(msg); - - arUsers.destroy(); - - m_arHttpQueue.destroy(); - ::CloseHandle(m_evRequestsQueue); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::OnModulesLoaded() -{ - std::vector lostIds; - - // Fill users list - for (auto &hContact : AccContacts()) { - CDiscordUser *pNew = new CDiscordUser(getId(hContact, DB_KEY_ID)); - pNew->hContact = hContact; - pNew->lastMsgId = getId(hContact, DB_KEY_LASTMSGID); - pNew->wszUsername = ptrW(getWStringA(hContact, DB_KEY_NICK)); - pNew->iDiscriminator = getDword(hContact, DB_KEY_DISCR); - - // set EnableSync = 1 by default for all existing guilds - switch (getByte(hContact, "ChatRoom")) { - case 2: // guild - delSetting(hContact, DB_KEY_CHANNELID); - if (getDword(hContact, "EnableSync", -1) == -1) - setDword(hContact, "EnableSync", 1); - break; - - case 1: // group chat - pNew->channelId = getId(hContact, DB_KEY_CHANNELID); - if (!pNew->channelId) { - lostIds.push_back(hContact); - delete pNew; - continue; - } - break; - - default: - pNew->channelId = getId(hContact, DB_KEY_CHANNELID); - break; - } - arUsers.insert(pNew); - } - - for (auto &hContact: lostIds) - db_delete_contact(hContact); - - // Clist - Clist_GroupCreate(0, m_wszDefaultGroup); - - HookProtoEvent(ME_GC_EVENT, &CDiscordProto::GroupchatEventHook); - HookProtoEvent(ME_GC_BUILDMENU, &CDiscordProto::GroupchatMenuHook); - - InitMenus(); - - // Voice support - if (g_plugin.bVoiceService) { - VOICE_MODULE voice = {}; - voice.cbSize = sizeof(voice); - voice.name = m_szModuleName; - voice.description = TranslateT("Discord voice call"); - voice.icon = m_hProtoIcon; - voice.flags = VOICE_CAPS_CALL_CONTACT | VOICE_CAPS_VOICE; - CallService(MS_VOICESERVICE_REGISTER, (WPARAM)&voice, 0); - } -} - -void CDiscordProto::OnShutdown() -{ - debugLogA("CDiscordProto::OnPreShutdown"); - - m_bTerminated = true; - SetEvent(m_evRequestsQueue); - - for (auto &it : arGuilds) - it->SaveToFile(); - - if (m_hGatewayConnection) - Netlib_Shutdown(m_hGatewayConnection); - - if (g_plugin.bVoiceService) - CallService(MS_VOICESERVICE_UNREGISTER, (WPARAM)m_szModuleName, 0); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::GetCaps(int type, MCONTACT) -{ - switch (type) { - case PFLAGNUM_1: - return PF1_IM | PF1_MODEMSG | PF1_MODEMSGRECV | PF1_SERVERCLIST | PF1_BASICSEARCH | PF1_EXTSEARCH | PF1_ADDSEARCHRES | PF1_FILESEND; - case PFLAGNUM_2: - return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_INVISIBLE; - case PFLAGNUM_3: - return PF2_ONLINE | PF2_LONGAWAY | PF2_HEAVYDND | PF2_INVISIBLE; - case PFLAGNUM_4: - return PF4_FORCEAUTH | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_SUPPORTIDLE | PF4_AVATARS | PF4_IMSENDOFFLINE | PF4_SERVERMSGID | PF4_OFFLINEFILES; - case PFLAG_UNIQUEIDTEXT: - return (INT_PTR)TranslateT("User ID"); - } - return 0; -} - -int CDiscordProto::SetStatus(int iNewStatus) -{ - debugLogA("CDiscordProto::SetStatus iNewStatus = %d, m_iStatus = %d, m_iDesiredStatus = %d m_hWorkerThread = %p", iNewStatus, m_iStatus, m_iDesiredStatus, m_hWorkerThread); - - if (iNewStatus == m_iStatus) - return 0; - - m_iDesiredStatus = iNewStatus; - int iOldStatus = m_iStatus; - - // go offline - if (iNewStatus == ID_STATUS_OFFLINE) { - if (m_bOnline) { - SetServerStatus(ID_STATUS_OFFLINE); - ShutdownSession(); - } - m_iStatus = m_iDesiredStatus; - setAllContactStatuses(ID_STATUS_OFFLINE, false); - - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); - } - // not logged in? come on - else if (m_hWorkerThread == nullptr && !IsStatusConnecting(m_iStatus)) { - m_iStatus = ID_STATUS_CONNECTING; - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); - m_hWorkerThread = ForkThreadEx(&CDiscordProto::ServerThread, nullptr, nullptr); - } - else if (m_bOnline) { - debugLogA("setting server online status to %d", iNewStatus); - SetServerStatus(iNewStatus); - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static INT_PTR CALLBACK AdvancedSearchDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM) -{ - switch (msg) { - case WM_INITDIALOG: - TranslateDialogDefault(hwndDlg); - SetFocus(GetDlgItem(hwndDlg, IDC_NICK)); - return TRUE; - - case WM_COMMAND: - if (HIWORD(wParam) == EN_SETFOCUS) - PostMessage(GetParent(hwndDlg), WM_COMMAND, MAKEWPARAM(0, EN_SETFOCUS), (LPARAM)hwndDlg); - } - return FALSE; -} - -HWND CDiscordProto::CreateExtendedSearchUI(HWND hwndParent) -{ - if (hwndParent) - return CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_EXTSEARCH), hwndParent, AdvancedSearchDlgProc, 0); - - return nullptr; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::SearchThread(void *param) -{ - Sleep(100); - - PROTOSEARCHRESULT psr = { 0 }; - psr.cbSize = sizeof(psr); - psr.flags = PSR_UNICODE; - psr.nick.w = (wchar_t*)param; - psr.firstName.w = L""; - psr.lastName.w = L""; - psr.id.w = L""; - ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)&psr); - - ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0); - mir_free(param); -} - -HWND CDiscordProto::SearchAdvanced(HWND hwndDlg) -{ - if (!m_bOnline || !IsWindow(hwndDlg)) - return nullptr; - - wchar_t wszNick[200]; - GetDlgItemTextW(hwndDlg, IDC_NICK, wszNick, _countof(wszNick)); - if (wszNick[0] == 0) // empty string? reject - return nullptr; - - wchar_t *p = wcschr(wszNick, '#'); - if (p == nullptr) // wrong user id - return nullptr; - - ForkThread(&CDiscordProto::SearchThread, mir_wstrdup(wszNick)); - return (HWND)1; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Basic search - by SnowFlake - -void CDiscordProto::OnReceiveUserinfo(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) -{ - JsonReply root(pReply); - if (!root) { - ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE)1); - return; - } - - auto &data = root.data(); - CMStringW wszUserId(data["username"].as_mstring() + L"#" + data["discriminator"].as_mstring()); - ForkThread(&CDiscordProto::SearchThread, wszUserId.Detach()); -} - -HANDLE CDiscordProto::SearchBasic(const wchar_t *wszId) -{ - if (!m_bOnline) - return nullptr; - - CMStringA szUrl = "/users/"; - szUrl.AppendFormat(ptrA(mir_utf8encodeW(wszId))); - Push(new AsyncHttpRequest(this, REQUEST_GET, szUrl, &CDiscordProto::OnReceiveUserinfo)); - return (HANDLE)1; // Success -} - -//////////////////////////////////////////////////////////////////////////////////////// -// Authorization - -int CDiscordProto::AuthRequest(MCONTACT hContact, const wchar_t*) -{ - ptrW wszUsername(getWStringA(hContact, DB_KEY_NICK)); - int iDiscriminator(getDword(hContact, DB_KEY_DISCR, -1)); - if (wszUsername == nullptr || iDiscriminator == -1) - return 1; // error - - JSONNode root; root << WCHAR_PARAM("username", wszUsername) << INT_PARAM("discriminator", iDiscriminator); - Push(new AsyncHttpRequest(this, REQUEST_POST, "/users/@me/relationships", nullptr, &root)); - return 0; -} - -int CDiscordProto::AuthRecv(MCONTACT, PROTORECVEVENT *pre) -{ - return Proto_AuthRecv(m_szModuleName, pre); -} - -int CDiscordProto::Authorize(MEVENT hDbEvent) -{ - DB::EventInfo dbei; - dbei.cbBlob = -1; - if (db_event_get(hDbEvent, &dbei)) return 1; - if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1; - if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1; - - JSONNode root; - MCONTACT hContact = DbGetAuthEventContact(&dbei); - CMStringA szUrl(FORMAT, "/users/@me/relationships/%lld", getId(hContact, DB_KEY_ID)); - Push(new AsyncHttpRequest(this, REQUEST_PUT, szUrl, nullptr, &root)); - return 0; -} - -int CDiscordProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) -{ - DB::EventInfo dbei; - dbei.cbBlob = -1; - if (db_event_get(hDbEvent, &dbei)) return 1; - if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1; - if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1; - - MCONTACT hContact = DbGetAuthEventContact(&dbei); - RemoveFriend(getId(hContact, DB_KEY_ID)); - return 0; -} - -//////////////////////////////////////////////////////////////////////////////////////// - -MCONTACT CDiscordProto::AddToList(int flags, PROTOSEARCHRESULT *psr) -{ - if (mir_wstrlen(psr->nick.w) == 0) - return 0; - - wchar_t *p = wcschr(psr->nick.w, '#'); - if (p == nullptr) - return 0; - - MCONTACT hContact = db_add_contact(); - Proto_AddToContact(hContact, m_szModuleName); - if (flags & PALF_TEMPORARY) - Contact::RemoveFromList(hContact); - - *p = 0; - CDiscordUser *pUser = new CDiscordUser(0); - pUser->hContact = hContact; - pUser->wszUsername = psr->nick.w; - pUser->iDiscriminator = _wtoi(p + 1); - *p = '#'; - - if (mir_wstrlen(psr->id.w)) { - pUser->id = _wtoi64(psr->id.w); - setId(hContact, DB_KEY_ID, pUser->id); - } - - Clist_SetGroup(hContact, m_wszDefaultGroup); - setWString(hContact, DB_KEY_NICK, pUser->wszUsername); - setDword(hContact, DB_KEY_DISCR, pUser->iDiscriminator); - arUsers.insert(pUser); - - return hContact; -} - -MCONTACT CDiscordProto::AddToListByEvent(int flags, int, MEVENT hDbEvent) -{ - DB::EventInfo dbei; - dbei.cbBlob = -1; - if (db_event_get(hDbEvent, &dbei)) - return 0; - if (mir_strcmp(dbei.szModule, m_szModuleName)) - return 0; - if (dbei.eventType != EVENTTYPE_AUTHREQUEST) - return 0; - - DB::AUTH_BLOB blob(dbei.pBlob); - if (flags & PALF_TEMPORARY) - Contact::RemoveFromList(blob.get_contact()); - else - Contact::PutOnList(blob.get_contact()); - return blob.get_contact(); -} - -//////////////////////////////////////////////////////////////////////////////////////// -// SendMsg - -void CDiscordProto::OnSendMsg(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq) -{ - JsonReply root(pReply); - if (!root) { - int iReqNum = -1; - for (auto &it : arOwnMessages) - if (it->reqId == pReq->m_iReqNum) { - iReqNum = it->reqId; - arOwnMessages.removeItem(&it); - break; - } - - if (iReqNum != -1) { - CMStringW wszErrorMsg(root.data()["message"].as_mstring()); - if (wszErrorMsg.IsEmpty()) - wszErrorMsg = TranslateT("Message send failed"); - ProtoBroadcastAck(pReq->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)iReqNum, (LPARAM)wszErrorMsg.c_str()); - } - } -} - -int CDiscordProto::SendMsg(MCONTACT hContact, int /*flags*/, const char *pszSrc) -{ - if (!m_bOnline) { - ProtoBroadcastAsync(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, (LPARAM)TranslateT("Protocol is offline or user isn't authorized yet")); - return 1; - } - - ptrW wszText(mir_utf8decodeW(pszSrc)); - if (wszText == nullptr) - return 0; - - CDiscordUser *pUser = FindUser(getId(hContact, DB_KEY_ID)); - if (pUser == nullptr || pUser->id == 0) - return 0; - - // no channel - we need to create one - if (pUser->channelId == 0) { - JSONNode list(JSON_ARRAY); list.set_name("recipients"); list << SINT64_PARAM("", pUser->id); - JSONNode body; body << list; - CMStringA szUrl(FORMAT, "/users/%lld/channels", m_ownId); - - // theoretically we get the same data from the gateway thread, but there could be a delay - // so we bind data analysis to the http packet reply - mir_cslock lck(m_csHttpQueue); - ExecuteRequest(new AsyncHttpRequest(this, REQUEST_POST, szUrl, &CDiscordProto::OnReceiveCreateChannel, &body)); - if (pUser->channelId == 0) - return 0; - } - - // we generate a random 64-bit integer and pass it to the server - // to distinguish our own messages from these generated by another clients - SnowFlake nonce; Utils_GetRandom(&nonce, sizeof(nonce)); nonce = abs(nonce); - JSONNode body; body << WCHAR_PARAM("content", wszText) << SINT64_PARAM("nonce", nonce); - - CMStringA szUrl(FORMAT, "/channels/%lld/messages", pUser->channelId); - AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, szUrl, &CDiscordProto::OnSendMsg, &body); - pReq->hContact = hContact; - arOwnMessages.insert(new COwnMessage(nonce, pReq->m_iReqNum)); - Push(pReq); - return pReq->m_iReqNum; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void __cdecl CDiscordProto::GetAwayMsgThread(void *param) -{ - Thread_SetName("Jabber: GetAwayMsgThread"); - - auto *pUser = (CDiscordUser *)param; - if (pUser == nullptr) - return; - - if (pUser->wszTopic.IsEmpty()) - ProtoBroadcastAck(pUser->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0); - else - ProtoBroadcastAck(pUser->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)pUser->wszTopic.c_str()); -} - -HANDLE CDiscordProto::GetAwayMsg(MCONTACT hContact) -{ - ForkThread(&CDiscordProto::GetAwayMsgThread, FindUser(getId(hContact, DB_KEY_ID))); - return (HANDLE)1; -} - -int CDiscordProto::SetAwayMsg(int iStatus, const wchar_t *msg) -{ - if (iStatus < ID_STATUS_MIN || iStatus > ID_STATUS_MAX) - return 0; - - wchar_t *&pwszMessage = m_wszStatusMsg[iStatus - ID_STATUS_MIN]; - if (!mir_wstrcmp(msg, pwszMessage)) - return 0; - - replaceStrW(pwszMessage, msg); - - if (m_bOnline) { - JSONNode status; status.set_name("custom_status"); status << WCHAR_PARAM("text", (msg) ? msg : L""); - JSONNode root; root << status; - Push(new AsyncHttpRequest(this, REQUEST_PATCH, "/users/@me/settings", nullptr, &root)); - } - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int CDiscordProto::UserIsTyping(MCONTACT hContact, int type) -{ - if (type == PROTOTYPE_SELFTYPING_ON) { - CMStringA szUrl(FORMAT, "/channels/%lld/typing", getId(hContact, DB_KEY_CHANNELID)); - Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr)); - } - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::OnReceiveMarkRead(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *) -{ - JsonReply root(pReply); - if (root) - SaveToken(root.data()); -} - -void CDiscordProto::SendMarkRead() -{ - mir_cslock lck(csMarkReadQueue); - while (arMarkReadQueue.getCount()) { - CDiscordUser *pUser = arMarkReadQueue[0]; - JSONNode payload; payload << CHAR_PARAM("token", m_szTempToken); - CMStringA szUrl(FORMAT, "/channels/%lld/messages/%lld/ack", pUser->channelId, pUser->lastMsgId); - auto *pReq = new AsyncHttpRequest(this, REQUEST_POST, szUrl, &CDiscordProto::OnReceiveMarkRead, &payload); - Push(pReq); - arMarkReadQueue.remove(0); - } -} - -int CDiscordProto::OnDbEventRead(WPARAM, LPARAM hDbEvent) -{ - MCONTACT hContact = db_event_getContact(hDbEvent); - if (!hContact) - return 0; - - // filter out only events of my protocol - const char *szProto = Proto_GetBaseAccountName(hContact); - if (mir_strcmp(szProto, m_szModuleName)) - return 0; - - if (m_bOnline) { - m_impl.m_markRead.Start(200); - - CDiscordUser *pUser = FindUser(getId(hContact, DB_KEY_ID)); - if (pUser != nullptr) { - mir_cslock lck(csMarkReadQueue); - if (arMarkReadQueue.indexOf(pUser) == -1) - arMarkReadQueue.insert(pUser); - } - } - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int CDiscordProto::OnAccountChanged(WPARAM iAction, LPARAM lParam) -{ - if (iAction == PRAC_ADDED) { - PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam; - if (pa && pa->ppro == this) { - m_bUseGroupchats = false; - m_bUseGuildGroups = true; - } - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::OnContactDeleted(MCONTACT hContact) -{ - CDiscordUser *pUser = FindUser(getId(hContact, DB_KEY_ID)); - if (pUser == nullptr || !m_bOnline) - return; - - if (pUser->channelId) - Push(new AsyncHttpRequest(this, REQUEST_DELETE, CMStringA(FORMAT, "/channels/%lld", pUser->channelId), nullptr)); - - if (pUser->id) - RemoveFriend(pUser->id); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CDiscordProto::RequestFriendship(WPARAM hContact, LPARAM) -{ - AuthRequest(hContact, 0); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -struct SendFileThreadParam -{ - MCONTACT hContact; - CMStringW wszDescr, wszFileName; - - SendFileThreadParam(MCONTACT _p1, LPCWSTR _p2, LPCWSTR _p3) : - hContact(_p1), - wszFileName(_p2), - wszDescr(_p3) - {} -}; - -void CDiscordProto::SendFileThread(void *param) -{ - SendFileThreadParam *p = (SendFileThreadParam*)param; - - FILE *in = _wfopen(p->wszFileName, L"rb"); - if (in == nullptr) { - debugLogA("cannot open file %S for reading", p->wszFileName.c_str()); - LBL_Error: - ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, param); - delete p; - return; - } - - ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, param); - - char szRandom[16], szRandomText[33]; - Utils_GetRandom(szRandom, _countof(szRandom)); - bin2hex(szRandom, _countof(szRandom), szRandomText); - CMStringA szBoundary(FORMAT, "----Boundary%s", szRandomText); - - CMStringA szUrl(FORMAT, "/channels/%lld/messages", getId(p->hContact, DB_KEY_CHANNELID)); - AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, szUrl, &CDiscordProto::OnReceiveFile); - pReq->AddHeader("Content-Type", CMStringA("multipart/form-data; boundary=" + szBoundary)); - pReq->AddHeader("Accept", "*/*"); - - szBoundary.Insert(0, "--"); - - CMStringA szBody; - szBody.Append(szBoundary + "\r\n"); - szBody.Append("Content-Disposition: form-data; name=\"content\"\r\n\r\n"); - szBody.Append(ptrA(mir_utf8encodeW(p->wszDescr))); - szBody.Append("\r\n"); - - szBody.Append(szBoundary + "\r\n"); - szBody.Append("Content-Disposition: form-data; name=\"tts\"\r\n\r\nfalse\r\n"); - - wchar_t *pFileName = wcsrchr(p->wszFileName.GetBuffer(), '\\'); - if (pFileName != nullptr) - pFileName++; - else - pFileName = p->wszFileName.GetBuffer(); - - szBody.Append(szBoundary + "\r\n"); - szBody.AppendFormat("Content-Disposition: form-data; name=\"file\"; filename=\"%s\"\r\n", ptrA(mir_utf8encodeW(pFileName)).get()); - szBody.AppendFormat("Content-Type: %S\r\n", ProtoGetAvatarMimeType(ProtoGetAvatarFileFormat(p->wszFileName))); - szBody.Append("\r\n"); - - size_t cbBytes = filelength(fileno(in)); - - szBoundary.Insert(0, "\r\n"); - szBoundary.Append("--\r\n"); - pReq->dataLength = int(szBody.GetLength() + szBoundary.GetLength() + cbBytes); - pReq->pData = (char*)mir_alloc(pReq->dataLength+1); - memcpy(pReq->pData, szBody.c_str(), szBody.GetLength()); - size_t cbRead = fread(pReq->pData + szBody.GetLength(), 1, cbBytes, in); - fclose(in); - if (cbBytes != cbRead) { - debugLogA("cannot read file %S: %d bytes read instead of %d", p->wszFileName.c_str(), cbRead, cbBytes); - delete pReq; - goto LBL_Error; - } - - memcpy(pReq->pData + szBody.GetLength() + cbBytes, szBoundary, szBoundary.GetLength()); - pReq->pUserInfo = p; - Push(pReq); - - ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, param); -} - -void CDiscordProto::OnReceiveFile(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq) -{ - SendFileThreadParam *p = (SendFileThreadParam*)pReq->pUserInfo; - if (pReply->resultCode != 200) { - ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, p); - debugLogA("CDiscordProto::SendFile failed: %d", pReply->resultCode); - } - else { - ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, p); - debugLogA("CDiscordProto::SendFile succeeded"); - } - - delete p; -} - -HANDLE CDiscordProto::SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) -{ - SnowFlake id = getId(hContact, DB_KEY_CHANNELID); - if (id == 0) - return nullptr; - - // we don't wanna block the main thread, right? - SendFileThreadParam *param = new SendFileThreadParam(hContact, ppszFiles[0], szDescription); - ForkThread(&CDiscordProto::SendFileThread, param); - return param; -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +static int compareMessages(const COwnMessage *p1, const COwnMessage *p2) +{ + return compareInt64(p1->nonce, p2->nonce); +} + +static int compareRequests(const AsyncHttpRequest *p1, const AsyncHttpRequest *p2) +{ + return p1->m_iReqNum - p2->m_iReqNum; +} + +int compareUsers(const CDiscordUser *p1, const CDiscordUser *p2) +{ + return compareInt64(p1->id, p2->id); +} + +static int compareGuilds(const CDiscordGuild *p1, const CDiscordGuild *p2) +{ + return compareInt64(p1->id, p2->id); +} + +CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) : + PROTO(proto_name, username), + m_impl(*this), + m_arHttpQueue(10, compareRequests), + m_evRequestsQueue(CreateEvent(nullptr, FALSE, FALSE, nullptr)), + arUsers(10, compareUsers), + arGuilds(1, compareGuilds), + arMarkReadQueue(1, compareUsers), + arOwnMessages(1, compareMessages), + arVoiceCalls(1), + + m_wszEmail(this, "Email", L""), + m_wszDefaultGroup(this, "GroupName", DB_KEYVAL_GROUP), + m_bUseGroupchats(this, "UseGroupChats", true), + m_bHideGroupchats(this, "HideChats", true), + m_bUseGuildGroups(this, "UseGuildGroups", false), + m_bSyncDeleteMsgs(this, "DeleteServerMsgs", true) +{ + // Services + CreateProtoService(PS_CREATEACCMGRUI, &CDiscordProto::SvcCreateAccMgrUI); + + CreateProtoService(PS_GETAVATARINFO, &CDiscordProto::GetAvatarInfo); + CreateProtoService(PS_GETAVATARCAPS, &CDiscordProto::GetAvatarCaps); + CreateProtoService(PS_GETMYAVATAR, &CDiscordProto::GetMyAvatar); + CreateProtoService(PS_SETMYAVATAR, &CDiscordProto::SetMyAvatar); + + CreateProtoService(PS_MENU_REQAUTH, &CDiscordProto::RequestFriendship); + CreateProtoService(PS_MENU_LOADHISTORY, &CDiscordProto::OnMenuLoadHistory); + + CreateProtoService(PS_VOICE_CAPS, &CDiscordProto::VoiceCaps); + + // Events + HookProtoEvent(ME_OPT_INITIALISE, &CDiscordProto::OnOptionsInit); + HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CDiscordProto::OnDbEventRead); + HookProtoEvent(ME_PROTO_ACCLISTCHANGED, &CDiscordProto::OnAccountChanged); + + HookProtoEvent(PE_VOICE_CALL_STATE, &CDiscordProto::OnVoiceState); + + // database + db_set_resident(m_szModuleName, "XStatusMsg"); + + // custom events + DBEVENTTYPEDESCR dbEventType = {}; + dbEventType.module = m_szModuleName; + dbEventType.flags = DETF_HISTORY | DETF_MSGWINDOW; + + dbEventType.eventType = EVENT_INCOMING_CALL; + dbEventType.descr = Translate("Incoming call"); + dbEventType.eventIcon = g_plugin.getIconHandle(IDI_VOICE_CALL); + DbEvent_RegisterType(&dbEventType); + + dbEventType.eventType = EVENT_CALL_FINISHED; + dbEventType.descr = Translate("Call ended"); + dbEventType.eventIcon = g_plugin.getIconHandle(IDI_VOICE_ENDED); + DbEvent_RegisterType(&dbEventType); + + // Groupchat initialization + GCREGISTER gcr = {}; + gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR; + gcr.ptszDispName = m_tszUserName; + gcr.pszModule = m_szModuleName; + Chat_Register(&gcr); + + // Network initialization + CMStringW descr; + NETLIBUSER nlu = {}; + + nlu.szSettingsModule = m_szModuleName; + nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; + descr.Format(TranslateT("%s server connection"), m_tszUserName); + nlu.szDescriptiveName.w = descr.GetBuffer(); + m_hNetlibUser = Netlib_RegisterUser(&nlu); + + CMStringA module(FORMAT, "%s.Gateway", m_szModuleName); + nlu.szSettingsModule = module.GetBuffer(); + nlu.flags = NUF_OUTGOING | NUF_UNICODE; + descr.Format(TranslateT("%s gateway connection"), m_tszUserName); + nlu.szDescriptiveName.w = descr.GetBuffer(); + m_hGatewayNetlibUser = Netlib_RegisterUser(&nlu); +} + +CDiscordProto::~CDiscordProto() +{ + debugLogA("CDiscordProto::~CDiscordProto"); + + for (auto &msg : m_wszStatusMsg) + mir_free(msg); + + arUsers.destroy(); + + m_arHttpQueue.destroy(); + ::CloseHandle(m_evRequestsQueue); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::OnModulesLoaded() +{ + std::vector lostIds; + + // Fill users list + for (auto &hContact : AccContacts()) { + CDiscordUser *pNew = new CDiscordUser(getId(hContact, DB_KEY_ID)); + pNew->hContact = hContact; + pNew->lastMsgId = getId(hContact, DB_KEY_LASTMSGID); + pNew->wszUsername = ptrW(getWStringA(hContact, DB_KEY_NICK)); + pNew->iDiscriminator = getDword(hContact, DB_KEY_DISCR); + + // set EnableSync = 1 by default for all existing guilds + switch (getByte(hContact, "ChatRoom")) { + case 2: // guild + delSetting(hContact, DB_KEY_CHANNELID); + if (getDword(hContact, "EnableSync", -1) == -1) + setDword(hContact, "EnableSync", 1); + break; + + case 1: // group chat + pNew->channelId = getId(hContact, DB_KEY_CHANNELID); + if (!pNew->channelId) { + lostIds.push_back(hContact); + delete pNew; + continue; + } + break; + + default: + pNew->channelId = getId(hContact, DB_KEY_CHANNELID); + break; + } + arUsers.insert(pNew); + } + + for (auto &hContact: lostIds) + db_delete_contact(hContact); + + // Clist + Clist_GroupCreate(0, m_wszDefaultGroup); + + HookProtoEvent(ME_GC_EVENT, &CDiscordProto::GroupchatEventHook); + HookProtoEvent(ME_GC_BUILDMENU, &CDiscordProto::GroupchatMenuHook); + + InitMenus(); + + // Voice support + if (g_plugin.bVoiceService) { + VOICE_MODULE voice = {}; + voice.cbSize = sizeof(voice); + voice.name = m_szModuleName; + voice.description = TranslateT("Discord voice call"); + voice.icon = m_hProtoIcon; + voice.flags = VOICE_CAPS_CALL_CONTACT | VOICE_CAPS_VOICE; + CallService(MS_VOICESERVICE_REGISTER, (WPARAM)&voice, 0); + } +} + +void CDiscordProto::OnShutdown() +{ + debugLogA("CDiscordProto::OnPreShutdown"); + + m_bTerminated = true; + SetEvent(m_evRequestsQueue); + + for (auto &it : arGuilds) + it->SaveToFile(); + + if (m_hGatewayConnection) + Netlib_Shutdown(m_hGatewayConnection); + + if (g_plugin.bVoiceService) + CallService(MS_VOICESERVICE_UNREGISTER, (WPARAM)m_szModuleName, 0); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::GetCaps(int type, MCONTACT) +{ + switch (type) { + case PFLAGNUM_1: + return PF1_IM | PF1_MODEMSG | PF1_MODEMSGRECV | PF1_SERVERCLIST | PF1_BASICSEARCH | PF1_EXTSEARCH | PF1_ADDSEARCHRES | PF1_FILESEND; + case PFLAGNUM_2: + return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_INVISIBLE; + case PFLAGNUM_3: + return PF2_ONLINE | PF2_LONGAWAY | PF2_HEAVYDND | PF2_INVISIBLE; + case PFLAGNUM_4: + return PF4_FORCEAUTH | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_SUPPORTIDLE | PF4_AVATARS | PF4_IMSENDOFFLINE | PF4_SERVERMSGID | PF4_OFFLINEFILES; + case PFLAG_UNIQUEIDTEXT: + return (INT_PTR)TranslateT("User ID"); + } + return 0; +} + +int CDiscordProto::SetStatus(int iNewStatus) +{ + debugLogA("CDiscordProto::SetStatus iNewStatus = %d, m_iStatus = %d, m_iDesiredStatus = %d m_hWorkerThread = %p", iNewStatus, m_iStatus, m_iDesiredStatus, m_hWorkerThread); + + if (iNewStatus == m_iStatus) + return 0; + + m_iDesiredStatus = iNewStatus; + int iOldStatus = m_iStatus; + + // go offline + if (iNewStatus == ID_STATUS_OFFLINE) { + if (m_bOnline) { + SetServerStatus(ID_STATUS_OFFLINE); + ShutdownSession(); + } + m_iStatus = m_iDesiredStatus; + setAllContactStatuses(ID_STATUS_OFFLINE, false); + + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); + } + // not logged in? come on + else if (m_hWorkerThread == nullptr && !IsStatusConnecting(m_iStatus)) { + m_iStatus = ID_STATUS_CONNECTING; + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); + m_hWorkerThread = ForkThreadEx(&CDiscordProto::ServerThread, nullptr, nullptr); + } + else if (m_bOnline) { + debugLogA("setting server online status to %d", iNewStatus); + SetServerStatus(iNewStatus); + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static INT_PTR CALLBACK AdvancedSearchDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM) +{ + switch (msg) { + case WM_INITDIALOG: + TranslateDialogDefault(hwndDlg); + SetFocus(GetDlgItem(hwndDlg, IDC_NICK)); + return TRUE; + + case WM_COMMAND: + if (HIWORD(wParam) == EN_SETFOCUS) + PostMessage(GetParent(hwndDlg), WM_COMMAND, MAKEWPARAM(0, EN_SETFOCUS), (LPARAM)hwndDlg); + } + return FALSE; +} + +HWND CDiscordProto::CreateExtendedSearchUI(HWND hwndParent) +{ + if (hwndParent) + return CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_EXTSEARCH), hwndParent, AdvancedSearchDlgProc, 0); + + return nullptr; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::SearchThread(void *param) +{ + Sleep(100); + + PROTOSEARCHRESULT psr = { 0 }; + psr.cbSize = sizeof(psr); + psr.flags = PSR_UNICODE; + psr.nick.w = (wchar_t*)param; + psr.firstName.w = L""; + psr.lastName.w = L""; + psr.id.w = L""; + ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)&psr); + + ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0); + mir_free(param); +} + +HWND CDiscordProto::SearchAdvanced(HWND hwndDlg) +{ + if (!m_bOnline || !IsWindow(hwndDlg)) + return nullptr; + + wchar_t wszNick[200]; + GetDlgItemTextW(hwndDlg, IDC_NICK, wszNick, _countof(wszNick)); + if (wszNick[0] == 0) // empty string? reject + return nullptr; + + wchar_t *p = wcschr(wszNick, '#'); + if (p == nullptr) // wrong user id + return nullptr; + + ForkThread(&CDiscordProto::SearchThread, mir_wstrdup(wszNick)); + return (HWND)1; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Basic search - by SnowFlake + +void CDiscordProto::OnReceiveUserinfo(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) +{ + JsonReply root(pReply); + if (!root) { + ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE)1); + return; + } + + auto &data = root.data(); + CMStringW wszUserId(data["username"].as_mstring() + L"#" + data["discriminator"].as_mstring()); + ForkThread(&CDiscordProto::SearchThread, wszUserId.Detach()); +} + +HANDLE CDiscordProto::SearchBasic(const wchar_t *wszId) +{ + if (!m_bOnline) + return nullptr; + + CMStringA szUrl = "/users/"; + szUrl.AppendFormat(ptrA(mir_utf8encodeW(wszId))); + Push(new AsyncHttpRequest(this, REQUEST_GET, szUrl, &CDiscordProto::OnReceiveUserinfo)); + return (HANDLE)1; // Success +} + +//////////////////////////////////////////////////////////////////////////////////////// +// Authorization + +int CDiscordProto::AuthRequest(MCONTACT hContact, const wchar_t*) +{ + ptrW wszUsername(getWStringA(hContact, DB_KEY_NICK)); + int iDiscriminator(getDword(hContact, DB_KEY_DISCR, -1)); + if (wszUsername == nullptr || iDiscriminator == -1) + return 1; // error + + JSONNode root; root << WCHAR_PARAM("username", wszUsername) << INT_PARAM("discriminator", iDiscriminator); + Push(new AsyncHttpRequest(this, REQUEST_POST, "/users/@me/relationships", nullptr, &root)); + return 0; +} + +int CDiscordProto::AuthRecv(MCONTACT, PROTORECVEVENT *pre) +{ + return Proto_AuthRecv(m_szModuleName, pre); +} + +int CDiscordProto::Authorize(MEVENT hDbEvent) +{ + DB::EventInfo dbei; + dbei.cbBlob = -1; + if (db_event_get(hDbEvent, &dbei)) return 1; + if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1; + if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1; + + JSONNode root; + MCONTACT hContact = DbGetAuthEventContact(&dbei); + CMStringA szUrl(FORMAT, "/users/@me/relationships/%lld", getId(hContact, DB_KEY_ID)); + Push(new AsyncHttpRequest(this, REQUEST_PUT, szUrl, nullptr, &root)); + return 0; +} + +int CDiscordProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) +{ + DB::EventInfo dbei; + dbei.cbBlob = -1; + if (db_event_get(hDbEvent, &dbei)) return 1; + if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1; + if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1; + + MCONTACT hContact = DbGetAuthEventContact(&dbei); + RemoveFriend(getId(hContact, DB_KEY_ID)); + return 0; +} + +//////////////////////////////////////////////////////////////////////////////////////// + +MCONTACT CDiscordProto::AddToList(int flags, PROTOSEARCHRESULT *psr) +{ + if (mir_wstrlen(psr->nick.w) == 0) + return 0; + + wchar_t *p = wcschr(psr->nick.w, '#'); + if (p == nullptr) + return 0; + + MCONTACT hContact = db_add_contact(); + Proto_AddToContact(hContact, m_szModuleName); + if (flags & PALF_TEMPORARY) + Contact::RemoveFromList(hContact); + + *p = 0; + CDiscordUser *pUser = new CDiscordUser(0); + pUser->hContact = hContact; + pUser->wszUsername = psr->nick.w; + pUser->iDiscriminator = _wtoi(p + 1); + *p = '#'; + + if (mir_wstrlen(psr->id.w)) { + pUser->id = _wtoi64(psr->id.w); + setId(hContact, DB_KEY_ID, pUser->id); + } + + Clist_SetGroup(hContact, m_wszDefaultGroup); + setWString(hContact, DB_KEY_NICK, pUser->wszUsername); + setDword(hContact, DB_KEY_DISCR, pUser->iDiscriminator); + arUsers.insert(pUser); + + return hContact; +} + +MCONTACT CDiscordProto::AddToListByEvent(int flags, int, MEVENT hDbEvent) +{ + DB::EventInfo dbei; + dbei.cbBlob = -1; + if (db_event_get(hDbEvent, &dbei)) + return 0; + if (mir_strcmp(dbei.szModule, m_szModuleName)) + return 0; + if (dbei.eventType != EVENTTYPE_AUTHREQUEST) + return 0; + + DB::AUTH_BLOB blob(dbei.pBlob); + if (flags & PALF_TEMPORARY) + Contact::RemoveFromList(blob.get_contact()); + else + Contact::PutOnList(blob.get_contact()); + return blob.get_contact(); +} + +//////////////////////////////////////////////////////////////////////////////////////// +// SendMsg + +void CDiscordProto::OnSendMsg(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq) +{ + JsonReply root(pReply); + if (!root) { + int iReqNum = -1; + for (auto &it : arOwnMessages) + if (it->reqId == pReq->m_iReqNum) { + iReqNum = it->reqId; + arOwnMessages.removeItem(&it); + break; + } + + if (iReqNum != -1) { + CMStringW wszErrorMsg(root.data()["message"].as_mstring()); + if (wszErrorMsg.IsEmpty()) + wszErrorMsg = TranslateT("Message send failed"); + ProtoBroadcastAck(pReq->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)iReqNum, (LPARAM)wszErrorMsg.c_str()); + } + } +} + +int CDiscordProto::SendMsg(MCONTACT hContact, int /*flags*/, const char *pszSrc) +{ + if (!m_bOnline) { + ProtoBroadcastAsync(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, (LPARAM)TranslateT("Protocol is offline or user isn't authorized yet")); + return 1; + } + + ptrW wszText(mir_utf8decodeW(pszSrc)); + if (wszText == nullptr) + return 0; + + CDiscordUser *pUser = FindUser(getId(hContact, DB_KEY_ID)); + if (pUser == nullptr || pUser->id == 0) + return 0; + + // no channel - we need to create one + if (pUser->channelId == 0) { + JSONNode list(JSON_ARRAY); list.set_name("recipients"); list << SINT64_PARAM("", pUser->id); + JSONNode body; body << list; + CMStringA szUrl(FORMAT, "/users/%lld/channels", m_ownId); + + // theoretically we get the same data from the gateway thread, but there could be a delay + // so we bind data analysis to the http packet reply + mir_cslock lck(m_csHttpQueue); + ExecuteRequest(new AsyncHttpRequest(this, REQUEST_POST, szUrl, &CDiscordProto::OnReceiveCreateChannel, &body)); + if (pUser->channelId == 0) + return 0; + } + + // we generate a random 64-bit integer and pass it to the server + // to distinguish our own messages from these generated by another clients + SnowFlake nonce; Utils_GetRandom(&nonce, sizeof(nonce)); nonce = abs(nonce); + JSONNode body; body << WCHAR_PARAM("content", wszText) << SINT64_PARAM("nonce", nonce); + + CMStringA szUrl(FORMAT, "/channels/%lld/messages", pUser->channelId); + AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, szUrl, &CDiscordProto::OnSendMsg, &body); + pReq->hContact = hContact; + arOwnMessages.insert(new COwnMessage(nonce, pReq->m_iReqNum)); + Push(pReq); + return pReq->m_iReqNum; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void __cdecl CDiscordProto::GetAwayMsgThread(void *param) +{ + Thread_SetName("Jabber: GetAwayMsgThread"); + + auto *pUser = (CDiscordUser *)param; + if (pUser == nullptr) + return; + + if (pUser->wszTopic.IsEmpty()) + ProtoBroadcastAck(pUser->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0); + else + ProtoBroadcastAck(pUser->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)pUser->wszTopic.c_str()); +} + +HANDLE CDiscordProto::GetAwayMsg(MCONTACT hContact) +{ + ForkThread(&CDiscordProto::GetAwayMsgThread, FindUser(getId(hContact, DB_KEY_ID))); + return (HANDLE)1; +} + +int CDiscordProto::SetAwayMsg(int iStatus, const wchar_t *msg) +{ + if (iStatus < ID_STATUS_MIN || iStatus > ID_STATUS_MAX) + return 0; + + wchar_t *&pwszMessage = m_wszStatusMsg[iStatus - ID_STATUS_MIN]; + if (!mir_wstrcmp(msg, pwszMessage)) + return 0; + + replaceStrW(pwszMessage, msg); + + if (m_bOnline) { + JSONNode status; status.set_name("custom_status"); status << WCHAR_PARAM("text", (msg) ? msg : L""); + JSONNode root; root << status; + Push(new AsyncHttpRequest(this, REQUEST_PATCH, "/users/@me/settings", nullptr, &root)); + } + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int CDiscordProto::UserIsTyping(MCONTACT hContact, int type) +{ + if (type == PROTOTYPE_SELFTYPING_ON) { + CMStringA szUrl(FORMAT, "/channels/%lld/typing", getId(hContact, DB_KEY_CHANNELID)); + Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr)); + } + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::OnReceiveMarkRead(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *) +{ + JsonReply root(pReply); + if (root) + SaveToken(root.data()); +} + +void CDiscordProto::SendMarkRead() +{ + mir_cslock lck(csMarkReadQueue); + while (arMarkReadQueue.getCount()) { + CDiscordUser *pUser = arMarkReadQueue[0]; + JSONNode payload; payload << CHAR_PARAM("token", m_szTempToken); + CMStringA szUrl(FORMAT, "/channels/%lld/messages/%lld/ack", pUser->channelId, pUser->lastMsgId); + auto *pReq = new AsyncHttpRequest(this, REQUEST_POST, szUrl, &CDiscordProto::OnReceiveMarkRead, &payload); + Push(pReq); + arMarkReadQueue.remove(0); + } +} + +int CDiscordProto::OnDbEventRead(WPARAM, LPARAM hDbEvent) +{ + MCONTACT hContact = db_event_getContact(hDbEvent); + if (!hContact) + return 0; + + // filter out only events of my protocol + const char *szProto = Proto_GetBaseAccountName(hContact); + if (mir_strcmp(szProto, m_szModuleName)) + return 0; + + if (m_bOnline) { + m_impl.m_markRead.Start(200); + + CDiscordUser *pUser = FindUser(getId(hContact, DB_KEY_ID)); + if (pUser != nullptr) { + mir_cslock lck(csMarkReadQueue); + if (arMarkReadQueue.indexOf(pUser) == -1) + arMarkReadQueue.insert(pUser); + } + } + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int CDiscordProto::OnAccountChanged(WPARAM iAction, LPARAM lParam) +{ + if (iAction == PRAC_ADDED) { + PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam; + if (pa && pa->ppro == this) { + m_bUseGroupchats = false; + m_bUseGuildGroups = true; + } + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::OnContactDeleted(MCONTACT hContact) +{ + CDiscordUser *pUser = FindUser(getId(hContact, DB_KEY_ID)); + if (pUser == nullptr || !m_bOnline) + return; + + if (pUser->channelId) + Push(new AsyncHttpRequest(this, REQUEST_DELETE, CMStringA(FORMAT, "/channels/%lld", pUser->channelId), nullptr)); + + if (pUser->id) + RemoveFriend(pUser->id); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CDiscordProto::RequestFriendship(WPARAM hContact, LPARAM) +{ + AuthRequest(hContact, 0); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +struct SendFileThreadParam +{ + MCONTACT hContact; + CMStringW wszDescr, wszFileName; + + SendFileThreadParam(MCONTACT _p1, LPCWSTR _p2, LPCWSTR _p3) : + hContact(_p1), + wszFileName(_p2), + wszDescr(_p3) + {} +}; + +void CDiscordProto::SendFileThread(void *param) +{ + SendFileThreadParam *p = (SendFileThreadParam*)param; + + FILE *in = _wfopen(p->wszFileName, L"rb"); + if (in == nullptr) { + debugLogA("cannot open file %S for reading", p->wszFileName.c_str()); + LBL_Error: + ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, param); + delete p; + return; + } + + ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, param); + + char szRandom[16], szRandomText[33]; + Utils_GetRandom(szRandom, _countof(szRandom)); + bin2hex(szRandom, _countof(szRandom), szRandomText); + CMStringA szBoundary(FORMAT, "----Boundary%s", szRandomText); + + CMStringA szUrl(FORMAT, "/channels/%lld/messages", getId(p->hContact, DB_KEY_CHANNELID)); + AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, szUrl, &CDiscordProto::OnReceiveFile); + pReq->AddHeader("Content-Type", CMStringA("multipart/form-data; boundary=" + szBoundary)); + pReq->AddHeader("Accept", "*/*"); + + szBoundary.Insert(0, "--"); + + CMStringA szBody; + szBody.Append(szBoundary + "\r\n"); + szBody.Append("Content-Disposition: form-data; name=\"content\"\r\n\r\n"); + szBody.Append(ptrA(mir_utf8encodeW(p->wszDescr))); + szBody.Append("\r\n"); + + szBody.Append(szBoundary + "\r\n"); + szBody.Append("Content-Disposition: form-data; name=\"tts\"\r\n\r\nfalse\r\n"); + + wchar_t *pFileName = wcsrchr(p->wszFileName.GetBuffer(), '\\'); + if (pFileName != nullptr) + pFileName++; + else + pFileName = p->wszFileName.GetBuffer(); + + szBody.Append(szBoundary + "\r\n"); + szBody.AppendFormat("Content-Disposition: form-data; name=\"file\"; filename=\"%s\"\r\n", ptrA(mir_utf8encodeW(pFileName)).get()); + szBody.AppendFormat("Content-Type: %S\r\n", ProtoGetAvatarMimeType(ProtoGetAvatarFileFormat(p->wszFileName))); + szBody.Append("\r\n"); + + size_t cbBytes = filelength(fileno(in)); + + szBoundary.Insert(0, "\r\n"); + szBoundary.Append("--\r\n"); + pReq->dataLength = int(szBody.GetLength() + szBoundary.GetLength() + cbBytes); + pReq->pData = (char*)mir_alloc(pReq->dataLength+1); + memcpy(pReq->pData, szBody.c_str(), szBody.GetLength()); + size_t cbRead = fread(pReq->pData + szBody.GetLength(), 1, cbBytes, in); + fclose(in); + if (cbBytes != cbRead) { + debugLogA("cannot read file %S: %d bytes read instead of %d", p->wszFileName.c_str(), cbRead, cbBytes); + delete pReq; + goto LBL_Error; + } + + memcpy(pReq->pData + szBody.GetLength() + cbBytes, szBoundary, szBoundary.GetLength()); + pReq->pUserInfo = p; + Push(pReq); + + ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, param); +} + +void CDiscordProto::OnReceiveFile(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq) +{ + SendFileThreadParam *p = (SendFileThreadParam*)pReq->pUserInfo; + if (pReply->resultCode != 200) { + ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, p); + debugLogA("CDiscordProto::SendFile failed: %d", pReply->resultCode); + } + else { + ProtoBroadcastAck(p->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, p); + debugLogA("CDiscordProto::SendFile succeeded"); + } + + delete p; +} + +HANDLE CDiscordProto::SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) +{ + SnowFlake id = getId(hContact, DB_KEY_CHANNELID); + if (id == 0) + return nullptr; + + // we don't wanna block the main thread, right? + SendFileThreadParam *param = new SendFileThreadParam(hContact, ppszFiles[0], szDescription); + ForkThread(&CDiscordProto::SendFileThread, param); + return param; +} diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h index bf3929fd55..b5262f4e0a 100644 --- a/protocols/Discord/src/proto.h +++ b/protocols/Discord/src/proto.h @@ -1,476 +1,476 @@ -#pragma once - -#define EVENT_INCOMING_CALL 10001 -#define EVENT_CALL_FINISHED 10002 - -typedef __int64 SnowFlake; - -__forceinline int compareInt64(const SnowFlake i1, const SnowFlake i2) -{ - return (i1 == i2) ? 0 : (i1 < i2) ? -1 : 1; -} - -class CDiscordProto; -typedef void (CDiscordProto::*GatewayHandlerFunc)(const JSONNode&); - -struct AsyncHttpRequest : public MTHttpRequest -{ - AsyncHttpRequest(CDiscordProto*, int iRequestType, LPCSTR szUrl, MTHttpRequestHandler pFunc, JSONNode *pNode = nullptr); - - int m_iErrorCode, m_iReqNum; - bool m_bMainSite; - MCONTACT hContact; -}; - -class JsonReply -{ - JSONNode *m_root = nullptr; - int m_errorCode = 0; - -public: - JsonReply(NETLIBHTTPREQUEST *); - ~JsonReply(); - - __forceinline int error() const { return m_errorCode; } - __forceinline JSONNode& data() const { return *m_root; } - __forceinline operator bool() const { return m_errorCode == 200; } -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -struct CDiscordRole : public MZeroedObject -{ - SnowFlake id; - COLORREF color; - uint32_t permissions; - int position; - CMStringW wszName; -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -struct COwnMessage -{ - SnowFlake nonce; - int reqId; - - COwnMessage(SnowFlake _id, int _reqId) : - nonce(_id), - reqId(_reqId) - {} -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -enum CDiscordHistoryOp -{ - MSG_NOFILTER, MSG_AFTER, MSG_BEFORE -}; - -struct CDiscordUser : public MZeroedObject -{ - CDiscordUser(SnowFlake _id) : - id(_id) - {} - - ~CDiscordUser(); - - SnowFlake id; - MCONTACT hContact; - - SnowFlake channelId; - SnowFlake lastReadId, lastMsgId; - SnowFlake parentId; - bool bIsPrivate; - bool bIsGroup; - bool bSynced; - - struct CDiscordGuild *pGuild; - - CMStringW wszUsername, wszChannelName, wszTopic; - int iDiscriminator; -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -struct CDiscordGuildMember : public MZeroedObject -{ - CDiscordGuildMember(SnowFlake id) : - userId(id) - {} - - ~CDiscordGuildMember() - {} - - SnowFlake userId; - CMStringW wszDiscordId, wszNick, wszRole; - int iStatus; -}; - -struct CDiscordGuild : public MZeroedObject -{ - CDiscordGuild(SnowFlake _id); - ~CDiscordGuild(); - - __forceinline CDiscordGuildMember* FindUser(SnowFlake userId) - { - return arChatUsers.find((CDiscordGuildMember *)&userId); - } - - __inline CMStringW GetCacheFile() const - { - return CMStringW(FORMAT, L"%s\\DiscordCache\\%lld.json", VARSW(L"%miranda_userdata%").get(), id); - } - - SnowFlake id, ownerId; - CMStringW wszName; - MCONTACT hContact; - MGROUP groupId; - bool bSynced = false; - LIST arChannels; - - SESSION_INFO *pParentSi; - OBJLIST arChatUsers; - OBJLIST arRoles; // guild roles - - void LoadFromFile(); - void SaveToFile(); -}; - -struct CDiscordVoiceCall -{ - CMStringA szId; - SnowFlake channelId; - time_t startTime; -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -#define OPCODE_DISPATCH 0 -#define OPCODE_HEARTBEAT 1 -#define OPCODE_IDENTIFY 2 -#define OPCODE_STATUS_UPDATE 3 -#define OPCODE_VOICE_UPDATE 4 -#define OPCODE_VOICE_PING 5 -#define OPCODE_RESUME 6 -#define OPCODE_RECONNECT 7 -#define OPCODE_REQUEST_MEMBERS 8 -#define OPCODE_INVALID_SESSION 9 -#define OPCODE_HELLO 10 -#define OPCODE_HEARTBEAT_ACK 11 -#define OPCODE_REQUEST_SYNC 12 -#define OPCODE_REQUEST_SYNC_GROUP 13 -#define OPCODE_REQUEST_SYNC_CHANNEL 14 - -class CDiscordProto : public PROTO -{ - friend struct AsyncHttpRequest; - friend class CDiscardAccountOptions; - - class CDiscordProtoImpl - { - friend class CDiscordProto; - CDiscordProto &m_proto; - - CTimer m_heartBeat, m_markRead; - void OnHeartBeat(CTimer *) { - m_proto.GatewaySendHeartbeat(); - } - - void OnMarkRead(CTimer *pTimer) { - m_proto.SendMarkRead(); - pTimer->Stop(); - } - - CDiscordProtoImpl(CDiscordProto &pro) : - m_proto(pro), - m_markRead(Miranda_GetSystemWindow(), UINT_PTR(this)), - m_heartBeat(Miranda_GetSystemWindow(), UINT_PTR(this) + 1) - { - m_markRead.OnEvent = Callback(this, &CDiscordProtoImpl::OnMarkRead); - m_heartBeat.OnEvent = Callback(this, &CDiscordProtoImpl::OnHeartBeat); - } - } m_impl; - - ////////////////////////////////////////////////////////////////////////////////////// - // threads - - void __cdecl SendFileThread(void*); - void __cdecl ServerThread(void*); - void __cdecl SearchThread(void *param); - void __cdecl BatchChatCreate(void* param); - void __cdecl GetAwayMsgThread(void *param); - - ////////////////////////////////////////////////////////////////////////////////////// - // session control - - void ConnectionFailed(int iReason); - void ShutdownSession(void); - - wchar_t *m_wszStatusMsg[MAX_STATUS_COUNT]; - - ptrA m_szAccessToken, m_szTempToken; - - mir_cs m_csHttpQueue; - HANDLE m_evRequestsQueue; - LIST m_arHttpQueue; - - void ExecuteRequest(AsyncHttpRequest *pReq); - void Push(AsyncHttpRequest *pReq, int iTimeout = 10000); - void SaveToken(const JSONNode &data); - - HANDLE m_hWorkerThread; // worker thread handle - HNETLIBCONN m_hAPIConnection; // working connection - - bool - m_bOnline, // protocol is online - m_bTerminated; // Miranda's going down - - ////////////////////////////////////////////////////////////////////////////////////// - // gateway - - CMStringA - m_szGateway, // gateway url - m_szGatewaySessionId, // current session id - m_szCookie, // cookie used for all http queries - m_szWSCookie; // cookie used for establishing websocket connection - - HNETLIBUSER m_hGatewayNetlibUser; // the separate netlib user handle for gateways - HNETLIBCONN m_hGatewayConnection; // gateway connection - - void __cdecl GatewayThread(void*); - bool GatewayThreadWorker(void); - - bool GatewaySend(const JSONNode &pNode); - bool GatewayProcess(const JSONNode &pNode); - - void GatewaySendGuildInfo(CDiscordGuild *pGuild); - void GatewaySendHeartbeat(void); - void GatewaySendIdentify(void); - void GatewaySendResume(void); - bool GatewaySendStatus(int iStatus, const wchar_t *pwszStatusText); - - GatewayHandlerFunc GetHandler(const wchar_t*); - - int m_iHartbeatInterval; // in milliseconds - int m_iGatewaySeq; // gateway sequence number - - ////////////////////////////////////////////////////////////////////////////////////// - // options - - CMOption m_wszEmail; // my own email - CMOption m_wszDefaultGroup; // clist group to store contacts - CMOption m_bUseGroupchats; // Shall we connect Guilds at all? - CMOption m_bHideGroupchats; // Do not open chat windows on creation - CMOption m_bUseGuildGroups; // use special subgroups for guilds - CMOption m_bSyncDeleteMsgs; // delete messages from Miranda if they are deleted at the server - - ////////////////////////////////////////////////////////////////////////////////////// - // common data - - SnowFlake m_ownId; - - mir_cs csMarkReadQueue; - LIST arMarkReadQueue; - - OBJLIST arUsers; - OBJLIST arOwnMessages; - OBJLIST arVoiceCalls; - - CDiscordUser* FindUser(SnowFlake id); - CDiscordUser* FindUser(const wchar_t *pwszUsername, int iDiscriminator); - CDiscordUser* FindUserByChannel(SnowFlake channelId); - - void PreparePrivateChannel(const JSONNode &); - CDiscordUser* PrepareUser(const JSONNode &); - - ////////////////////////////////////////////////////////////////////////////////////// - // menu items - - void InitMenus(void); - - int __cdecl OnMenuPrebuild(WPARAM, LPARAM); - - INT_PTR __cdecl OnMenuCopyId(WPARAM, LPARAM); - INT_PTR __cdecl OnMenuCreateChannel(WPARAM, LPARAM); - INT_PTR __cdecl OnMenuJoinGuild(WPARAM, LPARAM); - INT_PTR __cdecl OnMenuLeaveGuild(WPARAM, LPARAM); - INT_PTR __cdecl OnMenuLoadHistory(WPARAM, LPARAM); - INT_PTR __cdecl OnMenuToggleSync(WPARAM, LPARAM); - - HGENMENU m_hMenuLeaveGuild, m_hMenuCreateChannel, m_hMenuToggleSync; - - ////////////////////////////////////////////////////////////////////////////////////// - // guilds - - OBJLIST arGuilds; - - __forceinline CDiscordGuild* FindGuild(SnowFlake id) const - { - return arGuilds.find((CDiscordGuild*)&id); - } - - void AddGuildUser(CDiscordGuild *guild, const CDiscordGuildMember &pUser); - void ProcessGuild(const JSONNode &json); - void ProcessPresence(const JSONNode &json); - void ProcessRole(CDiscordGuild *guild, const JSONNode &json); - void ProcessType(CDiscordUser *pUser, const JSONNode &json); - - CDiscordUser* ProcessGuildChannel(CDiscordGuild *guild, const JSONNode &json); - CDiscordGuildMember* ProcessGuildUser(CDiscordGuild *pGuild, const JSONNode &json, bool *bNew = nullptr); - - ////////////////////////////////////////////////////////////////////////////////////// - // group chats - - int __cdecl GroupchatEventHook(WPARAM, LPARAM); - int __cdecl GroupchatMenuHook(WPARAM, LPARAM); - - void Chat_SendPrivateMessage(GCHOOK *gch); - void Chat_ProcessLogMenu(GCHOOK *gch); - void Chat_ProcessNickMenu(GCHOOK* gch); - - void CreateChat(CDiscordGuild *pGuild, CDiscordUser *pUser); - void ProcessChatUser(CDiscordUser *pChat, const CMStringW &wszUserId, const JSONNode &pRoot); - void ParseSpecialChars(SESSION_INFO *si, CMStringW &str); - - ////////////////////////////////////////////////////////////////////////////////////// - // misc methods - - SnowFlake getId(const char *szName); - SnowFlake getId(MCONTACT hContact, const char *szName); - - void setId(const char *szName, SnowFlake iValue); - void setId(MCONTACT hContact, const char *szName, SnowFlake iValue); - -public: - CDiscordProto(const char*,const wchar_t*); - ~CDiscordProto(); - - ////////////////////////////////////////////////////////////////////////////////////// - // PROTO_INTERFACE - - INT_PTR GetCaps(int, MCONTACT = 0) override; - - HWND CreateExtendedSearchUI(HWND owner) override; - HWND SearchAdvanced(HWND owner) override; - - HANDLE SearchBasic(const wchar_t *id) override; - MCONTACT AddToList(int flags, PROTOSEARCHRESULT *psr) override; - MCONTACT AddToListByEvent(int flags, int, MEVENT hDbEvent) override; - - int AuthRecv(MCONTACT, PROTORECVEVENT *pre) override; - int Authorize(MEVENT hDbEvent) override; - int AuthDeny(MEVENT hDbEvent, const wchar_t* szReason) override; - int AuthRequest(MCONTACT hContact, const wchar_t*) override; - - HANDLE GetAwayMsg(MCONTACT hContact) override; - int SetAwayMsg(int iStatus, const wchar_t *msg) override; - - int SendMsg(MCONTACT hContact, int flags, const char *pszSrc) override; - - HANDLE SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) override; - - int UserIsTyping(MCONTACT hContact, int type) override; - - int SetStatus(int iNewStatus) override; - - void OnBuildProtoMenu() override; - void OnContactDeleted(MCONTACT) override; - void OnModulesLoaded() override; - void OnShutdown() override; - - ////////////////////////////////////////////////////////////////////////////////////// - // Services - - INT_PTR __cdecl RequestFriendship(WPARAM, LPARAM); - INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM); - - INT_PTR __cdecl GetAvatarCaps(WPARAM, LPARAM); - INT_PTR __cdecl GetAvatarInfo(WPARAM, LPARAM); - INT_PTR __cdecl GetMyAvatar(WPARAM, LPARAM); - INT_PTR __cdecl SetMyAvatar(WPARAM, LPARAM); - - INT_PTR __cdecl VoiceCaps(WPARAM, LPARAM); - - ////////////////////////////////////////////////////////////////////////////////////// - // Events - - int __cdecl OnOptionsInit(WPARAM, LPARAM); - int __cdecl OnAccountChanged(WPARAM, LPARAM); - int __cdecl OnDbEventRead(WPARAM, LPARAM); - - int __cdecl OnVoiceState(WPARAM, LPARAM); - - ////////////////////////////////////////////////////////////////////////////////////// - // dispatch commands - - void OnCommandCallCreated(const JSONNode &json); - void OnCommandCallDeleted(const JSONNode &json); - void OnCommandCallUpdated(const JSONNode &json); - void OnCommandChannelCreated(const JSONNode &json); - void OnCommandChannelDeleted(const JSONNode &json); - void OnCommandChannelUpdated(const JSONNode &json); - void OnCommandGuildCreated(const JSONNode &json); - void OnCommandGuildDeleted(const JSONNode &json); - void OnCommandGuildMemberAdded(const JSONNode &json); - void OnCommandGuildMemberListUpdate(const JSONNode &json); - void OnCommandGuildMemberRemoved(const JSONNode &json); - void OnCommandGuildMemberUpdated(const JSONNode &json); - void OnCommandFriendAdded(const JSONNode &json); - void OnCommandFriendRemoved(const JSONNode &json); - void OnCommandMessage(const JSONNode&, bool); - void OnCommandMessageCreate(const JSONNode &json); - void OnCommandMessageDelete(const JSONNode &json); - void OnCommandMessageUpdate(const JSONNode &json); - void OnCommandMessageAck(const JSONNode &json); - void OnCommandPresence(const JSONNode &json); - void OnCommandReady(const JSONNode &json); - void OnCommandRoleCreated(const JSONNode &json); - void OnCommandRoleDeleted(const JSONNode &json); - void OnCommandTyping(const JSONNode &json); - void OnCommandUserUpdate(const JSONNode &json); - void OnCommandUserSettingsUpdate(const JSONNode &json); - - void OnLoggedIn(); - void OnLoggedOut(); - - void OnReceiveCreateChannel(NETLIBHTTPREQUEST*, AsyncHttpRequest*); - void OnReceiveFile(NETLIBHTTPREQUEST*, AsyncHttpRequest*); - void OnReceiveGateway(NETLIBHTTPREQUEST*, AsyncHttpRequest*); - void OnReceiveMarkRead(NETLIBHTTPREQUEST *, AsyncHttpRequest *); - void OnReceiveMessageAck(NETLIBHTTPREQUEST*, AsyncHttpRequest*); - void OnReceiveToken(NETLIBHTTPREQUEST *, AsyncHttpRequest *); - void OnReceiveUserinfo(NETLIBHTTPREQUEST *, AsyncHttpRequest *); - - void RetrieveMyInfo(); - void OnReceiveMyInfo(NETLIBHTTPREQUEST*, AsyncHttpRequest*); - - void RetrieveHistory(CDiscordUser *pUser, CDiscordHistoryOp iOp = MSG_NOFILTER, SnowFlake msgid = 0, int iLimit = 50); - void OnReceiveHistory(NETLIBHTTPREQUEST*, AsyncHttpRequest*); - - bool RetrieveAvatar(MCONTACT hContact); - void OnReceiveAvatar(NETLIBHTTPREQUEST*, AsyncHttpRequest*); - - void OnSendMsg(NETLIBHTTPREQUEST*, AsyncHttpRequest*); - - ////////////////////////////////////////////////////////////////////////////////////// - // Misc - - void SendMarkRead(void); - void SetServerStatus(int iStatus); - void RemoveFriend(SnowFlake id); - - CMStringW GetAvatarFilename(MCONTACT hContact); - void CheckAvatarChange(MCONTACT hContact, const CMStringW &wszNewHash); -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -struct CMPlugin : public ACCPROTOPLUGIN -{ - CMPlugin(); - - bool bVoiceService = false; - - int Load() override; -}; +#pragma once + +#define EVENT_INCOMING_CALL 10001 +#define EVENT_CALL_FINISHED 10002 + +typedef __int64 SnowFlake; + +__forceinline int compareInt64(const SnowFlake i1, const SnowFlake i2) +{ + return (i1 == i2) ? 0 : (i1 < i2) ? -1 : 1; +} + +class CDiscordProto; +typedef void (CDiscordProto::*GatewayHandlerFunc)(const JSONNode&); + +struct AsyncHttpRequest : public MTHttpRequest +{ + AsyncHttpRequest(CDiscordProto*, int iRequestType, LPCSTR szUrl, MTHttpRequestHandler pFunc, JSONNode *pNode = nullptr); + + int m_iErrorCode, m_iReqNum; + bool m_bMainSite; + MCONTACT hContact; +}; + +class JsonReply +{ + JSONNode *m_root = nullptr; + int m_errorCode = 0; + +public: + JsonReply(NETLIBHTTPREQUEST *); + ~JsonReply(); + + __forceinline int error() const { return m_errorCode; } + __forceinline JSONNode& data() const { return *m_root; } + __forceinline operator bool() const { return m_errorCode == 200; } +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CDiscordRole : public MZeroedObject +{ + SnowFlake id; + COLORREF color; + uint32_t permissions; + int position; + CMStringW wszName; +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +struct COwnMessage +{ + SnowFlake nonce; + int reqId; + + COwnMessage(SnowFlake _id, int _reqId) : + nonce(_id), + reqId(_reqId) + {} +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +enum CDiscordHistoryOp +{ + MSG_NOFILTER, MSG_AFTER, MSG_BEFORE +}; + +struct CDiscordUser : public MZeroedObject +{ + CDiscordUser(SnowFlake _id) : + id(_id) + {} + + ~CDiscordUser(); + + SnowFlake id; + MCONTACT hContact; + + SnowFlake channelId; + SnowFlake lastReadId, lastMsgId; + SnowFlake parentId; + bool bIsPrivate; + bool bIsGroup; + bool bSynced; + + struct CDiscordGuild *pGuild; + + CMStringW wszUsername, wszChannelName, wszTopic; + int iDiscriminator; +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CDiscordGuildMember : public MZeroedObject +{ + CDiscordGuildMember(SnowFlake id) : + userId(id) + {} + + ~CDiscordGuildMember() + {} + + SnowFlake userId; + CMStringW wszDiscordId, wszNick, wszRole; + int iStatus; +}; + +struct CDiscordGuild : public MZeroedObject +{ + CDiscordGuild(SnowFlake _id); + ~CDiscordGuild(); + + __forceinline CDiscordGuildMember* FindUser(SnowFlake userId) + { + return arChatUsers.find((CDiscordGuildMember *)&userId); + } + + __inline CMStringW GetCacheFile() const + { + return CMStringW(FORMAT, L"%s\\DiscordCache\\%lld.json", VARSW(L"%miranda_userdata%").get(), id); + } + + SnowFlake id, ownerId; + CMStringW wszName; + MCONTACT hContact; + MGROUP groupId; + bool bSynced = false; + LIST arChannels; + + SESSION_INFO *pParentSi; + OBJLIST arChatUsers; + OBJLIST arRoles; // guild roles + + void LoadFromFile(); + void SaveToFile(); +}; + +struct CDiscordVoiceCall +{ + CMStringA szId; + SnowFlake channelId; + time_t startTime; +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +#define OPCODE_DISPATCH 0 +#define OPCODE_HEARTBEAT 1 +#define OPCODE_IDENTIFY 2 +#define OPCODE_STATUS_UPDATE 3 +#define OPCODE_VOICE_UPDATE 4 +#define OPCODE_VOICE_PING 5 +#define OPCODE_RESUME 6 +#define OPCODE_RECONNECT 7 +#define OPCODE_REQUEST_MEMBERS 8 +#define OPCODE_INVALID_SESSION 9 +#define OPCODE_HELLO 10 +#define OPCODE_HEARTBEAT_ACK 11 +#define OPCODE_REQUEST_SYNC 12 +#define OPCODE_REQUEST_SYNC_GROUP 13 +#define OPCODE_REQUEST_SYNC_CHANNEL 14 + +class CDiscordProto : public PROTO +{ + friend struct AsyncHttpRequest; + friend class CDiscardAccountOptions; + + class CDiscordProtoImpl + { + friend class CDiscordProto; + CDiscordProto &m_proto; + + CTimer m_heartBeat, m_markRead; + void OnHeartBeat(CTimer *) { + m_proto.GatewaySendHeartbeat(); + } + + void OnMarkRead(CTimer *pTimer) { + m_proto.SendMarkRead(); + pTimer->Stop(); + } + + CDiscordProtoImpl(CDiscordProto &pro) : + m_proto(pro), + m_markRead(Miranda_GetSystemWindow(), UINT_PTR(this)), + m_heartBeat(Miranda_GetSystemWindow(), UINT_PTR(this) + 1) + { + m_markRead.OnEvent = Callback(this, &CDiscordProtoImpl::OnMarkRead); + m_heartBeat.OnEvent = Callback(this, &CDiscordProtoImpl::OnHeartBeat); + } + } m_impl; + + ////////////////////////////////////////////////////////////////////////////////////// + // threads + + void __cdecl SendFileThread(void*); + void __cdecl ServerThread(void*); + void __cdecl SearchThread(void *param); + void __cdecl BatchChatCreate(void* param); + void __cdecl GetAwayMsgThread(void *param); + + ////////////////////////////////////////////////////////////////////////////////////// + // session control + + void ConnectionFailed(int iReason); + void ShutdownSession(void); + + wchar_t *m_wszStatusMsg[MAX_STATUS_COUNT]; + + ptrA m_szAccessToken, m_szTempToken; + + mir_cs m_csHttpQueue; + HANDLE m_evRequestsQueue; + LIST m_arHttpQueue; + + void ExecuteRequest(AsyncHttpRequest *pReq); + void Push(AsyncHttpRequest *pReq, int iTimeout = 10000); + void SaveToken(const JSONNode &data); + + HANDLE m_hWorkerThread; // worker thread handle + HNETLIBCONN m_hAPIConnection; // working connection + + bool + m_bOnline, // protocol is online + m_bTerminated; // Miranda's going down + + ////////////////////////////////////////////////////////////////////////////////////// + // gateway + + CMStringA + m_szGateway, // gateway url + m_szGatewaySessionId, // current session id + m_szCookie, // cookie used for all http queries + m_szWSCookie; // cookie used for establishing websocket connection + + HNETLIBUSER m_hGatewayNetlibUser; // the separate netlib user handle for gateways + HNETLIBCONN m_hGatewayConnection; // gateway connection + + void __cdecl GatewayThread(void*); + bool GatewayThreadWorker(void); + + bool GatewaySend(const JSONNode &pNode); + bool GatewayProcess(const JSONNode &pNode); + + void GatewaySendGuildInfo(CDiscordGuild *pGuild); + void GatewaySendHeartbeat(void); + void GatewaySendIdentify(void); + void GatewaySendResume(void); + bool GatewaySendStatus(int iStatus, const wchar_t *pwszStatusText); + + GatewayHandlerFunc GetHandler(const wchar_t*); + + int m_iHartbeatInterval; // in milliseconds + int m_iGatewaySeq; // gateway sequence number + + ////////////////////////////////////////////////////////////////////////////////////// + // options + + CMOption m_wszEmail; // my own email + CMOption m_wszDefaultGroup; // clist group to store contacts + CMOption m_bUseGroupchats; // Shall we connect Guilds at all? + CMOption m_bHideGroupchats; // Do not open chat windows on creation + CMOption m_bUseGuildGroups; // use special subgroups for guilds + CMOption m_bSyncDeleteMsgs; // delete messages from Miranda if they are deleted at the server + + ////////////////////////////////////////////////////////////////////////////////////// + // common data + + SnowFlake m_ownId; + + mir_cs csMarkReadQueue; + LIST arMarkReadQueue; + + OBJLIST arUsers; + OBJLIST arOwnMessages; + OBJLIST arVoiceCalls; + + CDiscordUser* FindUser(SnowFlake id); + CDiscordUser* FindUser(const wchar_t *pwszUsername, int iDiscriminator); + CDiscordUser* FindUserByChannel(SnowFlake channelId); + + void PreparePrivateChannel(const JSONNode &); + CDiscordUser* PrepareUser(const JSONNode &); + + ////////////////////////////////////////////////////////////////////////////////////// + // menu items + + void InitMenus(void); + + int __cdecl OnMenuPrebuild(WPARAM, LPARAM); + + INT_PTR __cdecl OnMenuCopyId(WPARAM, LPARAM); + INT_PTR __cdecl OnMenuCreateChannel(WPARAM, LPARAM); + INT_PTR __cdecl OnMenuJoinGuild(WPARAM, LPARAM); + INT_PTR __cdecl OnMenuLeaveGuild(WPARAM, LPARAM); + INT_PTR __cdecl OnMenuLoadHistory(WPARAM, LPARAM); + INT_PTR __cdecl OnMenuToggleSync(WPARAM, LPARAM); + + HGENMENU m_hMenuLeaveGuild, m_hMenuCreateChannel, m_hMenuToggleSync; + + ////////////////////////////////////////////////////////////////////////////////////// + // guilds + + OBJLIST arGuilds; + + __forceinline CDiscordGuild* FindGuild(SnowFlake id) const + { + return arGuilds.find((CDiscordGuild*)&id); + } + + void AddGuildUser(CDiscordGuild *guild, const CDiscordGuildMember &pUser); + void ProcessGuild(const JSONNode &json); + void ProcessPresence(const JSONNode &json); + void ProcessRole(CDiscordGuild *guild, const JSONNode &json); + void ProcessType(CDiscordUser *pUser, const JSONNode &json); + + CDiscordUser* ProcessGuildChannel(CDiscordGuild *guild, const JSONNode &json); + CDiscordGuildMember* ProcessGuildUser(CDiscordGuild *pGuild, const JSONNode &json, bool *bNew = nullptr); + + ////////////////////////////////////////////////////////////////////////////////////// + // group chats + + int __cdecl GroupchatEventHook(WPARAM, LPARAM); + int __cdecl GroupchatMenuHook(WPARAM, LPARAM); + + void Chat_SendPrivateMessage(GCHOOK *gch); + void Chat_ProcessLogMenu(GCHOOK *gch); + void Chat_ProcessNickMenu(GCHOOK* gch); + + void CreateChat(CDiscordGuild *pGuild, CDiscordUser *pUser); + void ProcessChatUser(CDiscordUser *pChat, const CMStringW &wszUserId, const JSONNode &pRoot); + void ParseSpecialChars(SESSION_INFO *si, CMStringW &str); + + ////////////////////////////////////////////////////////////////////////////////////// + // misc methods + + SnowFlake getId(const char *szName); + SnowFlake getId(MCONTACT hContact, const char *szName); + + void setId(const char *szName, SnowFlake iValue); + void setId(MCONTACT hContact, const char *szName, SnowFlake iValue); + +public: + CDiscordProto(const char*,const wchar_t*); + ~CDiscordProto(); + + ////////////////////////////////////////////////////////////////////////////////////// + // PROTO_INTERFACE + + INT_PTR GetCaps(int, MCONTACT = 0) override; + + HWND CreateExtendedSearchUI(HWND owner) override; + HWND SearchAdvanced(HWND owner) override; + + HANDLE SearchBasic(const wchar_t *id) override; + MCONTACT AddToList(int flags, PROTOSEARCHRESULT *psr) override; + MCONTACT AddToListByEvent(int flags, int, MEVENT hDbEvent) override; + + int AuthRecv(MCONTACT, PROTORECVEVENT *pre) override; + int Authorize(MEVENT hDbEvent) override; + int AuthDeny(MEVENT hDbEvent, const wchar_t* szReason) override; + int AuthRequest(MCONTACT hContact, const wchar_t*) override; + + HANDLE GetAwayMsg(MCONTACT hContact) override; + int SetAwayMsg(int iStatus, const wchar_t *msg) override; + + int SendMsg(MCONTACT hContact, int flags, const char *pszSrc) override; + + HANDLE SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) override; + + int UserIsTyping(MCONTACT hContact, int type) override; + + int SetStatus(int iNewStatus) override; + + void OnBuildProtoMenu() override; + void OnContactDeleted(MCONTACT) override; + void OnModulesLoaded() override; + void OnShutdown() override; + + ////////////////////////////////////////////////////////////////////////////////////// + // Services + + INT_PTR __cdecl RequestFriendship(WPARAM, LPARAM); + INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM); + + INT_PTR __cdecl GetAvatarCaps(WPARAM, LPARAM); + INT_PTR __cdecl GetAvatarInfo(WPARAM, LPARAM); + INT_PTR __cdecl GetMyAvatar(WPARAM, LPARAM); + INT_PTR __cdecl SetMyAvatar(WPARAM, LPARAM); + + INT_PTR __cdecl VoiceCaps(WPARAM, LPARAM); + + ////////////////////////////////////////////////////////////////////////////////////// + // Events + + int __cdecl OnOptionsInit(WPARAM, LPARAM); + int __cdecl OnAccountChanged(WPARAM, LPARAM); + int __cdecl OnDbEventRead(WPARAM, LPARAM); + + int __cdecl OnVoiceState(WPARAM, LPARAM); + + ////////////////////////////////////////////////////////////////////////////////////// + // dispatch commands + + void OnCommandCallCreated(const JSONNode &json); + void OnCommandCallDeleted(const JSONNode &json); + void OnCommandCallUpdated(const JSONNode &json); + void OnCommandChannelCreated(const JSONNode &json); + void OnCommandChannelDeleted(const JSONNode &json); + void OnCommandChannelUpdated(const JSONNode &json); + void OnCommandGuildCreated(const JSONNode &json); + void OnCommandGuildDeleted(const JSONNode &json); + void OnCommandGuildMemberAdded(const JSONNode &json); + void OnCommandGuildMemberListUpdate(const JSONNode &json); + void OnCommandGuildMemberRemoved(const JSONNode &json); + void OnCommandGuildMemberUpdated(const JSONNode &json); + void OnCommandFriendAdded(const JSONNode &json); + void OnCommandFriendRemoved(const JSONNode &json); + void OnCommandMessage(const JSONNode&, bool); + void OnCommandMessageCreate(const JSONNode &json); + void OnCommandMessageDelete(const JSONNode &json); + void OnCommandMessageUpdate(const JSONNode &json); + void OnCommandMessageAck(const JSONNode &json); + void OnCommandPresence(const JSONNode &json); + void OnCommandReady(const JSONNode &json); + void OnCommandRoleCreated(const JSONNode &json); + void OnCommandRoleDeleted(const JSONNode &json); + void OnCommandTyping(const JSONNode &json); + void OnCommandUserUpdate(const JSONNode &json); + void OnCommandUserSettingsUpdate(const JSONNode &json); + + void OnLoggedIn(); + void OnLoggedOut(); + + void OnReceiveCreateChannel(NETLIBHTTPREQUEST*, AsyncHttpRequest*); + void OnReceiveFile(NETLIBHTTPREQUEST*, AsyncHttpRequest*); + void OnReceiveGateway(NETLIBHTTPREQUEST*, AsyncHttpRequest*); + void OnReceiveMarkRead(NETLIBHTTPREQUEST *, AsyncHttpRequest *); + void OnReceiveMessageAck(NETLIBHTTPREQUEST*, AsyncHttpRequest*); + void OnReceiveToken(NETLIBHTTPREQUEST *, AsyncHttpRequest *); + void OnReceiveUserinfo(NETLIBHTTPREQUEST *, AsyncHttpRequest *); + + void RetrieveMyInfo(); + void OnReceiveMyInfo(NETLIBHTTPREQUEST*, AsyncHttpRequest*); + + void RetrieveHistory(CDiscordUser *pUser, CDiscordHistoryOp iOp = MSG_NOFILTER, SnowFlake msgid = 0, int iLimit = 50); + void OnReceiveHistory(NETLIBHTTPREQUEST*, AsyncHttpRequest*); + + bool RetrieveAvatar(MCONTACT hContact); + void OnReceiveAvatar(NETLIBHTTPREQUEST*, AsyncHttpRequest*); + + void OnSendMsg(NETLIBHTTPREQUEST*, AsyncHttpRequest*); + + ////////////////////////////////////////////////////////////////////////////////////// + // Misc + + void SendMarkRead(void); + void SetServerStatus(int iStatus); + void RemoveFriend(SnowFlake id); + + CMStringW GetAvatarFilename(MCONTACT hContact); + void CheckAvatarChange(MCONTACT hContact, const CMStringW &wszNewHash); +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +struct CMPlugin : public ACCPROTOPLUGIN +{ + CMPlugin(); + + bool bVoiceService = false; + + int Load() override; +}; diff --git a/protocols/Discord/src/resource.h b/protocols/Discord/src/resource.h index d0326e6857..099a4af3af 100644 --- a/protocols/Discord/src/resource.h +++ b/protocols/Discord/src/resource.h @@ -1,30 +1,30 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by w:\miranda-ng\protocols\Discord\res\discord.rc -// -#define IDI_MAIN 101 -#define IDI_GROUPCHAT 102 -#define IDD_OPTIONS_ACCOUNT 103 -#define IDD_EXTSEARCH 104 -#define IDD_OPTIONS_ACCMGR 105 -#define IDI_VOICE_CALL 106 -#define IDI_VOICE_ENDED 107 -#define IDC_PASSWORD 1001 -#define IDC_USERNAME 1002 -#define IDC_GROUP 1003 -#define IDC_NICK 1004 -#define IDC_HIDECHATS 1005 -#define IDC_USEGROUPS 1006 -#define IDC_USEGUILDS 1007 -#define IDC_DELETE_MSGS 1009 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 104 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1008 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by w:\miranda-ng\protocols\Discord\res\discord.rc +// +#define IDI_MAIN 101 +#define IDI_GROUPCHAT 102 +#define IDD_OPTIONS_ACCOUNT 103 +#define IDD_EXTSEARCH 104 +#define IDD_OPTIONS_ACCMGR 105 +#define IDI_VOICE_CALL 106 +#define IDI_VOICE_ENDED 107 +#define IDC_PASSWORD 1001 +#define IDC_USERNAME 1002 +#define IDC_GROUP 1003 +#define IDC_NICK 1004 +#define IDC_HIDECHATS 1005 +#define IDC_USEGROUPS 1006 +#define IDC_USEGUILDS 1007 +#define IDC_DELETE_MSGS 1009 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 104 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1008 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp index cc6dfe2280..16f716e89f 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -1,307 +1,307 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -///////////////////////////////////////////////////////////////////////////////////////// -// removes a friend from the server - -void CDiscordProto::RemoveFriend(SnowFlake id) -{ - Push(new AsyncHttpRequest(this, REQUEST_DELETE, CMStringA(FORMAT, "/users/@me/relationships/%lld", id), nullptr)); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// retrieves server history - -void CDiscordProto::RetrieveHistory(CDiscordUser *pUser, CDiscordHistoryOp iOp, SnowFlake msgid, int iLimit) -{ - if (!pUser->hContact || getByte(pUser->hContact, DB_KEY_DONT_FETCH)) - return; - - CMStringA szUrl(FORMAT, "/channels/%lld/messages", pUser->channelId); - AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, szUrl, &CDiscordProto::OnReceiveHistory); - pReq << INT_PARAM("limit", iLimit); - - if (msgid) { - switch (iOp) { - case MSG_AFTER: - pReq << INT64_PARAM("after", msgid); break; - case MSG_BEFORE: - pReq << INT64_PARAM("before", msgid); break; - } - } - pReq->pUserInfo = pUser; - Push(pReq); -} - -static int compareMsgHistory(const JSONNode *p1, const JSONNode *p2) -{ - return wcscmp((*p1)["id"].as_mstring(), (*p2)["id"].as_mstring()); -} - -void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq) -{ - CDiscordUser *pUser = (CDiscordUser*)pReq->pUserInfo; - - JsonReply root(pReply); - if (!root) { - if (root.error() == 403) // forbidden, don't try to read it anymore - setByte(pUser->hContact, DB_KEY_DONT_FETCH, true); - return; - } - - SESSION_INFO *si = nullptr; - if (!pUser->bIsPrivate) { - si = g_chatApi.SM_FindSession(pUser->wszUsername, m_szModuleName); - if (si == nullptr) { - debugLogA("message to unknown channel %lld ignored", pUser->channelId); - return; - } - } - - SnowFlake lastId = getId(pUser->hContact, DB_KEY_LASTMSGID); // as stored in a database - - LIST arNodes(10, compareMsgHistory); - int iNumMessages = 0; - for (auto &it : root.data()) { - arNodes.insert(&it); - iNumMessages++; - } - - for (auto &it : arNodes) { - auto &pNode = *it; - CMStringW wszText = PrepareMessageText(pNode); - CMStringW wszUserId = pNode["author"]["id"].as_mstring(); - SnowFlake msgid = ::getId(pNode["id"]); - SnowFlake authorid = _wtoi64(wszUserId); - uint32_t dwTimeStamp = StringToDate(pNode["timestamp"].as_mstring()); - - if (pUser->bIsPrivate) { - DBEVENTINFO dbei = {}; - dbei.szModule = m_szModuleName; - dbei.flags = DBEF_UTF; - dbei.eventType = EVENTTYPE_MESSAGE; - - if (authorid == m_ownId) - dbei.flags |= DBEF_SENT; - else - dbei.flags &= ~DBEF_SENT; - - if (msgid <= pUser->lastReadId) - dbei.flags |= DBEF_READ; - else - dbei.flags &= ~DBEF_READ; - - ptrA szBody(mir_utf8encodeW(wszText)); - dbei.timestamp = dwTimeStamp; - dbei.pBlob = (uint8_t*)szBody.get(); - dbei.cbBlob = (uint32_t)mir_strlen(szBody); - - bool bSucceeded = false; - char szMsgId[100]; - _i64toa_s(msgid, szMsgId, _countof(szMsgId), 10); - MEVENT hDbEvent = db_event_getById(m_szModuleName, szMsgId); - if (hDbEvent != 0) - bSucceeded = 0 == db_event_edit(pUser->hContact, hDbEvent, &dbei); - - if (!bSucceeded) { - dbei.szId = szMsgId; - db_event_add(pUser->hContact, &dbei); - } - } - else { - ProcessChatUser(pUser, wszUserId, pNode); - - ParseSpecialChars(si, wszText); - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_MESSAGE }; - gce.pszID.w = pUser->wszUsername; - gce.dwFlags = GCEF_ADDTOLOG; - gce.pszUID.w = wszUserId; - gce.pszText.w = wszText; - gce.time = dwTimeStamp; - gce.bIsMe = authorid == m_ownId; - Chat_Event(&gce); - } - - if (lastId < msgid) - lastId = msgid; - } - - setId(pUser->hContact, DB_KEY_LASTMSGID, lastId); - - // if we fetched 99 messages, but have smth more to go, continue fetching - if (iNumMessages == 99 && lastId < pUser->lastMsgId) - RetrieveHistory(pUser, MSG_AFTER, lastId, 99); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// retrieves user info - -void CDiscordProto::RetrieveMyInfo() -{ - Push(new AsyncHttpRequest(this, REQUEST_GET, "/users/@me", &CDiscordProto::OnReceiveMyInfo)); -} - -void CDiscordProto::OnReceiveMyInfo(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) -{ - JsonReply root(pReply); - if (!root) { - ConnectionFailed(LOGINERR_WRONGPASSWORD); - return; - } - - auto &data = root.data(); - SnowFlake id = ::getId(data["id"]); - setId(0, DB_KEY_ID, id); - - setByte(0, DB_KEY_MFA, data["mfa_enabled"].as_bool()); - setDword(0, DB_KEY_DISCR, _wtoi(data["discriminator"].as_mstring())); - setWString(0, DB_KEY_NICK, data["username"].as_mstring()); - m_wszEmail = data["email"].as_mstring(); - - m_ownId = id; - - m_szCookie.Empty(); - for (int i=0; i < pReply->headersCount; i++) { - if (!mir_strcmpi(pReply->headers[i].szName, "Set-Cookie")) { - char *p = strchr(pReply->headers[i].szValue, ';'); - if (p) *p = 0; - if (!m_szCookie.IsEmpty()) - m_szCookie.Append("; "); - - m_szCookie.Append(pReply->headers[i].szValue); - } - } - - // launch gateway thread - if (m_szGateway.IsEmpty()) - Push(new AsyncHttpRequest(this, REQUEST_GET, "/gateway", &CDiscordProto::OnReceiveGateway)); - else - ForkThread(&CDiscordProto::GatewayThread, nullptr); - - CheckAvatarChange(0, data["avatar"].as_mstring()); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// finds a gateway address - -void CDiscordProto::OnReceiveGateway(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) -{ - JsonReply root(pReply); - if (!root) { - ShutdownSession(); - return; - } - - auto &data = root.data(); - m_szGateway = data["url"].as_mstring(); - ForkThread(&CDiscordProto::GatewayThread, nullptr); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::SetServerStatus(int iStatus) -{ - if (GatewaySendStatus(iStatus, nullptr)) { - int iOldStatus = m_iStatus; m_iStatus = iStatus; - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// channels - -void CDiscordProto::OnReceiveCreateChannel(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) -{ - JsonReply root(pReply); - if (root) - OnCommandChannelCreated(root.data()); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::OnReceiveMessageAck(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) -{ - JsonReply root(pReply); - if (!root) - return; - - auto &data = root.data(); - CMStringW wszToken(data["token"].as_mstring()); - if (!wszToken.IsEmpty()) { - JSONNode props; props.set_name("properties"); - JSONNode reply; reply << props; - reply << CHAR_PARAM("event", "ack_messages") << WCHAR_PARAM("token", data["token"].as_mstring()); - Push(new AsyncHttpRequest(this, REQUEST_POST, "/track", nullptr, &reply)); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -#define RECAPTCHA_API_KEY "6Lef5iQTAAAAAKeIvIY-DeexoO3gj7ryl9rLMEnn" -#define RECAPTCHA_SITE_URL "https://discord.com" - -void CDiscordProto::OnReceiveToken(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) -{ - if (pReply->resultCode != 200) { - JSONNode root = JSONNode::parse(pReply->pData); - if (root) { - const JSONNode &captcha = root["captcha_key"].as_array(); - if (captcha) { - for (auto &it : captcha) { - if (it.as_mstring() == "captcha-required") { - MessageBoxW(NULL, TranslateT("The server requires you to enter the captcha. Miranda will redirect you to a browser now"), L"Discord", MB_OK | MB_ICONINFORMATION); - Utils_OpenUrl("https://discord.com/app"); - } - } - } - - for (auto &err: root["errors"]["email"]["_errors"]) { - CMStringW code(err["code"].as_mstring()); - CMStringW message(err["message"].as_mstring()); - if (!code.IsEmpty() || !message.IsEmpty()) { - POPUPDATAW popup; - popup.lchIcon = IcoLib_GetIconByHandle(Skin_GetIconHandle(SKINICON_ERROR), true); - wcscpy_s(popup.lpwzContactName, m_tszUserName); - mir_snwprintf(popup.lpwzText, TranslateT("Connection failed.\n%s (%s)."), message.c_str(), code.c_str()); - PUAddPopupW(&popup); - } - } - } - ConnectionFailed(LOGINERR_WRONGPASSWORD); - return; - } - - JsonReply root(pReply); - if (!root) { - ConnectionFailed(LOGINERR_NOSERVER); - return; - } - - auto &data = root.data(); - CMStringA szToken = data["token"].as_mstring(); - if (szToken.IsEmpty()) { - debugLogA("Strange empty token received, exiting"); - return; - } - - m_szAccessToken = szToken.Detach(); - setString("AccessToken", m_szAccessToken); - RetrieveMyInfo(); -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +///////////////////////////////////////////////////////////////////////////////////////// +// removes a friend from the server + +void CDiscordProto::RemoveFriend(SnowFlake id) +{ + Push(new AsyncHttpRequest(this, REQUEST_DELETE, CMStringA(FORMAT, "/users/@me/relationships/%lld", id), nullptr)); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// retrieves server history + +void CDiscordProto::RetrieveHistory(CDiscordUser *pUser, CDiscordHistoryOp iOp, SnowFlake msgid, int iLimit) +{ + if (!pUser->hContact || getByte(pUser->hContact, DB_KEY_DONT_FETCH)) + return; + + CMStringA szUrl(FORMAT, "/channels/%lld/messages", pUser->channelId); + AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, szUrl, &CDiscordProto::OnReceiveHistory); + pReq << INT_PARAM("limit", iLimit); + + if (msgid) { + switch (iOp) { + case MSG_AFTER: + pReq << INT64_PARAM("after", msgid); break; + case MSG_BEFORE: + pReq << INT64_PARAM("before", msgid); break; + } + } + pReq->pUserInfo = pUser; + Push(pReq); +} + +static int compareMsgHistory(const JSONNode *p1, const JSONNode *p2) +{ + return wcscmp((*p1)["id"].as_mstring(), (*p2)["id"].as_mstring()); +} + +void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq) +{ + CDiscordUser *pUser = (CDiscordUser*)pReq->pUserInfo; + + JsonReply root(pReply); + if (!root) { + if (root.error() == 403) // forbidden, don't try to read it anymore + setByte(pUser->hContact, DB_KEY_DONT_FETCH, true); + return; + } + + SESSION_INFO *si = nullptr; + if (!pUser->bIsPrivate) { + si = g_chatApi.SM_FindSession(pUser->wszUsername, m_szModuleName); + if (si == nullptr) { + debugLogA("message to unknown channel %lld ignored", pUser->channelId); + return; + } + } + + SnowFlake lastId = getId(pUser->hContact, DB_KEY_LASTMSGID); // as stored in a database + + LIST arNodes(10, compareMsgHistory); + int iNumMessages = 0; + for (auto &it : root.data()) { + arNodes.insert(&it); + iNumMessages++; + } + + for (auto &it : arNodes) { + auto &pNode = *it; + CMStringW wszText = PrepareMessageText(pNode); + CMStringW wszUserId = pNode["author"]["id"].as_mstring(); + SnowFlake msgid = ::getId(pNode["id"]); + SnowFlake authorid = _wtoi64(wszUserId); + uint32_t dwTimeStamp = StringToDate(pNode["timestamp"].as_mstring()); + + if (pUser->bIsPrivate) { + DBEVENTINFO dbei = {}; + dbei.szModule = m_szModuleName; + dbei.flags = DBEF_UTF; + dbei.eventType = EVENTTYPE_MESSAGE; + + if (authorid == m_ownId) + dbei.flags |= DBEF_SENT; + else + dbei.flags &= ~DBEF_SENT; + + if (msgid <= pUser->lastReadId) + dbei.flags |= DBEF_READ; + else + dbei.flags &= ~DBEF_READ; + + ptrA szBody(mir_utf8encodeW(wszText)); + dbei.timestamp = dwTimeStamp; + dbei.pBlob = (uint8_t*)szBody.get(); + dbei.cbBlob = (uint32_t)mir_strlen(szBody); + + bool bSucceeded = false; + char szMsgId[100]; + _i64toa_s(msgid, szMsgId, _countof(szMsgId), 10); + MEVENT hDbEvent = db_event_getById(m_szModuleName, szMsgId); + if (hDbEvent != 0) + bSucceeded = 0 == db_event_edit(pUser->hContact, hDbEvent, &dbei); + + if (!bSucceeded) { + dbei.szId = szMsgId; + db_event_add(pUser->hContact, &dbei); + } + } + else { + ProcessChatUser(pUser, wszUserId, pNode); + + ParseSpecialChars(si, wszText); + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_MESSAGE }; + gce.pszID.w = pUser->wszUsername; + gce.dwFlags = GCEF_ADDTOLOG; + gce.pszUID.w = wszUserId; + gce.pszText.w = wszText; + gce.time = dwTimeStamp; + gce.bIsMe = authorid == m_ownId; + Chat_Event(&gce); + } + + if (lastId < msgid) + lastId = msgid; + } + + setId(pUser->hContact, DB_KEY_LASTMSGID, lastId); + + // if we fetched 99 messages, but have smth more to go, continue fetching + if (iNumMessages == 99 && lastId < pUser->lastMsgId) + RetrieveHistory(pUser, MSG_AFTER, lastId, 99); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// retrieves user info + +void CDiscordProto::RetrieveMyInfo() +{ + Push(new AsyncHttpRequest(this, REQUEST_GET, "/users/@me", &CDiscordProto::OnReceiveMyInfo)); +} + +void CDiscordProto::OnReceiveMyInfo(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) +{ + JsonReply root(pReply); + if (!root) { + ConnectionFailed(LOGINERR_WRONGPASSWORD); + return; + } + + auto &data = root.data(); + SnowFlake id = ::getId(data["id"]); + setId(0, DB_KEY_ID, id); + + setByte(0, DB_KEY_MFA, data["mfa_enabled"].as_bool()); + setDword(0, DB_KEY_DISCR, _wtoi(data["discriminator"].as_mstring())); + setWString(0, DB_KEY_NICK, data["username"].as_mstring()); + m_wszEmail = data["email"].as_mstring(); + + m_ownId = id; + + m_szCookie.Empty(); + for (int i=0; i < pReply->headersCount; i++) { + if (!mir_strcmpi(pReply->headers[i].szName, "Set-Cookie")) { + char *p = strchr(pReply->headers[i].szValue, ';'); + if (p) *p = 0; + if (!m_szCookie.IsEmpty()) + m_szCookie.Append("; "); + + m_szCookie.Append(pReply->headers[i].szValue); + } + } + + // launch gateway thread + if (m_szGateway.IsEmpty()) + Push(new AsyncHttpRequest(this, REQUEST_GET, "/gateway", &CDiscordProto::OnReceiveGateway)); + else + ForkThread(&CDiscordProto::GatewayThread, nullptr); + + CheckAvatarChange(0, data["avatar"].as_mstring()); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// finds a gateway address + +void CDiscordProto::OnReceiveGateway(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) +{ + JsonReply root(pReply); + if (!root) { + ShutdownSession(); + return; + } + + auto &data = root.data(); + m_szGateway = data["url"].as_mstring(); + ForkThread(&CDiscordProto::GatewayThread, nullptr); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::SetServerStatus(int iStatus) +{ + if (GatewaySendStatus(iStatus, nullptr)) { + int iOldStatus = m_iStatus; m_iStatus = iStatus; + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// channels + +void CDiscordProto::OnReceiveCreateChannel(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) +{ + JsonReply root(pReply); + if (root) + OnCommandChannelCreated(root.data()); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::OnReceiveMessageAck(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) +{ + JsonReply root(pReply); + if (!root) + return; + + auto &data = root.data(); + CMStringW wszToken(data["token"].as_mstring()); + if (!wszToken.IsEmpty()) { + JSONNode props; props.set_name("properties"); + JSONNode reply; reply << props; + reply << CHAR_PARAM("event", "ack_messages") << WCHAR_PARAM("token", data["token"].as_mstring()); + Push(new AsyncHttpRequest(this, REQUEST_POST, "/track", nullptr, &reply)); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +#define RECAPTCHA_API_KEY "6Lef5iQTAAAAAKeIvIY-DeexoO3gj7ryl9rLMEnn" +#define RECAPTCHA_SITE_URL "https://discord.com" + +void CDiscordProto::OnReceiveToken(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) +{ + if (pReply->resultCode != 200) { + JSONNode root = JSONNode::parse(pReply->pData); + if (root) { + const JSONNode &captcha = root["captcha_key"].as_array(); + if (captcha) { + for (auto &it : captcha) { + if (it.as_mstring() == "captcha-required") { + MessageBoxW(NULL, TranslateT("The server requires you to enter the captcha. Miranda will redirect you to a browser now"), L"Discord", MB_OK | MB_ICONINFORMATION); + Utils_OpenUrl("https://discord.com/app"); + } + } + } + + for (auto &err: root["errors"]["email"]["_errors"]) { + CMStringW code(err["code"].as_mstring()); + CMStringW message(err["message"].as_mstring()); + if (!code.IsEmpty() || !message.IsEmpty()) { + POPUPDATAW popup; + popup.lchIcon = IcoLib_GetIconByHandle(Skin_GetIconHandle(SKINICON_ERROR), true); + wcscpy_s(popup.lpwzContactName, m_tszUserName); + mir_snwprintf(popup.lpwzText, TranslateT("Connection failed.\n%s (%s)."), message.c_str(), code.c_str()); + PUAddPopupW(&popup); + } + } + } + ConnectionFailed(LOGINERR_WRONGPASSWORD); + return; + } + + JsonReply root(pReply); + if (!root) { + ConnectionFailed(LOGINERR_NOSERVER); + return; + } + + auto &data = root.data(); + CMStringA szToken = data["token"].as_mstring(); + if (szToken.IsEmpty()) { + debugLogA("Strange empty token received, exiting"); + return; + } + + m_szAccessToken = szToken.Detach(); + setString("AccessToken", m_szAccessToken); + RetrieveMyInfo(); +} diff --git a/protocols/Discord/src/stdafx.cxx b/protocols/Discord/src/stdafx.cxx index 4b7f53343f..52b06cb953 100644 --- a/protocols/Discord/src/stdafx.cxx +++ b/protocols/Discord/src/stdafx.cxx @@ -1,18 +1,18 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + #include "stdafx.h" \ No newline at end of file diff --git a/protocols/Discord/src/stdafx.h b/protocols/Discord/src/stdafx.h index 6cba015cc3..48d68292dd 100644 --- a/protocols/Discord/src/stdafx.h +++ b/protocols/Discord/src/stdafx.h @@ -1,80 +1,80 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include "resource.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../../libs/zlib/src/zlib.h" - -extern IconItem g_iconList[]; - -#define DB_KEY_ID "id" -#define DB_KEY_PASSWORD "Password" -#define DB_KEY_DISCR "Discriminator" -#define DB_KEY_MFA "MfaEnabled" -#define DB_KEY_NICK "Nick" -#define DB_KEY_AVHASH "AvatarHash" -#define DB_KEY_CHANNELID "ChannelID" -#define DB_KEY_LASTMSGID "LastMessageID" -#define DB_KEY_REQAUTH "ReqAuth" -#define DB_KEY_DONT_FETCH "DontFetch" - -#define DB_KEYVAL_GROUP L"Discord" - -#include "version.h" -#include "proto.h" - -///////////////////////////////////////////////////////////////////////////////////////// - -void BuildStatusList(const CDiscordGuild *pGuild, SESSION_INFO *si); - -void CopyId(const CMStringW &nick); -SnowFlake getId(const JSONNode &pNode); -CMStringW PrepareMessageText(const JSONNode &pRoot); -int StrToStatus(const CMStringW &str); -time_t StringToDate(const CMStringW &str); -int SerialNext(void); +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "resource.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../libs/zlib/src/zlib.h" + +extern IconItem g_iconList[]; + +#define DB_KEY_ID "id" +#define DB_KEY_PASSWORD "Password" +#define DB_KEY_DISCR "Discriminator" +#define DB_KEY_MFA "MfaEnabled" +#define DB_KEY_NICK "Nick" +#define DB_KEY_AVHASH "AvatarHash" +#define DB_KEY_CHANNELID "ChannelID" +#define DB_KEY_LASTMSGID "LastMessageID" +#define DB_KEY_REQAUTH "ReqAuth" +#define DB_KEY_DONT_FETCH "DontFetch" + +#define DB_KEYVAL_GROUP L"Discord" + +#include "version.h" +#include "proto.h" + +///////////////////////////////////////////////////////////////////////////////////////// + +void BuildStatusList(const CDiscordGuild *pGuild, SESSION_INFO *si); + +void CopyId(const CMStringW &nick); +SnowFlake getId(const JSONNode &pNode); +CMStringW PrepareMessageText(const JSONNode &pRoot); +int StrToStatus(const CMStringW &str); +time_t StringToDate(const CMStringW &str); +int SerialNext(void); diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index ac40407c69..ce12a81443 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -1,376 +1,376 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -int StrToStatus(const CMStringW &str) -{ - if (str == L"idle") - return ID_STATUS_NA; - if (str == L"dnd") - return ID_STATUS_DND; - if (str == L"online") - return ID_STATUS_ONLINE; - if (str == L"offline") - return ID_STATUS_OFFLINE; - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -time_t StringToDate(const CMStringW &str) -{ - struct tm T = { 0 }; - int boo; - if (swscanf(str, L"%04d-%02d-%02dT%02d:%02d:%02d.%d", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, &boo) != 7) - return time(0); - - T.tm_year -= 1900; - T.tm_mon--; - time_t t = mktime(&T); - - _tzset(); - t -= _timezone; - return (t >= 0) ? t : 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static LONG volatile g_counter = 1; - -int SerialNext() -{ - return InterlockedIncrement(&g_counter); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -SnowFlake getId(const JSONNode &pNode) -{ - return _wtoi64(pNode.as_mstring()); -} - -SnowFlake CDiscordProto::getId(const char *szSetting) -{ - DBVARIANT dbv; - dbv.type = DBVT_BLOB; - if (db_get(0, m_szModuleName, szSetting, &dbv)) - return 0; - - SnowFlake result = (dbv.cpbVal == sizeof(SnowFlake)) ? *(SnowFlake*)dbv.pbVal : 0; - db_free(&dbv); - return result; -} - -SnowFlake CDiscordProto::getId(MCONTACT hContact, const char *szSetting) -{ - DBVARIANT dbv; - dbv.type = DBVT_BLOB; - if (db_get(hContact, m_szModuleName, szSetting, &dbv)) - return 0; - - SnowFlake result = (dbv.cpbVal == sizeof(SnowFlake)) ? *(SnowFlake*)dbv.pbVal : 0; - db_free(&dbv); - return result; -} - -void CDiscordProto::setId(const char *szSetting, SnowFlake iValue) -{ - SnowFlake oldVal = getId(szSetting); - if (oldVal != iValue) - db_set_blob(0, m_szModuleName, szSetting, &iValue, sizeof(iValue)); -} - -void CDiscordProto::setId(MCONTACT hContact, const char *szSetting, SnowFlake iValue) -{ - SnowFlake oldVal = getId(hContact, szSetting); - if (oldVal != iValue) - db_set_blob(hContact, m_szModuleName, szSetting, &iValue, sizeof(iValue)); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CopyId(const CMStringW &nick) -{ - if (!OpenClipboard(nullptr)) - return; - - EmptyClipboard(); - - int length = nick.GetLength() + 1; - if (HGLOBAL hMemory = GlobalAlloc(GMEM_FIXED, length * sizeof(wchar_t))) { - mir_wstrncpy((wchar_t*)GlobalLock(hMemory), nick, length); - GlobalUnlock(hMemory); - SetClipboardData(CF_UNICODETEXT, hMemory); - } - CloseClipboard(); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static CDiscordUser *g_myUser = new CDiscordUser(0); - -CDiscordUser* CDiscordProto::FindUser(SnowFlake id) -{ - return arUsers.find((CDiscordUser*)&id); -} - -CDiscordUser* CDiscordProto::FindUser(const wchar_t *pwszUsername, int iDiscriminator) -{ - for (auto &p : arUsers) - if (p->wszUsername == pwszUsername && p->iDiscriminator == iDiscriminator) - return p; - - return nullptr; -} - -CDiscordUser* CDiscordProto::FindUserByChannel(SnowFlake channelId) -{ - for (auto &p : arUsers) - if (p->channelId == channelId) - return p; - - return nullptr; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Common JSON processing routines - -void CDiscordProto::PreparePrivateChannel(const JSONNode &root) -{ - CDiscordUser *pUser = nullptr; - - CMStringW wszChannelId = root["id"].as_mstring(); - SnowFlake channelId = _wtoi64(wszChannelId); - - int type = root["type"].as_int(); - switch (type) { - case 1: // single channel - for (auto &it : root["recipients"]) - pUser = PrepareUser(it); - if (pUser == nullptr) { - debugLogA("Invalid recipients list, exiting"); - return; - } - break; - - case 3: // private groupchat - if ((pUser = FindUserByChannel(channelId)) == nullptr) { - pUser = new CDiscordUser(channelId); - arUsers.insert(pUser); - } - pUser->bIsGroup = true; - pUser->wszUsername = wszChannelId; - pUser->wszChannelName = root["name"].as_mstring(); - { - SESSION_INFO *si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, pUser->wszUsername, pUser->wszChannelName); - pUser->hContact = si->hContact; - - Chat_AddGroup(si, LPGENW("Owners")); - Chat_AddGroup(si, LPGENW("Participants")); - - SnowFlake ownerId = _wtoi64(root["owner_id"].as_mstring()); - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_JOIN }; - gce.pszID.w = pUser->wszUsername; - for (auto &it : root["recipients"]) { - CMStringW wszId = it["id"].as_mstring(); - CMStringW wszNick = it["nick"].as_mstring(); - if (wszNick.IsEmpty()) - wszNick = it["username"].as_mstring() + L"#" + it["discriminator"].as_mstring(); - - gce.pszUID.w = wszId; - gce.pszNick.w = wszNick; - gce.pszStatus.w = (_wtoi64(wszId) == ownerId) ? L"Owners" : L"Participants"; - Chat_Event(&gce); - } - - CMStringW wszId(FORMAT, L"%lld", getId(DB_KEY_ID)); - CMStringW wszNick(FORMAT, L"%s#%d", getMStringW(DB_KEY_NICK).c_str(), getDword(DB_KEY_DISCR)); - gce.bIsMe = true; - gce.pszUID.w = wszId; - gce.pszNick.w = wszNick; - gce.pszStatus.w = (_wtoi64(wszId) == ownerId) ? L"Owners" : L"Participants"; - Chat_Event(&gce); - - Chat_Control(m_szModuleName, pUser->wszUsername, m_bHideGroupchats ? WINDOW_HIDDEN : SESSION_INITDONE); - Chat_Control(m_szModuleName, pUser->wszUsername, SESSION_ONLINE); - } - break; - - default: - debugLogA("Invalid channel type: %d, exiting", type); - return; - } - - pUser->channelId = channelId; - pUser->lastMsgId = ::getId(root["last_message_id"]); - pUser->bIsPrivate = true; - - setId(pUser->hContact, DB_KEY_CHANNELID, pUser->channelId); - - SnowFlake oldMsgId = getId(pUser->hContact, DB_KEY_LASTMSGID); - if (pUser->lastMsgId > oldMsgId) - RetrieveHistory(pUser, MSG_AFTER, oldMsgId, 99); -} - -CDiscordUser* CDiscordProto::PrepareUser(const JSONNode &user) -{ - SnowFlake id = ::getId(user["id"]); - if (id == m_ownId) - return g_myUser; - - int iDiscriminator = _wtoi(user["discriminator"].as_mstring()); - CMStringW username = user["username"].as_mstring(); - - CDiscordUser *pUser = FindUser(id); - if (pUser == nullptr) { - MCONTACT tmp = INVALID_CONTACT_ID; - - // no user found by userid, try to find him via username+discriminator - pUser = FindUser(username, iDiscriminator); - if (pUser != nullptr) { - // if found, remove the object from list to resort it (its userid==0) - if (pUser->hContact != 0) - tmp = pUser->hContact; - arUsers.remove(pUser); - } - pUser = new CDiscordUser(id); - pUser->wszUsername = username; - pUser->iDiscriminator = iDiscriminator; - if (tmp != INVALID_CONTACT_ID) { - // if we previously had a recently added contact without userid, write it down - pUser->hContact = tmp; - setId(pUser->hContact, DB_KEY_ID, id); - } - arUsers.insert(pUser); - } - - if (pUser->hContact == 0) { - MCONTACT hContact = db_add_contact(); - Proto_AddToContact(hContact, m_szModuleName); - - Clist_SetGroup(hContact, m_wszDefaultGroup); - setId(hContact, DB_KEY_ID, id); - setWString(hContact, DB_KEY_NICK, username); - setDword(hContact, DB_KEY_DISCR, iDiscriminator); - - pUser->hContact = hContact; - } - - CheckAvatarChange(pUser->hContact, user["avatar"].as_mstring()); - return pUser; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -CMStringW PrepareMessageText(const JSONNode &pRoot) -{ - CMStringW wszText = pRoot["content"].as_mstring(); - - bool bDelimiterAdded = false; - for (auto &it : pRoot["attachments"]) { - CMStringW wszUrl = it["url"].as_mstring(); - if (!wszUrl.IsEmpty()) { - if (!bDelimiterAdded) { - bDelimiterAdded = true; - wszText.Append(L"\n-----------------"); - } - wszText.AppendFormat(L"\n%s: %s", TranslateT("Attachment"), wszUrl.c_str()); - } - } - - for (auto &it : pRoot["embeds"]) { - wszText.Append(L"\n-----------------"); - - CMStringW str = it["url"].as_mstring(); - wszText.AppendFormat(L"\n%s: %s", TranslateT("Embed"), str.c_str()); - - str = it["provider"]["name"].as_mstring() + L" " + it["type"].as_mstring(); - if (str.GetLength() > 1) - wszText.AppendFormat(L"\n\t%s", str.c_str()); - - str = it["description"].as_mstring(); - if (!str.IsEmpty()) - wszText.AppendFormat(L"\n\t%s", str.c_str()); - - str = it["thumbnail"]["url"].as_mstring(); - if (!str.IsEmpty()) - wszText.AppendFormat(L"\n%s: %s", TranslateT("Preview"), str.c_str()); - } - - return wszText; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::ProcessType(CDiscordUser *pUser, const JSONNode &pRoot) -{ - switch (pRoot["type"].as_int()) { - case 1: // confirmed - Contact::PutOnList(pUser->hContact); - delSetting(pUser->hContact, DB_KEY_REQAUTH); - delSetting(pUser->hContact, "ApparentMode"); - break; - - case 3: // expecting authorization - Contact::RemoveFromList(pUser->hContact); - if (!getByte(pUser->hContact, DB_KEY_REQAUTH, 0)) { - setByte(pUser->hContact, DB_KEY_REQAUTH, 1); - - CMStringA szId(FORMAT, "%lld", pUser->id); - DB::AUTH_BLOB blob(pUser->hContact, T2Utf(pUser->wszUsername), nullptr, nullptr, szId, nullptr); - - PROTORECVEVENT pre = { 0 }; - pre.timestamp = (uint32_t)time(0); - pre.lParam = blob.size(); - pre.szMessage = blob; - ProtoChainRecv(pUser->hContact, PSR_AUTH, 0, (LPARAM)&pre); - } - break; - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CDiscordProto::ParseSpecialChars(SESSION_INFO *si, CMStringW &str) -{ - for (int i = 0; (i = str.Find('<', i)) != -1; i++) { - int iEnd = str.Find('>', i + 1); - if (iEnd == -1) - return; - - CMStringW wszWord = str.Mid(i + 1, iEnd - i - 1); - if (wszWord[0] == '@') { // member highlight - int iStart = 1; - if (wszWord[1] == '!') - iStart++; - - USERINFO *ui = g_chatApi.UM_FindUser(si, wszWord.c_str() + iStart); - if (ui != nullptr) - str.Replace(L"<" + wszWord + L">", CMStringW(ui->pszNick) + L": "); - } - else if (wszWord[0] == '#') { - CDiscordUser *pUser = FindUserByChannel(_wtoi64(wszWord.c_str() + 1)); - if (pUser != nullptr) { - ptrW wszNick(getWStringA(pUser->hContact, DB_KEY_NICK)); - if (wszNick != nullptr) - str.Replace(L"<" + wszWord + L">", wszNick); - } - } - } -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +int StrToStatus(const CMStringW &str) +{ + if (str == L"idle") + return ID_STATUS_NA; + if (str == L"dnd") + return ID_STATUS_DND; + if (str == L"online") + return ID_STATUS_ONLINE; + if (str == L"offline") + return ID_STATUS_OFFLINE; + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +time_t StringToDate(const CMStringW &str) +{ + struct tm T = { 0 }; + int boo; + if (swscanf(str, L"%04d-%02d-%02dT%02d:%02d:%02d.%d", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, &boo) != 7) + return time(0); + + T.tm_year -= 1900; + T.tm_mon--; + time_t t = mktime(&T); + + _tzset(); + t -= _timezone; + return (t >= 0) ? t : 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static LONG volatile g_counter = 1; + +int SerialNext() +{ + return InterlockedIncrement(&g_counter); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +SnowFlake getId(const JSONNode &pNode) +{ + return _wtoi64(pNode.as_mstring()); +} + +SnowFlake CDiscordProto::getId(const char *szSetting) +{ + DBVARIANT dbv; + dbv.type = DBVT_BLOB; + if (db_get(0, m_szModuleName, szSetting, &dbv)) + return 0; + + SnowFlake result = (dbv.cpbVal == sizeof(SnowFlake)) ? *(SnowFlake*)dbv.pbVal : 0; + db_free(&dbv); + return result; +} + +SnowFlake CDiscordProto::getId(MCONTACT hContact, const char *szSetting) +{ + DBVARIANT dbv; + dbv.type = DBVT_BLOB; + if (db_get(hContact, m_szModuleName, szSetting, &dbv)) + return 0; + + SnowFlake result = (dbv.cpbVal == sizeof(SnowFlake)) ? *(SnowFlake*)dbv.pbVal : 0; + db_free(&dbv); + return result; +} + +void CDiscordProto::setId(const char *szSetting, SnowFlake iValue) +{ + SnowFlake oldVal = getId(szSetting); + if (oldVal != iValue) + db_set_blob(0, m_szModuleName, szSetting, &iValue, sizeof(iValue)); +} + +void CDiscordProto::setId(MCONTACT hContact, const char *szSetting, SnowFlake iValue) +{ + SnowFlake oldVal = getId(hContact, szSetting); + if (oldVal != iValue) + db_set_blob(hContact, m_szModuleName, szSetting, &iValue, sizeof(iValue)); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CopyId(const CMStringW &nick) +{ + if (!OpenClipboard(nullptr)) + return; + + EmptyClipboard(); + + int length = nick.GetLength() + 1; + if (HGLOBAL hMemory = GlobalAlloc(GMEM_FIXED, length * sizeof(wchar_t))) { + mir_wstrncpy((wchar_t*)GlobalLock(hMemory), nick, length); + GlobalUnlock(hMemory); + SetClipboardData(CF_UNICODETEXT, hMemory); + } + CloseClipboard(); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static CDiscordUser *g_myUser = new CDiscordUser(0); + +CDiscordUser* CDiscordProto::FindUser(SnowFlake id) +{ + return arUsers.find((CDiscordUser*)&id); +} + +CDiscordUser* CDiscordProto::FindUser(const wchar_t *pwszUsername, int iDiscriminator) +{ + for (auto &p : arUsers) + if (p->wszUsername == pwszUsername && p->iDiscriminator == iDiscriminator) + return p; + + return nullptr; +} + +CDiscordUser* CDiscordProto::FindUserByChannel(SnowFlake channelId) +{ + for (auto &p : arUsers) + if (p->channelId == channelId) + return p; + + return nullptr; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Common JSON processing routines + +void CDiscordProto::PreparePrivateChannel(const JSONNode &root) +{ + CDiscordUser *pUser = nullptr; + + CMStringW wszChannelId = root["id"].as_mstring(); + SnowFlake channelId = _wtoi64(wszChannelId); + + int type = root["type"].as_int(); + switch (type) { + case 1: // single channel + for (auto &it : root["recipients"]) + pUser = PrepareUser(it); + if (pUser == nullptr) { + debugLogA("Invalid recipients list, exiting"); + return; + } + break; + + case 3: // private groupchat + if ((pUser = FindUserByChannel(channelId)) == nullptr) { + pUser = new CDiscordUser(channelId); + arUsers.insert(pUser); + } + pUser->bIsGroup = true; + pUser->wszUsername = wszChannelId; + pUser->wszChannelName = root["name"].as_mstring(); + { + SESSION_INFO *si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, pUser->wszUsername, pUser->wszChannelName); + pUser->hContact = si->hContact; + + Chat_AddGroup(si, LPGENW("Owners")); + Chat_AddGroup(si, LPGENW("Participants")); + + SnowFlake ownerId = _wtoi64(root["owner_id"].as_mstring()); + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_JOIN }; + gce.pszID.w = pUser->wszUsername; + for (auto &it : root["recipients"]) { + CMStringW wszId = it["id"].as_mstring(); + CMStringW wszNick = it["nick"].as_mstring(); + if (wszNick.IsEmpty()) + wszNick = it["username"].as_mstring() + L"#" + it["discriminator"].as_mstring(); + + gce.pszUID.w = wszId; + gce.pszNick.w = wszNick; + gce.pszStatus.w = (_wtoi64(wszId) == ownerId) ? L"Owners" : L"Participants"; + Chat_Event(&gce); + } + + CMStringW wszId(FORMAT, L"%lld", getId(DB_KEY_ID)); + CMStringW wszNick(FORMAT, L"%s#%d", getMStringW(DB_KEY_NICK).c_str(), getDword(DB_KEY_DISCR)); + gce.bIsMe = true; + gce.pszUID.w = wszId; + gce.pszNick.w = wszNick; + gce.pszStatus.w = (_wtoi64(wszId) == ownerId) ? L"Owners" : L"Participants"; + Chat_Event(&gce); + + Chat_Control(m_szModuleName, pUser->wszUsername, m_bHideGroupchats ? WINDOW_HIDDEN : SESSION_INITDONE); + Chat_Control(m_szModuleName, pUser->wszUsername, SESSION_ONLINE); + } + break; + + default: + debugLogA("Invalid channel type: %d, exiting", type); + return; + } + + pUser->channelId = channelId; + pUser->lastMsgId = ::getId(root["last_message_id"]); + pUser->bIsPrivate = true; + + setId(pUser->hContact, DB_KEY_CHANNELID, pUser->channelId); + + SnowFlake oldMsgId = getId(pUser->hContact, DB_KEY_LASTMSGID); + if (pUser->lastMsgId > oldMsgId) + RetrieveHistory(pUser, MSG_AFTER, oldMsgId, 99); +} + +CDiscordUser* CDiscordProto::PrepareUser(const JSONNode &user) +{ + SnowFlake id = ::getId(user["id"]); + if (id == m_ownId) + return g_myUser; + + int iDiscriminator = _wtoi(user["discriminator"].as_mstring()); + CMStringW username = user["username"].as_mstring(); + + CDiscordUser *pUser = FindUser(id); + if (pUser == nullptr) { + MCONTACT tmp = INVALID_CONTACT_ID; + + // no user found by userid, try to find him via username+discriminator + pUser = FindUser(username, iDiscriminator); + if (pUser != nullptr) { + // if found, remove the object from list to resort it (its userid==0) + if (pUser->hContact != 0) + tmp = pUser->hContact; + arUsers.remove(pUser); + } + pUser = new CDiscordUser(id); + pUser->wszUsername = username; + pUser->iDiscriminator = iDiscriminator; + if (tmp != INVALID_CONTACT_ID) { + // if we previously had a recently added contact without userid, write it down + pUser->hContact = tmp; + setId(pUser->hContact, DB_KEY_ID, id); + } + arUsers.insert(pUser); + } + + if (pUser->hContact == 0) { + MCONTACT hContact = db_add_contact(); + Proto_AddToContact(hContact, m_szModuleName); + + Clist_SetGroup(hContact, m_wszDefaultGroup); + setId(hContact, DB_KEY_ID, id); + setWString(hContact, DB_KEY_NICK, username); + setDword(hContact, DB_KEY_DISCR, iDiscriminator); + + pUser->hContact = hContact; + } + + CheckAvatarChange(pUser->hContact, user["avatar"].as_mstring()); + return pUser; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +CMStringW PrepareMessageText(const JSONNode &pRoot) +{ + CMStringW wszText = pRoot["content"].as_mstring(); + + bool bDelimiterAdded = false; + for (auto &it : pRoot["attachments"]) { + CMStringW wszUrl = it["url"].as_mstring(); + if (!wszUrl.IsEmpty()) { + if (!bDelimiterAdded) { + bDelimiterAdded = true; + wszText.Append(L"\n-----------------"); + } + wszText.AppendFormat(L"\n%s: %s", TranslateT("Attachment"), wszUrl.c_str()); + } + } + + for (auto &it : pRoot["embeds"]) { + wszText.Append(L"\n-----------------"); + + CMStringW str = it["url"].as_mstring(); + wszText.AppendFormat(L"\n%s: %s", TranslateT("Embed"), str.c_str()); + + str = it["provider"]["name"].as_mstring() + L" " + it["type"].as_mstring(); + if (str.GetLength() > 1) + wszText.AppendFormat(L"\n\t%s", str.c_str()); + + str = it["description"].as_mstring(); + if (!str.IsEmpty()) + wszText.AppendFormat(L"\n\t%s", str.c_str()); + + str = it["thumbnail"]["url"].as_mstring(); + if (!str.IsEmpty()) + wszText.AppendFormat(L"\n%s: %s", TranslateT("Preview"), str.c_str()); + } + + return wszText; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::ProcessType(CDiscordUser *pUser, const JSONNode &pRoot) +{ + switch (pRoot["type"].as_int()) { + case 1: // confirmed + Contact::PutOnList(pUser->hContact); + delSetting(pUser->hContact, DB_KEY_REQAUTH); + delSetting(pUser->hContact, "ApparentMode"); + break; + + case 3: // expecting authorization + Contact::RemoveFromList(pUser->hContact); + if (!getByte(pUser->hContact, DB_KEY_REQAUTH, 0)) { + setByte(pUser->hContact, DB_KEY_REQAUTH, 1); + + CMStringA szId(FORMAT, "%lld", pUser->id); + DB::AUTH_BLOB blob(pUser->hContact, T2Utf(pUser->wszUsername), nullptr, nullptr, szId, nullptr); + + PROTORECVEVENT pre = { 0 }; + pre.timestamp = (uint32_t)time(0); + pre.lParam = blob.size(); + pre.szMessage = blob; + ProtoChainRecv(pUser->hContact, PSR_AUTH, 0, (LPARAM)&pre); + } + break; + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CDiscordProto::ParseSpecialChars(SESSION_INFO *si, CMStringW &str) +{ + for (int i = 0; (i = str.Find('<', i)) != -1; i++) { + int iEnd = str.Find('>', i + 1); + if (iEnd == -1) + return; + + CMStringW wszWord = str.Mid(i + 1, iEnd - i - 1); + if (wszWord[0] == '@') { // member highlight + int iStart = 1; + if (wszWord[1] == '!') + iStart++; + + USERINFO *ui = g_chatApi.UM_FindUser(si, wszWord.c_str() + iStart); + if (ui != nullptr) + str.Replace(L"<" + wszWord + L">", CMStringW(ui->pszNick) + L": "); + } + else if (wszWord[0] == '#') { + CDiscordUser *pUser = FindUserByChannel(_wtoi64(wszWord.c_str() + 1)); + if (pUser != nullptr) { + ptrW wszNick(getWStringA(pUser->hContact, DB_KEY_NICK)); + if (wszNick != nullptr) + str.Replace(L"<" + wszWord + L">", wszNick); + } + } + } +} diff --git a/protocols/Discord/src/version.h b/protocols/Discord/src/version.h index 138a7eaaec..1a33efa401 100644 --- a/protocols/Discord/src/version.h +++ b/protocols/Discord/src/version.h @@ -1,13 +1,13 @@ -#define __MAJOR_VERSION 0 -#define __MINOR_VERSION 6 -#define __RELEASE_NUM 2 -#define __BUILD_NUM 11 - -#include - -#define __PLUGIN_NAME "Discord protocol" -#define __FILENAME "Discord.dll" -#define __DESCRIPTION "Discord support for Miranda NG." -#define __AUTHOR "George Hazan" -#define __AUTHORWEB "https://miranda-ng.org/p/Discord/" -#define __COPYRIGHT "© 2016-22 Miranda NG team" +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 6 +#define __RELEASE_NUM 2 +#define __BUILD_NUM 11 + +#include + +#define __PLUGIN_NAME "Discord protocol" +#define __FILENAME "Discord.dll" +#define __DESCRIPTION "Discord support for Miranda NG." +#define __AUTHOR "George Hazan" +#define __AUTHORWEB "https://miranda-ng.org/p/Discord/" +#define __COPYRIGHT "© 2016-22 Miranda NG team" diff --git a/protocols/Discord/src/voice.cpp b/protocols/Discord/src/voice.cpp index 6e41bde300..5d1ccf1ea7 100644 --- a/protocols/Discord/src/voice.cpp +++ b/protocols/Discord/src/voice.cpp @@ -1,116 +1,116 @@ -/* -Copyright © 2016-22 Miranda NG team - -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, see . -*/ - -#include "stdafx.h" - -///////////////////////////////////////////////////////////////////////////////////////// -// call operations (voice & video) - -void CDiscordProto::OnCommandCallCreated(const JSONNode &pRoot) -{ - for (auto &it : pRoot["voice_states"]) { - SnowFlake channelId = ::getId(pRoot["channel_id"]); - auto *pUser = FindUserByChannel(channelId); - if (pUser == nullptr) { - debugLogA("Call from unknown channel %lld, skipping", channelId); - continue; - } - - auto *pCall = new CDiscordVoiceCall(); - pCall->szId = it["session_id"].as_mstring(); - pCall->channelId = channelId; - pCall->startTime = time(0); - arVoiceCalls.insert(pCall); - - char *szMessage = TranslateU("Incoming call"); - DBEVENTINFO dbei = {}; - dbei.szModule = m_szModuleName; - dbei.timestamp = pCall->startTime; - dbei.eventType = EVENT_INCOMING_CALL; - dbei.cbBlob = uint32_t(mir_strlen(szMessage) + 1); - dbei.pBlob = (uint8_t *)szMessage; - dbei.flags = DBEF_UTF; - db_event_add(pUser->hContact, &dbei); - } -} - -void CDiscordProto::OnCommandCallDeleted(const JSONNode &pRoot) -{ - SnowFlake channelId = ::getId(pRoot["channel_id"]); - auto *pUser = FindUserByChannel(channelId); - if (pUser == nullptr) { - debugLogA("Call from unknown channel %lld, skipping", channelId); - return; - } - - int elapsed = 0, currTime = time(0); - for (auto &call : arVoiceCalls.rev_iter()) - if (call->channelId == channelId) { - elapsed = currTime - call->startTime; - arVoiceCalls.removeItem(&call); - break; - } - - if (!elapsed) { - debugLogA("Call from channel %lld isn't registered, skipping", channelId); - return; - } - - CMStringA szMessage(FORMAT, TranslateU("Call ended, %d seconds long"), elapsed); - DBEVENTINFO dbei = {}; - dbei.szModule = m_szModuleName; - dbei.timestamp = currTime; - dbei.eventType = EVENT_CALL_FINISHED; - dbei.cbBlob = uint32_t(szMessage.GetLength() + 1); - dbei.pBlob = (uint8_t *)szMessage.c_str(); - dbei.flags = DBEF_UTF; - db_event_add(pUser->hContact, &dbei); -} - -void CDiscordProto::OnCommandCallUpdated(const JSONNode&) -{ -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Events & services - -INT_PTR __cdecl CDiscordProto::VoiceCaps(WPARAM, LPARAM) -{ - return VOICE_CAPS_VOICE | VOICE_CAPS_CALL_CONTACT; -} - -int __cdecl CDiscordProto::OnVoiceState(WPARAM wParam, LPARAM) -{ - auto *pVoice = (VOICE_CALL *)wParam; - if (mir_strcmp(pVoice->moduleName, m_szModuleName)) - return 0; - - CDiscordVoiceCall *pCall = nullptr; - for (auto &it : arVoiceCalls) - if (it->szId == pVoice->id) { - pCall = it; - break; - } - - if (pCall == nullptr) { - debugLogA("Unknown call: %s, exiting", pVoice->id); - return 0; - } - - debugLogA("Call %s state changed to %d", pVoice->id, pVoice->state); - return 0; -} +/* +Copyright © 2016-22 Miranda NG team + +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, see . +*/ + +#include "stdafx.h" + +///////////////////////////////////////////////////////////////////////////////////////// +// call operations (voice & video) + +void CDiscordProto::OnCommandCallCreated(const JSONNode &pRoot) +{ + for (auto &it : pRoot["voice_states"]) { + SnowFlake channelId = ::getId(pRoot["channel_id"]); + auto *pUser = FindUserByChannel(channelId); + if (pUser == nullptr) { + debugLogA("Call from unknown channel %lld, skipping", channelId); + continue; + } + + auto *pCall = new CDiscordVoiceCall(); + pCall->szId = it["session_id"].as_mstring(); + pCall->channelId = channelId; + pCall->startTime = time(0); + arVoiceCalls.insert(pCall); + + char *szMessage = TranslateU("Incoming call"); + DBEVENTINFO dbei = {}; + dbei.szModule = m_szModuleName; + dbei.timestamp = pCall->startTime; + dbei.eventType = EVENT_INCOMING_CALL; + dbei.cbBlob = uint32_t(mir_strlen(szMessage) + 1); + dbei.pBlob = (uint8_t *)szMessage; + dbei.flags = DBEF_UTF; + db_event_add(pUser->hContact, &dbei); + } +} + +void CDiscordProto::OnCommandCallDeleted(const JSONNode &pRoot) +{ + SnowFlake channelId = ::getId(pRoot["channel_id"]); + auto *pUser = FindUserByChannel(channelId); + if (pUser == nullptr) { + debugLogA("Call from unknown channel %lld, skipping", channelId); + return; + } + + int elapsed = 0, currTime = time(0); + for (auto &call : arVoiceCalls.rev_iter()) + if (call->channelId == channelId) { + elapsed = currTime - call->startTime; + arVoiceCalls.removeItem(&call); + break; + } + + if (!elapsed) { + debugLogA("Call from channel %lld isn't registered, skipping", channelId); + return; + } + + CMStringA szMessage(FORMAT, TranslateU("Call ended, %d seconds long"), elapsed); + DBEVENTINFO dbei = {}; + dbei.szModule = m_szModuleName; + dbei.timestamp = currTime; + dbei.eventType = EVENT_CALL_FINISHED; + dbei.cbBlob = uint32_t(szMessage.GetLength() + 1); + dbei.pBlob = (uint8_t *)szMessage.c_str(); + dbei.flags = DBEF_UTF; + db_event_add(pUser->hContact, &dbei); +} + +void CDiscordProto::OnCommandCallUpdated(const JSONNode&) +{ +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Events & services + +INT_PTR __cdecl CDiscordProto::VoiceCaps(WPARAM, LPARAM) +{ + return VOICE_CAPS_VOICE | VOICE_CAPS_CALL_CONTACT; +} + +int __cdecl CDiscordProto::OnVoiceState(WPARAM wParam, LPARAM) +{ + auto *pVoice = (VOICE_CALL *)wParam; + if (mir_strcmp(pVoice->moduleName, m_szModuleName)) + return 0; + + CDiscordVoiceCall *pCall = nullptr; + for (auto &it : arVoiceCalls) + if (it->szId == pVoice->id) { + pCall = it; + break; + } + + if (pCall == nullptr) { + debugLogA("Unknown call: %s, exiting", pVoice->id); + return 0; + } + + debugLogA("Call %s state changed to %d", pVoice->id, pVoice->state); + return 0; +} diff --git a/protocols/Sametime/src/meanwhile/src/mw_error.h b/protocols/Sametime/src/meanwhile/src/mw_error.h index e53cc0c996..eec101d295 100644 --- a/protocols/Sametime/src/meanwhile/src/mw_error.h +++ b/protocols/Sametime/src/meanwhile/src/mw_error.h @@ -1,206 +1,206 @@ - -/* - Meanwhile - Unofficial Lotus Sametime Community Client Library - Copyright (C) 2004 Christopher (siege) O'Brien - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef _MW_ERROR_H -#define _MW_ERROR_H - - -/** @file mw_error.h - - Common error code constants used by Meanwhile. - - Not all of these error codes (or even many, really) will ever - actually appear from Meanwhile. These are taken directly from the - houri draft, along with the minimal explanation for each. -*/ - - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/// Miranda NG development start -enum mwReturnCodeType { - mwReturnCodeInfo = 0x1000, - mwReturnCodeError = 0x2000 -}; - -struct mwReturnCodeDesc { - guint16 type; /**< @see mwReturnCodeType */ - char *codeString; /**< return code hex as string */ - char *name; /**< return code name */ - char *description; /**< return code description */ -}; - -struct mwReturnCodeDesc *mwGetReturnCodeDesc(guint32 code); -/// Miranda NG development end - -/** reference to a new string appropriate for the given error code.*/ -char* mwError(guint32 code); - - -/* 8.3 Constants */ -/* 8.3.1 Error Codes */ -/* 8.3.1.1 General error/success codes */ - -/** @enum ERR_GENERAL - general error codes */ -enum ERR_GENERAL { - ERR_SUCCESS = 0x00000000, - ERR_FAILURE = 0x80000000, - ERR_REQUEST_DELAY = 0x00000001, - ERR_REQUEST_INVALID = 0x80000001, - ERR_NOT_LOGGED_IN = 0x80000002, - ERR_NOT_AUTHORIZED = 0x80000003, - ERR_ABORT = 0x80000004, - ERR_NO_ELEMENT = 0x80000005, - ERR_NO_USER = 0x80000006, - ERR_BAD_DATA = 0x80000007, - ERR_NOT_IMPLEMENTED = 0x80000008, - ERR_UNKNOWN_ERROR = 0x80000009, /* what is this? */ - ERR_STARVING = 0x8000000a, - ERR_CHANNEL_NO_SUPPORT = 0x8000000b, - ERR_CHANNEL_EXISTS = 0x8000000c, - ERR_SERVICE_NO_SUPPORT = 0x8000000d, - ERR_PROTOCOL_NO_SUPPORT = 0x8000000e, - ERR_PROTOCOL_NO_SUPPORT2 = 0x8000000f, /* duplicate? */ - ERR_VERSION_NO_SUPPORT = 0x80000010, - ERR_USER_SKETCHY = 0x80000011, - ERR_ALREADY_INITIALIZED = 0x80000013, - ERR_NOT_OWNER = 0x80000014, - ERR_TOKEN_INVALID = 0x80000015, - ERR_TOKEN_EXPIRED = 0x80000016, - ERR_TOKEN_IP_MISMATCH = 0x80000017, - ERR_PORT_IN_USE = 0x80000018, - ERR_NETWORK_DEAD = 0x80000019, - ERR_NO_MASTER_CHANNEL = 0x8000001a, - ERR_ALREADY_SUBSCRIBED = 0x8000001b, - ERR_NOT_SUBSCRIBED = 0x8000001c, - ERR_ENCRYPT_NO_SUPPORT = 0x8000001d, - ERR_ENCRYPT_UNINITIALIZED = 0x8000001e, - ERR_ENCRYPT_UNACCEPTABLE = 0x8000001f, - ERR_ENCRYPT_INVALID = 0x80000020, - ERR_NO_COMMON_ENCRYPT = 0x80000021, - ERR_CHANNEL_DESTROYED = 0x80000022, - /// Miranda NG development start - //ERR_CHANNEL_REDIRECTED = 0x80000023 - ERR_CHANNEL_REDIRECTED = 0x00000023, + +/* + Meanwhile - Unofficial Lotus Sametime Community Client Library + Copyright (C) 2004 Christopher (siege) O'Brien + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _MW_ERROR_H +#define _MW_ERROR_H + + +/** @file mw_error.h + + Common error code constants used by Meanwhile. + + Not all of these error codes (or even many, really) will ever + actually appear from Meanwhile. These are taken directly from the + houri draft, along with the minimal explanation for each. +*/ + + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/// Miranda NG development start +enum mwReturnCodeType { + mwReturnCodeInfo = 0x1000, + mwReturnCodeError = 0x2000 +}; + +struct mwReturnCodeDesc { + guint16 type; /**< @see mwReturnCodeType */ + char *codeString; /**< return code hex as string */ + char *name; /**< return code name */ + char *description; /**< return code description */ +}; + +struct mwReturnCodeDesc *mwGetReturnCodeDesc(guint32 code); +/// Miranda NG development end + +/** reference to a new string appropriate for the given error code.*/ +char* mwError(guint32 code); + + +/* 8.3 Constants */ +/* 8.3.1 Error Codes */ +/* 8.3.1.1 General error/success codes */ + +/** @enum ERR_GENERAL + general error codes */ +enum ERR_GENERAL { + ERR_SUCCESS = 0x00000000, + ERR_FAILURE = 0x80000000, + ERR_REQUEST_DELAY = 0x00000001, + ERR_REQUEST_INVALID = 0x80000001, + ERR_NOT_LOGGED_IN = 0x80000002, + ERR_NOT_AUTHORIZED = 0x80000003, + ERR_ABORT = 0x80000004, + ERR_NO_ELEMENT = 0x80000005, + ERR_NO_USER = 0x80000006, + ERR_BAD_DATA = 0x80000007, + ERR_NOT_IMPLEMENTED = 0x80000008, + ERR_UNKNOWN_ERROR = 0x80000009, /* what is this? */ + ERR_STARVING = 0x8000000a, + ERR_CHANNEL_NO_SUPPORT = 0x8000000b, + ERR_CHANNEL_EXISTS = 0x8000000c, + ERR_SERVICE_NO_SUPPORT = 0x8000000d, + ERR_PROTOCOL_NO_SUPPORT = 0x8000000e, + ERR_PROTOCOL_NO_SUPPORT2 = 0x8000000f, /* duplicate? */ + ERR_VERSION_NO_SUPPORT = 0x80000010, + ERR_USER_SKETCHY = 0x80000011, + ERR_ALREADY_INITIALIZED = 0x80000013, + ERR_NOT_OWNER = 0x80000014, + ERR_TOKEN_INVALID = 0x80000015, + ERR_TOKEN_EXPIRED = 0x80000016, + ERR_TOKEN_IP_MISMATCH = 0x80000017, + ERR_PORT_IN_USE = 0x80000018, + ERR_NETWORK_DEAD = 0x80000019, + ERR_NO_MASTER_CHANNEL = 0x8000001a, + ERR_ALREADY_SUBSCRIBED = 0x8000001b, + ERR_NOT_SUBSCRIBED = 0x8000001c, + ERR_ENCRYPT_NO_SUPPORT = 0x8000001d, + ERR_ENCRYPT_UNINITIALIZED = 0x8000001e, + ERR_ENCRYPT_UNACCEPTABLE = 0x8000001f, + ERR_ENCRYPT_INVALID = 0x80000020, + ERR_NO_COMMON_ENCRYPT = 0x80000021, + ERR_CHANNEL_DESTROYED = 0x80000022, + /// Miranda NG development start + //ERR_CHANNEL_REDIRECTED = 0x80000023 + ERR_CHANNEL_REDIRECTED = 0x00000023, ERR_INCORRECT_ENTRY = 0x80000239 - /// Miranda NG development end -}; - - -/* 8.3.1.2 Connection/disconnection errors */ - -#define VERSION_MISMATCH 0x80000200 -#define INSUF_BUFFER 0x80000201 -#define NOT_IN_USE 0x80000202 -#define INSUF_SOCKET 0x80000203 -#define HARDWARE_ERROR 0x80000204 -#define NETWORK_DOWN 0x80000205 -#define HOST_DOWN 0x80000206 -#define HOST_UNREACHABLE 0x80000207 -#define TCPIP_ERROR 0x80000208 -#define FAT_MESSAGE 0x80000209 -#define PROXY_ERROR 0x8000020A -#define SERVER_FULL 0x8000020B -#define SERVER_NORESPOND 0x8000020C -#define CANT_CONNECT 0x8000020D -#define USER_REMOVED 0x8000020E -#define PROTOCOL_ERROR 0x8000020F -#define USER_RESTRICTED 0x80000210 -#define INCORRECT_LOGIN 0x80000211 -#define ENCRYPT_MISMATCH 0x80000212 -#define USER_UNREGISTERED 0x80000213 -#define VERIFICATION_DOWN 0x80000214 -#define USER_TOO_IDLE 0x80000216 -#define GUEST_IN_USE 0x80000217 -#define USER_EXISTS 0x80000218 -#define USER_RE_LOGIN 0x80000219 -#define BAD_NAME 0x8000021A -#define REG_MODE_NS 0x8000021B -#define WRONG_USER_PRIV 0x8000021C -#define NEED_EMAIL 0x8000021D -#define DNS_ERROR 0x8000021E -#define DNS_FATAL_ERROR 0x8000021F -#define DNS_NOT_FOUND 0x80000220 -#define CONNECTION_BROKEN 0x80000221 -#define CONNECTION_ABORTED 0x80000222 -#define CONNECTION_REFUSED 0x80000223 -#define CONNECTION_RESET 0x80000224 -#define CONNECTION_TIMED 0x80000225 -#define CONNECTION_CLOSED 0x80000226 -#define MULTI_SERVER_LOGIN 0x80000227 -#define MULTI_SERVER_LOGIN2 0x80000228 -#define MULTI_LOGIN_COMP 0x80000229 -#define MUTLI_LOGIN_ALREADY 0x8000022A -#define SERVER_BROKEN 0x8000022B -#define SERVER_PATH_OLD 0x8000022C -#define APPLET_LOGOUT 0x8000022D - - -/* 8.3.1.3 Client error codes */ - -/** @enum ERR_CLIENT - Client error codes */ -enum ERR_CLIENT { - ERR_CLIENT_USER_GONE = 0x80002000, /* user isn't here */ - ERR_CLIENT_USER_DND = 0x80002001, /* user is DND */ - ERR_CLIENT_USER_ELSEWHERE = 0x80002002, /* already logged in elsewhere */ -}; - - -/* 8.3.1.4 IM error codes */ - -/** @enum ERR_IM - IM error codes */ -enum ERR_IM { - ERR_IM_COULDNT_REGISTER = 0x80002003, - ERR_IM_ALREADY_REGISTERED = 0x80002004, - - /** apparently, this is used to mean that the requested feature (per - the channel create addtl data) is not supported by the client on - the other end of the IM channel */ - ERR_IM_NOT_REGISTERED = 0x80002005, -}; - - -/// Miranda NG development start -/* 8.3.1.5 Resolve error codes */ - -/** @enum ERR_RESOLVE -Resolve error codes */ -enum ERR_RESOLVE { - ERR_RESOLVE_NOTCOMPLETED = 0x00010000, - ERR_RESOLVE_NAMENOTUNIQUE = 0x80020000, + /// Miranda NG development end +}; + + +/* 8.3.1.2 Connection/disconnection errors */ + +#define VERSION_MISMATCH 0x80000200 +#define INSUF_BUFFER 0x80000201 +#define NOT_IN_USE 0x80000202 +#define INSUF_SOCKET 0x80000203 +#define HARDWARE_ERROR 0x80000204 +#define NETWORK_DOWN 0x80000205 +#define HOST_DOWN 0x80000206 +#define HOST_UNREACHABLE 0x80000207 +#define TCPIP_ERROR 0x80000208 +#define FAT_MESSAGE 0x80000209 +#define PROXY_ERROR 0x8000020A +#define SERVER_FULL 0x8000020B +#define SERVER_NORESPOND 0x8000020C +#define CANT_CONNECT 0x8000020D +#define USER_REMOVED 0x8000020E +#define PROTOCOL_ERROR 0x8000020F +#define USER_RESTRICTED 0x80000210 +#define INCORRECT_LOGIN 0x80000211 +#define ENCRYPT_MISMATCH 0x80000212 +#define USER_UNREGISTERED 0x80000213 +#define VERIFICATION_DOWN 0x80000214 +#define USER_TOO_IDLE 0x80000216 +#define GUEST_IN_USE 0x80000217 +#define USER_EXISTS 0x80000218 +#define USER_RE_LOGIN 0x80000219 +#define BAD_NAME 0x8000021A +#define REG_MODE_NS 0x8000021B +#define WRONG_USER_PRIV 0x8000021C +#define NEED_EMAIL 0x8000021D +#define DNS_ERROR 0x8000021E +#define DNS_FATAL_ERROR 0x8000021F +#define DNS_NOT_FOUND 0x80000220 +#define CONNECTION_BROKEN 0x80000221 +#define CONNECTION_ABORTED 0x80000222 +#define CONNECTION_REFUSED 0x80000223 +#define CONNECTION_RESET 0x80000224 +#define CONNECTION_TIMED 0x80000225 +#define CONNECTION_CLOSED 0x80000226 +#define MULTI_SERVER_LOGIN 0x80000227 +#define MULTI_SERVER_LOGIN2 0x80000228 +#define MULTI_LOGIN_COMP 0x80000229 +#define MUTLI_LOGIN_ALREADY 0x8000022A +#define SERVER_BROKEN 0x8000022B +#define SERVER_PATH_OLD 0x8000022C +#define APPLET_LOGOUT 0x8000022D + + +/* 8.3.1.3 Client error codes */ + +/** @enum ERR_CLIENT + Client error codes */ +enum ERR_CLIENT { + ERR_CLIENT_USER_GONE = 0x80002000, /* user isn't here */ + ERR_CLIENT_USER_DND = 0x80002001, /* user is DND */ + ERR_CLIENT_USER_ELSEWHERE = 0x80002002, /* already logged in elsewhere */ +}; + + +/* 8.3.1.4 IM error codes */ + +/** @enum ERR_IM + IM error codes */ +enum ERR_IM { + ERR_IM_COULDNT_REGISTER = 0x80002003, + ERR_IM_ALREADY_REGISTERED = 0x80002004, + + /** apparently, this is used to mean that the requested feature (per + the channel create addtl data) is not supported by the client on + the other end of the IM channel */ + ERR_IM_NOT_REGISTERED = 0x80002005, +}; + + +/// Miranda NG development start +/* 8.3.1.5 Resolve error codes */ + +/** @enum ERR_RESOLVE +Resolve error codes */ +enum ERR_RESOLVE { + ERR_RESOLVE_NOTCOMPLETED = 0x00010000, + ERR_RESOLVE_NAMENOTUNIQUE = 0x80020000, ERR_RESOLVE_NAMENOTRESOLVABLE = 0x80030000 -}; -/// Miranda NG development end - -#ifdef __cplusplus -} -#endif - - -#endif /* _MW_ERROR_H */ +}; +/// Miranda NG development end + +#ifdef __cplusplus +} +#endif + + +#endif /* _MW_ERROR_H */ diff --git a/protocols/Steam/src/api/enums.h b/protocols/Steam/src/api/enums.h index 087b99c5fa..2cf767e37f 100644 --- a/protocols/Steam/src/api/enums.h +++ b/protocols/Steam/src/api/enums.h @@ -1,88 +1,88 @@ -#ifndef _STEAM_ENUMS_H_ -#define _STEAM_ENUMS_H_ - -enum VisibilityState -{ - Private = 1, - FriendsOnly = 2, - FriendsOfFriends = 3, - UsersOnly = 4, - Public = 5, -}; - -enum PersonaState -{ - Offline = 0, - Online = 1, - Busy = 2, - Away = 3, - Snooze = 4, - LookingToTrade = 5, - LookingToPlay = 6, - Invisible = 7, -}; - -enum class PersonaStateFlag : int -{ - None = 0, - HasRichPresence = 1, - InJoinableGame = 2, - ClientTypeWeb = 256, - ClientTypeMobile = 512, - ClientTypeBigPicture = 1024, - ClientTypeVR = 2048, -}; - -inline PersonaStateFlag operator &(PersonaStateFlag lhs, PersonaStateFlag rhs) -{ - return static_cast ( - static_cast::type>(lhs) & - static_cast::type>(rhs)); -} - -enum class PersonaStatusFlag : int -{ - Status = 1, - PlayerName = 2, - QueryPort = 4, - SourceID = 8, - Presence = 16, - Metadata = 32, - LastSeen = 64, - ClanInfo = 128, - GameExtraInfo = 256, - GameDataBlob = 512, - ClanTag = 1024, - Facebook = 2048, - Unknown = 4096, -}; - -inline PersonaStatusFlag operator &(PersonaStatusFlag lhs, PersonaStatusFlag rhs) -{ - return static_cast ( - static_cast::type>(lhs) & - static_cast::type>(rhs)); -} - -enum class PersonaRelationshipAction : int -{ - // friend removed from contact list - Remove = 0, - // friend added you to ignore list - Ignore = 1, - // friend requested auth - AuthRequest = 2, - // friend added you to contact list - AddToList = 3, - // friend got (or approved?) your auth request - AuthRequested = 4, -}; - -template -bool contains_flag(T x, T y) { - return (static_cast::type>(x) - & static_cast::type>(y)) - == static_cast::type>(y); -} - -#endif //_STEAM_ENUMS_H_ +#ifndef _STEAM_ENUMS_H_ +#define _STEAM_ENUMS_H_ + +enum VisibilityState +{ + Private = 1, + FriendsOnly = 2, + FriendsOfFriends = 3, + UsersOnly = 4, + Public = 5, +}; + +enum PersonaState +{ + Offline = 0, + Online = 1, + Busy = 2, + Away = 3, + Snooze = 4, + LookingToTrade = 5, + LookingToPlay = 6, + Invisible = 7, +}; + +enum class PersonaStateFlag : int +{ + None = 0, + HasRichPresence = 1, + InJoinableGame = 2, + ClientTypeWeb = 256, + ClientTypeMobile = 512, + ClientTypeBigPicture = 1024, + ClientTypeVR = 2048, +}; + +inline PersonaStateFlag operator &(PersonaStateFlag lhs, PersonaStateFlag rhs) +{ + return static_cast ( + static_cast::type>(lhs) & + static_cast::type>(rhs)); +} + +enum class PersonaStatusFlag : int +{ + Status = 1, + PlayerName = 2, + QueryPort = 4, + SourceID = 8, + Presence = 16, + Metadata = 32, + LastSeen = 64, + ClanInfo = 128, + GameExtraInfo = 256, + GameDataBlob = 512, + ClanTag = 1024, + Facebook = 2048, + Unknown = 4096, +}; + +inline PersonaStatusFlag operator &(PersonaStatusFlag lhs, PersonaStatusFlag rhs) +{ + return static_cast ( + static_cast::type>(lhs) & + static_cast::type>(rhs)); +} + +enum class PersonaRelationshipAction : int +{ + // friend removed from contact list + Remove = 0, + // friend added you to ignore list + Ignore = 1, + // friend requested auth + AuthRequest = 2, + // friend added you to contact list + AddToList = 3, + // friend got (or approved?) your auth request + AuthRequested = 4, +}; + +template +bool contains_flag(T x, T y) { + return (static_cast::type>(x) + & static_cast::type>(y)) + == static_cast::type>(y); +} + +#endif //_STEAM_ENUMS_H_ diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index a6bac4aafb..f185171edd 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -1,354 +1,354 @@ -#include "stdafx.h" - -CSteamProto::CSteamProto(const char *protoName, const wchar_t *userName) : - PROTO(protoName, userName), - m_requestQueue(1), hAuthProcess(1), hMessageProcess(1) -{ - CreateProtoService(PS_CREATEACCMGRUI, &CSteamProto::OnAccountManagerInit); - - m_hRequestsQueueEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - - // default group - m_defaultGroup = getWStringA("DefaultGroup"); - if (m_defaultGroup == nullptr) - m_defaultGroup = mir_wstrdup(L"Steam"); - - // icons - wchar_t filePath[MAX_PATH]; - GetModuleFileName(g_plugin.getInst(), filePath, MAX_PATH); - - wchar_t sectionName[100]; - mir_snwprintf(sectionName, L"%s/%s", LPGENW("Protocols"), _A2W(MODULE)); - - char settingName[100]; - mir_snprintf(settingName, "%s_%s", MODULE, "main"); - - SKINICONDESC sid = {}; - sid.flags = SIDF_ALL_UNICODE; - sid.defaultFile.w = filePath; - sid.pszName = settingName; - sid.section.w = sectionName; - sid.description.w = LPGENW("Protocol icon"); - sid.iDefaultIndex = -IDI_STEAM; - g_plugin.addIcon(&sid); - - mir_snprintf(settingName, "%s_%s", MODULE, "gaming"); - sid.description.w = LPGENW("Gaming icon"); - sid.iDefaultIndex = -IDI_GAMING; - g_plugin.addIcon(&sid); - - // temporary DB settings - db_set_resident(m_szModuleName, "XStatusId"); - db_set_resident(m_szModuleName, "XStatusName"); - db_set_resident(m_szModuleName, "XStatusMsg"); - db_set_resident(m_szModuleName, "IdleTS"); - db_set_resident(m_szModuleName, "GameID"); - db_set_resident(m_szModuleName, "ServerIP"); - db_set_resident(m_szModuleName, "ServerID"); - - SetAllContactStatuses(ID_STATUS_OFFLINE); - - // avatar API - CreateProtoService(PS_GETAVATARINFO, &CSteamProto::GetAvatarInfo); - CreateProtoService(PS_GETAVATARCAPS, &CSteamProto::GetAvatarCaps); - CreateProtoService(PS_GETMYAVATAR, &CSteamProto::GetMyAvatar); - - // custom status API - CreateProtoService(PS_GETCUSTOMSTATUSEX, &CSteamProto::OnGetXStatusEx); - CreateProtoService(PS_GETCUSTOMSTATUSICON, &CSteamProto::OnGetXStatusIcon); - CreateProtoService(PS_GETADVANCEDSTATUSICON, &CSteamProto::OnRequestAdvStatusIconIdx); - - // menus - CreateProtoService(PS_MENU_REQAUTH, &CSteamProto::AuthRequestCommand); - CreateProtoService(PS_MENU_REVOKEAUTH, &CSteamProto::AuthRevokeCommand); - - // custom db events API - CreateProtoService(STEAM_DB_GETEVENTTEXT_CHATSTATES, &CSteamProto::OnGetEventTextChatStates); - - // hooks - HookProtoEvent(ME_OPT_INITIALISE, &CSteamProto::OnOptionsInit); - - // netlib support - NETLIBUSER nlu = {}; - nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; - nlu.szDescriptiveName.w = m_tszUserName; - nlu.szSettingsModule = m_szModuleName; - m_hNetlibUser = Netlib_RegisterUser(&nlu); - - debugLogA(__FUNCTION__":Setting protocol / module name to '%s'", m_szModuleName); - - if (uint32_t iGlobalValue = getDword(DB_KEY_LASTMSGTS)) { - for (auto &cc : AccContacts()) - setDword(cc, DB_KEY_LASTMSGTS, iGlobalValue); - delSetting(DB_KEY_LASTMSGTS); - } -} - -CSteamProto::~CSteamProto() -{ - if (m_hRequestsQueueEvent) { - CloseHandle(m_hRequestsQueueEvent); - m_hRequestsQueueEvent = nullptr; - } -} - -MCONTACT CSteamProto::AddToList(int, PROTOSEARCHRESULT *psr) -{ - MCONTACT hContact = AddContact(T2Utf(psr->id.w), psr->nick.w, true); - - if (psr->cbSize == sizeof(STEAM_SEARCH_RESULT)) { - STEAM_SEARCH_RESULT *ssr = (STEAM_SEARCH_RESULT *)psr; - UpdateContactDetails(hContact, *ssr->data); - } - - return hContact; -} - -MCONTACT CSteamProto::AddToListByEvent(int, int, MEVENT hDbEvent) -{ - DB::EventInfo dbei; - dbei.cbBlob = -1; - if (db_event_get(hDbEvent, &dbei)) - return 0; - if (mir_strcmp(dbei.szModule, m_szModuleName)) - return 0; - if (dbei.eventType != EVENTTYPE_AUTHREQUEST) - return 0; - - DB::AUTH_BLOB blob(dbei.pBlob); - return AddContact(blob.get_email(), Utf2T(blob.get_nick())); -} - -int CSteamProto::Authorize(MEVENT hDbEvent) -{ - if (IsOnline() && hDbEvent) { - MCONTACT hContact = GetContactFromAuthEvent(hDbEvent); - if (hContact == INVALID_CONTACT_ID) - return 1; - - ptrA token(getStringA("TokenSecret")); - ptrA sessionId(getStringA("SessionID")); - ptrA steamId(getStringA("SteamID")); - char *who = getStringA(hContact, "SteamID"); - - PushRequest( - new ApprovePendingRequest(token, sessionId, steamId, who), - &CSteamProto::OnPendingApproved, - who); - - return 0; - } - - return 1; -} - -int CSteamProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT *pre) -{ - // remember to not create this event again, unless authorization status changes again - setByte(hContact, "AuthAsked", 1); - return Proto_AuthRecv(m_szModuleName, pre); -} - -int CSteamProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) -{ - if (IsOnline() && hDbEvent) { - MCONTACT hContact = GetContactFromAuthEvent(hDbEvent); - if (hContact == INVALID_CONTACT_ID) - return 1; - - ptrA token(getStringA("TokenSecret")); - ptrA sessionId(getStringA("SessionID")); - ptrA steamId(getStringA("SteamID")); - char *who = getStringA(hContact, "SteamID"); - - PushRequest( - new IgnorePendingRequest(token, sessionId, steamId, who), - &CSteamProto::OnPendingIgnoreded, - who); - - return 0; - } - - return 1; -} - -int CSteamProto::AuthRequest(MCONTACT hContact, const wchar_t*) -{ - if (IsOnline() && hContact) { - UINT hAuth = InterlockedIncrement(&hAuthProcess); - - SendAuthParam *param = (SendAuthParam*)mir_calloc(sizeof(SendAuthParam)); - param->hContact = hContact; - param->hAuth = (HANDLE)hAuth; - - ptrA token(getStringA("TokenSecret")); - ptrA sessionId(getStringA("SessionID")); - ptrA steamId(getStringA("SteamID")); - ptrA who(getStringA(hContact, "SteamID")); - - PushRequest( - new AddFriendRequest(token, sessionId, steamId, who), - &CSteamProto::OnFriendAdded, - param); - - return hAuth; - } - - return 1; -} - -INT_PTR CSteamProto::GetCaps(int type, MCONTACT) -{ - switch (type) { - case PFLAGNUM_1: - return PF1_IM | PF1_BASICSEARCH | PF1_SEARCHBYNAME | PF1_AUTHREQ | PF1_SERVERCLIST | PF1_ADDSEARCHRES | PF1_MODEMSGRECV; - case PFLAGNUM_2: - return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE; - case PFLAGNUM_4: - return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_SUPPORTIDLE | PF4_SUPPORTTYPING;// | PF4_IMSENDOFFLINE; - case PFLAGNUM_5: - return PF2_HEAVYDND | PF2_FREECHAT; - case PFLAG_UNIQUEIDTEXT: - return (INT_PTR)TranslateT("SteamID"); - default: - return 0; - } -} - -HANDLE CSteamProto::SearchBasic(const wchar_t* id) -{ - if (!this->IsOnline()) - return nullptr; - - ptrA steamId(mir_u2a(id)); - PushRequest(new GetUserSummariesRequest(this, steamId), &CSteamProto::OnSearchResults, (HANDLE)STEAM_SEARCH_BYID); - - return (HANDLE)STEAM_SEARCH_BYID; -} - -HANDLE CSteamProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName) -{ - if (!IsOnline()) - return nullptr; - - // Combine all fields to single text - wchar_t keywordsT[200]; - mir_snwprintf(keywordsT, L"%s %s %s", nick, firstName, lastName); - - ptrA token(getStringA("TokenSecret")); - ptrA keywords(mir_utf8encodeW(rtrimw(keywordsT))); - - PushRequest( - new SearchRequest(token, keywords), - &CSteamProto::OnSearchByNameStarted, - (HANDLE)STEAM_SEARCH_BYNAME); - - return (HANDLE)STEAM_SEARCH_BYNAME; -} - -int CSteamProto::SendMsg(MCONTACT hContact, int, const char *message) -{ - if (!IsOnline()) { - ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, nullptr, (LPARAM)TranslateT("You cannot send messages when you are offline.")); - return 0; - } - - return OnSendMessage(hContact, message); -} - -int CSteamProto::SetStatus(int new_status) -{ - // Routing statuses not supported by Steam - switch (new_status) { - case ID_STATUS_OFFLINE: - case ID_STATUS_AWAY: - case ID_STATUS_NA: - case ID_STATUS_INVISIBLE: - break; - - case ID_STATUS_DND: - case ID_STATUS_OCCUPIED: - new_status = ID_STATUS_NA; - break; - - default: - new_status = ID_STATUS_ONLINE; - break; - } - - { - mir_cslock lock(m_setStatusLock); - if (new_status == m_iDesiredStatus) - return 0; - } - - debugLogA(__FUNCTION__ ": changing status from %i to %i", m_iStatus, new_status); - - int old_status = m_iStatus; - m_iDesiredStatus = new_status; - - if (new_status == ID_STATUS_OFFLINE) { - // Reset relogin flag - isLoginAgain = false; - - m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - - if (!Miranda_IsTerminated()) - SetAllContactStatuses(ID_STATUS_OFFLINE); - - Logout(); - } - else if (m_hRequestQueueThread == nullptr && !IsStatusConnecting(m_iStatus)) { - m_iStatus = ID_STATUS_CONNECTING; - m_isTerminated = false; - ForkThread(&CSteamProto::RequestQueueThread); - - Login(); - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus); - } - else if (IsOnline()) { - m_iStatus = new_status; - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus); - } - return 0; -} - -void CSteamProto::GetAwayMsgThread(void *arg) -{ - // Maybe not needed, but better to be sure that this won't happen faster than core handling return value of GetAwayMsg() - Sleep(50); - - MCONTACT hContact = (UINT_PTR)arg; - CMStringW message(db_get_wsm(hContact, "CList", "StatusMsg")); - - // if contact has no status message, get xstatus message - if (message.IsEmpty()) { - ptrW xStatusName(getWStringA(hContact, "XStatusName")); - ptrW xStatusMsg(getWStringA(hContact, "XStatusMsg")); - - if (xStatusName) - message.AppendFormat(L"%s: %s", xStatusName.get(), xStatusMsg.get()); - else - message.Append(xStatusMsg); - } - - ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)message.c_str()); -} - -HANDLE CSteamProto::GetAwayMsg(MCONTACT hContact) -{ - ForkThread(&CSteamProto::GetAwayMsgThread, (void*)hContact); - return (HANDLE)1; -} - -void CSteamProto::OnContactDeleted(MCONTACT hContact) -{ - // remove only authorized contacts - if (!getByte(hContact, "Auth", 0)) { - ptrA token(getStringA("TokenSecret")); - ptrA sessionId(getStringA("SessionID")); - ptrA steamId(getStringA("SteamID")); - char *who = getStringA(hContact, "SteamID"); - PushRequest(new RemoveFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendRemoved, (void*)who); - } -} +#include "stdafx.h" + +CSteamProto::CSteamProto(const char *protoName, const wchar_t *userName) : + PROTO(protoName, userName), + m_requestQueue(1), hAuthProcess(1), hMessageProcess(1) +{ + CreateProtoService(PS_CREATEACCMGRUI, &CSteamProto::OnAccountManagerInit); + + m_hRequestsQueueEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + + // default group + m_defaultGroup = getWStringA("DefaultGroup"); + if (m_defaultGroup == nullptr) + m_defaultGroup = mir_wstrdup(L"Steam"); + + // icons + wchar_t filePath[MAX_PATH]; + GetModuleFileName(g_plugin.getInst(), filePath, MAX_PATH); + + wchar_t sectionName[100]; + mir_snwprintf(sectionName, L"%s/%s", LPGENW("Protocols"), _A2W(MODULE)); + + char settingName[100]; + mir_snprintf(settingName, "%s_%s", MODULE, "main"); + + SKINICONDESC sid = {}; + sid.flags = SIDF_ALL_UNICODE; + sid.defaultFile.w = filePath; + sid.pszName = settingName; + sid.section.w = sectionName; + sid.description.w = LPGENW("Protocol icon"); + sid.iDefaultIndex = -IDI_STEAM; + g_plugin.addIcon(&sid); + + mir_snprintf(settingName, "%s_%s", MODULE, "gaming"); + sid.description.w = LPGENW("Gaming icon"); + sid.iDefaultIndex = -IDI_GAMING; + g_plugin.addIcon(&sid); + + // temporary DB settings + db_set_resident(m_szModuleName, "XStatusId"); + db_set_resident(m_szModuleName, "XStatusName"); + db_set_resident(m_szModuleName, "XStatusMsg"); + db_set_resident(m_szModuleName, "IdleTS"); + db_set_resident(m_szModuleName, "GameID"); + db_set_resident(m_szModuleName, "ServerIP"); + db_set_resident(m_szModuleName, "ServerID"); + + SetAllContactStatuses(ID_STATUS_OFFLINE); + + // avatar API + CreateProtoService(PS_GETAVATARINFO, &CSteamProto::GetAvatarInfo); + CreateProtoService(PS_GETAVATARCAPS, &CSteamProto::GetAvatarCaps); + CreateProtoService(PS_GETMYAVATAR, &CSteamProto::GetMyAvatar); + + // custom status API + CreateProtoService(PS_GETCUSTOMSTATUSEX, &CSteamProto::OnGetXStatusEx); + CreateProtoService(PS_GETCUSTOMSTATUSICON, &CSteamProto::OnGetXStatusIcon); + CreateProtoService(PS_GETADVANCEDSTATUSICON, &CSteamProto::OnRequestAdvStatusIconIdx); + + // menus + CreateProtoService(PS_MENU_REQAUTH, &CSteamProto::AuthRequestCommand); + CreateProtoService(PS_MENU_REVOKEAUTH, &CSteamProto::AuthRevokeCommand); + + // custom db events API + CreateProtoService(STEAM_DB_GETEVENTTEXT_CHATSTATES, &CSteamProto::OnGetEventTextChatStates); + + // hooks + HookProtoEvent(ME_OPT_INITIALISE, &CSteamProto::OnOptionsInit); + + // netlib support + NETLIBUSER nlu = {}; + nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; + nlu.szDescriptiveName.w = m_tszUserName; + nlu.szSettingsModule = m_szModuleName; + m_hNetlibUser = Netlib_RegisterUser(&nlu); + + debugLogA(__FUNCTION__":Setting protocol / module name to '%s'", m_szModuleName); + + if (uint32_t iGlobalValue = getDword(DB_KEY_LASTMSGTS)) { + for (auto &cc : AccContacts()) + setDword(cc, DB_KEY_LASTMSGTS, iGlobalValue); + delSetting(DB_KEY_LASTMSGTS); + } +} + +CSteamProto::~CSteamProto() +{ + if (m_hRequestsQueueEvent) { + CloseHandle(m_hRequestsQueueEvent); + m_hRequestsQueueEvent = nullptr; + } +} + +MCONTACT CSteamProto::AddToList(int, PROTOSEARCHRESULT *psr) +{ + MCONTACT hContact = AddContact(T2Utf(psr->id.w), psr->nick.w, true); + + if (psr->cbSize == sizeof(STEAM_SEARCH_RESULT)) { + STEAM_SEARCH_RESULT *ssr = (STEAM_SEARCH_RESULT *)psr; + UpdateContactDetails(hContact, *ssr->data); + } + + return hContact; +} + +MCONTACT CSteamProto::AddToListByEvent(int, int, MEVENT hDbEvent) +{ + DB::EventInfo dbei; + dbei.cbBlob = -1; + if (db_event_get(hDbEvent, &dbei)) + return 0; + if (mir_strcmp(dbei.szModule, m_szModuleName)) + return 0; + if (dbei.eventType != EVENTTYPE_AUTHREQUEST) + return 0; + + DB::AUTH_BLOB blob(dbei.pBlob); + return AddContact(blob.get_email(), Utf2T(blob.get_nick())); +} + +int CSteamProto::Authorize(MEVENT hDbEvent) +{ + if (IsOnline() && hDbEvent) { + MCONTACT hContact = GetContactFromAuthEvent(hDbEvent); + if (hContact == INVALID_CONTACT_ID) + return 1; + + ptrA token(getStringA("TokenSecret")); + ptrA sessionId(getStringA("SessionID")); + ptrA steamId(getStringA("SteamID")); + char *who = getStringA(hContact, "SteamID"); + + PushRequest( + new ApprovePendingRequest(token, sessionId, steamId, who), + &CSteamProto::OnPendingApproved, + who); + + return 0; + } + + return 1; +} + +int CSteamProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT *pre) +{ + // remember to not create this event again, unless authorization status changes again + setByte(hContact, "AuthAsked", 1); + return Proto_AuthRecv(m_szModuleName, pre); +} + +int CSteamProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) +{ + if (IsOnline() && hDbEvent) { + MCONTACT hContact = GetContactFromAuthEvent(hDbEvent); + if (hContact == INVALID_CONTACT_ID) + return 1; + + ptrA token(getStringA("TokenSecret")); + ptrA sessionId(getStringA("SessionID")); + ptrA steamId(getStringA("SteamID")); + char *who = getStringA(hContact, "SteamID"); + + PushRequest( + new IgnorePendingRequest(token, sessionId, steamId, who), + &CSteamProto::OnPendingIgnoreded, + who); + + return 0; + } + + return 1; +} + +int CSteamProto::AuthRequest(MCONTACT hContact, const wchar_t*) +{ + if (IsOnline() && hContact) { + UINT hAuth = InterlockedIncrement(&hAuthProcess); + + SendAuthParam *param = (SendAuthParam*)mir_calloc(sizeof(SendAuthParam)); + param->hContact = hContact; + param->hAuth = (HANDLE)hAuth; + + ptrA token(getStringA("TokenSecret")); + ptrA sessionId(getStringA("SessionID")); + ptrA steamId(getStringA("SteamID")); + ptrA who(getStringA(hContact, "SteamID")); + + PushRequest( + new AddFriendRequest(token, sessionId, steamId, who), + &CSteamProto::OnFriendAdded, + param); + + return hAuth; + } + + return 1; +} + +INT_PTR CSteamProto::GetCaps(int type, MCONTACT) +{ + switch (type) { + case PFLAGNUM_1: + return PF1_IM | PF1_BASICSEARCH | PF1_SEARCHBYNAME | PF1_AUTHREQ | PF1_SERVERCLIST | PF1_ADDSEARCHRES | PF1_MODEMSGRECV; + case PFLAGNUM_2: + return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_HEAVYDND | PF2_FREECHAT | PF2_INVISIBLE; + case PFLAGNUM_4: + return PF4_AVATARS | PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_FORCEAUTH | PF4_SUPPORTIDLE | PF4_SUPPORTTYPING;// | PF4_IMSENDOFFLINE; + case PFLAGNUM_5: + return PF2_HEAVYDND | PF2_FREECHAT; + case PFLAG_UNIQUEIDTEXT: + return (INT_PTR)TranslateT("SteamID"); + default: + return 0; + } +} + +HANDLE CSteamProto::SearchBasic(const wchar_t* id) +{ + if (!this->IsOnline()) + return nullptr; + + ptrA steamId(mir_u2a(id)); + PushRequest(new GetUserSummariesRequest(this, steamId), &CSteamProto::OnSearchResults, (HANDLE)STEAM_SEARCH_BYID); + + return (HANDLE)STEAM_SEARCH_BYID; +} + +HANDLE CSteamProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName) +{ + if (!IsOnline()) + return nullptr; + + // Combine all fields to single text + wchar_t keywordsT[200]; + mir_snwprintf(keywordsT, L"%s %s %s", nick, firstName, lastName); + + ptrA token(getStringA("TokenSecret")); + ptrA keywords(mir_utf8encodeW(rtrimw(keywordsT))); + + PushRequest( + new SearchRequest(token, keywords), + &CSteamProto::OnSearchByNameStarted, + (HANDLE)STEAM_SEARCH_BYNAME); + + return (HANDLE)STEAM_SEARCH_BYNAME; +} + +int CSteamProto::SendMsg(MCONTACT hContact, int, const char *message) +{ + if (!IsOnline()) { + ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, nullptr, (LPARAM)TranslateT("You cannot send messages when you are offline.")); + return 0; + } + + return OnSendMessage(hContact, message); +} + +int CSteamProto::SetStatus(int new_status) +{ + // Routing statuses not supported by Steam + switch (new_status) { + case ID_STATUS_OFFLINE: + case ID_STATUS_AWAY: + case ID_STATUS_NA: + case ID_STATUS_INVISIBLE: + break; + + case ID_STATUS_DND: + case ID_STATUS_OCCUPIED: + new_status = ID_STATUS_NA; + break; + + default: + new_status = ID_STATUS_ONLINE; + break; + } + + { + mir_cslock lock(m_setStatusLock); + if (new_status == m_iDesiredStatus) + return 0; + } + + debugLogA(__FUNCTION__ ": changing status from %i to %i", m_iStatus, new_status); + + int old_status = m_iStatus; + m_iDesiredStatus = new_status; + + if (new_status == ID_STATUS_OFFLINE) { + // Reset relogin flag + isLoginAgain = false; + + m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; + + if (!Miranda_IsTerminated()) + SetAllContactStatuses(ID_STATUS_OFFLINE); + + Logout(); + } + else if (m_hRequestQueueThread == nullptr && !IsStatusConnecting(m_iStatus)) { + m_iStatus = ID_STATUS_CONNECTING; + m_isTerminated = false; + ForkThread(&CSteamProto::RequestQueueThread); + + Login(); + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus); + } + else if (IsOnline()) { + m_iStatus = new_status; + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus); + } + return 0; +} + +void CSteamProto::GetAwayMsgThread(void *arg) +{ + // Maybe not needed, but better to be sure that this won't happen faster than core handling return value of GetAwayMsg() + Sleep(50); + + MCONTACT hContact = (UINT_PTR)arg; + CMStringW message(db_get_wsm(hContact, "CList", "StatusMsg")); + + // if contact has no status message, get xstatus message + if (message.IsEmpty()) { + ptrW xStatusName(getWStringA(hContact, "XStatusName")); + ptrW xStatusMsg(getWStringA(hContact, "XStatusMsg")); + + if (xStatusName) + message.AppendFormat(L"%s: %s", xStatusName.get(), xStatusMsg.get()); + else + message.Append(xStatusMsg); + } + + ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)message.c_str()); +} + +HANDLE CSteamProto::GetAwayMsg(MCONTACT hContact) +{ + ForkThread(&CSteamProto::GetAwayMsgThread, (void*)hContact); + return (HANDLE)1; +} + +void CSteamProto::OnContactDeleted(MCONTACT hContact) +{ + // remove only authorized contacts + if (!getByte(hContact, "Auth", 0)) { + ptrA token(getStringA("TokenSecret")); + ptrA sessionId(getStringA("SessionID")); + ptrA steamId(getStringA("SteamID")); + char *who = getStringA(hContact, "SteamID"); + PushRequest(new RemoveFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendRemoved, (void*)who); + } +} diff --git a/protocols/Telegram/.gitignore b/protocols/Telegram/.gitignore index c3af857904..cc2225d405 100644 --- a/protocols/Telegram/.gitignore +++ b/protocols/Telegram/.gitignore @@ -1 +1 @@ -lib/ +lib/ diff --git a/protocols/Telegram/Telegram.vcxproj b/protocols/Telegram/Telegram.vcxproj index 9c1812a737..16b8bbd8a1 100644 --- a/protocols/Telegram/Telegram.vcxproj +++ b/protocols/Telegram/Telegram.vcxproj @@ -1,68 +1,68 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} - Telegram - - - - - - - - - - - - - Create - - - - - - .\tdlib\td;.\tdlib\td\td\generate\auto;%(AdditionalIncludeDirectories) - - - .\tdlib\lib\$(Configuration)32;%(AdditionalLibraryDirectories) - .\tdlib\lib\$(Configuration)64;%(AdditionalLibraryDirectories) - libcrypto.lib;libssl.lib;crypt32.lib;psapi.lib;Normaliz.lib;%(AdditionalDependencies) - - - - - - - - - - - {0c02e395-e73f-47e3-8b95-b7924c0c7a6a} - - - {e2a369cd-eda3-414f-8ad0-e732cd7ee68c} - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} + Telegram + + + + + + + + + + + + + Create + + + + + + .\tdlib\td;.\tdlib\td\td\generate\auto;%(AdditionalIncludeDirectories) + + + .\tdlib\lib\$(Configuration)32;%(AdditionalLibraryDirectories) + .\tdlib\lib\$(Configuration)64;%(AdditionalLibraryDirectories) + libcrypto.lib;libssl.lib;crypt32.lib;psapi.lib;Normaliz.lib;%(AdditionalDependencies) + + + + + + + + + + + {0c02e395-e73f-47e3-8b95-b7924c0c7a6a} + + + {e2a369cd-eda3-414f-8ad0-e732cd7ee68c} + + + + + + \ No newline at end of file diff --git a/protocols/Telegram/Telegram.vcxproj.filters b/protocols/Telegram/Telegram.vcxproj.filters index e6d8a2433a..528f29127c 100644 --- a/protocols/Telegram/Telegram.vcxproj.filters +++ b/protocols/Telegram/Telegram.vcxproj.filters @@ -1,60 +1,60 @@ - - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - + + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + Resource Files + + \ No newline at end of file diff --git a/protocols/Telegram/proto_telegram/CMakeLists.txt b/protocols/Telegram/proto_telegram/CMakeLists.txt index 223ee6af39..122641d52b 100644 --- a/protocols/Telegram/proto_telegram/CMakeLists.txt +++ b/protocols/Telegram/proto_telegram/CMakeLists.txt @@ -1,2 +1,2 @@ -set(TARGET Proto_Telegram) +set(TARGET Proto_Telegram) include(${CMAKE_SOURCE_DIR}/cmake/icons.cmake) \ No newline at end of file diff --git a/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj b/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj index 3eb5b57a48..715dbd2330 100644 --- a/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj +++ b/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj @@ -1,34 +1,34 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - Proto_Telegram - {129A4E61-45E8-E476-BD50-5E03BA80E9AD} - - - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + Proto_Telegram + {129A4E61-45E8-E476-BD50-5E03BA80E9AD} + + + + + + + + + + \ No newline at end of file diff --git a/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj.filters b/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj.filters index 19bac99d33..7ae0743b90 100644 --- a/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj.filters +++ b/protocols/Telegram/proto_telegram/Proto_Telegram.vcxproj.filters @@ -1,14 +1,14 @@ - - - - - - Header Files - - - - - Resource Files - - + + + + + + Header Files + + + + + Resource Files + + \ No newline at end of file diff --git a/protocols/Telegram/proto_telegram/res/Proto_Telegram.rc b/protocols/Telegram/proto_telegram/res/Proto_Telegram.rc index c72b18eb8c..201a96305c 100644 --- a/protocols/Telegram/proto_telegram/res/Proto_Telegram.rc +++ b/protocols/Telegram/proto_telegram/res/Proto_Telegram.rc @@ -1,71 +1,71 @@ -// Microsoft Visual C++ generated resource script. -// -#include "..\src\resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Russian (Russia) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "..\\src\\resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON "Offline.ico" -IDI_ICON2 ICON "Online.ico" - -#endif // Russian (Russia) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian (Russia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON1 ICON "Offline.ico" +IDI_ICON2 ICON "Online.ico" + +#endif // Russian (Russia) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/protocols/Telegram/proto_telegram/src/resource.h b/protocols/Telegram/proto_telegram/src/resource.h index 12364e6a49..192c1b9f19 100644 --- a/protocols/Telegram/proto_telegram/src/resource.h +++ b/protocols/Telegram/proto_telegram/src/resource.h @@ -1,19 +1,19 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Proto_Telegram.rc -// -#define IDI_ICON1 105 -#define IDI_ICON2 104 -#define IDI_ICON3 128 -#define IDI_ICON4 159 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 106 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Proto_Telegram.rc +// +#define IDI_ICON1 105 +#define IDI_ICON2 104 +#define IDI_ICON3 128 +#define IDI_ICON4 159 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 106 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/protocols/Telegram/res/resource.rc b/protocols/Telegram/res/resource.rc index 0aacaa94c4..8e8936badf 100644 --- a/protocols/Telegram/res/resource.rc +++ b/protocols/Telegram/res/resource.rc @@ -1,154 +1,154 @@ -// Microsoft Visual C++ generated resource script. -// -#include "..\src\resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Russian (Russia) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "..\\src\\resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Russian (Russia) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (Neutral) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL -#pragma code_page(1252) - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ACCMGRUI DIALOGEX 0, 0, 188, 144 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 400, 0, 0x0 -BEGIN - LTEXT "Phone number:",IDC_STATIC,0,6,89,10 - EDITTEXT IDC_PHONE,96,4,86,12,ES_AUTOHSCROLL - LTEXT "Default group:",IDC_STATIC,0,23,89,10 - EDITTEXT IDC_DEFGROUP,96,21,86,12,ES_AUTOHSCROLL - LTEXT "Device name:",IDC_STATIC,0,39,89,10 - EDITTEXT IDC_DEVICE_NAME,96,38,86,12,ES_AUTOHSCROLL - CONTROL "Do not open chat windows on creation",IDC_HIDECHATS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,57,182,10 -END - -IDD_OPTIONS DIALOGEX 0, 0, 305, 188 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - LTEXT "Phone number:",IDC_STATIC,5,6,79,10 - EDITTEXT IDC_PHONE,87,5,211,12,ES_AUTOHSCROLL - LTEXT "Default group:",IDC_STATIC,5,24,79,10 - EDITTEXT IDC_DEFGROUP,87,23,211,12,ES_AUTOHSCROLL - LTEXT "Device name:",IDC_STATIC,5,43,79,10 - EDITTEXT IDC_DEVICE_NAME,87,41,211,12,ES_AUTOHSCROLL - CONTROL "Do not open chat windows on creation",IDC_HIDECHATS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,64,294,10 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_TELEGRAM ICON "telegram.ico" - -IDI_PREMIUM ICON "premium.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_ACCMGRUI, DIALOG - BEGIN - END - - IDD_OPTIONS, DIALOG - BEGIN - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// AFX_DIALOG_LAYOUT -// - -IDD_ACCMGRUI AFX_DIALOG_LAYOUT -BEGIN - 0 -END - -IDD_OPTIONS AFX_DIALOG_LAYOUT -BEGIN - 0 -END - -#endif // English (Neutral) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Russian (Russia) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Russian (Russia) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Neutral) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ACCMGRUI DIALOGEX 0, 0, 188, 144 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 400, 0, 0x0 +BEGIN + LTEXT "Phone number:",IDC_STATIC,0,6,89,10 + EDITTEXT IDC_PHONE,96,4,86,12,ES_AUTOHSCROLL + LTEXT "Default group:",IDC_STATIC,0,23,89,10 + EDITTEXT IDC_DEFGROUP,96,21,86,12,ES_AUTOHSCROLL + LTEXT "Device name:",IDC_STATIC,0,39,89,10 + EDITTEXT IDC_DEVICE_NAME,96,38,86,12,ES_AUTOHSCROLL + CONTROL "Do not open chat windows on creation",IDC_HIDECHATS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,57,182,10 +END + +IDD_OPTIONS DIALOGEX 0, 0, 305, 188 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + LTEXT "Phone number:",IDC_STATIC,5,6,79,10 + EDITTEXT IDC_PHONE,87,5,211,12,ES_AUTOHSCROLL + LTEXT "Default group:",IDC_STATIC,5,24,79,10 + EDITTEXT IDC_DEFGROUP,87,23,211,12,ES_AUTOHSCROLL + LTEXT "Device name:",IDC_STATIC,5,43,79,10 + EDITTEXT IDC_DEVICE_NAME,87,41,211,12,ES_AUTOHSCROLL + CONTROL "Do not open chat windows on creation",IDC_HIDECHATS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,64,294,10 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_TELEGRAM ICON "telegram.ico" + +IDI_PREMIUM ICON "premium.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ACCMGRUI, DIALOG + BEGIN + END + + IDD_OPTIONS, DIALOG + BEGIN + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_ACCMGRUI AFX_DIALOG_LAYOUT +BEGIN + 0 +END + +IDD_OPTIONS AFX_DIALOG_LAYOUT +BEGIN + 0 +END + +#endif // English (Neutral) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/protocols/Telegram/res/telegram.ico b/protocols/Telegram/res/telegram.ico index dd8dbdb7ad..45b58cead4 100644 Binary files a/protocols/Telegram/res/telegram.ico and b/protocols/Telegram/res/telegram.ico differ diff --git a/protocols/Telegram/src/auth.cpp b/protocols/Telegram/src/auth.cpp index 3778ff1039..043628ab19 100644 --- a/protocols/Telegram/src/auth.cpp +++ b/protocols/Telegram/src/auth.cpp @@ -1,126 +1,126 @@ -/* -Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "stdafx.h" - -#include "../../../../miranda-private-keys/Telegram/api.h" - -/////////////////////////////////////////////////////////////////////////////// - -INT_PTR CALLBACK CMTProto::EnterPhoneCode(void *param) -{ - auto *ppro = (CMTProto *)param; - - ENTER_STRING es = {}; - es.szModuleName = ppro->m_szModuleName; - es.caption = TranslateT("Enter secret code sent to your phone"); - if (EnterString(&es)) { - ppro->SendQuery(new TD::checkAuthenticationCode(_T2A(es.ptszResult).get()), &CMTProto::OnUpdateAuth); - mir_free(es.ptszResult); - } - else ppro->LogOut(); - return 0; -} - -INT_PTR CALLBACK CMTProto::EnterPassword(void *param) -{ - auto *ppro = (CMTProto *)param; - CMStringW wszTitle(TranslateT("Enter password")); - - auto *pAuth = (TD::authorizationStateWaitPassword *)ppro->pAuthState.get(); - if (!pAuth->password_hint_.empty()) - wszTitle.AppendFormat(TranslateT(" (hint: %s)"), Utf2T(pAuth->password_hint_.c_str()).get()); - - ENTER_STRING es = {}; - es.szModuleName = ppro->m_szModuleName; - es.caption = wszTitle; - es.type = ESF_PASSWORD; - if (EnterString(&es)) { - ppro->SendQuery(new TD::checkAuthenticationPassword(_T2A(es.ptszResult).get()), &CMTProto::OnUpdateAuth); - mir_free(es.ptszResult); - } - else ppro->LogOut(); - return 0; -} - -void CMTProto::ProcessAuth(TD::updateAuthorizationState *pObj) -{ - pAuthState = std::move(pObj->authorization_state_); - switch (pAuthState->get_id()) { - case TD::authorizationStateWaitTdlibParameters::ID: - { - MFileVersion v; - char text[100]; - Miranda_GetFileVersion(&v); - mir_snprintf(text, "%d.%d.%d.%d", v[0], v[1], v[2], v[3]); - - CMStringW wszPath(GetProtoFolder()); - - auto *request = new TD::setTdlibParameters(); - request->database_directory_ = T2Utf(wszPath).get(); - request->use_message_database_ = false; - request->use_secret_chats_ = true; - request->api_id_ = MIRANDA_API_ID; - request->api_hash_ = MIRANDA_API_HASH; - request->system_language_code_ = "en"; - request->device_model_ = T2Utf(m_wszDeviceName).get(); - request->application_version_ = text; - request->enable_storage_optimizer_ = true; - SendQuery(request, &CMTProto::OnUpdateAuth); - } - break; - - case TD::authorizationStateWaitPhoneNumber::ID: - SendQuery(new TD::setAuthenticationPhoneNumber(_T2A(m_szOwnPhone).get(), nullptr), &CMTProto::OnUpdateAuth); - break; - - case TD::authorizationStateWaitCode::ID: - CallFunctionSync(EnterPhoneCode, this); - break; - - case TD::authorizationStateWaitPassword::ID: - CallFunctionSync(EnterPassword, this); - break; - - case TD::authorizationStateReady::ID: - OnLoggedIn(); - break; - - case TD::authorizationStateClosed::ID: - debugLogA("Connection terminated, exiting"); - LogOut(); - break; - } -} - -void CMTProto::OnUpdateAuth(td::ClientManager::Response &response) -{ - if (response.object->get_id() == TD::error::ID) { - auto *pError = (TD::error *)response.object.get(); - debugLogA("error happened: %s", to_string(*pError).c_str()); - - if (pError->message_ == "PHONE_CODE_EXPIRED") - Popup(0, TranslateT("Phone code expired"), TranslateT("Error")); - else if (pError->message_ == "INVALID_PHONE_CODE") - Popup(0, TranslateT("Invalid phone code"), TranslateT("Error")); - else if (pError->message_ == "PASSWORD_HASH_INVALID") - Popup(0, TranslateT("Invalid password"), TranslateT("Error")); - - pAuthState = std::move(nullptr); - LogOut(); - } -} +/* +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" + +#include "../../../../miranda-private-keys/Telegram/api.h" + +/////////////////////////////////////////////////////////////////////////////// + +INT_PTR CALLBACK CMTProto::EnterPhoneCode(void *param) +{ + auto *ppro = (CMTProto *)param; + + ENTER_STRING es = {}; + es.szModuleName = ppro->m_szModuleName; + es.caption = TranslateT("Enter secret code sent to your phone"); + if (EnterString(&es)) { + ppro->SendQuery(new TD::checkAuthenticationCode(_T2A(es.ptszResult).get()), &CMTProto::OnUpdateAuth); + mir_free(es.ptszResult); + } + else ppro->LogOut(); + return 0; +} + +INT_PTR CALLBACK CMTProto::EnterPassword(void *param) +{ + auto *ppro = (CMTProto *)param; + CMStringW wszTitle(TranslateT("Enter password")); + + auto *pAuth = (TD::authorizationStateWaitPassword *)ppro->pAuthState.get(); + if (!pAuth->password_hint_.empty()) + wszTitle.AppendFormat(TranslateT(" (hint: %s)"), Utf2T(pAuth->password_hint_.c_str()).get()); + + ENTER_STRING es = {}; + es.szModuleName = ppro->m_szModuleName; + es.caption = wszTitle; + es.type = ESF_PASSWORD; + if (EnterString(&es)) { + ppro->SendQuery(new TD::checkAuthenticationPassword(_T2A(es.ptszResult).get()), &CMTProto::OnUpdateAuth); + mir_free(es.ptszResult); + } + else ppro->LogOut(); + return 0; +} + +void CMTProto::ProcessAuth(TD::updateAuthorizationState *pObj) +{ + pAuthState = std::move(pObj->authorization_state_); + switch (pAuthState->get_id()) { + case TD::authorizationStateWaitTdlibParameters::ID: + { + MFileVersion v; + char text[100]; + Miranda_GetFileVersion(&v); + mir_snprintf(text, "%d.%d.%d.%d", v[0], v[1], v[2], v[3]); + + CMStringW wszPath(GetProtoFolder()); + + auto *request = new TD::setTdlibParameters(); + request->database_directory_ = T2Utf(wszPath).get(); + request->use_message_database_ = false; + request->use_secret_chats_ = true; + request->api_id_ = MIRANDA_API_ID; + request->api_hash_ = MIRANDA_API_HASH; + request->system_language_code_ = "en"; + request->device_model_ = T2Utf(m_wszDeviceName).get(); + request->application_version_ = text; + request->enable_storage_optimizer_ = true; + SendQuery(request, &CMTProto::OnUpdateAuth); + } + break; + + case TD::authorizationStateWaitPhoneNumber::ID: + SendQuery(new TD::setAuthenticationPhoneNumber(_T2A(m_szOwnPhone).get(), nullptr), &CMTProto::OnUpdateAuth); + break; + + case TD::authorizationStateWaitCode::ID: + CallFunctionSync(EnterPhoneCode, this); + break; + + case TD::authorizationStateWaitPassword::ID: + CallFunctionSync(EnterPassword, this); + break; + + case TD::authorizationStateReady::ID: + OnLoggedIn(); + break; + + case TD::authorizationStateClosed::ID: + debugLogA("Connection terminated, exiting"); + LogOut(); + break; + } +} + +void CMTProto::OnUpdateAuth(td::ClientManager::Response &response) +{ + if (response.object->get_id() == TD::error::ID) { + auto *pError = (TD::error *)response.object.get(); + debugLogA("error happened: %s", to_string(*pError).c_str()); + + if (pError->message_ == "PHONE_CODE_EXPIRED") + Popup(0, TranslateT("Phone code expired"), TranslateT("Error")); + else if (pError->message_ == "INVALID_PHONE_CODE") + Popup(0, TranslateT("Invalid phone code"), TranslateT("Error")); + else if (pError->message_ == "PASSWORD_HASH_INVALID") + Popup(0, TranslateT("Invalid password"), TranslateT("Error")); + + pAuthState = std::move(nullptr); + LogOut(); + } +} diff --git a/protocols/Telegram/src/avatars.cpp b/protocols/Telegram/src/avatars.cpp index b21ddf81d0..bd24079f5f 100644 --- a/protocols/Telegram/src/avatars.cpp +++ b/protocols/Telegram/src/avatars.cpp @@ -1,95 +1,95 @@ -/* -Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "stdafx.h" - -INT_PTR CMTProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam) -{ - switch (wParam) { - case AF_MAXSIZE: - ((POINT *)lParam)->x = 160; - ((POINT *)lParam)->y = 160; - break; - - case AF_MAXFILESIZE: - return 32000; - - case AF_PROPORTION: - return PIP_SQUARE; - - case AF_FORMATSUPPORTED: - case AF_ENABLED: - case AF_DONTNEEDDELAYS: - case AF_FETCHIFPROTONOTVISIBLE: - case AF_FETCHIFCONTACTOFFLINE: - return 1; - } - return 0; -} - -INT_PTR CMTProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam) -{ - auto *pai = (PROTO_AVATAR_INFORMATION *)lParam; - - ptrW wszPath(getWStringA(pai->hContact, DBKEY_AVATAR_PATH)); - if (wszPath == nullptr) - return GAIR_NOAVATAR; - - pai->format = getByte(pai->hContact, DBKEY_AVATAR_TYPE, PA_FORMAT_JPEG); - wcsncpy_s(pai->filename, wszPath, _TRUNCATE); - - if (::_waccess(pai->filename, 0) == 0) - return GAIR_SUCCESS; - - debugLogA("No avatar"); - return GAIR_NOAVATAR; -} - -INT_PTR CMTProto::SvcGetMyAvatar(WPARAM, LPARAM) -{ - return 1; -} - -INT_PTR CMTProto::SvcSetMyAvatar(WPARAM, LPARAM) -{ - return 1; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CMTProto::ProcessFile(TD::updateFile *pObj) -{ - if (auto *pFile = pObj->file_.get()) { - if (!pFile->local_->is_downloading_completed_) - return; - - for (auto &it : m_arUsers) { - if (it->szAvatarHash == pFile->remote_->unique_id_.c_str()) { - PROTO_AVATAR_INFORMATION pai; - wcsncpy_s(pai.filename, Utf2T(pFile->local_->path_.c_str()), _TRUNCATE); - pai.hContact = it->hContact; - pai.format = ProtoGetAvatarFileFormat(pai.filename); - - setByte(pai.hContact, DBKEY_AVATAR_TYPE, pai.format); - setWString(pai.hContact, DBKEY_AVATAR_PATH, pai.filename); - - ProtoBroadcastAck(it->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &pai); - break; - } - } - } -} +/* +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" + +INT_PTR CMTProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam) +{ + switch (wParam) { + case AF_MAXSIZE: + ((POINT *)lParam)->x = 160; + ((POINT *)lParam)->y = 160; + break; + + case AF_MAXFILESIZE: + return 32000; + + case AF_PROPORTION: + return PIP_SQUARE; + + case AF_FORMATSUPPORTED: + case AF_ENABLED: + case AF_DONTNEEDDELAYS: + case AF_FETCHIFPROTONOTVISIBLE: + case AF_FETCHIFCONTACTOFFLINE: + return 1; + } + return 0; +} + +INT_PTR CMTProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam) +{ + auto *pai = (PROTO_AVATAR_INFORMATION *)lParam; + + ptrW wszPath(getWStringA(pai->hContact, DBKEY_AVATAR_PATH)); + if (wszPath == nullptr) + return GAIR_NOAVATAR; + + pai->format = getByte(pai->hContact, DBKEY_AVATAR_TYPE, PA_FORMAT_JPEG); + wcsncpy_s(pai->filename, wszPath, _TRUNCATE); + + if (::_waccess(pai->filename, 0) == 0) + return GAIR_SUCCESS; + + debugLogA("No avatar"); + return GAIR_NOAVATAR; +} + +INT_PTR CMTProto::SvcGetMyAvatar(WPARAM, LPARAM) +{ + return 1; +} + +INT_PTR CMTProto::SvcSetMyAvatar(WPARAM, LPARAM) +{ + return 1; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CMTProto::ProcessFile(TD::updateFile *pObj) +{ + if (auto *pFile = pObj->file_.get()) { + if (!pFile->local_->is_downloading_completed_) + return; + + for (auto &it : m_arUsers) { + if (it->szAvatarHash == pFile->remote_->unique_id_.c_str()) { + PROTO_AVATAR_INFORMATION pai; + wcsncpy_s(pai.filename, Utf2T(pFile->local_->path_.c_str()), _TRUNCATE); + pai.hContact = it->hContact; + pai.format = ProtoGetAvatarFileFormat(pai.filename); + + setByte(pai.hContact, DBKEY_AVATAR_TYPE, pai.format); + setWString(pai.hContact, DBKEY_AVATAR_PATH, pai.filename); + + ProtoBroadcastAck(it->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &pai); + break; + } + } + } +} diff --git a/protocols/Telegram/src/main.cpp b/protocols/Telegram/src/main.cpp index 6af8517ab7..c00b87536d 100644 --- a/protocols/Telegram/src/main.cpp +++ b/protocols/Telegram/src/main.cpp @@ -1,52 +1,52 @@ -#include "stdafx.h" - -int hLangpack; -CMPlugin g_plugin; - -#pragma comment(lib, "tdactor.lib") -#pragma comment(lib, "tdcore.lib") -#pragma comment(lib, "tddb.lib") -#pragma comment(lib, "tdlib.lib") -#pragma comment(lib, "tdnet.lib") -#pragma comment(lib, "tdutils.lib") - -///////////////////////////////////////////////////////////////////////////////////////// - -PLUGININFOEX pluginInfo = -{ - sizeof(PLUGININFOEX), - __PLUGIN_NAME, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - __DESCRIPTION, - __AUTHOR, - __COPYRIGHT, - __AUTHORWEB, - UNICODE_AWARE, - // {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} - {0xae708252, 0xdf8, 0x42ba, {0x9e, 0xf9, 0x9a, 0xcc, 0x3, 0x8e, 0xed, 0xa7}} -}; - -CMPlugin::CMPlugin() : - ACCPROTOPLUGIN("Telegram", pluginInfo) -{ - SetUniqueId(DBKEY_ID); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; - -///////////////////////////////////////////////////////////////////////////////////////// - -static IconItem iconList[] = -{ - { LPGEN("Premium user"), "premuim", IDI_PREMIUM }, -}; - -int CMPlugin::Load() -{ - registerIcon("Protocols/Telegram", iconList, "tg"); - - m_hIcon = ExtraIcon_RegisterIcolib("tg_premium", "Telegram Premium User", getIconHandle(IDI_PREMIUM)); - return 0; -} +#include "stdafx.h" + +int hLangpack; +CMPlugin g_plugin; + +#pragma comment(lib, "tdactor.lib") +#pragma comment(lib, "tdcore.lib") +#pragma comment(lib, "tddb.lib") +#pragma comment(lib, "tdlib.lib") +#pragma comment(lib, "tdnet.lib") +#pragma comment(lib, "tdutils.lib") + +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfo = +{ + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + // {AE708252-0DF8-42BA-9EF9-9ACC038EEDA7} + {0xae708252, 0xdf8, 0x42ba, {0x9e, 0xf9, 0x9a, 0xcc, 0x3, 0x8e, 0xed, 0xa7}} +}; + +CMPlugin::CMPlugin() : + ACCPROTOPLUGIN("Telegram", pluginInfo) +{ + SetUniqueId(DBKEY_ID); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; + +///////////////////////////////////////////////////////////////////////////////////////// + +static IconItem iconList[] = +{ + { LPGEN("Premium user"), "premuim", IDI_PREMIUM }, +}; + +int CMPlugin::Load() +{ + registerIcon("Protocols/Telegram", iconList, "tg"); + + m_hIcon = ExtraIcon_RegisterIcolib("tg_premium", "Telegram Premium User", getIconHandle(IDI_PREMIUM)); + return 0; +} diff --git a/protocols/Telegram/src/mt_proto.cpp b/protocols/Telegram/src/mt_proto.cpp index a58c3ded1d..2728aa94fb 100644 --- a/protocols/Telegram/src/mt_proto.cpp +++ b/protocols/Telegram/src/mt_proto.cpp @@ -1,198 +1,198 @@ -#include "stdafx.h" - -static int CompareRequests(const TG_REQUEST_BASE *p1, const TG_REQUEST_BASE *p2) -{ - if (p1->requestId == p2->requestId) - return 0; - - return (p1->requestId < p2->requestId) ? -1 : 1; -} - -static int CompareUsers(const TG_USER *p1, const TG_USER *p2) -{ - if (p1->id == p2->id) - return 0; - - return (p1->id < p2->id) ? -1 : 1; -} - -CMTProto::CMTProto(const char* protoName, const wchar_t* userName) : - PROTO(protoName, userName), - m_impl(*this), - m_arUsers(10, CompareUsers), - m_arRequests(10, CompareRequests), - m_szOwnPhone(this, "Phone"), - m_wszDeviceName(this, "DeviceName", L"Miranda"), - m_wszDefaultGroup(this, "DefaultGroup", L"Telegram"), - m_bUsePopups(this, "UsePopups", true), - m_bHideGroupchats(this, "HideChats", true) -{ - m_iOwnId = _atoi64(getMStringA(DBKEY_ID)); - - CreateProtoService(PS_CREATEACCMGRUI, &CMTProto::SvcCreateAccMgrUI); - CreateProtoService(PS_GETAVATARCAPS, &CMTProto::SvcGetAvatarCaps); - CreateProtoService(PS_GETAVATARINFO, &CMTProto::SvcGetAvatarInfo); - CreateProtoService(PS_GETMYAVATAR, &CMTProto::SvcGetMyAvatar); - CreateProtoService(PS_SETMYAVATAR, &CMTProto::SvcSetMyAvatar); - - HookProtoEvent(ME_OPT_INITIALISE, &CMTProto::OnOptionsInit); - HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CMTProto::OnDbMarkedRead); - - // default contacts group - if (m_wszDefaultGroup == NULL) - m_wszDefaultGroup = mir_wstrdup(L"WhatsApp"); - m_iBaseGroup = Clist_GroupCreate(0, m_wszDefaultGroup); - - // Create standard network connection - NETLIBUSER nlu = {}; - nlu.flags = NUF_UNICODE; - nlu.szSettingsModule = m_szModuleName; - nlu.szDescriptiveName.w = m_tszUserName; - m_hNetlibUser = Netlib_RegisterUser(&nlu); - - // groupchat initialization - GCREGISTER gcr = {}; - gcr.dwFlags = GC_TYPNOTIF | GC_DATABASE; - gcr.ptszDispName = m_tszUserName; - gcr.pszModule = m_szModuleName; - Chat_Register(&gcr); - - // HookProtoEvent(ME_GC_EVENT, &WhatsAppProto::GcEventHook); - // HookProtoEvent(ME_GC_BUILDMENU, &WhatsAppProto::GcMenuHook); -} - -CMTProto::~CMTProto() -{ -} - -void CMTProto::OnModulesLoaded() -{ - CMStringA szId(getMStringA(DBKEY_ID)); - if (!szId.IsEmpty()) - m_arUsers.insert(new TG_USER(_atoi64(szId.c_str()), 0)); - - for (auto &cc : AccContacts()) { - bool isGroupChat = isChatRoom(cc); - szId = getMStringA(cc, isGroupChat ? "ChatRoomID" : DBKEY_ID); - if (!szId.IsEmpty()) { - auto *pUser = new TG_USER(_atoi64(szId.c_str()), cc, isGroupChat); - pUser->szAvatarHash = getMStringA(cc, DBKEY_AVATAR_HASH); - m_arUsers.insert(pUser); - } - } -} - -void CMTProto::OnShutdown() -{ - m_bTerminated = true; -} - -void CMTProto::OnErase() -{ - m_bUnregister = true; - ServerThread(0); - - DeleteDirectoryTreeW(GetProtoFolder(), false); -} - -int CMTProto::OnDbMarkedRead(WPARAM hContact, LPARAM hDbEvent) -{ - if (!hContact) - return 0; - - // filter out only events of my protocol - const char *szProto = Proto_GetBaseAccountName(hContact); - if (mir_strcmp(szProto, m_szModuleName)) - return 0; - - ptrA userId(getStringA(hContact, DBKEY_ID)); - if (userId) { - DBEVENTINFO dbei = {}; - db_event_get(hDbEvent, &dbei); - if (dbei.szId) { - mir_cslock lck(m_csMarkRead); - if (m_markContact) { - if (m_markContact != hContact) - SendMarkRead(); - - m_impl.m_markRead.Stop(); - } - - m_markContact = hContact; - m_markIds.push_back(_atoi64(dbei.szId)); - m_impl.m_markRead.Start(500); - } - } - - return 0; -} - -INT_PTR CMTProto::GetCaps(int type, MCONTACT) -{ - switch (type) { - case PFLAGNUM_1: - return PF1_IM | PF1_FILE | PF1_CHAT | PF1_BASICSEARCH | PF1_ADDSEARCHRES | PF1_MODEMSGRECV; - case PFLAGNUM_2: - return PF2_ONLINE; - case PFLAGNUM_3: - return 0; - case PFLAGNUM_4: - return PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_IMSENDOFFLINE | PF4_OFFLINEFILES | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SERVERMSGID; - case PFLAGNUM_5: - return 0; - case PFLAG_UNIQUEIDTEXT: - return (INT_PTR)L"Phone"; - } - return 0; -} - -int CMTProto::SendMsg(MCONTACT hContact, int, const char *pszMessage) -{ - ptrA szId(getStringA(hContact, DBKEY_ID)); - if (szId == nullptr) - return 0; - - return SendTextMessage(_atoi64(szId), pszMessage); -} - -int CMTProto::SetStatus(int iNewStatus) -{ - if (m_iDesiredStatus == iNewStatus) - return 0; - - int oldStatus = m_iStatus; - - // Routing statuses not supported by Telegram - switch (iNewStatus) { - case ID_STATUS_OFFLINE: - m_iDesiredStatus = iNewStatus; - break; - - case ID_STATUS_ONLINE: - case ID_STATUS_FREECHAT: - default: - m_iDesiredStatus = ID_STATUS_ONLINE; - break; - } - - if (m_iDesiredStatus == ID_STATUS_OFFLINE) { - if (isRunning()) - SendQuery(new TD::close()); - - m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); - } - else if (!isRunning() && !IsStatusConnecting(m_iStatus)) { - m_iStatus = ID_STATUS_CONNECTING; - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); - - ForkThread(&CMTProto::ServerThread); - } - else if (isRunning()) { - m_iStatus = m_iDesiredStatus; - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); - } - else ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); - - return 0; -} +#include "stdafx.h" + +static int CompareRequests(const TG_REQUEST_BASE *p1, const TG_REQUEST_BASE *p2) +{ + if (p1->requestId == p2->requestId) + return 0; + + return (p1->requestId < p2->requestId) ? -1 : 1; +} + +static int CompareUsers(const TG_USER *p1, const TG_USER *p2) +{ + if (p1->id == p2->id) + return 0; + + return (p1->id < p2->id) ? -1 : 1; +} + +CMTProto::CMTProto(const char* protoName, const wchar_t* userName) : + PROTO(protoName, userName), + m_impl(*this), + m_arUsers(10, CompareUsers), + m_arRequests(10, CompareRequests), + m_szOwnPhone(this, "Phone"), + m_wszDeviceName(this, "DeviceName", L"Miranda"), + m_wszDefaultGroup(this, "DefaultGroup", L"Telegram"), + m_bUsePopups(this, "UsePopups", true), + m_bHideGroupchats(this, "HideChats", true) +{ + m_iOwnId = _atoi64(getMStringA(DBKEY_ID)); + + CreateProtoService(PS_CREATEACCMGRUI, &CMTProto::SvcCreateAccMgrUI); + CreateProtoService(PS_GETAVATARCAPS, &CMTProto::SvcGetAvatarCaps); + CreateProtoService(PS_GETAVATARINFO, &CMTProto::SvcGetAvatarInfo); + CreateProtoService(PS_GETMYAVATAR, &CMTProto::SvcGetMyAvatar); + CreateProtoService(PS_SETMYAVATAR, &CMTProto::SvcSetMyAvatar); + + HookProtoEvent(ME_OPT_INITIALISE, &CMTProto::OnOptionsInit); + HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CMTProto::OnDbMarkedRead); + + // default contacts group + if (m_wszDefaultGroup == NULL) + m_wszDefaultGroup = mir_wstrdup(L"WhatsApp"); + m_iBaseGroup = Clist_GroupCreate(0, m_wszDefaultGroup); + + // Create standard network connection + NETLIBUSER nlu = {}; + nlu.flags = NUF_UNICODE; + nlu.szSettingsModule = m_szModuleName; + nlu.szDescriptiveName.w = m_tszUserName; + m_hNetlibUser = Netlib_RegisterUser(&nlu); + + // groupchat initialization + GCREGISTER gcr = {}; + gcr.dwFlags = GC_TYPNOTIF | GC_DATABASE; + gcr.ptszDispName = m_tszUserName; + gcr.pszModule = m_szModuleName; + Chat_Register(&gcr); + + // HookProtoEvent(ME_GC_EVENT, &WhatsAppProto::GcEventHook); + // HookProtoEvent(ME_GC_BUILDMENU, &WhatsAppProto::GcMenuHook); +} + +CMTProto::~CMTProto() +{ +} + +void CMTProto::OnModulesLoaded() +{ + CMStringA szId(getMStringA(DBKEY_ID)); + if (!szId.IsEmpty()) + m_arUsers.insert(new TG_USER(_atoi64(szId.c_str()), 0)); + + for (auto &cc : AccContacts()) { + bool isGroupChat = isChatRoom(cc); + szId = getMStringA(cc, isGroupChat ? "ChatRoomID" : DBKEY_ID); + if (!szId.IsEmpty()) { + auto *pUser = new TG_USER(_atoi64(szId.c_str()), cc, isGroupChat); + pUser->szAvatarHash = getMStringA(cc, DBKEY_AVATAR_HASH); + m_arUsers.insert(pUser); + } + } +} + +void CMTProto::OnShutdown() +{ + m_bTerminated = true; +} + +void CMTProto::OnErase() +{ + m_bUnregister = true; + ServerThread(0); + + DeleteDirectoryTreeW(GetProtoFolder(), false); +} + +int CMTProto::OnDbMarkedRead(WPARAM hContact, LPARAM hDbEvent) +{ + if (!hContact) + return 0; + + // filter out only events of my protocol + const char *szProto = Proto_GetBaseAccountName(hContact); + if (mir_strcmp(szProto, m_szModuleName)) + return 0; + + ptrA userId(getStringA(hContact, DBKEY_ID)); + if (userId) { + DBEVENTINFO dbei = {}; + db_event_get(hDbEvent, &dbei); + if (dbei.szId) { + mir_cslock lck(m_csMarkRead); + if (m_markContact) { + if (m_markContact != hContact) + SendMarkRead(); + + m_impl.m_markRead.Stop(); + } + + m_markContact = hContact; + m_markIds.push_back(_atoi64(dbei.szId)); + m_impl.m_markRead.Start(500); + } + } + + return 0; +} + +INT_PTR CMTProto::GetCaps(int type, MCONTACT) +{ + switch (type) { + case PFLAGNUM_1: + return PF1_IM | PF1_FILE | PF1_CHAT | PF1_BASICSEARCH | PF1_ADDSEARCHRES | PF1_MODEMSGRECV; + case PFLAGNUM_2: + return PF2_ONLINE; + case PFLAGNUM_3: + return 0; + case PFLAGNUM_4: + return PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_IMSENDOFFLINE | PF4_OFFLINEFILES | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SERVERMSGID; + case PFLAGNUM_5: + return 0; + case PFLAG_UNIQUEIDTEXT: + return (INT_PTR)L"Phone"; + } + return 0; +} + +int CMTProto::SendMsg(MCONTACT hContact, int, const char *pszMessage) +{ + ptrA szId(getStringA(hContact, DBKEY_ID)); + if (szId == nullptr) + return 0; + + return SendTextMessage(_atoi64(szId), pszMessage); +} + +int CMTProto::SetStatus(int iNewStatus) +{ + if (m_iDesiredStatus == iNewStatus) + return 0; + + int oldStatus = m_iStatus; + + // Routing statuses not supported by Telegram + switch (iNewStatus) { + case ID_STATUS_OFFLINE: + m_iDesiredStatus = iNewStatus; + break; + + case ID_STATUS_ONLINE: + case ID_STATUS_FREECHAT: + default: + m_iDesiredStatus = ID_STATUS_ONLINE; + break; + } + + if (m_iDesiredStatus == ID_STATUS_OFFLINE) { + if (isRunning()) + SendQuery(new TD::close()); + + m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); + } + else if (!isRunning() && !IsStatusConnecting(m_iStatus)) { + m_iStatus = ID_STATUS_CONNECTING; + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); + + ForkThread(&CMTProto::ServerThread); + } + else if (isRunning()) { + m_iStatus = m_iDesiredStatus; + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); + } + else ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); + + return 0; +} diff --git a/protocols/Telegram/src/mt_proto.h b/protocols/Telegram/src/mt_proto.h index 8bc5cc3c66..bf5c9e667b 100644 --- a/protocols/Telegram/src/mt_proto.h +++ b/protocols/Telegram/src/mt_proto.h @@ -1,209 +1,209 @@ -#pragma once - -#define DBKEY_ID "id" - -#define DBKEY_AVATAR_HASH "AvatarHash" -#define DBKEY_AVATAR_PATH "AvatarPath" -#define DBKEY_AVATAR_TYPE "AvatarType" - -class CMTProto; -typedef void (CMTProto:: *TG_QUERY_HANDLER)(td::ClientManager::Response &response); -typedef void (CMTProto:: *TG_QUERY_HANDLER_FULL)(td::ClientManager::Response &response, void *pUserInfo); - -struct TG_REQUEST_BASE -{ - TG_REQUEST_BASE(td::ClientManager::RequestId _1) : - requestId(_1) - {} - - virtual ~TG_REQUEST_BASE() - {} - - td::ClientManager::RequestId requestId; - - virtual void Execute(CMTProto *ppro, td::ClientManager::Response &response) = 0; -}; - -struct TG_REQUEST : public TG_REQUEST_BASE -{ - TG_REQUEST(td::ClientManager::RequestId _1, TG_QUERY_HANDLER _2) : - TG_REQUEST_BASE(_1), - pHandler(_2) - {} - - TG_QUERY_HANDLER pHandler; - - void Execute(CMTProto *ppro, td::ClientManager::Response &response) override - { - (ppro->*pHandler)(response); - } -}; - -struct TG_REQUEST_FULL : public TG_REQUEST_BASE -{ - TG_REQUEST_FULL(td::ClientManager::RequestId _1, TG_QUERY_HANDLER_FULL _2, void *_3) : - TG_REQUEST_BASE(_1), - pHandler(_2), - pUserInfo(_3) - {} - - TG_QUERY_HANDLER_FULL pHandler; - void *pUserInfo; - - void Execute(CMTProto *ppro, td::ClientManager::Response &response) override - { - (ppro->*pHandler)(response, pUserInfo); - } -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -struct TG_USER -{ - TG_USER(uint64_t _1, MCONTACT _2, bool _3 = false) : - id(_1), - hContact(_2), - isGroupChat(_3) - {} - - uint64_t id; - MCONTACT hContact; - bool isGroupChat; - CMStringA szAvatarHash; - time_t m_timer1 = 0, m_timer2 = 0; -}; - -class CMTProto : public PROTO -{ - class CProtoImpl - { - friend class CMTProto; - CMTProto &m_proto; - - CTimer m_keepAlive, m_markRead; - void OnKeepAlive(CTimer *) - { m_proto.SendKeepAlive(); - } - - void OnMarkRead(CTimer *) - { m_proto.SendMarkRead(); - } - - CProtoImpl(CMTProto &pro) : - m_proto(pro), - m_markRead(Miranda_GetSystemWindow(), UINT_PTR(this)), - m_keepAlive(Miranda_GetSystemWindow(), UINT_PTR(this)+1) - { - m_markRead.OnEvent = Callback(this, &CProtoImpl::OnMarkRead); - m_keepAlive.OnEvent = Callback(this, &CProtoImpl::OnKeepAlive); - } - } m_impl; - - bool __forceinline isRunning() const - { return m_pClientMmanager != nullptr; - } - - std::unique_ptr m_pClientMmanager; - TD::object_ptr pAuthState; - - mir_cs m_csMarkRead; - MCONTACT m_markContact = 0; - TD::array m_markIds; - - bool m_bAuthorized, m_bTerminated, m_bUnregister = false; - int32_t m_iClientId, m_iMsgId; - uint64_t m_iQueryId; - - OBJLIST m_arRequests; - - static INT_PTR CALLBACK EnterPhoneCode(void *param); - static INT_PTR CALLBACK EnterPassword(void *param); - - CMStringW GetProtoFolder() const - { return CMStringW(VARSW(L"%miranda_userdata%")) + L"\\" + _A2T(m_szModuleName); - } - - void OnEndSession(td::ClientManager::Response &response); - void OnSendMessage(td::ClientManager::Response &response, void *pUserInfo); - void OnUpdateAuth(td::ClientManager::Response &response); - - void LogOut(void); - void OnLoggedIn(void); - void ProcessResponse(td::ClientManager::Response); - - void SendKeepAlive(void); - void SendMarkRead(void); - void SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER pHandler = nullptr); - void SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER_FULL pHandler, void *pUserInfo); - int SendTextMessage(uint64_t chatId, const char *pszMessage); - - void ProcessAuth(TD::updateAuthorizationState *pObj); - void ProcessChat(TD::updateNewChat *pObj); - void ProcessChatPosition(TD::updateChatPosition *pObj); - void ProcessFile(TD::updateFile *pObj); - void ProcessGroups(TD::updateChatFilters *pObj); - void ProcessMarkRead(TD::updateChatReadInbox *pObj); - void ProcessMessage(TD::updateNewMessage *pObj); - void ProcessStatus(TD::updateUserStatus *pObj); - void ProcessUser(TD::updateUser *pObj); - - void UpdateString(MCONTACT hContact, const char *pszSetting, const std::string &str); - - // Users - int64_t m_iOwnId; - MGROUP m_iBaseGroup; - OBJLIST m_arUsers; - - TG_USER* FindUser(uint64_t id); - TG_USER* AddUser(uint64_t id, bool bIsChat); - - // Popups - HANDLE m_hPopupClass; - - void InitPopups(void); - void Popup(MCONTACT hContact, const wchar_t *szMsg, const wchar_t *szTitle); - -public: - ////////////////////////////////////////////////////////////////////////////////////// - // Ctors - - CMTProto(const char *protoName, const wchar_t *userName); - ~CMTProto(); - - ////////////////////////////////////////////////////////////////////////////////////// - // Virtual functions - - INT_PTR GetCaps(int type, MCONTACT hContact = NULL) override; - - int SendMsg(MCONTACT hContact, int flags, const char *pszMessage) override; - int SetStatus(int iNewStatus) override; - - void OnModulesLoaded() override; - void OnShutdown() override; - void OnErase() override; - - // Services ////////////////////////////////////////////////////////////////////////// - - INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM); - INT_PTR __cdecl SvcGetAvatarCaps(WPARAM, LPARAM); - INT_PTR __cdecl SvcGetAvatarInfo(WPARAM, LPARAM); - INT_PTR __cdecl SvcGetMyAvatar(WPARAM, LPARAM); - INT_PTR __cdecl SvcSetMyAvatar(WPARAM, LPARAM); - - // Events //////////////////////////////////////////////////////////////////////////// - - int __cdecl OnOptionsInit(WPARAM, LPARAM); - int __cdecl OnDbMarkedRead(WPARAM, LPARAM); - - // Options /////////////////////////////////////////////////////////////////////////// - - CMOption m_szOwnPhone; // our own phone number - CMOption m_wszDefaultGroup; // clist group to store contacts - CMOption m_wszDeviceName; // how do you see this session in Device List - CMOption m_bHideGroupchats; // do not open chat windows on creation - CMOption m_bUsePopups; - - // Processing Threads //////////////////////////////////////////////////////////////// - - void __cdecl ServerThread(void *); -}; +#pragma once + +#define DBKEY_ID "id" + +#define DBKEY_AVATAR_HASH "AvatarHash" +#define DBKEY_AVATAR_PATH "AvatarPath" +#define DBKEY_AVATAR_TYPE "AvatarType" + +class CMTProto; +typedef void (CMTProto:: *TG_QUERY_HANDLER)(td::ClientManager::Response &response); +typedef void (CMTProto:: *TG_QUERY_HANDLER_FULL)(td::ClientManager::Response &response, void *pUserInfo); + +struct TG_REQUEST_BASE +{ + TG_REQUEST_BASE(td::ClientManager::RequestId _1) : + requestId(_1) + {} + + virtual ~TG_REQUEST_BASE() + {} + + td::ClientManager::RequestId requestId; + + virtual void Execute(CMTProto *ppro, td::ClientManager::Response &response) = 0; +}; + +struct TG_REQUEST : public TG_REQUEST_BASE +{ + TG_REQUEST(td::ClientManager::RequestId _1, TG_QUERY_HANDLER _2) : + TG_REQUEST_BASE(_1), + pHandler(_2) + {} + + TG_QUERY_HANDLER pHandler; + + void Execute(CMTProto *ppro, td::ClientManager::Response &response) override + { + (ppro->*pHandler)(response); + } +}; + +struct TG_REQUEST_FULL : public TG_REQUEST_BASE +{ + TG_REQUEST_FULL(td::ClientManager::RequestId _1, TG_QUERY_HANDLER_FULL _2, void *_3) : + TG_REQUEST_BASE(_1), + pHandler(_2), + pUserInfo(_3) + {} + + TG_QUERY_HANDLER_FULL pHandler; + void *pUserInfo; + + void Execute(CMTProto *ppro, td::ClientManager::Response &response) override + { + (ppro->*pHandler)(response, pUserInfo); + } +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +struct TG_USER +{ + TG_USER(uint64_t _1, MCONTACT _2, bool _3 = false) : + id(_1), + hContact(_2), + isGroupChat(_3) + {} + + uint64_t id; + MCONTACT hContact; + bool isGroupChat; + CMStringA szAvatarHash; + time_t m_timer1 = 0, m_timer2 = 0; +}; + +class CMTProto : public PROTO +{ + class CProtoImpl + { + friend class CMTProto; + CMTProto &m_proto; + + CTimer m_keepAlive, m_markRead; + void OnKeepAlive(CTimer *) + { m_proto.SendKeepAlive(); + } + + void OnMarkRead(CTimer *) + { m_proto.SendMarkRead(); + } + + CProtoImpl(CMTProto &pro) : + m_proto(pro), + m_markRead(Miranda_GetSystemWindow(), UINT_PTR(this)), + m_keepAlive(Miranda_GetSystemWindow(), UINT_PTR(this)+1) + { + m_markRead.OnEvent = Callback(this, &CProtoImpl::OnMarkRead); + m_keepAlive.OnEvent = Callback(this, &CProtoImpl::OnKeepAlive); + } + } m_impl; + + bool __forceinline isRunning() const + { return m_pClientMmanager != nullptr; + } + + std::unique_ptr m_pClientMmanager; + TD::object_ptr pAuthState; + + mir_cs m_csMarkRead; + MCONTACT m_markContact = 0; + TD::array m_markIds; + + bool m_bAuthorized, m_bTerminated, m_bUnregister = false; + int32_t m_iClientId, m_iMsgId; + uint64_t m_iQueryId; + + OBJLIST m_arRequests; + + static INT_PTR CALLBACK EnterPhoneCode(void *param); + static INT_PTR CALLBACK EnterPassword(void *param); + + CMStringW GetProtoFolder() const + { return CMStringW(VARSW(L"%miranda_userdata%")) + L"\\" + _A2T(m_szModuleName); + } + + void OnEndSession(td::ClientManager::Response &response); + void OnSendMessage(td::ClientManager::Response &response, void *pUserInfo); + void OnUpdateAuth(td::ClientManager::Response &response); + + void LogOut(void); + void OnLoggedIn(void); + void ProcessResponse(td::ClientManager::Response); + + void SendKeepAlive(void); + void SendMarkRead(void); + void SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER pHandler = nullptr); + void SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER_FULL pHandler, void *pUserInfo); + int SendTextMessage(uint64_t chatId, const char *pszMessage); + + void ProcessAuth(TD::updateAuthorizationState *pObj); + void ProcessChat(TD::updateNewChat *pObj); + void ProcessChatPosition(TD::updateChatPosition *pObj); + void ProcessFile(TD::updateFile *pObj); + void ProcessGroups(TD::updateChatFilters *pObj); + void ProcessMarkRead(TD::updateChatReadInbox *pObj); + void ProcessMessage(TD::updateNewMessage *pObj); + void ProcessStatus(TD::updateUserStatus *pObj); + void ProcessUser(TD::updateUser *pObj); + + void UpdateString(MCONTACT hContact, const char *pszSetting, const std::string &str); + + // Users + int64_t m_iOwnId; + MGROUP m_iBaseGroup; + OBJLIST m_arUsers; + + TG_USER* FindUser(uint64_t id); + TG_USER* AddUser(uint64_t id, bool bIsChat); + + // Popups + HANDLE m_hPopupClass; + + void InitPopups(void); + void Popup(MCONTACT hContact, const wchar_t *szMsg, const wchar_t *szTitle); + +public: + ////////////////////////////////////////////////////////////////////////////////////// + // Ctors + + CMTProto(const char *protoName, const wchar_t *userName); + ~CMTProto(); + + ////////////////////////////////////////////////////////////////////////////////////// + // Virtual functions + + INT_PTR GetCaps(int type, MCONTACT hContact = NULL) override; + + int SendMsg(MCONTACT hContact, int flags, const char *pszMessage) override; + int SetStatus(int iNewStatus) override; + + void OnModulesLoaded() override; + void OnShutdown() override; + void OnErase() override; + + // Services ////////////////////////////////////////////////////////////////////////// + + INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM); + INT_PTR __cdecl SvcGetAvatarCaps(WPARAM, LPARAM); + INT_PTR __cdecl SvcGetAvatarInfo(WPARAM, LPARAM); + INT_PTR __cdecl SvcGetMyAvatar(WPARAM, LPARAM); + INT_PTR __cdecl SvcSetMyAvatar(WPARAM, LPARAM); + + // Events //////////////////////////////////////////////////////////////////////////// + + int __cdecl OnOptionsInit(WPARAM, LPARAM); + int __cdecl OnDbMarkedRead(WPARAM, LPARAM); + + // Options /////////////////////////////////////////////////////////////////////////// + + CMOption m_szOwnPhone; // our own phone number + CMOption m_wszDefaultGroup; // clist group to store contacts + CMOption m_wszDeviceName; // how do you see this session in Device List + CMOption m_bHideGroupchats; // do not open chat windows on creation + CMOption m_bUsePopups; + + // Processing Threads //////////////////////////////////////////////////////////////// + + void __cdecl ServerThread(void *); +}; diff --git a/protocols/Telegram/src/options.cpp b/protocols/Telegram/src/options.cpp index 9159d7304e..f3c5cbfb37 100644 --- a/protocols/Telegram/src/options.cpp +++ b/protocols/Telegram/src/options.cpp @@ -1,82 +1,82 @@ -/* -Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "stdafx.h" - -///////////////////////////////////////////////////////////////////////////////////////// - -class COptionsDlg : public CProtoDlgBase -{ - CCtrlCheck chkHideChats, chkUsePopups; - CCtrlEdit edtGroup, edtPhone, edtDeviceName; - ptrW m_wszOldGroup; - -public: - COptionsDlg(CMTProto *ppro, int iDlgID, bool bFullDlg) : - CProtoDlgBase(ppro, iDlgID), - chkUsePopups(this, IDC_POPUPS), - chkHideChats(this, IDC_HIDECHATS), - edtPhone(this, IDC_PHONE), - edtGroup(this, IDC_DEFGROUP), - edtDeviceName(this, IDC_DEVICE_NAME), - m_wszOldGroup(mir_wstrdup(ppro->m_wszDefaultGroup)) - { - CreateLink(edtPhone, ppro->m_szOwnPhone); - CreateLink(edtGroup, ppro->m_wszDefaultGroup); - CreateLink(edtDeviceName, ppro->m_wszDeviceName); - CreateLink(chkHideChats, ppro->m_bHideGroupchats); - - if (bFullDlg) - CreateLink(chkUsePopups, ppro->m_bUsePopups); - } - - bool OnApply() override - { - if (!mir_wstrlen(m_proto->m_szOwnPhone)) { - SetFocus(edtPhone.GetHwnd()); - return false; - } - - if (mir_wstrcmp(m_proto->m_wszDefaultGroup, m_wszOldGroup)) - Clist_GroupCreate(0, m_proto->m_wszDefaultGroup); - return true; - } -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR CMTProto::SvcCreateAccMgrUI(WPARAM, LPARAM hwndParent) -{ - auto *pDlg = new COptionsDlg(this, IDD_ACCMGRUI, false); - pDlg->SetParent((HWND)hwndParent); - pDlg->Create(); - return (INT_PTR)pDlg->GetHwnd(); -} - -int CMTProto::OnOptionsInit(WPARAM wParam, LPARAM) -{ - OPTIONSDIALOGPAGE odp = {}; - odp.szTitle.w = m_tszUserName; - odp.flags = ODPF_UNICODE; - odp.szGroup.w = LPGENW("Network"); - - odp.position = 1; - odp.szTab.w = LPGENW("Account"); - odp.pDialog = new COptionsDlg(this, IDD_OPTIONS, true); - g_plugin.addOptions(wParam, &odp); - return 0; -} +/* +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" + +///////////////////////////////////////////////////////////////////////////////////////// + +class COptionsDlg : public CProtoDlgBase +{ + CCtrlCheck chkHideChats, chkUsePopups; + CCtrlEdit edtGroup, edtPhone, edtDeviceName; + ptrW m_wszOldGroup; + +public: + COptionsDlg(CMTProto *ppro, int iDlgID, bool bFullDlg) : + CProtoDlgBase(ppro, iDlgID), + chkUsePopups(this, IDC_POPUPS), + chkHideChats(this, IDC_HIDECHATS), + edtPhone(this, IDC_PHONE), + edtGroup(this, IDC_DEFGROUP), + edtDeviceName(this, IDC_DEVICE_NAME), + m_wszOldGroup(mir_wstrdup(ppro->m_wszDefaultGroup)) + { + CreateLink(edtPhone, ppro->m_szOwnPhone); + CreateLink(edtGroup, ppro->m_wszDefaultGroup); + CreateLink(edtDeviceName, ppro->m_wszDeviceName); + CreateLink(chkHideChats, ppro->m_bHideGroupchats); + + if (bFullDlg) + CreateLink(chkUsePopups, ppro->m_bUsePopups); + } + + bool OnApply() override + { + if (!mir_wstrlen(m_proto->m_szOwnPhone)) { + SetFocus(edtPhone.GetHwnd()); + return false; + } + + if (mir_wstrcmp(m_proto->m_wszDefaultGroup, m_wszOldGroup)) + Clist_GroupCreate(0, m_proto->m_wszDefaultGroup); + return true; + } +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +INT_PTR CMTProto::SvcCreateAccMgrUI(WPARAM, LPARAM hwndParent) +{ + auto *pDlg = new COptionsDlg(this, IDD_ACCMGRUI, false); + pDlg->SetParent((HWND)hwndParent); + pDlg->Create(); + return (INT_PTR)pDlg->GetHwnd(); +} + +int CMTProto::OnOptionsInit(WPARAM wParam, LPARAM) +{ + OPTIONSDIALOGPAGE odp = {}; + odp.szTitle.w = m_tszUserName; + odp.flags = ODPF_UNICODE; + odp.szGroup.w = LPGENW("Network"); + + odp.position = 1; + odp.szTab.w = LPGENW("Account"); + odp.pDialog = new COptionsDlg(this, IDD_OPTIONS, true); + g_plugin.addOptions(wParam, &odp); + return 0; +} diff --git a/protocols/Telegram/src/resource.h b/protocols/Telegram/src/resource.h index 87a094b2bc..9ea3641d02 100644 --- a/protocols/Telegram/src/resource.h +++ b/protocols/Telegram/src/resource.h @@ -1,25 +1,25 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by W:\miranda-ng\protocols\Telegram\res\resource.rc -// -#define IDI_TELEGRAM 100 -#define IDD_ACCMGRUI 101 -#define IDD_OPTIONS 102 -#define IDI_PREMIUM 103 -#define IDC_PHONE 1001 -#define IDC_DEFGROUP 1002 -#define IDC_HIDECHATS 1003 -#define IDC_POPUPS 1004 -#define IDC_DEFGROUP2 1004 -#define IDC_DEVICE_NAME 1005 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 106 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1006 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by W:\miranda-ng\protocols\Telegram\res\resource.rc +// +#define IDI_TELEGRAM 100 +#define IDD_ACCMGRUI 101 +#define IDD_OPTIONS 102 +#define IDI_PREMIUM 103 +#define IDC_PHONE 1001 +#define IDC_DEFGROUP 1002 +#define IDC_HIDECHATS 1003 +#define IDC_POPUPS 1004 +#define IDC_DEFGROUP2 1004 +#define IDC_DEVICE_NAME 1005 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 106 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1006 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp index 24ad055fff..5828478802 100644 --- a/protocols/Telegram/src/server.cpp +++ b/protocols/Telegram/src/server.cpp @@ -1,419 +1,419 @@ -/* -Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "stdafx.h" - -void CMTProto::OnEndSession(td::ClientManager::Response&) -{ - m_bTerminated = true; -} - -void __cdecl CMTProto::ServerThread(void *) -{ - m_bTerminated = m_bAuthorized = false; - - m_pClientMmanager = std::make_unique(); - m_iClientId = m_pClientMmanager->create_client_id(); - - SendQuery(new TD::getOption("version")); - - while (!m_bTerminated) { - ProcessResponse(m_pClientMmanager->receive(1)); - } - - m_pClientMmanager = std::move(nullptr); -} - -void CMTProto::LogOut() -{ - if (m_bTerminated) - return; - - debugLogA("CMTProto::OnLoggedOut"); - m_bTerminated = true; - m_bAuthorized = false; - - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE); - m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - - setAllContactStatuses(ID_STATUS_OFFLINE, false); -} - -void CMTProto::OnLoggedIn() -{ - m_bAuthorized = true; - - debugLogA("CMTProto::OnLoggedIn"); - - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, m_iDesiredStatus); - m_iStatus = m_iDesiredStatus; - - if (m_bUnregister) { - SendQuery(new TD::terminateSession()); - SendQuery(new TD::logOut(), &CMTProto::OnEndSession); - } - else SendQuery(new TD::getChats(td::tl::unique_ptr(), 1000)); -} - -/////////////////////////////////////////////////////////////////////////////// - -void CMTProto::SendKeepAlive() -{ - time_t now = time(0); - - for (auto &it : m_arUsers) { - if (it->m_timer1 && now - it->m_timer1 > 600) { - it->m_timer1 = 0; - it->m_timer2 = now; - setWord(it->hContact, "Status", ID_STATUS_AWAY); - } - else if (it->m_timer2 && now - it->m_timer2 > 600) { - it->m_timer2 = 0; - setWord(it->hContact, "Status", ID_STATUS_OFFLINE); - } - } -} - -void CMTProto::SendMarkRead() -{ - m_impl.m_markRead.Stop(); - - mir_cslock lck(m_csMarkRead); - uint64_t userId = _atoi64(getMStringA(m_markContact, DBKEY_ID)); - SendQuery(new TD::viewMessages(userId, 0, std::move(m_markIds), true)); - m_markContact = 0; -} - -/////////////////////////////////////////////////////////////////////////////// - -void CMTProto::ProcessResponse(td::ClientManager::Response response) -{ - if (!response.object) - return; - - debugLogA("ProcessResponse: id=%d (%s)", int(response.request_id), to_string(response.object).c_str()); - - if (response.request_id) { - TG_REQUEST tmp(response.request_id, 0); - auto *p = m_arRequests.find(&tmp); - if (p) { - p->Execute(this, response); - m_arRequests.remove(p); - } - return; - } - - switch (response.object->get_id()) { - case TD::updateAuthorizationState::ID: - ProcessAuth((TD::updateAuthorizationState *)response.object.get()); - break; - - case TD::updateChatFilters::ID: - ProcessGroups((TD::updateChatFilters *)response.object.get()); - break; - - case TD::updateChatPosition::ID: - ProcessChatPosition((TD::updateChatPosition *)response.object.get()); - break; - - case TD::updateChatReadInbox::ID: - ProcessMarkRead((TD::updateChatReadInbox *)response.object.get()); - break; - - case TD::updateFile::ID: - ProcessFile((TD::updateFile*)response.object.get()); - break; - - case TD::updateNewChat::ID: - ProcessChat((TD::updateNewChat *)response.object.get()); - break; - - case TD::updateNewMessage::ID: - ProcessMessage((TD::updateNewMessage *)response.object.get()); - break; - - case TD::updateUserStatus::ID: - ProcessStatus((TD::updateUserStatus *)response.object.get()); - break; - - case TD::updateUser::ID: - ProcessUser((TD::updateUser *)response.object.get()); - break; - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void CMTProto::OnSendMessage(td::ClientManager::Response &response, void *pUserInfo) -{ - if (!response.object) - return; - - if (response.object->get_id() != TD::message::ID) { - debugLogA("Gotten class ID %d instead of %d, exiting", response.object->get_id(), TD::message::ID); - return; - } - - auto *pMessage = ((TD::message *)response.object.get()); - auto *pUser = FindUser(pMessage->chat_id_); - if (pUser) { - char szMsgId[100]; - _i64toa(pMessage->id_, szMsgId, 10); - ProtoBroadcastAck(pUser->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, pUserInfo, (LPARAM)szMsgId); - } -} - -int CMTProto::SendTextMessage(uint64_t chatId, const char *pszMessage) -{ - int ret = m_iMsgId++; - - auto pContent = TD::make_object(); - pContent->text_ = TD::make_object(); - pContent->text_->text_ = std::move(pszMessage); - - auto *pMessage = new TD::sendMessage(); - pMessage->chat_id_ = chatId; - pMessage->input_message_content_ = std::move(pContent); - SendQuery(pMessage, &CMTProto::OnSendMessage, (void*)ret); - - return ret; -} - -void CMTProto::SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER pHandler) -{ - int queryId = ++m_iQueryId; - - auto szDescr = to_string(*pFunc); - debugLogA("Sending query %d:\n%s", queryId, szDescr.c_str()); - - m_pClientMmanager->send(m_iClientId, queryId, TD::object_ptr(pFunc)); - - if (pHandler) - m_arRequests.insert(new TG_REQUEST(queryId, pHandler)); -} - -void CMTProto::SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER_FULL pHandler, void *pUserInfo) -{ - int queryId = ++m_iQueryId; - - auto szDescr = to_string(*pFunc); - debugLogA("Sending full query %d:\n%s", queryId, szDescr.c_str()); - - m_pClientMmanager->send(m_iClientId, queryId, TD::object_ptr(pFunc)); - - if (pHandler) - m_arRequests.insert(new TG_REQUEST_FULL(queryId, pHandler, pUserInfo)); -} - -/////////////////////////////////////////////////////////////////////////////// - -void CMTProto::ProcessChat(TD::updateNewChat *pObj) -{ - auto &pChat = pObj->chat_; - if (pChat->type_->get_id() != TD::chatTypePrivate::ID) { - debugLogA("Only private chats are currently supported"); - return; - } - - if (auto *pUser = FindUser(pChat->id_)) - if (!pChat->title_.empty()) - setUString(pUser->hContact, "Nick", pChat->title_.c_str()); -} - -void CMTProto::ProcessChatPosition(TD::updateChatPosition *pObj) -{ - if (pObj->position_->get_id() != TD::chatPosition::ID) { - debugLogA("Unsupport position"); - return; - } - - auto *pUser = FindUser(pObj->chat_id_); - if (pUser == nullptr) { - debugLogA("Unknown chat, skipping"); - return; - } - - auto *pPos = (TD::chatPosition *)pObj->position_.get(); - if (pPos->list_) { - auto *pList = (TD::chatListFilter*)pPos->list_.get(); - - CMStringA szSetting(FORMAT, "ChatFilter%d", pList->chat_filter_id_); - CMStringW wszGroup(getMStringW(szSetting)); - if (!wszGroup.IsEmpty()) { - ptrW pwszExistingGroup(Clist_GetGroup(pUser->hContact)); - if (!pwszExistingGroup || !mir_wstrcmp(pwszExistingGroup, m_wszDefaultGroup)) { - CMStringW wszNewGroup(FORMAT, L"%s\\%s", (wchar_t *)m_wszDefaultGroup, wszGroup.c_str()); - Clist_SetGroup(pUser->hContact, wszNewGroup); - } - } - } -} - -void CMTProto::ProcessGroups(TD::updateChatFilters *pObj) -{ - for (auto &grp : pObj->chat_filters_) { - if (grp->icon_name_ != "Custom") - continue; - - CMStringA szSetting(FORMAT, "ChatFilter%d", grp->id_); - CMStringW wszOldValue(getMStringW(szSetting)); - Utf2T wszNewValue(grp->title_.c_str()); - if (wszOldValue.IsEmpty()) { - Clist_GroupCreate(m_iBaseGroup, wszNewValue); - setWString(szSetting, wszNewValue); - } - else if (wszOldValue != wszNewValue) { - CMStringW wszFullGroup(FORMAT, L"%s\\%s", (wchar_t*)m_wszDefaultGroup, wszNewValue); - MGROUP oldGroup = Clist_GroupExists(wszFullGroup); - if (!oldGroup) - Clist_GroupCreate(m_iBaseGroup, wszFullGroup); - else - Clist_GroupRename(oldGroup, wszFullGroup); - setWString(szSetting, wszNewValue); - } - } -} - -void CMTProto::ProcessMarkRead(TD::updateChatReadInbox *pObj) -{ - auto *pUser = FindUser(pObj->chat_id_); - if (pUser == nullptr) { - debugLogA("message from unknown chat/user, ignored"); - return; - } - - char szId[100]; - _i64toa(pObj->last_read_inbox_message_id_, szId, 10); - MEVENT hLastRead = db_event_getById(m_szModuleName, szId); - if (hLastRead == 0) { - debugLogA("unknown event, ignored"); - return; - } - - bool bExit = false; - for (MEVENT hEvent = db_event_firstUnread(pUser->hContact); hEvent; hEvent = db_event_next(pUser->hContact, hEvent)) { - if (bExit) - break; - - bExit = (hEvent == hLastRead); - - DBEVENTINFO dbei = {}; - if (db_event_get(hEvent, &dbei)) - continue; - - if (!dbei.markedRead()) - db_event_markRead(pUser->hContact, hEvent); - } -} - -void CMTProto::ProcessMessage(TD::updateNewMessage *pObj) -{ - auto &pMessage = pObj->message_; - - auto *pUser = FindUser(pMessage->chat_id_); - if (pUser == nullptr) { - debugLogA("message from unknown chat/user, ignored"); - return; - } - - if (pUser->isGroupChat) { - debugLogA("message from group chat, ignored"); - return; - } - - CMStringA szText(getMessageText(pMessage->content_.get())); - if (szText.IsEmpty()) { - debugLogA("this message was not processed, ignored"); - return; - } - - char szId[100]; - _i64toa(pMessage->id_, szId, 10); - - PROTORECVEVENT pre = {}; - pre.szMessage = szText.GetBuffer(); - pre.szMsgId = szId; - pre.timestamp = pMessage->date_; - if (pMessage->sender_id_->get_id() == TD::messageSenderUser::ID) - if (((TD::messageSenderUser *)pMessage->sender_id_.get())->user_id_ == m_iOwnId) - pre.flags |= PREF_SENT; - ProtoChainRecvMsg(pUser->hContact, &pre); -} - -void CMTProto::ProcessStatus(TD::updateUserStatus *pObj) -{ - if (auto *pUser = FindUser(pObj->user_id_)) { - if (pObj->status_->get_id() == TD::userStatusOnline::ID) - setWord(pUser->hContact, "Status", ID_STATUS_ONLINE); - else if (pObj->status_->get_id() == TD::userStatusOffline::ID) { - setWord(pUser->hContact, "Status", ID_STATUS_AWAY); - pUser->m_timer1 = time(0); - } - else debugLogA("!!!!! Unknown status packet, report it to the developers"); - } -} - -void CMTProto::ProcessUser(TD::updateUser *pObj) -{ - auto *pUser = pObj->user_.get(); - - if (pUser->phone_number_ == _T2A(m_szOwnPhone).get()) { - m_iOwnId = pUser->id_; - - if (!FindUser(pUser->id_)) - m_arUsers.insert(new TG_USER(pUser->id_, 0)); - } - - if (!pUser->is_contact_) { - debugLogA("User doesn't belong to your contacts, skipping"); - return; - } - - auto *pu = AddUser(pUser->id_, false); - UpdateString(pu->hContact, "FirstName", pUser->first_name_); - UpdateString(pu->hContact, "LastName", pUser->last_name_); - UpdateString(pu->hContact, "Phone", pUser->phone_number_); - if (pUser->usernames_) - UpdateString(pu->hContact, "Nick", pUser->usernames_->editable_username_); - - if (pUser->is_premium_) - ExtraIcon_SetIconByName(g_plugin.m_hIcon, pu->hContact, "tg_premium"); - else - ExtraIcon_SetIconByName(g_plugin.m_hIcon, pu->hContact, nullptr); - - if (auto *pPhoto = pUser->profile_photo_.get()) { - if (auto *pSmall = pPhoto->small_.get()) { - auto remoteId = pSmall->remote_->unique_id_; - auto storedId = getMStringA(pu->hContact, DBKEY_AVATAR_HASH); - if (remoteId != storedId.c_str()) { - if (!remoteId.empty()) { - pu->szAvatarHash = remoteId.c_str(); - setString(pu->hContact, DBKEY_AVATAR_HASH, remoteId.c_str()); - SendQuery(new TD::downloadFile(pSmall->id_, 5, 0, 0, false)); - } - else delSetting(pu->hContact, DBKEY_AVATAR_HASH); - } - } - } - - if (pUser->status_) { - if (pUser->status_->get_id() == TD::userStatusOffline::ID) { - auto *pOffline = (TD::userStatusOffline *)pUser->status_.get(); - setDword(pu->hContact, "LastSeen", pOffline->was_online_); - } - } -} +/* +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" + +void CMTProto::OnEndSession(td::ClientManager::Response&) +{ + m_bTerminated = true; +} + +void __cdecl CMTProto::ServerThread(void *) +{ + m_bTerminated = m_bAuthorized = false; + + m_pClientMmanager = std::make_unique(); + m_iClientId = m_pClientMmanager->create_client_id(); + + SendQuery(new TD::getOption("version")); + + while (!m_bTerminated) { + ProcessResponse(m_pClientMmanager->receive(1)); + } + + m_pClientMmanager = std::move(nullptr); +} + +void CMTProto::LogOut() +{ + if (m_bTerminated) + return; + + debugLogA("CMTProto::OnLoggedOut"); + m_bTerminated = true; + m_bAuthorized = false; + + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE); + m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; + + setAllContactStatuses(ID_STATUS_OFFLINE, false); +} + +void CMTProto::OnLoggedIn() +{ + m_bAuthorized = true; + + debugLogA("CMTProto::OnLoggedIn"); + + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, m_iDesiredStatus); + m_iStatus = m_iDesiredStatus; + + if (m_bUnregister) { + SendQuery(new TD::terminateSession()); + SendQuery(new TD::logOut(), &CMTProto::OnEndSession); + } + else SendQuery(new TD::getChats(td::tl::unique_ptr(), 1000)); +} + +/////////////////////////////////////////////////////////////////////////////// + +void CMTProto::SendKeepAlive() +{ + time_t now = time(0); + + for (auto &it : m_arUsers) { + if (it->m_timer1 && now - it->m_timer1 > 600) { + it->m_timer1 = 0; + it->m_timer2 = now; + setWord(it->hContact, "Status", ID_STATUS_AWAY); + } + else if (it->m_timer2 && now - it->m_timer2 > 600) { + it->m_timer2 = 0; + setWord(it->hContact, "Status", ID_STATUS_OFFLINE); + } + } +} + +void CMTProto::SendMarkRead() +{ + m_impl.m_markRead.Stop(); + + mir_cslock lck(m_csMarkRead); + uint64_t userId = _atoi64(getMStringA(m_markContact, DBKEY_ID)); + SendQuery(new TD::viewMessages(userId, 0, std::move(m_markIds), true)); + m_markContact = 0; +} + +/////////////////////////////////////////////////////////////////////////////// + +void CMTProto::ProcessResponse(td::ClientManager::Response response) +{ + if (!response.object) + return; + + debugLogA("ProcessResponse: id=%d (%s)", int(response.request_id), to_string(response.object).c_str()); + + if (response.request_id) { + TG_REQUEST tmp(response.request_id, 0); + auto *p = m_arRequests.find(&tmp); + if (p) { + p->Execute(this, response); + m_arRequests.remove(p); + } + return; + } + + switch (response.object->get_id()) { + case TD::updateAuthorizationState::ID: + ProcessAuth((TD::updateAuthorizationState *)response.object.get()); + break; + + case TD::updateChatFilters::ID: + ProcessGroups((TD::updateChatFilters *)response.object.get()); + break; + + case TD::updateChatPosition::ID: + ProcessChatPosition((TD::updateChatPosition *)response.object.get()); + break; + + case TD::updateChatReadInbox::ID: + ProcessMarkRead((TD::updateChatReadInbox *)response.object.get()); + break; + + case TD::updateFile::ID: + ProcessFile((TD::updateFile*)response.object.get()); + break; + + case TD::updateNewChat::ID: + ProcessChat((TD::updateNewChat *)response.object.get()); + break; + + case TD::updateNewMessage::ID: + ProcessMessage((TD::updateNewMessage *)response.object.get()); + break; + + case TD::updateUserStatus::ID: + ProcessStatus((TD::updateUserStatus *)response.object.get()); + break; + + case TD::updateUser::ID: + ProcessUser((TD::updateUser *)response.object.get()); + break; + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void CMTProto::OnSendMessage(td::ClientManager::Response &response, void *pUserInfo) +{ + if (!response.object) + return; + + if (response.object->get_id() != TD::message::ID) { + debugLogA("Gotten class ID %d instead of %d, exiting", response.object->get_id(), TD::message::ID); + return; + } + + auto *pMessage = ((TD::message *)response.object.get()); + auto *pUser = FindUser(pMessage->chat_id_); + if (pUser) { + char szMsgId[100]; + _i64toa(pMessage->id_, szMsgId, 10); + ProtoBroadcastAck(pUser->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, pUserInfo, (LPARAM)szMsgId); + } +} + +int CMTProto::SendTextMessage(uint64_t chatId, const char *pszMessage) +{ + int ret = m_iMsgId++; + + auto pContent = TD::make_object(); + pContent->text_ = TD::make_object(); + pContent->text_->text_ = std::move(pszMessage); + + auto *pMessage = new TD::sendMessage(); + pMessage->chat_id_ = chatId; + pMessage->input_message_content_ = std::move(pContent); + SendQuery(pMessage, &CMTProto::OnSendMessage, (void*)ret); + + return ret; +} + +void CMTProto::SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER pHandler) +{ + int queryId = ++m_iQueryId; + + auto szDescr = to_string(*pFunc); + debugLogA("Sending query %d:\n%s", queryId, szDescr.c_str()); + + m_pClientMmanager->send(m_iClientId, queryId, TD::object_ptr(pFunc)); + + if (pHandler) + m_arRequests.insert(new TG_REQUEST(queryId, pHandler)); +} + +void CMTProto::SendQuery(TD::Function *pFunc, TG_QUERY_HANDLER_FULL pHandler, void *pUserInfo) +{ + int queryId = ++m_iQueryId; + + auto szDescr = to_string(*pFunc); + debugLogA("Sending full query %d:\n%s", queryId, szDescr.c_str()); + + m_pClientMmanager->send(m_iClientId, queryId, TD::object_ptr(pFunc)); + + if (pHandler) + m_arRequests.insert(new TG_REQUEST_FULL(queryId, pHandler, pUserInfo)); +} + +/////////////////////////////////////////////////////////////////////////////// + +void CMTProto::ProcessChat(TD::updateNewChat *pObj) +{ + auto &pChat = pObj->chat_; + if (pChat->type_->get_id() != TD::chatTypePrivate::ID) { + debugLogA("Only private chats are currently supported"); + return; + } + + if (auto *pUser = FindUser(pChat->id_)) + if (!pChat->title_.empty()) + setUString(pUser->hContact, "Nick", pChat->title_.c_str()); +} + +void CMTProto::ProcessChatPosition(TD::updateChatPosition *pObj) +{ + if (pObj->position_->get_id() != TD::chatPosition::ID) { + debugLogA("Unsupport position"); + return; + } + + auto *pUser = FindUser(pObj->chat_id_); + if (pUser == nullptr) { + debugLogA("Unknown chat, skipping"); + return; + } + + auto *pPos = (TD::chatPosition *)pObj->position_.get(); + if (pPos->list_) { + auto *pList = (TD::chatListFilter*)pPos->list_.get(); + + CMStringA szSetting(FORMAT, "ChatFilter%d", pList->chat_filter_id_); + CMStringW wszGroup(getMStringW(szSetting)); + if (!wszGroup.IsEmpty()) { + ptrW pwszExistingGroup(Clist_GetGroup(pUser->hContact)); + if (!pwszExistingGroup || !mir_wstrcmp(pwszExistingGroup, m_wszDefaultGroup)) { + CMStringW wszNewGroup(FORMAT, L"%s\\%s", (wchar_t *)m_wszDefaultGroup, wszGroup.c_str()); + Clist_SetGroup(pUser->hContact, wszNewGroup); + } + } + } +} + +void CMTProto::ProcessGroups(TD::updateChatFilters *pObj) +{ + for (auto &grp : pObj->chat_filters_) { + if (grp->icon_name_ != "Custom") + continue; + + CMStringA szSetting(FORMAT, "ChatFilter%d", grp->id_); + CMStringW wszOldValue(getMStringW(szSetting)); + Utf2T wszNewValue(grp->title_.c_str()); + if (wszOldValue.IsEmpty()) { + Clist_GroupCreate(m_iBaseGroup, wszNewValue); + setWString(szSetting, wszNewValue); + } + else if (wszOldValue != wszNewValue) { + CMStringW wszFullGroup(FORMAT, L"%s\\%s", (wchar_t*)m_wszDefaultGroup, wszNewValue); + MGROUP oldGroup = Clist_GroupExists(wszFullGroup); + if (!oldGroup) + Clist_GroupCreate(m_iBaseGroup, wszFullGroup); + else + Clist_GroupRename(oldGroup, wszFullGroup); + setWString(szSetting, wszNewValue); + } + } +} + +void CMTProto::ProcessMarkRead(TD::updateChatReadInbox *pObj) +{ + auto *pUser = FindUser(pObj->chat_id_); + if (pUser == nullptr) { + debugLogA("message from unknown chat/user, ignored"); + return; + } + + char szId[100]; + _i64toa(pObj->last_read_inbox_message_id_, szId, 10); + MEVENT hLastRead = db_event_getById(m_szModuleName, szId); + if (hLastRead == 0) { + debugLogA("unknown event, ignored"); + return; + } + + bool bExit = false; + for (MEVENT hEvent = db_event_firstUnread(pUser->hContact); hEvent; hEvent = db_event_next(pUser->hContact, hEvent)) { + if (bExit) + break; + + bExit = (hEvent == hLastRead); + + DBEVENTINFO dbei = {}; + if (db_event_get(hEvent, &dbei)) + continue; + + if (!dbei.markedRead()) + db_event_markRead(pUser->hContact, hEvent); + } +} + +void CMTProto::ProcessMessage(TD::updateNewMessage *pObj) +{ + auto &pMessage = pObj->message_; + + auto *pUser = FindUser(pMessage->chat_id_); + if (pUser == nullptr) { + debugLogA("message from unknown chat/user, ignored"); + return; + } + + if (pUser->isGroupChat) { + debugLogA("message from group chat, ignored"); + return; + } + + CMStringA szText(getMessageText(pMessage->content_.get())); + if (szText.IsEmpty()) { + debugLogA("this message was not processed, ignored"); + return; + } + + char szId[100]; + _i64toa(pMessage->id_, szId, 10); + + PROTORECVEVENT pre = {}; + pre.szMessage = szText.GetBuffer(); + pre.szMsgId = szId; + pre.timestamp = pMessage->date_; + if (pMessage->sender_id_->get_id() == TD::messageSenderUser::ID) + if (((TD::messageSenderUser *)pMessage->sender_id_.get())->user_id_ == m_iOwnId) + pre.flags |= PREF_SENT; + ProtoChainRecvMsg(pUser->hContact, &pre); +} + +void CMTProto::ProcessStatus(TD::updateUserStatus *pObj) +{ + if (auto *pUser = FindUser(pObj->user_id_)) { + if (pObj->status_->get_id() == TD::userStatusOnline::ID) + setWord(pUser->hContact, "Status", ID_STATUS_ONLINE); + else if (pObj->status_->get_id() == TD::userStatusOffline::ID) { + setWord(pUser->hContact, "Status", ID_STATUS_AWAY); + pUser->m_timer1 = time(0); + } + else debugLogA("!!!!! Unknown status packet, report it to the developers"); + } +} + +void CMTProto::ProcessUser(TD::updateUser *pObj) +{ + auto *pUser = pObj->user_.get(); + + if (pUser->phone_number_ == _T2A(m_szOwnPhone).get()) { + m_iOwnId = pUser->id_; + + if (!FindUser(pUser->id_)) + m_arUsers.insert(new TG_USER(pUser->id_, 0)); + } + + if (!pUser->is_contact_) { + debugLogA("User doesn't belong to your contacts, skipping"); + return; + } + + auto *pu = AddUser(pUser->id_, false); + UpdateString(pu->hContact, "FirstName", pUser->first_name_); + UpdateString(pu->hContact, "LastName", pUser->last_name_); + UpdateString(pu->hContact, "Phone", pUser->phone_number_); + if (pUser->usernames_) + UpdateString(pu->hContact, "Nick", pUser->usernames_->editable_username_); + + if (pUser->is_premium_) + ExtraIcon_SetIconByName(g_plugin.m_hIcon, pu->hContact, "tg_premium"); + else + ExtraIcon_SetIconByName(g_plugin.m_hIcon, pu->hContact, nullptr); + + if (auto *pPhoto = pUser->profile_photo_.get()) { + if (auto *pSmall = pPhoto->small_.get()) { + auto remoteId = pSmall->remote_->unique_id_; + auto storedId = getMStringA(pu->hContact, DBKEY_AVATAR_HASH); + if (remoteId != storedId.c_str()) { + if (!remoteId.empty()) { + pu->szAvatarHash = remoteId.c_str(); + setString(pu->hContact, DBKEY_AVATAR_HASH, remoteId.c_str()); + SendQuery(new TD::downloadFile(pSmall->id_, 5, 0, 0, false)); + } + else delSetting(pu->hContact, DBKEY_AVATAR_HASH); + } + } + } + + if (pUser->status_) { + if (pUser->status_->get_id() == TD::userStatusOffline::ID) { + auto *pOffline = (TD::userStatusOffline *)pUser->status_.get(); + setDword(pu->hContact, "LastSeen", pOffline->was_online_); + } + } +} diff --git a/protocols/Telegram/src/stdafx.cxx b/protocols/Telegram/src/stdafx.cxx index b08670e67f..8c570f6949 100644 --- a/protocols/Telegram/src/stdafx.cxx +++ b/protocols/Telegram/src/stdafx.cxx @@ -1,18 +1,18 @@ -/* -Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "stdafx.h" +/* +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" diff --git a/protocols/Telegram/src/stdafx.h b/protocols/Telegram/src/stdafx.h index cae3629bf9..8e56956840 100644 --- a/protocols/Telegram/src/stdafx.h +++ b/protocols/Telegram/src/stdafx.h @@ -1,48 +1,48 @@ -#ifndef _COMMON_H_ -#define _COMMON_H_ - -#include -#include - -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "td/telegram/Client.h" -#include "td/telegram/td_api.h" -#include "td/telegram/td_api.hpp" -namespace TD = td::td_api; - -#define MODULE "Telegram" - -#include "version.h" -#include "resource.h" -#include "mt_proto.h" -#include "utils.h" - -struct CMPlugin : public ACCPROTOPLUGIN -{ - CMPlugin(); - - HANDLE m_hIcon; - - int Load() override; -}; - +#ifndef _COMMON_H_ +#define _COMMON_H_ + +#include +#include + +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "td/telegram/Client.h" +#include "td/telegram/td_api.h" +#include "td/telegram/td_api.hpp" +namespace TD = td::td_api; + +#define MODULE "Telegram" + +#include "version.h" +#include "resource.h" +#include "mt_proto.h" +#include "utils.h" + +struct CMPlugin : public ACCPROTOPLUGIN +{ + CMPlugin(); + + HANDLE m_hIcon; + + int Load() override; +}; + #endif //_COMMON_H_ \ No newline at end of file diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp index 6113870bd3..df4a0d9118 100644 --- a/protocols/Telegram/src/utils.cpp +++ b/protocols/Telegram/src/utils.cpp @@ -1,126 +1,126 @@ -/* -Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "stdafx.h" - -void CMTProto::UpdateString(MCONTACT hContact, const char *pszSetting, const std::string &str) -{ - if (str.empty()) - delSetting(hContact, pszSetting); - else - setUString(hContact, pszSetting, str.c_str()); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Users - -TG_USER* CMTProto::FindUser(uint64_t id) -{ - if (auto *pCache = m_arUsers.find((TG_USER *)&id)) - return pCache; - - return nullptr; -} - -TG_USER* CMTProto::AddUser(uint64_t id, bool bIsChat) -{ - auto *pUser = FindUser(id); - if (pUser != nullptr) - return pUser; - - MCONTACT hContact = db_add_contact(); - Proto_AddToContact(hContact, m_szModuleName); - - char szId[100]; - _i64toa(id, szId, 10); - - if (bIsChat) { - Clist_SetGroup(hContact, TranslateT("Chat rooms")); - setByte(hContact, "ChatRoom", 1); - setString(hContact, "ChatRoomID", szId); - } - else { - setString(hContact, DBKEY_ID, szId); - if (mir_wstrlen(m_wszDefaultGroup)) - Clist_SetGroup(hContact, m_wszDefaultGroup); - } - - pUser = new TG_USER(id, hContact, bIsChat); - m_arUsers.insert(pUser); - return pUser; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Popups - -void CMTProto::InitPopups(void) -{ - g_plugin.addPopupOption(CMStringW(FORMAT, TranslateT("%s error notifications"), m_tszUserName), m_bUsePopups); - - char name[256]; - mir_snprintf(name, "%s_%s", m_szModuleName, "Error"); - - wchar_t desc[256]; - mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Errors")); - - POPUPCLASS ppc = {}; - ppc.flags = PCF_UNICODE; - ppc.pszName = name; - ppc.pszDescription.w = desc; - ppc.hIcon = IcoLib_GetIconByHandle(m_hProtoIcon); - ppc.colorBack = RGB(191, 0, 0); //Red - ppc.colorText = RGB(255, 245, 225); //Yellow - ppc.iSeconds = 60; - m_hPopupClass = Popup_RegisterClass(&ppc); - - IcoLib_ReleaseIcon(ppc.hIcon); -} - -void CMTProto::Popup(MCONTACT hContact, const wchar_t *szMsg, const wchar_t *szTitle) -{ - if (!m_bUsePopups) - return; - - char name[256]; - mir_snprintf(name, "%s_%s", m_szModuleName, "Error"); - - CMStringW wszTitle(szTitle); - if (hContact == 0) { - wszTitle.Insert(0, L": "); - wszTitle.Insert(0, m_tszUserName); - } - - POPUPDATACLASS ppd = {}; - ppd.szTitle.w = wszTitle; - ppd.szText.w = szMsg; - ppd.pszClassName = name; - ppd.hContact = hContact; - Popup_AddClass(&ppd); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -CMStringA getMessageText(TD::MessageContent *pBody) -{ - if (pBody->get_id() == TD::messageText::ID) { - auto pText = ((TD::messageText *)pBody)->text_.get(); - if (pText->get_id() == TD::formattedText::ID) - return CMStringA(((TD::formattedText *)pText)->text_.c_str()); - } - - return CMStringA(); -} +/* +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" + +void CMTProto::UpdateString(MCONTACT hContact, const char *pszSetting, const std::string &str) +{ + if (str.empty()) + delSetting(hContact, pszSetting); + else + setUString(hContact, pszSetting, str.c_str()); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Users + +TG_USER* CMTProto::FindUser(uint64_t id) +{ + if (auto *pCache = m_arUsers.find((TG_USER *)&id)) + return pCache; + + return nullptr; +} + +TG_USER* CMTProto::AddUser(uint64_t id, bool bIsChat) +{ + auto *pUser = FindUser(id); + if (pUser != nullptr) + return pUser; + + MCONTACT hContact = db_add_contact(); + Proto_AddToContact(hContact, m_szModuleName); + + char szId[100]; + _i64toa(id, szId, 10); + + if (bIsChat) { + Clist_SetGroup(hContact, TranslateT("Chat rooms")); + setByte(hContact, "ChatRoom", 1); + setString(hContact, "ChatRoomID", szId); + } + else { + setString(hContact, DBKEY_ID, szId); + if (mir_wstrlen(m_wszDefaultGroup)) + Clist_SetGroup(hContact, m_wszDefaultGroup); + } + + pUser = new TG_USER(id, hContact, bIsChat); + m_arUsers.insert(pUser); + return pUser; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Popups + +void CMTProto::InitPopups(void) +{ + g_plugin.addPopupOption(CMStringW(FORMAT, TranslateT("%s error notifications"), m_tszUserName), m_bUsePopups); + + char name[256]; + mir_snprintf(name, "%s_%s", m_szModuleName, "Error"); + + wchar_t desc[256]; + mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Errors")); + + POPUPCLASS ppc = {}; + ppc.flags = PCF_UNICODE; + ppc.pszName = name; + ppc.pszDescription.w = desc; + ppc.hIcon = IcoLib_GetIconByHandle(m_hProtoIcon); + ppc.colorBack = RGB(191, 0, 0); //Red + ppc.colorText = RGB(255, 245, 225); //Yellow + ppc.iSeconds = 60; + m_hPopupClass = Popup_RegisterClass(&ppc); + + IcoLib_ReleaseIcon(ppc.hIcon); +} + +void CMTProto::Popup(MCONTACT hContact, const wchar_t *szMsg, const wchar_t *szTitle) +{ + if (!m_bUsePopups) + return; + + char name[256]; + mir_snprintf(name, "%s_%s", m_szModuleName, "Error"); + + CMStringW wszTitle(szTitle); + if (hContact == 0) { + wszTitle.Insert(0, L": "); + wszTitle.Insert(0, m_tszUserName); + } + + POPUPDATACLASS ppd = {}; + ppd.szTitle.w = wszTitle; + ppd.szText.w = szMsg; + ppd.pszClassName = name; + ppd.hContact = hContact; + Popup_AddClass(&ppd); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +CMStringA getMessageText(TD::MessageContent *pBody) +{ + if (pBody->get_id() == TD::messageText::ID) { + auto pText = ((TD::messageText *)pBody)->text_.get(); + if (pText->get_id() == TD::formattedText::ID) + return CMStringA(((TD::formattedText *)pText)->text_.c_str()); + } + + return CMStringA(); +} diff --git a/protocols/Telegram/src/utils.h b/protocols/Telegram/src/utils.h index 2526393a5f..a0811da20e 100644 --- a/protocols/Telegram/src/utils.h +++ b/protocols/Telegram/src/utils.h @@ -1,3 +1,3 @@ -#pragma once - -CMStringA getMessageText(TD::MessageContent *pBody); +#pragma once + +CMStringA getMessageText(TD::MessageContent *pBody); diff --git a/protocols/Telegram/tdlib/tdactor.vcxproj b/protocols/Telegram/tdlib/tdactor.vcxproj index b8023c00e1..dfce57bbe9 100644 --- a/protocols/Telegram/tdlib/tdactor.vcxproj +++ b/protocols/Telegram/tdlib/tdactor.vcxproj @@ -1,75 +1,75 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {85F63934-02FE-332A-8703-059040B65512} - tdactor - - - v141_xp - - - - $(ProjectDir)lib\$(Configuration)32\ - $(ProjectDir)lib\$(Configuration)64\ - - - - .\td\tdactor;.\td\tdutils;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /bigobj - 4100;4127;4324;4505;4702 - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} - tdutils - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {85F63934-02FE-332A-8703-059040B65512} + tdactor + + + v141_xp + + + + $(ProjectDir)lib\$(Configuration)32\ + $(ProjectDir)lib\$(Configuration)64\ + + + + .\td\tdactor;.\td\tdutils;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /bigobj + 4100;4127;4324;4505;4702 + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} + tdutils + + + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tdactor.vcxproj.filters b/protocols/Telegram/tdlib/tdactor.vcxproj.filters index 341d789cce..5535137d6d 100644 --- a/protocols/Telegram/tdlib/tdactor.vcxproj.filters +++ b/protocols/Telegram/tdlib/tdactor.vcxproj.filters @@ -1,60 +1,60 @@ - - - - - - - - Impl - - - - - - - - - - - - - - Impl - - - Impl - - - Impl - - - Impl - - - Impl - - - Impl - - - Impl - - - Impl - - - Impl - - - Impl - - - Impl - - - - - {781720b8-b4b7-4498-9e33-b123d317aea3} - - + + + + + + + + Impl + + + + + + + + + + + + + + Impl + + + Impl + + + Impl + + + Impl + + + Impl + + + Impl + + + Impl + + + Impl + + + Impl + + + Impl + + + Impl + + + + + {781720b8-b4b7-4498-9e33-b123d317aea3} + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tdcore.vcxproj b/protocols/Telegram/tdlib/tdcore.vcxproj index 1c9cb96322..238d8a5bee 100644 --- a/protocols/Telegram/tdlib/tdcore.vcxproj +++ b/protocols/Telegram/tdlib/tdcore.vcxproj @@ -1,299 +1,299 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {FC88FB5A-AAED-3F3E-9959-236444D8F644} - tdcore - - - v141_xp - - - - $(ProjectDir)lib\$(Configuration)32\ - $(ProjectDir)lib\$(Configuration)64\ - - - - .\td;.\td\td\generate\auto;..\..\..\include;.\td\tdactor;.\td\tdutils;.\td\tdnet;.\td\tddb;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /bigobj - 4100;4127;4324;4505;4702 - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {85F63934-02FE-332A-8703-059040B65512} - tdactor - - - {F525EE11-8820-3D8A-87A5-465D50A98A64} - tddb - - - {2246C3CF-7888-3102-984A-80214ADF418C} - tdnet - - - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} - tdutils - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {FC88FB5A-AAED-3F3E-9959-236444D8F644} + tdcore + + + v141_xp + + + + $(ProjectDir)lib\$(Configuration)32\ + $(ProjectDir)lib\$(Configuration)64\ + + + + .\td;.\td\td\generate\auto;..\..\..\include;.\td\tdactor;.\td\tdutils;.\td\tdnet;.\td\tddb;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /bigobj + 4100;4127;4324;4505;4702 + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {85F63934-02FE-332A-8703-059040B65512} + tdactor + + + {F525EE11-8820-3D8A-87A5-465D50A98A64} + tddb + + + {2246C3CF-7888-3102-984A-80214ADF418C} + tdnet + + + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} + tdutils + + + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tdcore.vcxproj.filters b/protocols/Telegram/tdlib/tdcore.vcxproj.filters index 4a41579e0d..155ff0b5ff 100644 --- a/protocols/Telegram/tdlib/tdcore.vcxproj.filters +++ b/protocols/Telegram/tdlib/tdcore.vcxproj.filters @@ -1,251 +1,251 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0FD26E20-5E51-396B-B4E5-98068F96B37E} - - - {CC4593AA-1CC3-37C8-BDF9-C5986B1808BD} - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {0FD26E20-5E51-396B-B4E5-98068F96B37E} + + + {CC4593AA-1CC3-37C8-BDF9-C5986B1808BD} + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tddb.vcxproj b/protocols/Telegram/tdlib/tddb.vcxproj index cb17625164..34806361c6 100644 --- a/protocols/Telegram/tdlib/tddb.vcxproj +++ b/protocols/Telegram/tdlib/tddb.vcxproj @@ -1,88 +1,88 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F525EE11-8820-3D8A-87A5-465D50A98A64} - tddb - - - v141_xp - - - - $(ProjectDir)lib\$(Configuration)32\ - $(ProjectDir)lib\$(Configuration)64\ - - - - .\td\tddb;.\td\tdactor;.\td\tdutils;.\td\build\tdutils;.\td\sqlite;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /bigobj - 4100;4127;4324;4505;4702 - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {85F63934-02FE-332A-8703-059040B65512} - tdactor - - - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} - tdutils - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F525EE11-8820-3D8A-87A5-465D50A98A64} + tddb + + + v141_xp + + + + $(ProjectDir)lib\$(Configuration)32\ + $(ProjectDir)lib\$(Configuration)64\ + + + + .\td\tddb;.\td\tdactor;.\td\tdutils;.\td\build\tdutils;.\td\sqlite;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /bigobj + 4100;4127;4324;4505;4702 + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {85F63934-02FE-332A-8703-059040B65512} + tdactor + + + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} + tdutils + + + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tddb.vcxproj.filters b/protocols/Telegram/tdlib/tddb.vcxproj.filters index cf931303d3..bd37df119b 100644 --- a/protocols/Telegram/tdlib/tddb.vcxproj.filters +++ b/protocols/Telegram/tdlib/tddb.vcxproj.filters @@ -1,40 +1,40 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tdlib.vcxproj b/protocols/Telegram/tdlib/tdlib.vcxproj index 14129c6555..18d50db4b4 100644 --- a/protocols/Telegram/tdlib/tdlib.vcxproj +++ b/protocols/Telegram/tdlib/tdlib.vcxproj @@ -1,607 +1,607 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {800E305A-3704-4617-ADA0-DEE8EAFDB804} - tdlib - - - v141_xp - - - - $(ProjectDir)lib\$(Configuration)32\ - $(ProjectDir)lib\$(Configuration)64\ - - - - td;td\td\generate\auto;td\tdactor;td\tdutils;td\tdnet;td\tddb;..\..\..\include;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /bigobj - 4100;4127;4324;4505;4702 - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {85F63934-02FE-332A-8703-059040B65512} - tdactor - - - {F525EE11-8820-3D8A-87A5-465D50A98A64} - tddb - - - {2246C3CF-7888-3102-984A-80214ADF418C} - tdnet - - - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} - tdutils - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {800E305A-3704-4617-ADA0-DEE8EAFDB804} + tdlib + + + v141_xp + + + + $(ProjectDir)lib\$(Configuration)32\ + $(ProjectDir)lib\$(Configuration)64\ + + + + td;td\td\generate\auto;td\tdactor;td\tdutils;td\tdnet;td\tddb;..\..\..\include;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /bigobj + 4100;4127;4324;4505;4702 + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {85F63934-02FE-332A-8703-059040B65512} + tdactor + + + {F525EE11-8820-3D8A-87A5-465D50A98A64} + tddb + + + {2246C3CF-7888-3102-984A-80214ADF418C} + tdnet + + + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} + tdutils + + + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tdlib.vcxproj.filters b/protocols/Telegram/tdlib/tdlib.vcxproj.filters index ee0c097760..09f9ca4b73 100644 --- a/protocols/Telegram/tdlib/tdlib.vcxproj.filters +++ b/protocols/Telegram/tdlib/tdlib.vcxproj.filters @@ -1,1656 +1,1656 @@ - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\logevent - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\net - - - Source Files\logevent - - - Source Files\logevent - - - Source Files\logevent - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Source Files\files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - {0FD26E20-5E51-396B-B4E5-98068F96B37E} - - - {CC4593AA-1CC3-37C8-BDF9-C5986B1808BD} - - - {cd939197-1880-4e6c-8611-971cb070e878} - - - {c2c002f7-0b68-47b7-886e-03a433ca7017} - - - {514d7959-632a-4de8-8df3-0eeeadaaacbf} - - + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\logevent + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\net + + + Source Files\logevent + + + Source Files\logevent + + + Source Files\logevent + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Source Files\files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + {0FD26E20-5E51-396B-B4E5-98068F96B37E} + + + {CC4593AA-1CC3-37C8-BDF9-C5986B1808BD} + + + {cd939197-1880-4e6c-8611-971cb070e878} + + + {c2c002f7-0b68-47b7-886e-03a433ca7017} + + + {514d7959-632a-4de8-8df3-0eeeadaaacbf} + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tdnet.vcxproj b/protocols/Telegram/tdlib/tdnet.vcxproj index ba945968c0..9a84f80874 100644 --- a/protocols/Telegram/tdlib/tdnet.vcxproj +++ b/protocols/Telegram/tdlib/tdnet.vcxproj @@ -1,89 +1,89 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2246C3CF-7888-3102-984A-80214ADF418C} - tdnet - - - v141_xp - - - - $(ProjectDir)lib\$(Configuration)32\ - $(ProjectDir)lib\$(Configuration)64\ - - - - .\td\tdnet;..\..\..\include;.\td\tdutils;.\td\tdactor;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /bigobj - 4100;4127;4324;4505;4702 - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {85F63934-02FE-332A-8703-059040B65512} - tdactor - - - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} - tdutils - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2246C3CF-7888-3102-984A-80214ADF418C} + tdnet + + + v141_xp + + + + $(ProjectDir)lib\$(Configuration)32\ + $(ProjectDir)lib\$(Configuration)64\ + + + + .\td\tdnet;..\..\..\include;.\td\tdutils;.\td\tdactor;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /bigobj + 4100;4127;4324;4505;4702 + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {85F63934-02FE-332A-8703-059040B65512} + tdactor + + + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} + tdutils + + + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tdnet.vcxproj.filters b/protocols/Telegram/tdlib/tdnet.vcxproj.filters index 87decdbf04..1ea9fed8c4 100644 --- a/protocols/Telegram/tdlib/tdnet.vcxproj.filters +++ b/protocols/Telegram/tdlib/tdnet.vcxproj.filters @@ -1,41 +1,41 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tdutils.vcxproj b/protocols/Telegram/tdlib/tdutils.vcxproj index db5abf5030..4db92aa0fb 100644 --- a/protocols/Telegram/tdlib/tdutils.vcxproj +++ b/protocols/Telegram/tdlib/tdutils.vcxproj @@ -1,293 +1,293 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} - tdutils - - - v141_xp - - - - $(ProjectDir)lib\$(Configuration)32\ - $(ProjectDir)lib\$(Configuration)64\ - - - - .\td\tdutils;..\..\..\include;..\..\..\libs\zlib\src;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /bigobj - 4100;4127;4324;4505;4702 - NotUsing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D21C6A0F-BED1-3377-9659-7FC7D82EFC4F} + tdutils + + + v141_xp + + + + $(ProjectDir)lib\$(Configuration)32\ + $(ProjectDir)lib\$(Configuration)64\ + + + + .\td\tdutils;..\..\..\include;..\..\..\libs\zlib\src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /bigobj + 4100;4127;4324;4505;4702 + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/protocols/Telegram/tdlib/tdutils.vcxproj.filters b/protocols/Telegram/tdlib/tdutils.vcxproj.filters index 5aa66dd4d0..c7b27bd63d 100644 --- a/protocols/Telegram/tdlib/tdutils.vcxproj.filters +++ b/protocols/Telegram/tdlib/tdutils.vcxproj.filters @@ -1,255 +1,255 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/protocols/WhatsApp/src/appsync.cpp b/protocols/WhatsApp/src/appsync.cpp index d298f880d2..9607045131 100644 --- a/protocols/WhatsApp/src/appsync.cpp +++ b/protocols/WhatsApp/src/appsync.cpp @@ -1,322 +1,322 @@ -/* - -WhatsApp plugin for Miranda NG -Copyright © 2019-23 George Hazan - -*/ - -#include "stdafx.h" - -////////////////////////////////////////////////////////////////////////////// - -void WhatsAppProto::InitSync() -{ - m_arCollections.insert(new WACollection("regular")); - m_arCollections.insert(new WACollection("regular_high")); - m_arCollections.insert(new WACollection("regular_low")); - m_arCollections.insert(new WACollection("critical_block")); - m_arCollections.insert(new WACollection("critical_unblock_low")); - - for (auto &it : m_arCollections) { - CMStringW wszPath(GetTmpFileName("collection", it->szName)); - wszPath.Append(L".json"); - if (_waccess(wszPath, 0)) - continue; - - JSONNode root = JSONNode::parse(file2string(wszPath)); - it->version = root["version"].as_int(); - - auto szHash = decodeBinStr(root["hash"].as_string()); - if (szHash.size() == sizeof(it->hash.hash)) - memcpy(it->hash.hash, szHash.c_str(), sizeof(it->hash.hash)); - - for (auto &val : root["indexValueMap"]) - it->indexValueMap[decodeBinStr(val.name())] = decodeBinStr(val.as_string()); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void WhatsAppProto::OnServerSync(const WANode &node) -{ - OBJLIST task(1); - - for (auto &it : node.getChildren()) - if (it->title == "collection") - task.insert(new WACollection(it->getAttr("name"), it->getAttrInt("version"))); - - ResyncServer(task); - SendAck(node); -} - -void WhatsAppProto::ResyncAll() -{ - ResyncServer(m_arCollections); -} - -void WhatsAppProto::ResyncServer(const OBJLIST &task) -{ - WANodeIq iq(IQ::SET, "w:sync:app:state"); - - auto *pList = iq.addChild("sync"); - for (auto &it : task) { - auto *pCollection = m_arCollections.find(it); - if (pCollection == nullptr) - m_arCollections.insert(pCollection = new WACollection(it->szName, 0)); - - if (!pCollection->version || pCollection->version < it->version) { - auto *pNode = pList->addChild("collection"); - *pNode << CHAR_PARAM("name", it->szName) << INT_PARAM("version", pCollection->version) - << CHAR_PARAM("return_snapshot", (!pCollection->version) ? "true" : "false"); - } - } - - if (pList->getFirstChild() != nullptr) - WSSendNode(iq, &WhatsAppProto::OnIqServerSync); -} - -void WhatsAppProto::OnIqServerSync(const WANode &node) -{ - for (auto &coll : node.getChild("sync")->getChildren()) { - if (coll->title != "collection") - continue; - - auto *pszName = coll->getAttr("name"); - - auto *pCollection = FindCollection(pszName); - if (pCollection == nullptr) { - pCollection = new WACollection(pszName, 0); - m_arCollections.insert(pCollection); - } - - int dwVersion = 0; - - CMStringW wszSnapshotPath(GetTmpFileName("collection", pszName)); - if (auto *pSnapshot = coll->getChild("snapshot")) { - proto::ExternalBlobReference body(pSnapshot->content); - if (!body->directpath || !body->has_mediakey) { - debugLogA("Invalid snapshot data, skipping"); - continue; - } - - MBinBuffer buf = DownloadEncryptedFile(directPath2url(body->directpath), body->mediakey, "App State"); - if (buf.isEmpty()) { - debugLogA("Invalid downloaded snapshot data, skipping"); - continue; - } - - proto::SyncdSnapshot snapshot(unpadBuffer16(buf)); - if (!snapshot) { - debugLogA("%s: unable to decode snapshot, skipping"); - continue; - } - - dwVersion = snapshot->version->version; - if (dwVersion > pCollection->version) { - pCollection->hash.init(); - debugLogA("%s: applying snapshot of version %d", pCollection->szName.get(), dwVersion); - for (int i=0; i < snapshot->n_records; i++) - ParsePatch(pCollection, snapshot->records[i], true); - } - else debugLogA("%s: skipping snapshot of version %d", pCollection->szName.get(), dwVersion); - } - - if (auto *pPatchList = coll->getChild("patches")) { - for (auto &it : pPatchList->getChildren()) { - proto::SyncdPatch patch(it->content); - if (!patch) { - debugLogA("%s: unable to decode patch, skipping"); - continue; - } - - dwVersion = patch->version->version; - if (dwVersion > pCollection->version) { - debugLogA("%s: applying patch of version %d", pCollection->szName.get(), dwVersion); - for (int i = 0; i < patch->n_mutations; i++) { - auto &jt = *patch->mutations[i]; - ParsePatch(pCollection, jt.record, jt.operation == WA__SYNCD_MUTATION__SYNCD_OPERATION__SET); - } - } - else debugLogA("%s: skipping patch of version %d", pCollection->szName.get(), dwVersion); - } - } - - JSONNode jsonRoot, jsonMap; - for (auto &it : pCollection->indexValueMap) - jsonMap << CHAR_PARAM(ptrA(mir_base64_encode(it.first.c_str(), it.first.size())), ptrA(mir_base64_encode(it.second.c_str(), it.second.size()))); - jsonRoot << INT_PARAM("version", dwVersion) << CHAR_PARAM("hash", ptrA(mir_base64_encode(pCollection->hash.hash, sizeof(pCollection->hash.hash)))) - << JSON_PARAM("indexValueMap", jsonMap); - - string2file(jsonRoot.write(), GetTmpFileName("collection", CMStringA(pszName) + ".json")); - } -} - -static uint8_t sttMutationInfo[] = "WhatsApp Mutation Keys"; - -void WhatsAppProto::ParsePatch(WACollection *pColl, const Wa__SyncdRecord *rec, bool bSet) -{ - int id = decodeBigEndian(rec->keyid->id); - auto &indexBlob = rec->index->blob; - auto &value = rec->value->blob; - - auto *macValue = value.data + value.len - 32; - std::string index((char *)indexBlob.data, indexBlob.len); - - MBinBuffer key(getBlob(CMStringA(FORMAT, "AppSyncKey%d", id))); - if (key.isEmpty()) { - debugLogA("No key with id=%d to decode a patch"); - return; - } - - struct - { - uint8_t indexKey[32]; - uint8_t encKey[32]; - uint8_t macKey[32]; - uint8_t snapshotMacKey[32]; - uint8_t patchMacKey[32]; - - } mutationKeys; - - HKDF(EVP_sha256(), (BYTE *)"", 0, key.data(), key.length(), sttMutationInfo, sizeof(sttMutationInfo) - 1, (BYTE *)&mutationKeys, sizeof(mutationKeys)); - - MBinBuffer decoded = aesDecrypt(EVP_aes_256_cbc(), mutationKeys.encKey, value.data, value.data + 16, value.len - 32); - if (decoded.isEmpty()) { - debugLogA("Unable to decode patch with key id=%d", id); - return; - } - - proto::SyncActionData data(unpadBuffer16(decoded)); - if (!data) { - debugLogA("Unable to decode action data with id=%d", id); - return; - } - - JSONNode jsonRoot = JSONNode::parse((char *)data->index.data); - - if (bSet) { - ApplyPatch(jsonRoot, data->value); - - pColl->hash.add(macValue, 32); - pColl->indexValueMap[index] = std::string((char*)macValue, 32); - } - else { - debugLogA("Removing data with index: %s", jsonRoot.write().c_str()); - - auto &prevVal = pColl->indexValueMap.find(index); - if (prevVal != pColl->indexValueMap.end()) { - pColl->hash.sub(prevVal->second.c_str(), prevVal->second.size()); - pColl->indexValueMap.erase(prevVal); - } - } -} - -void WhatsAppProto::ApplyPatch(const JSONNode &index, const Wa__SyncActionValue *data) -{ - debugLogA("Applying patch for %s: %s", index.write().c_str(), protobuf_c_text_to_string(data).c_str()); - - auto title = index.at((json_index_t)0).as_string(); - - if (title == "contact" && data->contactaction) { - auto *pUser = AddUser(index.at(1).as_string().c_str(), false); - - auto *pAction = data->contactaction; - auto &fullName = pAction->fullname; - if (fullName) - setUString(pUser->hContact, "Nick", fullName); - - if (pAction->firstname) { - CMStringA str(pAction->firstname); - str.TrimRight(); - setUString(pUser->hContact, "FirstName", str.c_str()); - setUString(pUser->hContact, "LastName", fullName + str.GetLength() + 1); - } - else if (fullName != nullptr) { - auto *p = strrchr(fullName, ' '); - if (p != 0) { - *p = 0; - setUString(pUser->hContact, "FirstName", fullName); - setUString(pUser->hContact, "LastName", p+1); - } - else { - setUString(pUser->hContact, "FirstName", ""); - setUString(pUser->hContact, "LastName", fullName); - } - } - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void WhatsAppProto::ProcessHistorySync(const Wa__HistorySync *pSync) -{ - debugLogA("Got history sync: %s", protobuf_c_text_to_string(pSync).c_str()); - - switch (pSync->synctype) { - case WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__INITIAL_BOOTSTRAP: - case WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__RECENT: - for (int i = 0; i < pSync->n_conversations; i++) { - auto *pChat = pSync->conversations[i]; - - auto *pUser = AddUser(pChat->id, false); - for (int j = 0; j < pChat->n_messages; j++) { - auto *pMessage = pChat->messages[j]; - if (!pMessage->message) - continue; - - MEVENT hEvent = db_event_getById(m_szModuleName, pMessage->message->key->id); - if (hEvent) { - debugLogA("Event %s is already processed", pMessage->message->key->id); - continue; - } - - CMStringA szMessageText(GetMessageText(pMessage->message->message)); - if (!szMessageText.IsEmpty()) { - auto *key = pMessage->message->key; - - PROTORECVEVENT pre = {}; - pre.timestamp = pMessage->message->messagetimestamp; - pre.szMessage = szMessageText.GetBuffer(); - pre.szMsgId = key->id; - pre.flags = PREF_CREATEREAD; - if (key->fromme) - pre.flags |= PREF_SENT; - ProtoChainRecvMsg(pUser->hContact, &pre); - - if (pUser->bIsGroupChat) { - if (pChat->name) - setUString(pUser->hContact, "Nick", pChat->name); - - GCEVENT gce = {m_szModuleName, 0, GC_EVENT_MESSAGE}; - gce.dwFlags = GCEF_UTF8; - gce.pszID.a = pUser->szId; - gce.pszUID.a = key->participant; - gce.bIsMe = key->fromme; - gce.pszText.a = szMessageText.GetBuffer(); - gce.time = pMessage->message->messagetimestamp; - Chat_Event(&gce); - } - } - } - } - - if (pSync->synctype == WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__INITIAL_BOOTSTRAP) - GC_RefreshMetadata(); - break; - - case WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__PUSH_NAME: - for (int i = 0; i < pSync->n_pushnames; i++) { - auto *pName = pSync->pushnames[i]; - if (auto *pUser = AddUser(pName->id, false)) - setUString(pUser->hContact, "Nick", pName->pushname); - } - break; - - case WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__INITIAL_STATUS_V3: - for (int i = 0; i < pSync->n_statusv3messages; i++) { - // TODO - // auto *pStatus = pSync->statusv3messages[i]; - } - break; - } -} +/* + +WhatsApp plugin for Miranda NG +Copyright © 2019-23 George Hazan + +*/ + +#include "stdafx.h" + +////////////////////////////////////////////////////////////////////////////// + +void WhatsAppProto::InitSync() +{ + m_arCollections.insert(new WACollection("regular")); + m_arCollections.insert(new WACollection("regular_high")); + m_arCollections.insert(new WACollection("regular_low")); + m_arCollections.insert(new WACollection("critical_block")); + m_arCollections.insert(new WACollection("critical_unblock_low")); + + for (auto &it : m_arCollections) { + CMStringW wszPath(GetTmpFileName("collection", it->szName)); + wszPath.Append(L".json"); + if (_waccess(wszPath, 0)) + continue; + + JSONNode root = JSONNode::parse(file2string(wszPath)); + it->version = root["version"].as_int(); + + auto szHash = decodeBinStr(root["hash"].as_string()); + if (szHash.size() == sizeof(it->hash.hash)) + memcpy(it->hash.hash, szHash.c_str(), sizeof(it->hash.hash)); + + for (auto &val : root["indexValueMap"]) + it->indexValueMap[decodeBinStr(val.name())] = decodeBinStr(val.as_string()); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void WhatsAppProto::OnServerSync(const WANode &node) +{ + OBJLIST task(1); + + for (auto &it : node.getChildren()) + if (it->title == "collection") + task.insert(new WACollection(it->getAttr("name"), it->getAttrInt("version"))); + + ResyncServer(task); + SendAck(node); +} + +void WhatsAppProto::ResyncAll() +{ + ResyncServer(m_arCollections); +} + +void WhatsAppProto::ResyncServer(const OBJLIST &task) +{ + WANodeIq iq(IQ::SET, "w:sync:app:state"); + + auto *pList = iq.addChild("sync"); + for (auto &it : task) { + auto *pCollection = m_arCollections.find(it); + if (pCollection == nullptr) + m_arCollections.insert(pCollection = new WACollection(it->szName, 0)); + + if (!pCollection->version || pCollection->version < it->version) { + auto *pNode = pList->addChild("collection"); + *pNode << CHAR_PARAM("name", it->szName) << INT_PARAM("version", pCollection->version) + << CHAR_PARAM("return_snapshot", (!pCollection->version) ? "true" : "false"); + } + } + + if (pList->getFirstChild() != nullptr) + WSSendNode(iq, &WhatsAppProto::OnIqServerSync); +} + +void WhatsAppProto::OnIqServerSync(const WANode &node) +{ + for (auto &coll : node.getChild("sync")->getChildren()) { + if (coll->title != "collection") + continue; + + auto *pszName = coll->getAttr("name"); + + auto *pCollection = FindCollection(pszName); + if (pCollection == nullptr) { + pCollection = new WACollection(pszName, 0); + m_arCollections.insert(pCollection); + } + + int dwVersion = 0; + + CMStringW wszSnapshotPath(GetTmpFileName("collection", pszName)); + if (auto *pSnapshot = coll->getChild("snapshot")) { + proto::ExternalBlobReference body(pSnapshot->content); + if (!body->directpath || !body->has_mediakey) { + debugLogA("Invalid snapshot data, skipping"); + continue; + } + + MBinBuffer buf = DownloadEncryptedFile(directPath2url(body->directpath), body->mediakey, "App State"); + if (buf.isEmpty()) { + debugLogA("Invalid downloaded snapshot data, skipping"); + continue; + } + + proto::SyncdSnapshot snapshot(unpadBuffer16(buf)); + if (!snapshot) { + debugLogA("%s: unable to decode snapshot, skipping"); + continue; + } + + dwVersion = snapshot->version->version; + if (dwVersion > pCollection->version) { + pCollection->hash.init(); + debugLogA("%s: applying snapshot of version %d", pCollection->szName.get(), dwVersion); + for (int i=0; i < snapshot->n_records; i++) + ParsePatch(pCollection, snapshot->records[i], true); + } + else debugLogA("%s: skipping snapshot of version %d", pCollection->szName.get(), dwVersion); + } + + if (auto *pPatchList = coll->getChild("patches")) { + for (auto &it : pPatchList->getChildren()) { + proto::SyncdPatch patch(it->content); + if (!patch) { + debugLogA("%s: unable to decode patch, skipping"); + continue; + } + + dwVersion = patch->version->version; + if (dwVersion > pCollection->version) { + debugLogA("%s: applying patch of version %d", pCollection->szName.get(), dwVersion); + for (int i = 0; i < patch->n_mutations; i++) { + auto &jt = *patch->mutations[i]; + ParsePatch(pCollection, jt.record, jt.operation == WA__SYNCD_MUTATION__SYNCD_OPERATION__SET); + } + } + else debugLogA("%s: skipping patch of version %d", pCollection->szName.get(), dwVersion); + } + } + + JSONNode jsonRoot, jsonMap; + for (auto &it : pCollection->indexValueMap) + jsonMap << CHAR_PARAM(ptrA(mir_base64_encode(it.first.c_str(), it.first.size())), ptrA(mir_base64_encode(it.second.c_str(), it.second.size()))); + jsonRoot << INT_PARAM("version", dwVersion) << CHAR_PARAM("hash", ptrA(mir_base64_encode(pCollection->hash.hash, sizeof(pCollection->hash.hash)))) + << JSON_PARAM("indexValueMap", jsonMap); + + string2file(jsonRoot.write(), GetTmpFileName("collection", CMStringA(pszName) + ".json")); + } +} + +static uint8_t sttMutationInfo[] = "WhatsApp Mutation Keys"; + +void WhatsAppProto::ParsePatch(WACollection *pColl, const Wa__SyncdRecord *rec, bool bSet) +{ + int id = decodeBigEndian(rec->keyid->id); + auto &indexBlob = rec->index->blob; + auto &value = rec->value->blob; + + auto *macValue = value.data + value.len - 32; + std::string index((char *)indexBlob.data, indexBlob.len); + + MBinBuffer key(getBlob(CMStringA(FORMAT, "AppSyncKey%d", id))); + if (key.isEmpty()) { + debugLogA("No key with id=%d to decode a patch"); + return; + } + + struct + { + uint8_t indexKey[32]; + uint8_t encKey[32]; + uint8_t macKey[32]; + uint8_t snapshotMacKey[32]; + uint8_t patchMacKey[32]; + + } mutationKeys; + + HKDF(EVP_sha256(), (BYTE *)"", 0, key.data(), key.length(), sttMutationInfo, sizeof(sttMutationInfo) - 1, (BYTE *)&mutationKeys, sizeof(mutationKeys)); + + MBinBuffer decoded = aesDecrypt(EVP_aes_256_cbc(), mutationKeys.encKey, value.data, value.data + 16, value.len - 32); + if (decoded.isEmpty()) { + debugLogA("Unable to decode patch with key id=%d", id); + return; + } + + proto::SyncActionData data(unpadBuffer16(decoded)); + if (!data) { + debugLogA("Unable to decode action data with id=%d", id); + return; + } + + JSONNode jsonRoot = JSONNode::parse((char *)data->index.data); + + if (bSet) { + ApplyPatch(jsonRoot, data->value); + + pColl->hash.add(macValue, 32); + pColl->indexValueMap[index] = std::string((char*)macValue, 32); + } + else { + debugLogA("Removing data with index: %s", jsonRoot.write().c_str()); + + auto &prevVal = pColl->indexValueMap.find(index); + if (prevVal != pColl->indexValueMap.end()) { + pColl->hash.sub(prevVal->second.c_str(), prevVal->second.size()); + pColl->indexValueMap.erase(prevVal); + } + } +} + +void WhatsAppProto::ApplyPatch(const JSONNode &index, const Wa__SyncActionValue *data) +{ + debugLogA("Applying patch for %s: %s", index.write().c_str(), protobuf_c_text_to_string(data).c_str()); + + auto title = index.at((json_index_t)0).as_string(); + + if (title == "contact" && data->contactaction) { + auto *pUser = AddUser(index.at(1).as_string().c_str(), false); + + auto *pAction = data->contactaction; + auto &fullName = pAction->fullname; + if (fullName) + setUString(pUser->hContact, "Nick", fullName); + + if (pAction->firstname) { + CMStringA str(pAction->firstname); + str.TrimRight(); + setUString(pUser->hContact, "FirstName", str.c_str()); + setUString(pUser->hContact, "LastName", fullName + str.GetLength() + 1); + } + else if (fullName != nullptr) { + auto *p = strrchr(fullName, ' '); + if (p != 0) { + *p = 0; + setUString(pUser->hContact, "FirstName", fullName); + setUString(pUser->hContact, "LastName", p+1); + } + else { + setUString(pUser->hContact, "FirstName", ""); + setUString(pUser->hContact, "LastName", fullName); + } + } + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void WhatsAppProto::ProcessHistorySync(const Wa__HistorySync *pSync) +{ + debugLogA("Got history sync: %s", protobuf_c_text_to_string(pSync).c_str()); + + switch (pSync->synctype) { + case WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__INITIAL_BOOTSTRAP: + case WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__RECENT: + for (int i = 0; i < pSync->n_conversations; i++) { + auto *pChat = pSync->conversations[i]; + + auto *pUser = AddUser(pChat->id, false); + for (int j = 0; j < pChat->n_messages; j++) { + auto *pMessage = pChat->messages[j]; + if (!pMessage->message) + continue; + + MEVENT hEvent = db_event_getById(m_szModuleName, pMessage->message->key->id); + if (hEvent) { + debugLogA("Event %s is already processed", pMessage->message->key->id); + continue; + } + + CMStringA szMessageText(GetMessageText(pMessage->message->message)); + if (!szMessageText.IsEmpty()) { + auto *key = pMessage->message->key; + + PROTORECVEVENT pre = {}; + pre.timestamp = pMessage->message->messagetimestamp; + pre.szMessage = szMessageText.GetBuffer(); + pre.szMsgId = key->id; + pre.flags = PREF_CREATEREAD; + if (key->fromme) + pre.flags |= PREF_SENT; + ProtoChainRecvMsg(pUser->hContact, &pre); + + if (pUser->bIsGroupChat) { + if (pChat->name) + setUString(pUser->hContact, "Nick", pChat->name); + + GCEVENT gce = {m_szModuleName, 0, GC_EVENT_MESSAGE}; + gce.dwFlags = GCEF_UTF8; + gce.pszID.a = pUser->szId; + gce.pszUID.a = key->participant; + gce.bIsMe = key->fromme; + gce.pszText.a = szMessageText.GetBuffer(); + gce.time = pMessage->message->messagetimestamp; + Chat_Event(&gce); + } + } + } + } + + if (pSync->synctype == WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__INITIAL_BOOTSTRAP) + GC_RefreshMetadata(); + break; + + case WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__PUSH_NAME: + for (int i = 0; i < pSync->n_pushnames; i++) { + auto *pName = pSync->pushnames[i]; + if (auto *pUser = AddUser(pName->id, false)) + setUString(pUser->hContact, "Nick", pName->pushname); + } + break; + + case WA__HISTORY_SYNC__HISTORY_SYNC_TYPE__INITIAL_STATUS_V3: + for (int i = 0; i < pSync->n_statusv3messages; i++) { + // TODO + // auto *pStatus = pSync->statusv3messages[i]; + } + break; + } +} diff --git a/protocols/WhatsApp/src/chats.cpp b/protocols/WhatsApp/src/chats.cpp index 59f98d4548..b0423e5b20 100644 --- a/protocols/WhatsApp/src/chats.cpp +++ b/protocols/WhatsApp/src/chats.cpp @@ -1,188 +1,188 @@ -/* - -WhatsApp plugin for Miranda NG -Copyright © 2019-23 George Hazan - -*/ - -#include "stdafx.h" - -void WhatsAppProto::GC_RefreshMetadata() -{ - for (auto &it : m_arUsers) { - if (it->bIsGroupChat) { - GC_GetAllMetadata(); - break; - } - } -} - -void WhatsAppProto::GC_GetAllMetadata() -{ - WANodeIq iq(IQ::GET, "w:g2", "@g.us"); - auto *pRoot = iq.addChild("participating"); - *pRoot << XCHILD("participants") << XCHILD("description"); - WSSendNode(iq, &WhatsAppProto::OnIqGcGetAllMetadata); -} - -void WhatsAppProto::OnIqGcGetAllMetadata(const WANode &node) -{ - if (auto *pGroup = node.getChild("groups")) - for (auto &it : pGroup->getChildren()) - GC_ParseMetadata(it); -} - -void WhatsAppProto::GC_ParseMetadata(const WANode *pGroup) -{ - auto *pszId = pGroup->getAttr("id"); - if (pszId == nullptr) - return; - - auto *pChatUser = AddUser(CMStringA(pszId) + "@g.us", false); - if (pChatUser == nullptr) - return; - - CMStringW wszId(Utf2T(pChatUser->szId)); - - pChatUser->si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszId, getMStringW(pChatUser->hContact, "Nick")); - - Chat_AddGroup(pChatUser->si, TranslateT("Owner")); - Chat_AddGroup(pChatUser->si, TranslateT("SuperAdmin")); - Chat_AddGroup(pChatUser->si, TranslateT("Admin")); - Chat_AddGroup(pChatUser->si, TranslateT("Participant")); - - CMStringA szOwner(pGroup->getAttr("creator")), szNick, szRole; - - for (auto &it : pGroup->getChildren()) { - if (it->title == "description") { - CMStringA szDescr = it->getBody(); - if (!szDescr.IsEmpty()) { - GCEVENT gce = {m_szModuleName, 0, GC_EVENT_INFORMATION}; - gce.dwFlags = GCEF_UTF8; - gce.pszID.a = pChatUser->szId; - gce.pszText.a = szDescr.c_str(); - Chat_Event(&gce); - } - } - else if (it->title == "member_add_mode") { - szRole = it->getBody(); - } - else if (it->title == "participant") { - auto *jid = it->getAttr("jid"); - - // if role isn't specified, use the default one - auto *role = it->getAttr("type"); - if (role == nullptr) - role = szRole; - - GCEVENT gce = {m_szModuleName, 0, GC_EVENT_JOIN}; - gce.dwFlags = GCEF_UTF8; - gce.pszID.a = pChatUser->szId; - gce.pszUID.a = jid; - gce.bIsMe = (jid == m_szJid); - - if (jid == szOwner) - gce.pszStatus.a = "Owner"; - else if (!mir_strcmp(role, "superadmin")) - gce.pszStatus.a = "SuperAdmin"; - else if (!mir_strcmp(role, "adminadd")) - gce.pszStatus.a = "Admin"; - else - gce.pszStatus.a = "Participant"; - - if (gce.bIsMe) - szNick = ptrA(getUStringA(DBKEY_NICK)); - else if (auto *pUser = FindUser(jid)) - szNick = T2Utf(Clist_GetContactDisplayName(pUser->hContact)).get(); - else - szNick = WAJid(jid).user; - - gce.pszNick.a = szNick; - Chat_Event(&gce); - } - } - - if (auto *pszSubject = pGroup->getAttr("subject")) { - time_t iSubjectTime = pGroup->getAttrInt("s_t"); - auto *pszUser = pGroup->getAttr("s_o"); - if (m_szJid == pszUser) - szNick = ptrA(getUStringA(DBKEY_NICK)); - else if (auto *pUser = FindUser(pszUser)) - szNick = T2Utf(Clist_GetContactDisplayName(pUser->hContact)).get(); - else - szNick = WAJid(pszUser).user; - - GCEVENT gce = { m_szModuleName, 0, GC_EVENT_TOPIC }; - gce.dwFlags = GCEF_UTF8; - gce.pszID.a = pChatUser->szId; - gce.pszUID.a = pszUser; - gce.pszText.a = pszSubject; - gce.time = iSubjectTime; - Chat_Event(&gce); - - setUString(pChatUser->hContact, "Nick", pszSubject); - } - - pChatUser->bInited = true; - Chat_Control(m_szModuleName, wszId, m_bHideGroupchats ? WINDOW_HIDDEN : SESSION_INITDONE); - Chat_Control(m_szModuleName, wszId, SESSION_ONLINE); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int WhatsAppProto::GcEventHook(WPARAM, LPARAM lParam) -{ - GCHOOK *gch = (GCHOOK*)lParam; - if (gch == nullptr) - return 0; - - if (mir_strcmpi(gch->si->pszModule, m_szModuleName)) - return 0; - - auto *pUser = FindUser(T2Utf(gch->si->ptszID)); - if (pUser == nullptr) - return 0; - - switch (gch->iType) { - case GC_USER_MESSAGE: - if (gch->ptszText && mir_wstrlen(gch->ptszText) > 0) { - rtrimw(gch->ptszText); - Chat_UnescapeTags(gch->ptszText); - SendTextMessage(pUser->szId, T2Utf(gch->ptszText)); - } - break; - - case GC_USER_PRIVMESS: - break; - - case GC_USER_LOGMENU: - break; - - case GC_USER_NICKLISTMENU: - break; - } - - return 1; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int WhatsAppProto::GcMenuHook(WPARAM, LPARAM lParam) -{ - GCMENUITEMS* gcmi = (GCMENUITEMS*)lParam; - if (gcmi == nullptr) - return 0; - - if (mir_strcmpi(gcmi->pszModule, m_szModuleName)) - return 0; - - auto *pUser = FindUser(T2Utf(gcmi->pszID)); - if (pUser == nullptr) - return 0; - - if (gcmi->Type == MENU_ON_LOG) { - } - else if (gcmi->Type == MENU_ON_NICKLIST) { - } - return 0; -} +/* + +WhatsApp plugin for Miranda NG +Copyright © 2019-23 George Hazan + +*/ + +#include "stdafx.h" + +void WhatsAppProto::GC_RefreshMetadata() +{ + for (auto &it : m_arUsers) { + if (it->bIsGroupChat) { + GC_GetAllMetadata(); + break; + } + } +} + +void WhatsAppProto::GC_GetAllMetadata() +{ + WANodeIq iq(IQ::GET, "w:g2", "@g.us"); + auto *pRoot = iq.addChild("participating"); + *pRoot << XCHILD("participants") << XCHILD("description"); + WSSendNode(iq, &WhatsAppProto::OnIqGcGetAllMetadata); +} + +void WhatsAppProto::OnIqGcGetAllMetadata(const WANode &node) +{ + if (auto *pGroup = node.getChild("groups")) + for (auto &it : pGroup->getChildren()) + GC_ParseMetadata(it); +} + +void WhatsAppProto::GC_ParseMetadata(const WANode *pGroup) +{ + auto *pszId = pGroup->getAttr("id"); + if (pszId == nullptr) + return; + + auto *pChatUser = AddUser(CMStringA(pszId) + "@g.us", false); + if (pChatUser == nullptr) + return; + + CMStringW wszId(Utf2T(pChatUser->szId)); + + pChatUser->si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszId, getMStringW(pChatUser->hContact, "Nick")); + + Chat_AddGroup(pChatUser->si, TranslateT("Owner")); + Chat_AddGroup(pChatUser->si, TranslateT("SuperAdmin")); + Chat_AddGroup(pChatUser->si, TranslateT("Admin")); + Chat_AddGroup(pChatUser->si, TranslateT("Participant")); + + CMStringA szOwner(pGroup->getAttr("creator")), szNick, szRole; + + for (auto &it : pGroup->getChildren()) { + if (it->title == "description") { + CMStringA szDescr = it->getBody(); + if (!szDescr.IsEmpty()) { + GCEVENT gce = {m_szModuleName, 0, GC_EVENT_INFORMATION}; + gce.dwFlags = GCEF_UTF8; + gce.pszID.a = pChatUser->szId; + gce.pszText.a = szDescr.c_str(); + Chat_Event(&gce); + } + } + else if (it->title == "member_add_mode") { + szRole = it->getBody(); + } + else if (it->title == "participant") { + auto *jid = it->getAttr("jid"); + + // if role isn't specified, use the default one + auto *role = it->getAttr("type"); + if (role == nullptr) + role = szRole; + + GCEVENT gce = {m_szModuleName, 0, GC_EVENT_JOIN}; + gce.dwFlags = GCEF_UTF8; + gce.pszID.a = pChatUser->szId; + gce.pszUID.a = jid; + gce.bIsMe = (jid == m_szJid); + + if (jid == szOwner) + gce.pszStatus.a = "Owner"; + else if (!mir_strcmp(role, "superadmin")) + gce.pszStatus.a = "SuperAdmin"; + else if (!mir_strcmp(role, "adminadd")) + gce.pszStatus.a = "Admin"; + else + gce.pszStatus.a = "Participant"; + + if (gce.bIsMe) + szNick = ptrA(getUStringA(DBKEY_NICK)); + else if (auto *pUser = FindUser(jid)) + szNick = T2Utf(Clist_GetContactDisplayName(pUser->hContact)).get(); + else + szNick = WAJid(jid).user; + + gce.pszNick.a = szNick; + Chat_Event(&gce); + } + } + + if (auto *pszSubject = pGroup->getAttr("subject")) { + time_t iSubjectTime = pGroup->getAttrInt("s_t"); + auto *pszUser = pGroup->getAttr("s_o"); + if (m_szJid == pszUser) + szNick = ptrA(getUStringA(DBKEY_NICK)); + else if (auto *pUser = FindUser(pszUser)) + szNick = T2Utf(Clist_GetContactDisplayName(pUser->hContact)).get(); + else + szNick = WAJid(pszUser).user; + + GCEVENT gce = { m_szModuleName, 0, GC_EVENT_TOPIC }; + gce.dwFlags = GCEF_UTF8; + gce.pszID.a = pChatUser->szId; + gce.pszUID.a = pszUser; + gce.pszText.a = pszSubject; + gce.time = iSubjectTime; + Chat_Event(&gce); + + setUString(pChatUser->hContact, "Nick", pszSubject); + } + + pChatUser->bInited = true; + Chat_Control(m_szModuleName, wszId, m_bHideGroupchats ? WINDOW_HIDDEN : SESSION_INITDONE); + Chat_Control(m_szModuleName, wszId, SESSION_ONLINE); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int WhatsAppProto::GcEventHook(WPARAM, LPARAM lParam) +{ + GCHOOK *gch = (GCHOOK*)lParam; + if (gch == nullptr) + return 0; + + if (mir_strcmpi(gch->si->pszModule, m_szModuleName)) + return 0; + + auto *pUser = FindUser(T2Utf(gch->si->ptszID)); + if (pUser == nullptr) + return 0; + + switch (gch->iType) { + case GC_USER_MESSAGE: + if (gch->ptszText && mir_wstrlen(gch->ptszText) > 0) { + rtrimw(gch->ptszText); + Chat_UnescapeTags(gch->ptszText); + SendTextMessage(pUser->szId, T2Utf(gch->ptszText)); + } + break; + + case GC_USER_PRIVMESS: + break; + + case GC_USER_LOGMENU: + break; + + case GC_USER_NICKLISTMENU: + break; + } + + return 1; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int WhatsAppProto::GcMenuHook(WPARAM, LPARAM lParam) +{ + GCMENUITEMS* gcmi = (GCMENUITEMS*)lParam; + if (gcmi == nullptr) + return 0; + + if (mir_strcmpi(gcmi->pszModule, m_szModuleName)) + return 0; + + auto *pUser = FindUser(T2Utf(gcmi->pszID)); + if (pUser == nullptr) + return 0; + + if (gcmi->Type == MENU_ON_LOG) { + } + else if (gcmi->Type == MENU_ON_NICKLIST) { + } + return 0; +} diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 006f78dfc0..8fabeb098b 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -1,308 +1,308 @@ -/* - -WhatsApp plugin for Miranda NG -Copyright © 2019-23 George Hazan - -*/ - -#include "stdafx.h" - -struct SearchParam -{ - SearchParam(const wchar_t *_jid, LONG _id) : - jid(_jid), id(_id) - {} - - std::wstring jid; - LONG id; -}; - -static int CompareOwnMsgs(const WAOwnMessage *p1, const WAOwnMessage *p2) -{ - return strcmp(p1->szMessageId, p2->szMessageId); -} - -static int CompareUsers(const WAUser *p1, const WAUser *p2) -{ - return strcmp(p1->szId, p2->szId); -} - -static int CompareCollections(const WACollection *p1, const WACollection *p2) -{ - return strcmp(p1->szName, p2->szName); -} - -static int CompareRequests(const WARequestBase *p1, const WARequestBase *p2) -{ - return strcmp(p1->szPacketId, p2->szPacketId); -} - -WhatsAppProto::WhatsAppProto(const char *proto_name, const wchar_t *username) : - PROTO(proto_name, username), - m_impl(*this), - m_signalStore(this, ""), - m_szJid(getMStringA(DBKEY_ID)), - m_tszDefaultGroup(getWStringA(DBKEY_DEF_GROUP)), - m_arUsers(10, CompareUsers), - m_arOwnMsgs(1, CompareOwnMsgs), - m_arPersistent(1), - m_arPacketQueue(10, CompareRequests), - m_arCollections(10, CompareCollections), - - m_wszNick(this, "Nick"), - m_wszDeviceName(this, "DeviceName", L"Miranda NG"), - m_wszDefaultGroup(this, "DefaultGroup", L"WhatsApp"), - m_bUsePopups(this, "UsePopups", true), - m_bUseBbcodes(this, "UseBbcodes", true), - m_bHideGroupchats(this, "HideChats", true) -{ - db_set_resident(m_szModuleName, "StatusMsg"); - - CreateProtoService(PS_CREATEACCMGRUI, &WhatsAppProto::SvcCreateAccMgrUI); - - CreateProtoService(PS_GETAVATARINFO, &WhatsAppProto::GetAvatarInfo); - CreateProtoService(PS_GETAVATARCAPS, &WhatsAppProto::GetAvatarCaps); - CreateProtoService(PS_GETMYAVATAR, &WhatsAppProto::GetMyAvatar); - CreateProtoService(PS_SETMYAVATAR, &WhatsAppProto::SetMyAvatar); - - HookProtoEvent(ME_OPT_INITIALISE, &WhatsAppProto::OnOptionsInit); - - InitSync(); - InitPopups(); - InitPersistentHandlers(); - - // Create standard network connection - wchar_t descr[512]; - mir_snwprintf(descr, TranslateT("%s (server)"), m_tszUserName); - - NETLIBUSER nlu = {}; - nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; - nlu.szSettingsModule = m_szModuleName; - nlu.szDescriptiveName.w = descr; - m_hNetlibUser = Netlib_RegisterUser(&nlu); - - // Temporary folder - CreateDirectoryTreeW(CMStringW(VARSW(L"%miranda_userdata%")) + L"\\" + _A2T(m_szModuleName)); - - // Avatars folder - m_tszAvatarFolder = CMStringW(VARSW(L"%miranda_avatarcache%")) + L"\\" + _A2T(m_szModuleName); - DWORD dwAttributes = GetFileAttributes(m_tszAvatarFolder.c_str()); - if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) - CreateDirectoryTreeW(m_tszAvatarFolder.c_str()); - - // default contacts group - if (m_tszDefaultGroup == NULL) - m_tszDefaultGroup = mir_wstrdup(L"WhatsApp"); - Clist_GroupCreate(0, m_tszDefaultGroup); - - // groupchat initialization - GCREGISTER gcr = {}; - gcr.dwFlags = GC_TYPNOTIF | GC_DATABASE; - gcr.ptszDispName = m_tszUserName; - gcr.pszModule = m_szModuleName; - Chat_Register(&gcr); - - HookProtoEvent(ME_GC_EVENT, &WhatsAppProto::GcEventHook); - HookProtoEvent(ME_GC_BUILDMENU, &WhatsAppProto::GcMenuHook); -} - -WhatsAppProto::~WhatsAppProto() -{ -} - -///////////////////////////////////////////////////////////////////////////////////////// -// OnErase - remove temporary folder for account - -const char *pszNeededItems[] = { - "AM_BaseProto", "DefaultGroup", "DeviceName", "HideChats", "NLlog", "Nick" -}; - -static int sttEnumFunc(const char *szSetting, void *param) -{ - for (auto &it : pszNeededItems) - if (!mir_strcmp(it, szSetting)) - return 0; - - auto *pList = (LIST*)param; - pList->insert(mir_strdup(szSetting)); - return 0; -} - -void WhatsAppProto::OnErase() -{ - m_bUnregister = true; - ServerThreadWorker(); - - // remove all temporary data from database & disk folder - LIST arSettings(50); - db_enum_settings(0, sttEnumFunc, m_szModuleName, &arSettings); - for (auto &it : arSettings) { - delSetting(it); - mir_free(it); - } - - DeleteDirectoryTreeW(CMStringW(VARSW(L"%miranda_userdata%")) + L"\\" + _A2T(m_szModuleName), false); - - m_szJid.Empty(); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// OnModulesLoaded emulator for an account - -void WhatsAppProto::OnModulesLoaded() -{ - // initialize contacts cache - if (!m_szJid.IsEmpty()) - m_arUsers.insert(new WAUser(0, m_szJid, false)); - - for (auto &cc : AccContacts()) { - bool bIsChat = isChatRoom(cc); - CMStringA szId(getMStringA(cc, bIsChat ? "ChatRoomID" : DBKEY_ID)); - if (!szId.IsEmpty()) - m_arUsers.insert(new WAUser(cc, szId, bIsChat)); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// PROTO_INTERFACE implementation - -MCONTACT WhatsAppProto::AddToList(int flags, PROTOSEARCHRESULT *psr) -{ - if (psr->id.w == nullptr) - return NULL; - - auto *pUser = AddUser(T2Utf(psr->id.w), (flags & PALF_TEMPORARY) != 0); - db_unset(pUser->hContact, "CList", "NotOnList"); - - return pUser->hContact; -} - -INT_PTR WhatsAppProto::GetCaps(int type, MCONTACT) -{ - switch (type) { - case PFLAGNUM_1: - return PF1_IM | PF1_FILE | PF1_CHAT | PF1_BASICSEARCH | PF1_ADDSEARCHRES | PF1_MODEMSGRECV; - case PFLAGNUM_2: - return PF2_ONLINE; - case PFLAGNUM_3: - return 0; - case PFLAGNUM_4: - return PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_IMSENDOFFLINE | PF4_OFFLINEFILES | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SERVERMSGID; - case PFLAGNUM_5: - return 0; - case PFLAG_UNIQUEIDTEXT: - return (DWORD_PTR)L"WhatsApp ID"; - } - return 0; -} - -int WhatsAppProto::SetStatus(int iNewStatus) -{ - if (m_iDesiredStatus == iNewStatus) - return 0; - - if (!mir_wstrlen(m_wszNick)) { - Popup(0, LPGENW("Connection cannot be established! You have not completed all necessary fields (Nick)."), LPGENW("Error")); - return 0; - } - - int oldStatus = m_iStatus; - - // Routing statuses not supported by WhatsApp - switch (iNewStatus) { - case ID_STATUS_OFFLINE: - m_iDesiredStatus = iNewStatus; - break; - - case ID_STATUS_ONLINE: - case ID_STATUS_FREECHAT: - default: - m_iDesiredStatus = ID_STATUS_ONLINE; - break; - } - - if (m_iDesiredStatus == ID_STATUS_OFFLINE) { - SetServerStatus(m_iDesiredStatus); - - if (m_hServerConn != nullptr) - Netlib_Shutdown(m_hServerConn); - - m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); - } - else if (m_hServerConn == nullptr && !IsStatusConnecting(m_iStatus)) { - m_iStatus = ID_STATUS_CONNECTING; - ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); - - ForkThread(&WhatsAppProto::ServerThread); - } - else if (m_hServerConn != nullptr) { - SetServerStatus(m_iDesiredStatus); - - m_iStatus = m_iDesiredStatus; - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); - } - else ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int WhatsAppProto::SendMsg(MCONTACT hContact, int, const char *pszMsg) -{ - ptrA jid(getStringA(hContact, DBKEY_ID)); - if (jid == nullptr || pszMsg == nullptr) - return 0; - - if (!isOnline()) { - debugLogA("No connection"); - return 0; - } - - return SendTextMessage(jid, pszMsg); -} - -int WhatsAppProto::UserIsTyping(MCONTACT hContact, int type) -{ - if (hContact && isOnline()) { - ptrA jid(getStringA(hContact, DBKEY_ID)); - if (jid && isOnline()) { - WSSendNode( - WANode("chatstates") << CHAR_PARAM("to", jid) << XCHILD((type == PROTOTYPE_SELFTYPING_ON) ? "composing" : "paused")); - } - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// contacts search - -void WhatsAppProto::SearchAckThread(void *targ) -{ - Sleep(100); - - SearchParam *param = (SearchParam*)targ; - PROTOSEARCHRESULT psr = {}; - psr.cbSize = sizeof(psr); - psr.flags = PSR_UNICODE; - psr.nick.w = psr.firstName.w = psr.lastName.w = L""; - psr.id.w = (wchar_t*)param->jid.c_str(); - - ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)param->id, (LPARAM)&psr); - ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)param->id, 0); - - delete param; -} - -HANDLE WhatsAppProto::SearchBasic(const wchar_t* id) -{ - if (!isOnline()) - return nullptr; - - // fake - we always accept search - SearchParam *param = new SearchParam(id, -1); - ForkThread(&WhatsAppProto::SearchAckThread, param); - return (HANDLE)param->id; -} +/* + +WhatsApp plugin for Miranda NG +Copyright © 2019-23 George Hazan + +*/ + +#include "stdafx.h" + +struct SearchParam +{ + SearchParam(const wchar_t *_jid, LONG _id) : + jid(_jid), id(_id) + {} + + std::wstring jid; + LONG id; +}; + +static int CompareOwnMsgs(const WAOwnMessage *p1, const WAOwnMessage *p2) +{ + return strcmp(p1->szMessageId, p2->szMessageId); +} + +static int CompareUsers(const WAUser *p1, const WAUser *p2) +{ + return strcmp(p1->szId, p2->szId); +} + +static int CompareCollections(const WACollection *p1, const WACollection *p2) +{ + return strcmp(p1->szName, p2->szName); +} + +static int CompareRequests(const WARequestBase *p1, const WARequestBase *p2) +{ + return strcmp(p1->szPacketId, p2->szPacketId); +} + +WhatsAppProto::WhatsAppProto(const char *proto_name, const wchar_t *username) : + PROTO(proto_name, username), + m_impl(*this), + m_signalStore(this, ""), + m_szJid(getMStringA(DBKEY_ID)), + m_tszDefaultGroup(getWStringA(DBKEY_DEF_GROUP)), + m_arUsers(10, CompareUsers), + m_arOwnMsgs(1, CompareOwnMsgs), + m_arPersistent(1), + m_arPacketQueue(10, CompareRequests), + m_arCollections(10, CompareCollections), + + m_wszNick(this, "Nick"), + m_wszDeviceName(this, "DeviceName", L"Miranda NG"), + m_wszDefaultGroup(this, "DefaultGroup", L"WhatsApp"), + m_bUsePopups(this, "UsePopups", true), + m_bUseBbcodes(this, "UseBbcodes", true), + m_bHideGroupchats(this, "HideChats", true) +{ + db_set_resident(m_szModuleName, "StatusMsg"); + + CreateProtoService(PS_CREATEACCMGRUI, &WhatsAppProto::SvcCreateAccMgrUI); + + CreateProtoService(PS_GETAVATARINFO, &WhatsAppProto::GetAvatarInfo); + CreateProtoService(PS_GETAVATARCAPS, &WhatsAppProto::GetAvatarCaps); + CreateProtoService(PS_GETMYAVATAR, &WhatsAppProto::GetMyAvatar); + CreateProtoService(PS_SETMYAVATAR, &WhatsAppProto::SetMyAvatar); + + HookProtoEvent(ME_OPT_INITIALISE, &WhatsAppProto::OnOptionsInit); + + InitSync(); + InitPopups(); + InitPersistentHandlers(); + + // Create standard network connection + wchar_t descr[512]; + mir_snwprintf(descr, TranslateT("%s (server)"), m_tszUserName); + + NETLIBUSER nlu = {}; + nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; + nlu.szSettingsModule = m_szModuleName; + nlu.szDescriptiveName.w = descr; + m_hNetlibUser = Netlib_RegisterUser(&nlu); + + // Temporary folder + CreateDirectoryTreeW(CMStringW(VARSW(L"%miranda_userdata%")) + L"\\" + _A2T(m_szModuleName)); + + // Avatars folder + m_tszAvatarFolder = CMStringW(VARSW(L"%miranda_avatarcache%")) + L"\\" + _A2T(m_szModuleName); + DWORD dwAttributes = GetFileAttributes(m_tszAvatarFolder.c_str()); + if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) + CreateDirectoryTreeW(m_tszAvatarFolder.c_str()); + + // default contacts group + if (m_tszDefaultGroup == NULL) + m_tszDefaultGroup = mir_wstrdup(L"WhatsApp"); + Clist_GroupCreate(0, m_tszDefaultGroup); + + // groupchat initialization + GCREGISTER gcr = {}; + gcr.dwFlags = GC_TYPNOTIF | GC_DATABASE; + gcr.ptszDispName = m_tszUserName; + gcr.pszModule = m_szModuleName; + Chat_Register(&gcr); + + HookProtoEvent(ME_GC_EVENT, &WhatsAppProto::GcEventHook); + HookProtoEvent(ME_GC_BUILDMENU, &WhatsAppProto::GcMenuHook); +} + +WhatsAppProto::~WhatsAppProto() +{ +} + +///////////////////////////////////////////////////////////////////////////////////////// +// OnErase - remove temporary folder for account + +const char *pszNeededItems[] = { + "AM_BaseProto", "DefaultGroup", "DeviceName", "HideChats", "NLlog", "Nick" +}; + +static int sttEnumFunc(const char *szSetting, void *param) +{ + for (auto &it : pszNeededItems) + if (!mir_strcmp(it, szSetting)) + return 0; + + auto *pList = (LIST*)param; + pList->insert(mir_strdup(szSetting)); + return 0; +} + +void WhatsAppProto::OnErase() +{ + m_bUnregister = true; + ServerThreadWorker(); + + // remove all temporary data from database & disk folder + LIST arSettings(50); + db_enum_settings(0, sttEnumFunc, m_szModuleName, &arSettings); + for (auto &it : arSettings) { + delSetting(it); + mir_free(it); + } + + DeleteDirectoryTreeW(CMStringW(VARSW(L"%miranda_userdata%")) + L"\\" + _A2T(m_szModuleName), false); + + m_szJid.Empty(); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// OnModulesLoaded emulator for an account + +void WhatsAppProto::OnModulesLoaded() +{ + // initialize contacts cache + if (!m_szJid.IsEmpty()) + m_arUsers.insert(new WAUser(0, m_szJid, false)); + + for (auto &cc : AccContacts()) { + bool bIsChat = isChatRoom(cc); + CMStringA szId(getMStringA(cc, bIsChat ? "ChatRoomID" : DBKEY_ID)); + if (!szId.IsEmpty()) + m_arUsers.insert(new WAUser(cc, szId, bIsChat)); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// PROTO_INTERFACE implementation + +MCONTACT WhatsAppProto::AddToList(int flags, PROTOSEARCHRESULT *psr) +{ + if (psr->id.w == nullptr) + return NULL; + + auto *pUser = AddUser(T2Utf(psr->id.w), (flags & PALF_TEMPORARY) != 0); + db_unset(pUser->hContact, "CList", "NotOnList"); + + return pUser->hContact; +} + +INT_PTR WhatsAppProto::GetCaps(int type, MCONTACT) +{ + switch (type) { + case PFLAGNUM_1: + return PF1_IM | PF1_FILE | PF1_CHAT | PF1_BASICSEARCH | PF1_ADDSEARCHRES | PF1_MODEMSGRECV; + case PFLAGNUM_2: + return PF2_ONLINE; + case PFLAGNUM_3: + return 0; + case PFLAGNUM_4: + return PF4_NOCUSTOMAUTH | PF4_NOAUTHDENYREASON | PF4_IMSENDOFFLINE | PF4_OFFLINEFILES | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SERVERMSGID; + case PFLAGNUM_5: + return 0; + case PFLAG_UNIQUEIDTEXT: + return (DWORD_PTR)L"WhatsApp ID"; + } + return 0; +} + +int WhatsAppProto::SetStatus(int iNewStatus) +{ + if (m_iDesiredStatus == iNewStatus) + return 0; + + if (!mir_wstrlen(m_wszNick)) { + Popup(0, LPGENW("Connection cannot be established! You have not completed all necessary fields (Nick)."), LPGENW("Error")); + return 0; + } + + int oldStatus = m_iStatus; + + // Routing statuses not supported by WhatsApp + switch (iNewStatus) { + case ID_STATUS_OFFLINE: + m_iDesiredStatus = iNewStatus; + break; + + case ID_STATUS_ONLINE: + case ID_STATUS_FREECHAT: + default: + m_iDesiredStatus = ID_STATUS_ONLINE; + break; + } + + if (m_iDesiredStatus == ID_STATUS_OFFLINE) { + SetServerStatus(m_iDesiredStatus); + + if (m_hServerConn != nullptr) + Netlib_Shutdown(m_hServerConn); + + m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); + } + else if (m_hServerConn == nullptr && !IsStatusConnecting(m_iStatus)) { + m_iStatus = ID_STATUS_CONNECTING; + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); + + ForkThread(&WhatsAppProto::ServerThread); + } + else if (m_hServerConn != nullptr) { + SetServerStatus(m_iDesiredStatus); + + m_iStatus = m_iDesiredStatus; + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); + } + else ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int WhatsAppProto::SendMsg(MCONTACT hContact, int, const char *pszMsg) +{ + ptrA jid(getStringA(hContact, DBKEY_ID)); + if (jid == nullptr || pszMsg == nullptr) + return 0; + + if (!isOnline()) { + debugLogA("No connection"); + return 0; + } + + return SendTextMessage(jid, pszMsg); +} + +int WhatsAppProto::UserIsTyping(MCONTACT hContact, int type) +{ + if (hContact && isOnline()) { + ptrA jid(getStringA(hContact, DBKEY_ID)); + if (jid && isOnline()) { + WSSendNode( + WANode("chatstates") << CHAR_PARAM("to", jid) << XCHILD((type == PROTOTYPE_SELFTYPING_ON) ? "composing" : "paused")); + } + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// contacts search + +void WhatsAppProto::SearchAckThread(void *targ) +{ + Sleep(100); + + SearchParam *param = (SearchParam*)targ; + PROTOSEARCHRESULT psr = {}; + psr.cbSize = sizeof(psr); + psr.flags = PSR_UNICODE; + psr.nick.w = psr.firstName.w = psr.lastName.w = L""; + psr.id.w = (wchar_t*)param->jid.c_str(); + + ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)param->id, (LPARAM)&psr); + ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)param->id, 0); + + delete param; +} + +HANDLE WhatsAppProto::SearchBasic(const wchar_t* id) +{ + if (!isOnline()) + return nullptr; + + // fake - we always accept search + SearchParam *param = new SearchParam(id, -1); + ForkThread(&WhatsAppProto::SearchAckThread, param); + return (HANDLE)param->id; +} diff --git a/protocols/WhatsApp/src/proto.h b/protocols/WhatsApp/src/proto.h index dbcf57b597..8ec4593767 100644 --- a/protocols/WhatsApp/src/proto.h +++ b/protocols/WhatsApp/src/proto.h @@ -1,508 +1,508 @@ -/* - -WhatsApp plugin for Miranda NG -Copyright © 2019-23 George Hazan - -*/ - -#if !defined(PROTO_H) -#define PROTO_H - -#define S_WHATSAPP_NET "@s.whatsapp.net" -#define APP_VERSION "2.2230.15" -#define KEY_BUNDLE_TYPE "\x05" - -class WhatsAppProto; -typedef void (WhatsAppProto:: *WA_PKT_HANDLER)(const WANode &node); -typedef void (WhatsAppProto:: *WA_PKT_HANDLER_FULL)(const WANode &node, void *pUserInfo); - -struct WAMSG -{ - union { - uint32_t dwFlags = 0; - struct { - bool bPrivateChat : 1; - bool bGroupChat : 1; - bool bDirectStatus : 1; - bool bOtherStatus : 1; - bool bPeerBroadcast : 1; - bool bOtherBroadcast : 1; - bool bOffline : 1; - }; - }; -}; - -struct WAMediaKeys -{ - WAMediaKeys(const uint8_t *pKey, size_t keyLen, const char *pszMediaType); - - uint8_t iv[16]; - uint8_t cipherKey[32]; - uint8_t macKey[64]; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// own requests - -struct WARequestBase -{ - WARequestBase(const CMStringA &_1) : - szPacketId(_1) - {} - virtual ~WARequestBase() {} - - CMStringA szPacketId; - - virtual void Execute(WhatsAppProto *ppro, const WANode &node) = 0; -}; - -class WARequestSimple : public WARequestBase -{ - WA_PKT_HANDLER pHandler; - -public: - WARequestSimple(const CMStringA &_1, WA_PKT_HANDLER _2) : - WARequestBase(_1), - pHandler(_2) - {} - - void Execute(WhatsAppProto *ppro, const WANode &node) override - { - (ppro->*pHandler)(node); - } -}; - -class WARequestParam : public WARequestBase -{ - WA_PKT_HANDLER_FULL pHandler; - void *pUserInfo; - -public: - WARequestParam(const CMStringA &_1, WA_PKT_HANDLER_FULL _2, void *_3) : - WARequestBase(_1), - pHandler(_2), - pUserInfo(_3) - {} - - void Execute(WhatsAppProto *ppro, const WANode &node) override - { - (ppro->*pHandler)(node, pUserInfo); - } -}; - -///////////////////////////////////////////////////////////////////////////////////////// - -struct WAPersistentHandler -{ - WAPersistentHandler(const char *_1, const char *_2, const char *_3, const char *_4, WA_PKT_HANDLER _5) : - pszTitle(_1), pszType(_2), pszXmlns(_3), pszChild(_4), pHandler(_5) - {} - - const char *pszTitle, *pszType, *pszXmlns, *pszChild; - WA_PKT_HANDLER pHandler; -}; - -struct WAUser -{ - WAUser(MCONTACT _1, const char *_2, bool _3 = false) : - hContact(_1), - szId(mir_strdup(_2)), - bIsGroupChat(_3), - arDevices(1) - { - } - - ~WAUser() - { - mir_free(szId); - } - - MCONTACT hContact; - DWORD dwModifyTag = 0; - char *szId; - bool bInited = false, bIsGroupChat, bDeviceInit = false; - SESSION_INFO *si = 0; - OBJLIST arDevices; - time_t m_timer1 = 0, m_timer2 = 0; -}; - -struct WAOwnMessage -{ - WAOwnMessage(int _1, const char *_2, const char *_3) : - pktId(_1), - szJid(_2), - szMessageId(_3) - {} - - int pktId; - CMStringA szJid, szMessageId; -}; - -struct WACollection -{ - WACollection(const char *_1, int _2 = 0) : - szName(mir_strdup(_1)), - version(_2) - {} - - ptrA szName; - int version; - - LT_HASH hash; - std::map indexValueMap; -}; - -class WANoise -{ - friend class WhatsAppProto; - - WhatsAppProto *ppro; - uint32_t readCounter = 0, writeCounter = 0; - bool bInitFinished = false, bSendIntro = false; - MBinBuffer salt, encKey, decKey; - uint8_t hash[32]; - - struct { - MBinBuffer priv, pub; - } noiseKeys, ephemeral; - - void deriveKey(const void *pData, size_t cbLen, MBinBuffer &write, MBinBuffer &read); - void mixIntoKey(const void *n, const void *p); - void updateHash(const void *pData, size_t cbLen); - -public: - WANoise(WhatsAppProto *_ppro); - - void finish(); - void init(); - - MBinBuffer decrypt(const void *pData, size_t cbLen); - MBinBuffer encrypt(const void *pData, size_t cbLen); - - size_t decodeFrame(const uint8_t *&pData, size_t &cbLen); - MBinBuffer encodeFrame(const void *pData, size_t cbLen); -}; - -class MSignalSession : public MZeroedObject -{ - friend class MSignalStore; - signal_protocol_address address; - session_cipher *cipher = nullptr; - -public: - CMStringA szName; - MBinBuffer sessionData; - - MSignalSession(const CMStringA &_1, int _2); - ~MSignalSession(); - - bool hasAddress(const char *name, size_t name_len) const; - - __forceinline session_cipher* getCipher(void) const { return cipher; } - __forceinline int getDeviceId() const { return address.device_id; } - CMStringA getSetting() const; -}; - -class MSignalStore -{ - void init(); - - signal_context *m_pContext; - signal_protocol_store_context *m_pStore; - - void importPublicKey(ec_public_key **result, MBinBuffer &buf); - -public: - PROTO_INTERFACE *pProto; - const char *prefix; - - OBJLIST arSessions; - - struct - { - MBinBuffer priv, pub; - } - signedIdentity; - - struct - { - MBinBuffer priv, pub, signature; - uint32_t keyid; - } - preKey; - - MSignalStore(PROTO_INTERFACE *_1, const char *_2); - ~MSignalStore(); - - __forceinline signal_context *CTX() const { return m_pContext; } - - MSignalSession* createSession(const CMStringA &szName, int deviceId); - MSignalSession* getSession(const signal_protocol_address *address); - void injectSession(const char *szJid, const WANode *pNode, const WANode *pKey); - - MBinBuffer decryptSignalProto(const CMStringA &from, const char *pszType, const MBinBuffer &encrypted); - MBinBuffer decryptGroupSignalProto(const CMStringA &from, const CMStringA &author, const MBinBuffer &encrypted); - - MBinBuffer encryptSenderKey(const WAJid &to, const CMStringA &from, const MBinBuffer &buf, MBinBuffer &skmsgKey); - MBinBuffer encryptSignalProto(const WAJid &to, const MBinBuffer &buf, int &type); - - MBinBuffer encodeSignedIdentity(bool); - void generatePrekeys(int count); - - void logError(int code, const char *szMessage); - - void processSenderKeyMessage(const CMStringA &author, const Wa__Message__SenderKeyDistributionMessage *msg); -}; - -class WhatsAppProto : public PROTO -{ - friend class WANoise; - friend class CWhatsAppQRDlg; - friend class COptionsDlg; - - class CWhatsAppProtoImpl - { - friend class WhatsAppProto; - WhatsAppProto &m_proto; - - CTimer m_keepAlive, m_resyncApp; - void OnKeepAlive(CTimer *) - { m_proto.SendKeepAlive(); - } - void OnResync(CTimer *pTimer) - { - pTimer->Stop(); - m_proto.ResyncAll(); - } - - CWhatsAppProtoImpl(WhatsAppProto &pro) : - m_proto(pro), - m_keepAlive(Miranda_GetSystemWindow(), UINT_PTR(this)), - m_resyncApp(Miranda_GetSystemWindow(), UINT_PTR(this)+1) - { - m_keepAlive.OnEvent = Callback(this, &CWhatsAppProtoImpl::OnKeepAlive); - m_resyncApp.OnEvent = Callback(this, &CWhatsAppProtoImpl::OnResync); - } - } m_impl; - - bool m_bTerminated, m_bRespawn, m_bUpdatedPrekeys, m_bUnregister; - ptrW m_tszDefaultGroup; - - CMStringA m_szJid; - CMStringW m_tszAvatarFolder; - - EVP_PKEY *m_pKeys; // private & public keys - WANoise *m_noise; - - void UploadMorePrekeys(); - - // App state management - OBJLIST m_arCollections; - - void InitSync(void); - void ApplyPatch(const JSONNode &index, const Wa__SyncActionValue *data); - void ParsePatch(WACollection *pColl, const Wa__SyncdRecord *rec, bool bSet); - void ProcessHistorySync(const Wa__HistorySync *pSync); - void ResyncServer(const OBJLIST &task); - void ResyncAll(void); - - __forceinline WACollection *FindCollection(const char *pszName) - { return m_arCollections.find((WACollection *)&pszName); - } - - // Contacts management ///////////////////////////////////////////////////////////////// - - mir_cs m_csUsers; - OBJLIST m_arUsers; - - mir_cs m_csOwnMessages; - OBJLIST m_arOwnMsgs; - - WAUser* FindUser(const char *szId); - WAUser* AddUser(const char *szId, bool bTemporary); - - // Group chats ///////////////////////////////////////////////////////////////////////// - - void GC_RefreshMetadata(); - void GC_GetAllMetadata(); - void GC_ParseMetadata(const WANode *pGroup); - - int __cdecl GcEventHook(WPARAM, LPARAM); - int __cdecl GcMenuHook(WPARAM, LPARAM); - - // UI ////////////////////////////////////////////////////////////////////////////////// - - void CloseQrDialog(); - bool ShowQrCode(const CMStringA &ref); - - /// Network //////////////////////////////////////////////////////////////////////////// - - time_t m_lastRecvTime; - HNETLIBCONN m_hServerConn; - - mir_cs m_csPacketQueue; - OBJLIST m_arPacketQueue; - - LIST m_arPersistent; - WA_PKT_HANDLER FindPersistentHandler(const WANode &node); - - int m_iPacketId; - uint16_t m_wMsgPrefix[2]; - CMStringA GenerateMessageId(); - CMStringA GetMessageText(const Wa__Message *pMessage); - void GetMessageContent(CMStringA &txt, const char *szType, const char *szUrl, const char *szMimetype, const char *szDirectPath, const ProtobufCBinaryData &szMediaKey, const char *szCaption = nullptr); - void ProcessMessage(WAMSG type, const Wa__WebMessageInfo &msg); - bool CreateMsgParticipant(WANode *pParticipants, const WAJid &jid, const MBinBuffer &orig); - - void ProcessReceipt(MCONTACT hContact, const char *msgId, bool bRead); - - bool WSReadPacket(const WSHeader &hdr, MBinBuffer &buf); - int WSSend(const ProtobufCMessage &msg); - int WSSendNode(WANode &node); - int WSSendNode(WANode &node, WA_PKT_HANDLER); - int WSSendNode(WANode &node, WA_PKT_HANDLER_FULL, void *pUserInfo); - - MBinBuffer DownloadEncryptedFile(const char *url, const ProtobufCBinaryData &mediaKeys, const char *pszType); - CMStringW GetTmpFileName(const char *pszClass, const char *addition); - - void OnLoggedIn(void); - void OnLoggedOut(void); - void ProcessFailure(int code); - void ServerThreadWorker(void); - void ShutdownSession(void); - - void SendAck(const WANode &node); - void SendReceipt(const char *pszTo, const char *pszParticipant, const char *pszId, const char *pszType); - void SendKeepAlive(void); - int SendTextMessage(const char *jid, const char *pszMsg); - void SendUnregister(void); - void SendUsync(const LIST &jids, void *pUserInfo); - void SetServerStatus(int iStatus); - - void FinishTask(WASendTask *pTask); - void SendTask(WASendTask *pTask); - - /// Popups ///////////////////////////////////////////////////////////////////////////// - - HANDLE m_hPopupClass; - CMOption m_bUsePopups; - - void InitPopups(void); - void Popup(MCONTACT hContact, const wchar_t *szMsg, const wchar_t *szTitle); - - /// Request handlers /////////////////////////////////////////////////////////////////// - - void OnProcessHandshake(const uint8_t *pData, int cbLen); - - void InitPersistentHandlers(); - void OnAccountSync(const WANode &node); - void OnIqBlockList(const WANode &node); - void OnIqCountPrekeys(const WANode &node); - void OnIqDoNothing(const WANode &node); - void OnIqGcGetAllMetadata(const WANode &node); - void OnIqGetAvatar(const WANode &node); - void OnIqGetKeys(const WANode &node, void *pUserInfo); - void OnIqGetUsync(const WANode &node, void *pUserInfo); - void OnIqPairDevice(const WANode &node); - void OnIqPairSuccess(const WANode &node); - void OnIqResult(const WANode &node); - void OnIqServerSync(const WANode &node); - void OnNotifyAny(const WANode &node); - void OnNotifyDevices(const WANode &node); - void OnNotifyEncrypt(const WANode &node); - void OnNotifyPicture(const WANode &node); - void OnReceiveAck(const WANode &node); - void OnReceiveChatState(const WANode &node); - void OnReceiveFailure(const WANode &node); - void OnReceiveInfo(const WANode &node); - void OnReceiveMessage(const WANode &node); - void OnReceiveReceipt(const WANode &node); - void OnServerSync(const WANode &node); - void OnStreamError(const WANode &node); - void OnSuccess(const WANode &node); - - // Signal - MSignalStore m_signalStore; - - // Binary packets - void ProcessBinaryPacket(const uint8_t *pData, size_t cbLen); - - // unzip operations - MBinBuffer unzip(const MBinBuffer &src); - - /// Avatars //////////////////////////////////////////////////////////////////////////// - CMStringW GetAvatarFileName(MCONTACT hContact); - void ServerFetchAvatar(const char *jid); - - INT_PTR __cdecl GetAvatarInfo(WPARAM, LPARAM); - INT_PTR __cdecl GetAvatarCaps(WPARAM, LPARAM); - INT_PTR __cdecl GetMyAvatar(WPARAM, LPARAM); - INT_PTR __cdecl SetMyAvatar(WPARAM, LPARAM); - -public: - WhatsAppProto(const char *proto_name, const wchar_t *username); - ~WhatsAppProto(); - - __forceinline bool isOnline() const - { return m_hServerConn != 0; - } - - __forceinline void writeStr(const char *pszSetting, const JSONNode &node) - { - CMStringW str(node.as_mstring()); - if (!str.IsEmpty()) - setWString(pszSetting, str); - } - - class CWhatsAppQRDlg *m_pQRDlg; - - // PROTO_INTERFACE ///////////////////////////////////////////////////////////////////// - - MCONTACT AddToList(int flags, PROTOSEARCHRESULT *psr) override; - INT_PTR GetCaps(int type, MCONTACT hContact = NULL) override; - HANDLE SearchBasic(const wchar_t* id) override; - int SendMsg(MCONTACT hContact, int flags, const char* msg) override; - int SetStatus(int iNewStatus) override; - int UserIsTyping(MCONTACT hContact, int type) override; - - void OnErase() override; - void OnModulesLoaded() override; - - // Services //////////////////////////////////////////////////////////////////////////// - - INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM); - - // Events ////////////////////////////////////////////////////////////////////////////// - - int __cdecl OnOptionsInit(WPARAM, LPARAM); - int __cdecl OnBuildStatusMenu(WPARAM, LPARAM); - - // Options ///////////////////////////////////////////////////////////////////////////// - - CMOption m_wszNick; // your nick name in presence - CMOption m_wszDeviceName; // how do you see Miranda in mobile phone - CMOption m_wszDefaultGroup; // clist group to store contacts - CMOption m_bHideGroupchats; // do not open chat windows on creation - CMOption m_bUseBbcodes; // use extended markup for messages - - // Processing Threads ////////////////////////////////////////////////////////////////// - - void __cdecl SearchAckThread(void*); - void __cdecl ServerThread(void*); -}; - -struct CMPlugin : public ACCPROTOPLUGIN -{ - HNETLIBUSER hAvatarUser = nullptr; - HNETLIBCONN hAvatarConn = nullptr; - bool SaveFile(const char *pszUrl, PROTO_AVATAR_INFORMATION &ai); - - bool bHasMessageState = false; - - CMPlugin(); - - int Load() override; - int Unload() override; -}; - -#endif +/* + +WhatsApp plugin for Miranda NG +Copyright © 2019-23 George Hazan + +*/ + +#if !defined(PROTO_H) +#define PROTO_H + +#define S_WHATSAPP_NET "@s.whatsapp.net" +#define APP_VERSION "2.2230.15" +#define KEY_BUNDLE_TYPE "\x05" + +class WhatsAppProto; +typedef void (WhatsAppProto:: *WA_PKT_HANDLER)(const WANode &node); +typedef void (WhatsAppProto:: *WA_PKT_HANDLER_FULL)(const WANode &node, void *pUserInfo); + +struct WAMSG +{ + union { + uint32_t dwFlags = 0; + struct { + bool bPrivateChat : 1; + bool bGroupChat : 1; + bool bDirectStatus : 1; + bool bOtherStatus : 1; + bool bPeerBroadcast : 1; + bool bOtherBroadcast : 1; + bool bOffline : 1; + }; + }; +}; + +struct WAMediaKeys +{ + WAMediaKeys(const uint8_t *pKey, size_t keyLen, const char *pszMediaType); + + uint8_t iv[16]; + uint8_t cipherKey[32]; + uint8_t macKey[64]; +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// own requests + +struct WARequestBase +{ + WARequestBase(const CMStringA &_1) : + szPacketId(_1) + {} + virtual ~WARequestBase() {} + + CMStringA szPacketId; + + virtual void Execute(WhatsAppProto *ppro, const WANode &node) = 0; +}; + +class WARequestSimple : public WARequestBase +{ + WA_PKT_HANDLER pHandler; + +public: + WARequestSimple(const CMStringA &_1, WA_PKT_HANDLER _2) : + WARequestBase(_1), + pHandler(_2) + {} + + void Execute(WhatsAppProto *ppro, const WANode &node) override + { + (ppro->*pHandler)(node); + } +}; + +class WARequestParam : public WARequestBase +{ + WA_PKT_HANDLER_FULL pHandler; + void *pUserInfo; + +public: + WARequestParam(const CMStringA &_1, WA_PKT_HANDLER_FULL _2, void *_3) : + WARequestBase(_1), + pHandler(_2), + pUserInfo(_3) + {} + + void Execute(WhatsAppProto *ppro, const WANode &node) override + { + (ppro->*pHandler)(node, pUserInfo); + } +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +struct WAPersistentHandler +{ + WAPersistentHandler(const char *_1, const char *_2, const char *_3, const char *_4, WA_PKT_HANDLER _5) : + pszTitle(_1), pszType(_2), pszXmlns(_3), pszChild(_4), pHandler(_5) + {} + + const char *pszTitle, *pszType, *pszXmlns, *pszChild; + WA_PKT_HANDLER pHandler; +}; + +struct WAUser +{ + WAUser(MCONTACT _1, const char *_2, bool _3 = false) : + hContact(_1), + szId(mir_strdup(_2)), + bIsGroupChat(_3), + arDevices(1) + { + } + + ~WAUser() + { + mir_free(szId); + } + + MCONTACT hContact; + DWORD dwModifyTag = 0; + char *szId; + bool bInited = false, bIsGroupChat, bDeviceInit = false; + SESSION_INFO *si = 0; + OBJLIST arDevices; + time_t m_timer1 = 0, m_timer2 = 0; +}; + +struct WAOwnMessage +{ + WAOwnMessage(int _1, const char *_2, const char *_3) : + pktId(_1), + szJid(_2), + szMessageId(_3) + {} + + int pktId; + CMStringA szJid, szMessageId; +}; + +struct WACollection +{ + WACollection(const char *_1, int _2 = 0) : + szName(mir_strdup(_1)), + version(_2) + {} + + ptrA szName; + int version; + + LT_HASH hash; + std::map indexValueMap; +}; + +class WANoise +{ + friend class WhatsAppProto; + + WhatsAppProto *ppro; + uint32_t readCounter = 0, writeCounter = 0; + bool bInitFinished = false, bSendIntro = false; + MBinBuffer salt, encKey, decKey; + uint8_t hash[32]; + + struct { + MBinBuffer priv, pub; + } noiseKeys, ephemeral; + + void deriveKey(const void *pData, size_t cbLen, MBinBuffer &write, MBinBuffer &read); + void mixIntoKey(const void *n, const void *p); + void updateHash(const void *pData, size_t cbLen); + +public: + WANoise(WhatsAppProto *_ppro); + + void finish(); + void init(); + + MBinBuffer decrypt(const void *pData, size_t cbLen); + MBinBuffer encrypt(const void *pData, size_t cbLen); + + size_t decodeFrame(const uint8_t *&pData, size_t &cbLen); + MBinBuffer encodeFrame(const void *pData, size_t cbLen); +}; + +class MSignalSession : public MZeroedObject +{ + friend class MSignalStore; + signal_protocol_address address; + session_cipher *cipher = nullptr; + +public: + CMStringA szName; + MBinBuffer sessionData; + + MSignalSession(const CMStringA &_1, int _2); + ~MSignalSession(); + + bool hasAddress(const char *name, size_t name_len) const; + + __forceinline session_cipher* getCipher(void) const { return cipher; } + __forceinline int getDeviceId() const { return address.device_id; } + CMStringA getSetting() const; +}; + +class MSignalStore +{ + void init(); + + signal_context *m_pContext; + signal_protocol_store_context *m_pStore; + + void importPublicKey(ec_public_key **result, MBinBuffer &buf); + +public: + PROTO_INTERFACE *pProto; + const char *prefix; + + OBJLIST arSessions; + + struct + { + MBinBuffer priv, pub; + } + signedIdentity; + + struct + { + MBinBuffer priv, pub, signature; + uint32_t keyid; + } + preKey; + + MSignalStore(PROTO_INTERFACE *_1, const char *_2); + ~MSignalStore(); + + __forceinline signal_context *CTX() const { return m_pContext; } + + MSignalSession* createSession(const CMStringA &szName, int deviceId); + MSignalSession* getSession(const signal_protocol_address *address); + void injectSession(const char *szJid, const WANode *pNode, const WANode *pKey); + + MBinBuffer decryptSignalProto(const CMStringA &from, const char *pszType, const MBinBuffer &encrypted); + MBinBuffer decryptGroupSignalProto(const CMStringA &from, const CMStringA &author, const MBinBuffer &encrypted); + + MBinBuffer encryptSenderKey(const WAJid &to, const CMStringA &from, const MBinBuffer &buf, MBinBuffer &skmsgKey); + MBinBuffer encryptSignalProto(const WAJid &to, const MBinBuffer &buf, int &type); + + MBinBuffer encodeSignedIdentity(bool); + void generatePrekeys(int count); + + void logError(int code, const char *szMessage); + + void processSenderKeyMessage(const CMStringA &author, const Wa__Message__SenderKeyDistributionMessage *msg); +}; + +class WhatsAppProto : public PROTO +{ + friend class WANoise; + friend class CWhatsAppQRDlg; + friend class COptionsDlg; + + class CWhatsAppProtoImpl + { + friend class WhatsAppProto; + WhatsAppProto &m_proto; + + CTimer m_keepAlive, m_resyncApp; + void OnKeepAlive(CTimer *) + { m_proto.SendKeepAlive(); + } + void OnResync(CTimer *pTimer) + { + pTimer->Stop(); + m_proto.ResyncAll(); + } + + CWhatsAppProtoImpl(WhatsAppProto &pro) : + m_proto(pro), + m_keepAlive(Miranda_GetSystemWindow(), UINT_PTR(this)), + m_resyncApp(Miranda_GetSystemWindow(), UINT_PTR(this)+1) + { + m_keepAlive.OnEvent = Callback(this, &CWhatsAppProtoImpl::OnKeepAlive); + m_resyncApp.OnEvent = Callback(this, &CWhatsAppProtoImpl::OnResync); + } + } m_impl; + + bool m_bTerminated, m_bRespawn, m_bUpdatedPrekeys, m_bUnregister; + ptrW m_tszDefaultGroup; + + CMStringA m_szJid; + CMStringW m_tszAvatarFolder; + + EVP_PKEY *m_pKeys; // private & public keys + WANoise *m_noise; + + void UploadMorePrekeys(); + + // App state management + OBJLIST m_arCollections; + + void InitSync(void); + void ApplyPatch(const JSONNode &index, const Wa__SyncActionValue *data); + void ParsePatch(WACollection *pColl, const Wa__SyncdRecord *rec, bool bSet); + void ProcessHistorySync(const Wa__HistorySync *pSync); + void ResyncServer(const OBJLIST &task); + void ResyncAll(void); + + __forceinline WACollection *FindCollection(const char *pszName) + { return m_arCollections.find((WACollection *)&pszName); + } + + // Contacts management ///////////////////////////////////////////////////////////////// + + mir_cs m_csUsers; + OBJLIST m_arUsers; + + mir_cs m_csOwnMessages; + OBJLIST m_arOwnMsgs; + + WAUser* FindUser(const char *szId); + WAUser* AddUser(const char *szId, bool bTemporary); + + // Group chats ///////////////////////////////////////////////////////////////////////// + + void GC_RefreshMetadata(); + void GC_GetAllMetadata(); + void GC_ParseMetadata(const WANode *pGroup); + + int __cdecl GcEventHook(WPARAM, LPARAM); + int __cdecl GcMenuHook(WPARAM, LPARAM); + + // UI ////////////////////////////////////////////////////////////////////////////////// + + void CloseQrDialog(); + bool ShowQrCode(const CMStringA &ref); + + /// Network //////////////////////////////////////////////////////////////////////////// + + time_t m_lastRecvTime; + HNETLIBCONN m_hServerConn; + + mir_cs m_csPacketQueue; + OBJLIST m_arPacketQueue; + + LIST m_arPersistent; + WA_PKT_HANDLER FindPersistentHandler(const WANode &node); + + int m_iPacketId; + uint16_t m_wMsgPrefix[2]; + CMStringA GenerateMessageId(); + CMStringA GetMessageText(const Wa__Message *pMessage); + void GetMessageContent(CMStringA &txt, const char *szType, const char *szUrl, const char *szMimetype, const char *szDirectPath, const ProtobufCBinaryData &szMediaKey, const char *szCaption = nullptr); + void ProcessMessage(WAMSG type, const Wa__WebMessageInfo &msg); + bool CreateMsgParticipant(WANode *pParticipants, const WAJid &jid, const MBinBuffer &orig); + + void ProcessReceipt(MCONTACT hContact, const char *msgId, bool bRead); + + bool WSReadPacket(const WSHeader &hdr, MBinBuffer &buf); + int WSSend(const ProtobufCMessage &msg); + int WSSendNode(WANode &node); + int WSSendNode(WANode &node, WA_PKT_HANDLER); + int WSSendNode(WANode &node, WA_PKT_HANDLER_FULL, void *pUserInfo); + + MBinBuffer DownloadEncryptedFile(const char *url, const ProtobufCBinaryData &mediaKeys, const char *pszType); + CMStringW GetTmpFileName(const char *pszClass, const char *addition); + + void OnLoggedIn(void); + void OnLoggedOut(void); + void ProcessFailure(int code); + void ServerThreadWorker(void); + void ShutdownSession(void); + + void SendAck(const WANode &node); + void SendReceipt(const char *pszTo, const char *pszParticipant, const char *pszId, const char *pszType); + void SendKeepAlive(void); + int SendTextMessage(const char *jid, const char *pszMsg); + void SendUnregister(void); + void SendUsync(const LIST &jids, void *pUserInfo); + void SetServerStatus(int iStatus); + + void FinishTask(WASendTask *pTask); + void SendTask(WASendTask *pTask); + + /// Popups ///////////////////////////////////////////////////////////////////////////// + + HANDLE m_hPopupClass; + CMOption m_bUsePopups; + + void InitPopups(void); + void Popup(MCONTACT hContact, const wchar_t *szMsg, const wchar_t *szTitle); + + /// Request handlers /////////////////////////////////////////////////////////////////// + + void OnProcessHandshake(const uint8_t *pData, int cbLen); + + void InitPersistentHandlers(); + void OnAccountSync(const WANode &node); + void OnIqBlockList(const WANode &node); + void OnIqCountPrekeys(const WANode &node); + void OnIqDoNothing(const WANode &node); + void OnIqGcGetAllMetadata(const WANode &node); + void OnIqGetAvatar(const WANode &node); + void OnIqGetKeys(const WANode &node, void *pUserInfo); + void OnIqGetUsync(const WANode &node, void *pUserInfo); + void OnIqPairDevice(const WANode &node); + void OnIqPairSuccess(const WANode &node); + void OnIqResult(const WANode &node); + void OnIqServerSync(const WANode &node); + void OnNotifyAny(const WANode &node); + void OnNotifyDevices(const WANode &node); + void OnNotifyEncrypt(const WANode &node); + void OnNotifyPicture(const WANode &node); + void OnReceiveAck(const WANode &node); + void OnReceiveChatState(const WANode &node); + void OnReceiveFailure(const WANode &node); + void OnReceiveInfo(const WANode &node); + void OnReceiveMessage(const WANode &node); + void OnReceiveReceipt(const WANode &node); + void OnServerSync(const WANode &node); + void OnStreamError(const WANode &node); + void OnSuccess(const WANode &node); + + // Signal + MSignalStore m_signalStore; + + // Binary packets + void ProcessBinaryPacket(const uint8_t *pData, size_t cbLen); + + // unzip operations + MBinBuffer unzip(const MBinBuffer &src); + + /// Avatars //////////////////////////////////////////////////////////////////////////// + CMStringW GetAvatarFileName(MCONTACT hContact); + void ServerFetchAvatar(const char *jid); + + INT_PTR __cdecl GetAvatarInfo(WPARAM, LPARAM); + INT_PTR __cdecl GetAvatarCaps(WPARAM, LPARAM); + INT_PTR __cdecl GetMyAvatar(WPARAM, LPARAM); + INT_PTR __cdecl SetMyAvatar(WPARAM, LPARAM); + +public: + WhatsAppProto(const char *proto_name, const wchar_t *username); + ~WhatsAppProto(); + + __forceinline bool isOnline() const + { return m_hServerConn != 0; + } + + __forceinline void writeStr(const char *pszSetting, const JSONNode &node) + { + CMStringW str(node.as_mstring()); + if (!str.IsEmpty()) + setWString(pszSetting, str); + } + + class CWhatsAppQRDlg *m_pQRDlg; + + // PROTO_INTERFACE ///////////////////////////////////////////////////////////////////// + + MCONTACT AddToList(int flags, PROTOSEARCHRESULT *psr) override; + INT_PTR GetCaps(int type, MCONTACT hContact = NULL) override; + HANDLE SearchBasic(const wchar_t* id) override; + int SendMsg(MCONTACT hContact, int flags, const char* msg) override; + int SetStatus(int iNewStatus) override; + int UserIsTyping(MCONTACT hContact, int type) override; + + void OnErase() override; + void OnModulesLoaded() override; + + // Services //////////////////////////////////////////////////////////////////////////// + + INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM, LPARAM); + + // Events ////////////////////////////////////////////////////////////////////////////// + + int __cdecl OnOptionsInit(WPARAM, LPARAM); + int __cdecl OnBuildStatusMenu(WPARAM, LPARAM); + + // Options ///////////////////////////////////////////////////////////////////////////// + + CMOption m_wszNick; // your nick name in presence + CMOption m_wszDeviceName; // how do you see Miranda in mobile phone + CMOption m_wszDefaultGroup; // clist group to store contacts + CMOption m_bHideGroupchats; // do not open chat windows on creation + CMOption m_bUseBbcodes; // use extended markup for messages + + // Processing Threads ////////////////////////////////////////////////////////////////// + + void __cdecl SearchAckThread(void*); + void __cdecl ServerThread(void*); +}; + +struct CMPlugin : public ACCPROTOPLUGIN +{ + HNETLIBUSER hAvatarUser = nullptr; + HNETLIBCONN hAvatarConn = nullptr; + bool SaveFile(const char *pszUrl, PROTO_AVATAR_INFORMATION &ai); + + bool bHasMessageState = false; + + CMPlugin(); + + int Load() override; + int Unload() override; +}; + +#endif diff --git a/protocols/WhatsApp/src/server.cpp b/protocols/WhatsApp/src/server.cpp index 7512b05caf..24d64e5aa7 100644 --- a/protocols/WhatsApp/src/server.cpp +++ b/protocols/WhatsApp/src/server.cpp @@ -1,418 +1,418 @@ -/* - -WhatsApp plugin for Miranda NG -Copyright © 2019-23 George Hazan - -*/ - -#include "stdafx.h" - -///////////////////////////////////////////////////////////////////////////////////////// -// gateway worker thread - -void WhatsAppProto::ServerThread(void *) -{ - do { - m_bRespawn = m_bUnregister = false; - ServerThreadWorker(); - } - while (m_bRespawn); - - OnLoggedOut(); -} - -void WhatsAppProto::ServerThreadWorker() -{ - // connect websocket - NETLIBHTTPHEADER hdrs[] = - { - { "Origin", "https://web.whatsapp.com" }, - { 0, 0 } - }; - - NLHR_PTR pReply(WebSocket_Connect(m_hNetlibUser, "web.whatsapp.com/ws/chat", hdrs)); - if (pReply == nullptr) { - debugLogA("Server connection failed, exiting"); - return; - } - - if (pReply->resultCode != 101) - return; - - delete m_noise; - m_noise = new WANoise(this); - m_noise->init(); - - debugLogA("Server connection succeeded"); - m_hServerConn = pReply->nlc; - m_lastRecvTime = time(0); - m_iPacketId = 1; - - Utils_GetRandom(m_wMsgPrefix, sizeof(m_wMsgPrefix)); - - Wa__HandshakeMessage__ClientHello client; - client.ephemeral = {m_noise->ephemeral.pub.length(), m_noise->ephemeral.pub.data()}; - client.has_ephemeral = true; - - Wa__HandshakeMessage msg; - msg.clienthello = &client; - WSSend(msg); - - MBinBuffer netbuf; - - for (m_bTerminated = false; !m_bTerminated;) { - unsigned char buf[2048]; - int bufSize = Netlib_Recv(m_hServerConn, (char *)buf, _countof(buf), MSG_NODUMP); - if (bufSize == 0) { - debugLogA("Gateway connection gracefully closed"); - break; - } - if (bufSize < 0) { - debugLogA("Gateway connection error, exiting"); - break; - } - - netbuf.append(buf, bufSize); - - WSHeader hdr; - if (!WebSocket_InitHeader(hdr, netbuf.data(), netbuf.length())) - continue; - - // we lack some data, let's read them - if (netbuf.length() < hdr.headerSize + hdr.payloadSize) - if (!WSReadPacket(hdr, netbuf)) - break; - - // debugLogA("Got packet: buffer = %d, opcode = %d, headerSize = %d, payloadSize = %d, final = %d, masked = %d", - // netbuf.length(), hdr.opCode, hdr.headerSize, hdr.payloadSize, hdr.bIsFinal, hdr.bIsMasked); - // Netlib_Dump(m_hServerConn, netbuf.data(), netbuf.length(), false, 0); - - m_lastRecvTime = time(0); - - // read all payloads from the current buffer, one by one - while (true) { - MBinBuffer currPacket; - currPacket.assign(netbuf.data() + hdr.headerSize, hdr.payloadSize); - - switch (hdr.opCode) { - case 1: // json packet - debugLogA("Text packet, skipping"); - /* - currPacket.append("", 1); // add 0 to use strchr safely - CMStringA szJson(pos, (int)dataSize); - - JSONNode root = JSONNode::parse(szJson); - if (root) { - debugLogA("JSON received:\n%s", start); - - CMStringA szPrefix(start, int(pos - start - 1)); - auto *pReq = m_arPacketQueue.find((WARequest *)&szPrefix); - if (pReq != nullptr) { - root << CHAR_PARAM("$id$", szPrefix); - } - } - } - */ - break; - - case 2: // binary packet - if (hdr.payloadSize > 32) - ProcessBinaryPacket(currPacket.data(), hdr.payloadSize); - break; - - case 8: // close - debugLogA("server required to exit"); - m_bRespawn = m_bTerminated = true; // simply reconnect, don't exit - break; - - default: - Netlib_Dump(m_hServerConn, currPacket.data(), hdr.payloadSize, false, 0); - } - - netbuf.remove(hdr.headerSize + hdr.payloadSize); - // debugLogA("%d bytes removed from network buffer, %d bytes remain", hdr.headerSize + hdr.payloadSize, netbuf.length()); - if (netbuf.length() == 0) - break; - - // if we have not enough data for header, continue reading - if (!WebSocket_InitHeader(hdr, netbuf.data(), netbuf.length())) { - debugLogA("not enough data for header, continue reading"); - break; - } - - // if we have not enough data for data, continue reading - if (hdr.headerSize + hdr.payloadSize > netbuf.length()) { - debugLogA("not enough place for data (%d+%d > %d), continue reading", hdr.headerSize, hdr.payloadSize, netbuf.length()); - break; - } - - debugLogA("Got inner packet: buffer = %d, opcode = %d, headerSize = %d, payloadSize = %d, final = %d, masked = %d", - netbuf.length(), hdr.opCode, hdr.headerSize, hdr.payloadSize, hdr.bIsFinal, hdr.bIsMasked); - } - } - - debugLogA("Server connection dropped"); - Netlib_CloseHandle(m_hServerConn); - m_hServerConn = nullptr; -} - -bool WhatsAppProto::WSReadPacket(const WSHeader &hdr, MBinBuffer &res) -{ - size_t currPacketSize = res.length() - hdr.headerSize; - - char buf[1024]; - while (currPacketSize < hdr.payloadSize) { - int result = Netlib_Recv(m_hServerConn, buf, _countof(buf), MSG_NODUMP); - if (result == 0) { - debugLogA("Gateway connection gracefully closed"); - return false; - } - if (result < 0) { - debugLogA("Gateway connection error, exiting"); - return false; - } - - currPacketSize += result; - res.append(buf, result); - } - return true; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Binary data processing - -void WhatsAppProto::ProcessBinaryPacket(const uint8_t *pData, size_t cbDataLen) -{ - while (size_t payloadLen = m_noise->decodeFrame(pData, cbDataLen)) { - if (m_noise->bInitFinished) { - MBinBuffer buf = m_noise->decrypt(pData, payloadLen); - - WAReader rdr(buf.data(), buf.length()); - auto b = rdr.readInt8(); - if (b & 2) { - buf.remove(1); - buf = unzip(buf); - rdr = WAReader(buf.data(), buf.length()); - } - - if (WANode *pNode = rdr.readNode()) { - CMStringA szText; - pNode->print(szText); - debugLogA("Got binary node:\n%s", szText.c_str()); - - auto pHandler = FindPersistentHandler(*pNode); - if (pHandler) - (this->*pHandler)(*pNode); - else - debugLogA("cannot handle incoming message"); - - delete pNode; - } - else { - debugLogA("wrong or broken payload"); - Netlib_Dump(m_hServerConn, pData, cbDataLen, false, 0); - } - } - else OnProcessHandshake(pData, (int)payloadLen); - - pData = (BYTE*)pData + payloadLen; - cbDataLen -= payloadLen; - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void WhatsAppProto::ProcessFailure(int code) -{ - switch (code) { - case 401: - debugLogA("Connection logged out from another device, exiting"); - Popup(0, TranslateT("This account was logged out from mobile phone, you need to link it again"), m_tszUserName); - - OnErase(); - break; - - case 408: - debugLogA("Connection lost, exiting"); - break; - - case 411: - debugLogA("Conflict between two devices, exiting"); - break; - - case 428: - debugLogA("Connection forcibly closed by the server, exiting"); - break; - - case 440: - debugLogA("Connection replaced from another device, exiting"); - break; - - case 515: - debugLogA("Server required to restart immediately, leaving thread"); - m_bRespawn = true; - break; - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void WhatsAppProto::OnLoggedIn() -{ - debugLogA("WhatsAppProto::OnLoggedIn"); - - if (m_bUnregister) { - SendUnregister(); - m_bTerminated = true; - return; - } - - SetServerStatus(m_iDesiredStatus); - - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, m_iDesiredStatus); - m_iStatus = m_iDesiredStatus; - m_bUpdatedPrekeys = false; - - m_impl.m_keepAlive.Start(1000); - - // retrieve initial info - WANodeIq abt(IQ::GET, "abt"); - abt.addChild("props")->addAttr("protocol", "1"); - WSSendNode(abt, &WhatsAppProto::OnIqDoNothing); - - WSSendNode( - WANodeIq(IQ::GET, "w") << XCHILD("props"), - &WhatsAppProto::OnIqDoNothing); - - WSSendNode( - WANodeIq(IQ::GET, "blocklist"), - &WhatsAppProto::OnIqBlockList); - - WSSendNode( - WANodeIq(IQ::GET, "privacy") << XCHILD("privacy"), - &WhatsAppProto::OnIqDoNothing); - - GC_RefreshMetadata(); -} - -void WhatsAppProto::OnLoggedOut(void) -{ - m_impl.m_keepAlive.Stop(); - - debugLogA("WhatsAppProto::OnLoggedOut"); - m_bTerminated = true; - - ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE); - m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; - - setAllContactStatuses(ID_STATUS_OFFLINE, false); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Service packets sending - -void WhatsAppProto::SendAck(const WANode &node) -{ - WANode ack("ack"); - ack << CHAR_PARAM("to", node.getAttr("from")) << CHAR_PARAM("id", node.getAttr("id")) << CHAR_PARAM("class", node.title); - if (node.title != "message") - if (auto *param = node.getAttr("type")) - ack << CHAR_PARAM("type", param); - if (auto *param = node.getAttr("participant")) - ack << CHAR_PARAM("participant", param); - if (auto *param = node.getAttr("recipient")) - ack << CHAR_PARAM("recipient", param); - WSSendNode(ack); -} - -void WhatsAppProto::SendKeepAlive() -{ - time_t now = time(0); - if (now - m_lastRecvTime > 20) { - WSSendNode(WANodeIq(IQ::GET, "w:p") << XCHILD("ping"), &WhatsAppProto::OnIqDoNothing); - - m_lastRecvTime = now; - } - - for (auto &it : m_arUsers) { - if (it->m_timer1 && now - it->m_timer1 > 600) { - it->m_timer1 = 0; - it->m_timer2 = now; - setWord(it->hContact, "Status", ID_STATUS_AWAY); - } - else if (it->m_timer2 && now - it->m_timer2 > 600) { - it->m_timer2 = 0; - setWord(it->hContact, "Status", ID_STATUS_OFFLINE); - } - } -} - -void WhatsAppProto::SendReceipt(const char *pszTo, const char *pszParticipant, const char *pszId, const char *pszType) -{ - WANode receipt("receipt"); - receipt << CHAR_PARAM("id", pszId); - - if (!mir_strcmp(pszType, "read") || !mir_strcmp(pszType, "read-self")) - receipt << INT_PARAM("t", time(0)); - - if (!mir_strcmp(pszType, "sender") && WAJid(pszTo).isUser()) - receipt << CHAR_PARAM("to", pszParticipant) << CHAR_PARAM("recipient", pszTo); - else { - receipt << CHAR_PARAM("to", pszTo); - if (pszParticipant) - receipt << CHAR_PARAM("participant", pszParticipant); - } - - if (pszType) - receipt << CHAR_PARAM("type", pszType); - WSSendNode(receipt); -} - -void WhatsAppProto::SetServerStatus(int iStatus) -{ - if (mir_wstrlen(m_wszNick)) - WSSendNode( - WANode("presence") << CHAR_PARAM("name", T2Utf(m_wszNick)) << CHAR_PARAM("type", (iStatus == ID_STATUS_ONLINE) ? "available" : "unavailable"), - &WhatsAppProto::OnIqDoNothing); -} - -void WhatsAppProto::SendUnregister() -{ - WANodeIq iq(IQ::SET, "md"); - *iq.addChild("remove-companion-device") << CHAR_PARAM("jid", WAJid(m_szJid, getDword(DBKEY_DEVICE_ID)).toString()) << CHAR_PARAM("reason", "user's decision"); - WSSendNode(iq, &WhatsAppProto::OnIqDoNothing); - - m_bTerminated = true; -} - -void WhatsAppProto::SendUsync(const LIST &jids, void *pUserInfo) -{ - WANodeIq iq(IQ::GET, "usync"); - - auto *pNode1 = iq.addChild("usync"); - *pNode1 << CHAR_PARAM("sid", GenerateMessageId()) << CHAR_PARAM("mode", "query") << CHAR_PARAM("last", "true") - << CHAR_PARAM("index", "0") << CHAR_PARAM("context", "message"); - - pNode1->addChild("query")->addChild("devices")->addAttr("version", "2"); - auto *pList = pNode1->addChild("list"); - for (auto &it : jids) - pList->addChild("user")->addAttr("jid", it); - - WSSendNode(iq, &WhatsAppProto::OnIqGetUsync, pUserInfo); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -void WhatsAppProto::ShutdownSession() -{ - if (m_bTerminated) - return; - - debugLogA("WhatsAppProto::ShutdownSession"); - - // shutdown all resources - if (m_hServerConn) - Netlib_Shutdown(m_hServerConn); - - OnLoggedOut(); -} +/* + +WhatsApp plugin for Miranda NG +Copyright © 2019-23 George Hazan + +*/ + +#include "stdafx.h" + +///////////////////////////////////////////////////////////////////////////////////////// +// gateway worker thread + +void WhatsAppProto::ServerThread(void *) +{ + do { + m_bRespawn = m_bUnregister = false; + ServerThreadWorker(); + } + while (m_bRespawn); + + OnLoggedOut(); +} + +void WhatsAppProto::ServerThreadWorker() +{ + // connect websocket + NETLIBHTTPHEADER hdrs[] = + { + { "Origin", "https://web.whatsapp.com" }, + { 0, 0 } + }; + + NLHR_PTR pReply(WebSocket_Connect(m_hNetlibUser, "web.whatsapp.com/ws/chat", hdrs)); + if (pReply == nullptr) { + debugLogA("Server connection failed, exiting"); + return; + } + + if (pReply->resultCode != 101) + return; + + delete m_noise; + m_noise = new WANoise(this); + m_noise->init(); + + debugLogA("Server connection succeeded"); + m_hServerConn = pReply->nlc; + m_lastRecvTime = time(0); + m_iPacketId = 1; + + Utils_GetRandom(m_wMsgPrefix, sizeof(m_wMsgPrefix)); + + Wa__HandshakeMessage__ClientHello client; + client.ephemeral = {m_noise->ephemeral.pub.length(), m_noise->ephemeral.pub.data()}; + client.has_ephemeral = true; + + Wa__HandshakeMessage msg; + msg.clienthello = &client; + WSSend(msg); + + MBinBuffer netbuf; + + for (m_bTerminated = false; !m_bTerminated;) { + unsigned char buf[2048]; + int bufSize = Netlib_Recv(m_hServerConn, (char *)buf, _countof(buf), MSG_NODUMP); + if (bufSize == 0) { + debugLogA("Gateway connection gracefully closed"); + break; + } + if (bufSize < 0) { + debugLogA("Gateway connection error, exiting"); + break; + } + + netbuf.append(buf, bufSize); + + WSHeader hdr; + if (!WebSocket_InitHeader(hdr, netbuf.data(), netbuf.length())) + continue; + + // we lack some data, let's read them + if (netbuf.length() < hdr.headerSize + hdr.payloadSize) + if (!WSReadPacket(hdr, netbuf)) + break; + + // debugLogA("Got packet: buffer = %d, opcode = %d, headerSize = %d, payloadSize = %d, final = %d, masked = %d", + // netbuf.length(), hdr.opCode, hdr.headerSize, hdr.payloadSize, hdr.bIsFinal, hdr.bIsMasked); + // Netlib_Dump(m_hServerConn, netbuf.data(), netbuf.length(), false, 0); + + m_lastRecvTime = time(0); + + // read all payloads from the current buffer, one by one + while (true) { + MBinBuffer currPacket; + currPacket.assign(netbuf.data() + hdr.headerSize, hdr.payloadSize); + + switch (hdr.opCode) { + case 1: // json packet + debugLogA("Text packet, skipping"); + /* + currPacket.append("", 1); // add 0 to use strchr safely + CMStringA szJson(pos, (int)dataSize); + + JSONNode root = JSONNode::parse(szJson); + if (root) { + debugLogA("JSON received:\n%s", start); + + CMStringA szPrefix(start, int(pos - start - 1)); + auto *pReq = m_arPacketQueue.find((WARequest *)&szPrefix); + if (pReq != nullptr) { + root << CHAR_PARAM("$id$", szPrefix); + } + } + } + */ + break; + + case 2: // binary packet + if (hdr.payloadSize > 32) + ProcessBinaryPacket(currPacket.data(), hdr.payloadSize); + break; + + case 8: // close + debugLogA("server required to exit"); + m_bRespawn = m_bTerminated = true; // simply reconnect, don't exit + break; + + default: + Netlib_Dump(m_hServerConn, currPacket.data(), hdr.payloadSize, false, 0); + } + + netbuf.remove(hdr.headerSize + hdr.payloadSize); + // debugLogA("%d bytes removed from network buffer, %d bytes remain", hdr.headerSize + hdr.payloadSize, netbuf.length()); + if (netbuf.length() == 0) + break; + + // if we have not enough data for header, continue reading + if (!WebSocket_InitHeader(hdr, netbuf.data(), netbuf.length())) { + debugLogA("not enough data for header, continue reading"); + break; + } + + // if we have not enough data for data, continue reading + if (hdr.headerSize + hdr.payloadSize > netbuf.length()) { + debugLogA("not enough place for data (%d+%d > %d), continue reading", hdr.headerSize, hdr.payloadSize, netbuf.length()); + break; + } + + debugLogA("Got inner packet: buffer = %d, opcode = %d, headerSize = %d, payloadSize = %d, final = %d, masked = %d", + netbuf.length(), hdr.opCode, hdr.headerSize, hdr.payloadSize, hdr.bIsFinal, hdr.bIsMasked); + } + } + + debugLogA("Server connection dropped"); + Netlib_CloseHandle(m_hServerConn); + m_hServerConn = nullptr; +} + +bool WhatsAppProto::WSReadPacket(const WSHeader &hdr, MBinBuffer &res) +{ + size_t currPacketSize = res.length() - hdr.headerSize; + + char buf[1024]; + while (currPacketSize < hdr.payloadSize) { + int result = Netlib_Recv(m_hServerConn, buf, _countof(buf), MSG_NODUMP); + if (result == 0) { + debugLogA("Gateway connection gracefully closed"); + return false; + } + if (result < 0) { + debugLogA("Gateway connection error, exiting"); + return false; + } + + currPacketSize += result; + res.append(buf, result); + } + return true; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Binary data processing + +void WhatsAppProto::ProcessBinaryPacket(const uint8_t *pData, size_t cbDataLen) +{ + while (size_t payloadLen = m_noise->decodeFrame(pData, cbDataLen)) { + if (m_noise->bInitFinished) { + MBinBuffer buf = m_noise->decrypt(pData, payloadLen); + + WAReader rdr(buf.data(), buf.length()); + auto b = rdr.readInt8(); + if (b & 2) { + buf.remove(1); + buf = unzip(buf); + rdr = WAReader(buf.data(), buf.length()); + } + + if (WANode *pNode = rdr.readNode()) { + CMStringA szText; + pNode->print(szText); + debugLogA("Got binary node:\n%s", szText.c_str()); + + auto pHandler = FindPersistentHandler(*pNode); + if (pHandler) + (this->*pHandler)(*pNode); + else + debugLogA("cannot handle incoming message"); + + delete pNode; + } + else { + debugLogA("wrong or broken payload"); + Netlib_Dump(m_hServerConn, pData, cbDataLen, false, 0); + } + } + else OnProcessHandshake(pData, (int)payloadLen); + + pData = (BYTE*)pData + payloadLen; + cbDataLen -= payloadLen; + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void WhatsAppProto::ProcessFailure(int code) +{ + switch (code) { + case 401: + debugLogA("Connection logged out from another device, exiting"); + Popup(0, TranslateT("This account was logged out from mobile phone, you need to link it again"), m_tszUserName); + + OnErase(); + break; + + case 408: + debugLogA("Connection lost, exiting"); + break; + + case 411: + debugLogA("Conflict between two devices, exiting"); + break; + + case 428: + debugLogA("Connection forcibly closed by the server, exiting"); + break; + + case 440: + debugLogA("Connection replaced from another device, exiting"); + break; + + case 515: + debugLogA("Server required to restart immediately, leaving thread"); + m_bRespawn = true; + break; + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void WhatsAppProto::OnLoggedIn() +{ + debugLogA("WhatsAppProto::OnLoggedIn"); + + if (m_bUnregister) { + SendUnregister(); + m_bTerminated = true; + return; + } + + SetServerStatus(m_iDesiredStatus); + + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, m_iDesiredStatus); + m_iStatus = m_iDesiredStatus; + m_bUpdatedPrekeys = false; + + m_impl.m_keepAlive.Start(1000); + + // retrieve initial info + WANodeIq abt(IQ::GET, "abt"); + abt.addChild("props")->addAttr("protocol", "1"); + WSSendNode(abt, &WhatsAppProto::OnIqDoNothing); + + WSSendNode( + WANodeIq(IQ::GET, "w") << XCHILD("props"), + &WhatsAppProto::OnIqDoNothing); + + WSSendNode( + WANodeIq(IQ::GET, "blocklist"), + &WhatsAppProto::OnIqBlockList); + + WSSendNode( + WANodeIq(IQ::GET, "privacy") << XCHILD("privacy"), + &WhatsAppProto::OnIqDoNothing); + + GC_RefreshMetadata(); +} + +void WhatsAppProto::OnLoggedOut(void) +{ + m_impl.m_keepAlive.Stop(); + + debugLogA("WhatsAppProto::OnLoggedOut"); + m_bTerminated = true; + + ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_OFFLINE); + m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; + + setAllContactStatuses(ID_STATUS_OFFLINE, false); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Service packets sending + +void WhatsAppProto::SendAck(const WANode &node) +{ + WANode ack("ack"); + ack << CHAR_PARAM("to", node.getAttr("from")) << CHAR_PARAM("id", node.getAttr("id")) << CHAR_PARAM("class", node.title); + if (node.title != "message") + if (auto *param = node.getAttr("type")) + ack << CHAR_PARAM("type", param); + if (auto *param = node.getAttr("participant")) + ack << CHAR_PARAM("participant", param); + if (auto *param = node.getAttr("recipient")) + ack << CHAR_PARAM("recipient", param); + WSSendNode(ack); +} + +void WhatsAppProto::SendKeepAlive() +{ + time_t now = time(0); + if (now - m_lastRecvTime > 20) { + WSSendNode(WANodeIq(IQ::GET, "w:p") << XCHILD("ping"), &WhatsAppProto::OnIqDoNothing); + + m_lastRecvTime = now; + } + + for (auto &it : m_arUsers) { + if (it->m_timer1 && now - it->m_timer1 > 600) { + it->m_timer1 = 0; + it->m_timer2 = now; + setWord(it->hContact, "Status", ID_STATUS_AWAY); + } + else if (it->m_timer2 && now - it->m_timer2 > 600) { + it->m_timer2 = 0; + setWord(it->hContact, "Status", ID_STATUS_OFFLINE); + } + } +} + +void WhatsAppProto::SendReceipt(const char *pszTo, const char *pszParticipant, const char *pszId, const char *pszType) +{ + WANode receipt("receipt"); + receipt << CHAR_PARAM("id", pszId); + + if (!mir_strcmp(pszType, "read") || !mir_strcmp(pszType, "read-self")) + receipt << INT_PARAM("t", time(0)); + + if (!mir_strcmp(pszType, "sender") && WAJid(pszTo).isUser()) + receipt << CHAR_PARAM("to", pszParticipant) << CHAR_PARAM("recipient", pszTo); + else { + receipt << CHAR_PARAM("to", pszTo); + if (pszParticipant) + receipt << CHAR_PARAM("participant", pszParticipant); + } + + if (pszType) + receipt << CHAR_PARAM("type", pszType); + WSSendNode(receipt); +} + +void WhatsAppProto::SetServerStatus(int iStatus) +{ + if (mir_wstrlen(m_wszNick)) + WSSendNode( + WANode("presence") << CHAR_PARAM("name", T2Utf(m_wszNick)) << CHAR_PARAM("type", (iStatus == ID_STATUS_ONLINE) ? "available" : "unavailable"), + &WhatsAppProto::OnIqDoNothing); +} + +void WhatsAppProto::SendUnregister() +{ + WANodeIq iq(IQ::SET, "md"); + *iq.addChild("remove-companion-device") << CHAR_PARAM("jid", WAJid(m_szJid, getDword(DBKEY_DEVICE_ID)).toString()) << CHAR_PARAM("reason", "user's decision"); + WSSendNode(iq, &WhatsAppProto::OnIqDoNothing); + + m_bTerminated = true; +} + +void WhatsAppProto::SendUsync(const LIST &jids, void *pUserInfo) +{ + WANodeIq iq(IQ::GET, "usync"); + + auto *pNode1 = iq.addChild("usync"); + *pNode1 << CHAR_PARAM("sid", GenerateMessageId()) << CHAR_PARAM("mode", "query") << CHAR_PARAM("last", "true") + << CHAR_PARAM("index", "0") << CHAR_PARAM("context", "message"); + + pNode1->addChild("query")->addChild("devices")->addAttr("version", "2"); + auto *pList = pNode1->addChild("list"); + for (auto &it : jids) + pList->addChild("user")->addAttr("jid", it); + + WSSendNode(iq, &WhatsAppProto::OnIqGetUsync, pUserInfo); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +void WhatsAppProto::ShutdownSession() +{ + if (m_bTerminated) + return; + + debugLogA("WhatsAppProto::ShutdownSession"); + + // shutdown all resources + if (m_hServerConn) + Netlib_Shutdown(m_hServerConn); + + OnLoggedOut(); +} diff --git a/protocols/YAMN/YAMN.vcxproj b/protocols/YAMN/YAMN.vcxproj index 213c4df7c1..203ab9c98b 100644 --- a/protocols/YAMN/YAMN.vcxproj +++ b/protocols/YAMN/YAMN.vcxproj @@ -1,97 +1,97 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - YAMN - {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72} - - - - - - - - ..\stdafx.h - - - ..\stdafx.h - - - - - ..\stdafx.h - - - ..\stdafx.h - - - ..\stdafx.h - - - - - ..\stdafx.h - - - ..\..\stdafx.h - - - ..\..\stdafx.h - - - ..\..\stdafx.h - - - - Create - - - - - - - - - - - - - - - - - Sync - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + YAMN + {C5A87409-F08C-4A07-A8F9-1F5D52BA6D72} + + + + + + + + ..\stdafx.h + + + ..\stdafx.h + + + + + ..\stdafx.h + + + ..\stdafx.h + + + ..\stdafx.h + + + + + ..\stdafx.h + + + ..\..\stdafx.h + + + ..\..\stdafx.h + + + ..\..\stdafx.h + + + + Create + + + + + + + + + + + + + + + + + Sync + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/protocols/YAMN/YAMN.vcxproj.filters b/protocols/YAMN/YAMN.vcxproj.filters index eed1e0e317..0f2b3632b4 100644 --- a/protocols/YAMN/YAMN.vcxproj.filters +++ b/protocols/YAMN/YAMN.vcxproj.filters @@ -1,120 +1,120 @@ - - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - + + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + Resource Files + + + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + \ No newline at end of file diff --git a/protocols/YAMN/res/YAMN.rc b/protocols/YAMN/res/YAMN.rc index 1268b0dc8a..de075e62a2 100644 --- a/protocols/YAMN/res/YAMN.rc +++ b/protocols/YAMN/res/YAMN.rc @@ -1,305 +1,305 @@ -// Microsoft Visual C++ generated resource script. -// -#include "..\src\resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Neutral resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1252) - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "..\\src\\resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_DLGVIEWMESSAGES, DIALOG - BEGIN - LEFTMARGIN, 5 - RIGHTMARGIN, 455 - TOPMARGIN, 5 - BOTTOMMARGIN, 105 - END - - IDD_DLGBADCONNECT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 43 - END - - IDD_POP3ACCOUNTOPT, DIALOG - BEGIN - VERTGUIDE, 155 - VERTGUIDE, 236 - END - - IDD_CHOOSESTATUSMODES, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 219 - TOPMARGIN, 7 - BOTTOMMARGIN, 147 - END - - IDD_YAMNOPT, DIALOG - BEGIN - RIGHTMARGIN, 310 - VERTGUIDE, 8 - END - - IDD_POP3ACCOUNTPOPUP, DIALOG - BEGIN - VERTGUIDE, 155 - VERTGUIDE, 236 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DLGVIEWMESSAGES DIALOG 50, 200, 460, 110 -STYLE DS_SETFONT | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -FONT 8, "MS Shell Dlg" -BEGIN - CONTROL "List4",IDC_LISTMAILS,"SysListView32",LVS_REPORT | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,5,5,450,70 - DEFPUSHBUTTON "",IDC_BTNOK,395,90,60,15 - PUSHBUTTON "",IDC_BTNAPP,263,90,114,15 - PUSHBUTTON "",IDC_BTNDEL,5,90,114,15 - LTEXT "",IDC_STSTATUS,5,75,450,10 - PUSHBUTTON "",IDC_BTNCHECKALL,150,91,92,14 -END - -IDD_DLGSHOWMESSAGE DIALOGEX 50, 200, 460, 132 -STYLE DS_SETFONT | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - CONTROL "List5",IDC_LISTHEADERS,"SysListView32",LVS_REPORT | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,5,5,450,70 - CONTROL "",IDC_SPLITTER,"Static",SS_ENHMETAFILE | WS_TABSTOP,0,80,187,2,WS_EX_STATICEDGE - EDITTEXT IDC_EDITBODY,3,84,454,45,ES_MULTILINE | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL -END - -IDD_DLGBADCONNECT DIALOG 0, 0, 186, 76 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "OK",IDC_BTNOK,69,55,50,14 - LTEXT "",IDC_STATICMSG,7,7,172,37 -END - -IDD_POP3ACCOUNTOPT DIALOGEX 0, 0, 310, 230 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - COMBOBOX IDC_COMBOACCOUNT,4,6,106,65,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "+",IDC_BTNADD,118,6,15,13 - PUSHBUTTON "-",IDC_BTNDEL,140,6,15,13 - GROUPBOX "Account",IDC_STATIC,4,22,151,120 - LTEXT "Name:",IDC_STATIC,10,34,44,10 - EDITTEXT IDC_EDITNAME,56,32,92,12,ES_AUTOHSCROLL - LTEXT "Server:",IDC_STATIC,10,50,44,8 - EDITTEXT IDC_EDITSERVER,56,48,92,12,ES_AUTOHSCROLL | WS_GROUP - LTEXT "Port:",IDC_STATIC,10,65,44,8,SS_CENTERIMAGE - EDITTEXT IDC_EDITPORT,57,64,27,12,ES_AUTOHSCROLL | ES_NUMBER | WS_GROUP - CONTROL "SSL",IDC_CHECKSSL,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,87,66,27,10 - CONTROL "APOP",IDC_CHECKAPOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,119,66,34,10 - LTEXT "User Name:",IDC_STATIC,10,82,44,8 - EDITTEXT IDC_EDITLOGIN,57,80,92,12,ES_AUTOHSCROLL | WS_GROUP - LTEXT "Password:",IDC_STATIC,10,96,44,8 - EDITTEXT IDC_EDITPASS,57,94,92,12,ES_PASSWORD | ES_AUTOHSCROLL | WS_GROUP - LTEXT "Codepage:",IDC_STATIC,10,111,44,8 - COMBOBOX IDC_COMBOCP,57,108,92,130,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Default",IDC_BTNDEFAULT,9,124,54,13 - CONTROL "Disable STLS",IDC_CHECKNOTLS,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,83,125,69,10 - LTEXT "Status:",IDC_STATIC,164,2,80,8 - LTEXT "",IDC_STSTATUS,164,13,143,8,SS_CENTERIMAGE - GROUPBOX "Options",IDC_STATIC,161,22,147,120 - CONTROL "Check this account",IDC_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,32,118,10,WS_EX_TRANSPARENT - CONTROL "Startup check",IDC_CHECKSTART,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,167,43,78,10 - LTEXT "Check interval [min]:",IDC_STATIC,168,56,94,8 - EDITTEXT IDC_EDITINTERVAL,259,53,20,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_TRANSPARENT - PUSHBUTTON "Only check when...",IDC_BTNSTATUS,195,69,81,13 - CONTROL "Auto retrieve body",IDC_AUTOBODY,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,166,86,137,10 - CONTROL "Check from menu",IDC_CHECKFORCE,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,166,97,137,8 - CONTROL "Use contact notification for this account",IDC_CHECKCONTACT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,107,138,10,WS_EX_TRANSPARENT - CONTROL "Replace nickname",IDC_CHECKCONTACTNICK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,117,117,10,WS_EX_TRANSPARENT - CONTROL "Disable Events",IDC_CHECKCONTACTNOEVENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,128,115,10,WS_EX_TRANSPARENT - GROUPBOX "Notifications",IDC_GBNEWMAIL,4,143,304,87 - GROUPBOX "New Mail",IDC_STATIC,7,153,149,73 - CONTROL "Sound",IDC_CHECKSND,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,12,162,60,10 - CONTROL "Message",IDC_CHECKMSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,174,135,10 - CONTROL "Keyboard Flash",IDC_CHECKKBN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,186,132,9 - CONTROL "Tray Icon",IDC_CHECKICO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,85,163,65,10 - CONTROL "Execute Application",IDC_CHECKAPP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,198,135,8 - PUSHBUTTON "...",IDC_BTNAPP,19,209,16,12 - EDITTEXT IDC_EDITAPP,41,209,65,12,ES_AUTOHSCROLL - EDITTEXT IDC_EDITAPPPARAM,111,209,40,12,ES_AUTOHSCROLL - GROUPBOX "Errors",IDC_STATIC,161,153,143,44 - CONTROL "Sound notification if failed",IDC_CHECKFSND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,163,135,10 - CONTROL "Message notification if failed",IDC_CHECKFMSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,174,135,10 - CONTROL "Tray icon notification if failed",IDC_CHECKFICO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,186,135,10 - PUSHBUTTON "Reset counter",IDC_BTNRESET,161,200,75,13 - LTEXT "",IDC_STTIMELEFT,163,216,141,8 -END - -IDD_CHOOSESTATUSMODES DIALOG 0, 0, 226, 154 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Check while..." -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "OK",IDOK,112,133,50,14 - PUSHBUTTON "Cancel",IDCANCEL,169,133,50,14 - GROUPBOX "Choose modes",IDC_STATUSGROUP,7,7,212,119 - CONTROL "Offline",IDC_CHECKST0,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,19,70,9 - CONTROL "Online",IDC_CHECKST1,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,39,70,9 - CONTROL "Away",IDC_CHECKST2,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,62,70,9 - CONTROL "Not available",IDC_CHECKST3,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,83,70,9 - CONTROL "Occupied",IDC_CHECKST4,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,104,70,9 - CONTROL "Do not disturb",IDC_CHECKST5,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,19,70,9 - CONTROL "Free for chat",IDC_CHECKST6,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,39,70,9 - CONTROL "Invisible",IDC_CHECKST7,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,62,70,9 -END - -IDD_YAMNOPT DIALOGEX 0, 0, 312, 121 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "YAMN General Options",IDC_STATIC,3,2,303,45 - CONTROL "TopToolBar button ""Check mail""",IDC_CHECKTTB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,15,294,11 - GROUPBOX "MailBrowser Options",IDC_STATIC,3,48,151,68 - CONTROL "Enable Close on Delete Button",IDC_CLOSEONDELETE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,60,143,11 - CONTROL "Show long localized date",IDC_LONGDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,65,129,8 - CONTROL "Don't show today's date",IDC_SMARTDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,80,129,8 - GROUPBOX "Date/Time Representation",IDC_STATIC,159,48,148,68 - CONTROL "Don't show seconds",IDC_NOSECONDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,94,129,8 -END - -IDD_POP3ACCOUNTPOPUP DIALOGEX 0, 0, 315, 230 -STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - COMBOBOX IDC_COMBOACCOUNT,4,4,140,65,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Mail Notifications",IDC_GBNEWMAIL,5,23,300,76 - CONTROL "Popup",IDC_CHECKPOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,32,108,10 - CONTROL "Single popup",IDC_RADIOPOP1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,23,43,95,10 - CONTROL "Multi popup",IDC_RADIOPOPN,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,23,55,95,10 - CONTROL "Use custom color",IDC_CHECKCOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,83,107,10 - CONTROL "",IDC_CPB,"ColourPicker",WS_TABSTOP,145,66,29,12 - CONTROL "",IDC_CPT,"ColourPicker",WS_TABSTOP,145,83,29,12 - EDITTEXT IDC_EDITPOPS,23,65,20,12,ES_AUTOHSCROLL - GROUPBOX "No new mail notifications",IDC_GBNONEWMAIL,5,152,300,62 - CONTROL "Popup if no mail",IDC_CHECKNPOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,161,94,10 - CONTROL "Persistent message",IDC_CHECKNMSGP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,188,110,10 - CONTROL "Use custom color",IDC_CHECKNCOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,201,107,10 - CONTROL "",IDC_CPNB,"ColourPicker",WS_TABSTOP,145,181,29,12 - CONTROL "",IDC_CPNT,"ColourPicker",WS_TABSTOP,145,198,29,12 - EDITTEXT IDC_EDITNPOPS,23,173,20,12,ES_AUTOHSCROLL - GROUPBOX "Connection failure notifications",IDC_GBBADCONNECT,5,101,300,49 - CONTROL "Popup notification if failed",IDC_CHECKFPOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,110,118,10 - CONTROL "Use custom color",IDC_CHECKFCOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,136,95,10 - CONTROL "",IDC_CPFB,"ColourPicker",WS_TABSTOP,145,118,29,12 - CONTROL "",IDC_CPFT,"ColourPicker",WS_TABSTOP,145,134,29,12 - EDITTEXT IDC_EDITFPOPS,23,121,20,12,ES_AUTOHSCROLL - LTEXT "..s Popup duration",IDC_STATIC,45,67,70,8 - LTEXT "..s Popup duration",IDC_STATIC,45,176,70,8 - LTEXT "..s Popup duration",IDC_STATIC,45,122,70,8 - PUSHBUTTON "Preview",IDC_PREVIEW,255,215,49,13 - LTEXT "Background color",IDC_STATIC,177,184,108,10 - LTEXT "Text color",IDC_STATIC,177,200,107,10 - LTEXT "Background color",IDC_STATIC,177,120,108,10 - LTEXT "Text color",IDC_STATIC,177,136,107,10 - LTEXT "Background color",IDC_STATIC,177,69,108,10 - LTEXT "Text color",IDC_STATIC,177,85,107,10 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_CHECKMAIL ICON "checkmail.ico" - -IDI_LAUNCHAPP ICON "launchapp.ico" - -IDI_BADCONNECT ICON "badconnect.ico" - -IDI_NEWMAIL ICON "newmail.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// AFX_DIALOG_LAYOUT -// - -IDD_YAMNOPT AFX_DIALOG_LAYOUT -BEGIN - 0 -END - -#endif // Neutral resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_DLGVIEWMESSAGES, DIALOG + BEGIN + LEFTMARGIN, 5 + RIGHTMARGIN, 455 + TOPMARGIN, 5 + BOTTOMMARGIN, 105 + END + + IDD_DLGBADCONNECT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 43 + END + + IDD_POP3ACCOUNTOPT, DIALOG + BEGIN + VERTGUIDE, 155 + VERTGUIDE, 236 + END + + IDD_CHOOSESTATUSMODES, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 219 + TOPMARGIN, 7 + BOTTOMMARGIN, 147 + END + + IDD_YAMNOPT, DIALOG + BEGIN + RIGHTMARGIN, 310 + VERTGUIDE, 8 + END + + IDD_POP3ACCOUNTPOPUP, DIALOG + BEGIN + VERTGUIDE, 155 + VERTGUIDE, 236 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_DLGVIEWMESSAGES DIALOG 50, 200, 460, 110 +STYLE DS_SETFONT | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "List4",IDC_LISTMAILS,"SysListView32",LVS_REPORT | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,5,5,450,70 + DEFPUSHBUTTON "",IDC_BTNOK,395,90,60,15 + PUSHBUTTON "",IDC_BTNAPP,263,90,114,15 + PUSHBUTTON "",IDC_BTNDEL,5,90,114,15 + LTEXT "",IDC_STSTATUS,5,75,450,10 + PUSHBUTTON "",IDC_BTNCHECKALL,150,91,92,14 +END + +IDD_DLGSHOWMESSAGE DIALOGEX 50, 200, 460, 132 +STYLE DS_SETFONT | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + CONTROL "List5",IDC_LISTHEADERS,"SysListView32",LVS_REPORT | LVS_EDITLABELS | WS_BORDER | WS_TABSTOP,5,5,450,70 + CONTROL "",IDC_SPLITTER,"Static",SS_ENHMETAFILE | WS_TABSTOP,0,80,187,2,WS_EX_STATICEDGE + EDITTEXT IDC_EDITBODY,3,84,454,45,ES_MULTILINE | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL +END + +IDD_DLGBADCONNECT DIALOG 0, 0, 186, 76 +STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK",IDC_BTNOK,69,55,50,14 + LTEXT "",IDC_STATICMSG,7,7,172,37 +END + +IDD_POP3ACCOUNTOPT DIALOGEX 0, 0, 310, 230 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_COMBOACCOUNT,4,6,106,65,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "+",IDC_BTNADD,118,6,15,13 + PUSHBUTTON "-",IDC_BTNDEL,140,6,15,13 + GROUPBOX "Account",IDC_STATIC,4,22,151,120 + LTEXT "Name:",IDC_STATIC,10,34,44,10 + EDITTEXT IDC_EDITNAME,56,32,92,12,ES_AUTOHSCROLL + LTEXT "Server:",IDC_STATIC,10,50,44,8 + EDITTEXT IDC_EDITSERVER,56,48,92,12,ES_AUTOHSCROLL | WS_GROUP + LTEXT "Port:",IDC_STATIC,10,65,44,8,SS_CENTERIMAGE + EDITTEXT IDC_EDITPORT,57,64,27,12,ES_AUTOHSCROLL | ES_NUMBER | WS_GROUP + CONTROL "SSL",IDC_CHECKSSL,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,87,66,27,10 + CONTROL "APOP",IDC_CHECKAPOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,119,66,34,10 + LTEXT "User Name:",IDC_STATIC,10,82,44,8 + EDITTEXT IDC_EDITLOGIN,57,80,92,12,ES_AUTOHSCROLL | WS_GROUP + LTEXT "Password:",IDC_STATIC,10,96,44,8 + EDITTEXT IDC_EDITPASS,57,94,92,12,ES_PASSWORD | ES_AUTOHSCROLL | WS_GROUP + LTEXT "Codepage:",IDC_STATIC,10,111,44,8 + COMBOBOX IDC_COMBOCP,57,108,92,130,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Default",IDC_BTNDEFAULT,9,124,54,13 + CONTROL "Disable STLS",IDC_CHECKNOTLS,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,83,125,69,10 + LTEXT "Status:",IDC_STATIC,164,2,80,8 + LTEXT "",IDC_STSTATUS,164,13,143,8,SS_CENTERIMAGE + GROUPBOX "Options",IDC_STATIC,161,22,147,120 + CONTROL "Check this account",IDC_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,167,32,118,10,WS_EX_TRANSPARENT + CONTROL "Startup check",IDC_CHECKSTART,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,167,43,78,10 + LTEXT "Check interval [min]:",IDC_STATIC,168,56,94,8 + EDITTEXT IDC_EDITINTERVAL,259,53,20,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_TRANSPARENT + PUSHBUTTON "Only check when...",IDC_BTNSTATUS,195,69,81,13 + CONTROL "Auto retrieve body",IDC_AUTOBODY,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,166,86,137,10 + CONTROL "Check from menu",IDC_CHECKFORCE,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,166,97,137,8 + CONTROL "Use contact notification for this account",IDC_CHECKCONTACT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,107,138,10,WS_EX_TRANSPARENT + CONTROL "Replace nickname",IDC_CHECKCONTACTNICK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,117,117,10,WS_EX_TRANSPARENT + CONTROL "Disable Events",IDC_CHECKCONTACTNOEVENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,128,115,10,WS_EX_TRANSPARENT + GROUPBOX "Notifications",IDC_GBNEWMAIL,4,143,304,87 + GROUPBOX "New Mail",IDC_STATIC,7,153,149,73 + CONTROL "Sound",IDC_CHECKSND,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,12,162,60,10 + CONTROL "Message",IDC_CHECKMSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,174,135,10 + CONTROL "Keyboard Flash",IDC_CHECKKBN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,186,132,9 + CONTROL "Tray Icon",IDC_CHECKICO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,85,163,65,10 + CONTROL "Execute Application",IDC_CHECKAPP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,198,135,8 + PUSHBUTTON "...",IDC_BTNAPP,19,209,16,12 + EDITTEXT IDC_EDITAPP,41,209,65,12,ES_AUTOHSCROLL + EDITTEXT IDC_EDITAPPPARAM,111,209,40,12,ES_AUTOHSCROLL + GROUPBOX "Errors",IDC_STATIC,161,153,143,44 + CONTROL "Sound notification if failed",IDC_CHECKFSND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,163,135,10 + CONTROL "Message notification if failed",IDC_CHECKFMSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,174,135,10 + CONTROL "Tray icon notification if failed",IDC_CHECKFICO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,166,186,135,10 + PUSHBUTTON "Reset counter",IDC_BTNRESET,161,200,75,13 + LTEXT "",IDC_STTIMELEFT,163,216,141,8 +END + +IDD_CHOOSESTATUSMODES DIALOG 0, 0, 226, 154 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Check while..." +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK",IDOK,112,133,50,14 + PUSHBUTTON "Cancel",IDCANCEL,169,133,50,14 + GROUPBOX "Choose modes",IDC_STATUSGROUP,7,7,212,119 + CONTROL "Offline",IDC_CHECKST0,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,19,70,9 + CONTROL "Online",IDC_CHECKST1,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,39,70,9 + CONTROL "Away",IDC_CHECKST2,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,62,70,9 + CONTROL "Not available",IDC_CHECKST3,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,83,70,9 + CONTROL "Occupied",IDC_CHECKST4,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,15,104,70,9 + CONTROL "Do not disturb",IDC_CHECKST5,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,19,70,9 + CONTROL "Free for chat",IDC_CHECKST6,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,39,70,9 + CONTROL "Invisible",IDC_CHECKST7,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,134,62,70,9 +END + +IDD_YAMNOPT DIALOGEX 0, 0, 312, 121 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "YAMN General Options",IDC_STATIC,3,2,303,45 + CONTROL "TopToolBar button ""Check mail""",IDC_CHECKTTB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,15,294,11 + GROUPBOX "MailBrowser Options",IDC_STATIC,3,48,151,68 + CONTROL "Enable Close on Delete Button",IDC_CLOSEONDELETE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,60,143,11 + CONTROL "Show long localized date",IDC_LONGDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,65,129,8 + CONTROL "Don't show today's date",IDC_SMARTDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,80,129,8 + GROUPBOX "Date/Time Representation",IDC_STATIC,159,48,148,68 + CONTROL "Don't show seconds",IDC_NOSECONDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,94,129,8 +END + +IDD_POP3ACCOUNTPOPUP DIALOGEX 0, 0, 315, 230 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_COMBOACCOUNT,4,4,140,65,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Mail Notifications",IDC_GBNEWMAIL,5,23,300,76 + CONTROL "Popup",IDC_CHECKPOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,32,108,10 + CONTROL "Single popup",IDC_RADIOPOP1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,23,43,95,10 + CONTROL "Multi popup",IDC_RADIOPOPN,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,23,55,95,10 + CONTROL "Use custom color",IDC_CHECKCOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,83,107,10 + CONTROL "",IDC_CPB,"ColourPicker",WS_TABSTOP,145,66,29,12 + CONTROL "",IDC_CPT,"ColourPicker",WS_TABSTOP,145,83,29,12 + EDITTEXT IDC_EDITPOPS,23,65,20,12,ES_AUTOHSCROLL + GROUPBOX "No new mail notifications",IDC_GBNONEWMAIL,5,152,300,62 + CONTROL "Popup if no mail",IDC_CHECKNPOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,161,94,10 + CONTROL "Persistent message",IDC_CHECKNMSGP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,188,110,10 + CONTROL "Use custom color",IDC_CHECKNCOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,201,107,10 + CONTROL "",IDC_CPNB,"ColourPicker",WS_TABSTOP,145,181,29,12 + CONTROL "",IDC_CPNT,"ColourPicker",WS_TABSTOP,145,198,29,12 + EDITTEXT IDC_EDITNPOPS,23,173,20,12,ES_AUTOHSCROLL + GROUPBOX "Connection failure notifications",IDC_GBBADCONNECT,5,101,300,49 + CONTROL "Popup notification if failed",IDC_CHECKFPOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,110,118,10 + CONTROL "Use custom color",IDC_CHECKFCOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,136,95,10 + CONTROL "",IDC_CPFB,"ColourPicker",WS_TABSTOP,145,118,29,12 + CONTROL "",IDC_CPFT,"ColourPicker",WS_TABSTOP,145,134,29,12 + EDITTEXT IDC_EDITFPOPS,23,121,20,12,ES_AUTOHSCROLL + LTEXT "..s Popup duration",IDC_STATIC,45,67,70,8 + LTEXT "..s Popup duration",IDC_STATIC,45,176,70,8 + LTEXT "..s Popup duration",IDC_STATIC,45,122,70,8 + PUSHBUTTON "Preview",IDC_PREVIEW,255,215,49,13 + LTEXT "Background color",IDC_STATIC,177,184,108,10 + LTEXT "Text color",IDC_STATIC,177,200,107,10 + LTEXT "Background color",IDC_STATIC,177,120,108,10 + LTEXT "Text color",IDC_STATIC,177,136,107,10 + LTEXT "Background color",IDC_STATIC,177,69,108,10 + LTEXT "Text color",IDC_STATIC,177,85,107,10 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_CHECKMAIL ICON "checkmail.ico" + +IDI_LAUNCHAPP ICON "launchapp.ico" + +IDI_BADCONNECT ICON "badconnect.ico" + +IDI_NEWMAIL ICON "newmail.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_YAMNOPT AFX_DIALOG_LAYOUT +BEGIN + 0 +END + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/protocols/YAMN/src/account.cpp b/protocols/YAMN/src/account.cpp index 91b57ad544..46b7782ab0 100644 --- a/protocols/YAMN/src/account.cpp +++ b/protocols/YAMN/src/account.cpp @@ -1,1051 +1,1051 @@ -/* - * This code implements manipulation with accounts - * such as reading accounts from file, writing them to file, - * finding account by name etc. - * - * (c) majvan 2002-2004 - */ - -#include "stdafx.h" - - // Account status CS - // When we check some account, thread should change status of account to idle, connecting etc. - // So if we want to read status, we have to successfully write and then read. -static mir_cs csAccountStatusCS; - -// File Writing CS -// When 2 threads want to write to file... -static mir_cs csFileWritingCS; - -struct CExportedFunctions AccountExportedFcn[] = -{ - {YAMN_GETSTATUSID, (void *)GetStatusFcn}, - {YAMN_SETSTATUSID, (void *)SetStatusFcn}, -}; - -struct CExportedServices AccountExportedSvc[] = -{ - {MS_YAMN_CREATEPLUGINACCOUNT, CreatePluginAccountSvc}, - {MS_YAMN_DELETEPLUGINACCOUNT, DeletePluginAccountSvc}, - {MS_YAMN_FINDACCOUNTBYNAME, FindAccountByNameSvc}, - {MS_YAMN_GETNEXTFREEACCOUNT, GetNextFreeAccountSvc}, - {MS_YAMN_DELETEACCOUNT, DeletePluginAccountSvc}, - {MS_YAMN_READACCOUNTS, AddAccountsFromFileSvc}, - {MS_YAMN_WRITEACCOUNTS, WriteAccountsToFileSvc}, -}; - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -INT_PTR CreatePluginAccountSvc(WPARAM wParam, LPARAM lParam) -{ - HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; - uint32_t AccountVersion = (uint32_t)lParam; - - //test if we are going to initialize members of suitable structure (structures of plugin and YAMN must match) - if (AccountVersion != YAMN_ACCOUNTVERSION) - return NULL; - - if (Plugin != nullptr) { - CAccount *NewAccount; - if (Plugin->Fcn->NewAccountFcnPtr != nullptr) - //Let plugin create its own structure, which can be derived from CAccount structure - NewAccount = Plugin->Fcn->NewAccountFcnPtr(Plugin, YAMN_ACCOUNTVERSION); - else - //We suggest plugin uses standard CAccount structure, so we create it - NewAccount = new struct CAccount; - - //If not created successfully - if (NewAccount == nullptr) - return NULL; - - NewAccount->Plugin = Plugin; - //Init every members of structure, used by YAMN - InitAccount(NewAccount); - - return (INT_PTR)NewAccount; - } - return NULL; -} - -INT_PTR DeletePluginAccountSvc(WPARAM wParam, LPARAM) -{ - CAccount *OldAccount = (CAccount *)wParam; - - if (OldAccount->Plugin->Fcn != nullptr) { - // Deinit every members and allocated fields of structure used by YAMN - DeInitAccount(OldAccount); - if (OldAccount->Plugin->Fcn->DeleteAccountFcnPtr != nullptr) { - // Let plugin delete its own CAccount derived structure - OldAccount->Plugin->Fcn->DeleteAccountFcnPtr(OldAccount); - } - else { - delete OldAccount; //consider account as standard YAMN CAccount *and use its own destructor - } - return 1; - } - delete OldAccount; //consider account as standard YAMN CAccount *, not initialized before and use its own destructor - return 1; -} - -int InitAccount(CAccount *Which) -{ - //initialize synchronizing objects - Which->AccountAccessSO = new SWMRG; - SWMRGInitialize(Which->AccountAccessSO, nullptr); - Which->MessagesAccessSO = new SWMRG; - SWMRGInitialize(Which->MessagesAccessSO, nullptr); - Which->UsingThreads = new SCOUNTER; - SWMRGInitialize(Which->MessagesAccessSO, nullptr); - - //zero memory, where timestamps are stored - memset(&Which->LastChecked, 0, sizeof(Which->LastChecked)); - memset(&Which->LastSChecked, 0, sizeof(Which->LastSChecked)); - memset(&Which->LastSynchronised, 0, sizeof(Which->LastSynchronised)); - memset(&Which->LastMail, 0, sizeof(Which->LastMail)); - - Which->Name = nullptr; - Which->Mails = nullptr; - Which->Interval = 0; - Which->Flags = 0; - Which->StatusFlags = YAMN_ACC_ST1 + YAMN_ACC_ST7; - Which->Next = nullptr; - - Which->Server = new struct CServer; - Which->AbleToWork = TRUE; - - return 1; -} - -void DeInitAccount(CAccount *Which) -{ - //delete YAMN allocated fields - if (Which->Name != nullptr) - delete[] Which->Name; - if (Which->Server != nullptr) { - if (Which->Server->Name != nullptr) - delete[] Which->Server->Name; - if (Which->Server->Login != nullptr) - delete[] Which->Server->Login; - if (Which->Server->Passwd != nullptr) - delete[] Which->Server->Passwd; - delete[] Which->Server; - } - - SWMRGDelete(Which->AccountAccessSO); - delete Which->AccountAccessSO; - SWMRGDelete(Which->MessagesAccessSO); - delete Which->MessagesAccessSO; - delete Which->UsingThreads; - DeleteMessagesToEndFcn(Which, (HYAMNMAIL)Which->Mails); -} - -void StopSignalFcn(CAccount *Which) -//set event that we are going to delete account -{ - Which->AbleToWork = FALSE; - //do not use synchronizing objects anymore - //any access to these objects then ends with WAIT_FAILED - SetEvent(Which->AccountAccessSO->hFinishEV); - SetEvent(Which->MessagesAccessSO->hFinishEV); -} - -void CodeDecodeString(char *Dest, BOOL Encrypt) -{ - wchar_t Code = STARTCODEPSW; - - if (Dest == nullptr) - return; - - for (; *Dest != (wchar_t)0; Dest++) { - if (Encrypt) - *Dest = *Dest + Code; - else - *Dest = *Dest - Code; - Code += (wchar_t)ADDCODEPSW; - } -} - -static uint32_t PostFileToMemory(HANDLE File, char **MemFile, char **End) -{ - DWORD FileSize, ReadBytes; - if (!(FileSize = GetFileSize(File, nullptr))) { - CloseHandle(File); - return EACC_FILESIZE; - } - - //allocate space in memory, where we copy the whole file - if (nullptr == (*MemFile = new char[FileSize])) { - CloseHandle(File); - return EACC_ALLOC; - } - - //copy file to memory - if (!ReadFile(File, (LPVOID)*MemFile, FileSize, &ReadBytes, nullptr)) { - CloseHandle(File); - delete[] * MemFile; - return EACC_SYSTEM; - } - CloseHandle(File); - *End = *MemFile + FileSize; - return 0; -} - -uint32_t FileToMemory(wchar_t *FileName, char **MemFile, char **End) -{ - HANDLE hFile = CreateFile(FileName, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr); - if (hFile == INVALID_HANDLE_VALUE) - return EACC_SYSTEM; - - return PostFileToMemory(hFile, MemFile, End); -} - -#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES) -uint32_t ReadStringFromMemory(char **Parser, wchar_t *End, char **StoreTo, wchar_t *DebugString) -{ - //This is the debug version of ReadStringFromMemory function. This version shows MessageBox where - //read string is displayed - wchar_t *Dest, *Finder; - uint32_t Size; - wchar_t Debug[65536]; - - Finder = *Parser; - while ((*Finder != (wchar_t)0) && (Finder <= End)) Finder++; - mir_snwprintf(Debug, L"%s: %s,length is %d, remaining %d chars", DebugString, *Parser, Finder - *Parser, End - Finder); - MessageBox(NULL, Debug, L"debug", MB_OK); - if (Finder >= End) - return EACC_FILECOMPATIBILITY; - if (Size = Finder - *Parser) { - if (NULL == (Dest = *StoreTo = new wchar_t[Size + 1])) - return EACC_ALLOC; - for (; *Parser <= Finder; (*Parser)++, Dest++) - *Dest = **Parser; - } - else { - *StoreTo = NULL; - (*Parser)++; - } - return 0; -} -#endif - -uint32_t ReadStringFromMemory(char **Parser, char *End, char **StoreTo) -{ - char *Dest, *Finder; - uint32_t Size; - - Finder = *Parser; - while ((*Finder != (wchar_t)0) && (Finder <= End)) Finder++; - if (Finder >= End) - return EACC_FILECOMPATIBILITY; - if (Size = Finder - *Parser) { - if (nullptr == (Dest = *StoreTo = new char[Size + 1])) - return EACC_ALLOC; - for (; *Parser <= Finder; (*Parser)++, Dest++) - *Dest = **Parser; - } - else { - *StoreTo = nullptr; - (*Parser)++; - } - return 0; -} - -#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES) -uint32_t ReadStringFromMemoryW(wchar_t **Parser, wchar_t *End, wchar_t **StoreTo, wchar_t *DebugString) -{ - //This is the debug version of ReadStringFromMemoryW function. This version shows MessageBox where - //read string is displayed - wchar_t *Dest, *Finder; - uint32_t Size; - wchar_t Debug[65536]; - - Finder = *Parser; - while ((*Finder != (wchar_t)0) && (Finder <= (wchar_t *)End)) Finder++; - mir_snwprintf(Debug, L"%s: %s,length is %d, remaining %d chars", DebugString, *Parser, Finder - *Parser, (wchar_t *)End - Finder); - MessageBoxW(NULL, Debug, L"debug", MB_OK); - if (Finder >= (wchar_t *)End) - return EACC_FILECOMPATIBILITY; - if (Size = Finder - *Parser) { - if (NULL == (Dest = *StoreTo = new wchar_t[Size + 1])) - return EACC_ALLOC; - for (; *Parser <= Finder; (*Parser)++, Dest++) - *Dest = **Parser; - } - else { - *StoreTo = NULL; - (*Parser)++; - } - return 0; -} -#endif //if defined(DEBUG...) - -uint32_t ReadStringFromMemoryW(wchar_t **Parser, wchar_t *End, wchar_t **StoreTo) -{ - wchar_t *Dest, *Finder; - uint32_t Size; - - Finder = *Parser; - while ((*Finder != (wchar_t)0) && (Finder <= (wchar_t *)End)) Finder++; - if (Finder >= (wchar_t *)End) - return EACC_FILECOMPATIBILITY; - if (Size = Finder - *Parser) { - if (nullptr == (Dest = *StoreTo = new wchar_t[Size + 1])) - return EACC_ALLOC; - for (; *Parser <= Finder; (*Parser)++, Dest++) - *Dest = **Parser; - } - else { - *StoreTo = nullptr; - (*Parser)++; - } - return 0; -} - -static uint32_t ReadNotificationFromMemory(char **Parser, char *End, YAMN_NOTIFICATION *Which) -{ - uint32_t Stat; - #ifdef DEBUG_FILEREAD - wchar_t Debug[65536]; - #endif - - Which->Flags = *(uint32_t *)(*Parser); - (*Parser) += sizeof(uint32_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"NFlags: %04x, remaining %d chars", Which->Flags, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - - Which->PopupB = *(COLORREF *)(*Parser); - (*Parser) += sizeof(COLORREF); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"PopupB: %04x, remaining %d chars", Which->PopupB, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - Which->PopupT = *(COLORREF *)(*Parser); - (*Parser) += sizeof(COLORREF); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"PopupT: %04x, remaining %d chars", Which->PopupT, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - Which->PopupTime = *(uint32_t *)(*Parser); - (*Parser) += sizeof(uint32_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"PopupTime: %04x, remaining %d chars", Which->PopupTime, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - - #ifdef DEBUG_FILEREAD - if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t *)End, &Which->App, L"App")) - #else - if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t *)End, &Which->App)) - #endif - return Stat; - #ifdef DEBUG_FILEREAD - if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t *)End, &Which->AppParam, L"AppParam")) - #else - if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t *)End, &Which->AppParam)) - #endif - return Stat; - return 0; -} - -uint32_t ReadMessagesFromMemory(CAccount *Which, char **Parser, char *End) -{ - char *Finder; - uint32_t Size, Stat; - HYAMNMAIL ActualMail = nullptr; - struct CMimeItem *items; - char *ReadString; - - #ifdef DEBUG_FILEREAD - MessageBox(NULL, L"going to read messages, if any...", L"debug", MB_OK); - #endif - do { - Finder = *Parser; - while ((*Finder != (wchar_t)0) && (Finder <= End)) Finder++; - if (Finder >= End) - return EACC_FILECOMPATIBILITY; - if (Size = Finder - *Parser) { - if (Which->Mails == nullptr) //First message in queue - { - if (nullptr == (Which->Mails = ActualMail = CreateAccountMail(Which))) - return EACC_ALLOC; - } - else { - if (nullptr == (ActualMail->Next = CreateAccountMail(Which))) { - return EACC_ALLOC; - } - ActualMail = ActualMail->Next; - } - items = nullptr; - #ifdef DEBUG_FILEREADMESSAGES - if (Stat = ReadStringFromMemory(Parser, End, &ActualMail->ID, L"ID")) - #else - if (Stat = ReadStringFromMemory(Parser, End, &ActualMail->ID)) - #endif - return Stat; - // ActualMail->MailData=new MAILDATA; !!! mem leake !!! this is alloc by CreateAccountMail, no need for doubble alloc !!!! - - ActualMail->MailData->Size = *(uint32_t *)(*Parser); - (*Parser) += sizeof(uint32_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - ActualMail->Flags = *(uint32_t *)(*Parser); - (*Parser) += sizeof(uint32_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - ActualMail->Number = *(uint32_t *)(*Parser); - (*Parser) += sizeof(uint32_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - - if ((nullptr != Which->Plugin->MailFcn) && (nullptr != Which->Plugin->MailFcn->ReadMailOptsFcnPtr)) - Which->Plugin->MailFcn->ReadMailOptsFcnPtr(ActualMail, Parser, End); //read plugin mail settings from file - - do { - #if defined(DEBUG_FILEREADMESSAGES) || defined(DEBUG_FILEREAD) - if (Stat = ReadStringFromMemory(Parser, End, &ReadString, L"Name")) - #else - if (Stat = ReadStringFromMemory(Parser, End, &ReadString)) - #endif - return Stat; - if (ReadString == nullptr) - break; - - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "%s", ReadString); - #endif - - if (items == nullptr) - items = ActualMail->MailData->TranslatedHeader = new struct CMimeItem; - else { - items->Next = new struct CMimeItem; - items = items->Next; - } - if (items == nullptr) - return EACC_ALLOC; - items->name = ReadString; - - #ifdef DEBUG_FILEREADMESSAGES - if (Stat = ReadStringFromMemory(Parser, End, &ReadString, L"Value")) - #else - if (Stat = ReadStringFromMemory(Parser, End, &ReadString)) - #endif - return Stat; - items->value = ReadString; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "%s\n", ReadString); - #endif - } while (1); - } - else - break; //no next messages, new account! - - } while (1); - (*Parser)++; - return 0; -} - -uint32_t ReadAccountFromMemory(CAccount *Which, char **Parser, char *End) -{ - uint32_t Stat; - #ifdef DEBUG_FILEREAD - wchar_t Debug[65536]; - #endif - //Read name of account - - #ifdef DEBUG_FILEREAD - if (Stat = ReadStringFromMemory(Parser, End, &Which->Name, L"Name")) - #else - if (Stat = ReadStringFromMemory(Parser, End, &Which->Name)) - #endif - return Stat; - if (Which->Name == nullptr) - return EACC_FILECOMPATIBILITY; - - //Read server parameters - #ifdef DEBUG_FILEREAD - if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Name, L"Server")) - #else - if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Name)) - #endif - return Stat; - Which->Server->Port = *(uint16_t *)(*Parser); - (*Parser) += sizeof(uint16_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"Port: %d, remaining %d chars", Which->Server->Port, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - #ifdef DEBUG_FILEREAD - if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Login, L"Login")) - #else - if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Login)) - #endif - return Stat; - #ifdef DEBUG_FILEREAD - if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Passwd, L"Password")) - #else - if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Passwd)) - #endif - return Stat; - CodeDecodeString(Which->Server->Passwd, FALSE); - - //Read account flags - Which->Flags = *(uint32_t *)(*Parser); - (*Parser) += sizeof(uint32_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"Flags: %04x, remaining %d chars", Which->Flags, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - Which->StatusFlags = *(uint32_t *)(*Parser); - (*Parser) += sizeof(uint32_t); - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"STFlags: %04x, remaining %d chars", Which->StatusFlags, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - Which->PluginFlags = *(uint32_t *)(*Parser); - (*Parser) += sizeof(uint32_t); - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"PFlags: %04x, remaining %d chars", Which->PluginFlags, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - - //Read account miscellaneous parameters - Which->Interval = *(uint16_t *)(*Parser); - Which->TimeLeft = Which->Interval; //check on loading - (*Parser) += sizeof(uint16_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"Interval: %d, remaining %d chars", Which->Interval, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - - //Read notification parameters - if (Stat = ReadNotificationFromMemory(Parser, End, &Which->NewMailN)) - return Stat; - if (Stat = ReadNotificationFromMemory(Parser, End, &Which->NoNewMailN)) - return Stat; - if (Stat = ReadNotificationFromMemory(Parser, End, &Which->BadConnectN)) - return Stat; - - //Let plugin read its own data stored in file - if (Which->Plugin->Fcn != nullptr && Which->Plugin->Fcn->ReadPluginOptsFcnPtr != nullptr) - if (Stat = Which->Plugin->Fcn->ReadPluginOptsFcnPtr(Which, Parser, End)) - return Stat; - - // Read mails - WaitToWriteFcn(Which->MessagesAccessSO); - - if (Stat = ReadMessagesFromMemory(Which, Parser, End)) { - WriteDoneFcn(Which->MessagesAccessSO); - return Stat; - } - - WriteDoneFcn(Which->MessagesAccessSO); - - // Read timestamps - Which->LastChecked = *(SYSTEMTIME *)(*Parser); - (*Parser) += sizeof(SYSTEMTIME); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - - Which->LastSChecked = *(SYSTEMTIME *)(*Parser); - (*Parser) += sizeof(SYSTEMTIME); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - - Which->LastSynchronised = *(SYSTEMTIME *)(*Parser); - (*Parser) += sizeof(SYSTEMTIME); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - - Which->LastMail = *(SYSTEMTIME *)(*Parser); - (*Parser) += sizeof(SYSTEMTIME); - if (*Parser > End) //WARNING! There's only > at the end of testing - return EACC_FILECOMPATIBILITY; - - if (*Parser == End) - return EACC_ENDOFFILE; - return 0; -} - -static INT_PTR PerformAccountReading(HYAMNPROTOPLUGIN Plugin, char *MemFile, char *End) -{ - // Retrieve info for account from memory - char *Parser; - uint32_t Ver, Stat; - - CAccount *ActualAccount, *FirstAllocatedAccount; - - Ver = *(uint32_t *)MemFile; - if (Ver > YAMN_ACCOUNTFILEVERSION) { - delete[] MemFile; - return EACC_FILEVERSION; - } - Parser = MemFile + sizeof(Ver); - - SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); - - if (nullptr == (ActualAccount = (CAccount *)CallService(MS_YAMN_GETNEXTFREEACCOUNT, (WPARAM)Plugin, (LPARAM)YAMN_ACCOUNTVERSION))) { - SWMRGDoneWriting(Plugin->AccountBrowserSO); - delete[] MemFile; - return EACC_ALLOC; - } - - FirstAllocatedAccount = ActualAccount; - - do { - CAccount *Temp; - - WaitToWriteFcn(ActualAccount->AccountAccessSO); - Stat = ReadAccountFromMemory(ActualAccount, &Parser, End); - - if (ActualAccount->StatusFlags & (YAMN_ACC_STARTA | YAMN_ACC_STARTS)) - ActualAccount->TimeLeft = 1; //check on loading - - if (Stat && (Stat != EACC_ENDOFFILE)) { - for (ActualAccount = FirstAllocatedAccount; ActualAccount != nullptr; ActualAccount = Temp) { - Temp = ActualAccount->Next; - delete ActualAccount; - } - delete[] MemFile; - if (Plugin->FirstAccount == FirstAllocatedAccount) - Plugin->FirstAccount = nullptr; - - SWMRGDoneWriting(Plugin->AccountBrowserSO); - return (INT_PTR)Stat; - } - - WriteDoneFcn(ActualAccount->AccountAccessSO); - - if ((Stat != EACC_ENDOFFILE) && (nullptr == (ActualAccount = (CAccount *)CallService(MS_YAMN_GETNEXTFREEACCOUNT, (WPARAM)Plugin, (LPARAM)YAMN_ACCOUNTVERSION)))) { - for (ActualAccount = FirstAllocatedAccount; ActualAccount != nullptr; ActualAccount = Temp) { - Temp = ActualAccount->Next; - delete ActualAccount; - } - delete[] MemFile; - if (Plugin->FirstAccount == FirstAllocatedAccount) - Plugin->FirstAccount = nullptr; - - SWMRGDoneWriting(Plugin->AccountBrowserSO); - return EACC_ALLOC; - } - } while (Stat != EACC_ENDOFFILE); - - SWMRGDoneWriting(Plugin->AccountBrowserSO); - delete[] MemFile; - return 0; -} - -// Add accounts from file to memory -INT_PTR AddAccountsFromFileSvc(WPARAM wParam, LPARAM lParam) -{ - char *MemFile, *End; - uint32_t Stat = FileToMemory((wchar_t *)lParam, &MemFile, &End); - if (Stat != NO_ERROR) - return (INT_PTR)Stat; - - return PerformAccountReading((HYAMNPROTOPLUGIN)wParam, MemFile, End); -} - -uint32_t WriteStringToFile(HANDLE File, char *Source) -{ - DWORD Length, WrittenBytes; - char null = 0; - - if ((Source == nullptr) || !(Length = (uint32_t)mir_strlen(Source))) { - if (!WriteFile(File, &null, 1, &WrittenBytes, nullptr)) { - CloseHandle(File); - return EACC_SYSTEM; - } - } - else if (!WriteFile(File, Source, (Length + 1), &WrittenBytes, nullptr)) { - CloseHandle(File); - return EACC_SYSTEM; - } - return 0; -} - -uint32_t WriteStringToFileW(HANDLE File, wchar_t *Source) -{ - DWORD Length, WrittenBytes; - wchar_t null = (wchar_t)0; - - if ((Source == nullptr) || !(Length = (uint32_t)mir_wstrlen(Source))) { - if (!WriteFile(File, &null, sizeof(wchar_t), &WrittenBytes, nullptr)) { - CloseHandle(File); - return EACC_SYSTEM; - } - } - else if (!WriteFile(File, Source, (Length + 1) * sizeof(wchar_t), &WrittenBytes, nullptr)) - return EACC_SYSTEM; - return 0; -} - -DWORD WriteMessagesToFile(HANDLE File, CAccount *Which) -{ - DWORD WrittenBytes, Stat; - HYAMNMAIL ActualMail = (HYAMNMAIL)Which->Mails; - struct CMimeItem *items; - - while (ActualMail != nullptr) { - if (Stat = WriteStringToFile(File, ActualMail->ID)) - return Stat; - - if (!WriteFile(File, (char *)&ActualMail->MailData->Size, sizeof(ActualMail->MailData->Size), &WrittenBytes, nullptr) || - !WriteFile(File, (char *)&ActualMail->Flags, sizeof(ActualMail->Flags), &WrittenBytes, nullptr) || - !WriteFile(File, (char *)&ActualMail->Number, sizeof(ActualMail->Number), &WrittenBytes, nullptr)) - return EACC_SYSTEM; - if ((nullptr != Which->Plugin->MailFcn) && (nullptr != Which->Plugin->MailFcn->WriteMailOptsFcnPtr)) - Which->Plugin->MailFcn->WriteMailOptsFcnPtr(File, ActualMail); //write plugin mail options to file - for (items = ActualMail->MailData->TranslatedHeader; items != nullptr; items = items->Next) { - if (Stat = WriteStringToFile(File, items->name)) - return Stat; - if (Stat = WriteStringToFile(File, items->value)) - return Stat; - } - if (Stat = WriteStringToFile(File, "")) - return Stat; - ActualMail = ActualMail->Next; - } - if (Stat = WriteStringToFile(File, "")) - return Stat; - return 0; -} - -static INT_PTR PerformAccountWriting(HYAMNPROTOPLUGIN Plugin, HANDLE File) -{ - DWORD WrittenBytes, Stat; - CAccount *ActualAccount; - uint32_t Ver = YAMN_ACCOUNTFILEVERSION; - BOOL Writed = FALSE; - uint32_t ReturnValue = 0, EnterCode; - - SWMRGWaitToRead(Plugin->AccountBrowserSO, INFINITE); - - try { - for (ActualAccount = Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = ActualAccount->Next) { - EnterCode = WaitToReadFcn(ActualAccount->AccountAccessSO); - if (EnterCode == WAIT_FINISH) //account is about to delete - { - ActualAccount = ActualAccount->Next; - continue; - } - if (EnterCode == WAIT_FAILED) //account is deleted - break; - - if ((ActualAccount->Name == nullptr) || (*ActualAccount->Name == (wchar_t)0)) { - ReadDoneFcn(ActualAccount->AccountAccessSO); - continue; - } - - if (!Writed && !WriteFile(File, &Ver, sizeof(Ver), &WrittenBytes, nullptr)) - throw (uint32_t)EACC_SYSTEM; - - Writed = TRUE; - - if (Stat = WriteStringToFile(File, ActualAccount->Name)) - throw (uint32_t)Stat; - - if (Stat = WriteStringToFile(File, ActualAccount->Server->Name)) - throw (uint32_t)Stat; - - if (!WriteFile(File, (char *)&ActualAccount->Server->Port, 2, &WrittenBytes, nullptr)) - throw (uint32_t)EACC_SYSTEM; - - if ((Stat = WriteStringToFile(File, ActualAccount->Server->Login))) - throw (uint32_t)Stat; - - CodeDecodeString(ActualAccount->Server->Passwd, TRUE); - - if (Stat = WriteStringToFile(File, ActualAccount->Server->Passwd)) { - CodeDecodeString(ActualAccount->Server->Passwd, FALSE); - throw (uint32_t)Stat; - } - CodeDecodeString(ActualAccount->Server->Passwd, FALSE); - - if ((!WriteFile(File, (char *)&ActualAccount->Flags, sizeof(uint32_t), &WrittenBytes, nullptr) || - (!WriteFile(File, (char *)&ActualAccount->StatusFlags, sizeof(uint32_t), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->PluginFlags, sizeof(uint32_t), &WrittenBytes, nullptr)))) - throw (uint32_t)EACC_SYSTEM; - - if (!WriteFile(File, (char *)&ActualAccount->Interval, sizeof(uint16_t), &WrittenBytes, nullptr)) - throw (uint32_t)EACC_SYSTEM; - - if ((!WriteFile(File, (char *)&ActualAccount->NewMailN.Flags, sizeof(uint32_t), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->NewMailN.PopupB, sizeof(COLORREF), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->NewMailN.PopupT, sizeof(COLORREF), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->NewMailN.PopupTime, sizeof(uint32_t), &WrittenBytes, nullptr))) - throw (uint32_t)EACC_SYSTEM; - - if ((Stat = WriteStringToFileW(File, ActualAccount->NewMailN.App)) || - (Stat = WriteStringToFileW(File, ActualAccount->NewMailN.AppParam))) - throw (uint32_t)Stat; - - if ((!WriteFile(File, (char *)&ActualAccount->NoNewMailN.Flags, sizeof(uint32_t), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->NoNewMailN.PopupB, sizeof(COLORREF), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->NoNewMailN.PopupT, sizeof(COLORREF), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->NoNewMailN.PopupTime, sizeof(uint32_t), &WrittenBytes, nullptr))) - throw (uint32_t)EACC_SYSTEM; - - if ((Stat = WriteStringToFileW(File, ActualAccount->NoNewMailN.App)) || - (Stat = WriteStringToFileW(File, ActualAccount->NoNewMailN.AppParam))) - throw (uint32_t)Stat; - - if ((!WriteFile(File, (char *)&ActualAccount->BadConnectN.Flags, sizeof(uint32_t), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->BadConnectN.PopupB, sizeof(COLORREF), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->BadConnectN.PopupT, sizeof(COLORREF), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->BadConnectN.PopupTime, sizeof(uint32_t), &WrittenBytes, nullptr))) - throw (uint32_t)EACC_SYSTEM; - - if ((Stat = WriteStringToFileW(File, ActualAccount->BadConnectN.App)) || - (Stat = WriteStringToFileW(File, ActualAccount->BadConnectN.AppParam))) - throw (uint32_t)Stat; - - //Let plugin write its own values into file - if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->WritePluginOptsFcnPtr != nullptr) - if (Stat = ActualAccount->Plugin->Fcn->WritePluginOptsFcnPtr(File, ActualAccount)) - throw (uint32_t)Stat; - - WaitToReadFcn(ActualAccount->MessagesAccessSO); - - if (Stat = WriteMessagesToFile(File, ActualAccount)) { - - ReadDoneFcn(ActualAccount->MessagesAccessSO); - throw (uint32_t)Stat; - } - - ReadDoneFcn(ActualAccount->MessagesAccessSO); - - if ((!WriteFile(File, (char *)&ActualAccount->LastChecked, sizeof(SYSTEMTIME), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->LastSChecked, sizeof(SYSTEMTIME), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->LastSynchronised, sizeof(SYSTEMTIME), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&ActualAccount->LastMail, sizeof(SYSTEMTIME), &WrittenBytes, nullptr))) - throw (uint32_t)Stat; - - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - } - catch (uint32_t ErrorCode) { - ReadDoneFcn(ActualAccount->AccountAccessSO); - ReturnValue = ErrorCode; - } - - SWMRGDoneReading(Plugin->AccountBrowserSO); - CloseHandle(File); - return 0; -} - -// Writes accounts to file -INT_PTR WriteAccountsToFileSvc(WPARAM wParam, LPARAM lParam) -{ - HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; - - mir_cslock lck(csFileWritingCS); - HANDLE hFile = CreateFile((wchar_t *)lParam, GENERIC_WRITE, FILE_SHARE_WRITE, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr); - if (hFile == INVALID_HANDLE_VALUE) - return EACC_SYSTEM; - - return PerformAccountWriting(Plugin, hFile); -} - -INT_PTR FindAccountByNameSvc(WPARAM wParam, LPARAM lParam) -{ - HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; - char *SearchedAccount = (char *)lParam; - CAccount *Finder; - - SWMRGWaitToRead(Plugin->AccountBrowserSO, INFINITE); - - for (Finder = Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) - if ((Finder->Name != nullptr) && (0 == mir_strcmp(SearchedAccount, Finder->Name))) - break; - - SWMRGDoneReading(Plugin->AccountBrowserSO); - return (INT_PTR)Finder; -} - -INT_PTR GetNextFreeAccountSvc(WPARAM wParam, LPARAM lParam) -{ - HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; - CAccount *Finder; - - if (Plugin->FirstAccount == nullptr) { - Plugin->FirstAccount = (CAccount *)CallService(MS_YAMN_CREATEPLUGINACCOUNT, wParam, lParam); - return (INT_PTR)Plugin->FirstAccount; - } - for (Finder = Plugin->FirstAccount; Finder->Next != nullptr; Finder = Finder->Next); - Finder->Next = (CAccount *)CallService(MS_YAMN_CREATEPLUGINACCOUNT, wParam, lParam); - return (INT_PTR)Finder->Next; -} - -INT_PTR DeleteAccountSvc(WPARAM wParam, LPARAM lParam) -{ - //Deleting account works on these steps: - //1. set signal that account should stop activity (set event) - // setting this event we achieve, that any access to account is failed, - // so threads do not start any work with accounts (better saying threads of plugins should not start) - //2. wait to get write access to chained list of accounts - //3. we can write to chained list, so we change chain not to show to actual account - // now, any thread browsing list of accounts does not browse through actual account - // actual account seems to be hidden (it exists, but it is not in accounts chained list (chained list=queue)) - //Now, we should delete account from memory, BUT!!! - // Any thread can still be waked up and start asking account synchronizing object - // If account is deleted, asking about access to read account can throw memory exception (reading for - // a synchronizing object from memory, that was deleted) - //So, we cannot now delete account. We have to wait until we are sure no thread will be using account anymore - // (or to the end of Miranda, but problem is in allocated memory- it is allocated and Miranda is SMALLER, faster, easier, isn't it?) - // This deleting is achieved in 2 ways: - // We have event in UsingThreads synchronization objects. This event signals that no thread will use actual account - // 1. Any thread using account first increment UsingThread, so we know that account is used - // 2. If thread is about to close, it should decrement UsingThread - // 3. If thread creates another thread, that will use account, caller has to wait until the new thread does not - // increment UsingThreads (imagine that caller ends before the new thread set it: if no other thread is using - // account, account is automaticaly (decreasing UsingThreads) signaled as "not used" and we delete it. But then - // new thread is going to read account...). - //4. wait until UsingThread Event is signaled - //5. delete account from memory - - HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; - CAccount *Which = (CAccount *)lParam; - CAccount *Finder; - - //1. set stop signal - StopSignalFcn(Which); - WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_STOPACCOUNT, (WPARAM)Which, 0); - if (Plugin->Fcn->StopAccountFcnPtr != nullptr) - Plugin->Fcn->StopAccountFcnPtr(Which); - - //2. wait to get write access - SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); - - //3. remove from queue (chained list) - if (Plugin->FirstAccount == nullptr) { - SWMRGDoneWriting(Plugin->AccountBrowserSO); - return 0; - } - if (Plugin->FirstAccount == Which) { - Finder = Plugin->FirstAccount->Next; - Plugin->FirstAccount = Finder; - } - else { - for (Finder = Plugin->FirstAccount; Which != Finder->Next; Finder = Finder->Next); - Finder->Next = Finder->Next->Next; - } - - //leave write access - SWMRGDoneWriting(Plugin->AccountBrowserSO); - - //4. wait while event "UsingThread" is not signaled - // And what to do, if this event will be signaled in 1 hour? (Although it's paranoia, because we have sent "delete signal", so - // other threads do not start any new work with actual account) We will wait in blocked state? - // No, of course not. We will create new thread, that will wait and additionally remove our thread in background. - //5. So, the last point (deleting from memory) is performed in new DeleteAccountInBackground thread - - if ((Plugin->Fcn != nullptr) && (Plugin->Fcn->WriteAccountsFcnPtr != nullptr)) - Plugin->Fcn->WriteAccountsFcnPtr(); - CloseHandle(mir_forkthread(DeleteAccountInBackground, (void *)Which)); - - //Now, plugin can consider account as deleted, but plugin really can achieve deleting this account from memory when using - //event UsingThreads. - return 1; -} - -void __cdecl DeleteAccountInBackground(void *Value) -{ - CAccount *Which = (CAccount *)Value; - WaitForSingleObject(Which->UsingThreads->Event, INFINITE); - CallService(MS_YAMN_DELETEPLUGINACCOUNT, (WPARAM)Which, 0); -} - -int StopAccounts(HYAMNPROTOPLUGIN Plugin) -{ - CAccount *Finder; - - //1. wait to get write access - SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); - - for (Finder = Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) { - //2. set stop signal - StopSignalFcn(Finder); - WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_STOPACCOUNT, (WPARAM)Finder, 0); - if (Plugin->Fcn->StopAccountFcnPtr != nullptr) - Plugin->Fcn->StopAccountFcnPtr(Finder); - } - - //leave write access - SWMRGDoneWriting(Plugin->AccountBrowserSO); - - //Now, account is stopped. It can be removed from memory... - return 1; -} - -int WaitForAllAccounts(HYAMNPROTOPLUGIN Plugin, BOOL GetAccountBrowserAccess) -{ - if (GetAccountBrowserAccess) { - //1. wait to get write access - SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); - } - for (CAccount *Finder = Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) { - //2. wait for signal that account is not in use - WaitForSingleObject(Finder->UsingThreads->Event, INFINITE); - SetEvent(Finder->UsingThreads->Event); - } - if (GetAccountBrowserAccess) { - //leave write access - SWMRGDoneWriting(Plugin->AccountBrowserSO); - } - - return 1; -} - -int DeleteAccounts(HYAMNPROTOPLUGIN Plugin) -{ - //1. wait to get write access - SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); - - WaitForAllAccounts(Plugin, FALSE); - - for (CAccount *Finder = Plugin->FirstAccount; Finder != nullptr;) { - CAccount *Next = Finder->Next; - DeletePluginAccountSvc((WPARAM)Finder, 0); - Finder = Next; - } - - //leave write access - SWMRGDoneWriting(Plugin->AccountBrowserSO); - return 1; -} - -void WINAPI GetStatusFcn(CAccount *Which, wchar_t *Value) -{ - if (Which == nullptr) - return; - - mir_cslock lck(csAccountStatusCS); - mir_wstrcpy(Value, Which->Status); -} - -void WINAPI SetStatusFcn(CAccount *Which, wchar_t *Value) -{ - if (Which != nullptr) { - mir_cslock lck(csAccountStatusCS); - mir_wstrcpy(Which->Status, Value); - } - - WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_CHANGESTATUS, (WPARAM)Which, 0); -} +/* + * This code implements manipulation with accounts + * such as reading accounts from file, writing them to file, + * finding account by name etc. + * + * (c) majvan 2002-2004 + */ + +#include "stdafx.h" + + // Account status CS + // When we check some account, thread should change status of account to idle, connecting etc. + // So if we want to read status, we have to successfully write and then read. +static mir_cs csAccountStatusCS; + +// File Writing CS +// When 2 threads want to write to file... +static mir_cs csFileWritingCS; + +struct CExportedFunctions AccountExportedFcn[] = +{ + {YAMN_GETSTATUSID, (void *)GetStatusFcn}, + {YAMN_SETSTATUSID, (void *)SetStatusFcn}, +}; + +struct CExportedServices AccountExportedSvc[] = +{ + {MS_YAMN_CREATEPLUGINACCOUNT, CreatePluginAccountSvc}, + {MS_YAMN_DELETEPLUGINACCOUNT, DeletePluginAccountSvc}, + {MS_YAMN_FINDACCOUNTBYNAME, FindAccountByNameSvc}, + {MS_YAMN_GETNEXTFREEACCOUNT, GetNextFreeAccountSvc}, + {MS_YAMN_DELETEACCOUNT, DeletePluginAccountSvc}, + {MS_YAMN_READACCOUNTS, AddAccountsFromFileSvc}, + {MS_YAMN_WRITEACCOUNTS, WriteAccountsToFileSvc}, +}; + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +INT_PTR CreatePluginAccountSvc(WPARAM wParam, LPARAM lParam) +{ + HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; + uint32_t AccountVersion = (uint32_t)lParam; + + //test if we are going to initialize members of suitable structure (structures of plugin and YAMN must match) + if (AccountVersion != YAMN_ACCOUNTVERSION) + return NULL; + + if (Plugin != nullptr) { + CAccount *NewAccount; + if (Plugin->Fcn->NewAccountFcnPtr != nullptr) + //Let plugin create its own structure, which can be derived from CAccount structure + NewAccount = Plugin->Fcn->NewAccountFcnPtr(Plugin, YAMN_ACCOUNTVERSION); + else + //We suggest plugin uses standard CAccount structure, so we create it + NewAccount = new struct CAccount; + + //If not created successfully + if (NewAccount == nullptr) + return NULL; + + NewAccount->Plugin = Plugin; + //Init every members of structure, used by YAMN + InitAccount(NewAccount); + + return (INT_PTR)NewAccount; + } + return NULL; +} + +INT_PTR DeletePluginAccountSvc(WPARAM wParam, LPARAM) +{ + CAccount *OldAccount = (CAccount *)wParam; + + if (OldAccount->Plugin->Fcn != nullptr) { + // Deinit every members and allocated fields of structure used by YAMN + DeInitAccount(OldAccount); + if (OldAccount->Plugin->Fcn->DeleteAccountFcnPtr != nullptr) { + // Let plugin delete its own CAccount derived structure + OldAccount->Plugin->Fcn->DeleteAccountFcnPtr(OldAccount); + } + else { + delete OldAccount; //consider account as standard YAMN CAccount *and use its own destructor + } + return 1; + } + delete OldAccount; //consider account as standard YAMN CAccount *, not initialized before and use its own destructor + return 1; +} + +int InitAccount(CAccount *Which) +{ + //initialize synchronizing objects + Which->AccountAccessSO = new SWMRG; + SWMRGInitialize(Which->AccountAccessSO, nullptr); + Which->MessagesAccessSO = new SWMRG; + SWMRGInitialize(Which->MessagesAccessSO, nullptr); + Which->UsingThreads = new SCOUNTER; + SWMRGInitialize(Which->MessagesAccessSO, nullptr); + + //zero memory, where timestamps are stored + memset(&Which->LastChecked, 0, sizeof(Which->LastChecked)); + memset(&Which->LastSChecked, 0, sizeof(Which->LastSChecked)); + memset(&Which->LastSynchronised, 0, sizeof(Which->LastSynchronised)); + memset(&Which->LastMail, 0, sizeof(Which->LastMail)); + + Which->Name = nullptr; + Which->Mails = nullptr; + Which->Interval = 0; + Which->Flags = 0; + Which->StatusFlags = YAMN_ACC_ST1 + YAMN_ACC_ST7; + Which->Next = nullptr; + + Which->Server = new struct CServer; + Which->AbleToWork = TRUE; + + return 1; +} + +void DeInitAccount(CAccount *Which) +{ + //delete YAMN allocated fields + if (Which->Name != nullptr) + delete[] Which->Name; + if (Which->Server != nullptr) { + if (Which->Server->Name != nullptr) + delete[] Which->Server->Name; + if (Which->Server->Login != nullptr) + delete[] Which->Server->Login; + if (Which->Server->Passwd != nullptr) + delete[] Which->Server->Passwd; + delete[] Which->Server; + } + + SWMRGDelete(Which->AccountAccessSO); + delete Which->AccountAccessSO; + SWMRGDelete(Which->MessagesAccessSO); + delete Which->MessagesAccessSO; + delete Which->UsingThreads; + DeleteMessagesToEndFcn(Which, (HYAMNMAIL)Which->Mails); +} + +void StopSignalFcn(CAccount *Which) +//set event that we are going to delete account +{ + Which->AbleToWork = FALSE; + //do not use synchronizing objects anymore + //any access to these objects then ends with WAIT_FAILED + SetEvent(Which->AccountAccessSO->hFinishEV); + SetEvent(Which->MessagesAccessSO->hFinishEV); +} + +void CodeDecodeString(char *Dest, BOOL Encrypt) +{ + wchar_t Code = STARTCODEPSW; + + if (Dest == nullptr) + return; + + for (; *Dest != (wchar_t)0; Dest++) { + if (Encrypt) + *Dest = *Dest + Code; + else + *Dest = *Dest - Code; + Code += (wchar_t)ADDCODEPSW; + } +} + +static uint32_t PostFileToMemory(HANDLE File, char **MemFile, char **End) +{ + DWORD FileSize, ReadBytes; + if (!(FileSize = GetFileSize(File, nullptr))) { + CloseHandle(File); + return EACC_FILESIZE; + } + + //allocate space in memory, where we copy the whole file + if (nullptr == (*MemFile = new char[FileSize])) { + CloseHandle(File); + return EACC_ALLOC; + } + + //copy file to memory + if (!ReadFile(File, (LPVOID)*MemFile, FileSize, &ReadBytes, nullptr)) { + CloseHandle(File); + delete[] * MemFile; + return EACC_SYSTEM; + } + CloseHandle(File); + *End = *MemFile + FileSize; + return 0; +} + +uint32_t FileToMemory(wchar_t *FileName, char **MemFile, char **End) +{ + HANDLE hFile = CreateFile(FileName, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr); + if (hFile == INVALID_HANDLE_VALUE) + return EACC_SYSTEM; + + return PostFileToMemory(hFile, MemFile, End); +} + +#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES) +uint32_t ReadStringFromMemory(char **Parser, wchar_t *End, char **StoreTo, wchar_t *DebugString) +{ + //This is the debug version of ReadStringFromMemory function. This version shows MessageBox where + //read string is displayed + wchar_t *Dest, *Finder; + uint32_t Size; + wchar_t Debug[65536]; + + Finder = *Parser; + while ((*Finder != (wchar_t)0) && (Finder <= End)) Finder++; + mir_snwprintf(Debug, L"%s: %s,length is %d, remaining %d chars", DebugString, *Parser, Finder - *Parser, End - Finder); + MessageBox(NULL, Debug, L"debug", MB_OK); + if (Finder >= End) + return EACC_FILECOMPATIBILITY; + if (Size = Finder - *Parser) { + if (NULL == (Dest = *StoreTo = new wchar_t[Size + 1])) + return EACC_ALLOC; + for (; *Parser <= Finder; (*Parser)++, Dest++) + *Dest = **Parser; + } + else { + *StoreTo = NULL; + (*Parser)++; + } + return 0; +} +#endif + +uint32_t ReadStringFromMemory(char **Parser, char *End, char **StoreTo) +{ + char *Dest, *Finder; + uint32_t Size; + + Finder = *Parser; + while ((*Finder != (wchar_t)0) && (Finder <= End)) Finder++; + if (Finder >= End) + return EACC_FILECOMPATIBILITY; + if (Size = Finder - *Parser) { + if (nullptr == (Dest = *StoreTo = new char[Size + 1])) + return EACC_ALLOC; + for (; *Parser <= Finder; (*Parser)++, Dest++) + *Dest = **Parser; + } + else { + *StoreTo = nullptr; + (*Parser)++; + } + return 0; +} + +#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES) +uint32_t ReadStringFromMemoryW(wchar_t **Parser, wchar_t *End, wchar_t **StoreTo, wchar_t *DebugString) +{ + //This is the debug version of ReadStringFromMemoryW function. This version shows MessageBox where + //read string is displayed + wchar_t *Dest, *Finder; + uint32_t Size; + wchar_t Debug[65536]; + + Finder = *Parser; + while ((*Finder != (wchar_t)0) && (Finder <= (wchar_t *)End)) Finder++; + mir_snwprintf(Debug, L"%s: %s,length is %d, remaining %d chars", DebugString, *Parser, Finder - *Parser, (wchar_t *)End - Finder); + MessageBoxW(NULL, Debug, L"debug", MB_OK); + if (Finder >= (wchar_t *)End) + return EACC_FILECOMPATIBILITY; + if (Size = Finder - *Parser) { + if (NULL == (Dest = *StoreTo = new wchar_t[Size + 1])) + return EACC_ALLOC; + for (; *Parser <= Finder; (*Parser)++, Dest++) + *Dest = **Parser; + } + else { + *StoreTo = NULL; + (*Parser)++; + } + return 0; +} +#endif //if defined(DEBUG...) + +uint32_t ReadStringFromMemoryW(wchar_t **Parser, wchar_t *End, wchar_t **StoreTo) +{ + wchar_t *Dest, *Finder; + uint32_t Size; + + Finder = *Parser; + while ((*Finder != (wchar_t)0) && (Finder <= (wchar_t *)End)) Finder++; + if (Finder >= (wchar_t *)End) + return EACC_FILECOMPATIBILITY; + if (Size = Finder - *Parser) { + if (nullptr == (Dest = *StoreTo = new wchar_t[Size + 1])) + return EACC_ALLOC; + for (; *Parser <= Finder; (*Parser)++, Dest++) + *Dest = **Parser; + } + else { + *StoreTo = nullptr; + (*Parser)++; + } + return 0; +} + +static uint32_t ReadNotificationFromMemory(char **Parser, char *End, YAMN_NOTIFICATION *Which) +{ + uint32_t Stat; + #ifdef DEBUG_FILEREAD + wchar_t Debug[65536]; + #endif + + Which->Flags = *(uint32_t *)(*Parser); + (*Parser) += sizeof(uint32_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"NFlags: %04x, remaining %d chars", Which->Flags, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + + Which->PopupB = *(COLORREF *)(*Parser); + (*Parser) += sizeof(COLORREF); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"PopupB: %04x, remaining %d chars", Which->PopupB, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + Which->PopupT = *(COLORREF *)(*Parser); + (*Parser) += sizeof(COLORREF); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"PopupT: %04x, remaining %d chars", Which->PopupT, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + Which->PopupTime = *(uint32_t *)(*Parser); + (*Parser) += sizeof(uint32_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"PopupTime: %04x, remaining %d chars", Which->PopupTime, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + + #ifdef DEBUG_FILEREAD + if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t *)End, &Which->App, L"App")) + #else + if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t *)End, &Which->App)) + #endif + return Stat; + #ifdef DEBUG_FILEREAD + if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t *)End, &Which->AppParam, L"AppParam")) + #else + if (Stat = ReadStringFromMemoryW((wchar_t **)Parser, (wchar_t *)End, &Which->AppParam)) + #endif + return Stat; + return 0; +} + +uint32_t ReadMessagesFromMemory(CAccount *Which, char **Parser, char *End) +{ + char *Finder; + uint32_t Size, Stat; + HYAMNMAIL ActualMail = nullptr; + struct CMimeItem *items; + char *ReadString; + + #ifdef DEBUG_FILEREAD + MessageBox(NULL, L"going to read messages, if any...", L"debug", MB_OK); + #endif + do { + Finder = *Parser; + while ((*Finder != (wchar_t)0) && (Finder <= End)) Finder++; + if (Finder >= End) + return EACC_FILECOMPATIBILITY; + if (Size = Finder - *Parser) { + if (Which->Mails == nullptr) //First message in queue + { + if (nullptr == (Which->Mails = ActualMail = CreateAccountMail(Which))) + return EACC_ALLOC; + } + else { + if (nullptr == (ActualMail->Next = CreateAccountMail(Which))) { + return EACC_ALLOC; + } + ActualMail = ActualMail->Next; + } + items = nullptr; + #ifdef DEBUG_FILEREADMESSAGES + if (Stat = ReadStringFromMemory(Parser, End, &ActualMail->ID, L"ID")) + #else + if (Stat = ReadStringFromMemory(Parser, End, &ActualMail->ID)) + #endif + return Stat; + // ActualMail->MailData=new MAILDATA; !!! mem leake !!! this is alloc by CreateAccountMail, no need for doubble alloc !!!! + + ActualMail->MailData->Size = *(uint32_t *)(*Parser); + (*Parser) += sizeof(uint32_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + ActualMail->Flags = *(uint32_t *)(*Parser); + (*Parser) += sizeof(uint32_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + ActualMail->Number = *(uint32_t *)(*Parser); + (*Parser) += sizeof(uint32_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + + if ((nullptr != Which->Plugin->MailFcn) && (nullptr != Which->Plugin->MailFcn->ReadMailOptsFcnPtr)) + Which->Plugin->MailFcn->ReadMailOptsFcnPtr(ActualMail, Parser, End); //read plugin mail settings from file + + do { + #if defined(DEBUG_FILEREADMESSAGES) || defined(DEBUG_FILEREAD) + if (Stat = ReadStringFromMemory(Parser, End, &ReadString, L"Name")) + #else + if (Stat = ReadStringFromMemory(Parser, End, &ReadString)) + #endif + return Stat; + if (ReadString == nullptr) + break; + + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "%s", ReadString); + #endif + + if (items == nullptr) + items = ActualMail->MailData->TranslatedHeader = new struct CMimeItem; + else { + items->Next = new struct CMimeItem; + items = items->Next; + } + if (items == nullptr) + return EACC_ALLOC; + items->name = ReadString; + + #ifdef DEBUG_FILEREADMESSAGES + if (Stat = ReadStringFromMemory(Parser, End, &ReadString, L"Value")) + #else + if (Stat = ReadStringFromMemory(Parser, End, &ReadString)) + #endif + return Stat; + items->value = ReadString; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "%s\n", ReadString); + #endif + } while (1); + } + else + break; //no next messages, new account! + + } while (1); + (*Parser)++; + return 0; +} + +uint32_t ReadAccountFromMemory(CAccount *Which, char **Parser, char *End) +{ + uint32_t Stat; + #ifdef DEBUG_FILEREAD + wchar_t Debug[65536]; + #endif + //Read name of account + + #ifdef DEBUG_FILEREAD + if (Stat = ReadStringFromMemory(Parser, End, &Which->Name, L"Name")) + #else + if (Stat = ReadStringFromMemory(Parser, End, &Which->Name)) + #endif + return Stat; + if (Which->Name == nullptr) + return EACC_FILECOMPATIBILITY; + + //Read server parameters + #ifdef DEBUG_FILEREAD + if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Name, L"Server")) + #else + if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Name)) + #endif + return Stat; + Which->Server->Port = *(uint16_t *)(*Parser); + (*Parser) += sizeof(uint16_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"Port: %d, remaining %d chars", Which->Server->Port, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + #ifdef DEBUG_FILEREAD + if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Login, L"Login")) + #else + if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Login)) + #endif + return Stat; + #ifdef DEBUG_FILEREAD + if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Passwd, L"Password")) + #else + if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Passwd)) + #endif + return Stat; + CodeDecodeString(Which->Server->Passwd, FALSE); + + //Read account flags + Which->Flags = *(uint32_t *)(*Parser); + (*Parser) += sizeof(uint32_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"Flags: %04x, remaining %d chars", Which->Flags, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + Which->StatusFlags = *(uint32_t *)(*Parser); + (*Parser) += sizeof(uint32_t); + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"STFlags: %04x, remaining %d chars", Which->StatusFlags, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + Which->PluginFlags = *(uint32_t *)(*Parser); + (*Parser) += sizeof(uint32_t); + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"PFlags: %04x, remaining %d chars", Which->PluginFlags, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + + //Read account miscellaneous parameters + Which->Interval = *(uint16_t *)(*Parser); + Which->TimeLeft = Which->Interval; //check on loading + (*Parser) += sizeof(uint16_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"Interval: %d, remaining %d chars", Which->Interval, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + + //Read notification parameters + if (Stat = ReadNotificationFromMemory(Parser, End, &Which->NewMailN)) + return Stat; + if (Stat = ReadNotificationFromMemory(Parser, End, &Which->NoNewMailN)) + return Stat; + if (Stat = ReadNotificationFromMemory(Parser, End, &Which->BadConnectN)) + return Stat; + + //Let plugin read its own data stored in file + if (Which->Plugin->Fcn != nullptr && Which->Plugin->Fcn->ReadPluginOptsFcnPtr != nullptr) + if (Stat = Which->Plugin->Fcn->ReadPluginOptsFcnPtr(Which, Parser, End)) + return Stat; + + // Read mails + WaitToWriteFcn(Which->MessagesAccessSO); + + if (Stat = ReadMessagesFromMemory(Which, Parser, End)) { + WriteDoneFcn(Which->MessagesAccessSO); + return Stat; + } + + WriteDoneFcn(Which->MessagesAccessSO); + + // Read timestamps + Which->LastChecked = *(SYSTEMTIME *)(*Parser); + (*Parser) += sizeof(SYSTEMTIME); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + + Which->LastSChecked = *(SYSTEMTIME *)(*Parser); + (*Parser) += sizeof(SYSTEMTIME); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + + Which->LastSynchronised = *(SYSTEMTIME *)(*Parser); + (*Parser) += sizeof(SYSTEMTIME); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + + Which->LastMail = *(SYSTEMTIME *)(*Parser); + (*Parser) += sizeof(SYSTEMTIME); + if (*Parser > End) //WARNING! There's only > at the end of testing + return EACC_FILECOMPATIBILITY; + + if (*Parser == End) + return EACC_ENDOFFILE; + return 0; +} + +static INT_PTR PerformAccountReading(HYAMNPROTOPLUGIN Plugin, char *MemFile, char *End) +{ + // Retrieve info for account from memory + char *Parser; + uint32_t Ver, Stat; + + CAccount *ActualAccount, *FirstAllocatedAccount; + + Ver = *(uint32_t *)MemFile; + if (Ver > YAMN_ACCOUNTFILEVERSION) { + delete[] MemFile; + return EACC_FILEVERSION; + } + Parser = MemFile + sizeof(Ver); + + SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); + + if (nullptr == (ActualAccount = (CAccount *)CallService(MS_YAMN_GETNEXTFREEACCOUNT, (WPARAM)Plugin, (LPARAM)YAMN_ACCOUNTVERSION))) { + SWMRGDoneWriting(Plugin->AccountBrowserSO); + delete[] MemFile; + return EACC_ALLOC; + } + + FirstAllocatedAccount = ActualAccount; + + do { + CAccount *Temp; + + WaitToWriteFcn(ActualAccount->AccountAccessSO); + Stat = ReadAccountFromMemory(ActualAccount, &Parser, End); + + if (ActualAccount->StatusFlags & (YAMN_ACC_STARTA | YAMN_ACC_STARTS)) + ActualAccount->TimeLeft = 1; //check on loading + + if (Stat && (Stat != EACC_ENDOFFILE)) { + for (ActualAccount = FirstAllocatedAccount; ActualAccount != nullptr; ActualAccount = Temp) { + Temp = ActualAccount->Next; + delete ActualAccount; + } + delete[] MemFile; + if (Plugin->FirstAccount == FirstAllocatedAccount) + Plugin->FirstAccount = nullptr; + + SWMRGDoneWriting(Plugin->AccountBrowserSO); + return (INT_PTR)Stat; + } + + WriteDoneFcn(ActualAccount->AccountAccessSO); + + if ((Stat != EACC_ENDOFFILE) && (nullptr == (ActualAccount = (CAccount *)CallService(MS_YAMN_GETNEXTFREEACCOUNT, (WPARAM)Plugin, (LPARAM)YAMN_ACCOUNTVERSION)))) { + for (ActualAccount = FirstAllocatedAccount; ActualAccount != nullptr; ActualAccount = Temp) { + Temp = ActualAccount->Next; + delete ActualAccount; + } + delete[] MemFile; + if (Plugin->FirstAccount == FirstAllocatedAccount) + Plugin->FirstAccount = nullptr; + + SWMRGDoneWriting(Plugin->AccountBrowserSO); + return EACC_ALLOC; + } + } while (Stat != EACC_ENDOFFILE); + + SWMRGDoneWriting(Plugin->AccountBrowserSO); + delete[] MemFile; + return 0; +} + +// Add accounts from file to memory +INT_PTR AddAccountsFromFileSvc(WPARAM wParam, LPARAM lParam) +{ + char *MemFile, *End; + uint32_t Stat = FileToMemory((wchar_t *)lParam, &MemFile, &End); + if (Stat != NO_ERROR) + return (INT_PTR)Stat; + + return PerformAccountReading((HYAMNPROTOPLUGIN)wParam, MemFile, End); +} + +uint32_t WriteStringToFile(HANDLE File, char *Source) +{ + DWORD Length, WrittenBytes; + char null = 0; + + if ((Source == nullptr) || !(Length = (uint32_t)mir_strlen(Source))) { + if (!WriteFile(File, &null, 1, &WrittenBytes, nullptr)) { + CloseHandle(File); + return EACC_SYSTEM; + } + } + else if (!WriteFile(File, Source, (Length + 1), &WrittenBytes, nullptr)) { + CloseHandle(File); + return EACC_SYSTEM; + } + return 0; +} + +uint32_t WriteStringToFileW(HANDLE File, wchar_t *Source) +{ + DWORD Length, WrittenBytes; + wchar_t null = (wchar_t)0; + + if ((Source == nullptr) || !(Length = (uint32_t)mir_wstrlen(Source))) { + if (!WriteFile(File, &null, sizeof(wchar_t), &WrittenBytes, nullptr)) { + CloseHandle(File); + return EACC_SYSTEM; + } + } + else if (!WriteFile(File, Source, (Length + 1) * sizeof(wchar_t), &WrittenBytes, nullptr)) + return EACC_SYSTEM; + return 0; +} + +DWORD WriteMessagesToFile(HANDLE File, CAccount *Which) +{ + DWORD WrittenBytes, Stat; + HYAMNMAIL ActualMail = (HYAMNMAIL)Which->Mails; + struct CMimeItem *items; + + while (ActualMail != nullptr) { + if (Stat = WriteStringToFile(File, ActualMail->ID)) + return Stat; + + if (!WriteFile(File, (char *)&ActualMail->MailData->Size, sizeof(ActualMail->MailData->Size), &WrittenBytes, nullptr) || + !WriteFile(File, (char *)&ActualMail->Flags, sizeof(ActualMail->Flags), &WrittenBytes, nullptr) || + !WriteFile(File, (char *)&ActualMail->Number, sizeof(ActualMail->Number), &WrittenBytes, nullptr)) + return EACC_SYSTEM; + if ((nullptr != Which->Plugin->MailFcn) && (nullptr != Which->Plugin->MailFcn->WriteMailOptsFcnPtr)) + Which->Plugin->MailFcn->WriteMailOptsFcnPtr(File, ActualMail); //write plugin mail options to file + for (items = ActualMail->MailData->TranslatedHeader; items != nullptr; items = items->Next) { + if (Stat = WriteStringToFile(File, items->name)) + return Stat; + if (Stat = WriteStringToFile(File, items->value)) + return Stat; + } + if (Stat = WriteStringToFile(File, "")) + return Stat; + ActualMail = ActualMail->Next; + } + if (Stat = WriteStringToFile(File, "")) + return Stat; + return 0; +} + +static INT_PTR PerformAccountWriting(HYAMNPROTOPLUGIN Plugin, HANDLE File) +{ + DWORD WrittenBytes, Stat; + CAccount *ActualAccount; + uint32_t Ver = YAMN_ACCOUNTFILEVERSION; + BOOL Writed = FALSE; + uint32_t ReturnValue = 0, EnterCode; + + SWMRGWaitToRead(Plugin->AccountBrowserSO, INFINITE); + + try { + for (ActualAccount = Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = ActualAccount->Next) { + EnterCode = WaitToReadFcn(ActualAccount->AccountAccessSO); + if (EnterCode == WAIT_FINISH) //account is about to delete + { + ActualAccount = ActualAccount->Next; + continue; + } + if (EnterCode == WAIT_FAILED) //account is deleted + break; + + if ((ActualAccount->Name == nullptr) || (*ActualAccount->Name == (wchar_t)0)) { + ReadDoneFcn(ActualAccount->AccountAccessSO); + continue; + } + + if (!Writed && !WriteFile(File, &Ver, sizeof(Ver), &WrittenBytes, nullptr)) + throw (uint32_t)EACC_SYSTEM; + + Writed = TRUE; + + if (Stat = WriteStringToFile(File, ActualAccount->Name)) + throw (uint32_t)Stat; + + if (Stat = WriteStringToFile(File, ActualAccount->Server->Name)) + throw (uint32_t)Stat; + + if (!WriteFile(File, (char *)&ActualAccount->Server->Port, 2, &WrittenBytes, nullptr)) + throw (uint32_t)EACC_SYSTEM; + + if ((Stat = WriteStringToFile(File, ActualAccount->Server->Login))) + throw (uint32_t)Stat; + + CodeDecodeString(ActualAccount->Server->Passwd, TRUE); + + if (Stat = WriteStringToFile(File, ActualAccount->Server->Passwd)) { + CodeDecodeString(ActualAccount->Server->Passwd, FALSE); + throw (uint32_t)Stat; + } + CodeDecodeString(ActualAccount->Server->Passwd, FALSE); + + if ((!WriteFile(File, (char *)&ActualAccount->Flags, sizeof(uint32_t), &WrittenBytes, nullptr) || + (!WriteFile(File, (char *)&ActualAccount->StatusFlags, sizeof(uint32_t), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->PluginFlags, sizeof(uint32_t), &WrittenBytes, nullptr)))) + throw (uint32_t)EACC_SYSTEM; + + if (!WriteFile(File, (char *)&ActualAccount->Interval, sizeof(uint16_t), &WrittenBytes, nullptr)) + throw (uint32_t)EACC_SYSTEM; + + if ((!WriteFile(File, (char *)&ActualAccount->NewMailN.Flags, sizeof(uint32_t), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->NewMailN.PopupB, sizeof(COLORREF), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->NewMailN.PopupT, sizeof(COLORREF), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->NewMailN.PopupTime, sizeof(uint32_t), &WrittenBytes, nullptr))) + throw (uint32_t)EACC_SYSTEM; + + if ((Stat = WriteStringToFileW(File, ActualAccount->NewMailN.App)) || + (Stat = WriteStringToFileW(File, ActualAccount->NewMailN.AppParam))) + throw (uint32_t)Stat; + + if ((!WriteFile(File, (char *)&ActualAccount->NoNewMailN.Flags, sizeof(uint32_t), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->NoNewMailN.PopupB, sizeof(COLORREF), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->NoNewMailN.PopupT, sizeof(COLORREF), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->NoNewMailN.PopupTime, sizeof(uint32_t), &WrittenBytes, nullptr))) + throw (uint32_t)EACC_SYSTEM; + + if ((Stat = WriteStringToFileW(File, ActualAccount->NoNewMailN.App)) || + (Stat = WriteStringToFileW(File, ActualAccount->NoNewMailN.AppParam))) + throw (uint32_t)Stat; + + if ((!WriteFile(File, (char *)&ActualAccount->BadConnectN.Flags, sizeof(uint32_t), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->BadConnectN.PopupB, sizeof(COLORREF), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->BadConnectN.PopupT, sizeof(COLORREF), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->BadConnectN.PopupTime, sizeof(uint32_t), &WrittenBytes, nullptr))) + throw (uint32_t)EACC_SYSTEM; + + if ((Stat = WriteStringToFileW(File, ActualAccount->BadConnectN.App)) || + (Stat = WriteStringToFileW(File, ActualAccount->BadConnectN.AppParam))) + throw (uint32_t)Stat; + + //Let plugin write its own values into file + if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->WritePluginOptsFcnPtr != nullptr) + if (Stat = ActualAccount->Plugin->Fcn->WritePluginOptsFcnPtr(File, ActualAccount)) + throw (uint32_t)Stat; + + WaitToReadFcn(ActualAccount->MessagesAccessSO); + + if (Stat = WriteMessagesToFile(File, ActualAccount)) { + + ReadDoneFcn(ActualAccount->MessagesAccessSO); + throw (uint32_t)Stat; + } + + ReadDoneFcn(ActualAccount->MessagesAccessSO); + + if ((!WriteFile(File, (char *)&ActualAccount->LastChecked, sizeof(SYSTEMTIME), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->LastSChecked, sizeof(SYSTEMTIME), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->LastSynchronised, sizeof(SYSTEMTIME), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&ActualAccount->LastMail, sizeof(SYSTEMTIME), &WrittenBytes, nullptr))) + throw (uint32_t)Stat; + + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + } + catch (uint32_t ErrorCode) { + ReadDoneFcn(ActualAccount->AccountAccessSO); + ReturnValue = ErrorCode; + } + + SWMRGDoneReading(Plugin->AccountBrowserSO); + CloseHandle(File); + return 0; +} + +// Writes accounts to file +INT_PTR WriteAccountsToFileSvc(WPARAM wParam, LPARAM lParam) +{ + HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; + + mir_cslock lck(csFileWritingCS); + HANDLE hFile = CreateFile((wchar_t *)lParam, GENERIC_WRITE, FILE_SHARE_WRITE, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr); + if (hFile == INVALID_HANDLE_VALUE) + return EACC_SYSTEM; + + return PerformAccountWriting(Plugin, hFile); +} + +INT_PTR FindAccountByNameSvc(WPARAM wParam, LPARAM lParam) +{ + HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; + char *SearchedAccount = (char *)lParam; + CAccount *Finder; + + SWMRGWaitToRead(Plugin->AccountBrowserSO, INFINITE); + + for (Finder = Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) + if ((Finder->Name != nullptr) && (0 == mir_strcmp(SearchedAccount, Finder->Name))) + break; + + SWMRGDoneReading(Plugin->AccountBrowserSO); + return (INT_PTR)Finder; +} + +INT_PTR GetNextFreeAccountSvc(WPARAM wParam, LPARAM lParam) +{ + HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; + CAccount *Finder; + + if (Plugin->FirstAccount == nullptr) { + Plugin->FirstAccount = (CAccount *)CallService(MS_YAMN_CREATEPLUGINACCOUNT, wParam, lParam); + return (INT_PTR)Plugin->FirstAccount; + } + for (Finder = Plugin->FirstAccount; Finder->Next != nullptr; Finder = Finder->Next); + Finder->Next = (CAccount *)CallService(MS_YAMN_CREATEPLUGINACCOUNT, wParam, lParam); + return (INT_PTR)Finder->Next; +} + +INT_PTR DeleteAccountSvc(WPARAM wParam, LPARAM lParam) +{ + //Deleting account works on these steps: + //1. set signal that account should stop activity (set event) + // setting this event we achieve, that any access to account is failed, + // so threads do not start any work with accounts (better saying threads of plugins should not start) + //2. wait to get write access to chained list of accounts + //3. we can write to chained list, so we change chain not to show to actual account + // now, any thread browsing list of accounts does not browse through actual account + // actual account seems to be hidden (it exists, but it is not in accounts chained list (chained list=queue)) + //Now, we should delete account from memory, BUT!!! + // Any thread can still be waked up and start asking account synchronizing object + // If account is deleted, asking about access to read account can throw memory exception (reading for + // a synchronizing object from memory, that was deleted) + //So, we cannot now delete account. We have to wait until we are sure no thread will be using account anymore + // (or to the end of Miranda, but problem is in allocated memory- it is allocated and Miranda is SMALLER, faster, easier, isn't it?) + // This deleting is achieved in 2 ways: + // We have event in UsingThreads synchronization objects. This event signals that no thread will use actual account + // 1. Any thread using account first increment UsingThread, so we know that account is used + // 2. If thread is about to close, it should decrement UsingThread + // 3. If thread creates another thread, that will use account, caller has to wait until the new thread does not + // increment UsingThreads (imagine that caller ends before the new thread set it: if no other thread is using + // account, account is automaticaly (decreasing UsingThreads) signaled as "not used" and we delete it. But then + // new thread is going to read account...). + //4. wait until UsingThread Event is signaled + //5. delete account from memory + + HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; + CAccount *Which = (CAccount *)lParam; + CAccount *Finder; + + //1. set stop signal + StopSignalFcn(Which); + WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_STOPACCOUNT, (WPARAM)Which, 0); + if (Plugin->Fcn->StopAccountFcnPtr != nullptr) + Plugin->Fcn->StopAccountFcnPtr(Which); + + //2. wait to get write access + SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); + + //3. remove from queue (chained list) + if (Plugin->FirstAccount == nullptr) { + SWMRGDoneWriting(Plugin->AccountBrowserSO); + return 0; + } + if (Plugin->FirstAccount == Which) { + Finder = Plugin->FirstAccount->Next; + Plugin->FirstAccount = Finder; + } + else { + for (Finder = Plugin->FirstAccount; Which != Finder->Next; Finder = Finder->Next); + Finder->Next = Finder->Next->Next; + } + + //leave write access + SWMRGDoneWriting(Plugin->AccountBrowserSO); + + //4. wait while event "UsingThread" is not signaled + // And what to do, if this event will be signaled in 1 hour? (Although it's paranoia, because we have sent "delete signal", so + // other threads do not start any new work with actual account) We will wait in blocked state? + // No, of course not. We will create new thread, that will wait and additionally remove our thread in background. + //5. So, the last point (deleting from memory) is performed in new DeleteAccountInBackground thread + + if ((Plugin->Fcn != nullptr) && (Plugin->Fcn->WriteAccountsFcnPtr != nullptr)) + Plugin->Fcn->WriteAccountsFcnPtr(); + CloseHandle(mir_forkthread(DeleteAccountInBackground, (void *)Which)); + + //Now, plugin can consider account as deleted, but plugin really can achieve deleting this account from memory when using + //event UsingThreads. + return 1; +} + +void __cdecl DeleteAccountInBackground(void *Value) +{ + CAccount *Which = (CAccount *)Value; + WaitForSingleObject(Which->UsingThreads->Event, INFINITE); + CallService(MS_YAMN_DELETEPLUGINACCOUNT, (WPARAM)Which, 0); +} + +int StopAccounts(HYAMNPROTOPLUGIN Plugin) +{ + CAccount *Finder; + + //1. wait to get write access + SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); + + for (Finder = Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) { + //2. set stop signal + StopSignalFcn(Finder); + WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_STOPACCOUNT, (WPARAM)Finder, 0); + if (Plugin->Fcn->StopAccountFcnPtr != nullptr) + Plugin->Fcn->StopAccountFcnPtr(Finder); + } + + //leave write access + SWMRGDoneWriting(Plugin->AccountBrowserSO); + + //Now, account is stopped. It can be removed from memory... + return 1; +} + +int WaitForAllAccounts(HYAMNPROTOPLUGIN Plugin, BOOL GetAccountBrowserAccess) +{ + if (GetAccountBrowserAccess) { + //1. wait to get write access + SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); + } + for (CAccount *Finder = Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) { + //2. wait for signal that account is not in use + WaitForSingleObject(Finder->UsingThreads->Event, INFINITE); + SetEvent(Finder->UsingThreads->Event); + } + if (GetAccountBrowserAccess) { + //leave write access + SWMRGDoneWriting(Plugin->AccountBrowserSO); + } + + return 1; +} + +int DeleteAccounts(HYAMNPROTOPLUGIN Plugin) +{ + //1. wait to get write access + SWMRGWaitToWrite(Plugin->AccountBrowserSO, INFINITE); + + WaitForAllAccounts(Plugin, FALSE); + + for (CAccount *Finder = Plugin->FirstAccount; Finder != nullptr;) { + CAccount *Next = Finder->Next; + DeletePluginAccountSvc((WPARAM)Finder, 0); + Finder = Next; + } + + //leave write access + SWMRGDoneWriting(Plugin->AccountBrowserSO); + return 1; +} + +void WINAPI GetStatusFcn(CAccount *Which, wchar_t *Value) +{ + if (Which == nullptr) + return; + + mir_cslock lck(csAccountStatusCS); + mir_wstrcpy(Value, Which->Status); +} + +void WINAPI SetStatusFcn(CAccount *Which, wchar_t *Value) +{ + if (Which != nullptr) { + mir_cslock lck(csAccountStatusCS); + mir_wstrcpy(Which->Status, Value); + } + + WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_CHANGESTATUS, (WPARAM)Which, 0); +} diff --git a/protocols/YAMN/src/browser/badconnect.cpp b/protocols/YAMN/src/browser/badconnect.cpp index 5f9118eb18..d871fa2eea 100644 --- a/protocols/YAMN/src/browser/badconnect.cpp +++ b/protocols/YAMN/src/browser/badconnect.cpp @@ -1,251 +1,251 @@ -/* - * This code implements window handling (connection error) - * - * (c) majvan 2002,2004 - */ - -#include "../stdafx.h" - -#define BADCONNECTTITLE LPGEN("%s - connection error") -#define BADCONNECTMSG LPGEN("An error occurred. Error code: %d")//is in use? - -//-------------------------------------------------------------------------------------------------- - -LRESULT CALLBACK BadConnectPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_COMMAND: - // if clicked and it's new mail popup window - if ((HIWORD(wParam) == STN_CLICKED) && (PUGetPluginData(hWnd))) { - PROCESS_INFORMATION pi; - STARTUPINFOW si; - memset(&si, 0, sizeof(si)); - si.cb = sizeof(si); - CAccount *ActualAccount = (CAccount *)PUGetPluginData(hWnd); - - if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { - if (ActualAccount->BadConnectN.App != nullptr) { - wchar_t *Command; - if (ActualAccount->BadConnectN.AppParam != nullptr) - Command = new wchar_t[mir_wstrlen(ActualAccount->BadConnectN.App) + mir_wstrlen(ActualAccount->BadConnectN.AppParam) + 6]; - else - Command = new wchar_t[mir_wstrlen(ActualAccount->BadConnectN.App) + 6]; - - if (Command != nullptr) { - mir_wstrcpy(Command, L"\""); - mir_wstrcat(Command, ActualAccount->BadConnectN.App); - mir_wstrcat(Command, L"\" "); - if (ActualAccount->BadConnectN.AppParam != nullptr) - mir_wstrcat(Command, ActualAccount->BadConnectN.AppParam); - CreateProcessW(nullptr, Command, nullptr, nullptr, FALSE, NORMAL_PRIORITY_CLASS, nullptr, nullptr, &si, &pi); - delete[] Command; - } - } - - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - - PUDeletePopup(hWnd); - } - break; - - case UM_FREEPLUGINDATA: - //Here we'd free our own data, if we had it. - return FALSE; - - case UM_INITPOPUP: - //This is the equivalent to WM_INITDIALOG you'd get if you were the maker of dialog popups. - break; - case WM_CONTEXTMENU: - PUDeletePopup(hWnd); - break; - } - return DefWindowProc(hWnd, msg, wParam, lParam); -} - -INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_INITDIALOG: - { - BOOL ShowPopup, ShowMsg, ShowIco; - CAccount *ActualAccount; - uint32_t ErrorCode; - char *TitleStrA; - char *Message1A = nullptr; - wchar_t *Message1W = nullptr; - POPUPDATAW BadConnectPopup = {}; - - ActualAccount = ((struct BadConnectionParam *)lParam)->account; - ErrorCode = ((struct BadConnectionParam *)lParam)->errcode; - - if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) - return FALSE; - - int size = (int)(mir_strlen(ActualAccount->Name) + mir_strlen(Translate(BADCONNECTTITLE))); - TitleStrA = new char[size]; - mir_snprintf(TitleStrA, size, Translate(BADCONNECTTITLE), ActualAccount->Name); - - ShowPopup = ActualAccount->BadConnectN.Flags & YAMN_ACC_POP; - ShowMsg = ActualAccount->BadConnectN.Flags & YAMN_ACC_MSG; - ShowIco = ActualAccount->BadConnectN.Flags & YAMN_ACC_ICO; - - if (ShowPopup) { - BadConnectPopup.lchIcon = g_plugin.getIcon(IDI_BADCONNECT); - BadConnectPopup.colorBack = ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC ? ActualAccount->BadConnectN.PopupB : GetSysColor(COLOR_BTNFACE); - BadConnectPopup.colorText = ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC ? ActualAccount->BadConnectN.PopupT : GetSysColor(COLOR_WINDOWTEXT); - BadConnectPopup.iSeconds = ActualAccount->BadConnectN.PopupTime; - - BadConnectPopup.PluginWindowProc = BadConnectPopupProc; - BadConnectPopup.PluginData = ActualAccount; - mir_wstrncpy(BadConnectPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(BadConnectPopup.lpwzContactName)); - } - - if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr != nullptr) { - Message1W = ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode); - SetDlgItemText(hDlg, IDC_STATICMSG, Message1W); - wcsncpy_s(BadConnectPopup.lpwzText, Message1W, _TRUNCATE); - if (ShowPopup) - PUAddPopupW(&BadConnectPopup); - } - else if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->GetErrorStringAFcnPtr != nullptr) { - Message1W = ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode); - SetDlgItemText(hDlg, IDC_STATICMSG, Message1W); - wcsncpy_s(BadConnectPopup.lpwzText, Message1W, _TRUNCATE); - if (ShowPopup) - PUAddPopupW(&BadConnectPopup); - } - else { - Message1W = TranslateT("Unknown error"); - SetDlgItemText(hDlg, IDC_STATICMSG, Message1W); - wcsncpy_s(BadConnectPopup.lpwzText, Message1W, _TRUNCATE); - if (ShowPopup) - PUAddPopupW(&BadConnectPopup); - } - - if (!ShowMsg && !ShowIco) - DestroyWindow(hDlg); - - ReadDoneFcn(ActualAccount->AccountAccessSO); - - SetWindowTextA(hDlg, TitleStrA); - delete[] TitleStrA; - if (Message1A != nullptr) - delete[] Message1A; - if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->DeleteErrorStringFcnPtr != nullptr && Message1A != nullptr) - ActualAccount->Plugin->Fcn->DeleteErrorStringFcnPtr(Message1A); - if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->DeleteErrorStringFcnPtr != nullptr && Message1W != nullptr) - ActualAccount->Plugin->Fcn->DeleteErrorStringFcnPtr(Message1W); - return 0; - } - case WM_DESTROY: - { - NOTIFYICONDATA nid; - - memset(&nid, 0, sizeof(NOTIFYICONDATA)); - nid.cbSize = sizeof(NOTIFYICONDATA); - nid.hWnd = hDlg; - nid.uID = 0; - Shell_NotifyIcon(NIM_DELETE, &nid); - PostQuitMessage(0); - break; - } - case WM_YAMN_NOTIFYICON: - switch (lParam) { - case WM_LBUTTONDBLCLK: - ShowWindow(hDlg, SW_SHOWNORMAL); - SetForegroundWindow(hDlg); - break; - } - return 0; - case WM_CHAR: - switch ((wchar_t)wParam) { - case 27: - case 13: - DestroyWindow(hDlg); - break; - } - break; - case WM_SYSCOMMAND: - switch (wParam) { - case SC_CLOSE: - DestroyWindow(hDlg); - } - break; - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDC_BTNOK: - DestroyWindow(hDlg); - } - break; - } - return 0; -} - -void __cdecl BadConnection(void *Param) -{ - MSG msg; - HWND hBadConnect; - CAccount *ActualAccount; - - struct BadConnectionParam MyParam = *(struct BadConnectionParam *)Param; - ActualAccount = MyParam.account; - - SCIncFcn(ActualAccount->UsingThreads); - - // we will not use params in stack anymore - SetEvent(MyParam.ThreadRunningEV); - - __try { - hBadConnect = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_DLGBADCONNECT), nullptr, DlgProcYAMNBadConnection, (LPARAM)&MyParam); - Window_SetIcon_IcoLib(hBadConnect, g_plugin.getIconHandle(IDI_BADCONNECT)); - - if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) - __leave; - - if (ActualAccount->BadConnectN.Flags & YAMN_ACC_SND) - Skin_PlaySound(YAMN_CONNECTFAILSOUND); - - if (ActualAccount->BadConnectN.Flags & YAMN_ACC_MSG) - ShowWindow(hBadConnect, SW_SHOWNORMAL); - - if (ActualAccount->BadConnectN.Flags & YAMN_ACC_ICO) { - NOTIFYICONDATA nid = {}; - nid.cbSize = sizeof(nid); - nid.hWnd = hBadConnect; - nid.hIcon = g_plugin.getIcon(IDI_BADCONNECT); - nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; - nid.uCallbackMessage = WM_YAMN_NOTIFYICON; - mir_snwprintf(nid.szTip, L"%S%s", ActualAccount->Name, TranslateT(" - connection error")); - Shell_NotifyIcon(NIM_ADD, &nid); - } - - ReadDoneFcn(ActualAccount->AccountAccessSO); - - UpdateWindow(hBadConnect); - while (GetMessage(&msg, nullptr, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - // now, write to file. Why? Because we want to write when was new mail last checked - if ((ActualAccount->Plugin->Fcn != nullptr) && (ActualAccount->Plugin->Fcn->WriteAccountsFcnPtr != nullptr) && ActualAccount->AbleToWork) - ActualAccount->Plugin->Fcn->WriteAccountsFcnPtr(); - } - __finally { - SCDecFcn(ActualAccount->UsingThreads); - } -} - -int RunBadConnection(CAccount *acc, UINT_PTR iErrorCode, void *pUserInfo) -{ - BadConnectionParam param = {CreateEvent(nullptr, FALSE, FALSE, nullptr), acc, iErrorCode, pUserInfo}; - - HANDLE NewThread = mir_forkthread(BadConnection, ¶m); - if (nullptr == NewThread) - return 0; - - WaitForSingleObject(param.ThreadRunningEV, INFINITE); - CloseHandle(param.ThreadRunningEV); - return 1; -} +/* + * This code implements window handling (connection error) + * + * (c) majvan 2002,2004 + */ + +#include "../stdafx.h" + +#define BADCONNECTTITLE LPGEN("%s - connection error") +#define BADCONNECTMSG LPGEN("An error occurred. Error code: %d")//is in use? + +//-------------------------------------------------------------------------------------------------- + +LRESULT CALLBACK BadConnectPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) { + case WM_COMMAND: + // if clicked and it's new mail popup window + if ((HIWORD(wParam) == STN_CLICKED) && (PUGetPluginData(hWnd))) { + PROCESS_INFORMATION pi; + STARTUPINFOW si; + memset(&si, 0, sizeof(si)); + si.cb = sizeof(si); + CAccount *ActualAccount = (CAccount *)PUGetPluginData(hWnd); + + if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { + if (ActualAccount->BadConnectN.App != nullptr) { + wchar_t *Command; + if (ActualAccount->BadConnectN.AppParam != nullptr) + Command = new wchar_t[mir_wstrlen(ActualAccount->BadConnectN.App) + mir_wstrlen(ActualAccount->BadConnectN.AppParam) + 6]; + else + Command = new wchar_t[mir_wstrlen(ActualAccount->BadConnectN.App) + 6]; + + if (Command != nullptr) { + mir_wstrcpy(Command, L"\""); + mir_wstrcat(Command, ActualAccount->BadConnectN.App); + mir_wstrcat(Command, L"\" "); + if (ActualAccount->BadConnectN.AppParam != nullptr) + mir_wstrcat(Command, ActualAccount->BadConnectN.AppParam); + CreateProcessW(nullptr, Command, nullptr, nullptr, FALSE, NORMAL_PRIORITY_CLASS, nullptr, nullptr, &si, &pi); + delete[] Command; + } + } + + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + + PUDeletePopup(hWnd); + } + break; + + case UM_FREEPLUGINDATA: + //Here we'd free our own data, if we had it. + return FALSE; + + case UM_INITPOPUP: + //This is the equivalent to WM_INITDIALOG you'd get if you were the maker of dialog popups. + break; + case WM_CONTEXTMENU: + PUDeletePopup(hWnd); + break; + } + return DefWindowProc(hWnd, msg, wParam, lParam); +} + +INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) { + case WM_INITDIALOG: + { + BOOL ShowPopup, ShowMsg, ShowIco; + CAccount *ActualAccount; + uint32_t ErrorCode; + char *TitleStrA; + char *Message1A = nullptr; + wchar_t *Message1W = nullptr; + POPUPDATAW BadConnectPopup = {}; + + ActualAccount = ((struct BadConnectionParam *)lParam)->account; + ErrorCode = ((struct BadConnectionParam *)lParam)->errcode; + + if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) + return FALSE; + + int size = (int)(mir_strlen(ActualAccount->Name) + mir_strlen(Translate(BADCONNECTTITLE))); + TitleStrA = new char[size]; + mir_snprintf(TitleStrA, size, Translate(BADCONNECTTITLE), ActualAccount->Name); + + ShowPopup = ActualAccount->BadConnectN.Flags & YAMN_ACC_POP; + ShowMsg = ActualAccount->BadConnectN.Flags & YAMN_ACC_MSG; + ShowIco = ActualAccount->BadConnectN.Flags & YAMN_ACC_ICO; + + if (ShowPopup) { + BadConnectPopup.lchIcon = g_plugin.getIcon(IDI_BADCONNECT); + BadConnectPopup.colorBack = ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC ? ActualAccount->BadConnectN.PopupB : GetSysColor(COLOR_BTNFACE); + BadConnectPopup.colorText = ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC ? ActualAccount->BadConnectN.PopupT : GetSysColor(COLOR_WINDOWTEXT); + BadConnectPopup.iSeconds = ActualAccount->BadConnectN.PopupTime; + + BadConnectPopup.PluginWindowProc = BadConnectPopupProc; + BadConnectPopup.PluginData = ActualAccount; + mir_wstrncpy(BadConnectPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(BadConnectPopup.lpwzContactName)); + } + + if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr != nullptr) { + Message1W = ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode); + SetDlgItemText(hDlg, IDC_STATICMSG, Message1W); + wcsncpy_s(BadConnectPopup.lpwzText, Message1W, _TRUNCATE); + if (ShowPopup) + PUAddPopupW(&BadConnectPopup); + } + else if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->GetErrorStringAFcnPtr != nullptr) { + Message1W = ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode); + SetDlgItemText(hDlg, IDC_STATICMSG, Message1W); + wcsncpy_s(BadConnectPopup.lpwzText, Message1W, _TRUNCATE); + if (ShowPopup) + PUAddPopupW(&BadConnectPopup); + } + else { + Message1W = TranslateT("Unknown error"); + SetDlgItemText(hDlg, IDC_STATICMSG, Message1W); + wcsncpy_s(BadConnectPopup.lpwzText, Message1W, _TRUNCATE); + if (ShowPopup) + PUAddPopupW(&BadConnectPopup); + } + + if (!ShowMsg && !ShowIco) + DestroyWindow(hDlg); + + ReadDoneFcn(ActualAccount->AccountAccessSO); + + SetWindowTextA(hDlg, TitleStrA); + delete[] TitleStrA; + if (Message1A != nullptr) + delete[] Message1A; + if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->DeleteErrorStringFcnPtr != nullptr && Message1A != nullptr) + ActualAccount->Plugin->Fcn->DeleteErrorStringFcnPtr(Message1A); + if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->DeleteErrorStringFcnPtr != nullptr && Message1W != nullptr) + ActualAccount->Plugin->Fcn->DeleteErrorStringFcnPtr(Message1W); + return 0; + } + case WM_DESTROY: + { + NOTIFYICONDATA nid; + + memset(&nid, 0, sizeof(NOTIFYICONDATA)); + nid.cbSize = sizeof(NOTIFYICONDATA); + nid.hWnd = hDlg; + nid.uID = 0; + Shell_NotifyIcon(NIM_DELETE, &nid); + PostQuitMessage(0); + break; + } + case WM_YAMN_NOTIFYICON: + switch (lParam) { + case WM_LBUTTONDBLCLK: + ShowWindow(hDlg, SW_SHOWNORMAL); + SetForegroundWindow(hDlg); + break; + } + return 0; + case WM_CHAR: + switch ((wchar_t)wParam) { + case 27: + case 13: + DestroyWindow(hDlg); + break; + } + break; + case WM_SYSCOMMAND: + switch (wParam) { + case SC_CLOSE: + DestroyWindow(hDlg); + } + break; + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDC_BTNOK: + DestroyWindow(hDlg); + } + break; + } + return 0; +} + +void __cdecl BadConnection(void *Param) +{ + MSG msg; + HWND hBadConnect; + CAccount *ActualAccount; + + struct BadConnectionParam MyParam = *(struct BadConnectionParam *)Param; + ActualAccount = MyParam.account; + + SCIncFcn(ActualAccount->UsingThreads); + + // we will not use params in stack anymore + SetEvent(MyParam.ThreadRunningEV); + + __try { + hBadConnect = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_DLGBADCONNECT), nullptr, DlgProcYAMNBadConnection, (LPARAM)&MyParam); + Window_SetIcon_IcoLib(hBadConnect, g_plugin.getIconHandle(IDI_BADCONNECT)); + + if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) + __leave; + + if (ActualAccount->BadConnectN.Flags & YAMN_ACC_SND) + Skin_PlaySound(YAMN_CONNECTFAILSOUND); + + if (ActualAccount->BadConnectN.Flags & YAMN_ACC_MSG) + ShowWindow(hBadConnect, SW_SHOWNORMAL); + + if (ActualAccount->BadConnectN.Flags & YAMN_ACC_ICO) { + NOTIFYICONDATA nid = {}; + nid.cbSize = sizeof(nid); + nid.hWnd = hBadConnect; + nid.hIcon = g_plugin.getIcon(IDI_BADCONNECT); + nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; + nid.uCallbackMessage = WM_YAMN_NOTIFYICON; + mir_snwprintf(nid.szTip, L"%S%s", ActualAccount->Name, TranslateT(" - connection error")); + Shell_NotifyIcon(NIM_ADD, &nid); + } + + ReadDoneFcn(ActualAccount->AccountAccessSO); + + UpdateWindow(hBadConnect); + while (GetMessage(&msg, nullptr, 0, 0)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + + // now, write to file. Why? Because we want to write when was new mail last checked + if ((ActualAccount->Plugin->Fcn != nullptr) && (ActualAccount->Plugin->Fcn->WriteAccountsFcnPtr != nullptr) && ActualAccount->AbleToWork) + ActualAccount->Plugin->Fcn->WriteAccountsFcnPtr(); + } + __finally { + SCDecFcn(ActualAccount->UsingThreads); + } +} + +int RunBadConnection(CAccount *acc, UINT_PTR iErrorCode, void *pUserInfo) +{ + BadConnectionParam param = {CreateEvent(nullptr, FALSE, FALSE, nullptr), acc, iErrorCode, pUserInfo}; + + HANDLE NewThread = mir_forkthread(BadConnection, ¶m); + if (nullptr == NewThread) + return 0; + + WaitForSingleObject(param.ThreadRunningEV, INFINITE); + CloseHandle(param.ThreadRunningEV); + return 1; +} diff --git a/protocols/YAMN/src/browser/browser.h b/protocols/YAMN/src/browser/browser.h index 6707d50621..0cb3f1a248 100644 --- a/protocols/YAMN/src/browser/browser.h +++ b/protocols/YAMN/src/browser/browser.h @@ -1,38 +1,38 @@ -#ifndef __MAILBROWSER_H -#define __MAILBROWSER_H - -typedef struct MailBrowserWinParam -{ -#define YAMN_MAILBROWSERVERSION 1 - HANDLE ThreadRunningEV; - CAccount *account; - uint32_t nflags; //flags YAMN_ACC_??? when new mails - uint32_t nnflags; //flags YAMN_ACC_??? when no new mails - void *Param; -} YAMN_MAILBROWSERPARAM,*PYAMN_MAILBROWSERPARAM; - -typedef struct MailShowMsgWinParam -{ - HANDLE ThreadRunningEV; - CAccount *account; - HYAMNMAIL mail; -} YAMN_MAILSHOWPARAM, *PYAMN_MAILSHOWPARAM; - -typedef struct NoNewMailParam -{ -#define YAMN_NONEWMAILVERSION 1 - HANDLE ThreadRunningEV; - CAccount *account; - uint32_t flags; - void *Param; -} YAMN_NONEWMAILPARAM,*PYAMN_NONEWMAILPARAM; - -struct BadConnectionParam -{ - HANDLE ThreadRunningEV; - CAccount *account; - UINT_PTR errcode; - void *Param; -}; - -#endif +#ifndef __MAILBROWSER_H +#define __MAILBROWSER_H + +typedef struct MailBrowserWinParam +{ +#define YAMN_MAILBROWSERVERSION 1 + HANDLE ThreadRunningEV; + CAccount *account; + uint32_t nflags; //flags YAMN_ACC_??? when new mails + uint32_t nnflags; //flags YAMN_ACC_??? when no new mails + void *Param; +} YAMN_MAILBROWSERPARAM,*PYAMN_MAILBROWSERPARAM; + +typedef struct MailShowMsgWinParam +{ + HANDLE ThreadRunningEV; + CAccount *account; + HYAMNMAIL mail; +} YAMN_MAILSHOWPARAM, *PYAMN_MAILSHOWPARAM; + +typedef struct NoNewMailParam +{ +#define YAMN_NONEWMAILVERSION 1 + HANDLE ThreadRunningEV; + CAccount *account; + uint32_t flags; + void *Param; +} YAMN_NONEWMAILPARAM,*PYAMN_NONEWMAILPARAM; + +struct BadConnectionParam +{ + HANDLE ThreadRunningEV; + CAccount *account; + UINT_PTR errcode; + void *Param; +}; + +#endif diff --git a/protocols/YAMN/src/browser/mailbrowser.cpp b/protocols/YAMN/src/browser/mailbrowser.cpp index 1d62ad00dc..7b1b68e35a 100644 --- a/protocols/YAMN/src/browser/mailbrowser.cpp +++ b/protocols/YAMN/src/browser/mailbrowser.cpp @@ -1,2247 +1,2247 @@ -/* - * This code implements window handling (new mail) - * - * (c) majvan 2002-2004 - */ - /* There can be problems when compiling this file, because in this file - * we are using both unicode and no-unicode functions and compiler does not - * like it in one file - * When you got errors, try to comment the #define and compile, then - * put it back to uncommented and compile again :) - */ - -#include "../stdafx.h" - -#define TIMER_FLASHING 0x09061979 -#define MAILBROWSER_MINXSIZE 200 //min size of mail browser window -#define MAILBROWSER_MINYSIZE 130 - -#define MAILBROWSERTITLE LPGEN("%s - %d new mail messages, %d total") - -void __cdecl ShowEmailThread(void *Param); - -//-------------------------------------------------------------------------------------------------- -char *s_MonthNames[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; -bool bDate = false, bSub = false, bSize = false, bFrom = false; -int PosX = 0, PosY = 0, SizeX = 460, SizeY = 100; -int HeadSizeX = 0x2b2, HeadSizeY = 0x0b5, HeadPosX = 100, HeadPosY = 100; -int HeadSplitPos = 250; // per-mils of the size -static int FromWidth = 250, SubjectWidth = 280, SizeWidth = 50, SizeDate = 205; -unsigned char optDateTime = (SHOWDATELONG | SHOWDATENOTODAY); - -struct CMailNumbersSub -{ - int Total; //any mail - int New; //uses YAMN_MSG_NEW flag - int UnSeen; //uses YAMN_MSG_UNSEEN flag - // int Browser; //uses YAMN_MSG_BROWSER flag - int BrowserUC; //uses YAMN_MSG_BROWSER flag and YAMN_MSG_UNSEEN flag - int Display; //uses YAMN_MSG_DISPLAY flag - int DisplayTC; //uses YAMN_MSG_DISPLAY flag and YAMN_MSG_DISPLAYC flag - int DisplayUC; //uses YAMN_MSG_DISPLAY flag and YAMN_MSG_DISPLAYC flag and YAMN_MSG_UNSEEN flag - int Popup; //uses YAMN_MSG_POPUP flag - int PopupTC; //uses YAMN_MSG_POPUPC flag - int PopupNC; //uses YAMN_MSG_POPUPC flag and YAMN_MSG_NEW flag - int PopupRun; //uses YAMN_MSG_POPUP flag and YAMN_MSG_NEW flag - int PopupSL2NC; //uses YAMN_MSG_SPAML2 flag and YAMN_MSG_NEW flag - int PopupSL3NC; //uses YAMN_MSG_SPAML3 flag and YAMN_MSG_NEW flag - // int SysTray; //uses YAMN_MSG_SYSTRAY flag - int SysTrayUC; //uses YAMN_MSG_SYSTRAY flag and YAMN_MSG_UNSEEN flag - // int Sound; //uses YAMN_MSG_SOUND flag - int SoundNC; //uses YAMN_MSG_SOUND flag and YAMN_MSG_NEW flag - // int App; //uses YAMN_MSG_APP flag - int AppNC; //uses YAMN_MSG_APP flag and YAMN_MSG_NEW flag - int EventNC; //uses YAMN_MSG_NEVENT flag and YAMN_MSG_NEW flag -}; - -struct CMailNumbers -{ - struct CMailNumbersSub Real; - struct CMailNumbersSub Virtual; -}; - -struct CMailWinUserInfo -{ - CAccount *Account; - int TrayIconState; - BOOL UpdateMailsMessagesAccess; - BOOL Seen; - BOOL RunFirstTime; -}; - -struct CChangeContent -{ - uint32_t nflags; - uint32_t nnflags; -}; - -struct CUpdateMails -{ - struct CChangeContent *Flags; - BOOL Waiting; - HANDLE Copied; -}; - -struct CSortList -{ - HWND hDlg; - int iSubItem; -}; - -// Retrieves CAccount *, whose mails are displayed in ListMails -// hLM- handle of dialog window -// returns handle of account -inline CAccount *GetWindowAccount(HWND hDialog); - -// Looks to mail flags and increment mail counter (e.g. if mail is new, increments the new mail counter -// msgq- mail, which increments the counters -// MN- counnters structure -void IncrementMailCounters(HYAMNMAIL msgq, struct CMailNumbers *MN); - -enum -{ - UPDATE_FAIL = 0, //function failed - UPDATE_NONE, //none update has been performed - UPDATE_OK, //some changes occured, update performed -}; - -// Just looks for mail changes in account and update the mail browser window -// hDlg- dialog handle -// ActualAccount- account handle -// nflags- flags what to do when new mail arrives -// nnflags- flags what to do when no new mail arrives -// returns one of UPDATE_XXX value(not implemented yet) -int UpdateMails(HWND hDlg, CAccount *ActualAccount, uint32_t nflags, uint32_t nnflags); - -// When new mail occurs, shows window, plays sound, runs application... -// hDlg- dialog handle. Dialog of mailbrowser is already created and actions are performed over this window -// ActualAccount- handle of account, whose mails are to be notified -// MN- statistics of mails in account -// nflags- what to do or not to do (e.g. to show mailbrowser window or prohibit to show) -// nflags- flags what to do when new mail arrives -// nnflags- flags what to do when no new mail arrives -void DoMailActions(HWND hDlg, CAccount *ActualAccount, struct CMailNumbers *MN, uint32_t nflags, uint32_t nnflags); - -// Looks for items in mailbrowser and if they were deleted, delete them from browser window -// hListView- handle of listview window -// ActualAccount- handle of account, whose mails are show -// MailNumbers- pointer to structure, in which function stores numbers of mails with some property -// returns one of UPDATE_XXX value (not implemented yet) -int ChangeExistingMailStatus(HWND hListView, CAccount *ActualAccount); - -// Adds new mails to ListView and if any new, shows multi popup (every new message is new popup window created by popup plugin) -// hListView- handle of listview window -// ActualAccount- handle of account, whose mails are show -// NewMailPopup- pointer to prepared structure for popup plugin, can be NULL if no popup show -// MailNumbers- pointer to structure, in which function stores numbers of mails with some property -// nflags- flags what to do when new mail arrives -// returns one of UPDATE_XXX value (not implemented yet) -int AddNewMailsToListView(HWND hListView, CAccount *ActualAccount, uint32_t nflags); - -// Window callback procedure for popup window (created by popup plugin) -LRESULT CALLBACK NewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); - -// Window callback procedure for popup window (created by popup plugin) -LRESULT CALLBACK NoNewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); - -// Dialog callback procedure for mail browser -INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); - -// MailBrowser thread function creates window if needed, tray icon and plays sound -void __cdecl MailBrowser(void *Param); - -LRESULT CALLBACK ListViewSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); - -// Runs mail browser in new thread -INT_PTR RunMailBrowserSvc(WPARAM, LPARAM); - -#define YAMN_BROWSER_SHOWPOPUP 0x01 - -// list view items' order criteria -#define LVORDER_NOORDER -1 -#define LVORDER_STRING 0 -#define LVORDER_NUMERIC 1 -#define LVORDER_DATETIME 2 - -// list view order direction -#define LVORDER_ASCENDING 1 -#define LVORDER_NONE 0 -#define LVORDER_DESCENDING -1 - -// list view sort type -#define LVSORTPRIORITY_NONE -1 - -// List view column info. -typedef struct _SAMPLELISTVIEWCOLUMN -{ - UINT uCXCol; // index - int nSortType; // sorting type (STRING = 0, NUMERIC, DATE, DATETIME) - int nSortOrder; // sorting order (ASCENDING = -1, NONE, DESCENDING) - int nPriority; // sort priority (-1 for none, 0, 1, ..., nColumns - 1 maximum) - wchar_t lpszName[128]; // column name -} SAMPLELISTVIEWCOLUMN; - -// Compare priority -typedef struct _LVCOMPAREINFO -{ - int iIdx; // Index - int iPriority; // Priority -} LVCOMPAREINFO, *LPLVCOMPAREINFO; - -//-------------------------------------------------------------------------------------------------- - -LPARAM readItemLParam(HWND hwnd, uint32_t iItem) -{ - LVITEM item; - item.mask = LVIF_PARAM; - item.iItem = iItem; - item.iSubItem = 0; - SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM)&item); - return item.lParam; -} - -inline CAccount *GetWindowAccount(HWND hDlg) -{ - struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); - - return (mwui == nullptr) ? nullptr : mwui->Account; -} - -void IncrementMailCounters(HYAMNMAIL msgq, struct CMailNumbers *MN) -{ - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.Total++; - else - MN->Real.Total++; - - if (msgq->Flags & YAMN_MSG_NEW) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.New++; - else - MN->Real.New++; - if (msgq->Flags & YAMN_MSG_UNSEEN) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.UnSeen++; - else - MN->Real.UnSeen++; - if ((msgq->Flags & (YAMN_MSG_UNSEEN | YAMN_MSG_BROWSER)) == (YAMN_MSG_UNSEEN | YAMN_MSG_BROWSER)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.BrowserUC++; - else - MN->Real.BrowserUC++; - if (msgq->Flags & YAMN_MSG_DISPLAY) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.Display++; - else - MN->Real.Display++; - if ((msgq->Flags & (YAMN_MSG_DISPLAYC | YAMN_MSG_DISPLAY)) == (YAMN_MSG_DISPLAYC | YAMN_MSG_DISPLAY)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.DisplayTC++; - else - MN->Real.DisplayTC++; - if ((msgq->Flags & (YAMN_MSG_UNSEEN | YAMN_MSG_DISPLAYC | YAMN_MSG_DISPLAY)) == (YAMN_MSG_UNSEEN | YAMN_MSG_DISPLAYC | YAMN_MSG_DISPLAY)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.DisplayUC++; - else - MN->Real.DisplayUC++; - if (msgq->Flags & YAMN_MSG_POPUP) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.Popup++; - else - MN->Real.Popup++; - if ((msgq->Flags & YAMN_MSG_POPUPC) == YAMN_MSG_POPUPC) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.PopupTC++; - else - MN->Real.PopupTC++; - if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_POPUPC)) == (YAMN_MSG_NEW | YAMN_MSG_POPUPC)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.PopupNC++; - else - MN->Real.PopupNC++; - if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_POPUP)) == (YAMN_MSG_NEW | YAMN_MSG_POPUP)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.PopupRun++; - else - MN->Real.PopupRun++; - if ((msgq->Flags & YAMN_MSG_NEW) && YAMN_MSG_SPAML(msgq->Flags, YAMN_MSG_SPAML2)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.PopupSL2NC++; - else - MN->Real.PopupSL2NC++; - if ((msgq->Flags & YAMN_MSG_NEW) && YAMN_MSG_SPAML(msgq->Flags, YAMN_MSG_SPAML3)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.PopupSL3NC++; - else - MN->Real.PopupSL3NC++; - /* if (msgq->MailData->Flags & YAMN_MSG_SYSTRAY) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.SysTray++; - else - MN->Real.SysTray++; - */ if ((msgq->Flags & (YAMN_MSG_UNSEEN | YAMN_MSG_SYSTRAY)) == (YAMN_MSG_UNSEEN | YAMN_MSG_SYSTRAY)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.SysTrayUC++; - else - MN->Real.SysTrayUC++; - /* if (msgq->MailData->Flags & YAMN_MSG_SOUND) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.Sound++; - else - MN->Real.Sound++; - */ if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_SOUND)) == (YAMN_MSG_NEW | YAMN_MSG_SOUND)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.SoundNC++; - else - MN->Real.SoundNC++; - /* if (msgq->MailData->Flags & YAMN_MSG_APP) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.App++; - else - MN->Real.App++; - */ if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_APP)) == (YAMN_MSG_NEW | YAMN_MSG_APP)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.AppNC++; - else - MN->Real.AppNC++; - if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_NEVENT)) == (YAMN_MSG_NEW | YAMN_MSG_NEVENT)) - if (msgq->Flags & YAMN_MSG_VIRTUAL) - MN->Virtual.EventNC++; - else - MN->Real.EventNC++; -} - -int UpdateMails(HWND hDlg, CAccount *ActualAccount, uint32_t nflags, uint32_t nnflags) -{ - struct CMailNumbers MN; - - BOOL Loaded; - BOOL RunMailBrowser, RunPopups; - - struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); - //now we ensure read access for account and write access for its mails - if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) { - PostMessage(hDlg, WM_DESTROY, 0, 0); - return UPDATE_FAIL; - } - - if (WAIT_OBJECT_0 != WaitToWriteFcn(ActualAccount->MessagesAccessSO)) { - ReadDoneFcn(ActualAccount->AccountAccessSO); - PostMessage(hDlg, WM_DESTROY, 0, 0); - return UPDATE_FAIL; - } - - memset(&MN, 0, sizeof(MN)); - - for (HYAMNMAIL msgq = (HYAMNMAIL)ActualAccount->Mails; msgq != nullptr; msgq = msgq->Next) { - if (!LoadedMailData(msgq)) //check if mail is already in memory - { - Loaded = false; - if (nullptr == LoadMailData(msgq)) //if we could not load mail to memory, consider this mail deleted and do not display it - continue; - } - else - Loaded = true; - - IncrementMailCounters(msgq, &MN); - - if (!Loaded) - UnloadMailData(msgq); //do not keep data for mail in memory - } - - if (mwui != nullptr) - mwui->UpdateMailsMessagesAccess = TRUE; - - //Now we are going to check if extracting data from mail headers are needed. - //If popups will be displayed or mailbrowser window - if ((((mwui != nullptr) && !(mwui->RunFirstTime)) && - ( - ((nnflags & YAMN_ACC_MSGP) && !(MN.Real.BrowserUC + MN.Virtual.BrowserUC)) || - ((nflags & YAMN_ACC_MSGP) && (MN.Real.BrowserUC + MN.Virtual.BrowserUC)) - ) - ) || //if mail window was displayed before and flag YAMN_ACC_MSGP is set - ((nnflags & YAMN_ACC_MSG) && !(MN.Real.BrowserUC + MN.Virtual.BrowserUC)) || //if needed to run mailbrowser when no unseen and no unseen mail found - ((nflags & YAMN_ACC_MSG) && (MN.Real.BrowserUC + MN.Virtual.BrowserUC)) || //if unseen mails found, we sure run mailbrowser - ((nflags & YAMN_ACC_ICO) && (MN.Real.SysTrayUC + MN.Virtual.SysTrayUC)) - ) //if needed to run systray - RunMailBrowser = TRUE; - else - RunMailBrowser = FALSE; - - // if some popups with mails are needed to show - if ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (MN.Real.PopupNC + MN.Virtual.PopupNC)) - RunPopups = TRUE; - else RunPopups = FALSE; - - if (RunMailBrowser) - ChangeExistingMailStatus(GetDlgItem(hDlg, IDC_LISTMAILS), ActualAccount); - if (RunMailBrowser || RunPopups) - AddNewMailsToListView(hDlg == nullptr ? nullptr : GetDlgItem(hDlg, IDC_LISTMAILS), ActualAccount, nflags); - - if (RunMailBrowser) { - size_t len = mir_strlen(ActualAccount->Name) + mir_strlen(Translate(MAILBROWSERTITLE)) + 10; //+10 chars for numbers - char *TitleStrA = new char[len]; - wchar_t *TitleStrW = new wchar_t[len]; - - mir_snprintf(TitleStrA, len, Translate(MAILBROWSERTITLE), ActualAccount->Name, MN.Real.DisplayUC + MN.Virtual.DisplayUC, MN.Real.Display + MN.Virtual.Display); - MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, TitleStrA, -1, TitleStrW, (int)mir_strlen(TitleStrA) + 1); - SetWindowTextW(hDlg, TitleStrW); - delete[] TitleStrA; - delete[] TitleStrW; - } - - DoMailActions(hDlg, ActualAccount, &MN, nflags, nnflags); - - SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_NEW, 0, YAMN_MSG_NEW, YAMN_FLAG_REMOVE); //rempve the new flag - if (!RunMailBrowser) - SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_UNSEEN, YAMN_MSG_STAYUNSEEN, YAMN_MSG_UNSEEN, YAMN_FLAG_REMOVE); //remove the unseen flag when it was not displayed and it has not "stay unseen" flag set - - if (mwui != nullptr) { - mwui->UpdateMailsMessagesAccess = FALSE; - mwui->RunFirstTime = FALSE; - } - - WriteDoneFcn(ActualAccount->MessagesAccessSO); - ReadDoneFcn(ActualAccount->AccountAccessSO); - - if (RunMailBrowser) - UpdateWindow(GetDlgItem(hDlg, IDC_LISTMAILS)); - else if (hDlg != nullptr) - DestroyWindow(hDlg); - - return 1; -} - -int ChangeExistingMailStatus(HWND hListView, CAccount *ActualAccount) -{ - LVITEM item; - HYAMNMAIL mail, msgq; - - int in = ListView_GetItemCount(hListView); - item.mask = LVIF_PARAM; - - for (int i = 0; i < in; i++) { - item.iItem = i; - item.iSubItem = 0; - if (TRUE == ListView_GetItem(hListView, &item)) - mail = (HYAMNMAIL)item.lParam; - else - continue; - for (msgq = (HYAMNMAIL)ActualAccount->Mails; (msgq != nullptr) && (msgq != mail); msgq = msgq->Next); //found the same mail in account queue - if (msgq == nullptr) //if mail was not found - if (TRUE == ListView_DeleteItem(hListView, i)) { - in--; i--; - continue; - } - } - - return TRUE; -} - -void MimeDateToLocalizedDateTime(char *datein, wchar_t *dateout, int lendateout); -int AddNewMailsToListView(HWND hListView, CAccount *ActualAccount, uint32_t nflags) -{ - wchar_t *FromStr; - wchar_t SizeStr[20]; - wchar_t LocalDateStr[128]; - - LVITEMW item; - LVFINDINFO fi; - - int foundi = 0, lfoundi = 0; - struct CHeader UnicodeHeader; - BOOL Loaded, Extracted, FromStrNew = FALSE; - - memset(&item, 0, sizeof(item)); - memset(&UnicodeHeader, 0, sizeof(UnicodeHeader)); - - if (hListView != nullptr) { - item.mask = LVIF_TEXT | LVIF_PARAM; - item.iItem = 0; - memset(&fi, 0, sizeof(fi)); - fi.flags = LVFI_PARAM; //let's go search item by lParam number - lfoundi = 0; - } - - POPUPDATAW NewMailPopup = {}; - NewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount; - NewMailPopup.lchIcon = g_plugin.getIcon(IDI_NEWMAIL); - if (nflags & YAMN_ACC_POPC) { - NewMailPopup.colorBack = ActualAccount->NewMailN.PopupB; - NewMailPopup.colorText = ActualAccount->NewMailN.PopupT; - } - else { - NewMailPopup.colorBack = GetSysColor(COLOR_BTNFACE); - NewMailPopup.colorText = GetSysColor(COLOR_WINDOWTEXT); - } - NewMailPopup.iSeconds = ActualAccount->NewMailN.PopupTime; - - NewMailPopup.PluginWindowProc = NewMailPopupProc; - NewMailPopup.PluginData = nullptr; //it's new mail popup - - for (HYAMNMAIL msgq = (HYAMNMAIL)ActualAccount->Mails; msgq != nullptr; msgq = msgq->Next, lfoundi++) { - // now we hide mail pointer to item's lParam member. We can later use it to retrieve mail datas - - Extracted = FALSE; FromStr = nullptr; FromStrNew = FALSE; - - if (hListView != nullptr) { - fi.lParam = (LPARAM)msgq; - if (-1 != (foundi = ListView_FindItem(hListView, -1, &fi))) { // if mail is already in window - lfoundi = foundi; - continue; // do not insert any item - } - - item.iItem = lfoundi; // insert after last found item - item.lParam = (LPARAM)msgq; - } - - if (!LoadedMailData(msgq)) { // check if mail is already in memory - Loaded = false; - if (nullptr == LoadMailData(msgq)) //if we could not load mail to memory, consider this mail deleted and do not display it - continue; - } - else Loaded = true; - - if (((hListView != nullptr) && (msgq->Flags & YAMN_MSG_DISPLAY)) || - ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (msgq->Flags & YAMN_MSG_POPUP) && (msgq->Flags & YAMN_MSG_NEW))) { - - if (!Extracted) ExtractHeader(msgq->MailData->TranslatedHeader, msgq->MailData->CP, &UnicodeHeader); - Extracted = TRUE; - - if ((UnicodeHeader.From != nullptr) && (UnicodeHeader.FromNick != nullptr)) { - size_t size = mir_wstrlen(UnicodeHeader.From) + mir_wstrlen(UnicodeHeader.FromNick) + 4; - FromStr = new wchar_t[size]; - mir_snwprintf(FromStr, size, L"%s <%s>", UnicodeHeader.FromNick, UnicodeHeader.From); - FromStrNew = TRUE; - } - else if (UnicodeHeader.From != nullptr) - FromStr = UnicodeHeader.From; - else if (UnicodeHeader.FromNick != nullptr) - FromStr = UnicodeHeader.FromNick; - else if (UnicodeHeader.ReturnPath != nullptr) - FromStr = UnicodeHeader.ReturnPath; - - if (nullptr == FromStr) { - FromStr = L""; - FromStrNew = FALSE; - } - } - - if ((hListView != nullptr) && (msgq->Flags & YAMN_MSG_DISPLAY)) { - item.iSubItem = 0; - item.pszText = FromStr; - item.iItem = SendMessage(hListView, LVM_INSERTITEM, 0, (LPARAM)&item); - - item.iSubItem = 1; - item.pszText = (nullptr != UnicodeHeader.Subject ? UnicodeHeader.Subject : (wchar_t *)L""); - SendMessage(hListView, LVM_SETITEMTEXT, (WPARAM)item.iItem, (LPARAM)&item); - - item.iSubItem = 2; - mir_snwprintf(SizeStr, L"%d kB", msgq->MailData->Size / 1024); - item.pszText = SizeStr; - SendMessage(hListView, LVM_SETITEMTEXT, (WPARAM)item.iItem, (LPARAM)&item); - - item.iSubItem = 3; - item.pszText = L""; - - for (CMimeItem *heads = msgq->MailData->TranslatedHeader; heads != nullptr; heads = heads->Next) { - if (!_stricmp(heads->name, "Date")) { - MimeDateToLocalizedDateTime(heads->value, LocalDateStr, 128); - item.pszText = LocalDateStr; - break; - } - } - SendMessage(hListView, LVM_SETITEMTEXT, (WPARAM)item.iItem, (LPARAM)&item); - } - - if ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (msgq->Flags & YAMN_MSG_POPUP) && (msgq->Flags & YAMN_MSG_NEW)) { - mir_wstrncpy(NewMailPopup.lpwzContactName, FromStr, _countof(NewMailPopup.lpwzContactName)); - mir_wstrncpy(NewMailPopup.lpwzText, UnicodeHeader.Subject, _countof(NewMailPopup.lpwzText)); - - PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM)malloc(sizeof(YAMN_MAILSHOWPARAM)); - if (MailParam) { - MailParam->account = ActualAccount; - MailParam->mail = msgq; - MailParam->ThreadRunningEV = nullptr; - NewMailPopup.PluginData = MailParam; - PUAddPopupW(&NewMailPopup); - } - } - - if ((msgq->Flags & YAMN_MSG_UNSEEN) && (ActualAccount->NewMailN.Flags & YAMN_ACC_KBN)) - CallService(MS_KBDNOTIFY_EVENTSOPENED, 1, NULL); - - if (FromStrNew) - delete[] FromStr; - - if (Extracted) { - DeleteHeaderContent(&UnicodeHeader); - memset(&UnicodeHeader, 0, sizeof(UnicodeHeader)); - } - - if (!Loaded) { - SaveMailData(msgq); - UnloadMailData(msgq); //do not keep data for mail in memory - } - } - - return TRUE; -} - -void DoMailActions(HWND hDlg, CAccount *ActualAccount, struct CMailNumbers *MN, uint32_t nflags, uint32_t nnflags) -{ - NOTIFYICONDATA nid = {}; - nid.cbSize = sizeof(nid); - nid.hWnd = hDlg; - - if (MN->Real.EventNC + MN->Virtual.EventNC) - NotifyEventHooks(hNewMailHook, 0, 0); - - if ((nflags & YAMN_ACC_KBN) && (MN->Real.PopupRun + MN->Virtual.PopupRun)) - CallService(MS_KBDNOTIFY_STARTBLINK, (WPARAM)MN->Real.PopupNC + MN->Virtual.PopupNC, NULL); - - if ((nflags & YAMN_ACC_CONT) && (MN->Real.PopupRun + MN->Virtual.PopupRun)) { - wchar_t tszMsg[250]; - mir_snwprintf(tszMsg, TranslateT("%s : %d new mail message(s), %d total"), _A2T(ActualAccount->Name).get(), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC); - - if (!(nflags & YAMN_ACC_CONTNOEVENT)) { - CLISTEVENT evt = {}; - evt.flags = CLEF_UNICODE; - evt.hContact = ActualAccount->hContact; - evt.hIcon = g_plugin.getIcon(IDI_NEWMAIL); - evt.hDbEvent = ActualAccount->hContact; - evt.lParam = ActualAccount->hContact; - evt.pszService = MS_YAMN_CLISTDBLCLICK; - evt.szTooltip.w = tszMsg; - g_clistApi.pfnAddEvent(&evt); - } - db_set_ws(ActualAccount->hContact, "CList", "StatusMsg", tszMsg); - - if (nflags & YAMN_ACC_CONTNICK) - g_plugin.setWString(ActualAccount->hContact, "Nick", tszMsg); - } - - if ((nflags & YAMN_ACC_POP) && - !(ActualAccount->Flags & YAMN_ACC_POPN) && - (MN->Real.PopupRun + MN->Virtual.PopupRun)) { - POPUPDATAW NewMailPopup; - - NewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount; - NewMailPopup.lchIcon = g_plugin.getIcon(IDI_NEWMAIL); - if (nflags & YAMN_ACC_POPC) { - NewMailPopup.colorBack = ActualAccount->NewMailN.PopupB; - NewMailPopup.colorText = ActualAccount->NewMailN.PopupT; - } - else { - NewMailPopup.colorBack = GetSysColor(COLOR_BTNFACE); - NewMailPopup.colorText = GetSysColor(COLOR_WINDOWTEXT); - } - NewMailPopup.iSeconds = ActualAccount->NewMailN.PopupTime; - - NewMailPopup.PluginWindowProc = NewMailPopupProc; - NewMailPopup.PluginData = (void *)nullptr; //multiple popups - - mir_wstrncpy(NewMailPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(NewMailPopup.lpwzContactName)); - mir_snwprintf(NewMailPopup.lpwzText, TranslateT("%d new mail message(s), %d total"), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC); - PUAddPopupW(&NewMailPopup); - } - - // destroy tray icon if no new mail - if ((MN->Real.SysTrayUC + MN->Virtual.SysTrayUC == 0) && (hDlg != nullptr)) - Shell_NotifyIcon(NIM_DELETE, &nid); - - // and remove the event - if ((nflags & YAMN_ACC_CONT) && (!(nflags & YAMN_ACC_CONTNOEVENT)) && (MN->Real.UnSeen + MN->Virtual.UnSeen == 0)) - g_clistApi.pfnRemoveEvent(ActualAccount->hContact, ActualAccount->hContact); - - if ((MN->Real.BrowserUC + MN->Virtual.BrowserUC == 0) && (hDlg != nullptr)) { - if (!IsWindowVisible(hDlg) && !(nflags & YAMN_ACC_MSG)) - PostMessage(hDlg, WM_DESTROY, 0, 0); //destroy window if no new mail and window is not visible - if (nnflags & YAMN_ACC_MSG) //if no new mail and msg should be executed - { - SetForegroundWindow(hDlg); - ShowWindow(hDlg, SW_SHOWNORMAL); - } - } - else - if (hDlg != nullptr) //else insert icon and set window if new mails - { - SendDlgItemMessageW(hDlg, IDC_LISTMAILS, LVM_SCROLL, 0, (LPARAM)0x7ffffff); - - if ((nflags & YAMN_ACC_ICO) && (MN->Real.SysTrayUC + MN->Virtual.SysTrayUC)) { - nid.hIcon = g_plugin.getIcon(IDI_NEWMAIL); - nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; - nid.uCallbackMessage = WM_YAMN_NOTIFYICON; - mir_snwprintf(nid.szTip, L"%S %s", ActualAccount->Name, TranslateT("- new mail message(s)")); - Shell_NotifyIcon(NIM_ADD, &nid); - SetTimer(hDlg, TIMER_FLASHING, 500, nullptr); - } - if (nflags & YAMN_ACC_MSG) //if no new mail and msg should be executed - ShowWindow(hDlg, SW_SHOWNORMAL); - } - - if (MN->Real.AppNC + MN->Virtual.AppNC != 0) { - if (nflags & YAMN_ACC_APP) { - PROCESS_INFORMATION pi; - STARTUPINFOW si; - memset(&si, 0, sizeof(si)); - si.cb = sizeof(si); - - if (ActualAccount->NewMailN.App != nullptr) { - wchar_t *Command; - if (ActualAccount->NewMailN.AppParam != nullptr) - Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6]; - else - Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + 6]; - - if (Command != nullptr) { - mir_wstrcpy(Command, L"\""); - mir_wstrcat(Command, ActualAccount->NewMailN.App); - mir_wstrcat(Command, L"\" "); - if (ActualAccount->NewMailN.AppParam != nullptr) - mir_wstrcat(Command, ActualAccount->NewMailN.AppParam); - CreateProcessW(nullptr, Command, nullptr, nullptr, FALSE, NORMAL_PRIORITY_CLASS, nullptr, nullptr, &si, &pi); - delete[] Command; - } - } - } - } - - if (MN->Real.SoundNC + MN->Virtual.SoundNC != 0) - if (nflags & YAMN_ACC_SND) - Skin_PlaySound(YAMN_NEWMAILSOUND); - - if ((nnflags & YAMN_ACC_POP) && (MN->Real.PopupRun + MN->Virtual.PopupRun == 0)) { - POPUPDATAW NoNewMailPopup = {}; - - NoNewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount; - NoNewMailPopup.lchIcon = g_plugin.getIcon(IDI_LAUNCHAPP); - if (nflags & YAMN_ACC_POPC) { - NoNewMailPopup.colorBack = ActualAccount->NoNewMailN.PopupB; - NoNewMailPopup.colorText = ActualAccount->NoNewMailN.PopupT; - } - else { - NoNewMailPopup.colorBack = GetSysColor(COLOR_BTNFACE); - NoNewMailPopup.colorText = GetSysColor(COLOR_WINDOWTEXT); - } - NoNewMailPopup.iSeconds = ActualAccount->NoNewMailN.PopupTime; - - NoNewMailPopup.PluginWindowProc = NoNewMailPopupProc; - NoNewMailPopup.PluginData = nullptr; //it's not new mail popup - - mir_wstrncpy(NoNewMailPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(NoNewMailPopup.lpwzContactName)); - if (MN->Real.PopupSL2NC + MN->Virtual.PopupSL2NC) - mir_snwprintf(NoNewMailPopup.lpwzText, TranslateT("No new mail message, %d spam(s)"), MN->Real.PopupSL2NC + MN->Virtual.PopupSL2NC); - else - mir_wstrncpy(NoNewMailPopup.lpwzText, TranslateT("No new mail message"), _countof(NoNewMailPopup.lpwzText)); - PUAddPopupW(&NoNewMailPopup); - } - - if ((nflags & YAMN_ACC_CONT) && (MN->Real.PopupRun + MN->Virtual.PopupRun == 0)) { - if (ActualAccount->hContact != NULL) { - if (MN->Real.PopupTC + MN->Virtual.PopupTC) { - char tmp[255]; - mir_snprintf(tmp, Translate("%d new mail message(s), %d total"), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC); - db_set_s(ActualAccount->hContact, "CList", "StatusMsg", tmp); - } - else db_set_s(ActualAccount->hContact, "CList", "StatusMsg", Translate("No new mail message")); - - if (nflags & YAMN_ACC_CONTNICK) - g_plugin.setString(ActualAccount->hContact, "Nick", ActualAccount->Name); - } - } - return; -} - -LRESULT CALLBACK NewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - INT_PTR PluginParam = 0; - switch (msg) { - case WM_COMMAND: - // if clicked and it's new mail popup window - if ((HIWORD(wParam) == STN_CLICKED) && (-1 != (PluginParam = (INT_PTR)PUGetPluginData(hWnd)))) { - MCONTACT hContact = 0; - CAccount *Account; - if (PluginParam) { - PYAMN_MAILSHOWPARAM MailParam = new YAMN_MAILSHOWPARAM; - memcpy(MailParam, (PINT_PTR)PluginParam, sizeof(YAMN_MAILSHOWPARAM)); - hContact = MailParam->account->hContact; - Account = MailParam->account; - mir_forkthread(ShowEmailThread, MailParam); - } - else { - DBVARIANT dbv; - - hContact = PUGetContact(hWnd); - - if (!g_plugin.getString(hContact, "Id", &dbv)) { - Account = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); - db_free(&dbv); - } - else Account = (CAccount *)hContact; //???? - - if (WAIT_OBJECT_0 == WaitToReadFcn(Account->AccountAccessSO)) { - switch (msg) { - case WM_COMMAND: - { - YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, Account, - (Account->NewMailN.Flags & ~YAMN_ACC_POP) | YAMN_ACC_MSGP | YAMN_ACC_MSG, - (Account->NoNewMailN.Flags & ~YAMN_ACC_POP) | YAMN_ACC_MSGP | YAMN_ACC_MSG}; - - RunMailBrowserSvc((WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); - } - break; - } - ReadDoneFcn(Account->AccountAccessSO); - } - } - if ((Account->NewMailN.Flags & YAMN_ACC_CONT) && !(Account->NewMailN.Flags & YAMN_ACC_CONTNOEVENT)) - g_clistApi.pfnRemoveEvent(hContact, hContact); - } - __fallthrough; - - case WM_CONTEXTMENU: - PUDeletePopup(hWnd); - break; - case UM_FREEPLUGINDATA: - { - PYAMN_MAILSHOWPARAM mpd = (PYAMN_MAILSHOWPARAM)PUGetPluginData(hWnd); - if ((mpd) && (INT_PTR)mpd != -1)free(mpd); - return FALSE; - } - case UM_INITPOPUP: - //This is the equivalent to WM_INITDIALOG you'd get if you were the maker of dialog popups. - WindowList_Add(YAMNVar.MessageWnds, hWnd); - break; - case UM_DESTROYPOPUP: - WindowList_Remove(YAMNVar.MessageWnds, hWnd); - break; - case WM_YAMN_STOPACCOUNT: - { - CAccount *ActualAccount; - DBVARIANT dbv; - - MCONTACT hContact = PUGetContact(hWnd); - - if (!g_plugin.getString(hContact, "Id", &dbv)) { - ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); - db_free(&dbv); - } - else - ActualAccount = (CAccount *)hContact; - - if ((CAccount *)wParam != ActualAccount) - break; - DestroyWindow(hWnd); - return 0; - } - case WM_NOTIFY: - default: - break; - } - return DefWindowProc(hWnd, msg, wParam, lParam); -} - -LRESULT CALLBACK NoNewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_COMMAND: - if ((HIWORD(wParam) == STN_CLICKED) && (msg == WM_COMMAND)) { - CAccount *ActualAccount; - DBVARIANT dbv; - - MCONTACT hContact = PUGetContact(hWnd); - - if (!g_plugin.getString(hContact, "Id", &dbv)) { - ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); - db_free(&dbv); - } - else - ActualAccount = (CAccount *)hContact; - - if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { - switch (msg) { - case WM_COMMAND: - { - YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, ActualAccount, ActualAccount->NewMailN.Flags, ActualAccount->NoNewMailN.Flags, nullptr}; - - Param.nnflags = Param.nnflags | YAMN_ACC_MSG; //show mails in account even no new mail in account - Param.nnflags = Param.nnflags & ~YAMN_ACC_POP; - - Param.nflags = Param.nflags | YAMN_ACC_MSG; //show mails in account even no new mail in account - Param.nflags = Param.nflags & ~YAMN_ACC_POP; - - RunMailBrowserSvc((WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); - } - break; - } - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - PUDeletePopup(hWnd); - } - break; - - case WM_CONTEXTMENU: - PUDeletePopup(hWnd); - break; - - case UM_FREEPLUGINDATA: - //Here we'd free our own data, if we had it. - return FALSE; - case UM_INITPOPUP: - //This is the equivalent to WM_INITDIALOG you'd get if you were the maker of dialog popups. - WindowList_Add(YAMNVar.MessageWnds, hWnd); - break; - case UM_DESTROYPOPUP: - WindowList_Remove(YAMNVar.MessageWnds, hWnd); - break; - case WM_YAMN_STOPACCOUNT: - { - CAccount *ActualAccount; - DBVARIANT dbv; - - MCONTACT hContact = PUGetContact(hWnd); - - if (!g_plugin.getString(hContact, "Id", &dbv)) { - ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); - db_free(&dbv); - } - else - ActualAccount = (CAccount *)hContact; - - if ((CAccount *)wParam != ActualAccount) - break; - - DestroyWindow(hWnd); - return 0; - } - } - return DefWindowProc(hWnd, msg, wParam, lParam); -} - -#ifdef __GNUC__ -//number of 100 ns periods between FILETIME 0 (1601/01/01 00:00:00.0000000) and TIMESTAMP 0 (1970/01/01 00:00:00) -#define NUM100NANOSEC 116444736000000000ULL -//The biggest time Get[Date|Time]Format can handle (Fri, 31 Dec 30827 23:59:59.9999999) -#define MAXFILETIME 0x7FFF35F4F06C7FFFULL -#else -#define NUM100NANOSEC 116444736000000000 -#define MAXFILETIME 0x7FFF35F4F06C7FFF -#endif - -ULONGLONG MimeDateToFileTime(char *datein) -{ - char *day = nullptr, *month = nullptr, *year = nullptr, *time = nullptr, *shift = nullptr; - SYSTEMTIME st; - ULONGLONG res = 0; - int wShiftSeconds = TimeZone_ToLocal(0); - GetLocalTime(&st); - //datein = "Xxx, 1 Jan 2060 5:29:1 +0530 XXX"; - //datein = "Xxx, 1 Jan 2060 05:29:10 "; - //datein = " ManySpaces 1.5 Jan 2060 05::"; - //datein = "Xxx, 35 February 20 :29:10 "; - //datein = "01.12.2007 (22:38:17)"; // - if (datein) { - char tmp[64]; - while (datein[0] == ' ') datein++; // eat leading spaces - strncpy(tmp, datein, 63); tmp[63] = 0; - if (atoi(tmp)) { // Parseable integer on DayOfWeek field? Buggy mime date. - day = tmp; - } - else { - int i = 0; - while (tmp[i] == ' ')i++; if (day = strchr(&tmp[i], ' ')) { day[0] = 0; day++; } - } - if (day) { while (day[0] == ' ') day++; if (month = strchr(day, ' ')) { month[0] = 0; month++; } } - if (month) { while (month[0] == ' ')month++; if (year = strchr(month, ' ')) { year[0] = 0; year++; } } - if (year) { while (year[0] == ' ') year++; if (time = strchr(year, ' ')) { time[0] = 0; time++; } } - if (time) { while (time[0] == ' ') time++; if (shift = strchr(time, ' ')) { shift[0] = 0; shift++; shift[5] = 0; } } - - if (year) { - st.wYear = atoi(year); - if (mir_strlen(year) < 4) if (st.wYear < 70)st.wYear += 2000; else st.wYear += 1900; - }; - if (month) for (int i = 0; i < 12; i++) if (strncmp(month, s_MonthNames[i], 3) == 0) { st.wMonth = i + 1; break; } - if (day) st.wDay = atoi(day); - if (time) { - char *h, *m, *s; - h = time; - if (m = strchr(h, ':')) { - m[0] = 0; m++; - if (s = strchr(m, ':')) { s[0] = 0; s++; } - } - else s = nullptr; - st.wHour = atoi(h); - st.wMinute = m ? atoi(m) : 0; - st.wSecond = s ? atoi(s) : 0; - } - else { st.wHour = st.wMinute = st.wSecond = 0; } - - if (shift) { - if (mir_strlen(shift) < 4) { - //has only hour - wShiftSeconds = (atoi(shift)) * 3600; - } - else { - char *smin = shift + mir_strlen(shift) - 2; - int ismin = atoi(smin); - smin[0] = 0; - int ishour = atoi(shift); - wShiftSeconds = (ishour * 60 + (ishour < 0 ? -1 : 1) * ismin) * 60; - } - } - } // if (datein) - FILETIME ft; - if (SystemTimeToFileTime(&st, &ft)) { - res = ((ULONGLONG)ft.dwHighDateTime << 32) | ((ULONGLONG)ft.dwLowDateTime); - LONGLONG w100nano = Int32x32To64((uint32_t)wShiftSeconds, 10000000); - res -= w100nano; - } - else { - res = 0; - } - return res; -} - -void FileTimeToLocalizedDateTime(LONGLONG filetime, wchar_t *dateout, int lendateout) -{ - int localeID = Langpack_GetDefaultLocale(); - //int localeID = MAKELCID(LANG_URDU, SORT_DEFAULT); - if (localeID == CALLSERVICE_NOTFOUND) localeID = LOCALE_USER_DEFAULT; - if (filetime > MAXFILETIME) filetime = MAXFILETIME; - else if (filetime <= 0) { - wcsncpy(dateout, TranslateT("Invalid"), lendateout); - return; - } - SYSTEMTIME st; - uint16_t wTodayYear = 0, wTodayMonth = 0, wTodayDay = 0; - FILETIME ft; - BOOL willShowDate = !(optDateTime & SHOWDATENOTODAY); - if (!willShowDate) { - GetLocalTime(&st); - wTodayYear = st.wYear; - wTodayMonth = st.wMonth; - wTodayDay = st.wDay; - } - ft.dwLowDateTime = (uint32_t)filetime; - ft.dwHighDateTime = (uint32_t)(filetime >> 32); - FILETIME localft; - if (!FileTimeToLocalFileTime(&ft, &localft)) { - // this should never happen - wcsncpy(dateout, L"Incorrect FileTime", lendateout); - } - else { - if (!FileTimeToSystemTime(&localft, &st)) { - // this should never happen - wcsncpy(dateout, L"Incorrect LocalFileTime", lendateout); - } - else { - dateout[lendateout - 1] = 0; - int templen = 0; - if (!willShowDate) willShowDate = (wTodayYear != st.wYear) || (wTodayMonth != st.wMonth) || (wTodayDay != st.wDay); - if (willShowDate) { - templen = GetDateFormatW(localeID, (optDateTime & SHOWDATELONG) ? DATE_LONGDATE : DATE_SHORTDATE, &st, nullptr, dateout, lendateout - 2); - dateout[templen - 1] = ' '; - } - if (templen < (lendateout - 1)) { - GetTimeFormatW(localeID, (optDateTime & SHOWDATENOSECONDS) ? TIME_NOSECONDS : 0, &st, nullptr, &dateout[templen], lendateout - templen - 1); - } - } - } -} - -void MimeDateToLocalizedDateTime(char *datein, wchar_t *dateout, int lendateout) -{ - ULONGLONG ft = MimeDateToFileTime(datein); - FileTimeToLocalizedDateTime(ft, dateout, lendateout); -} - -int CALLBACK ListViewCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) -{ - if (lParam1 == NULL || lParam2 == NULL) - return 0; - - int nResult = 0; - char *str1; - char *str2; - HYAMNMAIL email1 = (HYAMNMAIL)lParam1; - HYAMNMAIL email2 = (HYAMNMAIL)lParam2; - struct CShortHeader Header1; - struct CShortHeader Header2; - memset(&Header1, 0, sizeof(Header1)); - memset(&Header2, 0, sizeof(Header2)); - - try { - ExtractShortHeader(email1->MailData->TranslatedHeader, &Header1); - ExtractShortHeader(email2->MailData->TranslatedHeader, &Header2); - - switch ((int)lParamSort) { - case 0: //From - if (Header1.FromNick == nullptr) - str1 = Header1.From; - else str1 = Header1.FromNick; - - if (Header2.FromNick == nullptr) - str2 = Header2.From; - else str2 = Header2.FromNick; - - nResult = mir_strcmp(str1, str2); - - if (bFrom) nResult = -nResult; - break; - case 1: //Subject - if (Header1.Subject == nullptr) - str1 = " "; - else str1 = Header1.Subject; - - if (Header2.Subject == nullptr) - str2 = " "; - else str2 = Header2.Subject; - - nResult = mir_strcmp(str1, str2); - - if (bSub) nResult = -nResult; - break; - case 2: //Size - if (email1->MailData->Size == email2->MailData->Size) nResult = 0; - if (email1->MailData->Size > email2->MailData->Size) nResult = 1; - if (email1->MailData->Size < email2->MailData->Size) nResult = -1; - - if (bSize) nResult = -nResult; - break; - - case 3: //Date - { - ULONGLONG ts1 = 0, ts2 = 0; - ts1 = MimeDateToFileTime(Header1.Date); - ts2 = MimeDateToFileTime(Header2.Date); - if (ts1 > ts2) nResult = 1; - else if (ts1 < ts2) nResult = -1; - else nResult = 0; - } - if (bDate) nResult = -nResult; - break; - - default: - if (Header1.Subject == nullptr) str1 = " "; - else str1 = Header1.Subject; - - if (Header2.Subject == nullptr) str2 = " "; - else str2 = Header2.Subject; - - nResult = mir_strcmp(str1, str2); - break; - } - //MessageBox(NULL,str1,str2,0); - } - catch (...) { - } - - //free mem - DeleteShortHeaderContent(&Header1); - DeleteShortHeaderContent(&Header2); - return nResult; - -} - -HCURSOR hCurSplitNS, hCurSplitWE; -#define DM_SPLITTERMOVED (WM_USER+15) - -static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_NCHITTEST: - return HTCLIENT; - - case WM_SETCURSOR: - SetCursor(hCurSplitNS); - return TRUE; - - case WM_LBUTTONDOWN: - SetCapture(hwnd); - return 0; - - case WM_MOUSEMOVE: - if (GetCapture() == hwnd) { - RECT rc; - GetClientRect(hwnd, &rc); - SendMessage(GetParent(hwnd), DM_SPLITTERMOVED, (short)HIWORD(GetMessagePos()) + rc.bottom / 2, (LPARAM)hwnd); - } - return 0; - - case WM_LBUTTONUP: - ReleaseCapture(); - return 0; - } - return mir_callNextSubclass(hwnd, SplitterSubclassProc, msg, wParam, lParam); -} - -void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, uint32_t cp, int mode); -int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out); - -INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_INITDIALOG: - { - PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM)lParam; - wchar_t *iHeaderW = nullptr; - wchar_t *iValueW = nullptr; - int StrLen; - HWND hListView = GetDlgItem(hDlg, IDC_LISTHEADERS); - mir_subclassWindow(GetDlgItem(hDlg, IDC_SPLITTER), SplitterSubclassProc); - SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)MailParam); - Window_SetIcon_IcoLib(hDlg, g_plugin.getIconHandle(IDI_NEWMAIL)); - - ListView_SetUnicodeFormat(hListView, TRUE); - ListView_SetExtendedListViewStyle(hListView, LVS_EX_FULLROWSELECT); - - StrLen = MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Header"), -1, nullptr, 0); - iHeaderW = new wchar_t[StrLen + 1]; - MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Header"), -1, iHeaderW, StrLen); - - StrLen = MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Value"), -1, nullptr, 0); - iValueW = new wchar_t[StrLen + 1]; - MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Value"), -1, iValueW, StrLen); - - LVCOLUMN lvc0 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, 130, iHeaderW, 0, 0}; - LVCOLUMN lvc1 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, 400, iValueW, 0, 0}; - SendMessage(hListView, LVM_INSERTCOLUMN, 0, (LPARAM)&lvc0); - SendMessage(hListView, LVM_INSERTCOLUMN, 1, (LPARAM)&lvc1); - if (nullptr != iHeaderW) - delete[] iHeaderW; - if (nullptr != iValueW) - delete[] iValueW; - - SendMessage(hDlg, WM_YAMN_CHANGECONTENT, 0, (LPARAM)MailParam); - MoveWindow(hDlg, HeadPosX, HeadPosY, HeadSizeX, HeadSizeY, 0); - ShowWindow(hDlg, SW_SHOWNORMAL); - } - break; - - case WM_YAMN_CHANGECONTENT: - { - PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM) - (lParam ? lParam : GetWindowLongPtr(hDlg, DWLP_USER)); - HWND hListView = GetDlgItem(hDlg, IDC_LISTHEADERS); - HWND hEdit = GetDlgItem(hDlg, IDC_EDITBODY); - //do not redraw - SendMessage(hListView, WM_SETREDRAW, 0, 0); - ListView_DeleteAllItems(hListView); - struct CMimeItem *Header; - LVITEMW item; - item.mask = LVIF_TEXT | LVIF_PARAM; - wchar_t *From = nullptr, *Subj = nullptr; - char *contentType = nullptr, *transEncoding = nullptr, *body = nullptr; //should not be delete[]-ed - for (Header = MailParam->mail->MailData->TranslatedHeader; Header != nullptr; Header = Header->Next) { - wchar_t *str1 = nullptr; - wchar_t *str2 = nullptr; - wchar_t str_nul[2] = {0}; - if (!body) if (!_stricmp(Header->name, "Body")) { body = Header->value; continue; } - if (!contentType) if (!_stricmp(Header->name, "Content-Type")) contentType = Header->value; - if (!transEncoding) if (!_stricmp(Header->name, "Content-Transfer-Encoding")) transEncoding = Header->value; - //ConvertCodedStringToUnicode(Header->name,&str1,MailParam->mail->MailData->CP,1); - { - int streamsize = MultiByteToWideChar(20127, 0, Header->name, -1, nullptr, 0); - str1 = (wchar_t *)malloc(sizeof(wchar_t) * (streamsize + 1)); - MultiByteToWideChar(20127, 0, Header->name, -1, str1, streamsize);//US-ASCII - } - ConvertCodedStringToUnicode(Header->value, &str2, MailParam->mail->MailData->CP, 1); - if (!str2) { str2 = (wchar_t *)str_nul; }// the header value may be NULL - if (!From) if (!_stricmp(Header->name, "From")) { - From = new wchar_t[mir_wstrlen(str2) + 1]; - mir_wstrcpy(From, str2); - } - if (!Subj) if (!_stricmp(Header->name, "Subject")) { - Subj = new wchar_t[mir_wstrlen(str2) + 1]; - mir_wstrcpy(Subj, str2); - } - //if (!hasBody) if (!mir_strcmp(Header->name,"Body")) hasBody = true; - int count = 0; wchar_t **split = nullptr; - int ofs = 0; - while (str2[ofs]) { - if ((str2[ofs] == 0x266A) || (str2[ofs] == 0x25D9) || (str2[ofs] == 0x25CB) || - (str2[ofs] == 0x09) || (str2[ofs] == 0x0A) || (str2[ofs] == 0x0D))count++; - ofs++; - } - split = new wchar_t *[count + 1]; - count = 0; ofs = 0; - split[0] = str2; - while (str2[ofs]) { - if ((str2[ofs] == 0x266A) || (str2[ofs] == 0x25D9) || (str2[ofs] == 0x25CB) || - (str2[ofs] == 0x09) || (str2[ofs] == 0x0A) || (str2[ofs] == 0x0D)) { - if (str2[ofs - 1]) { - count++; - } - split[count] = (wchar_t *)(str2 + ofs + 1); - str2[ofs] = 0; - } - ofs++; - }; - - if (!_stricmp(Header->name, "From") || !_stricmp(Header->name, "To") || !_stricmp(Header->name, "Date") || !_stricmp(Header->name, "Subject")) - item.iItem = 0; - else - item.iItem = 999; - for (int i = 0; i <= count; i++) { - item.iSubItem = 0; - if (i == 0) - item.pszText = str1; - else { - item.iItem++; - item.pszText = nullptr; - } - item.iItem = SendMessage(hListView, LVM_INSERTITEM, 0, (LPARAM)&item); - item.iSubItem = 1; - item.pszText = str2 ? split[i] : nullptr; - SendMessage(hListView, LVM_SETITEMTEXT, (WPARAM)item.iItem, (LPARAM)&item); - } - delete[] split; - - if (str1) - free(str1); - if (str2 != (wchar_t *)str_nul) - free(str2); - } - if (body) { - wchar_t *bodyDecoded = nullptr; - char *localBody = nullptr; - if (contentType) { - if (!_strnicmp(contentType, "text", 4)) { - if (transEncoding) { - if (!_stricmp(transEncoding, "base64")) { - int size = (int)mir_strlen(body) * 3 / 4 + 5; - localBody = new char[size + 1]; - DecodeBase64(body, localBody, size); - } - else if (!_stricmp(transEncoding, "quoted-printable")) { - int size = (int)mir_strlen(body) + 2; - localBody = new char[size + 1]; - DecodeQuotedPrintable(body, localBody, size, FALSE); - } - } - } - else if (!_strnicmp(contentType, "multipart/", 10)) { - char *bondary = nullptr; - if (nullptr != (bondary = ExtractFromContentType(contentType, "boundary="))) { - bodyDecoded = ParseMultipartBody(body, bondary); - delete[] bondary; - } - } - } - if (!bodyDecoded)ConvertStringToUnicode(localBody ? localBody : body, MailParam->mail->MailData->CP, &bodyDecoded); - SetWindowTextW(hEdit, bodyDecoded); - delete[] bodyDecoded; - if (localBody) delete[] localBody; - SetFocus(hEdit); - } - if (!(MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED)) { - MailParam->mail->Flags |= YAMN_MSG_BODYREQUESTED; - CallService(MS_YAMN_ACCOUNTCHECK, (WPARAM)MailParam->account, 0); - } - else { - if (MailParam->mail->Flags & YAMN_MSG_UNSEEN) { - MailParam->mail->Flags &= ~YAMN_MSG_UNSEEN; //mark the message as seen - HWND hMailBrowser = WindowList_Find(YAMNVar.NewMailAccountWnd, (UINT_PTR)MailParam->account); - if (hMailBrowser) { - struct CChangeContent Params = {MailParam->account->NewMailN.Flags | YAMN_ACC_MSGP, MailParam->account->NoNewMailN.Flags | YAMN_ACC_MSGP}; - SendMessage(hMailBrowser, WM_YAMN_CHANGECONTENT, (WPARAM)MailParam->account, (LPARAM)&Params); - } - else UpdateMails(nullptr, MailParam->account, MailParam->account->NewMailN.Flags, MailParam->account->NoNewMailN.Flags); - } - } - ShowWindow(GetDlgItem(hDlg, IDC_SPLITTER), (MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED) ? SW_SHOW : SW_HIDE); - ShowWindow(hEdit, (MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED) ? SW_SHOW : SW_HIDE); - wchar_t *title = nullptr; - size_t size = (From ? mir_wstrlen(From) : 0) + (Subj ? mir_wstrlen(Subj) : 0) + 4; - title = new wchar_t[size]; - if (From && Subj) - mir_snwprintf(title, size, L"%s (%s)", Subj, From); - else if (From) - wcsncpy_s(title, size, From, _TRUNCATE); - else if (Subj) - wcsncpy_s(title, size, Subj, _TRUNCATE); - else - wcsncpy_s(title, size, L"none", _TRUNCATE); - if (Subj) delete[] Subj; - if (From) delete[] From; - SetWindowTextW(hDlg, title); - delete[] title; - // turn on redrawing - SendMessage(hListView, WM_SETREDRAW, 1, 0); - SendMessage(hDlg, WM_SIZE, 0, HeadSizeY << 16 | HeadSizeX); - } break; - - case WM_YAMN_STOPACCOUNT: - { - PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM) - (lParam ? lParam : GetWindowLongPtr(hDlg, DWLP_USER)); - - if (nullptr == MailParam) - break; - if ((CAccount *)wParam != MailParam->account) - break; - - DestroyWindow(hDlg); - } - return 1; - - case WM_CTLCOLORSTATIC: - // here should be check if this is our edittext control. - // but we have only one static control (for now); - SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); - SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); - return (INT_PTR)GetSysColorBrush(COLOR_WINDOW); - - case WM_DESTROY: - Window_FreeIcon_IcoLib(hDlg); - { - RECT coord; - if (GetWindowRect(hDlg, &coord)) { - HeadPosX = coord.left; - HeadSizeX = coord.right - coord.left; - HeadPosY = coord.top; - HeadSizeY = coord.bottom - coord.top; - } - - PostQuitMessage(1); - } - break; - - case WM_SYSCOMMAND: - switch (wParam) { - case SC_CLOSE: - DestroyWindow(hDlg); - break; - } - break; - - case WM_MOVE: - HeadPosX = LOWORD(lParam); //((LPRECT)lParam)->right-((LPRECT)lParam)->left; - HeadPosY = HIWORD(lParam); //((LPRECT)lParam)->bottom-((LPRECT)lParam)->top; - return 0; - - case DM_SPLITTERMOVED: - if ((HWND)lParam == GetDlgItem(hDlg, IDC_SPLITTER)) { - POINT pt; - pt.x = 0; - pt.y = wParam; - ScreenToClient(hDlg, &pt); - HeadSplitPos = (pt.y * 1000) / HeadSizeY;//+rc.bottom-rc.top; - if (HeadSplitPos >= 1000) HeadSplitPos = 999; - else if (HeadSplitPos <= 0) HeadSplitPos = 1; - else SendMessage(hDlg, WM_SIZE, 0, HeadSizeY << 16 | HeadSizeX); - } - return 0; - - case WM_SIZE: - if (wParam == SIZE_RESTORED) { - HWND hList = GetDlgItem(hDlg, IDC_LISTHEADERS); - HWND hEdit = GetDlgItem(hDlg, IDC_EDITBODY); - BOOL isBodyShown = ((PYAMN_MAILSHOWPARAM)(GetWindowLongPtr(hDlg, DWLP_USER)))->mail->Flags & YAMN_MSG_BODYRECEIVED; - HeadSizeX = LOWORD(lParam); //((LPRECT)lParam)->right-((LPRECT)lParam)->left; - HeadSizeY = HIWORD(lParam); //((LPRECT)lParam)->bottom-((LPRECT)lParam)->top; - int localSplitPos = (HeadSplitPos * HeadSizeY) / 1000; - int localSizeX; - RECT coord; - MoveWindow(GetDlgItem(hDlg, IDC_SPLITTER), 5, localSplitPos, HeadSizeX - 10, 2, TRUE); - MoveWindow(hEdit, 5, localSplitPos + 6, HeadSizeX - 10, HeadSizeY - localSplitPos - 11, TRUE); //where to put text window while resizing - MoveWindow(hList, 5, 5, HeadSizeX - 10, (isBodyShown ? localSplitPos : HeadSizeY) - 10, TRUE); //where to put headers list window while resizing - //if (changeX) { - if (GetClientRect(hList, &coord)) { - localSizeX = coord.right - coord.left; - } - else localSizeX = HeadSizeX; - LONG iNameWidth = ListView_GetColumnWidth(hList, 0); - ListView_SetColumnWidth(hList, 1, (localSizeX <= iNameWidth) ? 0 : (localSizeX - iNameWidth)); - //} - } - return 0; - - case WM_CONTEXTMENU: - if (GetWindowLongPtr((HWND)wParam, GWLP_ID) == IDC_LISTHEADERS) { - //MessageBox(0,"LISTHEADERS","Debug",0); - HWND hList = GetDlgItem(hDlg, IDC_LISTHEADERS); - POINT pt = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; - if (pt.x == -1) pt.x = 0; - if (pt.y == -1) pt.y = 0; - if (int numRows = ListView_GetItemCount(hList)) { - HMENU hMenu = CreatePopupMenu(); - AppendMenu(hMenu, MF_STRING, (UINT_PTR)1, TranslateT("Copy Selected")); - AppendMenu(hMenu, MF_STRING, (UINT_PTR)2, TranslateT("Copy All")); - AppendMenu(hMenu, MF_SEPARATOR, 0, nullptr); - AppendMenu(hMenu, MF_STRING, (UINT_PTR)0, TranslateT("Cancel")); - int nReturnCmd = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, nullptr); - DestroyMenu(hMenu); - if (nReturnCmd > 0) { - int courRow = 0; - size_t sizeNeeded = 0; - wchar_t headname[64] = {0}, headvalue[256] = {0}; - for (courRow = 0; courRow < numRows; courRow++) { - if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue; - ListView_GetItemText(hList, courRow, 0, headname, _countof(headname)); - ListView_GetItemText(hList, courRow, 1, headvalue, _countof(headvalue)); - size_t headnamelen = mir_wstrlen(headname); - if (headnamelen) sizeNeeded += 1 + headnamelen; - sizeNeeded += 3 + mir_wstrlen(headvalue); - } - if (sizeNeeded && OpenClipboard(hDlg)) { - EmptyClipboard(); - HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (sizeNeeded + 1) * sizeof(wchar_t)); - wchar_t *buff = (wchar_t *)GlobalLock(hData); - int courPos = 0; - for (courRow = 0; courRow < numRows; courRow++) { - if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue; - ListView_GetItemText(hList, courRow, 0, headname, _countof(headname)); - ListView_GetItemText(hList, courRow, 1, headvalue, _countof(headvalue)); - if (mir_wstrlen(headname)) courPos += mir_snwprintf(&buff[courPos], sizeNeeded + 1, L"%s:\t%s\r\n", headname, headvalue); - else courPos += mir_snwprintf(&buff[courPos], sizeNeeded + 1, L"\t%s\r\n", headvalue); - } - GlobalUnlock(hData); - - SetClipboardData(CF_UNICODETEXT, hData); - - CloseClipboard(); - } - } - } - } - break; // just in case - } - return 0; -} - -void __cdecl ShowEmailThread(void *Param) -{ - struct MailShowMsgWinParam MyParam = *(struct MailShowMsgWinParam *)Param; - - SCIncFcn(MyParam.account->UsingThreads); - - if (MyParam.mail->MsgWindow) { - //if (!BringWindowToTop(MyParam.mail->MsgWindow)) { - if (!SetForegroundWindow(MyParam.mail->MsgWindow)) { - SendMessage(MyParam.mail->MsgWindow, WM_DESTROY, 0, 0); - MyParam.mail->MsgWindow = nullptr; - goto CREADTEVIEWMESSAGEWINDOW; - } - - if (IsIconic(MyParam.mail->MsgWindow)) - OpenIcon(MyParam.mail->MsgWindow); - } - else { -CREADTEVIEWMESSAGEWINDOW: - MyParam.mail->MsgWindow = CreateDialogParamW(g_plugin.getInst(), MAKEINTRESOURCEW(IDD_DLGSHOWMESSAGE), nullptr, DlgProcYAMNShowMessage, (LPARAM)&MyParam); - WindowList_Add(YAMNVar.MessageWnds, MyParam.mail->MsgWindow); - MSG msg; - while (GetMessage(&msg, nullptr, 0, 0)) { - if (MyParam.mail->MsgWindow == nullptr || !IsDialogMessage(MyParam.mail->MsgWindow, &msg)) { /* Wine fix. */ - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - WindowList_Remove(YAMNVar.MessageWnds, MyParam.mail->MsgWindow); - MyParam.mail->MsgWindow = nullptr; - } - - SCDecFcn(MyParam.account->UsingThreads); - delete (struct MailShowMsgWinParam *)Param; -} - -INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - CAccount *ActualAccount; - int Items; - - switch (msg) { - case WM_INITDIALOG: - { - struct MailBrowserWinParam *MyParam = (struct MailBrowserWinParam *)lParam; - - ListView_SetUnicodeFormat(GetDlgItem(hDlg, IDC_LISTMAILS), TRUE); - ListView_SetExtendedListViewStyle(GetDlgItem(hDlg, IDC_LISTMAILS), LVS_EX_FULLROWSELECT); - - ActualAccount = MyParam->account; - struct CMailWinUserInfo *mwui = new struct CMailWinUserInfo; - mwui->Account = ActualAccount; - mwui->TrayIconState = 0; - mwui->UpdateMailsMessagesAccess = FALSE; - mwui->Seen = FALSE; - mwui->RunFirstTime = TRUE; - - SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)mwui); - if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) { - DestroyWindow(hDlg); - return FALSE; - } - - SetDlgItemText(hDlg, IDC_BTNAPP, TranslateT("Run application")); - SetDlgItemText(hDlg, IDC_BTNDEL, TranslateT("Delete selected")); - SetDlgItemText(hDlg, IDC_BTNCHECKALL, TranslateT("Select All")); - SetDlgItemText(hDlg, IDC_BTNOK, TranslateT("OK")); - - LVCOLUMN lvc0 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, FromWidth, TranslateT("From"), 0, 0}; - LVCOLUMN lvc1 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, SubjectWidth, TranslateT("Subject"), 0, 0}; - LVCOLUMN lvc2 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, SizeWidth, TranslateT("Size"), 0, 0}; - LVCOLUMN lvc3 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, SizeDate, TranslateT("Date"), 0, 0}; - SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMN, 0, (LPARAM)&lvc0); - SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMN, 1, (LPARAM)&lvc1); - SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMN, (WPARAM)2, (LPARAM)&lvc2); - SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMN, (WPARAM)3, (LPARAM)&lvc3); - - if ((ActualAccount->NewMailN.App != nullptr) && (mir_wstrlen(ActualAccount->NewMailN.App))) - EnableWindow(GetDlgItem(hDlg, IDC_BTNAPP), TRUE); - else - EnableWindow(GetDlgItem(hDlg, IDC_BTNAPP), FALSE); - - ReadDoneFcn(ActualAccount->AccountAccessSO); - - WindowList_Add(YAMNVar.MessageWnds, hDlg); - WindowList_Add(YAMNVar.NewMailAccountWnd, hDlg, (UINT_PTR)ActualAccount); - - { - wchar_t accstatus[512]; - GetStatusFcn(ActualAccount, accstatus); - SetDlgItemText(hDlg, IDC_STSTATUS, accstatus); - } - SetTimer(hDlg, TIMER_FLASHING, 500, nullptr); - - if (ActualAccount->hContact != NULL) - g_clistApi.pfnRemoveEvent(ActualAccount->hContact, (LPARAM)"yamn new mail message"); - - mir_subclassWindow(GetDlgItem(hDlg, IDC_LISTMAILS), ListViewSubclassProc); - } - break; - - case WM_DESTROY: - { - RECT coord; - LVCOLUMN ColInfo; - HYAMNMAIL Parser; - - Window_FreeIcon_IcoLib(hDlg); - - struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); - if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) - break; - ColInfo.mask = LVCF_WIDTH; - if (ListView_GetColumn(GetDlgItem(hDlg, IDC_LISTMAILS), 0, &ColInfo)) - FromWidth = ColInfo.cx; - if (ListView_GetColumn(GetDlgItem(hDlg, IDC_LISTMAILS), 1, &ColInfo)) - SubjectWidth = ColInfo.cx; - if (ListView_GetColumn(GetDlgItem(hDlg, IDC_LISTMAILS), 2, &ColInfo)) - SizeWidth = ColInfo.cx; - if (ListView_GetColumn(GetDlgItem(hDlg, IDC_LISTMAILS), 3, &ColInfo)) - SizeDate = ColInfo.cx; - - if (!YAMNVar.Shutdown && GetWindowRect(hDlg, &coord)) //the YAMNVar.Shutdown testing is because MMessagesAccessSO)) - break; - - //delete mails from queue, which are deleted from server (spam level 3 mails e.g.) - for (Parser = (HYAMNMAIL)ActualAccount->Mails; Parser != nullptr; Parser = Parser->Next) { - if ((Parser->Flags & YAMN_MSG_DELETED) && YAMN_MSG_SPAML(Parser->Flags, YAMN_MSG_SPAML3) && mwui->Seen) //if spaml3 was already deleted and user knows about it - { - DeleteMessageFromQueueFcn((HYAMNMAIL *)&ActualAccount->Mails, Parser, 1); - CallService(MS_YAMN_DELETEACCOUNTMAIL, (WPARAM)ActualAccount->Plugin, (LPARAM)Parser); - } - } - - //mark mails as read (remove "new" and "unseen" flags) - if (mwui->Seen) - SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_DISPLAY, 0, YAMN_MSG_NEW | YAMN_MSG_UNSEEN, 0); - - WriteDoneFcn(ActualAccount->MessagesAccessSO); - - NOTIFYICONDATA nid; - memset(&nid, 0, sizeof(NOTIFYICONDATA)); - - delete mwui; - SetWindowLongPtr(hDlg, DWLP_USER, NULL); - - nid.cbSize = sizeof(NOTIFYICONDATA); - nid.hWnd = hDlg; - nid.uID = 0; - Shell_NotifyIcon(NIM_DELETE, &nid); - PostQuitMessage(0); - } - break; - - case WM_SHOWWINDOW: - { - struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); - - if (mwui == nullptr) - return 0; - mwui->Seen = TRUE; - } - - case WM_YAMN_CHANGESTATUS: - if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) - break; - - if ((CAccount *)wParam != ActualAccount) - break; - - wchar_t accstatus[512]; - GetStatusFcn(ActualAccount, accstatus); - SetDlgItemText(hDlg, IDC_STSTATUS, accstatus); - return 1; - - case WM_YAMN_CHANGECONTENT: - { - struct CUpdateMails UpdateParams; - BOOL ThisThreadWindow = (GetCurrentThreadId() == GetWindowThreadProcessId(hDlg, nullptr)); - - if (nullptr == (UpdateParams.Copied = CreateEvent(nullptr, FALSE, FALSE, nullptr))) { - DestroyWindow(hDlg); - return 0; - } - UpdateParams.Flags = (struct CChangeContent *)lParam; - UpdateParams.Waiting = !ThisThreadWindow; - - if (ThisThreadWindow) { - if (!UpdateMails(hDlg, (CAccount *)wParam, UpdateParams.Flags->nflags, UpdateParams.Flags->nnflags)) - DestroyWindow(hDlg); - } - else if (PostMessage(hDlg, WM_YAMN_UPDATEMAILS, wParam, (LPARAM)&UpdateParams)) //this ensures UpdateMails will execute the thread who created the browser window - { - if (!ThisThreadWindow) - WaitForSingleObject(UpdateParams.Copied, INFINITE); - } - - CloseHandle(UpdateParams.Copied); - } - return 1; - case WM_YAMN_UPDATEMAILS: - { - struct CUpdateMails *um = (struct CUpdateMails *)lParam; - uint32_t nflags, nnflags; - - if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) - return 0; - if ((CAccount *)wParam != ActualAccount) - return 0; - - nflags = um->Flags->nflags; - nnflags = um->Flags->nnflags; - - if (um->Waiting) - SetEvent(um->Copied); - - if (!UpdateMails(hDlg, ActualAccount, nflags, nnflags)) - DestroyWindow(hDlg); - } - return 1; - case WM_YAMN_STOPACCOUNT: - if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) - break; - if ((CAccount *)wParam != ActualAccount) - break; - PostQuitMessage(0); - return 1; - - case WM_YAMN_NOTIFYICON: - if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) - break; - - switch (lParam) { - case WM_LBUTTONDBLCLK: - if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) { - return 0; - } - - if (ActualAccount->AbilityFlags & YAMN_ACC_BROWSE) { - ShowWindow(hDlg, SW_SHOWNORMAL); - SetForegroundWindow(hDlg); - } - else DestroyWindow(hDlg); - - ReadDoneFcn(ActualAccount->AccountAccessSO); - break; - } - break; - - case WM_YAMN_SHOWSELECTED: - { - int iSelect = SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_GETNEXTITEM, -1, MAKELPARAM((UINT)LVNI_FOCUSED, 0)); // return item selected - if (iSelect != -1) { - LV_ITEMW item; - - item.iItem = iSelect; - item.iSubItem = 0; - item.mask = LVIF_PARAM | LVIF_STATE; - item.stateMask = 0xFFFFFFFF; - ListView_GetItem(GetDlgItem(hDlg, IDC_LISTMAILS), &item); - HYAMNMAIL ActualMail = (HYAMNMAIL)item.lParam; - if (nullptr != ActualMail) { - PYAMN_MAILSHOWPARAM MailParam = new YAMN_MAILSHOWPARAM; - MailParam->account = GetWindowAccount(hDlg); - MailParam->mail = ActualMail; - mir_forkthread(ShowEmailThread, MailParam); - } - } - } - break; - - case WM_SYSCOMMAND: - if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) - break; - switch (wParam) { - case SC_CLOSE: - DestroyWindow(hDlg); - break; - } - break; - - case WM_COMMAND: - if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) - break; - - switch (LOWORD(wParam)) { - case IDC_BTNCHECKALL: - ListView_SetItemState(GetDlgItem(hDlg, IDC_LISTMAILS), -1, 0, LVIS_SELECTED); // deselect all items - ListView_SetItemState(GetDlgItem(hDlg, IDC_LISTMAILS), -1, LVIS_SELECTED, LVIS_SELECTED); - Items = ListView_GetItemCount(GetDlgItem(hDlg, IDC_LISTMAILS)); - ListView_RedrawItems(GetDlgItem(hDlg, IDC_LISTMAILS), 0, Items); - UpdateWindow(GetDlgItem(hDlg, IDC_LISTMAILS)); - SetFocus(GetDlgItem(hDlg, IDC_LISTMAILS)); - break; - - case IDC_BTNOK: - DestroyWindow(hDlg); - break; - - case IDC_BTNAPP: - { - PROCESS_INFORMATION pi; - STARTUPINFOW si; - - memset(&si, 0, sizeof(si)); - si.cb = sizeof(si); - - if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { - if (ActualAccount->NewMailN.App != nullptr) { - wchar_t *Command; - if (ActualAccount->NewMailN.AppParam != nullptr) - Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6]; - else - Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + 6]; - - if (Command != nullptr) { - mir_wstrcpy(Command, L"\""); - mir_wstrcat(Command, ActualAccount->NewMailN.App); - mir_wstrcat(Command, L"\" "); - if (ActualAccount->NewMailN.AppParam != nullptr) - mir_wstrcat(Command, ActualAccount->NewMailN.AppParam); - CreateProcessW(nullptr, Command, nullptr, nullptr, FALSE, NORMAL_PRIORITY_CLASS, nullptr, nullptr, &si, &pi); - delete[] Command; - } - } - - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - - if (!(GetKeyState(VK_SHIFT) & 0x8000) && !(GetKeyState(VK_CONTROL) & 0x8000)) - DestroyWindow(hDlg); - } - break; - - case IDC_BTNDEL: - { - HYAMNMAIL ActualMail; - uint32_t Total = 0; - - // we use event to signal, that running thread has all needed stack parameters copied - HANDLE ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr); - if (ThreadRunningEV == nullptr) - break; - - Items = ListView_GetItemCount(GetDlgItem(hDlg, IDC_LISTMAILS)); - - LVITEM item; - item.stateMask = 0xFFFFFFFF; - - if (WAIT_OBJECT_0 == WaitToWriteFcn(ActualAccount->MessagesAccessSO)) { - for (int i = 0; i < Items; i++) { - item.iItem = i; - item.iSubItem = 0; - item.mask = LVIF_PARAM | LVIF_STATE; - item.stateMask = 0xFFFFFFFF; - ListView_GetItem(GetDlgItem(hDlg, IDC_LISTMAILS), &item); - ActualMail = (HYAMNMAIL)item.lParam; - if (nullptr == ActualMail) - break; - if (item.state & LVIS_SELECTED) { - ActualMail->Flags |= YAMN_MSG_USERDELETE; //set to mail we are going to delete it - Total++; - } - } - - // Enable write-access to mails - WriteDoneFcn(ActualAccount->MessagesAccessSO); - - if (Total) { - wchar_t DeleteMsg[1024]; - - mir_snwprintf(DeleteMsg, TranslateT("Do you really want to delete %d selected mails?"), Total); - if (IDOK == MessageBox(hDlg, DeleteMsg, TranslateT("Delete confirmation"), MB_OKCANCEL | MB_ICONWARNING)) { - struct DeleteParam ParamToDeleteMails = {YAMN_DELETEVERSION, ThreadRunningEV, ActualAccount, nullptr}; - - // Find if there's mail marked to delete, which was deleted before - if (WAIT_OBJECT_0 == WaitToWriteFcn(ActualAccount->MessagesAccessSO)) { - for (ActualMail = (HYAMNMAIL)ActualAccount->Mails; ActualMail != nullptr; ActualMail = ActualMail->Next) { - if ((ActualMail->Flags & YAMN_MSG_DELETED) && ((ActualMail->Flags & YAMN_MSG_USERDELETE))) //if selected mail was already deleted - { - DeleteMessageFromQueueFcn((HYAMNMAIL *)&ActualAccount->Mails, ActualMail, 1); - CallService(MS_YAMN_DELETEACCOUNTMAIL, (WPARAM)ActualAccount->Plugin, (LPARAM)ActualMail); //delete it from memory - continue; - } - } - // Set flag to marked mails that they can be deleted - SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_DISPLAY | YAMN_MSG_USERDELETE, 0, YAMN_MSG_DELETEOK, 1); - // Create new thread which deletes marked mails. - HANDLE NewThread = mir_forkthread(ActualAccount->Plugin->Fcn->DeleteMailsFcnPtr, &ParamToDeleteMails); - if (NewThread != nullptr) - WaitForSingleObject(ThreadRunningEV, INFINITE); - - // Enable write-access to mails - WriteDoneFcn(ActualAccount->MessagesAccessSO); - } - } - else //else mark messages that they are not to be deleted - SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_DISPLAY | YAMN_MSG_USERDELETE, 0, YAMN_MSG_USERDELETE, 0); - } - } - CloseHandle(ThreadRunningEV); - if (g_plugin.getByte(YAMN_CLOSEDELETE, 0)) - DestroyWindow(hDlg); - } - break; - } - break; - - case WM_SIZE: - if (wParam == SIZE_RESTORED) { - LONG x = LOWORD(lParam); //((LPRECT)lParam)->right-((LPRECT)lParam)->left; - LONG y = HIWORD(lParam); //((LPRECT)lParam)->bottom-((LPRECT)lParam)->top; - MoveWindow(GetDlgItem(hDlg, IDC_BTNDEL), 5, y - 5 - 25, (x - 20) / 3, 25, TRUE); //where to put DELETE button while resizing - MoveWindow(GetDlgItem(hDlg, IDC_BTNCHECKALL), 10 + (x - 20) / 3, y - 5 - 25, (x - 20) / 6, 25, TRUE); //where to put CHECK ALL button while resizing - MoveWindow(GetDlgItem(hDlg, IDC_BTNAPP), 15 + (x - 20) / 3 + (x - 20) / 6, y - 5 - 25, (x - 20) / 3, 25, TRUE); //where to put RUN APP button while resizing - MoveWindow(GetDlgItem(hDlg, IDC_BTNOK), 20 + 2 * (x - 20) / 3 + (x - 20) / 6, y - 5 - 25, (x - 20) / 6, 25, TRUE); //where to put OK button while resizing - MoveWindow(GetDlgItem(hDlg, IDC_LISTMAILS), 5, 5, x - 10, y - 55, TRUE); //where to put list mail window while resizing - MoveWindow(GetDlgItem(hDlg, IDC_STSTATUS), 5, y - 5 - 45, x - 10, 15, TRUE); //where to put account status text while resizing - } - return 0; - - case WM_GETMINMAXINFO: - ((LPMINMAXINFO)lParam)->ptMinTrackSize.x = MAILBROWSER_MINXSIZE; - ((LPMINMAXINFO)lParam)->ptMinTrackSize.y = MAILBROWSER_MINYSIZE; - return 0; - - case WM_TIMER: - { - NOTIFYICONDATA nid; - struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); - - memset(&nid, 0, sizeof(nid)); - nid.cbSize = sizeof(NOTIFYICONDATA); - nid.hWnd = hDlg; - nid.uID = 0; - nid.uFlags = NIF_ICON; - if (mwui->TrayIconState == 0) - nid.hIcon = g_plugin.getIcon(IDI_CHECKMAIL); - else - nid.hIcon = g_plugin.getIcon(IDI_NEWMAIL); - Shell_NotifyIcon(NIM_MODIFY, &nid); - mwui->TrayIconState = !mwui->TrayIconState; - // UpdateWindow(hDlg); - } - break; - - case WM_NOTIFY: - switch (((LPNMHDR)lParam)->idFrom) { - case IDC_LISTMAILS: - switch (((LPNMHDR)lParam)->code) { - case NM_DBLCLK: - SendMessage(hDlg, WM_YAMN_SHOWSELECTED, 0, 0); - break; - - case LVN_COLUMNCLICK: - if (nullptr != (ActualAccount = GetWindowAccount(hDlg))) { - NM_LISTVIEW *pNMListView = (NM_LISTVIEW *)lParam; - if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { - switch ((int)pNMListView->iSubItem) { - case 0: - bFrom = !bFrom; - break; - case 1: - bSub = !bSub; - break; - case 2: - bSize = !bSize; - break; - case 3: - bDate = !bDate; - break; - default: - break; - } - ListView_SortItems(pNMListView->hdr.hwndFrom, ListViewCompareProc, pNMListView->iSubItem); - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - } - break; - - case NM_CUSTOMDRAW: - { - LPNMLVCUSTOMDRAW cd = (LPNMLVCUSTOMDRAW)lParam; - LONG_PTR PaintCode; - - if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) - break; - - switch (cd->nmcd.dwDrawStage) { - case CDDS_PREPAINT: - PaintCode = CDRF_NOTIFYITEMDRAW; - break; - case CDDS_ITEMPREPAINT: - PaintCode = CDRF_NOTIFYSUBITEMDRAW; - break; - case CDDS_ITEMPREPAINT | CDDS_SUBITEM: - { - BOOL umma; - { - struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); - umma = mwui->UpdateMailsMessagesAccess; - } - HYAMNMAIL ActualMail = (HYAMNMAIL)cd->nmcd.lItemlParam; - if (!ActualMail) - ActualMail = (HYAMNMAIL)readItemLParam(cd->nmcd.hdr.hwndFrom, cd->nmcd.dwItemSpec); - - if (!umma) - if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->MessagesAccessSO)) - return 0; - - switch (ActualMail->Flags & YAMN_MSG_SPAMMASK) { - case YAMN_MSG_SPAML1: - case YAMN_MSG_SPAML2: - cd->clrText = RGB(150, 150, 150); - break; - case YAMN_MSG_SPAML3: - cd->clrText = RGB(200, 200, 200); - cd->clrTextBk = RGB(160, 160, 160); - break; - case 0: - if (cd->nmcd.dwItemSpec & 1) - cd->clrTextBk = RGB(230, 230, 230); - break; - default: - break; - } - if (ActualMail->Flags & YAMN_MSG_UNSEEN) - cd->clrTextBk = RGB(220, 235, 250); - PaintCode = CDRF_DODEFAULT; - - if (!umma) - ReadDoneFcn(ActualAccount->MessagesAccessSO); - break; - } - default: - PaintCode = 0; - } - SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PaintCode); - return 1; - } - } - } - break; - - case WM_CONTEXTMENU: - if (GetWindowLongPtr((HWND)wParam, GWLP_ID) == IDC_LISTMAILS) { - //MessageBox(0,"LISTHEADERS","Debug",0); - HWND hList = GetDlgItem(hDlg, IDC_LISTMAILS); - POINT pt = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; - if (pt.x == -1) pt.x = 0; - if (pt.y == -1) pt.y = 0; - if (int numRows = ListView_GetItemCount(hList)) { - HMENU hMenu = CreatePopupMenu(); - AppendMenu(hMenu, MF_STRING, (UINT_PTR)1, TranslateT("Copy Selected")); - AppendMenu(hMenu, MF_STRING, (UINT_PTR)2, TranslateT("Copy All")); - AppendMenu(hMenu, MF_SEPARATOR, 0, nullptr); - AppendMenu(hMenu, MF_STRING, (UINT_PTR)0, TranslateT("Cancel")); - int nReturnCmd = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, nullptr); - DestroyMenu(hMenu); - if (nReturnCmd > 0) { - int courRow = 0; - size_t sizeNeeded = 0; - wchar_t from[128] = {0}, subject[256] = {0}, size[16] = {0}, date[64] = {0}; - for (courRow = 0; courRow < numRows; courRow++) { - if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue; - ListView_GetItemText(hList, courRow, 0, from, _countof(from)); - ListView_GetItemText(hList, courRow, 1, subject, _countof(subject)); - ListView_GetItemText(hList, courRow, 2, size, _countof(size)); - ListView_GetItemText(hList, courRow, 3, date, _countof(date)); - sizeNeeded += 5 + mir_wstrlen(from) + mir_wstrlen(subject) + mir_wstrlen(size) + mir_wstrlen(date); - } - if (sizeNeeded && OpenClipboard(hDlg)) { - EmptyClipboard(); - HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (sizeNeeded + 1) * sizeof(wchar_t)); - wchar_t *buff = (wchar_t *)GlobalLock(hData); - int courPos = 0; - for (courRow = 0; courRow < numRows; courRow++) { - if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue; - ListView_GetItemText(hList, courRow, 0, from, _countof(from)); - ListView_GetItemText(hList, courRow, 1, subject, _countof(subject)); - ListView_GetItemText(hList, courRow, 2, size, _countof(size)); - ListView_GetItemText(hList, courRow, 3, date, _countof(date)); - courPos += mir_snwprintf(&buff[courPos], sizeNeeded + 1, L"%s\t%s\t%s\t%s\r\n", from, subject, size, date); - } - GlobalUnlock(hData); - - SetClipboardData(CF_UNICODETEXT, hData); - - CloseClipboard(); - } - } - } - } - break; // just in case - } - return 0; -} - -LRESULT CALLBACK ListViewSubclassProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - HWND hwndParent = GetParent(hDlg); - - switch (msg) { - case WM_GETDLGCODE: - { - LPMSG lpmsg = (LPMSG)lParam; - if (lpmsg != nullptr) { - if (lpmsg->message == WM_KEYDOWN - && lpmsg->wParam == VK_RETURN) - return DLGC_WANTALLKEYS; - } - } - break; - - case WM_KEYDOWN: - { - BOOL isCtrl = GetKeyState(VK_CONTROL) & 0x8000; - BOOL isShift = GetKeyState(VK_SHIFT) & 0x8000; - BOOL isAlt = GetKeyState(VK_MENU) & 0x8000; - - switch (wParam) { - case 'A': // ctrl-a - if (!isAlt && !isShift && isCtrl) SendMessage(hwndParent, WM_COMMAND, IDC_BTNCHECKALL, 0); - break; - case VK_RETURN: - case VK_SPACE: - if (!isAlt && !isShift && !isCtrl) SendMessage(hwndParent, WM_YAMN_SHOWSELECTED, 0, 0); - break; - case VK_DELETE: - SendMessage(hwndParent, WM_COMMAND, IDC_BTNDEL, 0); - break; - } - } - break; - } - return mir_callNextSubclass(hDlg, ListViewSubclassProc, msg, wParam, lParam); -} - -void __cdecl MailBrowser(void *Param) -{ - MSG msg; - - HWND hMailBrowser; - BOOL WndFound = FALSE; - - struct MailBrowserWinParam MyParam = *(struct MailBrowserWinParam *)Param; - CAccount *ActualAccount = MyParam.account; - SCIncFcn(ActualAccount->UsingThreads); - - // we will not use params in stack anymore - SetEvent(MyParam.ThreadRunningEV); - - __try { - if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) - return; - - if (!(ActualAccount->AbilityFlags & YAMN_ACC_BROWSE)) { - MyParam.nflags = MyParam.nflags & ~YAMN_ACC_MSG; - MyParam.nnflags = MyParam.nnflags & ~YAMN_ACC_MSG; - } - - if (!(ActualAccount->AbilityFlags & YAMN_ACC_POPUP)) - MyParam.nflags = MyParam.nflags & ~YAMN_ACC_POP; - - ReadDoneFcn(ActualAccount->AccountAccessSO); - - if (nullptr != (hMailBrowser = WindowList_Find(YAMNVar.NewMailAccountWnd, (UINT_PTR)ActualAccount))) - WndFound = TRUE; - - if ((hMailBrowser == nullptr) && ((MyParam.nflags & YAMN_ACC_MSG) || (MyParam.nflags & YAMN_ACC_ICO) || (MyParam.nnflags & YAMN_ACC_MSG))) { - hMailBrowser = CreateDialogParamW(g_plugin.getInst(), MAKEINTRESOURCEW(IDD_DLGVIEWMESSAGES), nullptr, DlgProcYAMNMailBrowser, (LPARAM)&MyParam); - Window_SetIcon_IcoLib(hMailBrowser, g_plugin.getIconHandle(IDI_NEWMAIL)); - MoveWindow(hMailBrowser, PosX, PosY, SizeX, SizeY, TRUE); - } - - if (hMailBrowser != nullptr) { - struct CChangeContent Params = {MyParam.nflags, MyParam.nnflags}; //if this thread created window, just post message to update mails - - SendMessage(hMailBrowser, WM_YAMN_CHANGECONTENT, (WPARAM)ActualAccount, (LPARAM)&Params); //we ensure this will do the thread who created the browser window - } - else - UpdateMails(nullptr, ActualAccount, MyParam.nflags, MyParam.nnflags); //update mails without displaying or refreshing any window - - if ((hMailBrowser != nullptr) && !WndFound) { //we process message loop only for thread that created window - while (GetMessage(&msg, nullptr, 0, 0)) { - if (hMailBrowser == nullptr || !IsDialogMessage(hMailBrowser, &msg)) { /* Wine fix. */ - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - - if ((!WndFound) && (ActualAccount->Plugin->Fcn != nullptr) && (ActualAccount->Plugin->Fcn->WriteAccountsFcnPtr != nullptr) && ActualAccount->AbleToWork) - ActualAccount->Plugin->Fcn->WriteAccountsFcnPtr(); - } - __finally { - SCDecFcn(ActualAccount->UsingThreads); - } -} - -INT_PTR RunMailBrowserSvc(WPARAM wParam, LPARAM lParam) -{ - PYAMN_MAILBROWSERPARAM Param = (PYAMN_MAILBROWSERPARAM)wParam; - - if ((uint32_t)lParam != YAMN_MAILBROWSERVERSION) - return 0; - - //an event for successfull copy parameters to which point a pointer in stack for new thread - HANDLE ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr); - Param->ThreadRunningEV = ThreadRunningEV; - - HANDLE NewThread = mir_forkthread(MailBrowser, Param); - if (NewThread != nullptr) - WaitForSingleObject(ThreadRunningEV, INFINITE); - - CloseHandle(ThreadRunningEV); - return 1; -} +/* + * This code implements window handling (new mail) + * + * (c) majvan 2002-2004 + */ + /* There can be problems when compiling this file, because in this file + * we are using both unicode and no-unicode functions and compiler does not + * like it in one file + * When you got errors, try to comment the #define and compile, then + * put it back to uncommented and compile again :) + */ + +#include "../stdafx.h" + +#define TIMER_FLASHING 0x09061979 +#define MAILBROWSER_MINXSIZE 200 //min size of mail browser window +#define MAILBROWSER_MINYSIZE 130 + +#define MAILBROWSERTITLE LPGEN("%s - %d new mail messages, %d total") + +void __cdecl ShowEmailThread(void *Param); + +//-------------------------------------------------------------------------------------------------- +char *s_MonthNames[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; +bool bDate = false, bSub = false, bSize = false, bFrom = false; +int PosX = 0, PosY = 0, SizeX = 460, SizeY = 100; +int HeadSizeX = 0x2b2, HeadSizeY = 0x0b5, HeadPosX = 100, HeadPosY = 100; +int HeadSplitPos = 250; // per-mils of the size +static int FromWidth = 250, SubjectWidth = 280, SizeWidth = 50, SizeDate = 205; +unsigned char optDateTime = (SHOWDATELONG | SHOWDATENOTODAY); + +struct CMailNumbersSub +{ + int Total; //any mail + int New; //uses YAMN_MSG_NEW flag + int UnSeen; //uses YAMN_MSG_UNSEEN flag + // int Browser; //uses YAMN_MSG_BROWSER flag + int BrowserUC; //uses YAMN_MSG_BROWSER flag and YAMN_MSG_UNSEEN flag + int Display; //uses YAMN_MSG_DISPLAY flag + int DisplayTC; //uses YAMN_MSG_DISPLAY flag and YAMN_MSG_DISPLAYC flag + int DisplayUC; //uses YAMN_MSG_DISPLAY flag and YAMN_MSG_DISPLAYC flag and YAMN_MSG_UNSEEN flag + int Popup; //uses YAMN_MSG_POPUP flag + int PopupTC; //uses YAMN_MSG_POPUPC flag + int PopupNC; //uses YAMN_MSG_POPUPC flag and YAMN_MSG_NEW flag + int PopupRun; //uses YAMN_MSG_POPUP flag and YAMN_MSG_NEW flag + int PopupSL2NC; //uses YAMN_MSG_SPAML2 flag and YAMN_MSG_NEW flag + int PopupSL3NC; //uses YAMN_MSG_SPAML3 flag and YAMN_MSG_NEW flag + // int SysTray; //uses YAMN_MSG_SYSTRAY flag + int SysTrayUC; //uses YAMN_MSG_SYSTRAY flag and YAMN_MSG_UNSEEN flag + // int Sound; //uses YAMN_MSG_SOUND flag + int SoundNC; //uses YAMN_MSG_SOUND flag and YAMN_MSG_NEW flag + // int App; //uses YAMN_MSG_APP flag + int AppNC; //uses YAMN_MSG_APP flag and YAMN_MSG_NEW flag + int EventNC; //uses YAMN_MSG_NEVENT flag and YAMN_MSG_NEW flag +}; + +struct CMailNumbers +{ + struct CMailNumbersSub Real; + struct CMailNumbersSub Virtual; +}; + +struct CMailWinUserInfo +{ + CAccount *Account; + int TrayIconState; + BOOL UpdateMailsMessagesAccess; + BOOL Seen; + BOOL RunFirstTime; +}; + +struct CChangeContent +{ + uint32_t nflags; + uint32_t nnflags; +}; + +struct CUpdateMails +{ + struct CChangeContent *Flags; + BOOL Waiting; + HANDLE Copied; +}; + +struct CSortList +{ + HWND hDlg; + int iSubItem; +}; + +// Retrieves CAccount *, whose mails are displayed in ListMails +// hLM- handle of dialog window +// returns handle of account +inline CAccount *GetWindowAccount(HWND hDialog); + +// Looks to mail flags and increment mail counter (e.g. if mail is new, increments the new mail counter +// msgq- mail, which increments the counters +// MN- counnters structure +void IncrementMailCounters(HYAMNMAIL msgq, struct CMailNumbers *MN); + +enum +{ + UPDATE_FAIL = 0, //function failed + UPDATE_NONE, //none update has been performed + UPDATE_OK, //some changes occured, update performed +}; + +// Just looks for mail changes in account and update the mail browser window +// hDlg- dialog handle +// ActualAccount- account handle +// nflags- flags what to do when new mail arrives +// nnflags- flags what to do when no new mail arrives +// returns one of UPDATE_XXX value(not implemented yet) +int UpdateMails(HWND hDlg, CAccount *ActualAccount, uint32_t nflags, uint32_t nnflags); + +// When new mail occurs, shows window, plays sound, runs application... +// hDlg- dialog handle. Dialog of mailbrowser is already created and actions are performed over this window +// ActualAccount- handle of account, whose mails are to be notified +// MN- statistics of mails in account +// nflags- what to do or not to do (e.g. to show mailbrowser window or prohibit to show) +// nflags- flags what to do when new mail arrives +// nnflags- flags what to do when no new mail arrives +void DoMailActions(HWND hDlg, CAccount *ActualAccount, struct CMailNumbers *MN, uint32_t nflags, uint32_t nnflags); + +// Looks for items in mailbrowser and if they were deleted, delete them from browser window +// hListView- handle of listview window +// ActualAccount- handle of account, whose mails are show +// MailNumbers- pointer to structure, in which function stores numbers of mails with some property +// returns one of UPDATE_XXX value (not implemented yet) +int ChangeExistingMailStatus(HWND hListView, CAccount *ActualAccount); + +// Adds new mails to ListView and if any new, shows multi popup (every new message is new popup window created by popup plugin) +// hListView- handle of listview window +// ActualAccount- handle of account, whose mails are show +// NewMailPopup- pointer to prepared structure for popup plugin, can be NULL if no popup show +// MailNumbers- pointer to structure, in which function stores numbers of mails with some property +// nflags- flags what to do when new mail arrives +// returns one of UPDATE_XXX value (not implemented yet) +int AddNewMailsToListView(HWND hListView, CAccount *ActualAccount, uint32_t nflags); + +// Window callback procedure for popup window (created by popup plugin) +LRESULT CALLBACK NewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Window callback procedure for popup window (created by popup plugin) +LRESULT CALLBACK NoNewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Dialog callback procedure for mail browser +INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); + +// MailBrowser thread function creates window if needed, tray icon and plays sound +void __cdecl MailBrowser(void *Param); + +LRESULT CALLBACK ListViewSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +// Runs mail browser in new thread +INT_PTR RunMailBrowserSvc(WPARAM, LPARAM); + +#define YAMN_BROWSER_SHOWPOPUP 0x01 + +// list view items' order criteria +#define LVORDER_NOORDER -1 +#define LVORDER_STRING 0 +#define LVORDER_NUMERIC 1 +#define LVORDER_DATETIME 2 + +// list view order direction +#define LVORDER_ASCENDING 1 +#define LVORDER_NONE 0 +#define LVORDER_DESCENDING -1 + +// list view sort type +#define LVSORTPRIORITY_NONE -1 + +// List view column info. +typedef struct _SAMPLELISTVIEWCOLUMN +{ + UINT uCXCol; // index + int nSortType; // sorting type (STRING = 0, NUMERIC, DATE, DATETIME) + int nSortOrder; // sorting order (ASCENDING = -1, NONE, DESCENDING) + int nPriority; // sort priority (-1 for none, 0, 1, ..., nColumns - 1 maximum) + wchar_t lpszName[128]; // column name +} SAMPLELISTVIEWCOLUMN; + +// Compare priority +typedef struct _LVCOMPAREINFO +{ + int iIdx; // Index + int iPriority; // Priority +} LVCOMPAREINFO, *LPLVCOMPAREINFO; + +//-------------------------------------------------------------------------------------------------- + +LPARAM readItemLParam(HWND hwnd, uint32_t iItem) +{ + LVITEM item; + item.mask = LVIF_PARAM; + item.iItem = iItem; + item.iSubItem = 0; + SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM)&item); + return item.lParam; +} + +inline CAccount *GetWindowAccount(HWND hDlg) +{ + struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); + + return (mwui == nullptr) ? nullptr : mwui->Account; +} + +void IncrementMailCounters(HYAMNMAIL msgq, struct CMailNumbers *MN) +{ + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.Total++; + else + MN->Real.Total++; + + if (msgq->Flags & YAMN_MSG_NEW) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.New++; + else + MN->Real.New++; + if (msgq->Flags & YAMN_MSG_UNSEEN) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.UnSeen++; + else + MN->Real.UnSeen++; + if ((msgq->Flags & (YAMN_MSG_UNSEEN | YAMN_MSG_BROWSER)) == (YAMN_MSG_UNSEEN | YAMN_MSG_BROWSER)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.BrowserUC++; + else + MN->Real.BrowserUC++; + if (msgq->Flags & YAMN_MSG_DISPLAY) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.Display++; + else + MN->Real.Display++; + if ((msgq->Flags & (YAMN_MSG_DISPLAYC | YAMN_MSG_DISPLAY)) == (YAMN_MSG_DISPLAYC | YAMN_MSG_DISPLAY)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.DisplayTC++; + else + MN->Real.DisplayTC++; + if ((msgq->Flags & (YAMN_MSG_UNSEEN | YAMN_MSG_DISPLAYC | YAMN_MSG_DISPLAY)) == (YAMN_MSG_UNSEEN | YAMN_MSG_DISPLAYC | YAMN_MSG_DISPLAY)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.DisplayUC++; + else + MN->Real.DisplayUC++; + if (msgq->Flags & YAMN_MSG_POPUP) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.Popup++; + else + MN->Real.Popup++; + if ((msgq->Flags & YAMN_MSG_POPUPC) == YAMN_MSG_POPUPC) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.PopupTC++; + else + MN->Real.PopupTC++; + if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_POPUPC)) == (YAMN_MSG_NEW | YAMN_MSG_POPUPC)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.PopupNC++; + else + MN->Real.PopupNC++; + if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_POPUP)) == (YAMN_MSG_NEW | YAMN_MSG_POPUP)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.PopupRun++; + else + MN->Real.PopupRun++; + if ((msgq->Flags & YAMN_MSG_NEW) && YAMN_MSG_SPAML(msgq->Flags, YAMN_MSG_SPAML2)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.PopupSL2NC++; + else + MN->Real.PopupSL2NC++; + if ((msgq->Flags & YAMN_MSG_NEW) && YAMN_MSG_SPAML(msgq->Flags, YAMN_MSG_SPAML3)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.PopupSL3NC++; + else + MN->Real.PopupSL3NC++; + /* if (msgq->MailData->Flags & YAMN_MSG_SYSTRAY) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.SysTray++; + else + MN->Real.SysTray++; + */ if ((msgq->Flags & (YAMN_MSG_UNSEEN | YAMN_MSG_SYSTRAY)) == (YAMN_MSG_UNSEEN | YAMN_MSG_SYSTRAY)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.SysTrayUC++; + else + MN->Real.SysTrayUC++; + /* if (msgq->MailData->Flags & YAMN_MSG_SOUND) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.Sound++; + else + MN->Real.Sound++; + */ if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_SOUND)) == (YAMN_MSG_NEW | YAMN_MSG_SOUND)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.SoundNC++; + else + MN->Real.SoundNC++; + /* if (msgq->MailData->Flags & YAMN_MSG_APP) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.App++; + else + MN->Real.App++; + */ if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_APP)) == (YAMN_MSG_NEW | YAMN_MSG_APP)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.AppNC++; + else + MN->Real.AppNC++; + if ((msgq->Flags & (YAMN_MSG_NEW | YAMN_MSG_NEVENT)) == (YAMN_MSG_NEW | YAMN_MSG_NEVENT)) + if (msgq->Flags & YAMN_MSG_VIRTUAL) + MN->Virtual.EventNC++; + else + MN->Real.EventNC++; +} + +int UpdateMails(HWND hDlg, CAccount *ActualAccount, uint32_t nflags, uint32_t nnflags) +{ + struct CMailNumbers MN; + + BOOL Loaded; + BOOL RunMailBrowser, RunPopups; + + struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); + //now we ensure read access for account and write access for its mails + if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) { + PostMessage(hDlg, WM_DESTROY, 0, 0); + return UPDATE_FAIL; + } + + if (WAIT_OBJECT_0 != WaitToWriteFcn(ActualAccount->MessagesAccessSO)) { + ReadDoneFcn(ActualAccount->AccountAccessSO); + PostMessage(hDlg, WM_DESTROY, 0, 0); + return UPDATE_FAIL; + } + + memset(&MN, 0, sizeof(MN)); + + for (HYAMNMAIL msgq = (HYAMNMAIL)ActualAccount->Mails; msgq != nullptr; msgq = msgq->Next) { + if (!LoadedMailData(msgq)) //check if mail is already in memory + { + Loaded = false; + if (nullptr == LoadMailData(msgq)) //if we could not load mail to memory, consider this mail deleted and do not display it + continue; + } + else + Loaded = true; + + IncrementMailCounters(msgq, &MN); + + if (!Loaded) + UnloadMailData(msgq); //do not keep data for mail in memory + } + + if (mwui != nullptr) + mwui->UpdateMailsMessagesAccess = TRUE; + + //Now we are going to check if extracting data from mail headers are needed. + //If popups will be displayed or mailbrowser window + if ((((mwui != nullptr) && !(mwui->RunFirstTime)) && + ( + ((nnflags & YAMN_ACC_MSGP) && !(MN.Real.BrowserUC + MN.Virtual.BrowserUC)) || + ((nflags & YAMN_ACC_MSGP) && (MN.Real.BrowserUC + MN.Virtual.BrowserUC)) + ) + ) || //if mail window was displayed before and flag YAMN_ACC_MSGP is set + ((nnflags & YAMN_ACC_MSG) && !(MN.Real.BrowserUC + MN.Virtual.BrowserUC)) || //if needed to run mailbrowser when no unseen and no unseen mail found + ((nflags & YAMN_ACC_MSG) && (MN.Real.BrowserUC + MN.Virtual.BrowserUC)) || //if unseen mails found, we sure run mailbrowser + ((nflags & YAMN_ACC_ICO) && (MN.Real.SysTrayUC + MN.Virtual.SysTrayUC)) + ) //if needed to run systray + RunMailBrowser = TRUE; + else + RunMailBrowser = FALSE; + + // if some popups with mails are needed to show + if ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (MN.Real.PopupNC + MN.Virtual.PopupNC)) + RunPopups = TRUE; + else RunPopups = FALSE; + + if (RunMailBrowser) + ChangeExistingMailStatus(GetDlgItem(hDlg, IDC_LISTMAILS), ActualAccount); + if (RunMailBrowser || RunPopups) + AddNewMailsToListView(hDlg == nullptr ? nullptr : GetDlgItem(hDlg, IDC_LISTMAILS), ActualAccount, nflags); + + if (RunMailBrowser) { + size_t len = mir_strlen(ActualAccount->Name) + mir_strlen(Translate(MAILBROWSERTITLE)) + 10; //+10 chars for numbers + char *TitleStrA = new char[len]; + wchar_t *TitleStrW = new wchar_t[len]; + + mir_snprintf(TitleStrA, len, Translate(MAILBROWSERTITLE), ActualAccount->Name, MN.Real.DisplayUC + MN.Virtual.DisplayUC, MN.Real.Display + MN.Virtual.Display); + MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, TitleStrA, -1, TitleStrW, (int)mir_strlen(TitleStrA) + 1); + SetWindowTextW(hDlg, TitleStrW); + delete[] TitleStrA; + delete[] TitleStrW; + } + + DoMailActions(hDlg, ActualAccount, &MN, nflags, nnflags); + + SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_NEW, 0, YAMN_MSG_NEW, YAMN_FLAG_REMOVE); //rempve the new flag + if (!RunMailBrowser) + SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_UNSEEN, YAMN_MSG_STAYUNSEEN, YAMN_MSG_UNSEEN, YAMN_FLAG_REMOVE); //remove the unseen flag when it was not displayed and it has not "stay unseen" flag set + + if (mwui != nullptr) { + mwui->UpdateMailsMessagesAccess = FALSE; + mwui->RunFirstTime = FALSE; + } + + WriteDoneFcn(ActualAccount->MessagesAccessSO); + ReadDoneFcn(ActualAccount->AccountAccessSO); + + if (RunMailBrowser) + UpdateWindow(GetDlgItem(hDlg, IDC_LISTMAILS)); + else if (hDlg != nullptr) + DestroyWindow(hDlg); + + return 1; +} + +int ChangeExistingMailStatus(HWND hListView, CAccount *ActualAccount) +{ + LVITEM item; + HYAMNMAIL mail, msgq; + + int in = ListView_GetItemCount(hListView); + item.mask = LVIF_PARAM; + + for (int i = 0; i < in; i++) { + item.iItem = i; + item.iSubItem = 0; + if (TRUE == ListView_GetItem(hListView, &item)) + mail = (HYAMNMAIL)item.lParam; + else + continue; + for (msgq = (HYAMNMAIL)ActualAccount->Mails; (msgq != nullptr) && (msgq != mail); msgq = msgq->Next); //found the same mail in account queue + if (msgq == nullptr) //if mail was not found + if (TRUE == ListView_DeleteItem(hListView, i)) { + in--; i--; + continue; + } + } + + return TRUE; +} + +void MimeDateToLocalizedDateTime(char *datein, wchar_t *dateout, int lendateout); +int AddNewMailsToListView(HWND hListView, CAccount *ActualAccount, uint32_t nflags) +{ + wchar_t *FromStr; + wchar_t SizeStr[20]; + wchar_t LocalDateStr[128]; + + LVITEMW item; + LVFINDINFO fi; + + int foundi = 0, lfoundi = 0; + struct CHeader UnicodeHeader; + BOOL Loaded, Extracted, FromStrNew = FALSE; + + memset(&item, 0, sizeof(item)); + memset(&UnicodeHeader, 0, sizeof(UnicodeHeader)); + + if (hListView != nullptr) { + item.mask = LVIF_TEXT | LVIF_PARAM; + item.iItem = 0; + memset(&fi, 0, sizeof(fi)); + fi.flags = LVFI_PARAM; //let's go search item by lParam number + lfoundi = 0; + } + + POPUPDATAW NewMailPopup = {}; + NewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount; + NewMailPopup.lchIcon = g_plugin.getIcon(IDI_NEWMAIL); + if (nflags & YAMN_ACC_POPC) { + NewMailPopup.colorBack = ActualAccount->NewMailN.PopupB; + NewMailPopup.colorText = ActualAccount->NewMailN.PopupT; + } + else { + NewMailPopup.colorBack = GetSysColor(COLOR_BTNFACE); + NewMailPopup.colorText = GetSysColor(COLOR_WINDOWTEXT); + } + NewMailPopup.iSeconds = ActualAccount->NewMailN.PopupTime; + + NewMailPopup.PluginWindowProc = NewMailPopupProc; + NewMailPopup.PluginData = nullptr; //it's new mail popup + + for (HYAMNMAIL msgq = (HYAMNMAIL)ActualAccount->Mails; msgq != nullptr; msgq = msgq->Next, lfoundi++) { + // now we hide mail pointer to item's lParam member. We can later use it to retrieve mail datas + + Extracted = FALSE; FromStr = nullptr; FromStrNew = FALSE; + + if (hListView != nullptr) { + fi.lParam = (LPARAM)msgq; + if (-1 != (foundi = ListView_FindItem(hListView, -1, &fi))) { // if mail is already in window + lfoundi = foundi; + continue; // do not insert any item + } + + item.iItem = lfoundi; // insert after last found item + item.lParam = (LPARAM)msgq; + } + + if (!LoadedMailData(msgq)) { // check if mail is already in memory + Loaded = false; + if (nullptr == LoadMailData(msgq)) //if we could not load mail to memory, consider this mail deleted and do not display it + continue; + } + else Loaded = true; + + if (((hListView != nullptr) && (msgq->Flags & YAMN_MSG_DISPLAY)) || + ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (msgq->Flags & YAMN_MSG_POPUP) && (msgq->Flags & YAMN_MSG_NEW))) { + + if (!Extracted) ExtractHeader(msgq->MailData->TranslatedHeader, msgq->MailData->CP, &UnicodeHeader); + Extracted = TRUE; + + if ((UnicodeHeader.From != nullptr) && (UnicodeHeader.FromNick != nullptr)) { + size_t size = mir_wstrlen(UnicodeHeader.From) + mir_wstrlen(UnicodeHeader.FromNick) + 4; + FromStr = new wchar_t[size]; + mir_snwprintf(FromStr, size, L"%s <%s>", UnicodeHeader.FromNick, UnicodeHeader.From); + FromStrNew = TRUE; + } + else if (UnicodeHeader.From != nullptr) + FromStr = UnicodeHeader.From; + else if (UnicodeHeader.FromNick != nullptr) + FromStr = UnicodeHeader.FromNick; + else if (UnicodeHeader.ReturnPath != nullptr) + FromStr = UnicodeHeader.ReturnPath; + + if (nullptr == FromStr) { + FromStr = L""; + FromStrNew = FALSE; + } + } + + if ((hListView != nullptr) && (msgq->Flags & YAMN_MSG_DISPLAY)) { + item.iSubItem = 0; + item.pszText = FromStr; + item.iItem = SendMessage(hListView, LVM_INSERTITEM, 0, (LPARAM)&item); + + item.iSubItem = 1; + item.pszText = (nullptr != UnicodeHeader.Subject ? UnicodeHeader.Subject : (wchar_t *)L""); + SendMessage(hListView, LVM_SETITEMTEXT, (WPARAM)item.iItem, (LPARAM)&item); + + item.iSubItem = 2; + mir_snwprintf(SizeStr, L"%d kB", msgq->MailData->Size / 1024); + item.pszText = SizeStr; + SendMessage(hListView, LVM_SETITEMTEXT, (WPARAM)item.iItem, (LPARAM)&item); + + item.iSubItem = 3; + item.pszText = L""; + + for (CMimeItem *heads = msgq->MailData->TranslatedHeader; heads != nullptr; heads = heads->Next) { + if (!_stricmp(heads->name, "Date")) { + MimeDateToLocalizedDateTime(heads->value, LocalDateStr, 128); + item.pszText = LocalDateStr; + break; + } + } + SendMessage(hListView, LVM_SETITEMTEXT, (WPARAM)item.iItem, (LPARAM)&item); + } + + if ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (msgq->Flags & YAMN_MSG_POPUP) && (msgq->Flags & YAMN_MSG_NEW)) { + mir_wstrncpy(NewMailPopup.lpwzContactName, FromStr, _countof(NewMailPopup.lpwzContactName)); + mir_wstrncpy(NewMailPopup.lpwzText, UnicodeHeader.Subject, _countof(NewMailPopup.lpwzText)); + + PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM)malloc(sizeof(YAMN_MAILSHOWPARAM)); + if (MailParam) { + MailParam->account = ActualAccount; + MailParam->mail = msgq; + MailParam->ThreadRunningEV = nullptr; + NewMailPopup.PluginData = MailParam; + PUAddPopupW(&NewMailPopup); + } + } + + if ((msgq->Flags & YAMN_MSG_UNSEEN) && (ActualAccount->NewMailN.Flags & YAMN_ACC_KBN)) + CallService(MS_KBDNOTIFY_EVENTSOPENED, 1, NULL); + + if (FromStrNew) + delete[] FromStr; + + if (Extracted) { + DeleteHeaderContent(&UnicodeHeader); + memset(&UnicodeHeader, 0, sizeof(UnicodeHeader)); + } + + if (!Loaded) { + SaveMailData(msgq); + UnloadMailData(msgq); //do not keep data for mail in memory + } + } + + return TRUE; +} + +void DoMailActions(HWND hDlg, CAccount *ActualAccount, struct CMailNumbers *MN, uint32_t nflags, uint32_t nnflags) +{ + NOTIFYICONDATA nid = {}; + nid.cbSize = sizeof(nid); + nid.hWnd = hDlg; + + if (MN->Real.EventNC + MN->Virtual.EventNC) + NotifyEventHooks(hNewMailHook, 0, 0); + + if ((nflags & YAMN_ACC_KBN) && (MN->Real.PopupRun + MN->Virtual.PopupRun)) + CallService(MS_KBDNOTIFY_STARTBLINK, (WPARAM)MN->Real.PopupNC + MN->Virtual.PopupNC, NULL); + + if ((nflags & YAMN_ACC_CONT) && (MN->Real.PopupRun + MN->Virtual.PopupRun)) { + wchar_t tszMsg[250]; + mir_snwprintf(tszMsg, TranslateT("%s : %d new mail message(s), %d total"), _A2T(ActualAccount->Name).get(), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC); + + if (!(nflags & YAMN_ACC_CONTNOEVENT)) { + CLISTEVENT evt = {}; + evt.flags = CLEF_UNICODE; + evt.hContact = ActualAccount->hContact; + evt.hIcon = g_plugin.getIcon(IDI_NEWMAIL); + evt.hDbEvent = ActualAccount->hContact; + evt.lParam = ActualAccount->hContact; + evt.pszService = MS_YAMN_CLISTDBLCLICK; + evt.szTooltip.w = tszMsg; + g_clistApi.pfnAddEvent(&evt); + } + db_set_ws(ActualAccount->hContact, "CList", "StatusMsg", tszMsg); + + if (nflags & YAMN_ACC_CONTNICK) + g_plugin.setWString(ActualAccount->hContact, "Nick", tszMsg); + } + + if ((nflags & YAMN_ACC_POP) && + !(ActualAccount->Flags & YAMN_ACC_POPN) && + (MN->Real.PopupRun + MN->Virtual.PopupRun)) { + POPUPDATAW NewMailPopup; + + NewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount; + NewMailPopup.lchIcon = g_plugin.getIcon(IDI_NEWMAIL); + if (nflags & YAMN_ACC_POPC) { + NewMailPopup.colorBack = ActualAccount->NewMailN.PopupB; + NewMailPopup.colorText = ActualAccount->NewMailN.PopupT; + } + else { + NewMailPopup.colorBack = GetSysColor(COLOR_BTNFACE); + NewMailPopup.colorText = GetSysColor(COLOR_WINDOWTEXT); + } + NewMailPopup.iSeconds = ActualAccount->NewMailN.PopupTime; + + NewMailPopup.PluginWindowProc = NewMailPopupProc; + NewMailPopup.PluginData = (void *)nullptr; //multiple popups + + mir_wstrncpy(NewMailPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(NewMailPopup.lpwzContactName)); + mir_snwprintf(NewMailPopup.lpwzText, TranslateT("%d new mail message(s), %d total"), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC); + PUAddPopupW(&NewMailPopup); + } + + // destroy tray icon if no new mail + if ((MN->Real.SysTrayUC + MN->Virtual.SysTrayUC == 0) && (hDlg != nullptr)) + Shell_NotifyIcon(NIM_DELETE, &nid); + + // and remove the event + if ((nflags & YAMN_ACC_CONT) && (!(nflags & YAMN_ACC_CONTNOEVENT)) && (MN->Real.UnSeen + MN->Virtual.UnSeen == 0)) + g_clistApi.pfnRemoveEvent(ActualAccount->hContact, ActualAccount->hContact); + + if ((MN->Real.BrowserUC + MN->Virtual.BrowserUC == 0) && (hDlg != nullptr)) { + if (!IsWindowVisible(hDlg) && !(nflags & YAMN_ACC_MSG)) + PostMessage(hDlg, WM_DESTROY, 0, 0); //destroy window if no new mail and window is not visible + if (nnflags & YAMN_ACC_MSG) //if no new mail and msg should be executed + { + SetForegroundWindow(hDlg); + ShowWindow(hDlg, SW_SHOWNORMAL); + } + } + else + if (hDlg != nullptr) //else insert icon and set window if new mails + { + SendDlgItemMessageW(hDlg, IDC_LISTMAILS, LVM_SCROLL, 0, (LPARAM)0x7ffffff); + + if ((nflags & YAMN_ACC_ICO) && (MN->Real.SysTrayUC + MN->Virtual.SysTrayUC)) { + nid.hIcon = g_plugin.getIcon(IDI_NEWMAIL); + nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; + nid.uCallbackMessage = WM_YAMN_NOTIFYICON; + mir_snwprintf(nid.szTip, L"%S %s", ActualAccount->Name, TranslateT("- new mail message(s)")); + Shell_NotifyIcon(NIM_ADD, &nid); + SetTimer(hDlg, TIMER_FLASHING, 500, nullptr); + } + if (nflags & YAMN_ACC_MSG) //if no new mail and msg should be executed + ShowWindow(hDlg, SW_SHOWNORMAL); + } + + if (MN->Real.AppNC + MN->Virtual.AppNC != 0) { + if (nflags & YAMN_ACC_APP) { + PROCESS_INFORMATION pi; + STARTUPINFOW si; + memset(&si, 0, sizeof(si)); + si.cb = sizeof(si); + + if (ActualAccount->NewMailN.App != nullptr) { + wchar_t *Command; + if (ActualAccount->NewMailN.AppParam != nullptr) + Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6]; + else + Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + 6]; + + if (Command != nullptr) { + mir_wstrcpy(Command, L"\""); + mir_wstrcat(Command, ActualAccount->NewMailN.App); + mir_wstrcat(Command, L"\" "); + if (ActualAccount->NewMailN.AppParam != nullptr) + mir_wstrcat(Command, ActualAccount->NewMailN.AppParam); + CreateProcessW(nullptr, Command, nullptr, nullptr, FALSE, NORMAL_PRIORITY_CLASS, nullptr, nullptr, &si, &pi); + delete[] Command; + } + } + } + } + + if (MN->Real.SoundNC + MN->Virtual.SoundNC != 0) + if (nflags & YAMN_ACC_SND) + Skin_PlaySound(YAMN_NEWMAILSOUND); + + if ((nnflags & YAMN_ACC_POP) && (MN->Real.PopupRun + MN->Virtual.PopupRun == 0)) { + POPUPDATAW NoNewMailPopup = {}; + + NoNewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount; + NoNewMailPopup.lchIcon = g_plugin.getIcon(IDI_LAUNCHAPP); + if (nflags & YAMN_ACC_POPC) { + NoNewMailPopup.colorBack = ActualAccount->NoNewMailN.PopupB; + NoNewMailPopup.colorText = ActualAccount->NoNewMailN.PopupT; + } + else { + NoNewMailPopup.colorBack = GetSysColor(COLOR_BTNFACE); + NoNewMailPopup.colorText = GetSysColor(COLOR_WINDOWTEXT); + } + NoNewMailPopup.iSeconds = ActualAccount->NoNewMailN.PopupTime; + + NoNewMailPopup.PluginWindowProc = NoNewMailPopupProc; + NoNewMailPopup.PluginData = nullptr; //it's not new mail popup + + mir_wstrncpy(NoNewMailPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(NoNewMailPopup.lpwzContactName)); + if (MN->Real.PopupSL2NC + MN->Virtual.PopupSL2NC) + mir_snwprintf(NoNewMailPopup.lpwzText, TranslateT("No new mail message, %d spam(s)"), MN->Real.PopupSL2NC + MN->Virtual.PopupSL2NC); + else + mir_wstrncpy(NoNewMailPopup.lpwzText, TranslateT("No new mail message"), _countof(NoNewMailPopup.lpwzText)); + PUAddPopupW(&NoNewMailPopup); + } + + if ((nflags & YAMN_ACC_CONT) && (MN->Real.PopupRun + MN->Virtual.PopupRun == 0)) { + if (ActualAccount->hContact != NULL) { + if (MN->Real.PopupTC + MN->Virtual.PopupTC) { + char tmp[255]; + mir_snprintf(tmp, Translate("%d new mail message(s), %d total"), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC); + db_set_s(ActualAccount->hContact, "CList", "StatusMsg", tmp); + } + else db_set_s(ActualAccount->hContact, "CList", "StatusMsg", Translate("No new mail message")); + + if (nflags & YAMN_ACC_CONTNICK) + g_plugin.setString(ActualAccount->hContact, "Nick", ActualAccount->Name); + } + } + return; +} + +LRESULT CALLBACK NewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + INT_PTR PluginParam = 0; + switch (msg) { + case WM_COMMAND: + // if clicked and it's new mail popup window + if ((HIWORD(wParam) == STN_CLICKED) && (-1 != (PluginParam = (INT_PTR)PUGetPluginData(hWnd)))) { + MCONTACT hContact = 0; + CAccount *Account; + if (PluginParam) { + PYAMN_MAILSHOWPARAM MailParam = new YAMN_MAILSHOWPARAM; + memcpy(MailParam, (PINT_PTR)PluginParam, sizeof(YAMN_MAILSHOWPARAM)); + hContact = MailParam->account->hContact; + Account = MailParam->account; + mir_forkthread(ShowEmailThread, MailParam); + } + else { + DBVARIANT dbv; + + hContact = PUGetContact(hWnd); + + if (!g_plugin.getString(hContact, "Id", &dbv)) { + Account = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); + db_free(&dbv); + } + else Account = (CAccount *)hContact; //???? + + if (WAIT_OBJECT_0 == WaitToReadFcn(Account->AccountAccessSO)) { + switch (msg) { + case WM_COMMAND: + { + YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, Account, + (Account->NewMailN.Flags & ~YAMN_ACC_POP) | YAMN_ACC_MSGP | YAMN_ACC_MSG, + (Account->NoNewMailN.Flags & ~YAMN_ACC_POP) | YAMN_ACC_MSGP | YAMN_ACC_MSG}; + + RunMailBrowserSvc((WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); + } + break; + } + ReadDoneFcn(Account->AccountAccessSO); + } + } + if ((Account->NewMailN.Flags & YAMN_ACC_CONT) && !(Account->NewMailN.Flags & YAMN_ACC_CONTNOEVENT)) + g_clistApi.pfnRemoveEvent(hContact, hContact); + } + __fallthrough; + + case WM_CONTEXTMENU: + PUDeletePopup(hWnd); + break; + case UM_FREEPLUGINDATA: + { + PYAMN_MAILSHOWPARAM mpd = (PYAMN_MAILSHOWPARAM)PUGetPluginData(hWnd); + if ((mpd) && (INT_PTR)mpd != -1)free(mpd); + return FALSE; + } + case UM_INITPOPUP: + //This is the equivalent to WM_INITDIALOG you'd get if you were the maker of dialog popups. + WindowList_Add(YAMNVar.MessageWnds, hWnd); + break; + case UM_DESTROYPOPUP: + WindowList_Remove(YAMNVar.MessageWnds, hWnd); + break; + case WM_YAMN_STOPACCOUNT: + { + CAccount *ActualAccount; + DBVARIANT dbv; + + MCONTACT hContact = PUGetContact(hWnd); + + if (!g_plugin.getString(hContact, "Id", &dbv)) { + ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); + db_free(&dbv); + } + else + ActualAccount = (CAccount *)hContact; + + if ((CAccount *)wParam != ActualAccount) + break; + DestroyWindow(hWnd); + return 0; + } + case WM_NOTIFY: + default: + break; + } + return DefWindowProc(hWnd, msg, wParam, lParam); +} + +LRESULT CALLBACK NoNewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) { + case WM_COMMAND: + if ((HIWORD(wParam) == STN_CLICKED) && (msg == WM_COMMAND)) { + CAccount *ActualAccount; + DBVARIANT dbv; + + MCONTACT hContact = PUGetContact(hWnd); + + if (!g_plugin.getString(hContact, "Id", &dbv)) { + ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); + db_free(&dbv); + } + else + ActualAccount = (CAccount *)hContact; + + if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { + switch (msg) { + case WM_COMMAND: + { + YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, ActualAccount, ActualAccount->NewMailN.Flags, ActualAccount->NoNewMailN.Flags, nullptr}; + + Param.nnflags = Param.nnflags | YAMN_ACC_MSG; //show mails in account even no new mail in account + Param.nnflags = Param.nnflags & ~YAMN_ACC_POP; + + Param.nflags = Param.nflags | YAMN_ACC_MSG; //show mails in account even no new mail in account + Param.nflags = Param.nflags & ~YAMN_ACC_POP; + + RunMailBrowserSvc((WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); + } + break; + } + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + PUDeletePopup(hWnd); + } + break; + + case WM_CONTEXTMENU: + PUDeletePopup(hWnd); + break; + + case UM_FREEPLUGINDATA: + //Here we'd free our own data, if we had it. + return FALSE; + case UM_INITPOPUP: + //This is the equivalent to WM_INITDIALOG you'd get if you were the maker of dialog popups. + WindowList_Add(YAMNVar.MessageWnds, hWnd); + break; + case UM_DESTROYPOPUP: + WindowList_Remove(YAMNVar.MessageWnds, hWnd); + break; + case WM_YAMN_STOPACCOUNT: + { + CAccount *ActualAccount; + DBVARIANT dbv; + + MCONTACT hContact = PUGetContact(hWnd); + + if (!g_plugin.getString(hContact, "Id", &dbv)) { + ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); + db_free(&dbv); + } + else + ActualAccount = (CAccount *)hContact; + + if ((CAccount *)wParam != ActualAccount) + break; + + DestroyWindow(hWnd); + return 0; + } + } + return DefWindowProc(hWnd, msg, wParam, lParam); +} + +#ifdef __GNUC__ +//number of 100 ns periods between FILETIME 0 (1601/01/01 00:00:00.0000000) and TIMESTAMP 0 (1970/01/01 00:00:00) +#define NUM100NANOSEC 116444736000000000ULL +//The biggest time Get[Date|Time]Format can handle (Fri, 31 Dec 30827 23:59:59.9999999) +#define MAXFILETIME 0x7FFF35F4F06C7FFFULL +#else +#define NUM100NANOSEC 116444736000000000 +#define MAXFILETIME 0x7FFF35F4F06C7FFF +#endif + +ULONGLONG MimeDateToFileTime(char *datein) +{ + char *day = nullptr, *month = nullptr, *year = nullptr, *time = nullptr, *shift = nullptr; + SYSTEMTIME st; + ULONGLONG res = 0; + int wShiftSeconds = TimeZone_ToLocal(0); + GetLocalTime(&st); + //datein = "Xxx, 1 Jan 2060 5:29:1 +0530 XXX"; + //datein = "Xxx, 1 Jan 2060 05:29:10 "; + //datein = " ManySpaces 1.5 Jan 2060 05::"; + //datein = "Xxx, 35 February 20 :29:10 "; + //datein = "01.12.2007 (22:38:17)"; // + if (datein) { + char tmp[64]; + while (datein[0] == ' ') datein++; // eat leading spaces + strncpy(tmp, datein, 63); tmp[63] = 0; + if (atoi(tmp)) { // Parseable integer on DayOfWeek field? Buggy mime date. + day = tmp; + } + else { + int i = 0; + while (tmp[i] == ' ')i++; if (day = strchr(&tmp[i], ' ')) { day[0] = 0; day++; } + } + if (day) { while (day[0] == ' ') day++; if (month = strchr(day, ' ')) { month[0] = 0; month++; } } + if (month) { while (month[0] == ' ')month++; if (year = strchr(month, ' ')) { year[0] = 0; year++; } } + if (year) { while (year[0] == ' ') year++; if (time = strchr(year, ' ')) { time[0] = 0; time++; } } + if (time) { while (time[0] == ' ') time++; if (shift = strchr(time, ' ')) { shift[0] = 0; shift++; shift[5] = 0; } } + + if (year) { + st.wYear = atoi(year); + if (mir_strlen(year) < 4) if (st.wYear < 70)st.wYear += 2000; else st.wYear += 1900; + }; + if (month) for (int i = 0; i < 12; i++) if (strncmp(month, s_MonthNames[i], 3) == 0) { st.wMonth = i + 1; break; } + if (day) st.wDay = atoi(day); + if (time) { + char *h, *m, *s; + h = time; + if (m = strchr(h, ':')) { + m[0] = 0; m++; + if (s = strchr(m, ':')) { s[0] = 0; s++; } + } + else s = nullptr; + st.wHour = atoi(h); + st.wMinute = m ? atoi(m) : 0; + st.wSecond = s ? atoi(s) : 0; + } + else { st.wHour = st.wMinute = st.wSecond = 0; } + + if (shift) { + if (mir_strlen(shift) < 4) { + //has only hour + wShiftSeconds = (atoi(shift)) * 3600; + } + else { + char *smin = shift + mir_strlen(shift) - 2; + int ismin = atoi(smin); + smin[0] = 0; + int ishour = atoi(shift); + wShiftSeconds = (ishour * 60 + (ishour < 0 ? -1 : 1) * ismin) * 60; + } + } + } // if (datein) + FILETIME ft; + if (SystemTimeToFileTime(&st, &ft)) { + res = ((ULONGLONG)ft.dwHighDateTime << 32) | ((ULONGLONG)ft.dwLowDateTime); + LONGLONG w100nano = Int32x32To64((uint32_t)wShiftSeconds, 10000000); + res -= w100nano; + } + else { + res = 0; + } + return res; +} + +void FileTimeToLocalizedDateTime(LONGLONG filetime, wchar_t *dateout, int lendateout) +{ + int localeID = Langpack_GetDefaultLocale(); + //int localeID = MAKELCID(LANG_URDU, SORT_DEFAULT); + if (localeID == CALLSERVICE_NOTFOUND) localeID = LOCALE_USER_DEFAULT; + if (filetime > MAXFILETIME) filetime = MAXFILETIME; + else if (filetime <= 0) { + wcsncpy(dateout, TranslateT("Invalid"), lendateout); + return; + } + SYSTEMTIME st; + uint16_t wTodayYear = 0, wTodayMonth = 0, wTodayDay = 0; + FILETIME ft; + BOOL willShowDate = !(optDateTime & SHOWDATENOTODAY); + if (!willShowDate) { + GetLocalTime(&st); + wTodayYear = st.wYear; + wTodayMonth = st.wMonth; + wTodayDay = st.wDay; + } + ft.dwLowDateTime = (uint32_t)filetime; + ft.dwHighDateTime = (uint32_t)(filetime >> 32); + FILETIME localft; + if (!FileTimeToLocalFileTime(&ft, &localft)) { + // this should never happen + wcsncpy(dateout, L"Incorrect FileTime", lendateout); + } + else { + if (!FileTimeToSystemTime(&localft, &st)) { + // this should never happen + wcsncpy(dateout, L"Incorrect LocalFileTime", lendateout); + } + else { + dateout[lendateout - 1] = 0; + int templen = 0; + if (!willShowDate) willShowDate = (wTodayYear != st.wYear) || (wTodayMonth != st.wMonth) || (wTodayDay != st.wDay); + if (willShowDate) { + templen = GetDateFormatW(localeID, (optDateTime & SHOWDATELONG) ? DATE_LONGDATE : DATE_SHORTDATE, &st, nullptr, dateout, lendateout - 2); + dateout[templen - 1] = ' '; + } + if (templen < (lendateout - 1)) { + GetTimeFormatW(localeID, (optDateTime & SHOWDATENOSECONDS) ? TIME_NOSECONDS : 0, &st, nullptr, &dateout[templen], lendateout - templen - 1); + } + } + } +} + +void MimeDateToLocalizedDateTime(char *datein, wchar_t *dateout, int lendateout) +{ + ULONGLONG ft = MimeDateToFileTime(datein); + FileTimeToLocalizedDateTime(ft, dateout, lendateout); +} + +int CALLBACK ListViewCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) +{ + if (lParam1 == NULL || lParam2 == NULL) + return 0; + + int nResult = 0; + char *str1; + char *str2; + HYAMNMAIL email1 = (HYAMNMAIL)lParam1; + HYAMNMAIL email2 = (HYAMNMAIL)lParam2; + struct CShortHeader Header1; + struct CShortHeader Header2; + memset(&Header1, 0, sizeof(Header1)); + memset(&Header2, 0, sizeof(Header2)); + + try { + ExtractShortHeader(email1->MailData->TranslatedHeader, &Header1); + ExtractShortHeader(email2->MailData->TranslatedHeader, &Header2); + + switch ((int)lParamSort) { + case 0: //From + if (Header1.FromNick == nullptr) + str1 = Header1.From; + else str1 = Header1.FromNick; + + if (Header2.FromNick == nullptr) + str2 = Header2.From; + else str2 = Header2.FromNick; + + nResult = mir_strcmp(str1, str2); + + if (bFrom) nResult = -nResult; + break; + case 1: //Subject + if (Header1.Subject == nullptr) + str1 = " "; + else str1 = Header1.Subject; + + if (Header2.Subject == nullptr) + str2 = " "; + else str2 = Header2.Subject; + + nResult = mir_strcmp(str1, str2); + + if (bSub) nResult = -nResult; + break; + case 2: //Size + if (email1->MailData->Size == email2->MailData->Size) nResult = 0; + if (email1->MailData->Size > email2->MailData->Size) nResult = 1; + if (email1->MailData->Size < email2->MailData->Size) nResult = -1; + + if (bSize) nResult = -nResult; + break; + + case 3: //Date + { + ULONGLONG ts1 = 0, ts2 = 0; + ts1 = MimeDateToFileTime(Header1.Date); + ts2 = MimeDateToFileTime(Header2.Date); + if (ts1 > ts2) nResult = 1; + else if (ts1 < ts2) nResult = -1; + else nResult = 0; + } + if (bDate) nResult = -nResult; + break; + + default: + if (Header1.Subject == nullptr) str1 = " "; + else str1 = Header1.Subject; + + if (Header2.Subject == nullptr) str2 = " "; + else str2 = Header2.Subject; + + nResult = mir_strcmp(str1, str2); + break; + } + //MessageBox(NULL,str1,str2,0); + } + catch (...) { + } + + //free mem + DeleteShortHeaderContent(&Header1); + DeleteShortHeaderContent(&Header2); + return nResult; + +} + +HCURSOR hCurSplitNS, hCurSplitWE; +#define DM_SPLITTERMOVED (WM_USER+15) + +static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) { + case WM_NCHITTEST: + return HTCLIENT; + + case WM_SETCURSOR: + SetCursor(hCurSplitNS); + return TRUE; + + case WM_LBUTTONDOWN: + SetCapture(hwnd); + return 0; + + case WM_MOUSEMOVE: + if (GetCapture() == hwnd) { + RECT rc; + GetClientRect(hwnd, &rc); + SendMessage(GetParent(hwnd), DM_SPLITTERMOVED, (short)HIWORD(GetMessagePos()) + rc.bottom / 2, (LPARAM)hwnd); + } + return 0; + + case WM_LBUTTONUP: + ReleaseCapture(); + return 0; + } + return mir_callNextSubclass(hwnd, SplitterSubclassProc, msg, wParam, lParam); +} + +void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, uint32_t cp, int mode); +int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out); + +INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) { + case WM_INITDIALOG: + { + PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM)lParam; + wchar_t *iHeaderW = nullptr; + wchar_t *iValueW = nullptr; + int StrLen; + HWND hListView = GetDlgItem(hDlg, IDC_LISTHEADERS); + mir_subclassWindow(GetDlgItem(hDlg, IDC_SPLITTER), SplitterSubclassProc); + SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)MailParam); + Window_SetIcon_IcoLib(hDlg, g_plugin.getIconHandle(IDI_NEWMAIL)); + + ListView_SetUnicodeFormat(hListView, TRUE); + ListView_SetExtendedListViewStyle(hListView, LVS_EX_FULLROWSELECT); + + StrLen = MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Header"), -1, nullptr, 0); + iHeaderW = new wchar_t[StrLen + 1]; + MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Header"), -1, iHeaderW, StrLen); + + StrLen = MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Value"), -1, nullptr, 0); + iValueW = new wchar_t[StrLen + 1]; + MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, Translate("Value"), -1, iValueW, StrLen); + + LVCOLUMN lvc0 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, 130, iHeaderW, 0, 0}; + LVCOLUMN lvc1 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, 400, iValueW, 0, 0}; + SendMessage(hListView, LVM_INSERTCOLUMN, 0, (LPARAM)&lvc0); + SendMessage(hListView, LVM_INSERTCOLUMN, 1, (LPARAM)&lvc1); + if (nullptr != iHeaderW) + delete[] iHeaderW; + if (nullptr != iValueW) + delete[] iValueW; + + SendMessage(hDlg, WM_YAMN_CHANGECONTENT, 0, (LPARAM)MailParam); + MoveWindow(hDlg, HeadPosX, HeadPosY, HeadSizeX, HeadSizeY, 0); + ShowWindow(hDlg, SW_SHOWNORMAL); + } + break; + + case WM_YAMN_CHANGECONTENT: + { + PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM) + (lParam ? lParam : GetWindowLongPtr(hDlg, DWLP_USER)); + HWND hListView = GetDlgItem(hDlg, IDC_LISTHEADERS); + HWND hEdit = GetDlgItem(hDlg, IDC_EDITBODY); + //do not redraw + SendMessage(hListView, WM_SETREDRAW, 0, 0); + ListView_DeleteAllItems(hListView); + struct CMimeItem *Header; + LVITEMW item; + item.mask = LVIF_TEXT | LVIF_PARAM; + wchar_t *From = nullptr, *Subj = nullptr; + char *contentType = nullptr, *transEncoding = nullptr, *body = nullptr; //should not be delete[]-ed + for (Header = MailParam->mail->MailData->TranslatedHeader; Header != nullptr; Header = Header->Next) { + wchar_t *str1 = nullptr; + wchar_t *str2 = nullptr; + wchar_t str_nul[2] = {0}; + if (!body) if (!_stricmp(Header->name, "Body")) { body = Header->value; continue; } + if (!contentType) if (!_stricmp(Header->name, "Content-Type")) contentType = Header->value; + if (!transEncoding) if (!_stricmp(Header->name, "Content-Transfer-Encoding")) transEncoding = Header->value; + //ConvertCodedStringToUnicode(Header->name,&str1,MailParam->mail->MailData->CP,1); + { + int streamsize = MultiByteToWideChar(20127, 0, Header->name, -1, nullptr, 0); + str1 = (wchar_t *)malloc(sizeof(wchar_t) * (streamsize + 1)); + MultiByteToWideChar(20127, 0, Header->name, -1, str1, streamsize);//US-ASCII + } + ConvertCodedStringToUnicode(Header->value, &str2, MailParam->mail->MailData->CP, 1); + if (!str2) { str2 = (wchar_t *)str_nul; }// the header value may be NULL + if (!From) if (!_stricmp(Header->name, "From")) { + From = new wchar_t[mir_wstrlen(str2) + 1]; + mir_wstrcpy(From, str2); + } + if (!Subj) if (!_stricmp(Header->name, "Subject")) { + Subj = new wchar_t[mir_wstrlen(str2) + 1]; + mir_wstrcpy(Subj, str2); + } + //if (!hasBody) if (!mir_strcmp(Header->name,"Body")) hasBody = true; + int count = 0; wchar_t **split = nullptr; + int ofs = 0; + while (str2[ofs]) { + if ((str2[ofs] == 0x266A) || (str2[ofs] == 0x25D9) || (str2[ofs] == 0x25CB) || + (str2[ofs] == 0x09) || (str2[ofs] == 0x0A) || (str2[ofs] == 0x0D))count++; + ofs++; + } + split = new wchar_t *[count + 1]; + count = 0; ofs = 0; + split[0] = str2; + while (str2[ofs]) { + if ((str2[ofs] == 0x266A) || (str2[ofs] == 0x25D9) || (str2[ofs] == 0x25CB) || + (str2[ofs] == 0x09) || (str2[ofs] == 0x0A) || (str2[ofs] == 0x0D)) { + if (str2[ofs - 1]) { + count++; + } + split[count] = (wchar_t *)(str2 + ofs + 1); + str2[ofs] = 0; + } + ofs++; + }; + + if (!_stricmp(Header->name, "From") || !_stricmp(Header->name, "To") || !_stricmp(Header->name, "Date") || !_stricmp(Header->name, "Subject")) + item.iItem = 0; + else + item.iItem = 999; + for (int i = 0; i <= count; i++) { + item.iSubItem = 0; + if (i == 0) + item.pszText = str1; + else { + item.iItem++; + item.pszText = nullptr; + } + item.iItem = SendMessage(hListView, LVM_INSERTITEM, 0, (LPARAM)&item); + item.iSubItem = 1; + item.pszText = str2 ? split[i] : nullptr; + SendMessage(hListView, LVM_SETITEMTEXT, (WPARAM)item.iItem, (LPARAM)&item); + } + delete[] split; + + if (str1) + free(str1); + if (str2 != (wchar_t *)str_nul) + free(str2); + } + if (body) { + wchar_t *bodyDecoded = nullptr; + char *localBody = nullptr; + if (contentType) { + if (!_strnicmp(contentType, "text", 4)) { + if (transEncoding) { + if (!_stricmp(transEncoding, "base64")) { + int size = (int)mir_strlen(body) * 3 / 4 + 5; + localBody = new char[size + 1]; + DecodeBase64(body, localBody, size); + } + else if (!_stricmp(transEncoding, "quoted-printable")) { + int size = (int)mir_strlen(body) + 2; + localBody = new char[size + 1]; + DecodeQuotedPrintable(body, localBody, size, FALSE); + } + } + } + else if (!_strnicmp(contentType, "multipart/", 10)) { + char *bondary = nullptr; + if (nullptr != (bondary = ExtractFromContentType(contentType, "boundary="))) { + bodyDecoded = ParseMultipartBody(body, bondary); + delete[] bondary; + } + } + } + if (!bodyDecoded)ConvertStringToUnicode(localBody ? localBody : body, MailParam->mail->MailData->CP, &bodyDecoded); + SetWindowTextW(hEdit, bodyDecoded); + delete[] bodyDecoded; + if (localBody) delete[] localBody; + SetFocus(hEdit); + } + if (!(MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED)) { + MailParam->mail->Flags |= YAMN_MSG_BODYREQUESTED; + CallService(MS_YAMN_ACCOUNTCHECK, (WPARAM)MailParam->account, 0); + } + else { + if (MailParam->mail->Flags & YAMN_MSG_UNSEEN) { + MailParam->mail->Flags &= ~YAMN_MSG_UNSEEN; //mark the message as seen + HWND hMailBrowser = WindowList_Find(YAMNVar.NewMailAccountWnd, (UINT_PTR)MailParam->account); + if (hMailBrowser) { + struct CChangeContent Params = {MailParam->account->NewMailN.Flags | YAMN_ACC_MSGP, MailParam->account->NoNewMailN.Flags | YAMN_ACC_MSGP}; + SendMessage(hMailBrowser, WM_YAMN_CHANGECONTENT, (WPARAM)MailParam->account, (LPARAM)&Params); + } + else UpdateMails(nullptr, MailParam->account, MailParam->account->NewMailN.Flags, MailParam->account->NoNewMailN.Flags); + } + } + ShowWindow(GetDlgItem(hDlg, IDC_SPLITTER), (MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED) ? SW_SHOW : SW_HIDE); + ShowWindow(hEdit, (MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED) ? SW_SHOW : SW_HIDE); + wchar_t *title = nullptr; + size_t size = (From ? mir_wstrlen(From) : 0) + (Subj ? mir_wstrlen(Subj) : 0) + 4; + title = new wchar_t[size]; + if (From && Subj) + mir_snwprintf(title, size, L"%s (%s)", Subj, From); + else if (From) + wcsncpy_s(title, size, From, _TRUNCATE); + else if (Subj) + wcsncpy_s(title, size, Subj, _TRUNCATE); + else + wcsncpy_s(title, size, L"none", _TRUNCATE); + if (Subj) delete[] Subj; + if (From) delete[] From; + SetWindowTextW(hDlg, title); + delete[] title; + // turn on redrawing + SendMessage(hListView, WM_SETREDRAW, 1, 0); + SendMessage(hDlg, WM_SIZE, 0, HeadSizeY << 16 | HeadSizeX); + } break; + + case WM_YAMN_STOPACCOUNT: + { + PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM) + (lParam ? lParam : GetWindowLongPtr(hDlg, DWLP_USER)); + + if (nullptr == MailParam) + break; + if ((CAccount *)wParam != MailParam->account) + break; + + DestroyWindow(hDlg); + } + return 1; + + case WM_CTLCOLORSTATIC: + // here should be check if this is our edittext control. + // but we have only one static control (for now); + SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); + SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); + return (INT_PTR)GetSysColorBrush(COLOR_WINDOW); + + case WM_DESTROY: + Window_FreeIcon_IcoLib(hDlg); + { + RECT coord; + if (GetWindowRect(hDlg, &coord)) { + HeadPosX = coord.left; + HeadSizeX = coord.right - coord.left; + HeadPosY = coord.top; + HeadSizeY = coord.bottom - coord.top; + } + + PostQuitMessage(1); + } + break; + + case WM_SYSCOMMAND: + switch (wParam) { + case SC_CLOSE: + DestroyWindow(hDlg); + break; + } + break; + + case WM_MOVE: + HeadPosX = LOWORD(lParam); //((LPRECT)lParam)->right-((LPRECT)lParam)->left; + HeadPosY = HIWORD(lParam); //((LPRECT)lParam)->bottom-((LPRECT)lParam)->top; + return 0; + + case DM_SPLITTERMOVED: + if ((HWND)lParam == GetDlgItem(hDlg, IDC_SPLITTER)) { + POINT pt; + pt.x = 0; + pt.y = wParam; + ScreenToClient(hDlg, &pt); + HeadSplitPos = (pt.y * 1000) / HeadSizeY;//+rc.bottom-rc.top; + if (HeadSplitPos >= 1000) HeadSplitPos = 999; + else if (HeadSplitPos <= 0) HeadSplitPos = 1; + else SendMessage(hDlg, WM_SIZE, 0, HeadSizeY << 16 | HeadSizeX); + } + return 0; + + case WM_SIZE: + if (wParam == SIZE_RESTORED) { + HWND hList = GetDlgItem(hDlg, IDC_LISTHEADERS); + HWND hEdit = GetDlgItem(hDlg, IDC_EDITBODY); + BOOL isBodyShown = ((PYAMN_MAILSHOWPARAM)(GetWindowLongPtr(hDlg, DWLP_USER)))->mail->Flags & YAMN_MSG_BODYRECEIVED; + HeadSizeX = LOWORD(lParam); //((LPRECT)lParam)->right-((LPRECT)lParam)->left; + HeadSizeY = HIWORD(lParam); //((LPRECT)lParam)->bottom-((LPRECT)lParam)->top; + int localSplitPos = (HeadSplitPos * HeadSizeY) / 1000; + int localSizeX; + RECT coord; + MoveWindow(GetDlgItem(hDlg, IDC_SPLITTER), 5, localSplitPos, HeadSizeX - 10, 2, TRUE); + MoveWindow(hEdit, 5, localSplitPos + 6, HeadSizeX - 10, HeadSizeY - localSplitPos - 11, TRUE); //where to put text window while resizing + MoveWindow(hList, 5, 5, HeadSizeX - 10, (isBodyShown ? localSplitPos : HeadSizeY) - 10, TRUE); //where to put headers list window while resizing + //if (changeX) { + if (GetClientRect(hList, &coord)) { + localSizeX = coord.right - coord.left; + } + else localSizeX = HeadSizeX; + LONG iNameWidth = ListView_GetColumnWidth(hList, 0); + ListView_SetColumnWidth(hList, 1, (localSizeX <= iNameWidth) ? 0 : (localSizeX - iNameWidth)); + //} + } + return 0; + + case WM_CONTEXTMENU: + if (GetWindowLongPtr((HWND)wParam, GWLP_ID) == IDC_LISTHEADERS) { + //MessageBox(0,"LISTHEADERS","Debug",0); + HWND hList = GetDlgItem(hDlg, IDC_LISTHEADERS); + POINT pt = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; + if (pt.x == -1) pt.x = 0; + if (pt.y == -1) pt.y = 0; + if (int numRows = ListView_GetItemCount(hList)) { + HMENU hMenu = CreatePopupMenu(); + AppendMenu(hMenu, MF_STRING, (UINT_PTR)1, TranslateT("Copy Selected")); + AppendMenu(hMenu, MF_STRING, (UINT_PTR)2, TranslateT("Copy All")); + AppendMenu(hMenu, MF_SEPARATOR, 0, nullptr); + AppendMenu(hMenu, MF_STRING, (UINT_PTR)0, TranslateT("Cancel")); + int nReturnCmd = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, nullptr); + DestroyMenu(hMenu); + if (nReturnCmd > 0) { + int courRow = 0; + size_t sizeNeeded = 0; + wchar_t headname[64] = {0}, headvalue[256] = {0}; + for (courRow = 0; courRow < numRows; courRow++) { + if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue; + ListView_GetItemText(hList, courRow, 0, headname, _countof(headname)); + ListView_GetItemText(hList, courRow, 1, headvalue, _countof(headvalue)); + size_t headnamelen = mir_wstrlen(headname); + if (headnamelen) sizeNeeded += 1 + headnamelen; + sizeNeeded += 3 + mir_wstrlen(headvalue); + } + if (sizeNeeded && OpenClipboard(hDlg)) { + EmptyClipboard(); + HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (sizeNeeded + 1) * sizeof(wchar_t)); + wchar_t *buff = (wchar_t *)GlobalLock(hData); + int courPos = 0; + for (courRow = 0; courRow < numRows; courRow++) { + if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue; + ListView_GetItemText(hList, courRow, 0, headname, _countof(headname)); + ListView_GetItemText(hList, courRow, 1, headvalue, _countof(headvalue)); + if (mir_wstrlen(headname)) courPos += mir_snwprintf(&buff[courPos], sizeNeeded + 1, L"%s:\t%s\r\n", headname, headvalue); + else courPos += mir_snwprintf(&buff[courPos], sizeNeeded + 1, L"\t%s\r\n", headvalue); + } + GlobalUnlock(hData); + + SetClipboardData(CF_UNICODETEXT, hData); + + CloseClipboard(); + } + } + } + } + break; // just in case + } + return 0; +} + +void __cdecl ShowEmailThread(void *Param) +{ + struct MailShowMsgWinParam MyParam = *(struct MailShowMsgWinParam *)Param; + + SCIncFcn(MyParam.account->UsingThreads); + + if (MyParam.mail->MsgWindow) { + //if (!BringWindowToTop(MyParam.mail->MsgWindow)) { + if (!SetForegroundWindow(MyParam.mail->MsgWindow)) { + SendMessage(MyParam.mail->MsgWindow, WM_DESTROY, 0, 0); + MyParam.mail->MsgWindow = nullptr; + goto CREADTEVIEWMESSAGEWINDOW; + } + + if (IsIconic(MyParam.mail->MsgWindow)) + OpenIcon(MyParam.mail->MsgWindow); + } + else { +CREADTEVIEWMESSAGEWINDOW: + MyParam.mail->MsgWindow = CreateDialogParamW(g_plugin.getInst(), MAKEINTRESOURCEW(IDD_DLGSHOWMESSAGE), nullptr, DlgProcYAMNShowMessage, (LPARAM)&MyParam); + WindowList_Add(YAMNVar.MessageWnds, MyParam.mail->MsgWindow); + MSG msg; + while (GetMessage(&msg, nullptr, 0, 0)) { + if (MyParam.mail->MsgWindow == nullptr || !IsDialogMessage(MyParam.mail->MsgWindow, &msg)) { /* Wine fix. */ + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + WindowList_Remove(YAMNVar.MessageWnds, MyParam.mail->MsgWindow); + MyParam.mail->MsgWindow = nullptr; + } + + SCDecFcn(MyParam.account->UsingThreads); + delete (struct MailShowMsgWinParam *)Param; +} + +INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + CAccount *ActualAccount; + int Items; + + switch (msg) { + case WM_INITDIALOG: + { + struct MailBrowserWinParam *MyParam = (struct MailBrowserWinParam *)lParam; + + ListView_SetUnicodeFormat(GetDlgItem(hDlg, IDC_LISTMAILS), TRUE); + ListView_SetExtendedListViewStyle(GetDlgItem(hDlg, IDC_LISTMAILS), LVS_EX_FULLROWSELECT); + + ActualAccount = MyParam->account; + struct CMailWinUserInfo *mwui = new struct CMailWinUserInfo; + mwui->Account = ActualAccount; + mwui->TrayIconState = 0; + mwui->UpdateMailsMessagesAccess = FALSE; + mwui->Seen = FALSE; + mwui->RunFirstTime = TRUE; + + SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)mwui); + if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) { + DestroyWindow(hDlg); + return FALSE; + } + + SetDlgItemText(hDlg, IDC_BTNAPP, TranslateT("Run application")); + SetDlgItemText(hDlg, IDC_BTNDEL, TranslateT("Delete selected")); + SetDlgItemText(hDlg, IDC_BTNCHECKALL, TranslateT("Select All")); + SetDlgItemText(hDlg, IDC_BTNOK, TranslateT("OK")); + + LVCOLUMN lvc0 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, FromWidth, TranslateT("From"), 0, 0}; + LVCOLUMN lvc1 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, SubjectWidth, TranslateT("Subject"), 0, 0}; + LVCOLUMN lvc2 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, SizeWidth, TranslateT("Size"), 0, 0}; + LVCOLUMN lvc3 = {LVCF_FMT | LVCF_TEXT | LVCF_WIDTH, LVCFMT_LEFT, SizeDate, TranslateT("Date"), 0, 0}; + SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMN, 0, (LPARAM)&lvc0); + SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMN, 1, (LPARAM)&lvc1); + SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMN, (WPARAM)2, (LPARAM)&lvc2); + SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_INSERTCOLUMN, (WPARAM)3, (LPARAM)&lvc3); + + if ((ActualAccount->NewMailN.App != nullptr) && (mir_wstrlen(ActualAccount->NewMailN.App))) + EnableWindow(GetDlgItem(hDlg, IDC_BTNAPP), TRUE); + else + EnableWindow(GetDlgItem(hDlg, IDC_BTNAPP), FALSE); + + ReadDoneFcn(ActualAccount->AccountAccessSO); + + WindowList_Add(YAMNVar.MessageWnds, hDlg); + WindowList_Add(YAMNVar.NewMailAccountWnd, hDlg, (UINT_PTR)ActualAccount); + + { + wchar_t accstatus[512]; + GetStatusFcn(ActualAccount, accstatus); + SetDlgItemText(hDlg, IDC_STSTATUS, accstatus); + } + SetTimer(hDlg, TIMER_FLASHING, 500, nullptr); + + if (ActualAccount->hContact != NULL) + g_clistApi.pfnRemoveEvent(ActualAccount->hContact, (LPARAM)"yamn new mail message"); + + mir_subclassWindow(GetDlgItem(hDlg, IDC_LISTMAILS), ListViewSubclassProc); + } + break; + + case WM_DESTROY: + { + RECT coord; + LVCOLUMN ColInfo; + HYAMNMAIL Parser; + + Window_FreeIcon_IcoLib(hDlg); + + struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); + if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) + break; + ColInfo.mask = LVCF_WIDTH; + if (ListView_GetColumn(GetDlgItem(hDlg, IDC_LISTMAILS), 0, &ColInfo)) + FromWidth = ColInfo.cx; + if (ListView_GetColumn(GetDlgItem(hDlg, IDC_LISTMAILS), 1, &ColInfo)) + SubjectWidth = ColInfo.cx; + if (ListView_GetColumn(GetDlgItem(hDlg, IDC_LISTMAILS), 2, &ColInfo)) + SizeWidth = ColInfo.cx; + if (ListView_GetColumn(GetDlgItem(hDlg, IDC_LISTMAILS), 3, &ColInfo)) + SizeDate = ColInfo.cx; + + if (!YAMNVar.Shutdown && GetWindowRect(hDlg, &coord)) //the YAMNVar.Shutdown testing is because MMessagesAccessSO)) + break; + + //delete mails from queue, which are deleted from server (spam level 3 mails e.g.) + for (Parser = (HYAMNMAIL)ActualAccount->Mails; Parser != nullptr; Parser = Parser->Next) { + if ((Parser->Flags & YAMN_MSG_DELETED) && YAMN_MSG_SPAML(Parser->Flags, YAMN_MSG_SPAML3) && mwui->Seen) //if spaml3 was already deleted and user knows about it + { + DeleteMessageFromQueueFcn((HYAMNMAIL *)&ActualAccount->Mails, Parser, 1); + CallService(MS_YAMN_DELETEACCOUNTMAIL, (WPARAM)ActualAccount->Plugin, (LPARAM)Parser); + } + } + + //mark mails as read (remove "new" and "unseen" flags) + if (mwui->Seen) + SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_DISPLAY, 0, YAMN_MSG_NEW | YAMN_MSG_UNSEEN, 0); + + WriteDoneFcn(ActualAccount->MessagesAccessSO); + + NOTIFYICONDATA nid; + memset(&nid, 0, sizeof(NOTIFYICONDATA)); + + delete mwui; + SetWindowLongPtr(hDlg, DWLP_USER, NULL); + + nid.cbSize = sizeof(NOTIFYICONDATA); + nid.hWnd = hDlg; + nid.uID = 0; + Shell_NotifyIcon(NIM_DELETE, &nid); + PostQuitMessage(0); + } + break; + + case WM_SHOWWINDOW: + { + struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); + + if (mwui == nullptr) + return 0; + mwui->Seen = TRUE; + } + + case WM_YAMN_CHANGESTATUS: + if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) + break; + + if ((CAccount *)wParam != ActualAccount) + break; + + wchar_t accstatus[512]; + GetStatusFcn(ActualAccount, accstatus); + SetDlgItemText(hDlg, IDC_STSTATUS, accstatus); + return 1; + + case WM_YAMN_CHANGECONTENT: + { + struct CUpdateMails UpdateParams; + BOOL ThisThreadWindow = (GetCurrentThreadId() == GetWindowThreadProcessId(hDlg, nullptr)); + + if (nullptr == (UpdateParams.Copied = CreateEvent(nullptr, FALSE, FALSE, nullptr))) { + DestroyWindow(hDlg); + return 0; + } + UpdateParams.Flags = (struct CChangeContent *)lParam; + UpdateParams.Waiting = !ThisThreadWindow; + + if (ThisThreadWindow) { + if (!UpdateMails(hDlg, (CAccount *)wParam, UpdateParams.Flags->nflags, UpdateParams.Flags->nnflags)) + DestroyWindow(hDlg); + } + else if (PostMessage(hDlg, WM_YAMN_UPDATEMAILS, wParam, (LPARAM)&UpdateParams)) //this ensures UpdateMails will execute the thread who created the browser window + { + if (!ThisThreadWindow) + WaitForSingleObject(UpdateParams.Copied, INFINITE); + } + + CloseHandle(UpdateParams.Copied); + } + return 1; + case WM_YAMN_UPDATEMAILS: + { + struct CUpdateMails *um = (struct CUpdateMails *)lParam; + uint32_t nflags, nnflags; + + if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) + return 0; + if ((CAccount *)wParam != ActualAccount) + return 0; + + nflags = um->Flags->nflags; + nnflags = um->Flags->nnflags; + + if (um->Waiting) + SetEvent(um->Copied); + + if (!UpdateMails(hDlg, ActualAccount, nflags, nnflags)) + DestroyWindow(hDlg); + } + return 1; + case WM_YAMN_STOPACCOUNT: + if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) + break; + if ((CAccount *)wParam != ActualAccount) + break; + PostQuitMessage(0); + return 1; + + case WM_YAMN_NOTIFYICON: + if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) + break; + + switch (lParam) { + case WM_LBUTTONDBLCLK: + if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) { + return 0; + } + + if (ActualAccount->AbilityFlags & YAMN_ACC_BROWSE) { + ShowWindow(hDlg, SW_SHOWNORMAL); + SetForegroundWindow(hDlg); + } + else DestroyWindow(hDlg); + + ReadDoneFcn(ActualAccount->AccountAccessSO); + break; + } + break; + + case WM_YAMN_SHOWSELECTED: + { + int iSelect = SendDlgItemMessage(hDlg, IDC_LISTMAILS, LVM_GETNEXTITEM, -1, MAKELPARAM((UINT)LVNI_FOCUSED, 0)); // return item selected + if (iSelect != -1) { + LV_ITEMW item; + + item.iItem = iSelect; + item.iSubItem = 0; + item.mask = LVIF_PARAM | LVIF_STATE; + item.stateMask = 0xFFFFFFFF; + ListView_GetItem(GetDlgItem(hDlg, IDC_LISTMAILS), &item); + HYAMNMAIL ActualMail = (HYAMNMAIL)item.lParam; + if (nullptr != ActualMail) { + PYAMN_MAILSHOWPARAM MailParam = new YAMN_MAILSHOWPARAM; + MailParam->account = GetWindowAccount(hDlg); + MailParam->mail = ActualMail; + mir_forkthread(ShowEmailThread, MailParam); + } + } + } + break; + + case WM_SYSCOMMAND: + if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) + break; + switch (wParam) { + case SC_CLOSE: + DestroyWindow(hDlg); + break; + } + break; + + case WM_COMMAND: + if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) + break; + + switch (LOWORD(wParam)) { + case IDC_BTNCHECKALL: + ListView_SetItemState(GetDlgItem(hDlg, IDC_LISTMAILS), -1, 0, LVIS_SELECTED); // deselect all items + ListView_SetItemState(GetDlgItem(hDlg, IDC_LISTMAILS), -1, LVIS_SELECTED, LVIS_SELECTED); + Items = ListView_GetItemCount(GetDlgItem(hDlg, IDC_LISTMAILS)); + ListView_RedrawItems(GetDlgItem(hDlg, IDC_LISTMAILS), 0, Items); + UpdateWindow(GetDlgItem(hDlg, IDC_LISTMAILS)); + SetFocus(GetDlgItem(hDlg, IDC_LISTMAILS)); + break; + + case IDC_BTNOK: + DestroyWindow(hDlg); + break; + + case IDC_BTNAPP: + { + PROCESS_INFORMATION pi; + STARTUPINFOW si; + + memset(&si, 0, sizeof(si)); + si.cb = sizeof(si); + + if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { + if (ActualAccount->NewMailN.App != nullptr) { + wchar_t *Command; + if (ActualAccount->NewMailN.AppParam != nullptr) + Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6]; + else + Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + 6]; + + if (Command != nullptr) { + mir_wstrcpy(Command, L"\""); + mir_wstrcat(Command, ActualAccount->NewMailN.App); + mir_wstrcat(Command, L"\" "); + if (ActualAccount->NewMailN.AppParam != nullptr) + mir_wstrcat(Command, ActualAccount->NewMailN.AppParam); + CreateProcessW(nullptr, Command, nullptr, nullptr, FALSE, NORMAL_PRIORITY_CLASS, nullptr, nullptr, &si, &pi); + delete[] Command; + } + } + + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + + if (!(GetKeyState(VK_SHIFT) & 0x8000) && !(GetKeyState(VK_CONTROL) & 0x8000)) + DestroyWindow(hDlg); + } + break; + + case IDC_BTNDEL: + { + HYAMNMAIL ActualMail; + uint32_t Total = 0; + + // we use event to signal, that running thread has all needed stack parameters copied + HANDLE ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr); + if (ThreadRunningEV == nullptr) + break; + + Items = ListView_GetItemCount(GetDlgItem(hDlg, IDC_LISTMAILS)); + + LVITEM item; + item.stateMask = 0xFFFFFFFF; + + if (WAIT_OBJECT_0 == WaitToWriteFcn(ActualAccount->MessagesAccessSO)) { + for (int i = 0; i < Items; i++) { + item.iItem = i; + item.iSubItem = 0; + item.mask = LVIF_PARAM | LVIF_STATE; + item.stateMask = 0xFFFFFFFF; + ListView_GetItem(GetDlgItem(hDlg, IDC_LISTMAILS), &item); + ActualMail = (HYAMNMAIL)item.lParam; + if (nullptr == ActualMail) + break; + if (item.state & LVIS_SELECTED) { + ActualMail->Flags |= YAMN_MSG_USERDELETE; //set to mail we are going to delete it + Total++; + } + } + + // Enable write-access to mails + WriteDoneFcn(ActualAccount->MessagesAccessSO); + + if (Total) { + wchar_t DeleteMsg[1024]; + + mir_snwprintf(DeleteMsg, TranslateT("Do you really want to delete %d selected mails?"), Total); + if (IDOK == MessageBox(hDlg, DeleteMsg, TranslateT("Delete confirmation"), MB_OKCANCEL | MB_ICONWARNING)) { + struct DeleteParam ParamToDeleteMails = {YAMN_DELETEVERSION, ThreadRunningEV, ActualAccount, nullptr}; + + // Find if there's mail marked to delete, which was deleted before + if (WAIT_OBJECT_0 == WaitToWriteFcn(ActualAccount->MessagesAccessSO)) { + for (ActualMail = (HYAMNMAIL)ActualAccount->Mails; ActualMail != nullptr; ActualMail = ActualMail->Next) { + if ((ActualMail->Flags & YAMN_MSG_DELETED) && ((ActualMail->Flags & YAMN_MSG_USERDELETE))) //if selected mail was already deleted + { + DeleteMessageFromQueueFcn((HYAMNMAIL *)&ActualAccount->Mails, ActualMail, 1); + CallService(MS_YAMN_DELETEACCOUNTMAIL, (WPARAM)ActualAccount->Plugin, (LPARAM)ActualMail); //delete it from memory + continue; + } + } + // Set flag to marked mails that they can be deleted + SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_DISPLAY | YAMN_MSG_USERDELETE, 0, YAMN_MSG_DELETEOK, 1); + // Create new thread which deletes marked mails. + HANDLE NewThread = mir_forkthread(ActualAccount->Plugin->Fcn->DeleteMailsFcnPtr, &ParamToDeleteMails); + if (NewThread != nullptr) + WaitForSingleObject(ThreadRunningEV, INFINITE); + + // Enable write-access to mails + WriteDoneFcn(ActualAccount->MessagesAccessSO); + } + } + else //else mark messages that they are not to be deleted + SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_DISPLAY | YAMN_MSG_USERDELETE, 0, YAMN_MSG_USERDELETE, 0); + } + } + CloseHandle(ThreadRunningEV); + if (g_plugin.getByte(YAMN_CLOSEDELETE, 0)) + DestroyWindow(hDlg); + } + break; + } + break; + + case WM_SIZE: + if (wParam == SIZE_RESTORED) { + LONG x = LOWORD(lParam); //((LPRECT)lParam)->right-((LPRECT)lParam)->left; + LONG y = HIWORD(lParam); //((LPRECT)lParam)->bottom-((LPRECT)lParam)->top; + MoveWindow(GetDlgItem(hDlg, IDC_BTNDEL), 5, y - 5 - 25, (x - 20) / 3, 25, TRUE); //where to put DELETE button while resizing + MoveWindow(GetDlgItem(hDlg, IDC_BTNCHECKALL), 10 + (x - 20) / 3, y - 5 - 25, (x - 20) / 6, 25, TRUE); //where to put CHECK ALL button while resizing + MoveWindow(GetDlgItem(hDlg, IDC_BTNAPP), 15 + (x - 20) / 3 + (x - 20) / 6, y - 5 - 25, (x - 20) / 3, 25, TRUE); //where to put RUN APP button while resizing + MoveWindow(GetDlgItem(hDlg, IDC_BTNOK), 20 + 2 * (x - 20) / 3 + (x - 20) / 6, y - 5 - 25, (x - 20) / 6, 25, TRUE); //where to put OK button while resizing + MoveWindow(GetDlgItem(hDlg, IDC_LISTMAILS), 5, 5, x - 10, y - 55, TRUE); //where to put list mail window while resizing + MoveWindow(GetDlgItem(hDlg, IDC_STSTATUS), 5, y - 5 - 45, x - 10, 15, TRUE); //where to put account status text while resizing + } + return 0; + + case WM_GETMINMAXINFO: + ((LPMINMAXINFO)lParam)->ptMinTrackSize.x = MAILBROWSER_MINXSIZE; + ((LPMINMAXINFO)lParam)->ptMinTrackSize.y = MAILBROWSER_MINYSIZE; + return 0; + + case WM_TIMER: + { + NOTIFYICONDATA nid; + struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); + + memset(&nid, 0, sizeof(nid)); + nid.cbSize = sizeof(NOTIFYICONDATA); + nid.hWnd = hDlg; + nid.uID = 0; + nid.uFlags = NIF_ICON; + if (mwui->TrayIconState == 0) + nid.hIcon = g_plugin.getIcon(IDI_CHECKMAIL); + else + nid.hIcon = g_plugin.getIcon(IDI_NEWMAIL); + Shell_NotifyIcon(NIM_MODIFY, &nid); + mwui->TrayIconState = !mwui->TrayIconState; + // UpdateWindow(hDlg); + } + break; + + case WM_NOTIFY: + switch (((LPNMHDR)lParam)->idFrom) { + case IDC_LISTMAILS: + switch (((LPNMHDR)lParam)->code) { + case NM_DBLCLK: + SendMessage(hDlg, WM_YAMN_SHOWSELECTED, 0, 0); + break; + + case LVN_COLUMNCLICK: + if (nullptr != (ActualAccount = GetWindowAccount(hDlg))) { + NM_LISTVIEW *pNMListView = (NM_LISTVIEW *)lParam; + if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { + switch ((int)pNMListView->iSubItem) { + case 0: + bFrom = !bFrom; + break; + case 1: + bSub = !bSub; + break; + case 2: + bSize = !bSize; + break; + case 3: + bDate = !bDate; + break; + default: + break; + } + ListView_SortItems(pNMListView->hdr.hwndFrom, ListViewCompareProc, pNMListView->iSubItem); + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + } + break; + + case NM_CUSTOMDRAW: + { + LPNMLVCUSTOMDRAW cd = (LPNMLVCUSTOMDRAW)lParam; + LONG_PTR PaintCode; + + if (nullptr == (ActualAccount = GetWindowAccount(hDlg))) + break; + + switch (cd->nmcd.dwDrawStage) { + case CDDS_PREPAINT: + PaintCode = CDRF_NOTIFYITEMDRAW; + break; + case CDDS_ITEMPREPAINT: + PaintCode = CDRF_NOTIFYSUBITEMDRAW; + break; + case CDDS_ITEMPREPAINT | CDDS_SUBITEM: + { + BOOL umma; + { + struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER); + umma = mwui->UpdateMailsMessagesAccess; + } + HYAMNMAIL ActualMail = (HYAMNMAIL)cd->nmcd.lItemlParam; + if (!ActualMail) + ActualMail = (HYAMNMAIL)readItemLParam(cd->nmcd.hdr.hwndFrom, cd->nmcd.dwItemSpec); + + if (!umma) + if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->MessagesAccessSO)) + return 0; + + switch (ActualMail->Flags & YAMN_MSG_SPAMMASK) { + case YAMN_MSG_SPAML1: + case YAMN_MSG_SPAML2: + cd->clrText = RGB(150, 150, 150); + break; + case YAMN_MSG_SPAML3: + cd->clrText = RGB(200, 200, 200); + cd->clrTextBk = RGB(160, 160, 160); + break; + case 0: + if (cd->nmcd.dwItemSpec & 1) + cd->clrTextBk = RGB(230, 230, 230); + break; + default: + break; + } + if (ActualMail->Flags & YAMN_MSG_UNSEEN) + cd->clrTextBk = RGB(220, 235, 250); + PaintCode = CDRF_DODEFAULT; + + if (!umma) + ReadDoneFcn(ActualAccount->MessagesAccessSO); + break; + } + default: + PaintCode = 0; + } + SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PaintCode); + return 1; + } + } + } + break; + + case WM_CONTEXTMENU: + if (GetWindowLongPtr((HWND)wParam, GWLP_ID) == IDC_LISTMAILS) { + //MessageBox(0,"LISTHEADERS","Debug",0); + HWND hList = GetDlgItem(hDlg, IDC_LISTMAILS); + POINT pt = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; + if (pt.x == -1) pt.x = 0; + if (pt.y == -1) pt.y = 0; + if (int numRows = ListView_GetItemCount(hList)) { + HMENU hMenu = CreatePopupMenu(); + AppendMenu(hMenu, MF_STRING, (UINT_PTR)1, TranslateT("Copy Selected")); + AppendMenu(hMenu, MF_STRING, (UINT_PTR)2, TranslateT("Copy All")); + AppendMenu(hMenu, MF_SEPARATOR, 0, nullptr); + AppendMenu(hMenu, MF_STRING, (UINT_PTR)0, TranslateT("Cancel")); + int nReturnCmd = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, nullptr); + DestroyMenu(hMenu); + if (nReturnCmd > 0) { + int courRow = 0; + size_t sizeNeeded = 0; + wchar_t from[128] = {0}, subject[256] = {0}, size[16] = {0}, date[64] = {0}; + for (courRow = 0; courRow < numRows; courRow++) { + if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue; + ListView_GetItemText(hList, courRow, 0, from, _countof(from)); + ListView_GetItemText(hList, courRow, 1, subject, _countof(subject)); + ListView_GetItemText(hList, courRow, 2, size, _countof(size)); + ListView_GetItemText(hList, courRow, 3, date, _countof(date)); + sizeNeeded += 5 + mir_wstrlen(from) + mir_wstrlen(subject) + mir_wstrlen(size) + mir_wstrlen(date); + } + if (sizeNeeded && OpenClipboard(hDlg)) { + EmptyClipboard(); + HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (sizeNeeded + 1) * sizeof(wchar_t)); + wchar_t *buff = (wchar_t *)GlobalLock(hData); + int courPos = 0; + for (courRow = 0; courRow < numRows; courRow++) { + if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue; + ListView_GetItemText(hList, courRow, 0, from, _countof(from)); + ListView_GetItemText(hList, courRow, 1, subject, _countof(subject)); + ListView_GetItemText(hList, courRow, 2, size, _countof(size)); + ListView_GetItemText(hList, courRow, 3, date, _countof(date)); + courPos += mir_snwprintf(&buff[courPos], sizeNeeded + 1, L"%s\t%s\t%s\t%s\r\n", from, subject, size, date); + } + GlobalUnlock(hData); + + SetClipboardData(CF_UNICODETEXT, hData); + + CloseClipboard(); + } + } + } + } + break; // just in case + } + return 0; +} + +LRESULT CALLBACK ListViewSubclassProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + HWND hwndParent = GetParent(hDlg); + + switch (msg) { + case WM_GETDLGCODE: + { + LPMSG lpmsg = (LPMSG)lParam; + if (lpmsg != nullptr) { + if (lpmsg->message == WM_KEYDOWN + && lpmsg->wParam == VK_RETURN) + return DLGC_WANTALLKEYS; + } + } + break; + + case WM_KEYDOWN: + { + BOOL isCtrl = GetKeyState(VK_CONTROL) & 0x8000; + BOOL isShift = GetKeyState(VK_SHIFT) & 0x8000; + BOOL isAlt = GetKeyState(VK_MENU) & 0x8000; + + switch (wParam) { + case 'A': // ctrl-a + if (!isAlt && !isShift && isCtrl) SendMessage(hwndParent, WM_COMMAND, IDC_BTNCHECKALL, 0); + break; + case VK_RETURN: + case VK_SPACE: + if (!isAlt && !isShift && !isCtrl) SendMessage(hwndParent, WM_YAMN_SHOWSELECTED, 0, 0); + break; + case VK_DELETE: + SendMessage(hwndParent, WM_COMMAND, IDC_BTNDEL, 0); + break; + } + } + break; + } + return mir_callNextSubclass(hDlg, ListViewSubclassProc, msg, wParam, lParam); +} + +void __cdecl MailBrowser(void *Param) +{ + MSG msg; + + HWND hMailBrowser; + BOOL WndFound = FALSE; + + struct MailBrowserWinParam MyParam = *(struct MailBrowserWinParam *)Param; + CAccount *ActualAccount = MyParam.account; + SCIncFcn(ActualAccount->UsingThreads); + + // we will not use params in stack anymore + SetEvent(MyParam.ThreadRunningEV); + + __try { + if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) + return; + + if (!(ActualAccount->AbilityFlags & YAMN_ACC_BROWSE)) { + MyParam.nflags = MyParam.nflags & ~YAMN_ACC_MSG; + MyParam.nnflags = MyParam.nnflags & ~YAMN_ACC_MSG; + } + + if (!(ActualAccount->AbilityFlags & YAMN_ACC_POPUP)) + MyParam.nflags = MyParam.nflags & ~YAMN_ACC_POP; + + ReadDoneFcn(ActualAccount->AccountAccessSO); + + if (nullptr != (hMailBrowser = WindowList_Find(YAMNVar.NewMailAccountWnd, (UINT_PTR)ActualAccount))) + WndFound = TRUE; + + if ((hMailBrowser == nullptr) && ((MyParam.nflags & YAMN_ACC_MSG) || (MyParam.nflags & YAMN_ACC_ICO) || (MyParam.nnflags & YAMN_ACC_MSG))) { + hMailBrowser = CreateDialogParamW(g_plugin.getInst(), MAKEINTRESOURCEW(IDD_DLGVIEWMESSAGES), nullptr, DlgProcYAMNMailBrowser, (LPARAM)&MyParam); + Window_SetIcon_IcoLib(hMailBrowser, g_plugin.getIconHandle(IDI_NEWMAIL)); + MoveWindow(hMailBrowser, PosX, PosY, SizeX, SizeY, TRUE); + } + + if (hMailBrowser != nullptr) { + struct CChangeContent Params = {MyParam.nflags, MyParam.nnflags}; //if this thread created window, just post message to update mails + + SendMessage(hMailBrowser, WM_YAMN_CHANGECONTENT, (WPARAM)ActualAccount, (LPARAM)&Params); //we ensure this will do the thread who created the browser window + } + else + UpdateMails(nullptr, ActualAccount, MyParam.nflags, MyParam.nnflags); //update mails without displaying or refreshing any window + + if ((hMailBrowser != nullptr) && !WndFound) { //we process message loop only for thread that created window + while (GetMessage(&msg, nullptr, 0, 0)) { + if (hMailBrowser == nullptr || !IsDialogMessage(hMailBrowser, &msg)) { /* Wine fix. */ + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + } + + if ((!WndFound) && (ActualAccount->Plugin->Fcn != nullptr) && (ActualAccount->Plugin->Fcn->WriteAccountsFcnPtr != nullptr) && ActualAccount->AbleToWork) + ActualAccount->Plugin->Fcn->WriteAccountsFcnPtr(); + } + __finally { + SCDecFcn(ActualAccount->UsingThreads); + } +} + +INT_PTR RunMailBrowserSvc(WPARAM wParam, LPARAM lParam) +{ + PYAMN_MAILBROWSERPARAM Param = (PYAMN_MAILBROWSERPARAM)wParam; + + if ((uint32_t)lParam != YAMN_MAILBROWSERVERSION) + return 0; + + //an event for successfull copy parameters to which point a pointer in stack for new thread + HANDLE ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr); + Param->ThreadRunningEV = ThreadRunningEV; + + HANDLE NewThread = mir_forkthread(MailBrowser, Param); + if (NewThread != nullptr) + WaitForSingleObject(ThreadRunningEV, INFINITE); + + CloseHandle(ThreadRunningEV); + return 1; +} diff --git a/protocols/YAMN/src/debug.cpp b/protocols/YAMN/src/debug.cpp index 1fc41adc19..65322366ab 100644 --- a/protocols/YAMN/src/debug.cpp +++ b/protocols/YAMN/src/debug.cpp @@ -1,111 +1,111 @@ -/* - * YAMN plugin main file - * Miranda homepage: http://miranda-icq.sourceforge.net/ - * - * Debug functions used in DEBUG release (you need to global #define DEBUG to get debug version) - * - * (c) majvan 2002-2004 - */ - -#include "stdafx.h" - -#ifdef _DEBUG - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -wchar_t DebugUserDirectory[MAX_PATH] = L"."; -CRITICAL_SECTION FileAccessCS; - -#ifdef DEBUG_COMM -wchar_t DebugCommFileName2[]=L"%s\\yamn-debug.comm.log"; -HANDLE CommFile; -#endif - -#ifdef DEBUG_DECODE -wchar_t DebugDecodeFileName2[]=L"%s\\yamn-debug.decode.log"; -HANDLE DecodeFile; -#endif - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -void InitDebug() -{ -#if defined (DEBUG_COMM) || defined (DEBUG_DECODE) - wchar_t DebugFileName[MAX_PATH]; -#endif - InitializeCriticalSection(&FileAccessCS); - -#ifdef DEBUG_COMM - mir_snwprintf(DebugFileName, DebugCommFileName2, DebugUserDirectory); - - CommFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL); - DebugLog(CommFile,"Communication debug file created by %s\n",YAMN_VER); -#endif - -#ifdef DEBUG_DECODE - mir_snwprintf(DebugFileName, DebugDecodeFileName2, DebugUserDirectory); - - DecodeFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL); - DebugLog(DecodeFile,"Decoding kernel debug file created by %s\n",YAMN_VER); -#endif -} - -void UnInitDebug() -{ - DeleteCriticalSection(&FileAccessCS); -#ifdef DEBUG_COMM - DebugLog(CommFile,"File is being closed normally."); - CloseHandle(CommFile); -#endif -#ifdef DEBUG_DECODE - DebugLog(DecodeFile,"File is being closed normally."); - CloseHandle(DecodeFile); -#endif -} - - -void DebugLog(HANDLE File,const char *fmt,...) -{ - char *str; - char tids[32]; - va_list vararg; - int strsize; - DWORD Written; - - va_start(vararg,fmt); - str=(char *)malloc(strsize=65536); - mir_snprintf(tids, "[%x]",GetCurrentThreadId()); - while(mir_vsnprintf(str, strsize, fmt, vararg)==-1) - str=(char *)realloc(str,strsize+=65536); - va_end(vararg); - EnterCriticalSection(&FileAccessCS); - WriteFile(File,tids,(uint32_t)mir_strlen(tids),&Written,nullptr); - WriteFile(File,str,(uint32_t)mir_strlen(str),&Written,nullptr); - LeaveCriticalSection(&FileAccessCS); - free(str); -} - -void DebugLogW(HANDLE File,const wchar_t *fmt,...) -{ - wchar_t *str; - char tids[32]; - va_list vararg; - int strsize; - DWORD Written; - - va_start(vararg,fmt); - str=(wchar_t *)malloc((strsize=65536)*sizeof(wchar_t)); - mir_snprintf(tids, "[%x]",GetCurrentThreadId()); - while(mir_vsnwprintf(str, strsize, fmt, vararg)==-1) - str=(wchar_t *)realloc(str,(strsize+=65536)*sizeof(wchar_t)); - va_end(vararg); - EnterCriticalSection(&FileAccessCS); - WriteFile(File,tids,(uint32_t)mir_strlen(tids),&Written,nullptr); - WriteFile(File,str,(uint32_t)mir_wstrlen(str)*sizeof(wchar_t),&Written,nullptr); - LeaveCriticalSection(&FileAccessCS); - free(str); -} - +/* + * YAMN plugin main file + * Miranda homepage: http://miranda-icq.sourceforge.net/ + * + * Debug functions used in DEBUG release (you need to global #define DEBUG to get debug version) + * + * (c) majvan 2002-2004 + */ + +#include "stdafx.h" + +#ifdef _DEBUG + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +wchar_t DebugUserDirectory[MAX_PATH] = L"."; +CRITICAL_SECTION FileAccessCS; + +#ifdef DEBUG_COMM +wchar_t DebugCommFileName2[]=L"%s\\yamn-debug.comm.log"; +HANDLE CommFile; +#endif + +#ifdef DEBUG_DECODE +wchar_t DebugDecodeFileName2[]=L"%s\\yamn-debug.decode.log"; +HANDLE DecodeFile; +#endif + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +void InitDebug() +{ +#if defined (DEBUG_COMM) || defined (DEBUG_DECODE) + wchar_t DebugFileName[MAX_PATH]; +#endif + InitializeCriticalSection(&FileAccessCS); + +#ifdef DEBUG_COMM + mir_snwprintf(DebugFileName, DebugCommFileName2, DebugUserDirectory); + + CommFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL); + DebugLog(CommFile,"Communication debug file created by %s\n",YAMN_VER); +#endif + +#ifdef DEBUG_DECODE + mir_snwprintf(DebugFileName, DebugDecodeFileName2, DebugUserDirectory); + + DecodeFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL); + DebugLog(DecodeFile,"Decoding kernel debug file created by %s\n",YAMN_VER); +#endif +} + +void UnInitDebug() +{ + DeleteCriticalSection(&FileAccessCS); +#ifdef DEBUG_COMM + DebugLog(CommFile,"File is being closed normally."); + CloseHandle(CommFile); +#endif +#ifdef DEBUG_DECODE + DebugLog(DecodeFile,"File is being closed normally."); + CloseHandle(DecodeFile); +#endif +} + + +void DebugLog(HANDLE File,const char *fmt,...) +{ + char *str; + char tids[32]; + va_list vararg; + int strsize; + DWORD Written; + + va_start(vararg,fmt); + str=(char *)malloc(strsize=65536); + mir_snprintf(tids, "[%x]",GetCurrentThreadId()); + while(mir_vsnprintf(str, strsize, fmt, vararg)==-1) + str=(char *)realloc(str,strsize+=65536); + va_end(vararg); + EnterCriticalSection(&FileAccessCS); + WriteFile(File,tids,(uint32_t)mir_strlen(tids),&Written,nullptr); + WriteFile(File,str,(uint32_t)mir_strlen(str),&Written,nullptr); + LeaveCriticalSection(&FileAccessCS); + free(str); +} + +void DebugLogW(HANDLE File,const wchar_t *fmt,...) +{ + wchar_t *str; + char tids[32]; + va_list vararg; + int strsize; + DWORD Written; + + va_start(vararg,fmt); + str=(wchar_t *)malloc((strsize=65536)*sizeof(wchar_t)); + mir_snprintf(tids, "[%x]",GetCurrentThreadId()); + while(mir_vsnwprintf(str, strsize, fmt, vararg)==-1) + str=(wchar_t *)realloc(str,(strsize+=65536)*sizeof(wchar_t)); + va_end(vararg); + EnterCriticalSection(&FileAccessCS); + WriteFile(File,tids,(uint32_t)mir_strlen(tids),&Written,nullptr); + WriteFile(File,str,(uint32_t)mir_wstrlen(str)*sizeof(wchar_t),&Written,nullptr); + LeaveCriticalSection(&FileAccessCS); + free(str); +} + #endif //ifdef DEBUG \ No newline at end of file diff --git a/protocols/YAMN/src/debug.h b/protocols/YAMN/src/debug.h index a13ac952b0..e2e8e3e506 100644 --- a/protocols/YAMN/src/debug.h +++ b/protocols/YAMN/src/debug.h @@ -1,50 +1,50 @@ -#ifndef __DEBUG_H -#define __DEBUG_H - -#ifdef _DEBUG - -//#define DEBUG_COMM //debug communiation to a file -//#define DEBUG_DECODE //debug header decoding to a file -//#define DEBUG_DECODECODEPAGE //add info about codepage used in conversion -//#define DEBUG_DECODEBASE64 //add info about base64 result -//#define DEBUG_DECODEQUOTED //add info about quoted printable result -//#define DEBUG_FILEREAD //debug file reading to message boxes -//#define DEBUG_FILEREADMESSAGES //debug file reading messages to message boxes - -void DebugLog(HANDLE,const char *fmt,...); -void DebugLogW(HANDLE File,const wchar_t *fmt,...); - -#ifdef DEBUG_SYNCHRO -// Used for synchronization debug -extern HANDLE SynchroFile; -#endif - -#ifdef DEBUG_COMM -// Used for communication debug -extern HANDLE CommFile; -#endif - -#ifdef DEBUG_DECODE -// Used for decoding debug -extern HANDLE DecodeFile; -#endif - -#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES) -uint32_t ReadStringFromMemory(char **Parser,char *End,char **StoreTo,char *DebugString); - -uint32_t ReadStringFromMemoryW(char **Parser,wchar_t *End,char **StoreTo,wchar_t *DebugString); - -#else -uint32_t ReadStringFromMemory(char **Parser,char *End,char **StoreTo); - -uint32_t ReadStringFromMemoryW(wchar_t **Parser,wchar_t *End,wchar_t **StoreTo); - -#endif - -//#ifdef DEBUG_ACCOUNTS -//int GetAccounts(); -//void WriteAccounts(); -//#endif - -#endif //YAMN_DEBUG -#endif //_DEBUG_H +#ifndef __DEBUG_H +#define __DEBUG_H + +#ifdef _DEBUG + +//#define DEBUG_COMM //debug communiation to a file +//#define DEBUG_DECODE //debug header decoding to a file +//#define DEBUG_DECODECODEPAGE //add info about codepage used in conversion +//#define DEBUG_DECODEBASE64 //add info about base64 result +//#define DEBUG_DECODEQUOTED //add info about quoted printable result +//#define DEBUG_FILEREAD //debug file reading to message boxes +//#define DEBUG_FILEREADMESSAGES //debug file reading messages to message boxes + +void DebugLog(HANDLE,const char *fmt,...); +void DebugLogW(HANDLE File,const wchar_t *fmt,...); + +#ifdef DEBUG_SYNCHRO +// Used for synchronization debug +extern HANDLE SynchroFile; +#endif + +#ifdef DEBUG_COMM +// Used for communication debug +extern HANDLE CommFile; +#endif + +#ifdef DEBUG_DECODE +// Used for decoding debug +extern HANDLE DecodeFile; +#endif + +#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES) +uint32_t ReadStringFromMemory(char **Parser,char *End,char **StoreTo,char *DebugString); + +uint32_t ReadStringFromMemoryW(char **Parser,wchar_t *End,char **StoreTo,wchar_t *DebugString); + +#else +uint32_t ReadStringFromMemory(char **Parser,char *End,char **StoreTo); + +uint32_t ReadStringFromMemoryW(wchar_t **Parser,wchar_t *End,wchar_t **StoreTo); + +#endif + +//#ifdef DEBUG_ACCOUNTS +//int GetAccounts(); +//void WriteAccounts(); +//#endif + +#endif //YAMN_DEBUG +#endif //_DEBUG_H diff --git a/protocols/YAMN/src/filterplugin.cpp b/protocols/YAMN/src/filterplugin.cpp index 1d55f3a9c1..451ea155aa 100644 --- a/protocols/YAMN/src/filterplugin.cpp +++ b/protocols/YAMN/src/filterplugin.cpp @@ -1,169 +1,169 @@ -/* - * YAMN plugin export functions for filtering - * - * (c) majvan 2002-2004 - */ - -#include "stdafx.h" - - //-------------------------------------------------------------------------------------------------- - //-------------------------------------------------------------------------------------------------- - -PYAMN_FILTERPLUGINQUEUE FirstFilterPlugin = nullptr; - -INT_PTR RegisterFilterPluginSvc(WPARAM, LPARAM); - -//Removes plugin from queue and deletes its structures -INT_PTR UnregisterFilterPlugin(HYAMNFILTERPLUGIN Plugin); - -INT_PTR UnregisterFilterPluginSvc(WPARAM wParam, LPARAM lParam); - -//Removes all filter plugins -INT_PTR UnregisterFilterPlugins(); - -INT_PTR FilterMailSvc(WPARAM, LPARAM); - -//Sets imported functions for an plugin and therefore it starts plugin to be registered and running -// Plugin- plugin, which wants to set its functions -// Importance- importance of plugin (see m_filterplugin.h) -// YAMNFilterFcn- pointer to imported functions -// YAMNfilterFcnVer- version of YAMN_FILTERIMPORTFCN, use YAMN_FILTERIMPORTFCNVERSION -// returns nonzero if success -int WINAPI SetFilterPluginFcnImportFcn(HYAMNFILTERPLUGIN Plugin, uint32_t Importance, PYAMN_FILTERIMPORTFCN YAMNFilterFcn, uint32_t YAMNFilterFcnVer); - -struct CExportedFunctions FilterPluginExportedFcn[] = -{ - {YAMN_SETFILTERPLUGINFCNIMPORTID, (void *)SetFilterPluginFcnImportFcn}, -}; - -struct CExportedServices FilterPluginExportedSvc[] = -{ - {MS_YAMN_REGISTERFILTERPLUGIN, RegisterFilterPluginSvc}, - {MS_YAMN_UNREGISTERFILTERPLUGIN, UnregisterFilterPluginSvc}, -}; - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -INT_PTR RegisterFilterPluginSvc(WPARAM wParam, LPARAM lParam) -{ - PYAMN_FILTERREGISTRATION Registration = (PYAMN_FILTERREGISTRATION)wParam; - HYAMNFILTERPLUGIN Plugin; - - if (lParam != YAMN_FILTERREGISTRATIONVERSION) - return 0; - if ((Registration->Name == nullptr) || (Registration->Ver == nullptr)) - return NULL; - if (nullptr == (Plugin = new YAMN_FILTERPLUGIN)) - return NULL; - - Plugin->PluginInfo = Registration; - Plugin->FilterFcn = nullptr; - return (INT_PTR)Plugin; -} - -INT_PTR UnregisterFilterPlugin(HYAMNFILTERPLUGIN Plugin) -{ - PYAMN_FILTERPLUGINQUEUE Parser, Found; - - if (FirstFilterPlugin->Plugin == Plugin) { - Found = FirstFilterPlugin; - FirstFilterPlugin = FirstFilterPlugin->Next; - } - else { - for (Parser = FirstFilterPlugin; (Parser->Next != nullptr) && (Plugin != Parser->Next->Plugin); Parser = Parser->Next); - if (Parser->Next != nullptr) { - Found = Parser->Next; - Parser->Next = Parser->Next->Next; - } - else - Found = nullptr; - } - if (Found != nullptr) { - if (Plugin->FilterFcn->UnLoadFcn != nullptr) - Plugin->FilterFcn->UnLoadFcn((void *)nullptr); - - delete Found->Plugin; - delete Found; - return 1; - } - - return 0; -} - -INT_PTR UnregisterFilterPluginSvc(WPARAM wParam, LPARAM) -{ - HYAMNFILTERPLUGIN Plugin = (HYAMNFILTERPLUGIN)wParam; - - mir_cslock lck(PluginRegCS); - UnregisterFilterPlugin(Plugin); - return 1; -} - -INT_PTR UnregisterFilterPlugins() -{ - mir_cslock lck(PluginRegCS); - - // We remove protocols from the protocol list - while (FirstFilterPlugin != nullptr) - UnregisterFilterPlugin(FirstFilterPlugin->Plugin); - return 1; -} - -int WINAPI SetFilterPluginFcnImportFcn(HYAMNFILTERPLUGIN Plugin, uint32_t Importance, PYAMN_FILTERIMPORTFCN YAMNFilterFcn, uint32_t YAMNFilterFcnVer) -{ - PYAMN_FILTERPLUGINQUEUE Parser, Previous; - - if (YAMNFilterFcnVer != YAMN_FILTERIMPORTFCNVERSION) - return 0; - if (YAMNFilterFcn == nullptr) - return 0; - - Plugin->Importance = Importance; - Plugin->FilterFcn = YAMNFilterFcn; - - mir_cslock lck(PluginRegCS); - - // We add protocol to the protocol list - for (Previous = nullptr, Parser = FirstFilterPlugin; Parser != nullptr && Parser->Next != nullptr && Parser->Plugin->Importance <= Importance; Previous = Parser, Parser = Parser->Next); - - if (Previous == nullptr) { //insert to the beginnig of queue - FirstFilterPlugin = new YAMN_FILTERPLUGINQUEUE; - FirstFilterPlugin->Plugin = Plugin; - FirstFilterPlugin->Next = Parser; - } - else { - Previous->Next = new YAMN_FILTERPLUGINQUEUE; - Previous = Previous->Next; //leave previous, go to actual plugin - Previous->Plugin = Plugin; - Previous->Next = Parser; //and in actual plugin set, that next plugin is the one we insert in front of - } - return 1; -} - -INT_PTR FilterMailSvc(WPARAM wParam, LPARAM lParam) -{ - CAccount *Account = (CAccount *)wParam; - HYAMNMAIL Mail = (HYAMNMAIL)lParam; - PYAMN_FILTERPLUGINQUEUE ActualPlugin; - - mir_cslock lck(PluginRegCS); - WaitToWriteFcn(Account->MessagesAccessSO); - - for (ActualPlugin = FirstFilterPlugin; ActualPlugin != nullptr; ActualPlugin = ActualPlugin->Next) - if (ActualPlugin->Plugin->FilterFcn->FilterMailFcnPtr != nullptr) - ActualPlugin->Plugin->FilterFcn->FilterMailFcnPtr(Account, YAMN_ACCOUNTVERSION, Mail, YAMN_MAILVERSION); - - Mail->Flags |= YAMN_MSG_FILTERED; - - //Set mail flags according to spamlevel settings - if ((Mail->Flags & YAMN_MSG_SPAMMASK) > YAMN_MSG_SPAML1) - Mail->Flags = Mail->Flags & ~(YAMN_MSG_BROWSER | YAMN_MSG_POPUP | YAMN_MSG_SYSTRAY | YAMN_MSG_SOUND | YAMN_MSG_APP | YAMN_MSG_NEVENT); - if (YAMN_MSG_SPAML(Mail->Flags, YAMN_MSG_SPAML3) || YAMN_MSG_SPAML(Mail->Flags, YAMN_MSG_SPAML4)) - Mail->Flags = Mail->Flags | (YAMN_MSG_AUTODELETE | YAMN_MSG_DELETEOK); //set message to delete - if (YAMN_MSG_SPAML(Mail->Flags, YAMN_MSG_SPAML3)) - Mail->Flags = Mail->Flags & ~(YAMN_MSG_MEMDELETE); //set message not to delete it immidiatelly from memory - - WriteDoneFcn(Account->MessagesAccessSO); - return 1; -} +/* + * YAMN plugin export functions for filtering + * + * (c) majvan 2002-2004 + */ + +#include "stdafx.h" + + //-------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------------------------------- + +PYAMN_FILTERPLUGINQUEUE FirstFilterPlugin = nullptr; + +INT_PTR RegisterFilterPluginSvc(WPARAM, LPARAM); + +//Removes plugin from queue and deletes its structures +INT_PTR UnregisterFilterPlugin(HYAMNFILTERPLUGIN Plugin); + +INT_PTR UnregisterFilterPluginSvc(WPARAM wParam, LPARAM lParam); + +//Removes all filter plugins +INT_PTR UnregisterFilterPlugins(); + +INT_PTR FilterMailSvc(WPARAM, LPARAM); + +//Sets imported functions for an plugin and therefore it starts plugin to be registered and running +// Plugin- plugin, which wants to set its functions +// Importance- importance of plugin (see m_filterplugin.h) +// YAMNFilterFcn- pointer to imported functions +// YAMNfilterFcnVer- version of YAMN_FILTERIMPORTFCN, use YAMN_FILTERIMPORTFCNVERSION +// returns nonzero if success +int WINAPI SetFilterPluginFcnImportFcn(HYAMNFILTERPLUGIN Plugin, uint32_t Importance, PYAMN_FILTERIMPORTFCN YAMNFilterFcn, uint32_t YAMNFilterFcnVer); + +struct CExportedFunctions FilterPluginExportedFcn[] = +{ + {YAMN_SETFILTERPLUGINFCNIMPORTID, (void *)SetFilterPluginFcnImportFcn}, +}; + +struct CExportedServices FilterPluginExportedSvc[] = +{ + {MS_YAMN_REGISTERFILTERPLUGIN, RegisterFilterPluginSvc}, + {MS_YAMN_UNREGISTERFILTERPLUGIN, UnregisterFilterPluginSvc}, +}; + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +INT_PTR RegisterFilterPluginSvc(WPARAM wParam, LPARAM lParam) +{ + PYAMN_FILTERREGISTRATION Registration = (PYAMN_FILTERREGISTRATION)wParam; + HYAMNFILTERPLUGIN Plugin; + + if (lParam != YAMN_FILTERREGISTRATIONVERSION) + return 0; + if ((Registration->Name == nullptr) || (Registration->Ver == nullptr)) + return NULL; + if (nullptr == (Plugin = new YAMN_FILTERPLUGIN)) + return NULL; + + Plugin->PluginInfo = Registration; + Plugin->FilterFcn = nullptr; + return (INT_PTR)Plugin; +} + +INT_PTR UnregisterFilterPlugin(HYAMNFILTERPLUGIN Plugin) +{ + PYAMN_FILTERPLUGINQUEUE Parser, Found; + + if (FirstFilterPlugin->Plugin == Plugin) { + Found = FirstFilterPlugin; + FirstFilterPlugin = FirstFilterPlugin->Next; + } + else { + for (Parser = FirstFilterPlugin; (Parser->Next != nullptr) && (Plugin != Parser->Next->Plugin); Parser = Parser->Next); + if (Parser->Next != nullptr) { + Found = Parser->Next; + Parser->Next = Parser->Next->Next; + } + else + Found = nullptr; + } + if (Found != nullptr) { + if (Plugin->FilterFcn->UnLoadFcn != nullptr) + Plugin->FilterFcn->UnLoadFcn((void *)nullptr); + + delete Found->Plugin; + delete Found; + return 1; + } + + return 0; +} + +INT_PTR UnregisterFilterPluginSvc(WPARAM wParam, LPARAM) +{ + HYAMNFILTERPLUGIN Plugin = (HYAMNFILTERPLUGIN)wParam; + + mir_cslock lck(PluginRegCS); + UnregisterFilterPlugin(Plugin); + return 1; +} + +INT_PTR UnregisterFilterPlugins() +{ + mir_cslock lck(PluginRegCS); + + // We remove protocols from the protocol list + while (FirstFilterPlugin != nullptr) + UnregisterFilterPlugin(FirstFilterPlugin->Plugin); + return 1; +} + +int WINAPI SetFilterPluginFcnImportFcn(HYAMNFILTERPLUGIN Plugin, uint32_t Importance, PYAMN_FILTERIMPORTFCN YAMNFilterFcn, uint32_t YAMNFilterFcnVer) +{ + PYAMN_FILTERPLUGINQUEUE Parser, Previous; + + if (YAMNFilterFcnVer != YAMN_FILTERIMPORTFCNVERSION) + return 0; + if (YAMNFilterFcn == nullptr) + return 0; + + Plugin->Importance = Importance; + Plugin->FilterFcn = YAMNFilterFcn; + + mir_cslock lck(PluginRegCS); + + // We add protocol to the protocol list + for (Previous = nullptr, Parser = FirstFilterPlugin; Parser != nullptr && Parser->Next != nullptr && Parser->Plugin->Importance <= Importance; Previous = Parser, Parser = Parser->Next); + + if (Previous == nullptr) { //insert to the beginnig of queue + FirstFilterPlugin = new YAMN_FILTERPLUGINQUEUE; + FirstFilterPlugin->Plugin = Plugin; + FirstFilterPlugin->Next = Parser; + } + else { + Previous->Next = new YAMN_FILTERPLUGINQUEUE; + Previous = Previous->Next; //leave previous, go to actual plugin + Previous->Plugin = Plugin; + Previous->Next = Parser; //and in actual plugin set, that next plugin is the one we insert in front of + } + return 1; +} + +INT_PTR FilterMailSvc(WPARAM wParam, LPARAM lParam) +{ + CAccount *Account = (CAccount *)wParam; + HYAMNMAIL Mail = (HYAMNMAIL)lParam; + PYAMN_FILTERPLUGINQUEUE ActualPlugin; + + mir_cslock lck(PluginRegCS); + WaitToWriteFcn(Account->MessagesAccessSO); + + for (ActualPlugin = FirstFilterPlugin; ActualPlugin != nullptr; ActualPlugin = ActualPlugin->Next) + if (ActualPlugin->Plugin->FilterFcn->FilterMailFcnPtr != nullptr) + ActualPlugin->Plugin->FilterFcn->FilterMailFcnPtr(Account, YAMN_ACCOUNTVERSION, Mail, YAMN_MAILVERSION); + + Mail->Flags |= YAMN_MSG_FILTERED; + + //Set mail flags according to spamlevel settings + if ((Mail->Flags & YAMN_MSG_SPAMMASK) > YAMN_MSG_SPAML1) + Mail->Flags = Mail->Flags & ~(YAMN_MSG_BROWSER | YAMN_MSG_POPUP | YAMN_MSG_SYSTRAY | YAMN_MSG_SOUND | YAMN_MSG_APP | YAMN_MSG_NEVENT); + if (YAMN_MSG_SPAML(Mail->Flags, YAMN_MSG_SPAML3) || YAMN_MSG_SPAML(Mail->Flags, YAMN_MSG_SPAML4)) + Mail->Flags = Mail->Flags | (YAMN_MSG_AUTODELETE | YAMN_MSG_DELETEOK); //set message to delete + if (YAMN_MSG_SPAML(Mail->Flags, YAMN_MSG_SPAML3)) + Mail->Flags = Mail->Flags & ~(YAMN_MSG_MEMDELETE); //set message not to delete it immidiatelly from memory + + WriteDoneFcn(Account->MessagesAccessSO); + return 1; +} diff --git a/protocols/YAMN/src/mails/decode.cpp b/protocols/YAMN/src/mails/decode.cpp index 414edfce60..7306376c2e 100644 --- a/protocols/YAMN/src/mails/decode.cpp +++ b/protocols/YAMN/src/mails/decode.cpp @@ -1,534 +1,534 @@ -/* - * This code implements decoding encoded MIME header in style - * =?iso-8859-2?Q? "User using email in central Europe characters such as =E9" ?= - * - * (c) majvan 2002-2004 - */ -#include "../stdafx.h" -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -struct _tcptable CodePageNamesAll[]= -{ - { "ANSI", "",TRUE,CP_ACP}, - { "WINDOWS-1", "250",0,1250}, - { "WINDOWS-1", "251",0,1251}, - { "WINDOWS-1", "252",0,1252}, - { "WINDOWS-1", "253",0,1253}, - { "WINDOWS-1", "254",0,1254}, - { "WINDOWS-1", "255",0,1255}, - { "WINDOWS-1", "256",0,1256}, - { "WINDOWS-1", "257",0,1257}, - { "WINDOWS-1", "258",0,1258}, - { "CP1", "250",0,1250}, - { "CP1", "251",0,1251}, - { "CP1", "252",0,1252}, - { "CP1", "253",0,1253}, - { "CP1", "254",0,1254}, - { "CP1", "255",0,1255}, - { "CP1", "256",0,1256}, - { "CP1", "257",0,1257}, - { "CP1", "258",0,1258}, - { "ANSI-1", "250",0,1250}, - { "ANSI-1", "251",0,1251}, - { "ANSI-1", "252",0,1252}, - { "ANSI-1", "253",0,1253}, - { "ANSI-1", "254",0,1254}, - { "ANSI-1", "255",0,1255}, - { "ANSI-1", "256",0,1256}, - { "ANSI-1", "257",0,1257}, - { "ANSI-1", "258",0,1258}, - { "KOI8", "-R",0,20866}, - { "KOI8", "",0,20866}, - { "KOI8", "-U",0,21866}, - { "KOI8", "-RU",0,21866}, - { "US-", "ASCII",0,20127}, - { "CP", "367",0,20127}, - { "ASCII", "",0,20127}, - { "ASCII", "7",0,20127}, - { "ISO-8859", "-1",0,28591}, - { "ISO-8859", "-2",0,28592}, - { "ISO-8859", "-3",0,28593}, - { "ISO-8859", "-4",0,28594}, - { "ISO-8859", "-5",0,28595}, - { "ISO-8859", "-6",0,28596}, - { "ISO-8859", "-7",0,28597}, - { "ISO-8859", "-8",0,28598}, - { "ISO-8859", "-9",0,28599}, - { "ISO-8859", "-15",0,28605}, - { "ISO_8859", "-1",0,28591}, - { "ISO_8859", "-2",0,28592}, - { "ISO_8859", "-3",0,28593}, - { "ISO_8859", "-4",0,28594}, - { "ISO_8859", "-5",0,28595}, - { "ISO_8859", "-6",0,28596}, - { "ISO_8859", "-7",0,28597}, - { "ISO_8859", "-8",0,28598}, - { "ISO_8859", "-9",0,28599}, - { "ISO_8859", "-15",0,28605}, - { "ISO-", "10646-USC2",0,1200}, - { "ISO-2022", "/2-JP",0,50220}, - { "ISO-2022", "-JP",0,50221}, - { "ISO-2022", "/JIS-JP",0,50222}, - { "ISO-2022", "-KR",0,50225}, - { "ISO-2022", "-CH(SP)",0,50227}, - { "ISO-2022", "-CH(TR)",0,50229}, - { "UTF-", "7",0,65000}, - { "UTF-", "8",0,65001}, - { "ARAB-", "TRANSPARENT",0,710}, - { "ASMO-", "TRANSPARENT",0,720}, - { "ASMO-", "449",0,709}, - { "ASMO-", "708",0,708}, - { "BIG5", "",0,950}, - { "EUC-", "CH(SP)",0,51936}, - { "EUC-", "CH(TR)",0,51950}, - { "EUC-", "JP",0,51932}, - { "EUC-", "KR",0,51949}, - { "GB-", "2312",0,20936}, - { "GB", "2312",0,20936}, - { "HZGB-", "2312",0,52936}, - { "IBM-", "037",0,37}, - { "IBM-", "290",0,290}, - { "IBM-", "437",0,437}, - { "IBM-", "500",0,500}, - { "IBM-", "775",0,775}, - { "IBM-", "850",0,850}, - { "IBM-", "852",0,852}, - { "IBM-", "855",0,855}, - { "IBM-", "857",0,857}, - { "IBM-", "860",0,860}, - { "IBM-", "861",0,861}, - { "IBM-", "862",0,862}, - { "IBM-", "863",0,863}, - { "IBM-", "864",0,864}, - { "IBM-", "865",0,865}, - { "IBM-", "866",0,866}, - { "IBM-", "869",0,869}, - { "IBM-", "870",0,870}, - { "IBM-", "875",0,875}, - { "IBM-", "1026",0,1026}, - { "IBM-", "273",0,20273}, - { "IBM-", "277",0,20277}, - { "IBM-", "278",0,20278}, - { "IBM-", "280",0,20280}, - { "IBM-", "284",0,20284}, - { "IBM-", "285",0,20285}, - { "IBM-", "290",0,20290}, - { "IBM-", "297",0,20297}, - { "IBM-", "420",0,20420}, - { "IBM-", "423",0,20423}, - { "IBM-", "871",0,20871}, - { "IBM-", "880",0,20880}, - { "IBM-", "905",0,20905}, - { "IBM-", "THAI",0,20838}, - { "ISCII-", "DEVANAGARI",0,57002}, - { "ISCII-", "BENGALI",0,57003}, - { "ISCII-", "TAMIL",0,57004}, - { "ISCII-", "TELUGU",0,57005}, - { "ISCII-", "ASSAMESE",0,57006}, - { "ISCII-", "ORIYA",0,57007}, - { "ISCII-", "KANNADA",0,57008}, - { "ISCII-", "MALAYALAM",0,57009}, - { "ISCII-", "GUJARATI",0,57010}, - { "ISCII-", "PUNJABI",0,57011}, - { "KOR-", "JOHAB",0,1361}, - { "KSC-", "5601",0,1361}, - { "MAC-", "ROMAN",0,10000}, - { "MAC-", "JP",0,10001}, - { "MAC-", "CH(SP)(BIG5)",0,10002}, - { "MAC-", "KR",0,10003}, - { "MAC-", "AR",0,10004}, - { "MAC-", "HW",0,10005}, - { "MAC-", "GR",0,10006}, - { "MAC-", "CY",0,10007}, - { "MAC-", "CH(SP)(GB2312)",0,10008}, - { "MAC-", "ROMANIA",0,10010}, - { "MAC-", "UA",0,10017}, - { "MAC-", "TH",0,10021}, - { "MAC-", "LAT2",0,10029}, - { "MAC-", "ICE",0,10079}, - { "MAC-", "TR",0,10081}, - { "MAC-", "CR",0,10082} -}; - -int CPLENALL = _countof(CodePageNamesAll); -struct _tcptable *CodePageNamesSupp; -int CPLENSUPP = 1; - -//Gets codepage ID from string representing charset such as "iso-8859-1" -// input- the string -// size- max length of input string -int GetCharsetFromString(char *input, size_t size); - -//HexValue to DecValue ('a' to 10) -// HexValue- hexa value ('a') -// DecValue- poiner where to store dec value -// returns 0 if not success -int FromHexa(char HexValue, char *DecValue); - -//Decodes a char from Base64 -// Base64Value- input char in Base64 -// DecValue- pointer where to store the result -// returns 0 if not success -int FromBase64(char Base64Value, char *DecValue); - -//Decodes string in quoted printable -// Src- input string -// Dst- where to store output string -// DstLen- how max long should be output string -// isQ- if is "Q-encoding" modification. should be TRUE in headers -// always returns 1 -int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ); - -//Decodes string in base64 -// Src- input string -// Dst- where to store output string -// DstLen- how max long should be output string -// returns 0 if string was not properly decoded -int DecodeBase64(char *Src, char *Dst, int DstLen); - -//Converts string to unicode from string with specified codepage -// stream- input string -// cp- codepage of input string -// out- pointer to new allocated memory that contains unicode string -int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out); - -//Converts string from MIME header to unicode -// stream- input string -// cp- codepage of input string -// storeto- pointer to memory that contains unicode string -// mode- MIME_PLAIN or MIME_MAIL (MIME_MAIL deletes '"' from start and end of string) -void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, uint32_t cp, int mode); - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -int GetCharsetFromString(char *input, size_t size) -//"ISO-8859-1" to ID from table -{ - char *pin = input; - char *pout, *parser; - - if ((size < 1) || (parser = pout = new char[size + 1]) == nullptr) - return -1; - while ((*pin != 0) && (pin - input < (INT_PTR)size)) { - if ((*pin >= 'a') && (*pin <= 'z')) - *parser++ = *(pin++) - ('a' - 'A'); // make it capital - //else if (*pin=='\"') // this is already done in ExtractFromContentType - // *pin++; //skip the quotes if any - else - *parser++ = *pin++; - } - - *parser = 0; - - #ifdef DEBUG_DECODECODEPAGE - DebugLog(DecodeFile, "%s", pout); - #endif - for (int i = 0; i < CPLENALL; i++) { - size_t len = mir_strlen(CodePageNamesAll[i].NameBase); - if (0 == strncmp(pout, CodePageNamesAll[i].NameBase, len)) { - if (0 == mir_strcmp(pout + len, CodePageNamesAll[i].NameSub)) { - delete[] pout; - return CodePageNamesAll[i].CP; - } - } - } - delete[] pout; - return -1; //not found -} - -int FromHexa(char HexValue, char *DecValue) -{ - if (HexValue >= '0' && HexValue <= '9') { - *DecValue = HexValue - '0'; - return 1; - } - if (HexValue >= 'A' && HexValue <= 'F') { - *DecValue = HexValue - 'A' + 10; - return 1; - } - if (HexValue >= 'a' && HexValue <= 'f') { - *DecValue = HexValue - 'a' + 10; - return 1; - } - return 0; -} - -int FromBase64(char Base64Value, char *DecValue) -{ - if (Base64Value >= 'A' && Base64Value <= 'Z') { - *DecValue = Base64Value - 'A'; - return 1; - } - if (Base64Value >= 'a' && Base64Value <= 'z') { - *DecValue = Base64Value - 'a' + 26; - return 1; - } - if (Base64Value >= '0' && Base64Value <= '9') { - *DecValue = Base64Value - '0' + 52; - return 1; - } - if (Base64Value == '+') { - *DecValue = Base64Value - '+' + 62; - return 1; - } - if (Base64Value == '/') { - *DecValue = Base64Value - '/' + 63; - return 1; - } - if (Base64Value == '=') { - *DecValue = 0; - return 1; - } - return 0; -} - -int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ) -{ - #ifdef DEBUG_DECODEQUOTED - char *DstTemp = Dst; - DebugLog(DecodeFile, "%s", Src); - #endif - for (int Counter = 0; (*Src != 0) && DstLen && (Counter++ < DstLen); Src++, Dst++) - if (*Src == '=') { - if (!isQ) { - if (Src[1] == 0x0D) { - Src++; Src++; - if (Src[0] == 0x0A) Src++; - goto CopyCharQuotedPrintable; - } - if (Src[1] == 0x0A) { - Src++; Src++; - goto CopyCharQuotedPrintable; - } - } - char First, Second; - if (!FromHexa(*(++Src), &First)) { - *Dst++ = '='; Src--; - continue; - } - if (!FromHexa(*(++Src), &Second)) { - *Dst++ = '='; Src--; Src--; - continue; - } - *Dst = (char)(First) << 4; - *Dst += Second; - } - else if (isQ && *Src == '_') - *Dst = ' '; - else - CopyCharQuotedPrintable: // Yeah. Bad programming stile. - *Dst = *Src; - *Dst = 0; - #ifdef DEBUG_DECODEQUOTED - DebugLog(DecodeFile, "%s", DstTemp); - #endif - return 1; -} - -int DecodeBase64(char *Src, char *Dst, int DstLen) -{ - int Result = 0; - char Locator = 0, MiniResult[4]; - char *End = Dst + DstLen; - - MiniResult[0] = MiniResult[1] = MiniResult[2] = MiniResult[3] = 0; - - #ifdef DEBUG_DECODEBASE64 - char *DstTemp = Dst; - DebugLog(DecodeFile, "\n%s\n\n", Src); - #endif - while (*Src != 0 && DstLen && Dst != End) { - if ((*Src == 0x0D) || (*Src == 0x0A)) { - Src++; - continue; - } - if ((!(Result = FromBase64(*Src, MiniResult + Locator)) && (*Src == 0)) || Locator++ == 3) //end_of_str || end_of_4_bytes - { - Locator = 0; //next write to the first byte - *Dst++ = (char)((MiniResult[0] << 2) | (MiniResult[1] >> 4)); - if (Dst == End) goto end; //DstLen exceeded? - *Dst++ = (char)((MiniResult[1] << 4) | (MiniResult[2] >> 2)); - if (Dst == End) goto end; //someones don't like goto, but not me - *Dst++ = (char)((MiniResult[2] << 6) | MiniResult[3]); - if (!Result && (*Src == 0)) goto end; //end of string? - MiniResult[0] = MiniResult[1] = MiniResult[2] = MiniResult[3] = 0; //zero 4byte buffer for next loop - } - if (!Result) return 0; //unrecognised character occured - Src++; - } -end: - *Dst = 0; - #ifdef DEBUG_DECODEBASE64 - DebugLog(DecodeFile, "\n%s\n", DstTemp); - #endif - return 1; -} - - - -int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out) -{ - CPINFO CPInfo; - wchar_t *temp, *src = *out, *dest; - size_t outlen; - int streamlen, Index; - - //codepages, which require to have set 0 in dwFlags parameter when calling MultiByteToWideChar - uint32_t CodePagesZeroFlags[] = {50220, 50221, 50222, 50225, 50227, 50229, 52936, 54936, 57002, 57003, 57004, 57005, 57006, 57007, 57008, 57009, 57010, 57011, 65000, 65001}; - - if ((cp != CP_ACP) && (cp != CP_OEMCP) && (cp != CP_MACCP) && (cp != CP_THREAD_ACP) && (cp != CP_SYMBOL) && (cp != CP_UTF7) && (cp != CP_UTF8) && !GetCPInfo(cp, &CPInfo)) - cp = CP_ACP; - #ifdef DEBUG_DECODECODEPAGE - DebugLog(DecodeFile, "%d", cp); - #endif - - for (Index = 0; Index < sizeof(CodePagesZeroFlags) / sizeof(CodePagesZeroFlags[0]); Index++) - if (CodePagesZeroFlags[Index] == cp) { - Index = -1; - break; - } - if (Index == -1) - streamlen = MultiByteToWideChar(cp, 0, stream, -1, nullptr, 0); - else - streamlen = MultiByteToWideChar(cp, MB_USEGLYPHCHARS, stream, -1, nullptr, 0); - - if (*out != nullptr) - outlen = mir_wstrlen(*out); - else - outlen = 0; - temp = new wchar_t[streamlen + outlen + 1]; - - if (*out != nullptr) { - for (dest = temp; *src != (wchar_t)0; src++, dest++) //copy old string from *out to temp - *dest = *src; - // *dest++=L' '; //add space? - delete[] * out; - } - else - dest = temp; - *out = temp; - - if (Index == -1) { - if (!MultiByteToWideChar(cp, 0, stream, -1, dest, streamlen)) - return 0; - } - else { - if (!MultiByteToWideChar(cp, MB_USEGLYPHCHARS, stream, -1, dest, streamlen)) - return 0; - } - return 1; -} - -void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, uint32_t cp, int mode) -{ - char *start = stream, *finder, *finderend; - char Encoding = 0; - - if (stream == nullptr) - return; - - while (WS(start)) start++; - wchar_t *tempstore = nullptr; - if (!ConvertStringToUnicode(stream, cp, &tempstore))return; - - size_t tempstoreLength = mir_wstrlen(tempstore); - - size_t outind = 0; - while (*start != 0) { - if (CODES(start)) { - finder = start + 2; finderend = finder; - while (!CODED(finderend) && !EOS(finderend)) finderend++; - start = finderend; - if (CODED(finderend)) { - Encoding = *(finderend + 1); - switch (Encoding) { - case 'b': - case 'B': - case 'q': - case 'Q': - break; - default: - goto NotEncoded; - } - if (-1 == (cp = (uint32_t)GetCharsetFromString(finder, finderend - finder))) - cp = CP_ACP; - if (Encoding != 0) { - int size = 0, codeend; - char *pcodeend = nullptr; - - finder = finderend + 2; - if (CODED(finder)) - finder++; - while (WS(finder)) finder++; - finderend = finder; - while (!CODEE(finderend) && !EOS(finderend)) finderend++; - if (codeend = CODEE(finderend)) - pcodeend = finderend; - while (WS(finderend - 1)) finderend--; - if ((mode == MIME_MAIL) && (((*finder == '"') && (*(finderend - 1) == '"')))) { - finder++; - finderend--; - } - char *oneWordEncoded = new char[finderend - finder + 1]; - strncpy(oneWordEncoded, finder, finderend - finder); - oneWordEncoded[finderend - finder] = 0; - switch (Encoding) { - case 'b': - case 'B': - size = (finderend - finder) * 3 / 4 + 3 + 1 + 1; - break; - case 'q': - case 'Q': - size = finderend - finder + 1 + 1; - break; - } - - char *DecodedResult = new char[size + 1]; - switch (Encoding) { - case 'q': - case 'Q': - DecodeQuotedPrintable(oneWordEncoded, DecodedResult, size, TRUE); - break; - case 'b': - case 'B': - DecodeBase64(oneWordEncoded, DecodedResult, size); - break; - } - delete[] oneWordEncoded; - if (codeend) - finderend = pcodeend + 2; - if (WS(finderend)) //if string continues and there's some whitespace, add space to string that is to be converted - { - size_t len = mir_strlen(DecodedResult); - DecodedResult[len] = ' '; - DecodedResult[len + 1] = 0; - finderend++; - } - wchar_t *oneWord = nullptr; - if (ConvertStringToUnicode(DecodedResult, cp, &oneWord)) { - size_t len = mir_wstrlen(oneWord); - memcpy(&tempstore[outind], oneWord, len * sizeof(wchar_t)); - outind += len; - } - delete oneWord; - oneWord = nullptr; - delete[] DecodedResult; - start = finderend; - } - else if (!EOS(start)) start++; - } - else if (!EOS(start)) start++; - } - else { -NotEncoded: - tempstore[outind] = tempstore[start - stream]; - outind++; - if (outind > tempstoreLength) break; - start++; - } - } - tempstore[outind] = 0; - *storeto = tempstore; -} +/* + * This code implements decoding encoded MIME header in style + * =?iso-8859-2?Q? "User using email in central Europe characters such as =E9" ?= + * + * (c) majvan 2002-2004 + */ +#include "../stdafx.h" +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +struct _tcptable CodePageNamesAll[]= +{ + { "ANSI", "",TRUE,CP_ACP}, + { "WINDOWS-1", "250",0,1250}, + { "WINDOWS-1", "251",0,1251}, + { "WINDOWS-1", "252",0,1252}, + { "WINDOWS-1", "253",0,1253}, + { "WINDOWS-1", "254",0,1254}, + { "WINDOWS-1", "255",0,1255}, + { "WINDOWS-1", "256",0,1256}, + { "WINDOWS-1", "257",0,1257}, + { "WINDOWS-1", "258",0,1258}, + { "CP1", "250",0,1250}, + { "CP1", "251",0,1251}, + { "CP1", "252",0,1252}, + { "CP1", "253",0,1253}, + { "CP1", "254",0,1254}, + { "CP1", "255",0,1255}, + { "CP1", "256",0,1256}, + { "CP1", "257",0,1257}, + { "CP1", "258",0,1258}, + { "ANSI-1", "250",0,1250}, + { "ANSI-1", "251",0,1251}, + { "ANSI-1", "252",0,1252}, + { "ANSI-1", "253",0,1253}, + { "ANSI-1", "254",0,1254}, + { "ANSI-1", "255",0,1255}, + { "ANSI-1", "256",0,1256}, + { "ANSI-1", "257",0,1257}, + { "ANSI-1", "258",0,1258}, + { "KOI8", "-R",0,20866}, + { "KOI8", "",0,20866}, + { "KOI8", "-U",0,21866}, + { "KOI8", "-RU",0,21866}, + { "US-", "ASCII",0,20127}, + { "CP", "367",0,20127}, + { "ASCII", "",0,20127}, + { "ASCII", "7",0,20127}, + { "ISO-8859", "-1",0,28591}, + { "ISO-8859", "-2",0,28592}, + { "ISO-8859", "-3",0,28593}, + { "ISO-8859", "-4",0,28594}, + { "ISO-8859", "-5",0,28595}, + { "ISO-8859", "-6",0,28596}, + { "ISO-8859", "-7",0,28597}, + { "ISO-8859", "-8",0,28598}, + { "ISO-8859", "-9",0,28599}, + { "ISO-8859", "-15",0,28605}, + { "ISO_8859", "-1",0,28591}, + { "ISO_8859", "-2",0,28592}, + { "ISO_8859", "-3",0,28593}, + { "ISO_8859", "-4",0,28594}, + { "ISO_8859", "-5",0,28595}, + { "ISO_8859", "-6",0,28596}, + { "ISO_8859", "-7",0,28597}, + { "ISO_8859", "-8",0,28598}, + { "ISO_8859", "-9",0,28599}, + { "ISO_8859", "-15",0,28605}, + { "ISO-", "10646-USC2",0,1200}, + { "ISO-2022", "/2-JP",0,50220}, + { "ISO-2022", "-JP",0,50221}, + { "ISO-2022", "/JIS-JP",0,50222}, + { "ISO-2022", "-KR",0,50225}, + { "ISO-2022", "-CH(SP)",0,50227}, + { "ISO-2022", "-CH(TR)",0,50229}, + { "UTF-", "7",0,65000}, + { "UTF-", "8",0,65001}, + { "ARAB-", "TRANSPARENT",0,710}, + { "ASMO-", "TRANSPARENT",0,720}, + { "ASMO-", "449",0,709}, + { "ASMO-", "708",0,708}, + { "BIG5", "",0,950}, + { "EUC-", "CH(SP)",0,51936}, + { "EUC-", "CH(TR)",0,51950}, + { "EUC-", "JP",0,51932}, + { "EUC-", "KR",0,51949}, + { "GB-", "2312",0,20936}, + { "GB", "2312",0,20936}, + { "HZGB-", "2312",0,52936}, + { "IBM-", "037",0,37}, + { "IBM-", "290",0,290}, + { "IBM-", "437",0,437}, + { "IBM-", "500",0,500}, + { "IBM-", "775",0,775}, + { "IBM-", "850",0,850}, + { "IBM-", "852",0,852}, + { "IBM-", "855",0,855}, + { "IBM-", "857",0,857}, + { "IBM-", "860",0,860}, + { "IBM-", "861",0,861}, + { "IBM-", "862",0,862}, + { "IBM-", "863",0,863}, + { "IBM-", "864",0,864}, + { "IBM-", "865",0,865}, + { "IBM-", "866",0,866}, + { "IBM-", "869",0,869}, + { "IBM-", "870",0,870}, + { "IBM-", "875",0,875}, + { "IBM-", "1026",0,1026}, + { "IBM-", "273",0,20273}, + { "IBM-", "277",0,20277}, + { "IBM-", "278",0,20278}, + { "IBM-", "280",0,20280}, + { "IBM-", "284",0,20284}, + { "IBM-", "285",0,20285}, + { "IBM-", "290",0,20290}, + { "IBM-", "297",0,20297}, + { "IBM-", "420",0,20420}, + { "IBM-", "423",0,20423}, + { "IBM-", "871",0,20871}, + { "IBM-", "880",0,20880}, + { "IBM-", "905",0,20905}, + { "IBM-", "THAI",0,20838}, + { "ISCII-", "DEVANAGARI",0,57002}, + { "ISCII-", "BENGALI",0,57003}, + { "ISCII-", "TAMIL",0,57004}, + { "ISCII-", "TELUGU",0,57005}, + { "ISCII-", "ASSAMESE",0,57006}, + { "ISCII-", "ORIYA",0,57007}, + { "ISCII-", "KANNADA",0,57008}, + { "ISCII-", "MALAYALAM",0,57009}, + { "ISCII-", "GUJARATI",0,57010}, + { "ISCII-", "PUNJABI",0,57011}, + { "KOR-", "JOHAB",0,1361}, + { "KSC-", "5601",0,1361}, + { "MAC-", "ROMAN",0,10000}, + { "MAC-", "JP",0,10001}, + { "MAC-", "CH(SP)(BIG5)",0,10002}, + { "MAC-", "KR",0,10003}, + { "MAC-", "AR",0,10004}, + { "MAC-", "HW",0,10005}, + { "MAC-", "GR",0,10006}, + { "MAC-", "CY",0,10007}, + { "MAC-", "CH(SP)(GB2312)",0,10008}, + { "MAC-", "ROMANIA",0,10010}, + { "MAC-", "UA",0,10017}, + { "MAC-", "TH",0,10021}, + { "MAC-", "LAT2",0,10029}, + { "MAC-", "ICE",0,10079}, + { "MAC-", "TR",0,10081}, + { "MAC-", "CR",0,10082} +}; + +int CPLENALL = _countof(CodePageNamesAll); +struct _tcptable *CodePageNamesSupp; +int CPLENSUPP = 1; + +//Gets codepage ID from string representing charset such as "iso-8859-1" +// input- the string +// size- max length of input string +int GetCharsetFromString(char *input, size_t size); + +//HexValue to DecValue ('a' to 10) +// HexValue- hexa value ('a') +// DecValue- poiner where to store dec value +// returns 0 if not success +int FromHexa(char HexValue, char *DecValue); + +//Decodes a char from Base64 +// Base64Value- input char in Base64 +// DecValue- pointer where to store the result +// returns 0 if not success +int FromBase64(char Base64Value, char *DecValue); + +//Decodes string in quoted printable +// Src- input string +// Dst- where to store output string +// DstLen- how max long should be output string +// isQ- if is "Q-encoding" modification. should be TRUE in headers +// always returns 1 +int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ); + +//Decodes string in base64 +// Src- input string +// Dst- where to store output string +// DstLen- how max long should be output string +// returns 0 if string was not properly decoded +int DecodeBase64(char *Src, char *Dst, int DstLen); + +//Converts string to unicode from string with specified codepage +// stream- input string +// cp- codepage of input string +// out- pointer to new allocated memory that contains unicode string +int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out); + +//Converts string from MIME header to unicode +// stream- input string +// cp- codepage of input string +// storeto- pointer to memory that contains unicode string +// mode- MIME_PLAIN or MIME_MAIL (MIME_MAIL deletes '"' from start and end of string) +void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, uint32_t cp, int mode); + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +int GetCharsetFromString(char *input, size_t size) +//"ISO-8859-1" to ID from table +{ + char *pin = input; + char *pout, *parser; + + if ((size < 1) || (parser = pout = new char[size + 1]) == nullptr) + return -1; + while ((*pin != 0) && (pin - input < (INT_PTR)size)) { + if ((*pin >= 'a') && (*pin <= 'z')) + *parser++ = *(pin++) - ('a' - 'A'); // make it capital + //else if (*pin=='\"') // this is already done in ExtractFromContentType + // *pin++; //skip the quotes if any + else + *parser++ = *pin++; + } + + *parser = 0; + + #ifdef DEBUG_DECODECODEPAGE + DebugLog(DecodeFile, "%s", pout); + #endif + for (int i = 0; i < CPLENALL; i++) { + size_t len = mir_strlen(CodePageNamesAll[i].NameBase); + if (0 == strncmp(pout, CodePageNamesAll[i].NameBase, len)) { + if (0 == mir_strcmp(pout + len, CodePageNamesAll[i].NameSub)) { + delete[] pout; + return CodePageNamesAll[i].CP; + } + } + } + delete[] pout; + return -1; //not found +} + +int FromHexa(char HexValue, char *DecValue) +{ + if (HexValue >= '0' && HexValue <= '9') { + *DecValue = HexValue - '0'; + return 1; + } + if (HexValue >= 'A' && HexValue <= 'F') { + *DecValue = HexValue - 'A' + 10; + return 1; + } + if (HexValue >= 'a' && HexValue <= 'f') { + *DecValue = HexValue - 'a' + 10; + return 1; + } + return 0; +} + +int FromBase64(char Base64Value, char *DecValue) +{ + if (Base64Value >= 'A' && Base64Value <= 'Z') { + *DecValue = Base64Value - 'A'; + return 1; + } + if (Base64Value >= 'a' && Base64Value <= 'z') { + *DecValue = Base64Value - 'a' + 26; + return 1; + } + if (Base64Value >= '0' && Base64Value <= '9') { + *DecValue = Base64Value - '0' + 52; + return 1; + } + if (Base64Value == '+') { + *DecValue = Base64Value - '+' + 62; + return 1; + } + if (Base64Value == '/') { + *DecValue = Base64Value - '/' + 63; + return 1; + } + if (Base64Value == '=') { + *DecValue = 0; + return 1; + } + return 0; +} + +int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ) +{ + #ifdef DEBUG_DECODEQUOTED + char *DstTemp = Dst; + DebugLog(DecodeFile, "%s", Src); + #endif + for (int Counter = 0; (*Src != 0) && DstLen && (Counter++ < DstLen); Src++, Dst++) + if (*Src == '=') { + if (!isQ) { + if (Src[1] == 0x0D) { + Src++; Src++; + if (Src[0] == 0x0A) Src++; + goto CopyCharQuotedPrintable; + } + if (Src[1] == 0x0A) { + Src++; Src++; + goto CopyCharQuotedPrintable; + } + } + char First, Second; + if (!FromHexa(*(++Src), &First)) { + *Dst++ = '='; Src--; + continue; + } + if (!FromHexa(*(++Src), &Second)) { + *Dst++ = '='; Src--; Src--; + continue; + } + *Dst = (char)(First) << 4; + *Dst += Second; + } + else if (isQ && *Src == '_') + *Dst = ' '; + else + CopyCharQuotedPrintable: // Yeah. Bad programming stile. + *Dst = *Src; + *Dst = 0; + #ifdef DEBUG_DECODEQUOTED + DebugLog(DecodeFile, "%s", DstTemp); + #endif + return 1; +} + +int DecodeBase64(char *Src, char *Dst, int DstLen) +{ + int Result = 0; + char Locator = 0, MiniResult[4]; + char *End = Dst + DstLen; + + MiniResult[0] = MiniResult[1] = MiniResult[2] = MiniResult[3] = 0; + + #ifdef DEBUG_DECODEBASE64 + char *DstTemp = Dst; + DebugLog(DecodeFile, "\n%s\n\n", Src); + #endif + while (*Src != 0 && DstLen && Dst != End) { + if ((*Src == 0x0D) || (*Src == 0x0A)) { + Src++; + continue; + } + if ((!(Result = FromBase64(*Src, MiniResult + Locator)) && (*Src == 0)) || Locator++ == 3) //end_of_str || end_of_4_bytes + { + Locator = 0; //next write to the first byte + *Dst++ = (char)((MiniResult[0] << 2) | (MiniResult[1] >> 4)); + if (Dst == End) goto end; //DstLen exceeded? + *Dst++ = (char)((MiniResult[1] << 4) | (MiniResult[2] >> 2)); + if (Dst == End) goto end; //someones don't like goto, but not me + *Dst++ = (char)((MiniResult[2] << 6) | MiniResult[3]); + if (!Result && (*Src == 0)) goto end; //end of string? + MiniResult[0] = MiniResult[1] = MiniResult[2] = MiniResult[3] = 0; //zero 4byte buffer for next loop + } + if (!Result) return 0; //unrecognised character occured + Src++; + } +end: + *Dst = 0; + #ifdef DEBUG_DECODEBASE64 + DebugLog(DecodeFile, "\n%s\n", DstTemp); + #endif + return 1; +} + + + +int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out) +{ + CPINFO CPInfo; + wchar_t *temp, *src = *out, *dest; + size_t outlen; + int streamlen, Index; + + //codepages, which require to have set 0 in dwFlags parameter when calling MultiByteToWideChar + uint32_t CodePagesZeroFlags[] = {50220, 50221, 50222, 50225, 50227, 50229, 52936, 54936, 57002, 57003, 57004, 57005, 57006, 57007, 57008, 57009, 57010, 57011, 65000, 65001}; + + if ((cp != CP_ACP) && (cp != CP_OEMCP) && (cp != CP_MACCP) && (cp != CP_THREAD_ACP) && (cp != CP_SYMBOL) && (cp != CP_UTF7) && (cp != CP_UTF8) && !GetCPInfo(cp, &CPInfo)) + cp = CP_ACP; + #ifdef DEBUG_DECODECODEPAGE + DebugLog(DecodeFile, "%d", cp); + #endif + + for (Index = 0; Index < sizeof(CodePagesZeroFlags) / sizeof(CodePagesZeroFlags[0]); Index++) + if (CodePagesZeroFlags[Index] == cp) { + Index = -1; + break; + } + if (Index == -1) + streamlen = MultiByteToWideChar(cp, 0, stream, -1, nullptr, 0); + else + streamlen = MultiByteToWideChar(cp, MB_USEGLYPHCHARS, stream, -1, nullptr, 0); + + if (*out != nullptr) + outlen = mir_wstrlen(*out); + else + outlen = 0; + temp = new wchar_t[streamlen + outlen + 1]; + + if (*out != nullptr) { + for (dest = temp; *src != (wchar_t)0; src++, dest++) //copy old string from *out to temp + *dest = *src; + // *dest++=L' '; //add space? + delete[] * out; + } + else + dest = temp; + *out = temp; + + if (Index == -1) { + if (!MultiByteToWideChar(cp, 0, stream, -1, dest, streamlen)) + return 0; + } + else { + if (!MultiByteToWideChar(cp, MB_USEGLYPHCHARS, stream, -1, dest, streamlen)) + return 0; + } + return 1; +} + +void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, uint32_t cp, int mode) +{ + char *start = stream, *finder, *finderend; + char Encoding = 0; + + if (stream == nullptr) + return; + + while (WS(start)) start++; + wchar_t *tempstore = nullptr; + if (!ConvertStringToUnicode(stream, cp, &tempstore))return; + + size_t tempstoreLength = mir_wstrlen(tempstore); + + size_t outind = 0; + while (*start != 0) { + if (CODES(start)) { + finder = start + 2; finderend = finder; + while (!CODED(finderend) && !EOS(finderend)) finderend++; + start = finderend; + if (CODED(finderend)) { + Encoding = *(finderend + 1); + switch (Encoding) { + case 'b': + case 'B': + case 'q': + case 'Q': + break; + default: + goto NotEncoded; + } + if (-1 == (cp = (uint32_t)GetCharsetFromString(finder, finderend - finder))) + cp = CP_ACP; + if (Encoding != 0) { + int size = 0, codeend; + char *pcodeend = nullptr; + + finder = finderend + 2; + if (CODED(finder)) + finder++; + while (WS(finder)) finder++; + finderend = finder; + while (!CODEE(finderend) && !EOS(finderend)) finderend++; + if (codeend = CODEE(finderend)) + pcodeend = finderend; + while (WS(finderend - 1)) finderend--; + if ((mode == MIME_MAIL) && (((*finder == '"') && (*(finderend - 1) == '"')))) { + finder++; + finderend--; + } + char *oneWordEncoded = new char[finderend - finder + 1]; + strncpy(oneWordEncoded, finder, finderend - finder); + oneWordEncoded[finderend - finder] = 0; + switch (Encoding) { + case 'b': + case 'B': + size = (finderend - finder) * 3 / 4 + 3 + 1 + 1; + break; + case 'q': + case 'Q': + size = finderend - finder + 1 + 1; + break; + } + + char *DecodedResult = new char[size + 1]; + switch (Encoding) { + case 'q': + case 'Q': + DecodeQuotedPrintable(oneWordEncoded, DecodedResult, size, TRUE); + break; + case 'b': + case 'B': + DecodeBase64(oneWordEncoded, DecodedResult, size); + break; + } + delete[] oneWordEncoded; + if (codeend) + finderend = pcodeend + 2; + if (WS(finderend)) //if string continues and there's some whitespace, add space to string that is to be converted + { + size_t len = mir_strlen(DecodedResult); + DecodedResult[len] = ' '; + DecodedResult[len + 1] = 0; + finderend++; + } + wchar_t *oneWord = nullptr; + if (ConvertStringToUnicode(DecodedResult, cp, &oneWord)) { + size_t len = mir_wstrlen(oneWord); + memcpy(&tempstore[outind], oneWord, len * sizeof(wchar_t)); + outind += len; + } + delete oneWord; + oneWord = nullptr; + delete[] DecodedResult; + start = finderend; + } + else if (!EOS(start)) start++; + } + else if (!EOS(start)) start++; + } + else { +NotEncoded: + tempstore[outind] = tempstore[start - stream]; + outind++; + if (outind > tempstoreLength) break; + start++; + } + } + tempstore[outind] = 0; + *storeto = tempstore; +} diff --git a/protocols/YAMN/src/mails/mails.cpp b/protocols/YAMN/src/mails/mails.cpp index 168c6c9397..1385cb649d 100644 --- a/protocols/YAMN/src/mails/mails.cpp +++ b/protocols/YAMN/src/mails/mails.cpp @@ -1,473 +1,473 @@ -/* - * This code implements retrieving info from MIME header - * - * (c) majvan 2002-2004 - */ - -#include "../stdafx.h" - - //-------------------------------------------------------------------------------------------------- - //-------------------------------------------------------------------------------------------------- - - // SMALL INTRO - // Mails are queued in a queue (chained list). Pointer to first mail is pointed from Account structure - // member called Mails. - // Mail queue is ended with NULL- pointered mail (NULL handle) - - //Creates new mail for plugin (calling plugin's constructor, when plugin imported to YAMN) -INT_PTR CreateAccountMailSvc(WPARAM wParam, LPARAM lParam); - -//Deletes mail for plugin (calling plugin's destructor, when plugin imported to YAMN) -INT_PTR DeleteAccountMailSvc(WPARAM wParam, LPARAM lParam); - -//Loads mail data from standard storage to memory -INT_PTR LoadMailDataSvc(WPARAM wParam, LPARAM lParam); - -//Deletes mail data from memory -INT_PTR UnloadMailDataSvc(WPARAM wParam, LPARAM); - -//Saves mail data from memory to standard storage -INT_PTR SaveMailDataSvc(WPARAM wParam, LPARAM lParam); - -//Appends second MIME mail queue to the first one -//Only finds the end of first queue and its Next memember repoints to second one -void WINAPI AppendQueueFcn(HYAMNMAIL first, HYAMNMAIL second); - -//Synchronizes two accounts -//Function finds, if there were some mails deleted from mailbox and deletes (depends on RemovedOld param) them from OldQueue -//Next finds, if there are new mails. Mails that are still on mailbox are deleted (depends on RemovedNew param) from NewQueue -//After this, OldQueue is pointer to mails that are on mailbox, but not new mails -//and NewQueue contains new mails in account -//New accounts can be then appended to account mails queue, but they have set the New flag -// -//Two mails equals if they have the same ID -// -// hPlugin- handle of plugin going to delete mails -// OldQueue- queue of mails that we found on mailbox last time, after function finishes queue contains all mails except new ones -// RemovedOld- queue of mails where to store removed mails from OldQueue, if NULL deletes mails from OldQueue -// NewQueue- queue of mails that we found on mailbox (all mails), after function finishes queue contains only new mails -// RemovedNew- queue of mails where to store removed mails from NewQueue, if NULL deletes mails from NewQueue -//So function works like: -//1. delete (or move to RemovedOld queue if RemovedOld is not NULL) all mails from OldQueue not found in NewQueue -//2. delete (or move to RemovedNew queue if RemovedNew is not NULL) all mails from NewQueue found in OldQueue -void WINAPI SynchroMessagesFcn(CAccount *Account, HYAMNMAIL *OldQueue, HYAMNMAIL *RemovedOld, HYAMNMAIL *NewQueue, HYAMNMAIL *RemovedNew); - -//Deletes messages from mail From to the end -// Account- account who owns mails -// From- first mail in queue, which is going to delete -void WINAPI DeleteMessagesToEndFcn(CAccount *Account, HYAMNMAIL From); - -//Removes message from queue, does not delete from memory -// From- queue pointer -// Which- mail to delete -// mode- nonzero if you want to decrement numbers in messages that are bigger than the one in Which mail, 0 if not -void WINAPI DeleteMessageFromQueueFcn(HYAMNMAIL *From, HYAMNMAIL Which, int mode); - -//Finds message in queue that has the same ID number -// From- message queue -// ID- pointer to ID -// returns pointer to found message, NULL if not found -HYAMNMAIL WINAPI FindMessageByIDFcn(HYAMNMAIL From, char *ID); - -//Translate header from text to queue of CMimeItem structures -//This means that new queue will contain all info about headers -// stream- pointer to text containing header (can be ended with zero) -// len- length of stream -// head- function fills this pointer to first header item in queue -void WINAPI TranslateHeaderFcn(char *stream, int len, struct CMimeItem **head); - -//Creates new mail queue, copying only these mails, that have set flag for deleting -// From- message queue, whose mail with given flag are duplicated -// returns new mail queue (or NULL when no mail with flag is in From queue) -//Function does not copy the whole mails, it copies only ID string. And ID is copied as string, so -//you can use this fcn only if you have your ID as pointer to char string ended with zero character -HYAMNMAIL WINAPI CreateNewDeleteQueueFcn(HYAMNMAIL From); - -//Sets/removes flags from specific mails -// From- pointer to first message -// FlagsSet- mail must have set these flags... -// FlagsNotSet- ...and must not have set these flags... -// FlagsToSetRemove- ...to set/remove these flags (see mode) -// mode- nonzero to set, else remove -void WINAPI SetRemoveFlagsInQueueFcn(HYAMNMAIL From, uint32_t FlagsSet, uint32_t FlagsNotSet, uint32_t FlagsToSetRemove, int mode); - -struct CExportedFunctions MailExportedFcn[] = -{ - {YAMN_SYNCHROMIMEMSGSID, (void *)SynchroMessagesFcn}, - {YAMN_TRANSLATEHEADERID, (void *)TranslateHeaderFcn}, - {YAMN_APPENDQUEUEID, (void *)AppendQueueFcn}, - {YAMN_DELETEMIMEQUEUEID, (void *)DeleteMessagesToEndFcn}, - {YAMN_DELETEMIMEMESSAGEID, (void *)DeleteMessageFromQueueFcn}, - {YAMN_FINDMIMEMESSAGEID, (void *)FindMessageByIDFcn}, - {YAMN_CREATENEWDELETEQUEUEID, (void *)CreateNewDeleteQueueFcn}, - {YAMN_SETREMOVEQUEUEFLAGSID, (void *)SetRemoveFlagsInQueueFcn}, -}; - -struct CExportedServices MailExportedSvc[] = -{ - {MS_YAMN_CREATEACCOUNTMAIL, CreateAccountMailSvc}, - {MS_YAMN_DELETEACCOUNTMAIL, DeleteAccountMailSvc}, - {MS_YAMN_LOADMAILDATA, LoadMailDataSvc}, - {MS_YAMN_UNLOADMAILDATA, UnloadMailDataSvc}, - {MS_YAMN_SAVEMAILDATA, SaveMailDataSvc}, -}; - - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -INT_PTR CreateAccountMailSvc(WPARAM wParam, LPARAM lParam) -{ - CAccount *Account = (CAccount *)wParam; - uint32_t MailVersion = (uint32_t)lParam; - HYAMNMAIL NewMail; - - //test if we are going to initialize members of suitable structure (structures of plugin and YAMN must match) - if (MailVersion != YAMN_MAILVERSION) - return NULL; - - if (Account->Plugin != nullptr) { - if (Account->Plugin->MailFcn->NewMailFcnPtr != nullptr) { - //Let plugin create its own structure, which can be derived from CAccount structure - if (nullptr == (NewMail = Account->Plugin->MailFcn->NewMailFcnPtr(Account, YAMN_MAILVERSION))) - return NULL; - } - else { - //We suggest plugin uses standard CAccount structure, so we create it - if (nullptr == (NewMail = new YAMNMAIL)) - //If not created successfully - return NULL; - NewMail->MailData = nullptr; - } - //Init every members of structure, used by YAMN - return (INT_PTR)NewMail; - } - return NULL; -} - -INT_PTR DeleteAccountMailSvc(WPARAM wParam, LPARAM lParam) -{ - HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; - HYAMNMAIL OldMail = (HYAMNMAIL)lParam; - struct CMimeItem *TH; - - if (Plugin->MailFcn != nullptr) { - if (Plugin->MailFcn->DeleteMailFcnPtr != nullptr) { - //Let plugin delete its own CMimeMsgQueue derived structure - Plugin->MailFcn->DeleteMailFcnPtr(OldMail); - return 1; - } - } - if (OldMail->MailData != nullptr) { - if (OldMail->MailData->Body != nullptr) - delete[] OldMail->MailData->Body; - if ((TH = OldMail->MailData->TranslatedHeader) != nullptr) - for (; OldMail->MailData->TranslatedHeader != nullptr;) { - TH = TH->Next; - if (OldMail->MailData->TranslatedHeader->name != nullptr) - delete[] OldMail->MailData->TranslatedHeader->name; - if (OldMail->MailData->TranslatedHeader->value != nullptr) - delete[] OldMail->MailData->TranslatedHeader->value; - delete OldMail->MailData->TranslatedHeader; - OldMail->MailData->TranslatedHeader = TH; - } - delete OldMail->MailData; - } - if (OldMail->ID != nullptr) - delete[] OldMail->ID; - - delete OldMail; //consider mail as standard HYAMNMAIL, not initialized before and use its own destructor - return 1; -} - - -void WINAPI AppendQueueFcn(HYAMNMAIL first, HYAMNMAIL second) -{ - HYAMNMAIL Finder = first; - while (Finder->Next != nullptr) Finder = Finder->Next; - Finder->Next = second; -} - -INT_PTR LoadMailDataSvc(WPARAM wParam, LPARAM lParam) -{ - HYAMNMAIL Mail = (HYAMNMAIL)wParam; - uint32_t MailVersion = (uint32_t)lParam; - - if (MailVersion != YAMN_MAILDATAVERSION) - return NULL; - - // now we have all data to memory persisting, so no loading is needed - return (INT_PTR)Mail->MailData; -} - -INT_PTR UnloadMailDataSvc(WPARAM, LPARAM) -{ - return 1; -} - -INT_PTR SaveMailDataSvc(WPARAM, LPARAM lParam) -{ - uint32_t MailVersion = (uint32_t)lParam; - - if (MailVersion != YAMN_MAILDATAVERSION) - return (INT_PTR)-1; - - // now we have all data to memory persisting, so no saving is needed - return (INT_PTR)0; -} - -void WINAPI SynchroMessagesFcn(CAccount *Account, HYAMNMAIL *OldQueue, HYAMNMAIL *RemovedOld, HYAMNMAIL *NewQueue, HYAMNMAIL *RemovedNew) -//deletes messages from new queue, if they are old -//it also deletes messages from old queue, if they are not in mailbox anymore -//"YAMN_MSG_DELETED" messages in old queue remain in old queue (are never removed, although they are not in new queue) -//"YAMN_MSG_DELETED" messages in new queue remain in new queue (are never removed, although they can be in old queue) -{ - HYAMNMAIL Finder, FinderPrev; - HYAMNMAIL Parser, ParserPrev; - HYAMNMAIL RemovedOldParser = nullptr; - HYAMNMAIL RemovedNewParser = nullptr; - if (RemovedOld != nullptr) *RemovedOld = nullptr; - if (RemovedNew != nullptr) *RemovedNew = nullptr; - - for (FinderPrev = nullptr, Finder = *OldQueue; Finder != nullptr;) { - if (Finder->Flags & YAMN_MSG_DELETED) //if old queue contains deleted mail - { - FinderPrev = Finder; - Finder = Finder->Next; //get next message in old queue for testing - continue; - } - for (ParserPrev = nullptr, Parser = *NewQueue; Parser != nullptr; ParserPrev = Parser, Parser = Parser->Next) { - if (Parser->Flags & YAMN_MSG_DELETED) - continue; - - if (Parser->ID == nullptr) //simply ignore the message, that has not filled its ID - continue; - - if (0 == mir_strcmp(Parser->ID, Finder->ID)) //search for equal message in new queue - break; - } - if (Parser != nullptr) //found equal message in new queue - { - if (Parser == *NewQueue) - *NewQueue = (*NewQueue)->Next; - else - ParserPrev->Next = Parser->Next; - Finder->Number = Parser->Number; //rewrite the number of current message in old queue - - if (RemovedNew == nullptr) //delete from new queue - DeleteAccountMailSvc((WPARAM)Account->Plugin, (LPARAM)Parser); - else //or move to RemovedNew - { - if (RemovedNewParser == nullptr) //if it is first mail removed from NewQueue - *RemovedNew = Parser; //set RemovedNew queue to point to first message in removed queue - else - RemovedNewParser->Next = Parser; //else don't forget to show to next message in RemovedNew queue - RemovedNewParser = Parser; //follow RemovedNew queue - RemovedNewParser->Next = nullptr; - } - FinderPrev = Finder; - Finder = Finder->Next; //get next message in old queue for testing - } - else //a message was already deleted from mailbox - { - if (Finder == *OldQueue) //if we are at the first item in OldQueue - { - *OldQueue = (*OldQueue)->Next; //set OldQueue to next item - if (RemovedOld == nullptr) //delete from old queue - DeleteAccountMailSvc((WPARAM)Account->Plugin, (LPARAM)Finder); - else //or move to RemovedOld - { - if (RemovedOldParser == nullptr) //if it is first mail removed from OldQueue - *RemovedOld = Finder; //set RemovedOld queue to point to first message in removed queue - else - RemovedOldParser->Next = Finder; //else don't forget to show to next message in RemovedNew queue - RemovedOldParser = Finder; //follow RemovedOld queue - RemovedOldParser->Next = nullptr; - } - Finder = *OldQueue; - } - else { - FinderPrev->Next = Finder->Next; - if (RemovedOld == nullptr) //delete from old queue - DeleteAccountMailSvc((WPARAM)Account->Plugin, (LPARAM)Finder); - else //or move to RemovedOld - { - if (RemovedOldParser == nullptr) //if it is first mail removed from OldQueue - *RemovedOld = Finder; //set RemovedOld queue to point to first message in removed queue - else - RemovedOldParser->Next = Finder; //else don't forget to show to next message in RemovedNew queue - RemovedOldParser = Finder; //follow RemovedOld queue - RemovedOldParser->Next = nullptr; - } - Finder = FinderPrev->Next; - } - } - } -} - -void WINAPI DeleteMessagesToEndFcn(CAccount *Account, HYAMNMAIL From) -{ - HYAMNMAIL Temp; - while (From != nullptr) { - Temp = From; - From = From->Next; - DeleteAccountMailSvc((WPARAM)Account->Plugin, (LPARAM)Temp); - } -} - -void WINAPI DeleteMessageFromQueueFcn(HYAMNMAIL *From, HYAMNMAIL Which, int mode = 0) -{ - uint32_t Number = Which->Number; - HYAMNMAIL Parser; - - if (*From == Which) { - Parser = Which->Next; - *From = Parser; - } - else { - for (Parser = *From; Which != Parser->Next; Parser = Parser->Next) - if (mode && (Parser->Number > Number)) Parser->Number--; - if (mode && (Parser->Number > Number)) Parser->Number--; - Parser->Next = Parser->Next->Next; - Parser = Which->Next; - } - if (mode) - for (; Parser != nullptr; Parser = Parser->Next) - if (Parser->Number > Number) Parser->Number--; -} - -void DeleteMessagesFromQueue(HYAMNMAIL *From, HYAMNMAIL Which, int mode = 0) -{ - HYAMNMAIL Parser; - - for (Parser = Which; Parser != nullptr; Parser = Parser->Next) - DeleteMessageFromQueueFcn(From, Parser, mode); -} - -HYAMNMAIL WINAPI FindMessageByIDFcn(HYAMNMAIL From, char *ID) -{ - HYAMNMAIL Browser; - - for (Browser = From; Browser != nullptr; Browser = Browser->Next) - if (0 == mir_strcmp(Browser->ID, ID)) - break; - return Browser; -} - -void WINAPI TranslateHeaderFcn(char *stream, int len, struct CMimeItem **head) -{ - try { - char *finder = stream; - char *prev1, *prev2, *prev3; - struct CMimeItem *Item = nullptr; - - while (finder <= (stream + len)) { - while (ENDLINEWS(finder)) finder++; - - //at the start of line - if (DOTLINE(finder + 1)) //at the end of stream - break; - - prev1 = finder; - - while (*finder != ':' && !EOS(finder)) finder++; - if (!EOS(finder)) - prev2 = finder++; - else - break; - - while (WS(finder) && !EOS(finder)) finder++; - if (!EOS(finder)) - prev3 = finder; - else - break; - - do { - if (ENDLINEWS(finder)) finder += 2; //after endline information continues - while (!ENDLINE(finder) && !EOS(finder)) finder++; - } while (ENDLINEWS(finder)); - - if (Item != nullptr) { - if (nullptr == (Item->Next = new struct CMimeItem)) - break; - Item = Item->Next; - } - else { - Item = new CMimeItem; - *head = Item; - } - - Item->Next = nullptr; - Item->name = new char[prev2 - prev1 + 1]; - mir_strncpy(Item->name, prev1, prev2 - prev1 + 1); - Item->value = new char[finder - prev3 + 1]; - mir_strncpy(Item->value, prev3, finder - prev3 + 1); - - if (EOS(finder)) - break; - finder++; - if (ENDLINE(finder)) { - finder++; - if (ENDLINE(finder)) { - // end of headers. message body begins - finder++; - if (ENDLINE(finder))finder++; - prev1 = finder; - while (!DOTLINE(finder + 1))finder++; - if (ENDLINE(finder))finder--; - prev2 = finder; - if (prev2 > prev1) { // yes, we have body - if (nullptr == (Item->Next = new struct CMimeItem)) break; // Cant create new item?! - Item = Item->Next; - Item->Next = nullptr;//just in case; - Item->name = new char[5]; strncpy(Item->name, "Body", 5); - Item->value = new char[prev2 - prev1]; - mir_strncpy(Item->value, prev1, prev2 - prev1 - 1); - } - break; // there is nothing else - } - } - } - } - catch (...) { - MessageBoxA(nullptr, "Translate header error", "", 0); - } -} - -HYAMNMAIL WINAPI CreateNewDeleteQueueFcn(HYAMNMAIL From) -{ - HYAMNMAIL FirstMail, Browser = nullptr; - - for (FirstMail = nullptr; From != nullptr; From = From->Next) { - if ((From->Flags & (YAMN_MSG_USERDELETE | YAMN_MSG_AUTODELETE)) && !(From->Flags & YAMN_MSG_DELETED)) { - if (FirstMail == nullptr) { - FirstMail = Browser = new YAMNMAIL; - if (FirstMail == nullptr) - break; - } - else { - Browser->Next = new YAMNMAIL; - Browser = Browser->Next; - } - Browser->ID = new char[mir_strlen(From->ID) + 1]; - mir_strcpy(Browser->ID, From->ID); - Browser->Number = From->Number; - Browser->Flags = From->Flags; - } - } - return FirstMail; -} - -void WINAPI SetRemoveFlagsInQueueFcn(HYAMNMAIL From, uint32_t FlagsSet, uint32_t FlagsNotSet, uint32_t FlagsToSetRemove, int mode) -{ - HYAMNMAIL msgq; - - for (msgq = (HYAMNMAIL)From; msgq != nullptr; msgq = msgq->Next) { - if ((FlagsSet == (msgq->Flags & FlagsSet)) && (0 == (msgq->Flags & FlagsNotSet))) { - if (mode) - msgq->Flags = msgq->Flags | FlagsToSetRemove; - else - msgq->Flags = msgq->Flags & ~FlagsToSetRemove; - } - } -} +/* + * This code implements retrieving info from MIME header + * + * (c) majvan 2002-2004 + */ + +#include "../stdafx.h" + + //-------------------------------------------------------------------------------------------------- + //-------------------------------------------------------------------------------------------------- + + // SMALL INTRO + // Mails are queued in a queue (chained list). Pointer to first mail is pointed from Account structure + // member called Mails. + // Mail queue is ended with NULL- pointered mail (NULL handle) + + //Creates new mail for plugin (calling plugin's constructor, when plugin imported to YAMN) +INT_PTR CreateAccountMailSvc(WPARAM wParam, LPARAM lParam); + +//Deletes mail for plugin (calling plugin's destructor, when plugin imported to YAMN) +INT_PTR DeleteAccountMailSvc(WPARAM wParam, LPARAM lParam); + +//Loads mail data from standard storage to memory +INT_PTR LoadMailDataSvc(WPARAM wParam, LPARAM lParam); + +//Deletes mail data from memory +INT_PTR UnloadMailDataSvc(WPARAM wParam, LPARAM); + +//Saves mail data from memory to standard storage +INT_PTR SaveMailDataSvc(WPARAM wParam, LPARAM lParam); + +//Appends second MIME mail queue to the first one +//Only finds the end of first queue and its Next memember repoints to second one +void WINAPI AppendQueueFcn(HYAMNMAIL first, HYAMNMAIL second); + +//Synchronizes two accounts +//Function finds, if there were some mails deleted from mailbox and deletes (depends on RemovedOld param) them from OldQueue +//Next finds, if there are new mails. Mails that are still on mailbox are deleted (depends on RemovedNew param) from NewQueue +//After this, OldQueue is pointer to mails that are on mailbox, but not new mails +//and NewQueue contains new mails in account +//New accounts can be then appended to account mails queue, but they have set the New flag +// +//Two mails equals if they have the same ID +// +// hPlugin- handle of plugin going to delete mails +// OldQueue- queue of mails that we found on mailbox last time, after function finishes queue contains all mails except new ones +// RemovedOld- queue of mails where to store removed mails from OldQueue, if NULL deletes mails from OldQueue +// NewQueue- queue of mails that we found on mailbox (all mails), after function finishes queue contains only new mails +// RemovedNew- queue of mails where to store removed mails from NewQueue, if NULL deletes mails from NewQueue +//So function works like: +//1. delete (or move to RemovedOld queue if RemovedOld is not NULL) all mails from OldQueue not found in NewQueue +//2. delete (or move to RemovedNew queue if RemovedNew is not NULL) all mails from NewQueue found in OldQueue +void WINAPI SynchroMessagesFcn(CAccount *Account, HYAMNMAIL *OldQueue, HYAMNMAIL *RemovedOld, HYAMNMAIL *NewQueue, HYAMNMAIL *RemovedNew); + +//Deletes messages from mail From to the end +// Account- account who owns mails +// From- first mail in queue, which is going to delete +void WINAPI DeleteMessagesToEndFcn(CAccount *Account, HYAMNMAIL From); + +//Removes message from queue, does not delete from memory +// From- queue pointer +// Which- mail to delete +// mode- nonzero if you want to decrement numbers in messages that are bigger than the one in Which mail, 0 if not +void WINAPI DeleteMessageFromQueueFcn(HYAMNMAIL *From, HYAMNMAIL Which, int mode); + +//Finds message in queue that has the same ID number +// From- message queue +// ID- pointer to ID +// returns pointer to found message, NULL if not found +HYAMNMAIL WINAPI FindMessageByIDFcn(HYAMNMAIL From, char *ID); + +//Translate header from text to queue of CMimeItem structures +//This means that new queue will contain all info about headers +// stream- pointer to text containing header (can be ended with zero) +// len- length of stream +// head- function fills this pointer to first header item in queue +void WINAPI TranslateHeaderFcn(char *stream, int len, struct CMimeItem **head); + +//Creates new mail queue, copying only these mails, that have set flag for deleting +// From- message queue, whose mail with given flag are duplicated +// returns new mail queue (or NULL when no mail with flag is in From queue) +//Function does not copy the whole mails, it copies only ID string. And ID is copied as string, so +//you can use this fcn only if you have your ID as pointer to char string ended with zero character +HYAMNMAIL WINAPI CreateNewDeleteQueueFcn(HYAMNMAIL From); + +//Sets/removes flags from specific mails +// From- pointer to first message +// FlagsSet- mail must have set these flags... +// FlagsNotSet- ...and must not have set these flags... +// FlagsToSetRemove- ...to set/remove these flags (see mode) +// mode- nonzero to set, else remove +void WINAPI SetRemoveFlagsInQueueFcn(HYAMNMAIL From, uint32_t FlagsSet, uint32_t FlagsNotSet, uint32_t FlagsToSetRemove, int mode); + +struct CExportedFunctions MailExportedFcn[] = +{ + {YAMN_SYNCHROMIMEMSGSID, (void *)SynchroMessagesFcn}, + {YAMN_TRANSLATEHEADERID, (void *)TranslateHeaderFcn}, + {YAMN_APPENDQUEUEID, (void *)AppendQueueFcn}, + {YAMN_DELETEMIMEQUEUEID, (void *)DeleteMessagesToEndFcn}, + {YAMN_DELETEMIMEMESSAGEID, (void *)DeleteMessageFromQueueFcn}, + {YAMN_FINDMIMEMESSAGEID, (void *)FindMessageByIDFcn}, + {YAMN_CREATENEWDELETEQUEUEID, (void *)CreateNewDeleteQueueFcn}, + {YAMN_SETREMOVEQUEUEFLAGSID, (void *)SetRemoveFlagsInQueueFcn}, +}; + +struct CExportedServices MailExportedSvc[] = +{ + {MS_YAMN_CREATEACCOUNTMAIL, CreateAccountMailSvc}, + {MS_YAMN_DELETEACCOUNTMAIL, DeleteAccountMailSvc}, + {MS_YAMN_LOADMAILDATA, LoadMailDataSvc}, + {MS_YAMN_UNLOADMAILDATA, UnloadMailDataSvc}, + {MS_YAMN_SAVEMAILDATA, SaveMailDataSvc}, +}; + + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +INT_PTR CreateAccountMailSvc(WPARAM wParam, LPARAM lParam) +{ + CAccount *Account = (CAccount *)wParam; + uint32_t MailVersion = (uint32_t)lParam; + HYAMNMAIL NewMail; + + //test if we are going to initialize members of suitable structure (structures of plugin and YAMN must match) + if (MailVersion != YAMN_MAILVERSION) + return NULL; + + if (Account->Plugin != nullptr) { + if (Account->Plugin->MailFcn->NewMailFcnPtr != nullptr) { + //Let plugin create its own structure, which can be derived from CAccount structure + if (nullptr == (NewMail = Account->Plugin->MailFcn->NewMailFcnPtr(Account, YAMN_MAILVERSION))) + return NULL; + } + else { + //We suggest plugin uses standard CAccount structure, so we create it + if (nullptr == (NewMail = new YAMNMAIL)) + //If not created successfully + return NULL; + NewMail->MailData = nullptr; + } + //Init every members of structure, used by YAMN + return (INT_PTR)NewMail; + } + return NULL; +} + +INT_PTR DeleteAccountMailSvc(WPARAM wParam, LPARAM lParam) +{ + HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; + HYAMNMAIL OldMail = (HYAMNMAIL)lParam; + struct CMimeItem *TH; + + if (Plugin->MailFcn != nullptr) { + if (Plugin->MailFcn->DeleteMailFcnPtr != nullptr) { + //Let plugin delete its own CMimeMsgQueue derived structure + Plugin->MailFcn->DeleteMailFcnPtr(OldMail); + return 1; + } + } + if (OldMail->MailData != nullptr) { + if (OldMail->MailData->Body != nullptr) + delete[] OldMail->MailData->Body; + if ((TH = OldMail->MailData->TranslatedHeader) != nullptr) + for (; OldMail->MailData->TranslatedHeader != nullptr;) { + TH = TH->Next; + if (OldMail->MailData->TranslatedHeader->name != nullptr) + delete[] OldMail->MailData->TranslatedHeader->name; + if (OldMail->MailData->TranslatedHeader->value != nullptr) + delete[] OldMail->MailData->TranslatedHeader->value; + delete OldMail->MailData->TranslatedHeader; + OldMail->MailData->TranslatedHeader = TH; + } + delete OldMail->MailData; + } + if (OldMail->ID != nullptr) + delete[] OldMail->ID; + + delete OldMail; //consider mail as standard HYAMNMAIL, not initialized before and use its own destructor + return 1; +} + + +void WINAPI AppendQueueFcn(HYAMNMAIL first, HYAMNMAIL second) +{ + HYAMNMAIL Finder = first; + while (Finder->Next != nullptr) Finder = Finder->Next; + Finder->Next = second; +} + +INT_PTR LoadMailDataSvc(WPARAM wParam, LPARAM lParam) +{ + HYAMNMAIL Mail = (HYAMNMAIL)wParam; + uint32_t MailVersion = (uint32_t)lParam; + + if (MailVersion != YAMN_MAILDATAVERSION) + return NULL; + + // now we have all data to memory persisting, so no loading is needed + return (INT_PTR)Mail->MailData; +} + +INT_PTR UnloadMailDataSvc(WPARAM, LPARAM) +{ + return 1; +} + +INT_PTR SaveMailDataSvc(WPARAM, LPARAM lParam) +{ + uint32_t MailVersion = (uint32_t)lParam; + + if (MailVersion != YAMN_MAILDATAVERSION) + return (INT_PTR)-1; + + // now we have all data to memory persisting, so no saving is needed + return (INT_PTR)0; +} + +void WINAPI SynchroMessagesFcn(CAccount *Account, HYAMNMAIL *OldQueue, HYAMNMAIL *RemovedOld, HYAMNMAIL *NewQueue, HYAMNMAIL *RemovedNew) +//deletes messages from new queue, if they are old +//it also deletes messages from old queue, if they are not in mailbox anymore +//"YAMN_MSG_DELETED" messages in old queue remain in old queue (are never removed, although they are not in new queue) +//"YAMN_MSG_DELETED" messages in new queue remain in new queue (are never removed, although they can be in old queue) +{ + HYAMNMAIL Finder, FinderPrev; + HYAMNMAIL Parser, ParserPrev; + HYAMNMAIL RemovedOldParser = nullptr; + HYAMNMAIL RemovedNewParser = nullptr; + if (RemovedOld != nullptr) *RemovedOld = nullptr; + if (RemovedNew != nullptr) *RemovedNew = nullptr; + + for (FinderPrev = nullptr, Finder = *OldQueue; Finder != nullptr;) { + if (Finder->Flags & YAMN_MSG_DELETED) //if old queue contains deleted mail + { + FinderPrev = Finder; + Finder = Finder->Next; //get next message in old queue for testing + continue; + } + for (ParserPrev = nullptr, Parser = *NewQueue; Parser != nullptr; ParserPrev = Parser, Parser = Parser->Next) { + if (Parser->Flags & YAMN_MSG_DELETED) + continue; + + if (Parser->ID == nullptr) //simply ignore the message, that has not filled its ID + continue; + + if (0 == mir_strcmp(Parser->ID, Finder->ID)) //search for equal message in new queue + break; + } + if (Parser != nullptr) //found equal message in new queue + { + if (Parser == *NewQueue) + *NewQueue = (*NewQueue)->Next; + else + ParserPrev->Next = Parser->Next; + Finder->Number = Parser->Number; //rewrite the number of current message in old queue + + if (RemovedNew == nullptr) //delete from new queue + DeleteAccountMailSvc((WPARAM)Account->Plugin, (LPARAM)Parser); + else //or move to RemovedNew + { + if (RemovedNewParser == nullptr) //if it is first mail removed from NewQueue + *RemovedNew = Parser; //set RemovedNew queue to point to first message in removed queue + else + RemovedNewParser->Next = Parser; //else don't forget to show to next message in RemovedNew queue + RemovedNewParser = Parser; //follow RemovedNew queue + RemovedNewParser->Next = nullptr; + } + FinderPrev = Finder; + Finder = Finder->Next; //get next message in old queue for testing + } + else //a message was already deleted from mailbox + { + if (Finder == *OldQueue) //if we are at the first item in OldQueue + { + *OldQueue = (*OldQueue)->Next; //set OldQueue to next item + if (RemovedOld == nullptr) //delete from old queue + DeleteAccountMailSvc((WPARAM)Account->Plugin, (LPARAM)Finder); + else //or move to RemovedOld + { + if (RemovedOldParser == nullptr) //if it is first mail removed from OldQueue + *RemovedOld = Finder; //set RemovedOld queue to point to first message in removed queue + else + RemovedOldParser->Next = Finder; //else don't forget to show to next message in RemovedNew queue + RemovedOldParser = Finder; //follow RemovedOld queue + RemovedOldParser->Next = nullptr; + } + Finder = *OldQueue; + } + else { + FinderPrev->Next = Finder->Next; + if (RemovedOld == nullptr) //delete from old queue + DeleteAccountMailSvc((WPARAM)Account->Plugin, (LPARAM)Finder); + else //or move to RemovedOld + { + if (RemovedOldParser == nullptr) //if it is first mail removed from OldQueue + *RemovedOld = Finder; //set RemovedOld queue to point to first message in removed queue + else + RemovedOldParser->Next = Finder; //else don't forget to show to next message in RemovedNew queue + RemovedOldParser = Finder; //follow RemovedOld queue + RemovedOldParser->Next = nullptr; + } + Finder = FinderPrev->Next; + } + } + } +} + +void WINAPI DeleteMessagesToEndFcn(CAccount *Account, HYAMNMAIL From) +{ + HYAMNMAIL Temp; + while (From != nullptr) { + Temp = From; + From = From->Next; + DeleteAccountMailSvc((WPARAM)Account->Plugin, (LPARAM)Temp); + } +} + +void WINAPI DeleteMessageFromQueueFcn(HYAMNMAIL *From, HYAMNMAIL Which, int mode = 0) +{ + uint32_t Number = Which->Number; + HYAMNMAIL Parser; + + if (*From == Which) { + Parser = Which->Next; + *From = Parser; + } + else { + for (Parser = *From; Which != Parser->Next; Parser = Parser->Next) + if (mode && (Parser->Number > Number)) Parser->Number--; + if (mode && (Parser->Number > Number)) Parser->Number--; + Parser->Next = Parser->Next->Next; + Parser = Which->Next; + } + if (mode) + for (; Parser != nullptr; Parser = Parser->Next) + if (Parser->Number > Number) Parser->Number--; +} + +void DeleteMessagesFromQueue(HYAMNMAIL *From, HYAMNMAIL Which, int mode = 0) +{ + HYAMNMAIL Parser; + + for (Parser = Which; Parser != nullptr; Parser = Parser->Next) + DeleteMessageFromQueueFcn(From, Parser, mode); +} + +HYAMNMAIL WINAPI FindMessageByIDFcn(HYAMNMAIL From, char *ID) +{ + HYAMNMAIL Browser; + + for (Browser = From; Browser != nullptr; Browser = Browser->Next) + if (0 == mir_strcmp(Browser->ID, ID)) + break; + return Browser; +} + +void WINAPI TranslateHeaderFcn(char *stream, int len, struct CMimeItem **head) +{ + try { + char *finder = stream; + char *prev1, *prev2, *prev3; + struct CMimeItem *Item = nullptr; + + while (finder <= (stream + len)) { + while (ENDLINEWS(finder)) finder++; + + //at the start of line + if (DOTLINE(finder + 1)) //at the end of stream + break; + + prev1 = finder; + + while (*finder != ':' && !EOS(finder)) finder++; + if (!EOS(finder)) + prev2 = finder++; + else + break; + + while (WS(finder) && !EOS(finder)) finder++; + if (!EOS(finder)) + prev3 = finder; + else + break; + + do { + if (ENDLINEWS(finder)) finder += 2; //after endline information continues + while (!ENDLINE(finder) && !EOS(finder)) finder++; + } while (ENDLINEWS(finder)); + + if (Item != nullptr) { + if (nullptr == (Item->Next = new struct CMimeItem)) + break; + Item = Item->Next; + } + else { + Item = new CMimeItem; + *head = Item; + } + + Item->Next = nullptr; + Item->name = new char[prev2 - prev1 + 1]; + mir_strncpy(Item->name, prev1, prev2 - prev1 + 1); + Item->value = new char[finder - prev3 + 1]; + mir_strncpy(Item->value, prev3, finder - prev3 + 1); + + if (EOS(finder)) + break; + finder++; + if (ENDLINE(finder)) { + finder++; + if (ENDLINE(finder)) { + // end of headers. message body begins + finder++; + if (ENDLINE(finder))finder++; + prev1 = finder; + while (!DOTLINE(finder + 1))finder++; + if (ENDLINE(finder))finder--; + prev2 = finder; + if (prev2 > prev1) { // yes, we have body + if (nullptr == (Item->Next = new struct CMimeItem)) break; // Cant create new item?! + Item = Item->Next; + Item->Next = nullptr;//just in case; + Item->name = new char[5]; strncpy(Item->name, "Body", 5); + Item->value = new char[prev2 - prev1]; + mir_strncpy(Item->value, prev1, prev2 - prev1 - 1); + } + break; // there is nothing else + } + } + } + } + catch (...) { + MessageBoxA(nullptr, "Translate header error", "", 0); + } +} + +HYAMNMAIL WINAPI CreateNewDeleteQueueFcn(HYAMNMAIL From) +{ + HYAMNMAIL FirstMail, Browser = nullptr; + + for (FirstMail = nullptr; From != nullptr; From = From->Next) { + if ((From->Flags & (YAMN_MSG_USERDELETE | YAMN_MSG_AUTODELETE)) && !(From->Flags & YAMN_MSG_DELETED)) { + if (FirstMail == nullptr) { + FirstMail = Browser = new YAMNMAIL; + if (FirstMail == nullptr) + break; + } + else { + Browser->Next = new YAMNMAIL; + Browser = Browser->Next; + } + Browser->ID = new char[mir_strlen(From->ID) + 1]; + mir_strcpy(Browser->ID, From->ID); + Browser->Number = From->Number; + Browser->Flags = From->Flags; + } + } + return FirstMail; +} + +void WINAPI SetRemoveFlagsInQueueFcn(HYAMNMAIL From, uint32_t FlagsSet, uint32_t FlagsNotSet, uint32_t FlagsToSetRemove, int mode) +{ + HYAMNMAIL msgq; + + for (msgq = (HYAMNMAIL)From; msgq != nullptr; msgq = msgq->Next) { + if ((FlagsSet == (msgq->Flags & FlagsSet)) && (0 == (msgq->Flags & FlagsNotSet))) { + if (mode) + msgq->Flags = msgq->Flags | FlagsToSetRemove; + else + msgq->Flags = msgq->Flags & ~FlagsToSetRemove; + } + } +} diff --git a/protocols/YAMN/src/mails/mime.cpp b/protocols/YAMN/src/mails/mime.cpp index 69099af808..2a2e7b4665 100644 --- a/protocols/YAMN/src/mails/mime.cpp +++ b/protocols/YAMN/src/mails/mime.cpp @@ -1,695 +1,695 @@ -/* - * This code implements retrieving info from MIME header - * - * (c) majvan 2002-2004 - */ - -#include "../stdafx.h" - - //-------------------------------------------------------------------------------------------------- - - //Copies one string to another - // srcstart- source string - // srcend- address to the end of source string - // dest- pointer that stores new allocated string that contains copy of source string - // mode- MIME_PLAIN or MIME_MAIL (MIME_MAIL deletes '"' characters (or '<' and '>') if they are at start and end of source string -void CopyToHeader(char *srcstart, char *srcend, char **dest, int mode); - -//Extracts email address (finds nick name and mail and then stores them to strings) -// finder- source string -// storeto- pointer that receives address of mail string -// storetonick- pointer that receives address of nickname -void ExtractAddressFromLine(char *finder, char **storeto, char **storetonick); - -//Extracts simple text from string -// finder- source string -// storeto- pointer that receives address of string -void ExtractStringFromLine(char *finder, char **storeto); - -//Extracts some item from content-type string -//Example: ContentType string: "TEXT/PLAIN; charset=US-ASCII", item:"charset=", returns: "US-ASCII" -// ContetType- content-type string -// value- string item -// returns extracted string (or NULL when not found) -char *ExtractFromContentType(char *ContentType, char *value); - -//Extracts info from header text into header members -//Note that this function as well as struct CShortHeadwer can be always changed, because there are many items to extract -//(e.g. the X-Priority and Importance and so on) -// items- translated header (see TranslateHeaderFcn) -// head- header to be filled with values extracted from items -void ExtractShortHeader(struct CMimeItem *items, struct CShortHeader *head); - -//Extracts header to mail using ExtractShortHeader fcn. -// items- translated header (see TranslateHeaderFcn) -// CP- codepage used when no default found -// head- header to be filled with values extracted from items, in unicode (wide char) -void ExtractHeader(struct CMimeItem *items, int &CP, struct CHeader *head); - -//Deletes items in CShortHeader structure -// head- structure whose items are deleted -void DeleteShortHeaderContent(struct CShortHeader *head); - -//Deletes list of YAMN_MIMENAMES structures -// Names- pointer to first item of list -void DeleteNames(CMimeNames *Names); - -//Deletes list of YAMN_MIMESHORTNAMES structures -// Names- pointer to first item of list -void DeleteShortNames(CShortNames *Names); - -//Makes a string lowercase -// string- string to be lowercased -void inline ToLower(char *string); - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -void CopyToHeader(char *srcstart, char *srcend, char **dest, int mode) -{ - char *dst; - - if (dest == nullptr) - return; - if (srcstart >= srcend) - return; - - if ((mode == MIME_MAIL) && (((*srcstart == '"') && (*(srcend - 1) == '"')) || ((*srcstart == '<') && (*(srcend - 1) == '>')))) { - srcstart++; - srcend--; - } - - if (srcstart >= srcend) - return; - - if (nullptr != *dest) - delete[] * dest; - if (nullptr == (*dest = new char[srcend - srcstart + 1])) - return; - - dst = *dest; - - for (; srcstart < srcend; dst++, srcstart++) { - if (ENDLINE(srcstart)) { - while (ENDLINE(srcstart) || WS(srcstart)) srcstart++; - *dst = ' '; - srcstart--; //because at the end of "for loop" we increment srcstart - } - else - *dst = *srcstart; - } - *dst = 0; -} - -void ExtractAddressFromLine(char *finder, char **storeto, char **storetonick) -{ - if (finder == nullptr) { - *storeto = *storetonick = nullptr; - return; - } - while (WS(finder)) finder++; - if ((*finder) != '<') { - char *finderend = finder + 1; - do { - if (ENDLINEWS(finderend)) //after endline information continues - finderend += 2; - while (!ENDLINE(finderend) && !EOS(finderend)) finderend++; //seek to the end of line or to the end of string - } while (ENDLINEWS(finderend)); - finderend--; - while (WS(finderend) || ENDLINE(finderend)) finderend--; //find the end of text, no whitespace - if (*finderend != '>') //not '>' at the end of line - CopyToHeader(finder, finderend + 1, storeto, MIME_MAIL); - else //at the end of line, there's '>' - { - char *finder2 = finderend; - while ((*finder2 != '<') && (finder2 > finder)) finder2--; //go to matching '<' or to the start - CopyToHeader(finder2, finderend + 1, storeto, MIME_MAIL); - if (*finder2 == '<') //if we found '<', the rest copy as from nick - { - finder2--; - while (WS(finder2) || ENDLINE(finder2)) finder2--; //parse whitespace - CopyToHeader(finder, finder2 + 1, storetonick, MIME_MAIL); //and store nickname - } - } - } - else { - char *finderend = finder + 1; - do { - if (ENDLINEWS(finderend)) //after endline information continues - finderend += 2; - while (!ENDLINE(finderend) && (*finderend != '>') && !EOS(finderend)) finderend++; //seek to the matching < or to the end of line or to the end of string - } while (ENDLINEWS(finderend)); - CopyToHeader(finder, finderend + 1, storeto, MIME_MAIL); //go to first '>' or to the end and copy - finder = finderend + 1; - while (WS(finder)) finder++; //parse whitespace - if (!ENDLINE(finder) && !EOS(finder)) //if there are chars yet, it's nick - { - finderend = finder + 1; - while (!ENDLINE(finderend) && !EOS(finderend)) finderend++; //seek to the end of line or to the end of string - finderend--; - while (WS(finderend)) finderend--; //find the end of line, no whitespace - CopyToHeader(finder, finderend + 1, storetonick, MIME_MAIL); - } - } -} - -void ExtractStringFromLine(char *finder, char **storeto) -{ - if (finder == nullptr) { - *storeto = nullptr; - return; - } - while (WS(finder)) finder++; - char *finderend = finder; - - do { - if (ENDLINEWS(finderend)) finderend++; //after endline information continues - while (!ENDLINE(finderend) && !EOS(finderend)) finderend++; - } while (ENDLINEWS(finderend)); - finderend--; - while (WS(finderend)) finderend--; //find the end of line, no whitespace - CopyToHeader(finder, finderend + 1, storeto, MIME_PLAIN); -} - -char *ExtractFromContentType(char *ContentType, char *value) -{ - char *lowered = _strdup(ContentType); - ToLower(lowered); - char *finder = strstr(lowered, value); - if (finder == nullptr) { - free(lowered); - return nullptr; - } - finder = finder - lowered + ContentType; - free(lowered); - - char *temp, *copier; - char *CopiedString; - - temp = finder - 1; - while ((temp > ContentType) && WS(temp)) temp--; //now we have to find, if the word "Charset=" is located after ';' like "; Charset=" - if (*temp != ';' && !ENDLINE(temp) && temp != ContentType) - return nullptr; - finder = finder + mir_strlen(value); //jump over value string - - while (WS(finder)) finder++; //jump over whitespaces - temp = finder; - while (*temp != 0 && *temp != ';') temp++; //jump to the end of setting (to the next ;) - temp--; - while (WS(temp)) temp--; //remove whitespaces from the end - if (*finder == '\"') { //remove heading and tailing quotes - finder++; - if (*temp == '\"') temp--; - } - if (nullptr == (CopiedString = new char[++temp - finder + 1])) - return nullptr; - for (copier = CopiedString; finder != temp; *copier++ = *finder++); //copy string - *copier = 0; //and end it with zero character - - return CopiedString; -} - -void ExtractShortHeader(struct CMimeItem *items, struct CShortHeader *head) -{ - for (; items != nullptr; items = items->Next) { - //at the start of line - //MessageBox(NULL,items->value,items->name,0); - if (0 == _strnicmp(items->name, "From", 4)) { - if (items->value == nullptr) - continue; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, ""); - #endif - ExtractAddressFromLine(items->value, &head->From, &head->FromNick); - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - } - else if (0 == _strnicmp(items->name, "Return-Path", 11)) { - if (items->value == nullptr) - continue; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, ""); - #endif - ExtractAddressFromLine(items->value, &head->ReturnPath, &head->ReturnPathNick); - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - } - else if (0 == _strnicmp(items->name, "Subject", 7)) { - if (items->value == nullptr) - continue; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, ""); - #endif - ExtractStringFromLine(items->value, &head->Subject); - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - } - else if (0 == _strnicmp(items->name, "Body", 4)) { - if (items->value == nullptr) - continue; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, ""); - #endif - ExtractStringFromLine(items->value, &head->Body); - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - } - else if (0 == _strnicmp(items->name, "Date", 4)) { - if (items->value == nullptr) - continue; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, ""); - #endif - ExtractStringFromLine(items->value, &head->Date); - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - } - else if (0 == _strnicmp(items->name, "Content-Type", 12)) { - if (items->value == nullptr) - continue; - - char *ContentType = nullptr, *CharSetStr; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, ""); - #endif - ExtractStringFromLine(items->value, &ContentType); - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - ToLower(ContentType); - if (nullptr != (CharSetStr = ExtractFromContentType(ContentType, "charset="))) { - head->CP = GetCharsetFromString(CharSetStr, mir_strlen(CharSetStr)); - delete[] CharSetStr; - } - delete[] ContentType; - } - else if (0 == _strnicmp(items->name, "Importance", 10)) { - if (items->value == nullptr) - continue; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, ""); - #endif - if (head->Priority != -1) { - if (0 == strncmp(items->value, "low", 3)) - head->Priority = 5; - else if (0 == strncmp(items->value, "normal", 6)) - head->Priority = 3; - else if (0 == strncmp(items->value, "high", 4)) - head->Priority = 1; - } - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - } - else if (0 == _strnicmp(items->name, "X-Priority", 10)) { - if (items->value == nullptr) - continue; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, ""); - #endif - if ((*items->value >= '1') && (*items->value <= '5')) - head->Priority = *items->value - '0'; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - } - - } -} - -void ExtractHeader(struct CMimeItem *items, int &CP, struct CHeader *head) -{ - struct CShortHeader ShortHeader; - - memset(&ShortHeader, 0, sizeof(struct CShortHeader)); - ShortHeader.Priority = ShortHeader.CP = -1; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - ExtractShortHeader(items, &ShortHeader); - - head->Priority = ShortHeader.Priority == -1 ? 3 : ShortHeader.Priority; - CP = ShortHeader.CP == -1 ? CP : ShortHeader.CP; - #ifdef DEBUG_DECODE - if (NULL != ShortHeader.From) - DebugLog(DecodeFile, "%s%s%s%s%s%s\n"); - DebugLog(DecodeFile, "\n"); - #endif - - ConvertCodedStringToUnicode(ShortHeader.From, &head->From, CP, MIME_PLAIN); - - #ifdef DEBUG_DECODE - if (NULL != head->From) - DebugLogW(DecodeFile, L"%s\n", head->From); - #endif - ConvertCodedStringToUnicode(ShortHeader.FromNick, &head->FromNick, CP, MIME_MAIL); - #ifdef DEBUG_DECODE - if (NULL != head->FromNick) - DebugLogW(DecodeFile, L"%s\n", head->FromNick); - #endif - ConvertCodedStringToUnicode(ShortHeader.ReturnPath, &head->ReturnPath, CP, MIME_PLAIN); - #ifdef DEBUG_DECODE - if (NULL != head->ReturnPath) - DebugLogW(DecodeFile, L"%s\n", head->ReturnPath); - #endif - ConvertCodedStringToUnicode(ShortHeader.ReturnPathNick, &head->ReturnPathNick, CP, MIME_MAIL); - #ifdef DEBUG_DECODE - if (NULL != head->ReturnPathNick) - DebugLogW(DecodeFile, L"%s\n", head->ReturnPathNick); - #endif - ConvertCodedStringToUnicode(ShortHeader.Subject, &head->Subject, CP, MIME_PLAIN); - #ifdef DEBUG_DECODE - if (NULL != head->Subject) - DebugLogW(DecodeFile, L"%s\n", head->Subject); - #endif - ConvertCodedStringToUnicode(ShortHeader.Date, &head->Date, CP, MIME_PLAIN); - #ifdef DEBUG_DECODE - if (NULL != head->Date) - DebugLogW(DecodeFile, L"%s\n", head->Date); - #endif - - ConvertCodedStringToUnicode(ShortHeader.Body, &head->Body, CP, MIME_PLAIN); - #ifdef DEBUG_DECODE - if (NULL != head->Body) - DebugLogW(DecodeFile, L"%s\n", head->Body); - #endif - - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - - DeleteShortHeaderContent(&ShortHeader); - - // head->From=L"Frommmm"; - // head->Subject=L"Subject"; - return; -} - -void DeleteShortHeaderContent(struct CShortHeader *head) -{ - if (head->From != nullptr) delete[] head->From; - if (head->FromNick != nullptr) delete[] head->FromNick; - if (head->ReturnPath != nullptr) delete[] head->ReturnPath; - if (head->ReturnPathNick != nullptr) delete[] head->ReturnPathNick; - if (head->Subject != nullptr) delete[] head->Subject; - if (head->Date != nullptr) delete[] head->Date; - if (head->To != nullptr) DeleteShortNames(head->To); - if (head->Cc != nullptr) DeleteShortNames(head->Cc); - if (head->Bcc != nullptr) DeleteShortNames(head->Bcc); - if (head->Body != nullptr) delete[] head->Body; -} - -void DeleteHeaderContent(struct CHeader *head) -{ - if (head->From != nullptr) delete[] head->From; - if (head->FromNick != nullptr) delete[] head->FromNick; - if (head->ReturnPath != nullptr) delete[] head->ReturnPath; - if (head->ReturnPathNick != nullptr) delete[] head->ReturnPathNick; - if (head->Subject != nullptr) delete[] head->Subject; - if (head->Date != nullptr) delete[] head->Date; - if (head->Body != nullptr) delete[] head->Body; - if (head->To != nullptr) DeleteNames(head->To); - if (head->Cc != nullptr) DeleteNames(head->Cc); - if (head->Bcc != nullptr) DeleteNames(head->Bcc); -} - -void DeleteNames(CMimeNames *Names) -{ - CMimeNames *Parser = Names; - for (; Parser != nullptr; Parser = Parser->Next) { - if (Parser->Value != nullptr) - delete[] Parser->Value; - if (Parser->ValueNick != nullptr) - delete[] Parser->ValueNick; - - CMimeNames *Old = Parser; - Parser = Parser->Next; - delete Old; - } -} - -void DeleteShortNames(CShortNames *Names) -{ - CShortNames *Parser = Names; - for (; Parser != nullptr; Parser = Parser->Next) { - if (Parser->Value != nullptr) - delete[] Parser->Value; - if (Parser->ValueNick != nullptr) - delete[] Parser->ValueNick; - - CShortNames *Old = Parser; - Parser = Parser->Next; - delete Old; - } -} - - -void inline ToLower(char *string) -{ - for (; *string != 0; string++) - if (*string >= 'A' && *string <= 'Z') *string = *string - 'A' + 'a'; -} - -#define TE_UNKNOWN -#define TE_QUOTEDPRINTABLE 1 -#define TE_BASE64 2 -struct APartDataType -{ - char *Src;//Input - char *ContType; - int CodePage; - char *TransEnc; - uint8_t TransEncType; //TE_something - char *body; - int bodyLen; - wchar_t *wBody; -}; - - -void ParseAPart(APartDataType *data) -{ - size_t len = mir_strlen(data->Src); - try { - char *finder = data->Src; - char *prev1, *prev2, *prev3; - - while (finder <= (data->Src + len)) { - while (ENDLINEWS(finder)) finder++; - - //at the start of line - if (finder > data->Src) { - if (*(finder - 2) == '\r' || *(finder - 2) == '\n') - *(finder - 2) = 0; - if (*(finder - 1) == '\r' || *(finder - 1) == '\n') - *(finder - 1) = 0; - } - prev1 = finder; - - while (*finder != ':' && !EOS(finder) && !ENDLINE(finder)) finder++; - if (ENDLINE(finder) || EOS(finder)) { - // no ":" in the line? here the body begins; - data->body = prev1; - break; - } - prev2 = finder++; - - while (WS(finder) && !EOS(finder)) finder++; - if (!EOS(finder)) - prev3 = finder; - else - break; - - do { - if (ENDLINEWS(finder)) finder += 2; //after endline information continues - while (!ENDLINE(finder) && !EOS(finder)) finder++; - } while (ENDLINEWS(finder)); - - if (!_strnicmp(prev1, "Content-type", prev2 - prev1)) { - data->ContType = prev3; - } - else if (!_strnicmp(prev1, "Content-Transfer-Encoding", prev2 - prev1)) { - data->TransEnc = prev3; - } - - if (EOS(finder)) - break; - finder++; - if (ENDLINE(finder)) { - finder++; - if (ENDLINE(finder)) { - // end of headers. message body begins - if (finder > data->Src) { - if (*(finder - 2) == '\r' || *(finder - 2) == '\n') - *(finder - 2) = 0; - if (*(finder - 1) == '\r' || *(finder - 1) == '\n') - *(finder - 1) = 0; - } - finder++; - if (ENDLINE(finder))finder++; - prev1 = finder; - while (!EOS(finder + 1))finder++; - if (ENDLINE(finder))finder--; - prev2 = finder; - if (prev2 > prev1) { // yes, we have body - data->body = prev1; - } - break; // there is nothing else - } - } - } - } - catch (...) { - MessageBox(nullptr, TranslateT("Translate header error"), L"", 0); - } - if (data->body) data->bodyLen = (int)mir_strlen(data->body); -} - -//from decode.cpp -int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ); -int DecodeBase64(char *Src, char *Dst, int DstLen); -int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out); - -wchar_t *ParseMultipartBody(char *src, char *bond) -{ - char *srcback = _strdup(src); - size_t sizebond = mir_strlen(bond); - int numparts = 1; - int i; - char *courbond = srcback; - wchar_t *dest; - for (; (courbond = strstr(courbond, bond)); numparts++, courbond += sizebond); - APartDataType *partData = new APartDataType[numparts]; - memset(partData, 0, sizeof(APartDataType) * numparts); - partData[0].Src = courbond = srcback; - for (i = 1; (courbond = strstr(courbond, bond)); i++, courbond += sizebond) { - *(courbond - 2) = 0; - partData[i].Src = courbond + sizebond; - while (ENDLINE(partData[i].Src)) partData[i].Src++; - } - size_t resultSize = 0; - for (i = 0; i < numparts; i++) { - ParseAPart(&partData[i]); - if (partData[i].body) { - if (partData[i].TransEnc) { - if (!_stricmp(partData[i].TransEnc, "base64")) partData[i].TransEncType = TE_BASE64; - else if (!_stricmp(partData[i].TransEnc, "quoted-printable"))partData[i].TransEncType = TE_QUOTEDPRINTABLE; - } - if (partData[i].ContType) { - char *CharSetStr; - if (nullptr != (CharSetStr = ExtractFromContentType(partData[i].ContType, "charset="))) { - partData[i].CodePage = GetCharsetFromString(CharSetStr, mir_strlen(CharSetStr)); - delete[] CharSetStr; - } - } - if (partData[i].ContType && !_strnicmp(partData[i].ContType, "text", 4)) { - char *localBody = nullptr; - switch (partData[i].TransEncType) { - case TE_BASE64: - { - int size = partData[i].bodyLen * 3 / 4 + 5; - localBody = new char[size + 1]; - DecodeBase64(partData[i].body, localBody, size); - }break; - case TE_QUOTEDPRINTABLE: - { - int size = partData[i].bodyLen + 2; - localBody = new char[size + 1]; - DecodeQuotedPrintable(partData[i].body, localBody, size, FALSE); - }break; - } - ConvertStringToUnicode(localBody ? localBody : partData[i].body, partData[i].CodePage, &partData[i].wBody); - if (localBody) delete[] localBody; - } - else if (partData[i].ContType && !_strnicmp(partData[i].ContType, "multipart/", 10)) { - //Multipart in mulitipart recursive? should be SPAM. Ah well - char *bondary = nullptr; - if (nullptr != (bondary = ExtractFromContentType(partData[i].ContType, "boundary="))) { - partData[i].wBody = ParseMultipartBody(partData[i].body, bondary); - delete[] bondary; - } - else goto FailBackRaw; //multipart with no boundary? badly formatted messages. - } - else { -FailBackRaw: - ConvertStringToUnicode(partData[i].body, partData[i].CodePage, &partData[i].wBody); - } - resultSize += mir_wstrlen(partData[i].wBody); - }// if (partData[i].body) - resultSize += 100 + 4 + 3; //cr+nl+100+ 3*bullet - } - dest = new wchar_t[resultSize + 1]; - size_t destpos = 0; - for (i = 0; i < numparts; i++) { - if (i) { // part before first boudary should not have headers - char infoline[1024]; size_t linesize = 0; - mir_snprintf(infoline, "%s %d", Translate("Part"), i); - linesize = mir_strlen(infoline); - if (partData[i].TransEnc) { - mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; %s", partData[i].TransEnc); - linesize = mir_strlen(infoline); - } - if (partData[i].ContType) { - char *CharSetStr = strchr(partData[i].ContType, ';'); - if (CharSetStr) { - CharSetStr[0] = 0; - mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; %s", partData[i].ContType); - linesize = mir_strlen(infoline); - partData[i].ContType = CharSetStr + 1; - if (nullptr != (CharSetStr = ExtractFromContentType(partData[i].ContType, "charset="))) { - mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; %s", CharSetStr); - linesize = mir_strlen(infoline); - delete[] CharSetStr; - } - if (nullptr != (CharSetStr = ExtractFromContentType(partData[i].ContType, "name="))) { - mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; \"%s\"", CharSetStr); - linesize = mir_strlen(infoline); - delete[] CharSetStr; - } - } - else { - mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; %s", partData[i].ContType); - linesize = mir_strlen(infoline); - } - } - mir_snprintf(infoline + linesize, _countof(infoline) - linesize, ".\r\n"); - { - wchar_t *temp = nullptr; - dest[destpos] = dest[destpos + 1] = dest[destpos + 2] = 0x2022; // bullet; - destpos += 3; - ConvertStringToUnicode(infoline, CP_ACP, &temp); - size_t wsize = mir_wstrlen(temp); - mir_wstrcpy(&dest[destpos], temp); - destpos += wsize; - delete[] temp; - } - } // if (i) - - if (partData[i].wBody) { - size_t wsize = mir_wstrlen(partData[i].wBody); - mir_wstrcpy(&dest[destpos], partData[i].wBody); - destpos += wsize; - delete[] partData[i].wBody; - } - } - - free(srcback); - delete[] partData; - dest[resultSize] = 0;//just in case - return dest; -} +/* + * This code implements retrieving info from MIME header + * + * (c) majvan 2002-2004 + */ + +#include "../stdafx.h" + + //-------------------------------------------------------------------------------------------------- + + //Copies one string to another + // srcstart- source string + // srcend- address to the end of source string + // dest- pointer that stores new allocated string that contains copy of source string + // mode- MIME_PLAIN or MIME_MAIL (MIME_MAIL deletes '"' characters (or '<' and '>') if they are at start and end of source string +void CopyToHeader(char *srcstart, char *srcend, char **dest, int mode); + +//Extracts email address (finds nick name and mail and then stores them to strings) +// finder- source string +// storeto- pointer that receives address of mail string +// storetonick- pointer that receives address of nickname +void ExtractAddressFromLine(char *finder, char **storeto, char **storetonick); + +//Extracts simple text from string +// finder- source string +// storeto- pointer that receives address of string +void ExtractStringFromLine(char *finder, char **storeto); + +//Extracts some item from content-type string +//Example: ContentType string: "TEXT/PLAIN; charset=US-ASCII", item:"charset=", returns: "US-ASCII" +// ContetType- content-type string +// value- string item +// returns extracted string (or NULL when not found) +char *ExtractFromContentType(char *ContentType, char *value); + +//Extracts info from header text into header members +//Note that this function as well as struct CShortHeadwer can be always changed, because there are many items to extract +//(e.g. the X-Priority and Importance and so on) +// items- translated header (see TranslateHeaderFcn) +// head- header to be filled with values extracted from items +void ExtractShortHeader(struct CMimeItem *items, struct CShortHeader *head); + +//Extracts header to mail using ExtractShortHeader fcn. +// items- translated header (see TranslateHeaderFcn) +// CP- codepage used when no default found +// head- header to be filled with values extracted from items, in unicode (wide char) +void ExtractHeader(struct CMimeItem *items, int &CP, struct CHeader *head); + +//Deletes items in CShortHeader structure +// head- structure whose items are deleted +void DeleteShortHeaderContent(struct CShortHeader *head); + +//Deletes list of YAMN_MIMENAMES structures +// Names- pointer to first item of list +void DeleteNames(CMimeNames *Names); + +//Deletes list of YAMN_MIMESHORTNAMES structures +// Names- pointer to first item of list +void DeleteShortNames(CShortNames *Names); + +//Makes a string lowercase +// string- string to be lowercased +void inline ToLower(char *string); + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +void CopyToHeader(char *srcstart, char *srcend, char **dest, int mode) +{ + char *dst; + + if (dest == nullptr) + return; + if (srcstart >= srcend) + return; + + if ((mode == MIME_MAIL) && (((*srcstart == '"') && (*(srcend - 1) == '"')) || ((*srcstart == '<') && (*(srcend - 1) == '>')))) { + srcstart++; + srcend--; + } + + if (srcstart >= srcend) + return; + + if (nullptr != *dest) + delete[] * dest; + if (nullptr == (*dest = new char[srcend - srcstart + 1])) + return; + + dst = *dest; + + for (; srcstart < srcend; dst++, srcstart++) { + if (ENDLINE(srcstart)) { + while (ENDLINE(srcstart) || WS(srcstart)) srcstart++; + *dst = ' '; + srcstart--; //because at the end of "for loop" we increment srcstart + } + else + *dst = *srcstart; + } + *dst = 0; +} + +void ExtractAddressFromLine(char *finder, char **storeto, char **storetonick) +{ + if (finder == nullptr) { + *storeto = *storetonick = nullptr; + return; + } + while (WS(finder)) finder++; + if ((*finder) != '<') { + char *finderend = finder + 1; + do { + if (ENDLINEWS(finderend)) //after endline information continues + finderend += 2; + while (!ENDLINE(finderend) && !EOS(finderend)) finderend++; //seek to the end of line or to the end of string + } while (ENDLINEWS(finderend)); + finderend--; + while (WS(finderend) || ENDLINE(finderend)) finderend--; //find the end of text, no whitespace + if (*finderend != '>') //not '>' at the end of line + CopyToHeader(finder, finderend + 1, storeto, MIME_MAIL); + else //at the end of line, there's '>' + { + char *finder2 = finderend; + while ((*finder2 != '<') && (finder2 > finder)) finder2--; //go to matching '<' or to the start + CopyToHeader(finder2, finderend + 1, storeto, MIME_MAIL); + if (*finder2 == '<') //if we found '<', the rest copy as from nick + { + finder2--; + while (WS(finder2) || ENDLINE(finder2)) finder2--; //parse whitespace + CopyToHeader(finder, finder2 + 1, storetonick, MIME_MAIL); //and store nickname + } + } + } + else { + char *finderend = finder + 1; + do { + if (ENDLINEWS(finderend)) //after endline information continues + finderend += 2; + while (!ENDLINE(finderend) && (*finderend != '>') && !EOS(finderend)) finderend++; //seek to the matching < or to the end of line or to the end of string + } while (ENDLINEWS(finderend)); + CopyToHeader(finder, finderend + 1, storeto, MIME_MAIL); //go to first '>' or to the end and copy + finder = finderend + 1; + while (WS(finder)) finder++; //parse whitespace + if (!ENDLINE(finder) && !EOS(finder)) //if there are chars yet, it's nick + { + finderend = finder + 1; + while (!ENDLINE(finderend) && !EOS(finderend)) finderend++; //seek to the end of line or to the end of string + finderend--; + while (WS(finderend)) finderend--; //find the end of line, no whitespace + CopyToHeader(finder, finderend + 1, storetonick, MIME_MAIL); + } + } +} + +void ExtractStringFromLine(char *finder, char **storeto) +{ + if (finder == nullptr) { + *storeto = nullptr; + return; + } + while (WS(finder)) finder++; + char *finderend = finder; + + do { + if (ENDLINEWS(finderend)) finderend++; //after endline information continues + while (!ENDLINE(finderend) && !EOS(finderend)) finderend++; + } while (ENDLINEWS(finderend)); + finderend--; + while (WS(finderend)) finderend--; //find the end of line, no whitespace + CopyToHeader(finder, finderend + 1, storeto, MIME_PLAIN); +} + +char *ExtractFromContentType(char *ContentType, char *value) +{ + char *lowered = _strdup(ContentType); + ToLower(lowered); + char *finder = strstr(lowered, value); + if (finder == nullptr) { + free(lowered); + return nullptr; + } + finder = finder - lowered + ContentType; + free(lowered); + + char *temp, *copier; + char *CopiedString; + + temp = finder - 1; + while ((temp > ContentType) && WS(temp)) temp--; //now we have to find, if the word "Charset=" is located after ';' like "; Charset=" + if (*temp != ';' && !ENDLINE(temp) && temp != ContentType) + return nullptr; + finder = finder + mir_strlen(value); //jump over value string + + while (WS(finder)) finder++; //jump over whitespaces + temp = finder; + while (*temp != 0 && *temp != ';') temp++; //jump to the end of setting (to the next ;) + temp--; + while (WS(temp)) temp--; //remove whitespaces from the end + if (*finder == '\"') { //remove heading and tailing quotes + finder++; + if (*temp == '\"') temp--; + } + if (nullptr == (CopiedString = new char[++temp - finder + 1])) + return nullptr; + for (copier = CopiedString; finder != temp; *copier++ = *finder++); //copy string + *copier = 0; //and end it with zero character + + return CopiedString; +} + +void ExtractShortHeader(struct CMimeItem *items, struct CShortHeader *head) +{ + for (; items != nullptr; items = items->Next) { + //at the start of line + //MessageBox(NULL,items->value,items->name,0); + if (0 == _strnicmp(items->name, "From", 4)) { + if (items->value == nullptr) + continue; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, ""); + #endif + ExtractAddressFromLine(items->value, &head->From, &head->FromNick); + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + } + else if (0 == _strnicmp(items->name, "Return-Path", 11)) { + if (items->value == nullptr) + continue; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, ""); + #endif + ExtractAddressFromLine(items->value, &head->ReturnPath, &head->ReturnPathNick); + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + } + else if (0 == _strnicmp(items->name, "Subject", 7)) { + if (items->value == nullptr) + continue; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, ""); + #endif + ExtractStringFromLine(items->value, &head->Subject); + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + } + else if (0 == _strnicmp(items->name, "Body", 4)) { + if (items->value == nullptr) + continue; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, ""); + #endif + ExtractStringFromLine(items->value, &head->Body); + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + } + else if (0 == _strnicmp(items->name, "Date", 4)) { + if (items->value == nullptr) + continue; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, ""); + #endif + ExtractStringFromLine(items->value, &head->Date); + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + } + else if (0 == _strnicmp(items->name, "Content-Type", 12)) { + if (items->value == nullptr) + continue; + + char *ContentType = nullptr, *CharSetStr; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, ""); + #endif + ExtractStringFromLine(items->value, &ContentType); + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + ToLower(ContentType); + if (nullptr != (CharSetStr = ExtractFromContentType(ContentType, "charset="))) { + head->CP = GetCharsetFromString(CharSetStr, mir_strlen(CharSetStr)); + delete[] CharSetStr; + } + delete[] ContentType; + } + else if (0 == _strnicmp(items->name, "Importance", 10)) { + if (items->value == nullptr) + continue; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, ""); + #endif + if (head->Priority != -1) { + if (0 == strncmp(items->value, "low", 3)) + head->Priority = 5; + else if (0 == strncmp(items->value, "normal", 6)) + head->Priority = 3; + else if (0 == strncmp(items->value, "high", 4)) + head->Priority = 1; + } + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + } + else if (0 == _strnicmp(items->name, "X-Priority", 10)) { + if (items->value == nullptr) + continue; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, ""); + #endif + if ((*items->value >= '1') && (*items->value <= '5')) + head->Priority = *items->value - '0'; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + } + + } +} + +void ExtractHeader(struct CMimeItem *items, int &CP, struct CHeader *head) +{ + struct CShortHeader ShortHeader; + + memset(&ShortHeader, 0, sizeof(struct CShortHeader)); + ShortHeader.Priority = ShortHeader.CP = -1; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + ExtractShortHeader(items, &ShortHeader); + + head->Priority = ShortHeader.Priority == -1 ? 3 : ShortHeader.Priority; + CP = ShortHeader.CP == -1 ? CP : ShortHeader.CP; + #ifdef DEBUG_DECODE + if (NULL != ShortHeader.From) + DebugLog(DecodeFile, "%s%s%s%s%s%s\n"); + DebugLog(DecodeFile, "\n"); + #endif + + ConvertCodedStringToUnicode(ShortHeader.From, &head->From, CP, MIME_PLAIN); + + #ifdef DEBUG_DECODE + if (NULL != head->From) + DebugLogW(DecodeFile, L"%s\n", head->From); + #endif + ConvertCodedStringToUnicode(ShortHeader.FromNick, &head->FromNick, CP, MIME_MAIL); + #ifdef DEBUG_DECODE + if (NULL != head->FromNick) + DebugLogW(DecodeFile, L"%s\n", head->FromNick); + #endif + ConvertCodedStringToUnicode(ShortHeader.ReturnPath, &head->ReturnPath, CP, MIME_PLAIN); + #ifdef DEBUG_DECODE + if (NULL != head->ReturnPath) + DebugLogW(DecodeFile, L"%s\n", head->ReturnPath); + #endif + ConvertCodedStringToUnicode(ShortHeader.ReturnPathNick, &head->ReturnPathNick, CP, MIME_MAIL); + #ifdef DEBUG_DECODE + if (NULL != head->ReturnPathNick) + DebugLogW(DecodeFile, L"%s\n", head->ReturnPathNick); + #endif + ConvertCodedStringToUnicode(ShortHeader.Subject, &head->Subject, CP, MIME_PLAIN); + #ifdef DEBUG_DECODE + if (NULL != head->Subject) + DebugLogW(DecodeFile, L"%s\n", head->Subject); + #endif + ConvertCodedStringToUnicode(ShortHeader.Date, &head->Date, CP, MIME_PLAIN); + #ifdef DEBUG_DECODE + if (NULL != head->Date) + DebugLogW(DecodeFile, L"%s\n", head->Date); + #endif + + ConvertCodedStringToUnicode(ShortHeader.Body, &head->Body, CP, MIME_PLAIN); + #ifdef DEBUG_DECODE + if (NULL != head->Body) + DebugLogW(DecodeFile, L"%s\n", head->Body); + #endif + + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + + DeleteShortHeaderContent(&ShortHeader); + + // head->From=L"Frommmm"; + // head->Subject=L"Subject"; + return; +} + +void DeleteShortHeaderContent(struct CShortHeader *head) +{ + if (head->From != nullptr) delete[] head->From; + if (head->FromNick != nullptr) delete[] head->FromNick; + if (head->ReturnPath != nullptr) delete[] head->ReturnPath; + if (head->ReturnPathNick != nullptr) delete[] head->ReturnPathNick; + if (head->Subject != nullptr) delete[] head->Subject; + if (head->Date != nullptr) delete[] head->Date; + if (head->To != nullptr) DeleteShortNames(head->To); + if (head->Cc != nullptr) DeleteShortNames(head->Cc); + if (head->Bcc != nullptr) DeleteShortNames(head->Bcc); + if (head->Body != nullptr) delete[] head->Body; +} + +void DeleteHeaderContent(struct CHeader *head) +{ + if (head->From != nullptr) delete[] head->From; + if (head->FromNick != nullptr) delete[] head->FromNick; + if (head->ReturnPath != nullptr) delete[] head->ReturnPath; + if (head->ReturnPathNick != nullptr) delete[] head->ReturnPathNick; + if (head->Subject != nullptr) delete[] head->Subject; + if (head->Date != nullptr) delete[] head->Date; + if (head->Body != nullptr) delete[] head->Body; + if (head->To != nullptr) DeleteNames(head->To); + if (head->Cc != nullptr) DeleteNames(head->Cc); + if (head->Bcc != nullptr) DeleteNames(head->Bcc); +} + +void DeleteNames(CMimeNames *Names) +{ + CMimeNames *Parser = Names; + for (; Parser != nullptr; Parser = Parser->Next) { + if (Parser->Value != nullptr) + delete[] Parser->Value; + if (Parser->ValueNick != nullptr) + delete[] Parser->ValueNick; + + CMimeNames *Old = Parser; + Parser = Parser->Next; + delete Old; + } +} + +void DeleteShortNames(CShortNames *Names) +{ + CShortNames *Parser = Names; + for (; Parser != nullptr; Parser = Parser->Next) { + if (Parser->Value != nullptr) + delete[] Parser->Value; + if (Parser->ValueNick != nullptr) + delete[] Parser->ValueNick; + + CShortNames *Old = Parser; + Parser = Parser->Next; + delete Old; + } +} + + +void inline ToLower(char *string) +{ + for (; *string != 0; string++) + if (*string >= 'A' && *string <= 'Z') *string = *string - 'A' + 'a'; +} + +#define TE_UNKNOWN +#define TE_QUOTEDPRINTABLE 1 +#define TE_BASE64 2 +struct APartDataType +{ + char *Src;//Input + char *ContType; + int CodePage; + char *TransEnc; + uint8_t TransEncType; //TE_something + char *body; + int bodyLen; + wchar_t *wBody; +}; + + +void ParseAPart(APartDataType *data) +{ + size_t len = mir_strlen(data->Src); + try { + char *finder = data->Src; + char *prev1, *prev2, *prev3; + + while (finder <= (data->Src + len)) { + while (ENDLINEWS(finder)) finder++; + + //at the start of line + if (finder > data->Src) { + if (*(finder - 2) == '\r' || *(finder - 2) == '\n') + *(finder - 2) = 0; + if (*(finder - 1) == '\r' || *(finder - 1) == '\n') + *(finder - 1) = 0; + } + prev1 = finder; + + while (*finder != ':' && !EOS(finder) && !ENDLINE(finder)) finder++; + if (ENDLINE(finder) || EOS(finder)) { + // no ":" in the line? here the body begins; + data->body = prev1; + break; + } + prev2 = finder++; + + while (WS(finder) && !EOS(finder)) finder++; + if (!EOS(finder)) + prev3 = finder; + else + break; + + do { + if (ENDLINEWS(finder)) finder += 2; //after endline information continues + while (!ENDLINE(finder) && !EOS(finder)) finder++; + } while (ENDLINEWS(finder)); + + if (!_strnicmp(prev1, "Content-type", prev2 - prev1)) { + data->ContType = prev3; + } + else if (!_strnicmp(prev1, "Content-Transfer-Encoding", prev2 - prev1)) { + data->TransEnc = prev3; + } + + if (EOS(finder)) + break; + finder++; + if (ENDLINE(finder)) { + finder++; + if (ENDLINE(finder)) { + // end of headers. message body begins + if (finder > data->Src) { + if (*(finder - 2) == '\r' || *(finder - 2) == '\n') + *(finder - 2) = 0; + if (*(finder - 1) == '\r' || *(finder - 1) == '\n') + *(finder - 1) = 0; + } + finder++; + if (ENDLINE(finder))finder++; + prev1 = finder; + while (!EOS(finder + 1))finder++; + if (ENDLINE(finder))finder--; + prev2 = finder; + if (prev2 > prev1) { // yes, we have body + data->body = prev1; + } + break; // there is nothing else + } + } + } + } + catch (...) { + MessageBox(nullptr, TranslateT("Translate header error"), L"", 0); + } + if (data->body) data->bodyLen = (int)mir_strlen(data->body); +} + +//from decode.cpp +int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ); +int DecodeBase64(char *Src, char *Dst, int DstLen); +int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out); + +wchar_t *ParseMultipartBody(char *src, char *bond) +{ + char *srcback = _strdup(src); + size_t sizebond = mir_strlen(bond); + int numparts = 1; + int i; + char *courbond = srcback; + wchar_t *dest; + for (; (courbond = strstr(courbond, bond)); numparts++, courbond += sizebond); + APartDataType *partData = new APartDataType[numparts]; + memset(partData, 0, sizeof(APartDataType) * numparts); + partData[0].Src = courbond = srcback; + for (i = 1; (courbond = strstr(courbond, bond)); i++, courbond += sizebond) { + *(courbond - 2) = 0; + partData[i].Src = courbond + sizebond; + while (ENDLINE(partData[i].Src)) partData[i].Src++; + } + size_t resultSize = 0; + for (i = 0; i < numparts; i++) { + ParseAPart(&partData[i]); + if (partData[i].body) { + if (partData[i].TransEnc) { + if (!_stricmp(partData[i].TransEnc, "base64")) partData[i].TransEncType = TE_BASE64; + else if (!_stricmp(partData[i].TransEnc, "quoted-printable"))partData[i].TransEncType = TE_QUOTEDPRINTABLE; + } + if (partData[i].ContType) { + char *CharSetStr; + if (nullptr != (CharSetStr = ExtractFromContentType(partData[i].ContType, "charset="))) { + partData[i].CodePage = GetCharsetFromString(CharSetStr, mir_strlen(CharSetStr)); + delete[] CharSetStr; + } + } + if (partData[i].ContType && !_strnicmp(partData[i].ContType, "text", 4)) { + char *localBody = nullptr; + switch (partData[i].TransEncType) { + case TE_BASE64: + { + int size = partData[i].bodyLen * 3 / 4 + 5; + localBody = new char[size + 1]; + DecodeBase64(partData[i].body, localBody, size); + }break; + case TE_QUOTEDPRINTABLE: + { + int size = partData[i].bodyLen + 2; + localBody = new char[size + 1]; + DecodeQuotedPrintable(partData[i].body, localBody, size, FALSE); + }break; + } + ConvertStringToUnicode(localBody ? localBody : partData[i].body, partData[i].CodePage, &partData[i].wBody); + if (localBody) delete[] localBody; + } + else if (partData[i].ContType && !_strnicmp(partData[i].ContType, "multipart/", 10)) { + //Multipart in mulitipart recursive? should be SPAM. Ah well + char *bondary = nullptr; + if (nullptr != (bondary = ExtractFromContentType(partData[i].ContType, "boundary="))) { + partData[i].wBody = ParseMultipartBody(partData[i].body, bondary); + delete[] bondary; + } + else goto FailBackRaw; //multipart with no boundary? badly formatted messages. + } + else { +FailBackRaw: + ConvertStringToUnicode(partData[i].body, partData[i].CodePage, &partData[i].wBody); + } + resultSize += mir_wstrlen(partData[i].wBody); + }// if (partData[i].body) + resultSize += 100 + 4 + 3; //cr+nl+100+ 3*bullet + } + dest = new wchar_t[resultSize + 1]; + size_t destpos = 0; + for (i = 0; i < numparts; i++) { + if (i) { // part before first boudary should not have headers + char infoline[1024]; size_t linesize = 0; + mir_snprintf(infoline, "%s %d", Translate("Part"), i); + linesize = mir_strlen(infoline); + if (partData[i].TransEnc) { + mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; %s", partData[i].TransEnc); + linesize = mir_strlen(infoline); + } + if (partData[i].ContType) { + char *CharSetStr = strchr(partData[i].ContType, ';'); + if (CharSetStr) { + CharSetStr[0] = 0; + mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; %s", partData[i].ContType); + linesize = mir_strlen(infoline); + partData[i].ContType = CharSetStr + 1; + if (nullptr != (CharSetStr = ExtractFromContentType(partData[i].ContType, "charset="))) { + mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; %s", CharSetStr); + linesize = mir_strlen(infoline); + delete[] CharSetStr; + } + if (nullptr != (CharSetStr = ExtractFromContentType(partData[i].ContType, "name="))) { + mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; \"%s\"", CharSetStr); + linesize = mir_strlen(infoline); + delete[] CharSetStr; + } + } + else { + mir_snprintf(infoline + linesize, _countof(infoline) - linesize, "; %s", partData[i].ContType); + linesize = mir_strlen(infoline); + } + } + mir_snprintf(infoline + linesize, _countof(infoline) - linesize, ".\r\n"); + { + wchar_t *temp = nullptr; + dest[destpos] = dest[destpos + 1] = dest[destpos + 2] = 0x2022; // bullet; + destpos += 3; + ConvertStringToUnicode(infoline, CP_ACP, &temp); + size_t wsize = mir_wstrlen(temp); + mir_wstrcpy(&dest[destpos], temp); + destpos += wsize; + delete[] temp; + } + } // if (i) + + if (partData[i].wBody) { + size_t wsize = mir_wstrlen(partData[i].wBody); + mir_wstrcpy(&dest[destpos], partData[i].wBody); + destpos += wsize; + delete[] partData[i].wBody; + } + } + + free(srcback); + delete[] partData; + dest[resultSize] = 0;//just in case + return dest; +} diff --git a/protocols/YAMN/src/main.cpp b/protocols/YAMN/src/main.cpp index 72b831f765..c4979af1fb 100644 --- a/protocols/YAMN/src/main.cpp +++ b/protocols/YAMN/src/main.cpp @@ -1,324 +1,324 @@ -/* - * YAMN plugin main file - * Miranda homepage: http://miranda-icq.sourceforge.net/ - * YAMN homepage: http://www.majvan.host.sk/Projekty/YAMN - * - * initializes all variables for further work - * - * (c) majvan 2002-2004 - */ - -#include "stdafx.h" - - //-------------------------------------------------------------------------------------------------- - -wchar_t ProfileName[MAX_PATH]; -wchar_t UserDirectory[MAX_PATH]; - -wchar_t szMirandaDir[MAX_PATH]; -wchar_t szProfileDir[MAX_PATH]; - -BOOL UninstallPlugins; - -HANDLE hAccountFolder; - -HINSTANCE *hDllPlugins; -static int iDllPlugins = 0; - -YAMN_VARIABLES YAMNVar; - -CMPlugin g_plugin; - -HANDLE hNewMailHook; -HANDLE NoWriterEV; -HANDLE hTTButton; - -UINT SecTimer; - -#define FIXED_TAB_SIZE 100 // default value for fixed width tabs - -static void GetProfileDirectory(wchar_t *szPath, int cbPath) -//This is copied from Miranda's sources. In 0.2.1.0 it is needed, in newer vesions of Miranda use MS_DB_GETPROFILEPATH service -{ - wchar_t tszOldPath[MAX_PATH]; - Profile_GetPathW(_countof(tszOldPath), tszOldPath); - mir_wstrcat(tszOldPath, L"\\*.book"); - - VARSW ptszNewPath(L"%miranda_userdata%"); - - SHFILEOPSTRUCT file_op = { - nullptr, - FO_MOVE, - tszOldPath, - ptszNewPath, - FOF_NOERRORUI | FOF_NOCONFIRMATION | FOF_SILENT, - false, - nullptr, - L""}; - SHFileOperation(&file_op); - - wcsncpy(szPath, ptszNewPath, cbPath); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCOL, MIID_LAST}; - -///////////////////////////////////////////////////////////////////////////////////////// - -PLUGININFOEX pluginInfoEx = { - sizeof(PLUGININFOEX), - __PLUGIN_NAME, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - __DESCRIPTION, - __AUTHOR, - __COPYRIGHT, - __AUTHORWEB, - UNICODE_AWARE, - // {B047A7E5-027A-4CFC-8B18-EDA8345D2790} - {0xb047a7e5, 0x27a, 0x4cfc, {0x8b, 0x18, 0xed, 0xa8, 0x34, 0x5d, 0x27, 0x90}} -}; - -CMPlugin::CMPlugin() : - PLUGIN(YAMN_DBMODULE, pluginInfoEx) -{ - RegisterProtocol(PROTOTYPE_VIRTUAL); - SetUniqueId("Id"); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// The callback function - -BOOL CALLBACK EnumSystemCodePagesProc(LPTSTR cpStr) -{ - // Convert code page string to number - UINT cp = _wtoi(cpStr); - if (!IsValidCodePage(cp)) - return TRUE; - - // Get Code Page name - CPINFOEX info; - if (GetCPInfoEx(cp, 0, &info)) { - for (int i = 1; i < CPLENALL; i++) if (CodePageNamesAll[i].CP == cp) { - CodePageNamesAll[i].isValid = TRUE; - CPLENSUPP++; - break; - } - } - return TRUE; -} - -int SystemModulesLoaded(WPARAM, LPARAM) -{ - //Insert "Check mail (YAMN)" item to Miranda's menu - CMenuItem mi(&g_plugin); - - SET_UID(mi, 0xa01ff3d9, 0x53cb, 0x4406, 0x85, 0xd9, 0xf1, 0x90, 0x3a, 0x94, 0xed, 0xf4); - mi.position = 0xb0000000; - mi.hIcolibItem = g_plugin.getIconHandle(IDI_CHECKMAIL); - mi.name.a = LPGEN("Check &mail (All Account)"); - mi.pszService = MS_YAMN_FORCECHECK; - Menu_AddMainMenuItem(&mi); - - SET_UID(mi, 0xfe22191f, 0x40c8, 0x479f, 0x93, 0x5d, 0xa5, 0x17, 0x1f, 0x57, 0x2f, 0xcb); - mi.name.a = LPGEN("Check &mail (This Account)"); - mi.pszService = MS_YAMN_CLISTCONTEXT; - Menu_AddContactMenuItem(&mi, YAMN_DBMODULE); - - SET_UID(mi, 0x147c7800, 0x12d0, 0x4209, 0xab, 0xcc, 0xfa, 0x64, 0xc6, 0xb0, 0xa6, 0xeb); - mi.hIcolibItem = g_plugin.getIconHandle(IDI_LAUNCHAPP); - mi.name.a = LPGEN("Launch application"); - mi.pszService = MS_YAMN_CLISTCONTEXTAPP; - Menu_AddContactMenuItem(&mi, YAMN_DBMODULE); - - if (hAccountFolder = FoldersRegisterCustomPathW(LPGEN("YAMN"), LPGEN("YAMN Account Folder"), UserDirectory)) - FoldersGetCustomPathW(hAccountFolder, UserDirectory, MAX_PATH, UserDirectory); - - RegisterPOP3Plugin(0, 0); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static IconItem iconList[] = -{ - {LPGEN("Check mail"), "YAMN_Check", IDI_CHECKMAIL}, - {LPGEN("Launch application"), "YAMN_Launch", IDI_LAUNCHAPP}, - {LPGEN("New Mail"), "YAMN_NewMail", IDI_NEWMAIL}, - {LPGEN("Connect Fail"), "YAMN_ConnectFail", IDI_BADCONNECT}, -}; - -void LoadIcons() -{ - g_plugin.registerIcon("YAMN", iconList); -} - -static void LoadPlugins() -{ - wchar_t szSearchPath[MAX_PATH]; - mir_snwprintf(szSearchPath, L"%s\\Plugins\\YAMN\\*.dll", szMirandaDir); - - hDllPlugins = nullptr; - - WIN32_FIND_DATA fd; - HANDLE hFind = FindFirstFile(szSearchPath, &fd); - if (hFind != INVALID_HANDLE_VALUE) { - do { - //rewritten from Miranda sources... Needed because Win32 API has a bug in FindFirstFile, search is done for *.dlllllll... too - wchar_t *dot = wcsrchr(fd.cFileName, '.'); - if (dot == nullptr) - continue; - - // we have a dot - int len = (int)mir_wstrlen(fd.cFileName); // find the length of the string - wchar_t *end = fd.cFileName + len; // get a pointer to the NULL - int safe = (end - dot) - 1; // figure out how many chars after the dot are "safe", not including NULL - - if ((safe != 3) || (mir_wstrcmpi(dot + 1, L"dll") != 0)) //not bound, however the "dll" string should mean only 3 chars are compared - continue; - - wchar_t szPluginPath[MAX_PATH]; - mir_snwprintf(szPluginPath, L"%s\\Plugins\\YAMN\\%s", szMirandaDir, fd.cFileName); - HINSTANCE hDll = LoadLibrary(szPluginPath); - if (hDll == nullptr) - continue; - - LOADFILTERFCN LoadFilter = (LOADFILTERFCN)GetProcAddress(hDll, "LoadFilter"); - if (nullptr == LoadFilter) { - FreeLibrary(hDll); - hDll = nullptr; - continue; - } - - if (!LoadFilter(GetFcnPtrSvc)) { - FreeLibrary(hDll); - hDll = nullptr; - } - - if (hDll != nullptr) { - hDllPlugins = (HINSTANCE *)realloc(hDllPlugins, (iDllPlugins + 1) * sizeof(HINSTANCE)); - hDllPlugins[iDllPlugins++] = hDll; - } - } while (FindNextFile(hFind, &fd)); - - FindClose(hFind); - } -} - -int CMPlugin::Load() -{ - // we get the Miranda Root Path - PathToAbsoluteW(L".", szMirandaDir); - - // retrieve the current profile name - Profile_GetNameW(_countof(ProfileName), ProfileName); - wchar_t *fc = wcsrchr(ProfileName, '.'); - if (fc != nullptr) *fc = 0; - - // we get the user path where our yamn-account.book.ini is stored from mirandaboot.ini file - GetProfileDirectory(UserDirectory, _countof(UserDirectory)); - - // Enumerate all the code pages available for the System Locale - EnumSystemCodePages(EnumSystemCodePagesProc, CP_INSTALLED); - CodePageNamesSupp = new _tcptable[CPLENSUPP]; - for (int i = 0, k = 0; i < CPLENALL; i++) - if (CodePageNamesAll[i].isValid) { - CodePageNamesSupp[k] = CodePageNamesAll[i]; - k++; - } - - if (nullptr == (NoWriterEV = CreateEvent(nullptr, TRUE, TRUE, nullptr))) - return 1; - if (nullptr == (WriteToFileEV = CreateEvent(nullptr, FALSE, FALSE, nullptr))) - return 1; - if (nullptr == (ExitEV = CreateEvent(nullptr, TRUE, FALSE, nullptr))) - return 1; - - PosX = g_plugin.getDword(YAMN_DBPOSX, 0); - PosY = g_plugin.getDword(YAMN_DBPOSY, 0); - SizeX = g_plugin.getDword(YAMN_DBSIZEX, 800); - SizeY = g_plugin.getDword(YAMN_DBSIZEY, 200); - - HeadPosX = g_plugin.getDword(YAMN_DBMSGPOSX, 0); - HeadPosY = g_plugin.getDword(YAMN_DBMSGPOSY, 0); - HeadSizeX = g_plugin.getDword(YAMN_DBMSGSIZEX, 690); - HeadSizeY = g_plugin.getDword(YAMN_DBMSGSIZEY, 300); - HeadSplitPos = g_plugin.getWord(YAMN_DBMSGPOSSPLIT, 250); - - optDateTime = g_plugin.getByte(YAMN_DBTIMEOPTIONS, optDateTime); - - // Create new window queues for broadcast messages - YAMNVar.MessageWnds = WindowList_Create(); - YAMNVar.NewMailAccountWnd = WindowList_Create(); - YAMNVar.Shutdown = FALSE; - - hCurSplitNS = LoadCursor(nullptr, IDC_SIZENS); - hCurSplitWE = LoadCursor(nullptr, IDC_SIZEWE); - - #ifdef _DEBUG - InitDebug(); - #endif - - CreateServiceFunctions(); - - g_plugin.addSound(YAMN_NEWMAILSOUND, L"YAMN", YAMN_NEWMAILSNDDESC); - g_plugin.addSound(YAMN_CONNECTFAILSOUND, L"YAMN", YAMN_CONNECTFAILSNDDESC); - - HookEvents(); - - LoadIcons(); - LoadPlugins(); - - HOTKEYDESC hkd = {}; - hkd.pszName = "YAMN_hotkey"; - hkd.pszService = MS_YAMN_FORCECHECK; - hkd.szSection.a = YAMN_DBMODULE; - hkd.szDescription.a = LPGEN("Check mail"); - hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F11); - g_plugin.addHotkey(&hkd); - - //Create thread that will be executed every second - if (!(SecTimer = SetTimer(nullptr, 0, 1000, TimerProc))) - return 1; - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static void UnloadPlugins() -{ - if (hDllPlugins == nullptr) - return; - - for (int i = iDllPlugins - 1; i >= 0; i--) { - if (FreeLibrary(hDllPlugins[i])) { - hDllPlugins[i] = nullptr; //for safety - iDllPlugins--; - } - } - free((void *)hDllPlugins); - hDllPlugins = nullptr; -} - -int CMPlugin::Unload() -{ - #ifdef _DEBUG - UnInitDebug(); - #endif - - WindowList_Destroy(YAMNVar.MessageWnds); - WindowList_Destroy(YAMNVar.NewMailAccountWnd); - - DestroyCursor(hCurSplitNS); - DestroyCursor(hCurSplitWE); - - CloseHandle(NoWriterEV); - CloseHandle(WriteToFileEV); - CloseHandle(ExitEV); - - UnloadPlugins(); - - delete[] CodePageNamesSupp; - return 0; -} +/* + * YAMN plugin main file + * Miranda homepage: http://miranda-icq.sourceforge.net/ + * YAMN homepage: http://www.majvan.host.sk/Projekty/YAMN + * + * initializes all variables for further work + * + * (c) majvan 2002-2004 + */ + +#include "stdafx.h" + + //-------------------------------------------------------------------------------------------------- + +wchar_t ProfileName[MAX_PATH]; +wchar_t UserDirectory[MAX_PATH]; + +wchar_t szMirandaDir[MAX_PATH]; +wchar_t szProfileDir[MAX_PATH]; + +BOOL UninstallPlugins; + +HANDLE hAccountFolder; + +HINSTANCE *hDllPlugins; +static int iDllPlugins = 0; + +YAMN_VARIABLES YAMNVar; + +CMPlugin g_plugin; + +HANDLE hNewMailHook; +HANDLE NoWriterEV; +HANDLE hTTButton; + +UINT SecTimer; + +#define FIXED_TAB_SIZE 100 // default value for fixed width tabs + +static void GetProfileDirectory(wchar_t *szPath, int cbPath) +//This is copied from Miranda's sources. In 0.2.1.0 it is needed, in newer vesions of Miranda use MS_DB_GETPROFILEPATH service +{ + wchar_t tszOldPath[MAX_PATH]; + Profile_GetPathW(_countof(tszOldPath), tszOldPath); + mir_wstrcat(tszOldPath, L"\\*.book"); + + VARSW ptszNewPath(L"%miranda_userdata%"); + + SHFILEOPSTRUCT file_op = { + nullptr, + FO_MOVE, + tszOldPath, + ptszNewPath, + FOF_NOERRORUI | FOF_NOCONFIRMATION | FOF_SILENT, + false, + nullptr, + L""}; + SHFileOperation(&file_op); + + wcsncpy(szPath, ptszNewPath, cbPath); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCOL, MIID_LAST}; + +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfoEx = { + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + // {B047A7E5-027A-4CFC-8B18-EDA8345D2790} + {0xb047a7e5, 0x27a, 0x4cfc, {0x8b, 0x18, 0xed, 0xa8, 0x34, 0x5d, 0x27, 0x90}} +}; + +CMPlugin::CMPlugin() : + PLUGIN(YAMN_DBMODULE, pluginInfoEx) +{ + RegisterProtocol(PROTOTYPE_VIRTUAL); + SetUniqueId("Id"); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// The callback function + +BOOL CALLBACK EnumSystemCodePagesProc(LPTSTR cpStr) +{ + // Convert code page string to number + UINT cp = _wtoi(cpStr); + if (!IsValidCodePage(cp)) + return TRUE; + + // Get Code Page name + CPINFOEX info; + if (GetCPInfoEx(cp, 0, &info)) { + for (int i = 1; i < CPLENALL; i++) if (CodePageNamesAll[i].CP == cp) { + CodePageNamesAll[i].isValid = TRUE; + CPLENSUPP++; + break; + } + } + return TRUE; +} + +int SystemModulesLoaded(WPARAM, LPARAM) +{ + //Insert "Check mail (YAMN)" item to Miranda's menu + CMenuItem mi(&g_plugin); + + SET_UID(mi, 0xa01ff3d9, 0x53cb, 0x4406, 0x85, 0xd9, 0xf1, 0x90, 0x3a, 0x94, 0xed, 0xf4); + mi.position = 0xb0000000; + mi.hIcolibItem = g_plugin.getIconHandle(IDI_CHECKMAIL); + mi.name.a = LPGEN("Check &mail (All Account)"); + mi.pszService = MS_YAMN_FORCECHECK; + Menu_AddMainMenuItem(&mi); + + SET_UID(mi, 0xfe22191f, 0x40c8, 0x479f, 0x93, 0x5d, 0xa5, 0x17, 0x1f, 0x57, 0x2f, 0xcb); + mi.name.a = LPGEN("Check &mail (This Account)"); + mi.pszService = MS_YAMN_CLISTCONTEXT; + Menu_AddContactMenuItem(&mi, YAMN_DBMODULE); + + SET_UID(mi, 0x147c7800, 0x12d0, 0x4209, 0xab, 0xcc, 0xfa, 0x64, 0xc6, 0xb0, 0xa6, 0xeb); + mi.hIcolibItem = g_plugin.getIconHandle(IDI_LAUNCHAPP); + mi.name.a = LPGEN("Launch application"); + mi.pszService = MS_YAMN_CLISTCONTEXTAPP; + Menu_AddContactMenuItem(&mi, YAMN_DBMODULE); + + if (hAccountFolder = FoldersRegisterCustomPathW(LPGEN("YAMN"), LPGEN("YAMN Account Folder"), UserDirectory)) + FoldersGetCustomPathW(hAccountFolder, UserDirectory, MAX_PATH, UserDirectory); + + RegisterPOP3Plugin(0, 0); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static IconItem iconList[] = +{ + {LPGEN("Check mail"), "YAMN_Check", IDI_CHECKMAIL}, + {LPGEN("Launch application"), "YAMN_Launch", IDI_LAUNCHAPP}, + {LPGEN("New Mail"), "YAMN_NewMail", IDI_NEWMAIL}, + {LPGEN("Connect Fail"), "YAMN_ConnectFail", IDI_BADCONNECT}, +}; + +void LoadIcons() +{ + g_plugin.registerIcon("YAMN", iconList); +} + +static void LoadPlugins() +{ + wchar_t szSearchPath[MAX_PATH]; + mir_snwprintf(szSearchPath, L"%s\\Plugins\\YAMN\\*.dll", szMirandaDir); + + hDllPlugins = nullptr; + + WIN32_FIND_DATA fd; + HANDLE hFind = FindFirstFile(szSearchPath, &fd); + if (hFind != INVALID_HANDLE_VALUE) { + do { + //rewritten from Miranda sources... Needed because Win32 API has a bug in FindFirstFile, search is done for *.dlllllll... too + wchar_t *dot = wcsrchr(fd.cFileName, '.'); + if (dot == nullptr) + continue; + + // we have a dot + int len = (int)mir_wstrlen(fd.cFileName); // find the length of the string + wchar_t *end = fd.cFileName + len; // get a pointer to the NULL + int safe = (end - dot) - 1; // figure out how many chars after the dot are "safe", not including NULL + + if ((safe != 3) || (mir_wstrcmpi(dot + 1, L"dll") != 0)) //not bound, however the "dll" string should mean only 3 chars are compared + continue; + + wchar_t szPluginPath[MAX_PATH]; + mir_snwprintf(szPluginPath, L"%s\\Plugins\\YAMN\\%s", szMirandaDir, fd.cFileName); + HINSTANCE hDll = LoadLibrary(szPluginPath); + if (hDll == nullptr) + continue; + + LOADFILTERFCN LoadFilter = (LOADFILTERFCN)GetProcAddress(hDll, "LoadFilter"); + if (nullptr == LoadFilter) { + FreeLibrary(hDll); + hDll = nullptr; + continue; + } + + if (!LoadFilter(GetFcnPtrSvc)) { + FreeLibrary(hDll); + hDll = nullptr; + } + + if (hDll != nullptr) { + hDllPlugins = (HINSTANCE *)realloc(hDllPlugins, (iDllPlugins + 1) * sizeof(HINSTANCE)); + hDllPlugins[iDllPlugins++] = hDll; + } + } while (FindNextFile(hFind, &fd)); + + FindClose(hFind); + } +} + +int CMPlugin::Load() +{ + // we get the Miranda Root Path + PathToAbsoluteW(L".", szMirandaDir); + + // retrieve the current profile name + Profile_GetNameW(_countof(ProfileName), ProfileName); + wchar_t *fc = wcsrchr(ProfileName, '.'); + if (fc != nullptr) *fc = 0; + + // we get the user path where our yamn-account.book.ini is stored from mirandaboot.ini file + GetProfileDirectory(UserDirectory, _countof(UserDirectory)); + + // Enumerate all the code pages available for the System Locale + EnumSystemCodePages(EnumSystemCodePagesProc, CP_INSTALLED); + CodePageNamesSupp = new _tcptable[CPLENSUPP]; + for (int i = 0, k = 0; i < CPLENALL; i++) + if (CodePageNamesAll[i].isValid) { + CodePageNamesSupp[k] = CodePageNamesAll[i]; + k++; + } + + if (nullptr == (NoWriterEV = CreateEvent(nullptr, TRUE, TRUE, nullptr))) + return 1; + if (nullptr == (WriteToFileEV = CreateEvent(nullptr, FALSE, FALSE, nullptr))) + return 1; + if (nullptr == (ExitEV = CreateEvent(nullptr, TRUE, FALSE, nullptr))) + return 1; + + PosX = g_plugin.getDword(YAMN_DBPOSX, 0); + PosY = g_plugin.getDword(YAMN_DBPOSY, 0); + SizeX = g_plugin.getDword(YAMN_DBSIZEX, 800); + SizeY = g_plugin.getDword(YAMN_DBSIZEY, 200); + + HeadPosX = g_plugin.getDword(YAMN_DBMSGPOSX, 0); + HeadPosY = g_plugin.getDword(YAMN_DBMSGPOSY, 0); + HeadSizeX = g_plugin.getDword(YAMN_DBMSGSIZEX, 690); + HeadSizeY = g_plugin.getDword(YAMN_DBMSGSIZEY, 300); + HeadSplitPos = g_plugin.getWord(YAMN_DBMSGPOSSPLIT, 250); + + optDateTime = g_plugin.getByte(YAMN_DBTIMEOPTIONS, optDateTime); + + // Create new window queues for broadcast messages + YAMNVar.MessageWnds = WindowList_Create(); + YAMNVar.NewMailAccountWnd = WindowList_Create(); + YAMNVar.Shutdown = FALSE; + + hCurSplitNS = LoadCursor(nullptr, IDC_SIZENS); + hCurSplitWE = LoadCursor(nullptr, IDC_SIZEWE); + + #ifdef _DEBUG + InitDebug(); + #endif + + CreateServiceFunctions(); + + g_plugin.addSound(YAMN_NEWMAILSOUND, L"YAMN", YAMN_NEWMAILSNDDESC); + g_plugin.addSound(YAMN_CONNECTFAILSOUND, L"YAMN", YAMN_CONNECTFAILSNDDESC); + + HookEvents(); + + LoadIcons(); + LoadPlugins(); + + HOTKEYDESC hkd = {}; + hkd.pszName = "YAMN_hotkey"; + hkd.pszService = MS_YAMN_FORCECHECK; + hkd.szSection.a = YAMN_DBMODULE; + hkd.szDescription.a = LPGEN("Check mail"); + hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F11); + g_plugin.addHotkey(&hkd); + + //Create thread that will be executed every second + if (!(SecTimer = SetTimer(nullptr, 0, 1000, TimerProc))) + return 1; + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static void UnloadPlugins() +{ + if (hDllPlugins == nullptr) + return; + + for (int i = iDllPlugins - 1; i >= 0; i--) { + if (FreeLibrary(hDllPlugins[i])) { + hDllPlugins[i] = nullptr; //for safety + iDllPlugins--; + } + } + free((void *)hDllPlugins); + hDllPlugins = nullptr; +} + +int CMPlugin::Unload() +{ + #ifdef _DEBUG + UnInitDebug(); + #endif + + WindowList_Destroy(YAMNVar.MessageWnds); + WindowList_Destroy(YAMNVar.NewMailAccountWnd); + + DestroyCursor(hCurSplitNS); + DestroyCursor(hCurSplitWE); + + CloseHandle(NoWriterEV); + CloseHandle(WriteToFileEV); + CloseHandle(ExitEV); + + UnloadPlugins(); + + delete[] CodePageNamesSupp; + return 0; +} diff --git a/protocols/YAMN/src/main.h b/protocols/YAMN/src/main.h index cdcf5c285c..971ba43c9f 100644 --- a/protocols/YAMN/src/main.h +++ b/protocols/YAMN/src/main.h @@ -1,37 +1,37 @@ -#ifndef __MAIN_H -#define __MAIN_H - -#define YAMN_NEWMAILSNDDESC LPGENW("New mail message") -#define YAMN_CONNECTFAILSNDDESC LPGENW("Connect failed") -#define YAMN_CONNECTFAILSOUND "YAMN/Sound/ConnectFail" -#define YAMN_NEWMAILSOUND "YAMN/Sound/NewMail" - -#define YAMN_DBMODULE "YAMN" -#define YAMN_DBPOSX "MailBrowserWinX" -#define YAMN_DBPOSY "MailBrowserWinY" -#define YAMN_DBSIZEX "MailBrowserWinW" -#define YAMN_DBSIZEY "MailBrowserWinH" -#define YAMN_DBMSGPOSX "MailMessageWinX" -#define YAMN_DBMSGPOSY "MailMessageWinY" -#define YAMN_DBMSGSIZEX "MailMessageWinW" -#define YAMN_DBMSGSIZEY "MailMessageWinH" -#define YAMN_DBMSGPOSSPLIT "MailMessageSplitY" -#define YAMN_TTBFCHECK "ForceCheckTTB" -#define YAMN_CLOSEDELETE "CloseOnDelete" -#define YAMN_DBTIMEOPTIONS "MailBrowserTimeOpts" - -#define YAMN_DEFAULTHK MAKEWORD(VK_F11,MOD_CONTROL) - -#define SHOWDATELONG 0x01 -#define SHOWDATENOTODAY 0x02 -#define SHOWDATENOSECONDS 0x04 - -extern unsigned char optDateTime; - -// Loading Icon and checking for icolib -void LoadIcons(); - -typedef INT_PTR (*LOADFILTERFCN)(MIRANDASERVICE GetYAMNFcn); - -#endif - +#ifndef __MAIN_H +#define __MAIN_H + +#define YAMN_NEWMAILSNDDESC LPGENW("New mail message") +#define YAMN_CONNECTFAILSNDDESC LPGENW("Connect failed") +#define YAMN_CONNECTFAILSOUND "YAMN/Sound/ConnectFail" +#define YAMN_NEWMAILSOUND "YAMN/Sound/NewMail" + +#define YAMN_DBMODULE "YAMN" +#define YAMN_DBPOSX "MailBrowserWinX" +#define YAMN_DBPOSY "MailBrowserWinY" +#define YAMN_DBSIZEX "MailBrowserWinW" +#define YAMN_DBSIZEY "MailBrowserWinH" +#define YAMN_DBMSGPOSX "MailMessageWinX" +#define YAMN_DBMSGPOSY "MailMessageWinY" +#define YAMN_DBMSGSIZEX "MailMessageWinW" +#define YAMN_DBMSGSIZEY "MailMessageWinH" +#define YAMN_DBMSGPOSSPLIT "MailMessageSplitY" +#define YAMN_TTBFCHECK "ForceCheckTTB" +#define YAMN_CLOSEDELETE "CloseOnDelete" +#define YAMN_DBTIMEOPTIONS "MailBrowserTimeOpts" + +#define YAMN_DEFAULTHK MAKEWORD(VK_F11,MOD_CONTROL) + +#define SHOWDATELONG 0x01 +#define SHOWDATENOTODAY 0x02 +#define SHOWDATENOSECONDS 0x04 + +extern unsigned char optDateTime; + +// Loading Icon and checking for icolib +void LoadIcons(); + +typedef INT_PTR (*LOADFILTERFCN)(MIRANDASERVICE GetYAMNFcn); + +#endif + diff --git a/protocols/YAMN/src/proto/netlib.cpp b/protocols/YAMN/src/proto/netlib.cpp index cf477e8219..726860e459 100644 --- a/protocols/YAMN/src/proto/netlib.cpp +++ b/protocols/YAMN/src/proto/netlib.cpp @@ -1,232 +1,232 @@ -/* - * This code implements communication based on Miranda netlib library - * - * (c) majvan 2002-2004 - */ - -#include "../stdafx.h" - - //-------------------------------------------------------------------------------------------------- - -BOOL SSLLoaded = FALSE; -HNETLIBUSER hNetlibUser = nullptr; - -void __stdcall SSL_DebugLog(const char *fmt, ...) -{ - char str[4096]; - va_list vararg; - - va_start(vararg, fmt); - int tBytes = mir_vsnprintf(str, _countof(str), fmt, vararg); - if (tBytes == 0) - return; - - if (tBytes > 0) - str[tBytes] = 0; - else - str[sizeof(str) - 1] = 0; - - Netlib_Log(hNetlibUser, str); - va_end(vararg); -} - -HANDLE RegisterNLClient(char *name) -{ - #ifdef DEBUG_COMM - DebugLog(CommFile, ""); - #endif - - NETLIBUSER nlu = {}; - nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS; - nlu.szDescriptiveName.a = name; - nlu.szSettingsModule = (char *)name; - hNetlibUser = Netlib_RegisterUser(&nlu); - - #ifdef DEBUG_COMM - if (NULL == hNetlibUser) - DebugLog(CommFile, "\n"); - else - DebugLog(CommFile, "\n"); - #endif - return hNetlibUser; -} - -//Move connection to SSL -void CNLClient::SSLify() throw(DWORD) -{ - #ifdef DEBUG_COMM - SSL_DebugLog("Staring SSL..."); - #endif - int socket = Netlib_GetSocket(hConnection); - if (socket != INVALID_SOCKET) { - #ifdef DEBUG_COMM - SSL_DebugLog("Staring netlib core SSL"); - #endif - if (Netlib_StartSsl(hConnection, nullptr)) { - #ifdef DEBUG_COMM - SSL_DebugLog("Netlib core SSL started"); - #endif - isTLSed = true; - SSLLoaded = TRUE; - return; - } - } - - //ssl could not be created - throw NetworkError = (uint32_t)ESSL_CREATESSL; -} - -//Connects to the server through the sock -//if not success, exception is throwed -void CNLClient::Connect(const char *servername, const int port) throw(DWORD) -{ - NetworkError = SystemError = 0; - isTLSed = false; - - #ifdef DEBUG_COMM - DebugLog(CommFile, "\n"); - #endif - try { - if (nullptr == (hConnection = Netlib_OpenConnection(hNetlibUser, servername, port))) { - SystemError = WSAGetLastError(); - throw NetworkError = (uint32_t)ENL_CONNECT; - } - #ifdef DEBUG_COMM - DebugLog(CommFile, "\n"); - #endif - return; - } - catch (...) { - #ifdef DEBUG_COMM - DebugLog(CommFile, "\n"); - #endif - throw; - } -} - -//Performs a simple query -// query- command to send -int CNLClient::LocalNetlib_Send(HNETLIBCONN hConn, const char *buf, int len, int flags) -{ - return Netlib_Send(hConn, buf, len, flags); -} - -void CNLClient::Send(const char *query) throw(DWORD) -{ - unsigned int Sent; - - if (nullptr == query) - return; - if (hConnection == nullptr) - return; - #ifdef DEBUG_COMM - DebugLog(CommFile, "%s", query); - #endif - try { - if ((SOCKET_ERROR == (Sent = LocalNetlib_Send(hConnection, query, (int)mir_strlen(query), MSG_DUMPASTEXT))) || Sent != (unsigned int)mir_strlen(query)) { - SystemError = WSAGetLastError(); - throw NetworkError = (uint32_t)ENL_SEND; - } - #ifdef DEBUG_COMM - DebugLog(CommFile, "\n"); - #endif - } - catch (...) { - #ifdef DEBUG_COMM - DebugLog(CommFile, "\n"); - #endif - throw; - } -} - -//Reads data from socket -// buf- buffer where to store max. buflen of received characters -// if buf is NULL, creates buffer of buflen size -// buf is NULL by default -//You need free() returned buffer, which can be allocated in this function -//if not success, exception is throwed - -int CNLClient::LocalNetlib_Recv(HNETLIBCONN hConn, char *buf, int len, int flags) -{ - int iReturn = Netlib_Recv(hConn, buf, len, flags); - if (isTLSed) { - #ifdef DEBUG_COMM - SSL_DebugLog("SSL recv: %s", buf); - #endif - } - - return iReturn; -} - -char *CNLClient::Recv(char *buf, int buflen) throw(DWORD) -{ - #ifdef DEBUG_COMM - DebugLog(CommFile, ""); - #endif - try { - if (buf == nullptr) - buf = (char *)malloc(sizeof(char) * (buflen + 1)); - if (buf == nullptr) - throw NetworkError = (uint32_t)ENL_RECVALLOC; - - if (!isTLSed) { - NETLIBSELECT nls = {}; - nls.dwTimeout = 60000; - nls.hReadConns[0] = hConnection; - switch (Netlib_Select(&nls)) { - case SOCKET_ERROR: - free(buf); - SystemError = WSAGetLastError(); - throw NetworkError = (uint32_t)ENL_RECV; - case 0: // time out! - free(buf); - throw NetworkError = (uint32_t)ENL_TIMEOUT; - } - } - - memset(buf, 0, buflen); - if (SOCKET_ERROR == (Rcv = LocalNetlib_Recv(hConnection, buf, buflen, MSG_DUMPASTEXT))) { - free(buf); - SystemError = WSAGetLastError(); - throw NetworkError = (uint32_t)ENL_RECV; - } - if (!Rcv) { - free(buf); - SystemError = WSAGetLastError(); - throw NetworkError = (uint32_t)ENL_RECV; - } - #ifdef DEBUG_COMM - *(buf + Rcv) = 0; //end the buffer to write it to file - DebugLog(CommFile, "%s", buf); - DebugLog(CommFile, "\n"); - #endif - return(buf); - } - catch (...) { - #ifdef DEBUG_COMM - DebugLog(CommFile, "\n"); - #endif - throw; - } -} - -//Closes netlib connection -void CNLClient::Disconnect() -{ - Netlib_CloseHandle(hConnection); - hConnection = nullptr; -} - -//Uninitializes netlib library -void UnregisterNLClient() -{ - #ifdef DEBUG_COMM - DebugLog(CommFile, ""); - #endif - - Netlib_CloseHandle(hNetlibUser); - hNetlibUser = nullptr; - #ifdef DEBUG_COMM - DebugLog(CommFile, "\n"); - #endif -} +/* + * This code implements communication based on Miranda netlib library + * + * (c) majvan 2002-2004 + */ + +#include "../stdafx.h" + + //-------------------------------------------------------------------------------------------------- + +BOOL SSLLoaded = FALSE; +HNETLIBUSER hNetlibUser = nullptr; + +void __stdcall SSL_DebugLog(const char *fmt, ...) +{ + char str[4096]; + va_list vararg; + + va_start(vararg, fmt); + int tBytes = mir_vsnprintf(str, _countof(str), fmt, vararg); + if (tBytes == 0) + return; + + if (tBytes > 0) + str[tBytes] = 0; + else + str[sizeof(str) - 1] = 0; + + Netlib_Log(hNetlibUser, str); + va_end(vararg); +} + +HANDLE RegisterNLClient(char *name) +{ + #ifdef DEBUG_COMM + DebugLog(CommFile, ""); + #endif + + NETLIBUSER nlu = {}; + nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS; + nlu.szDescriptiveName.a = name; + nlu.szSettingsModule = (char *)name; + hNetlibUser = Netlib_RegisterUser(&nlu); + + #ifdef DEBUG_COMM + if (NULL == hNetlibUser) + DebugLog(CommFile, "\n"); + else + DebugLog(CommFile, "\n"); + #endif + return hNetlibUser; +} + +//Move connection to SSL +void CNLClient::SSLify() throw(DWORD) +{ + #ifdef DEBUG_COMM + SSL_DebugLog("Staring SSL..."); + #endif + int socket = Netlib_GetSocket(hConnection); + if (socket != INVALID_SOCKET) { + #ifdef DEBUG_COMM + SSL_DebugLog("Staring netlib core SSL"); + #endif + if (Netlib_StartSsl(hConnection, nullptr)) { + #ifdef DEBUG_COMM + SSL_DebugLog("Netlib core SSL started"); + #endif + isTLSed = true; + SSLLoaded = TRUE; + return; + } + } + + //ssl could not be created + throw NetworkError = (uint32_t)ESSL_CREATESSL; +} + +//Connects to the server through the sock +//if not success, exception is throwed +void CNLClient::Connect(const char *servername, const int port) throw(DWORD) +{ + NetworkError = SystemError = 0; + isTLSed = false; + + #ifdef DEBUG_COMM + DebugLog(CommFile, "\n"); + #endif + try { + if (nullptr == (hConnection = Netlib_OpenConnection(hNetlibUser, servername, port))) { + SystemError = WSAGetLastError(); + throw NetworkError = (uint32_t)ENL_CONNECT; + } + #ifdef DEBUG_COMM + DebugLog(CommFile, "\n"); + #endif + return; + } + catch (...) { + #ifdef DEBUG_COMM + DebugLog(CommFile, "\n"); + #endif + throw; + } +} + +//Performs a simple query +// query- command to send +int CNLClient::LocalNetlib_Send(HNETLIBCONN hConn, const char *buf, int len, int flags) +{ + return Netlib_Send(hConn, buf, len, flags); +} + +void CNLClient::Send(const char *query) throw(DWORD) +{ + unsigned int Sent; + + if (nullptr == query) + return; + if (hConnection == nullptr) + return; + #ifdef DEBUG_COMM + DebugLog(CommFile, "%s", query); + #endif + try { + if ((SOCKET_ERROR == (Sent = LocalNetlib_Send(hConnection, query, (int)mir_strlen(query), MSG_DUMPASTEXT))) || Sent != (unsigned int)mir_strlen(query)) { + SystemError = WSAGetLastError(); + throw NetworkError = (uint32_t)ENL_SEND; + } + #ifdef DEBUG_COMM + DebugLog(CommFile, "\n"); + #endif + } + catch (...) { + #ifdef DEBUG_COMM + DebugLog(CommFile, "\n"); + #endif + throw; + } +} + +//Reads data from socket +// buf- buffer where to store max. buflen of received characters +// if buf is NULL, creates buffer of buflen size +// buf is NULL by default +//You need free() returned buffer, which can be allocated in this function +//if not success, exception is throwed + +int CNLClient::LocalNetlib_Recv(HNETLIBCONN hConn, char *buf, int len, int flags) +{ + int iReturn = Netlib_Recv(hConn, buf, len, flags); + if (isTLSed) { + #ifdef DEBUG_COMM + SSL_DebugLog("SSL recv: %s", buf); + #endif + } + + return iReturn; +} + +char *CNLClient::Recv(char *buf, int buflen) throw(DWORD) +{ + #ifdef DEBUG_COMM + DebugLog(CommFile, ""); + #endif + try { + if (buf == nullptr) + buf = (char *)malloc(sizeof(char) * (buflen + 1)); + if (buf == nullptr) + throw NetworkError = (uint32_t)ENL_RECVALLOC; + + if (!isTLSed) { + NETLIBSELECT nls = {}; + nls.dwTimeout = 60000; + nls.hReadConns[0] = hConnection; + switch (Netlib_Select(&nls)) { + case SOCKET_ERROR: + free(buf); + SystemError = WSAGetLastError(); + throw NetworkError = (uint32_t)ENL_RECV; + case 0: // time out! + free(buf); + throw NetworkError = (uint32_t)ENL_TIMEOUT; + } + } + + memset(buf, 0, buflen); + if (SOCKET_ERROR == (Rcv = LocalNetlib_Recv(hConnection, buf, buflen, MSG_DUMPASTEXT))) { + free(buf); + SystemError = WSAGetLastError(); + throw NetworkError = (uint32_t)ENL_RECV; + } + if (!Rcv) { + free(buf); + SystemError = WSAGetLastError(); + throw NetworkError = (uint32_t)ENL_RECV; + } + #ifdef DEBUG_COMM + *(buf + Rcv) = 0; //end the buffer to write it to file + DebugLog(CommFile, "%s", buf); + DebugLog(CommFile, "\n"); + #endif + return(buf); + } + catch (...) { + #ifdef DEBUG_COMM + DebugLog(CommFile, "\n"); + #endif + throw; + } +} + +//Closes netlib connection +void CNLClient::Disconnect() +{ + Netlib_CloseHandle(hConnection); + hConnection = nullptr; +} + +//Uninitializes netlib library +void UnregisterNLClient() +{ + #ifdef DEBUG_COMM + DebugLog(CommFile, ""); + #endif + + Netlib_CloseHandle(hNetlibUser); + hNetlibUser = nullptr; + #ifdef DEBUG_COMM + DebugLog(CommFile, "\n"); + #endif +} diff --git a/protocols/YAMN/src/proto/pop3/pop3.cpp b/protocols/YAMN/src/proto/pop3/pop3.cpp index d8f704dbd6..8d24a5218c 100644 --- a/protocols/YAMN/src/proto/pop3/pop3.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3.cpp @@ -1,344 +1,344 @@ -/* - * This code implements basics of POP3 protocol - * - * (c) majvan 2002-2004 - */ -/* This was made from the libspopc project - * copyright c 2002 Benoit Rouits - * released under the terms of GNU LGPL - * (GNU Lesser General Public Licence). - * libspopc offers simple API for a pop3 client (MTA). - * See RFC 1725 for pop3 specifications. - * more information on http://brouits.free.fr/libspopc/ - */ -/* - * This file is not original and is changed by majvan - * for mail checker purpose. Please see original web page to - * obtain the original. I rewrote it in C++, but good ideas were, - * I think, unchanged. - * - * Note that this file was not designed to work under Unix. It's - * needed to add Unix-specific features. I was interested only in - * Windows for my project. majvan - * - */ - -#include "../../stdafx.h" - - //-------------------------------------------------------------------------------------------------- - - //Connects to the server through the netlib - //if not success, exception is throwed - //returns welcome string returned by server - //sets AckFlag -char *CPop3Client::Connect(const char *servername, const int port, BOOL UseSSL, BOOL NoTLS) -{ - if (Stopped) // check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - delete NetClient; - SSL = UseSSL; - NetClient = new CNLClient; - - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "Connect:servername: %s port:%d\n", servername, port); - #endif - POP3Error = EPOP3_CONNECT; - NetClient->Connect(servername, port); - POP3Error = 0; - - if (SSL) { - try { - NetClient->SSLify(); - } - catch (...) { - NetClient->Disconnect(); - return nullptr; - } - } - - char *temp = RecvRest(NetClient->Recv(), POP3_SEARCHACK); - extern BOOL SSLLoaded; - if (!NoTLS & !(SSL)) { - if (NetClient->Stopped) //check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - NetClient->Send("STLS\r\n"); - free(temp); - temp = RecvRest(NetClient->Recv(), POP3_SEARCHACK); - if (AckFlag == POP3_FOK) { // Ok, we are going to tls - try { - NetClient->SSLify(); - } - catch (...) { - NetClient->Disconnect(); - return nullptr; - } - } - } - return temp; -} - -//Receives data to the end of packet -// prev- previous data read (appends to this string next received data) -// mode- mode of packet. -// Packet can end with ack state (+OK or -ERR): set mode to POP3_SEARCHACK -// If packet ends with '.' (end of string), set mode to POP3_SEARCHDOT -// size- received data are stored to memory, but if length of data is more than allocated memory, function allocates -// new memory. New allocated memory has allocated size more bytes -// This value can be selectable: if you think it is better to reallocate by 1kB size, select size to 1024, -// default is 128. You do not need to use this parameter - -char *CPop3Client::RecvRest(char *prev, int mode, int size) -{ - int SizeRead = 0; - int SizeLeft = size - NetClient->Rcv; - int RcvAll = NetClient->Rcv; - char *LastString, *PrevString = prev; - - AckFlag = 0; - - while (((mode == POP3_SEARCHDOT) && !SearchFromEnd(PrevString + RcvAll - 1, RcvAll - 3, POP3_SEARCHDOT) && !SearchFromStart(PrevString, 2, POP3_SEARCHERR)) || //we are looking for dot or -err phrase - ((mode == POP3_SEARCHACK) && (!SearchFromStart(PrevString, RcvAll - 3, mode) || !((RcvAll > 3) && SearchFromEnd(PrevString + RcvAll - 1, 1, POP3_SEARCHNL))))) //we are looking for +ok or -err phrase ended with newline - { //if not found - if (NetClient->Stopped) //check if we can work with this POP3 client session - { - if (PrevString != nullptr) - free(PrevString); - throw POP3Error = (uint32_t)EPOP3_STOPPED; - } - if (SizeLeft == 0) //if block is full - { - SizeRead += size; - SizeLeft = size; - LastString = NetClient->Recv(nullptr, SizeLeft); - PrevString = (char *)realloc(PrevString, sizeof(char) * (SizeRead + size)); - if (PrevString == nullptr) - throw POP3Error = (uint32_t)EPOP3_RESTALLOC; - memcpy(PrevString + SizeRead, LastString, size); - free(LastString); - } - else - NetClient->Recv(PrevString + RcvAll, SizeLeft); //to Rcv stores received bytes - SizeLeft = SizeLeft - NetClient->Rcv; - RcvAll += NetClient->Rcv; - } - NetClient->Rcv = RcvAll; //at the end, store the number of all bytes, no the number of last received bytes - return PrevString; -} - -// CPop3Client::SearchFromEnd -// returns 1 if substring DOTLINE or ENDLINE found from end in bs bytes -// if you need to add condition for mode, insert it into switch statement -BOOL CPop3Client::SearchFromEnd(char *end, int bs, int mode) -{ - while (bs >= 0) { - switch (mode) { - case POP3_SEARCHDOT: - if (DOTLINE(end)) - return 1; - break; - - case POP3_SEARCHNL: - if (ENDLINE(end)) - return 1; - break; - } - end--; - bs--; - } - return 0; -} - -//Finds for a occurence of some pattern in string -// returns 1 if substring OKLINE, ERRLINE or any of them found from start in bs bytes -//call only this function to retrieve ack status (+OK or -ERR), because it sets flag AckFlag -//if you need to add condition for mode, insert it into switch statement -BOOL CPop3Client::SearchFromStart(char *start, int bs, int mode) -{ - while (bs >= 0) { - switch (mode) { - case POP3_SEARCHOK: - if (OKLINE(start)) { - AckFlag = POP3_FOK; - return 1; - } - break; - case POP3_SEARCHERR: - if (ERRLINE(start)) { - AckFlag = POP3_FERR; - return 1; - } - break; - case POP3_SEARCHACK: - if (ACKLINE(start)) { - OKLINE(start) ? AckFlag = POP3_FOK : AckFlag = POP3_FERR; - return 1; - } - break; - } - start++; - bs--; - } - return 0; -} - -//Performs "USER" pop query and returns server response -//sets AckFlag -char *CPop3Client::User(char *name) -{ - if (NetClient->Stopped) // check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - char query[128]; - char *Result; - - mir_snprintf(query, "USER %s\r\n", name); - NetClient->Send(query); - Result = RecvRest(NetClient->Recv(), POP3_SEARCHACK); - if (AckFlag == POP3_FERR) - throw POP3Error = (uint32_t)EPOP3_BADUSER; - POP3Error = 0; - return Result; -} - -//Performs "PASS" pop query and returns server response -//sets AckFlag -char *CPop3Client::Pass(char *pw) -{ - if (NetClient->Stopped) //check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - char query[128]; - mir_snprintf(query, "PASS %s\r\n", pw); - NetClient->Send(query); - - char *Result = RecvRest(NetClient->Recv(), POP3_SEARCHACK); - if (AckFlag == POP3_FERR) - throw POP3Error = (uint32_t)EPOP3_BADPASS; - return Result; -} - -//Performs "APOP" pop query and returns server response -//sets AckFlag -char *CPop3Client::APOP(char *name, char *pw, char *timestamp) -{ - if (NetClient->Stopped) // check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - char query[512]; - char *Result; - unsigned char digest[16]; - - if (timestamp == nullptr) - throw POP3Error = (uint32_t)EPOP3_APOP; - mir_md5_state_s ctx; - mir_md5_init(&ctx); - mir_md5_append(&ctx, (const unsigned char *)timestamp, (unsigned int)mir_strlen(timestamp)); - mir_md5_append(&ctx, (const unsigned char *)pw, (unsigned int)mir_strlen(pw)); - mir_md5_finish(&ctx, digest); - - char hexdigest[40]; - mir_snprintf(query, "APOP %s %s\r\n", name, bin2hex(digest, sizeof(digest), hexdigest)); - - NetClient->Send(query); - Result = RecvRest(NetClient->Recv(), POP3_SEARCHACK); - if (AckFlag == POP3_FERR) - throw POP3Error = (uint32_t)EPOP3_BADUSER; - return Result; -} - -//Performs "QUIT" pop query and returns server response -//sets AckFlag -char *CPop3Client::Quit() -{ - char query[] = "QUIT\r\n"; - - NetClient->Send(query); - return RecvRest(NetClient->Recv(), POP3_SEARCHACK); -} - -//Performs "STAT" pop query and returns server response -//sets AckFlag -char *CPop3Client::Stat() -{ - if (NetClient->Stopped) //check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - char query[] = "STAT\r\n"; - NetClient->Send(query); - return RecvRest(NetClient->Recv(), POP3_SEARCHACK); -} - -//Performs "LIST" pop query and returns server response -//sets AckFlag -char *CPop3Client::List() -{ - if (NetClient->Stopped) // check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - char query[] = "LIST\r\n"; - - NetClient->Send(query); - return RecvRest(NetClient->Recv(), POP3_SEARCHDOT); -} - -//Performs "TOP" pop query and returns server response -//sets AckFlag -char *CPop3Client::Top(int nr, int lines) -{ - if (NetClient->Stopped) // check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - char query[128]; - - mir_snprintf(query, "TOP %d %d\r\n", nr, lines); - NetClient->Send(query); - return RecvRest(NetClient->Recv(), POP3_SEARCHDOT); -} - -//Performs "UIDL" pop query and returns server response -//sets AckFlag -char *CPop3Client::Uidl(int nr) -{ - if (NetClient->Stopped) // check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - char query[128]; - if (nr) { - mir_snprintf(query, "UIDL %d\r\n", nr); - NetClient->Send(query); - return RecvRest(NetClient->Recv(), POP3_SEARCHACK); - } - mir_snprintf(query, "UIDL\r\n"); - NetClient->Send(query); - return RecvRest(NetClient->Recv(), POP3_SEARCHDOT); -} - -//Performs "DELE" pop query and returns server response -//sets AckFlag -char *CPop3Client::Dele(int nr) -{ - if (NetClient->Stopped) // check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - char query[128]; - - mir_snprintf(query, "DELE %d\r\n", nr); - NetClient->Send(query); - return RecvRest(NetClient->Recv(), POP3_SEARCHACK); -} - -//Performs "RETR" pop query and returns server response -//sets AckFlag -char *CPop3Client::Retr(int nr) -{ - if (NetClient->Stopped) // check if we can work with this POP3 client session - throw POP3Error = (uint32_t)EPOP3_STOPPED; - - char query[128]; - mir_snprintf(query, "RETR %d\r\n", nr); - NetClient->Send(query); - - RecvRest(NetClient->Recv(), POP3_SEARCHACK); - return NetClient->Recv(); -} +/* + * This code implements basics of POP3 protocol + * + * (c) majvan 2002-2004 + */ +/* This was made from the libspopc project + * copyright c 2002 Benoit Rouits + * released under the terms of GNU LGPL + * (GNU Lesser General Public Licence). + * libspopc offers simple API for a pop3 client (MTA). + * See RFC 1725 for pop3 specifications. + * more information on http://brouits.free.fr/libspopc/ + */ +/* + * This file is not original and is changed by majvan + * for mail checker purpose. Please see original web page to + * obtain the original. I rewrote it in C++, but good ideas were, + * I think, unchanged. + * + * Note that this file was not designed to work under Unix. It's + * needed to add Unix-specific features. I was interested only in + * Windows for my project. majvan + * + */ + +#include "../../stdafx.h" + + //-------------------------------------------------------------------------------------------------- + + //Connects to the server through the netlib + //if not success, exception is throwed + //returns welcome string returned by server + //sets AckFlag +char *CPop3Client::Connect(const char *servername, const int port, BOOL UseSSL, BOOL NoTLS) +{ + if (Stopped) // check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + delete NetClient; + SSL = UseSSL; + NetClient = new CNLClient; + + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "Connect:servername: %s port:%d\n", servername, port); + #endif + POP3Error = EPOP3_CONNECT; + NetClient->Connect(servername, port); + POP3Error = 0; + + if (SSL) { + try { + NetClient->SSLify(); + } + catch (...) { + NetClient->Disconnect(); + return nullptr; + } + } + + char *temp = RecvRest(NetClient->Recv(), POP3_SEARCHACK); + extern BOOL SSLLoaded; + if (!NoTLS & !(SSL)) { + if (NetClient->Stopped) //check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + NetClient->Send("STLS\r\n"); + free(temp); + temp = RecvRest(NetClient->Recv(), POP3_SEARCHACK); + if (AckFlag == POP3_FOK) { // Ok, we are going to tls + try { + NetClient->SSLify(); + } + catch (...) { + NetClient->Disconnect(); + return nullptr; + } + } + } + return temp; +} + +//Receives data to the end of packet +// prev- previous data read (appends to this string next received data) +// mode- mode of packet. +// Packet can end with ack state (+OK or -ERR): set mode to POP3_SEARCHACK +// If packet ends with '.' (end of string), set mode to POP3_SEARCHDOT +// size- received data are stored to memory, but if length of data is more than allocated memory, function allocates +// new memory. New allocated memory has allocated size more bytes +// This value can be selectable: if you think it is better to reallocate by 1kB size, select size to 1024, +// default is 128. You do not need to use this parameter + +char *CPop3Client::RecvRest(char *prev, int mode, int size) +{ + int SizeRead = 0; + int SizeLeft = size - NetClient->Rcv; + int RcvAll = NetClient->Rcv; + char *LastString, *PrevString = prev; + + AckFlag = 0; + + while (((mode == POP3_SEARCHDOT) && !SearchFromEnd(PrevString + RcvAll - 1, RcvAll - 3, POP3_SEARCHDOT) && !SearchFromStart(PrevString, 2, POP3_SEARCHERR)) || //we are looking for dot or -err phrase + ((mode == POP3_SEARCHACK) && (!SearchFromStart(PrevString, RcvAll - 3, mode) || !((RcvAll > 3) && SearchFromEnd(PrevString + RcvAll - 1, 1, POP3_SEARCHNL))))) //we are looking for +ok or -err phrase ended with newline + { //if not found + if (NetClient->Stopped) //check if we can work with this POP3 client session + { + if (PrevString != nullptr) + free(PrevString); + throw POP3Error = (uint32_t)EPOP3_STOPPED; + } + if (SizeLeft == 0) //if block is full + { + SizeRead += size; + SizeLeft = size; + LastString = NetClient->Recv(nullptr, SizeLeft); + PrevString = (char *)realloc(PrevString, sizeof(char) * (SizeRead + size)); + if (PrevString == nullptr) + throw POP3Error = (uint32_t)EPOP3_RESTALLOC; + memcpy(PrevString + SizeRead, LastString, size); + free(LastString); + } + else + NetClient->Recv(PrevString + RcvAll, SizeLeft); //to Rcv stores received bytes + SizeLeft = SizeLeft - NetClient->Rcv; + RcvAll += NetClient->Rcv; + } + NetClient->Rcv = RcvAll; //at the end, store the number of all bytes, no the number of last received bytes + return PrevString; +} + +// CPop3Client::SearchFromEnd +// returns 1 if substring DOTLINE or ENDLINE found from end in bs bytes +// if you need to add condition for mode, insert it into switch statement +BOOL CPop3Client::SearchFromEnd(char *end, int bs, int mode) +{ + while (bs >= 0) { + switch (mode) { + case POP3_SEARCHDOT: + if (DOTLINE(end)) + return 1; + break; + + case POP3_SEARCHNL: + if (ENDLINE(end)) + return 1; + break; + } + end--; + bs--; + } + return 0; +} + +//Finds for a occurence of some pattern in string +// returns 1 if substring OKLINE, ERRLINE or any of them found from start in bs bytes +//call only this function to retrieve ack status (+OK or -ERR), because it sets flag AckFlag +//if you need to add condition for mode, insert it into switch statement +BOOL CPop3Client::SearchFromStart(char *start, int bs, int mode) +{ + while (bs >= 0) { + switch (mode) { + case POP3_SEARCHOK: + if (OKLINE(start)) { + AckFlag = POP3_FOK; + return 1; + } + break; + case POP3_SEARCHERR: + if (ERRLINE(start)) { + AckFlag = POP3_FERR; + return 1; + } + break; + case POP3_SEARCHACK: + if (ACKLINE(start)) { + OKLINE(start) ? AckFlag = POP3_FOK : AckFlag = POP3_FERR; + return 1; + } + break; + } + start++; + bs--; + } + return 0; +} + +//Performs "USER" pop query and returns server response +//sets AckFlag +char *CPop3Client::User(char *name) +{ + if (NetClient->Stopped) // check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + char query[128]; + char *Result; + + mir_snprintf(query, "USER %s\r\n", name); + NetClient->Send(query); + Result = RecvRest(NetClient->Recv(), POP3_SEARCHACK); + if (AckFlag == POP3_FERR) + throw POP3Error = (uint32_t)EPOP3_BADUSER; + POP3Error = 0; + return Result; +} + +//Performs "PASS" pop query and returns server response +//sets AckFlag +char *CPop3Client::Pass(char *pw) +{ + if (NetClient->Stopped) //check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + char query[128]; + mir_snprintf(query, "PASS %s\r\n", pw); + NetClient->Send(query); + + char *Result = RecvRest(NetClient->Recv(), POP3_SEARCHACK); + if (AckFlag == POP3_FERR) + throw POP3Error = (uint32_t)EPOP3_BADPASS; + return Result; +} + +//Performs "APOP" pop query and returns server response +//sets AckFlag +char *CPop3Client::APOP(char *name, char *pw, char *timestamp) +{ + if (NetClient->Stopped) // check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + char query[512]; + char *Result; + unsigned char digest[16]; + + if (timestamp == nullptr) + throw POP3Error = (uint32_t)EPOP3_APOP; + mir_md5_state_s ctx; + mir_md5_init(&ctx); + mir_md5_append(&ctx, (const unsigned char *)timestamp, (unsigned int)mir_strlen(timestamp)); + mir_md5_append(&ctx, (const unsigned char *)pw, (unsigned int)mir_strlen(pw)); + mir_md5_finish(&ctx, digest); + + char hexdigest[40]; + mir_snprintf(query, "APOP %s %s\r\n", name, bin2hex(digest, sizeof(digest), hexdigest)); + + NetClient->Send(query); + Result = RecvRest(NetClient->Recv(), POP3_SEARCHACK); + if (AckFlag == POP3_FERR) + throw POP3Error = (uint32_t)EPOP3_BADUSER; + return Result; +} + +//Performs "QUIT" pop query and returns server response +//sets AckFlag +char *CPop3Client::Quit() +{ + char query[] = "QUIT\r\n"; + + NetClient->Send(query); + return RecvRest(NetClient->Recv(), POP3_SEARCHACK); +} + +//Performs "STAT" pop query and returns server response +//sets AckFlag +char *CPop3Client::Stat() +{ + if (NetClient->Stopped) //check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + char query[] = "STAT\r\n"; + NetClient->Send(query); + return RecvRest(NetClient->Recv(), POP3_SEARCHACK); +} + +//Performs "LIST" pop query and returns server response +//sets AckFlag +char *CPop3Client::List() +{ + if (NetClient->Stopped) // check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + char query[] = "LIST\r\n"; + + NetClient->Send(query); + return RecvRest(NetClient->Recv(), POP3_SEARCHDOT); +} + +//Performs "TOP" pop query and returns server response +//sets AckFlag +char *CPop3Client::Top(int nr, int lines) +{ + if (NetClient->Stopped) // check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + char query[128]; + + mir_snprintf(query, "TOP %d %d\r\n", nr, lines); + NetClient->Send(query); + return RecvRest(NetClient->Recv(), POP3_SEARCHDOT); +} + +//Performs "UIDL" pop query and returns server response +//sets AckFlag +char *CPop3Client::Uidl(int nr) +{ + if (NetClient->Stopped) // check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + char query[128]; + if (nr) { + mir_snprintf(query, "UIDL %d\r\n", nr); + NetClient->Send(query); + return RecvRest(NetClient->Recv(), POP3_SEARCHACK); + } + mir_snprintf(query, "UIDL\r\n"); + NetClient->Send(query); + return RecvRest(NetClient->Recv(), POP3_SEARCHDOT); +} + +//Performs "DELE" pop query and returns server response +//sets AckFlag +char *CPop3Client::Dele(int nr) +{ + if (NetClient->Stopped) // check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + char query[128]; + + mir_snprintf(query, "DELE %d\r\n", nr); + NetClient->Send(query); + return RecvRest(NetClient->Recv(), POP3_SEARCHACK); +} + +//Performs "RETR" pop query and returns server response +//sets AckFlag +char *CPop3Client::Retr(int nr) +{ + if (NetClient->Stopped) // check if we can work with this POP3 client session + throw POP3Error = (uint32_t)EPOP3_STOPPED; + + char query[128]; + mir_snprintf(query, "RETR %d\r\n", nr); + NetClient->Send(query); + + RecvRest(NetClient->Recv(), POP3_SEARCHACK); + return NetClient->Recv(); +} diff --git a/protocols/YAMN/src/proto/pop3/pop3comm.cpp b/protocols/YAMN/src/proto/pop3/pop3comm.cpp index 946b93ea54..fc0f5819bb 100644 --- a/protocols/YAMN/src/proto/pop3/pop3comm.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3comm.cpp @@ -1,1329 +1,1329 @@ -/* - * This code implements POP3 server checking for new mail and so on. - * There's function SynchroPOP3 in this file- for checking and synchronising POP3 account - * and DeleteMailsPOP3- for deleting mails from POP3 server - * - * Note this file acts as main file for internal plugin. - * - * (c) majvan 2002-2004 - * 18/08 - */ - - -#include "../../stdafx.h" - -#define ERRORSTR_MAXLEN 1024 //in wide-chars - - //-------------------------------------------------------------------------------------------------- - -HANDLE hNetLib = nullptr; -PSCOUNTER CPOP3Account::AccountWriterSO = nullptr; - -//Creates new CPOP3Account structure -CAccount *WINAPI CreatePOP3Account(HYAMNPROTOPLUGIN Plugin, DWORD CAccountVersion); - -//Deletes CPOP3Account structure -void WINAPI DeletePOP3Account(CAccount *Which); - -//Sets stop flag to account -void WINAPI StopPOP3Account(CAccount *Which); - -//Function registers standard functions for YAMN -int RegisterPOP3Plugin(WPARAM, LPARAM); - -//Unloads all variables created on heap (delete[]) -DWORD WINAPI UnLoadPOP3(void *); - -//Function writes POP3 accounts using YAMN exported functions -DWORD WINAPI WritePOP3Accounts(); - -//Function stores plugin's data for account to file -DWORD WINAPI WritePOP3Options(HANDLE, CAccount *); - -//Function reads plugin's data for account from file -DWORD WINAPI ReadPOP3Options(CAccount *, char **, char *); - -//Creates new mail for an account -HYAMNMAIL WINAPI CreatePOP3Mail(CAccount *Account, DWORD CMimeMailVersion); - -//Function does all needed work when connection failed or any error occured -//Creates structure containing error code, closes internet session, runs "bad connect" function -static void PostErrorProc(HPOP3ACCOUNT ActualAccount, void *ParamToBadConnect, uint32_t POP3PluginParam, BOOL UseSSL); - -//Checks POP3 account and stores all info to account. It deletes old mails=> synchro -// WhichTemp- pointer to strucure containing needed information -DWORD WINAPI SynchroPOP3(struct CheckParam *WhichTemp); - -//Deletes mails from POP3 server -// WhichTemp- structure containing needed information (queued messages to delete) -//Function deletes from memory queue in WhichTemp structure -void __cdecl DeleteMailsPOP3(void *param); - -//Function makes readable message about error. It sends it back to YAMN, so YAMN then -//can show it to the message window -wchar_t *WINAPI GetErrorString(DWORD Code); - -//Function deletes string allocated in GetErrorString -void WINAPI DeleteErrorString(LPVOID String); - -//Extracts info from result of POP3's STAT command -// stream- source string -// len- length of source string -// mboxsize- adreess to integer, that receives size of mailbox -// mails- adreess to integer, that receives number of mails -void ExtractStat(char *stream, int *mboxsize, int *mails); - -//Extracts mail ID on mailbox -// stream- source string -// len- length of source string -// queue- address of first message, where first ID will be stored -void ExtractUIDL(char *stream, int len, HYAMNMAIL queue); - -//Extracts mail size on mailbox -// stream- source string -// len- length of source string -// queue- address of first message, where size of message #1 will be stored -void ExtractList(char *stream, int len, HYAMNMAIL queue); - -void ExtractMail(char *stream, int len, HYAMNMAIL queue); - -YAMNExportedFcns *pYAMNFcn = nullptr; -MailExportedFcns *pYAMNMailFcn = nullptr; - -YAMN_PROTOIMPORTFCN POP3ProtocolFunctions = -{ - CreatePOP3Account, - DeletePOP3Account, - StopPOP3Account, - WritePOP3Options, - ReadPOP3Options, - SynchroPOP3, - SynchroPOP3, - SynchroPOP3, - DeleteMailsPOP3, - GetErrorString, - nullptr, - DeleteErrorString, - WritePOP3Accounts, - nullptr, - UnLoadPOP3, -}; - -YAMN_MAILIMPORTFCN POP3MailFunctions = -{ - CreatePOP3Mail, - nullptr, - nullptr, - nullptr, -}; - -PYAMN_VARIABLES pYAMNVar = nullptr; -HYAMNPROTOPLUGIN POP3Plugin = nullptr; - -YAMN_PROTOREGISTRATION POP3ProtocolRegistration = -{ - "POP3 protocol (internal)", - __VERSION_STRING_DOTS, - __COPYRIGHT, - __DESCRIPTION, - __AUTHORWEB, -}; - -static wchar_t *FileName = nullptr; - -HANDLE RegisterNLClient(char *name); - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -CPOP3Account::CPOP3Account() -{ - //NOTE! This constructor constructs CAccount structure. If your plugin is not internal, - //you will need these constructors. All you need is in Account.cpp. Just copy to your source code - //constructor and destructor of CAccount. - UseInternetFree = CreateEvent(nullptr, FALSE, TRUE, nullptr); - InternetQueries = new SCOUNTER; - AbilityFlags = YAMN_ACC_BROWSE | YAMN_ACC_POPUP; - - SetAccountStatus((CAccount *)this, TranslateT("Disconnected")); -} - -CPOP3Account::~CPOP3Account() -{ - CloseHandle(UseInternetFree); - if (InternetQueries != nullptr) - delete InternetQueries; -} - -CAccount *WINAPI CreatePOP3Account(HYAMNPROTOPLUGIN, DWORD) -{ - //First, we should check whether CAccountVersion matches. - //But this is internal plugin, so YAMN's CAccount structure and our CAccount structure are - //the same, so we do not need to test version. Otherwise, if CAccount version does not match - //in your plugin, you should return NULL, like this: - // if (CAccountVersion != YAMN_ACCOUNTVERSION) return NULL; - - //Now it is needed to construct our POP3 account and return its handle - return (CAccount *)new struct CPOP3Account(); -} - -void WINAPI DeletePOP3Account(CAccount *Which) -{ - delete (HPOP3ACCOUNT)Which; -} - -void WINAPI StopPOP3Account(CAccount *Which) -{ - ((HPOP3ACCOUNT)Which)->Client.Stopped = TRUE; - if (((HPOP3ACCOUNT)Which)->Client.NetClient != nullptr) //we should inform also network client. Usefull only when network client implements this feature - ((HPOP3ACCOUNT)Which)->Client.NetClient->Stopped = TRUE; -} - -//This function is like main function for POP3 internal protocol -int RegisterPOP3Plugin(WPARAM, LPARAM) -{ - // Get YAMN variables we can use - if (nullptr == (pYAMNVar = (PYAMN_VARIABLES)CallService(MS_YAMN_GETVARIABLES, YAMN_VARIABLESVERSION, 0))) - return 0; - - // We have to get pointers to YAMN exported functions: allocate structure and fill it - if (nullptr == (pYAMNFcn = new struct YAMNExportedFcns)) { -LBL_Error: - UnLoadPOP3(nullptr); - return 0; - } - - // Register new pop3 user in netlib - if (nullptr == (hNetLib = RegisterNLClient("YAMN (POP3)"))) - goto LBL_Error; - - pYAMNFcn->SetProtocolPluginFcnImportFcn = (YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SETPROTOCOLPLUGINFCNIMPORTID, 0); - pYAMNFcn->WaitToWriteFcn = (YAMN_WAITTOWRITEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_WAITTOWRITEID, 0); - pYAMNFcn->WriteDoneFcn = (YAMN_WRITEDONEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_WRITEDONEID, 0); - pYAMNFcn->WaitToReadFcn = (YAMN_WAITTOREADFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_WAITTOREADID, 0); - pYAMNFcn->ReadDoneFcn = (YAMN_READDONEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_READDONEID, 0); - pYAMNFcn->SCGetNumberFcn = (YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SCGETNUMBERID, 0); - pYAMNFcn->SCIncFcn = (YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SCINCID, 0); - pYAMNFcn->SCDecFcn = (YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SCDECID, 0); - pYAMNFcn->SetStatusFcn = (YAMN_SETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SETSTATUSID, 0); - pYAMNFcn->GetStatusFcn = (YAMN_GETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_GETSTATUSID, 0); - - if (nullptr == (pYAMNMailFcn = new struct MailExportedFcns)) - goto LBL_Error; - - pYAMNMailFcn->SynchroMessagesFcn = (YAMN_SYNCHROMIMEMSGSFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SYNCHROMIMEMSGSID, 0); - pYAMNMailFcn->TranslateHeaderFcn = (YAMN_TRANSLATEHEADERFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_TRANSLATEHEADERID, 0); - pYAMNMailFcn->AppendQueueFcn = (YAMN_APPENDQUEUEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_APPENDQUEUEID, 0); - pYAMNMailFcn->DeleteMessagesToEndFcn = (YAMN_DELETEMIMEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_DELETEMIMEQUEUEID, 0); - pYAMNMailFcn->DeleteMessageFromQueueFcn = (YAMN_DELETEMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_DELETEMIMEMESSAGEID, 0); - pYAMNMailFcn->FindMessageByIDFcn = (YAMN_FINDMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_FINDMIMEMESSAGEID, 0); - pYAMNMailFcn->CreateNewDeleteQueueFcn = (YAMN_CREATENEWDELETEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_CREATENEWDELETEQUEUEID, 0); - - //set static variable - if (CPOP3Account::AccountWriterSO == nullptr) - if (nullptr == (CPOP3Account::AccountWriterSO = new SCOUNTER)) - goto LBL_Error; - - //First, we register this plugin - //it is quite impossible this function returns zero (failure) as YAMN and internal plugin structre versions are the same - POP3ProtocolRegistration.Name = Translate("POP3 protocol (internal)"); - POP3ProtocolRegistration.Description = Translate(__DESCRIPTION); - if (nullptr == (POP3Plugin = (HYAMNPROTOPLUGIN)CallService(MS_YAMN_REGISTERPROTOPLUGIN, (WPARAM)&POP3ProtocolRegistration, (LPARAM)YAMN_PROTOREGISTRATIONVERSION))) - return 0; - - //Next we set our imported functions for YAMN - if (!SetProtocolPluginFcnImport(POP3Plugin, &POP3ProtocolFunctions, YAMN_PROTOIMPORTFCNVERSION, &POP3MailFunctions, YAMN_MAILIMPORTFCNVERSION)) - return 0; - - //Then, we read all mails for accounts. - //You must first register account, before using this function as YAMN must use CreatePOP3Account function to add new accounts - //But if CreatePOP3Account is not implemented (equals to NULL), YAMN creates account as YAMN's standard CAccount * - if (FileName) CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); //shoud not happen (only for secure) - FileName = (wchar_t *)CallService(MS_YAMN_GETFILENAME, (WPARAM)L"pop3", 0); - - switch (CallService(MS_YAMN_READACCOUNTS, (WPARAM)POP3Plugin, (LPARAM)FileName)) { - case EACC_FILEVERSION: - MessageBox(nullptr, TranslateT("Found new version of account book, not compatible with this version of YAMN."), TranslateT("YAMN (internal POP3) read error"), MB_OK); - CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); - FileName = nullptr; - return 0; - case EACC_FILECOMPATIBILITY: - MessageBox(nullptr, TranslateT("Error reading account file. Account file corrupted."), TranslateT("YAMN (internal POP3) read error"), MB_OK); - CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); - FileName = nullptr; - return 0; - case EACC_ALLOC: - MessageBox(nullptr, TranslateT("Memory allocation error while data reading"), TranslateT("YAMN (internal POP3) read error"), MB_OK); - CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); - FileName = nullptr; - return 0; - case EACC_SYSTEM: - if (ERROR_FILE_NOT_FOUND != GetLastError()) { - wchar_t temp[1024] = {0}; - mir_snwprintf(temp, L"%s\n%s", TranslateT("Reading file error. File already in use?"), FileName); - MessageBox(nullptr, temp, TranslateT("YAMN (internal POP3) read error"), MB_OK); - CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); - FileName = nullptr; - return 0; - } - break; - } - - for (CAccount *Finder = POP3Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) { - Finder->hContact = NULL; - for (auto &hContact : Contacts(YAMN_DBMODULE)) { - DBVARIANT dbv; - if (!g_plugin.getString(hContact, "Id", &dbv)) { - if (mir_strcmp(dbv.pszVal, Finder->Name) == 0) { - Finder->hContact = hContact; - g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_ONLINE); - db_set_s(Finder->hContact, "CList", "StatusMsg", Translate("No new mail message")); - if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) - Contact::Hide(Finder->hContact, false); - - if (!(Finder->Flags & YAMN_ACC_ENA) || !(Finder->NewMailN.Flags & YAMN_ACC_CONT)) - Contact::Hide(Finder->hContact); - } - db_free(&dbv); - } - } - - if (!Finder->hContact && (Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) { - // No account contact found, have to create one - Finder->hContact = db_add_contact(); - Proto_AddToContact(Finder->hContact, YAMN_DBMODULE); - g_plugin.setString(Finder->hContact, "Id", Finder->Name); - g_plugin.setString(Finder->hContact, "Nick", Finder->Name); - g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_OFFLINE); - } - } - - return 0; -} - -DWORD WINAPI UnLoadPOP3(void *) -{ - //pYAMNVar is only a pointr, no need delete or free - if (hNetLib) { - Netlib_CloseHandle(hNetLib); hNetLib = nullptr; - } - if (CPOP3Account::AccountWriterSO) { - delete CPOP3Account::AccountWriterSO; CPOP3Account::AccountWriterSO = nullptr; - } - if (pYAMNMailFcn) { - delete pYAMNMailFcn; pYAMNMailFcn = nullptr; - } - if (pYAMNFcn) { - delete pYAMNFcn; pYAMNFcn = nullptr; - } - if (FileName) { - CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); FileName = nullptr; - } - - return 1; -} - -DWORD WINAPI WritePOP3Accounts() -{ - uint32_t ReturnValue = CallService(MS_YAMN_WRITEACCOUNTS, (WPARAM)POP3Plugin, (LPARAM)FileName); - if (ReturnValue == EACC_SYSTEM) { - wchar_t temp[1024] = {0}; - mir_snwprintf(temp, L"%s\n%s", TranslateT("Error while copying data to disk occurred. Is file in use?"), FileName); - MessageBox(nullptr, temp, TranslateT("POP3 plugin - write file error"), MB_OK); - } - - return ReturnValue; -} - -DWORD WINAPI WritePOP3Options(HANDLE File, CAccount *Which) -{ - DWORD WrittenBytes; - uint32_t Ver = POP3_FILEVERSION; - - if ((!WriteFile(File, (char *)&Ver, sizeof(uint32_t), &WrittenBytes, nullptr)) || - (!WriteFile(File, (char *)&((HPOP3ACCOUNT)Which)->CP, sizeof(uint16_t), &WrittenBytes, nullptr))) - return EACC_SYSTEM; - return 0; -} - -DWORD WINAPI ReadPOP3Options(CAccount *Which, char **Parser, char *End) -{ - uint32_t Ver; - #ifdef DEBUG_FILEREAD - wchar_t Debug[256]; - #endif - Ver = *(uint32_t *)(*Parser); - (*Parser) += sizeof(uint32_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - if (Ver != POP3_FILEVERSION) - return EACC_FILECOMPATIBILITY; - - ((HPOP3ACCOUNT)Which)->CP = *(uint16_t *)(*Parser); - (*Parser) += sizeof(uint16_t); - if (*Parser >= End) - return EACC_FILECOMPATIBILITY; - #ifdef DEBUG_FILEREAD - mir_snwprintf(Debug, L"CodePage: %d, remaining %d chars", ((HPOP3ACCOUNT)Which)->CP, End - *Parser); - MessageBox(NULL, Debug, L"debug", MB_OK); - #endif - return 0; -} - -HYAMNMAIL WINAPI CreatePOP3Mail(CAccount *Account, DWORD) -{ - HYAMNMAIL NewMail; - //First, we should check whether MAILDATA matches. - //But this is internal plugin, so YAMN's MAILDATA structure and our MAILDATA structure are - //the same, so we do not need to test version. Otherwise, if MAILDATA version does not match - //in your plugin, you should return NULL, like this: - // if (MailDataVersion != YAMN_MAILDATAVERSION) return NULL; - - //Now it is needed to construct our POP3 account and return its handle - if (nullptr == (NewMail = new YAMNMAIL)) - return nullptr; - - if (nullptr == (NewMail->MailData = new CMailData())) { - delete NewMail; - return nullptr; - } - NewMail->MailData->CP = ((HPOP3ACCOUNT)Account)->CP; - return (HYAMNMAIL)NewMail; -} - -static void SetContactStatus(CAccount *account, int status) -{ - if ((account->hContact) && (account->NewMailN.Flags & YAMN_ACC_CONT)) - g_plugin.setWord(account->hContact, "Status", status); -} - -static void PostErrorProc(HPOP3ACCOUNT ActualAccount, void *ParamToBadConnection, uint32_t POP3PluginParam, BOOL UseSSL) -{ - char *DataRX; - - //We create new structure, that we pass to bad connection dialog procedure. This procedure next calls YAMN imported fuction - //from POP3 protocol to determine the description of error. We can describe error from our error code structure, because later, - //when YAMN calls our function, it passes us our error code. This is pointer to structure for POP3 protocol in fact. - PPOP3_ERRORCODE ErrorCode; - - //We store status before we do Quit(), because quit can destroy our errorcode status - if (nullptr != (ErrorCode = new POP3_ERRORCODE)) { - ErrorCode->SSL = UseSSL; - ErrorCode->AppError = ActualAccount->SystemError; - ErrorCode->POP3Error = ActualAccount->Client.POP3Error; - ErrorCode->NetError = ActualAccount->Client.NetClient->NetworkError; - ErrorCode->SystemError = ActualAccount->Client.NetClient->SystemError; - } - - if (POP3PluginParam == (uint32_t)NULL) //if it was normal YAMN call (force check or so on) - { - try { - DataRX = ActualAccount->Client.Quit(); - if (DataRX != nullptr) - free(DataRX); - } - catch (...) { - } - //We always close connection if error occured - try { - ActualAccount->Client.NetClient->Disconnect(); - } - catch (...) { - } - - SetAccountStatus(ActualAccount, TranslateT("Disconnected")); - - //If we cannot allocate memory, do nothing - if (ErrorCode == nullptr) { - SetEvent(ActualAccount->UseInternetFree); - return; - } - } - else // else it was called from POP3 plugin, probably error when deleting old mail (POP3 synchro calls POP3 delete) - if (ErrorCode == nullptr) - return; - - if ((ActualAccount->BadConnectN.Flags & YAMN_ACC_MSG) || (ActualAccount->BadConnectN.Flags & YAMN_ACC_ICO) || (ActualAccount->BadConnectN.Flags & YAMN_ACC_POP)) - RunBadConnection(ActualAccount, (UINT_PTR)ErrorCode, ParamToBadConnection); - - if (POP3PluginParam == (uint32_t)NULL) //if it was normal YAMN call - SetEvent(ActualAccount->UseInternetFree); -} - -//Checks POP3 account and synchronizes it -DWORD WINAPI SynchroPOP3(struct CheckParam *WhichTemp) -{ - HPOP3ACCOUNT ActualAccount; - CPop3Client *MyClient; - HYAMNMAIL NewMails = nullptr, MsgQueuePtr = nullptr; - char *DataRX = nullptr, *Temp; - int mboxsize, msgs, i; - SYSTEMTIME now; - LPVOID YAMNParam; - uint32_t CheckFlags; - BOOL UsingInternet = FALSE; - struct - { - char *ServerName; - uint32_t ServerPort; - char *ServerLogin; - char *ServerPasswd; - uint32_t Flags; - uint32_t NFlags; - uint32_t NNFlags; - } ActualCopied; - - //First, we should compare our version of CheckParam structure, but here it is not needed, because YAMN and internal plugin - //have the same version. But your plugin should do that in this way: - // if (((struct CheckParam *)WhichTemp)->Ver != YAMN_CHECKVERSION) - // { - // SetEvent(((struct CheckParam *)WhichTemp)->ThreadRunningEV); //don't forget to unblock YAMN - // return (uint32_t)-1; //ok, but we should return value. - // //When our plugin returns e.g. 0xFFFFFFFF (=-1, this is only our plugin value, YAMN does nothing with return value, - // //but only tests if it is nonzero. If yes, it calls GetErrorStringFcn. We know problem occured in YAMN incompatibility - // //and then we can in our GetErrorStringFcn e.g. return string "Uncompatible version of YAMN". - // } - - ActualAccount = (HPOP3ACCOUNT)WhichTemp->AccountParam; //copy address of structure from calling thread to stack of this thread - YAMNParam = WhichTemp->BrowserParam; - CheckFlags = WhichTemp->Flags; - - SCInc(ActualAccount->UsingThreads); - //Unblock YAMN, signal that we have copied all parameters from YAMN thread stack - if (INVALID_HANDLE_VALUE != WhichTemp->ThreadRunningEV) - SetEvent(WhichTemp->ThreadRunningEV); - - if (WAIT_OBJECT_0 != WaitToRead(ActualAccount)) { - SCDec(ActualAccount->UsingThreads); - return 0; - } - - MyClient = &ActualAccount->Client; - //Now, copy all needed information about account to local variables, so ActualAccount is not blocked in read mode during all connection process, which can last for several minutes. - ActualCopied.ServerName = _strdup(ActualAccount->Server->Name); - ActualCopied.ServerPort = ActualAccount->Server->Port; - ActualCopied.Flags = ActualAccount->Flags; - ActualCopied.ServerLogin = _strdup(ActualAccount->Server->Login); - ActualCopied.ServerPasswd = _strdup(ActualAccount->Server->Passwd); - ActualCopied.NFlags = ActualAccount->NewMailN.Flags; - ActualCopied.NNFlags = ActualAccount->NoNewMailN.Flags; - - ReadDone(ActualAccount); - SCInc(ActualAccount->InternetQueries); //increment counter, that there is one more thread waiting for connection - - WaitForSingleObject(ActualAccount->UseInternetFree, INFINITE); //wait until we can use connection - SCDec(ActualAccount->InternetQueries); - - //OK, we enter the "use internet" section. But after we start communication, we can test if we did not enter the "use internet" section only for the reason, - //that previous thread release the internet section because this account has stop signal (we stop account and there are 2 threads: one communicating, - //the second one waiting for network access- the first one ends because we want to stop account, this one is released, but should be stopped as well). - if (!ActualAccount->AbleToWork) { - SetEvent(ActualAccount->UseInternetFree); - SCDec(ActualAccount->UsingThreads); - return 0; - } - UsingInternet = TRUE; - - GetLocalTime(&now); - ActualAccount->SystemError = 0; //now we can use internet for this socket. First, clear errorcode. - try { - SetContactStatus(ActualAccount, ID_STATUS_OCCUPIED); - - // if we are already connected, we have open session (another thread left us open session), so we don't need to login - // note that connected state without logging cannot occur, because if we close session, we always close socket too (we must close socket is the right word :)) - if ((MyClient->NetClient == nullptr) || !MyClient->NetClient->Connected()) { - SetAccountStatus(ActualAccount, TranslateT("Connecting to server")); - - DataRX = MyClient->Connect(ActualCopied.ServerName, ActualCopied.ServerPort, ActualCopied.Flags & YAMN_ACC_SSL23, ActualCopied.Flags & YAMN_ACC_NOTLS); - char *timestamp = nullptr; - - if (DataRX != nullptr) { - if (ActualCopied.Flags & YAMN_ACC_APOP) { - char *lpos = strchr(DataRX, '<'); - char *rpos = strchr(DataRX, '>'); - if (lpos && rpos && rpos > lpos) { - int sz = (int)(rpos - lpos + 2); - timestamp = new char[sz]; - memcpy(timestamp, lpos, sz - 1); - timestamp[sz - 1] = '\0'; - } - } - free(DataRX); - DataRX = nullptr; - } - - SetAccountStatus(ActualAccount, TranslateT("Entering POP3 account")); - - if (ActualCopied.Flags & YAMN_ACC_APOP) { - DataRX = MyClient->APOP(ActualCopied.ServerLogin, ActualCopied.ServerPasswd, timestamp); - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - delete[] timestamp; - } - else { - DataRX = MyClient->User(ActualCopied.ServerLogin); - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - DataRX = MyClient->Pass(ActualCopied.ServerPasswd); - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - } - } - SetAccountStatus(ActualAccount, TranslateT("Searching for new mail message")); - - DataRX = MyClient->Stat(); - - ExtractStat(DataRX, &mboxsize, &msgs); - - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - for (i = 0; i < msgs; i++) { - if (!i) - MsgQueuePtr = NewMails = (HYAMNMAIL)CallService(MS_YAMN_CREATEACCOUNTMAIL, (WPARAM)ActualAccount, (LPARAM)YAMN_MAILVERSION); - else { - MsgQueuePtr->Next = (HYAMNMAIL)CallService(MS_YAMN_CREATEACCOUNTMAIL, (WPARAM)ActualAccount, (LPARAM)YAMN_MAILVERSION); - MsgQueuePtr = MsgQueuePtr->Next; - } - if (MsgQueuePtr == nullptr) { - ActualAccount->SystemError = EPOP3_QUEUEALLOC; - throw (uint32_t)ActualAccount->SystemError; - } - } - - if (msgs) { - DataRX = MyClient->List(); - ExtractList(DataRX, MyClient->NetClient->Rcv, NewMails); - if (DataRX != nullptr) - free(DataRX); - - DataRX = MyClient->Uidl(); - ExtractUIDL(DataRX, MyClient->NetClient->Rcv, NewMails); - - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - } - - if (WAIT_OBJECT_0 != MsgsWaitToWrite(ActualAccount)) - throw (uint32_t)(ActualAccount->SystemError = EACC_STOPPED); - - ActualAccount->LastChecked = now; - for (MsgQueuePtr = (HYAMNMAIL)ActualAccount->Mails; MsgQueuePtr != nullptr; MsgQueuePtr = MsgQueuePtr->Next) { - if (MsgQueuePtr->Flags & YAMN_MSG_BODYREQUESTED) { - HYAMNMAIL NewMsgsPtr = nullptr; - for (NewMsgsPtr = (HYAMNMAIL)NewMails; NewMsgsPtr != nullptr; NewMsgsPtr = NewMsgsPtr->Next) { - if (!mir_strcmp(MsgQueuePtr->ID, NewMsgsPtr->ID)) { - wchar_t accstatus[512]; - mir_snwprintf(accstatus, TranslateT("Reading body %s"), NewMsgsPtr->ID); - SetAccountStatus(ActualAccount, accstatus); - DataRX = MyClient->Top(MsgQueuePtr->Number, 100); - if (DataRX != nullptr) { - Temp = DataRX; - while ((Temp < DataRX + MyClient->NetClient->Rcv) && (WS(Temp) || ENDLINE(Temp))) Temp++; - - if (OKLINE(DataRX)) - for (Temp = DataRX; (Temp < DataRX + MyClient->NetClient->Rcv) && (!ENDLINE(Temp)); Temp++); - while ((Temp < DataRX + MyClient->NetClient->Rcv) && ENDLINE(Temp)) Temp++; - } - else - continue; - //delete all the headers of the old mail MsgQueuePtr->MailData->TranslatedHeader - struct CMimeItem *TH = MsgQueuePtr->MailData->TranslatedHeader; - if (TH) for (; MsgQueuePtr->MailData->TranslatedHeader != nullptr;) { - TH = TH->Next; - if (MsgQueuePtr->MailData->TranslatedHeader->name != nullptr) - delete[] MsgQueuePtr->MailData->TranslatedHeader->name; - if (MsgQueuePtr->MailData->TranslatedHeader->value != nullptr) - delete[] MsgQueuePtr->MailData->TranslatedHeader->value; - delete MsgQueuePtr->MailData->TranslatedHeader; - MsgQueuePtr->MailData->TranslatedHeader = TH; - } - - TranslateHeader(Temp, MyClient->NetClient->Rcv - (Temp - DataRX), &MsgQueuePtr->MailData->TranslatedHeader); - - MsgQueuePtr->Flags |= YAMN_MSG_BODYRECEIVED; - - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - break; - } - } - } - } - - SynchroMessages(ActualAccount, (HYAMNMAIL *)&ActualAccount->Mails, nullptr, (HYAMNMAIL *)&NewMails, nullptr); //we get only new mails on server! - - MsgsWriteDone(ActualAccount); - for (MsgQueuePtr = (HYAMNMAIL)ActualAccount->Mails; MsgQueuePtr != nullptr; MsgQueuePtr = MsgQueuePtr->Next) { - if ((MsgQueuePtr->Flags & YAMN_MSG_BODYREQUESTED) && (MsgQueuePtr->Flags & YAMN_MSG_BODYRECEIVED)) { - MsgQueuePtr->Flags &= ~YAMN_MSG_BODYREQUESTED; - if (MsgQueuePtr->MsgWindow) - SendMessage(MsgQueuePtr->MsgWindow, WM_YAMN_CHANGECONTENT, 0, 0); - } - } - - for (msgs = 0, MsgQueuePtr = NewMails; MsgQueuePtr != nullptr; MsgQueuePtr = MsgQueuePtr->Next, msgs++); //get number of new mails - - try { - wchar_t accstatus[512]; - - for (i = 0, MsgQueuePtr = NewMails; MsgQueuePtr != nullptr; i++) { - BOOL autoretr = (ActualAccount->Flags & YAMN_ACC_BODY) != 0; - DataRX = MyClient->Top(MsgQueuePtr->Number, autoretr ? 100 : 0); - mir_snwprintf(accstatus, TranslateT("Reading new mail messages (%d%% done)"), 100 * i / msgs); - SetAccountStatus(ActualAccount, accstatus); - - if (DataRX != nullptr) { - Temp = DataRX; - while ((Temp < DataRX + MyClient->NetClient->Rcv) && (WS(Temp) || ENDLINE(Temp))) Temp++; - - if (OKLINE(DataRX)) - for (Temp = DataRX; (Temp < DataRX + MyClient->NetClient->Rcv) && (!ENDLINE(Temp)); Temp++); - while ((Temp < DataRX + MyClient->NetClient->Rcv) && ENDLINE(Temp)) Temp++; - } - else - continue; - - TranslateHeader(Temp, MyClient->NetClient->Rcv - (Temp - DataRX), &MsgQueuePtr->MailData->TranslatedHeader); - - - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - MsgQueuePtr->Flags |= YAMN_MSG_NORMALNEW; - if (autoretr) MsgQueuePtr->Flags |= YAMN_MSG_BODYRECEIVED; - - //We are going to filter mail. Warning!- we must not be in read access neither write access to mails when calling this service - //This is done, because the "NewMails" queue is not synchronised. It is because it is new queue. Only this thread uses new queue yet, it is not - //connected to account mail queue. - // CallService(MS_YAMN_FILTERMAIL,(WPARAM)ActualAccount,(LPARAM)MsgQueuePtr); - FilterMailSvc((WPARAM)ActualAccount, (LPARAM)MsgQueuePtr); - - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - - //MsgQueuePtr->MailData->Body=MyClient->Retr(MsgQueuePtr->Number); - - MsgQueuePtr = MsgQueuePtr->Next; - - } - - if (WAIT_OBJECT_0 != MsgsWaitToWrite(ActualAccount)) - throw (uint32_t)ActualAccount->SystemError == EACC_STOPPED; - - if (ActualAccount->Mails == nullptr) - ActualAccount->Mails = NewMails; - else { - ActualAccount->LastMail = ActualAccount->LastChecked; - AppendQueue((HYAMNMAIL)ActualAccount->Mails, NewMails); - } - - MsgsWriteDone(ActualAccount); - - // we are going to delete mails having SPAM flag level3 and 4 (see m_mails.h) set - { - struct DeleteParam ParamToDeleteMails = {YAMN_DELETEVERSION, INVALID_HANDLE_VALUE, ActualAccount, YAMNParam, (void *)POP3_DELETEFROMCHECK}; - - // Delete mails from server. Here we should not be in write access for account's mails - DeleteMailsPOP3(&ParamToDeleteMails); - } - - // if there is no waiting thread for internet connection close it - // else leave connection open - if (0 == SCGetNumber(ActualAccount->InternetQueries)) { - DataRX = MyClient->Quit(); - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - MyClient->NetClient->Disconnect(); - - SetAccountStatus(ActualAccount, TranslateT("Disconnected")); - } - - UsingInternet = FALSE; - SetEvent(ActualAccount->UseInternetFree); - - ActualAccount->LastSChecked = ActualAccount->LastChecked; - ActualAccount->LastSynchronised = ActualAccount->LastChecked; - } - catch (...) { - throw; //go to the main exception handling - } - - { - YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, ActualAccount, ActualCopied.NFlags, ActualCopied.NNFlags, YAMNParam}; - - if (CheckFlags & YAMN_FORCECHECK) - Param.nnflags |= YAMN_ACC_POP; //if force check, show popup anyway and if mailbrowser was opened, do not close - Param.nnflags |= YAMN_ACC_MSGP; //do not close browser if already open - CallService(MS_YAMN_MAILBROWSER, (WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); - } - SetContactStatus(ActualAccount, ActualAccount->isCounting ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE); - } - #ifdef DEBUG_COMM - catch (uint32_t ErrorCode) - #else - catch (uint32_t) - #endif - { - if (ActualAccount->Client.POP3Error == EPOP3_STOPPED) - ActualAccount->SystemError = EACC_STOPPED; - #ifdef DEBUG_COMM - DebugLog(CommFile, "ERROR: %x\n", ErrorCode); - #endif - if (WAIT_OBJECT_0 == MsgsWaitToWrite(ActualAccount)) { - ActualAccount->LastChecked = now; - MsgsWriteDone(ActualAccount); - } - - DeleteMIMEQueue(ActualAccount, NewMails); - - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - switch (ActualAccount->SystemError) { - case EACC_QUEUEALLOC: - case EACC_STOPPED: - ActualAccount->Client.NetClient->Disconnect(); - break; - default: - PostErrorProc(ActualAccount, YAMNParam, (uint32_t)NULL, MyClient->SSL); //it closes internet connection too - } - - if (UsingInternet) //if our thread still uses internet - SetEvent(ActualAccount->UseInternetFree); - - SetContactStatus(ActualAccount, ID_STATUS_NA); - } - free(ActualCopied.ServerName); - free(ActualCopied.ServerLogin); - free(ActualCopied.ServerPasswd); - #ifdef DEBUG_COMM - DebugLog(CommFile, "\n"); - #endif - - // WriteAccounts(); - SCDec(ActualAccount->UsingThreads); - return 0; -} - -void __cdecl DeleteMailsPOP3(void *param) -{ - DeleteParam *WhichTemp = (DeleteParam *)param; - - CPop3Client *MyClient; - HYAMNMAIL DeleteMails, NewMails = nullptr, MsgQueuePtr = nullptr; - char *DataRX = nullptr; - int mboxsize = 0, msgs = 0, i; - BOOL UsingInternet = FALSE; - struct - { - char *ServerName; - uint32_t ServerPort; - char *ServerLogin; - char *ServerPasswd; - uint32_t Flags; - uint32_t NFlags; - uint32_t NNFlags; - } ActualCopied; - - //First, we should compare our version of DeleteParam structure, but here it is not needed, because YAMN and internal plugin - //have the same version. But your plugin should do that in this way: - // if (((struct DeleteParam *)WhichTemp)->Ver != YAMN_DELETEVERSION) - // { - // SetEvent(((struct DeleteParam *)WhichTemp)->ThreadRunningEV); //don't forget to unblock YAMN - // return (uint32_t)-1; //ok, but we should return value. - // //When our plugin returns e.g. 0xFFFFFFFF (this is only our plugin value, YAMN does nothing with return value, - // //but only tests if it is nonzero. If yes, it calls GetErrorStringFcn), we know problem occured in YAMN incompatibility - // //and then we can in our GetErrorStringFcn e.g. return string "Uncompatible version of YAMN". - // } - - HPOP3ACCOUNT ActualAccount = (HPOP3ACCOUNT)WhichTemp->AccountParam; //copy address of structure from calling thread to stack of this thread - LPVOID YAMNParam = WhichTemp->BrowserParam; - UINT_PTR POP3PluginParam = (UINT_PTR)((struct DeleteParam *)WhichTemp)->CustomParam; - - SCInc(ActualAccount->UsingThreads); - if (INVALID_HANDLE_VALUE != WhichTemp->ThreadRunningEV) - SetEvent(WhichTemp->ThreadRunningEV); - - if (WAIT_OBJECT_0 != WaitToRead(ActualAccount)) { - SCDec(ActualAccount->UsingThreads); - return; - } - - if (nullptr == (DeleteMails = (HYAMNMAIL)CreateNewDeleteQueue((HYAMNMAIL)ActualAccount->Mails))) //if there's no mail for deleting, return - { - if (POP3_DELETEFROMCHECK != POP3PluginParam) //We do not wait for free internet when calling from SynchroPOP3. It is because UseInternetFree is blocked - { - YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, ActualAccount, YAMN_ACC_MSGP, YAMN_ACC_MSGP, YAMNParam}; //Just update the window - CallService(MS_YAMN_MAILBROWSER, (WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); - } - - SCDec(ActualAccount->UsingThreads); - return; - } - - MyClient = &(ActualAccount->Client); - - //Now, copy all needed information about account to local variables, so ActualAccount is not blocked in read mode during all connection process, which can last for several minutes. - ActualCopied.ServerName = _strdup(ActualAccount->Server->Name); - ActualCopied.ServerPort = ActualAccount->Server->Port; - ActualCopied.Flags = ActualAccount->Flags; - ActualCopied.ServerLogin = _strdup(ActualAccount->Server->Login); - ActualCopied.ServerPasswd = _strdup(ActualAccount->Server->Passwd); - ActualCopied.NFlags = ActualAccount->NewMailN.Flags; - ActualCopied.NNFlags = ActualAccount->NoNewMailN.Flags; - - ReadDone(ActualAccount); - - SCInc(ActualAccount->InternetQueries); //This is POP3-internal SCOUNTER, we set another thread wait for this account to be connected to inet - if (POP3_DELETEFROMCHECK != POP3PluginParam) //We do not wait for free internet when calling from SynchroPOP3. It is because UseInternetFree is blocked - WaitForSingleObject(ActualAccount->UseInternetFree, INFINITE); - - SCDec(ActualAccount->InternetQueries); - UsingInternet = TRUE; - - try { - SetContactStatus(ActualAccount, ID_STATUS_OCCUPIED); - #ifdef DEBUG_COMM - DebugLog(CommFile, "<--------Communication-------->\n"); - #endif - if ((MyClient->NetClient == nullptr) || !MyClient->NetClient->Connected()) { - SetAccountStatus(ActualAccount, TranslateT("Connecting to server")); - - DataRX = MyClient->Connect(ActualCopied.ServerName, ActualCopied.ServerPort, ActualCopied.Flags & YAMN_ACC_SSL23, ActualCopied.Flags & YAMN_ACC_NOTLS); - - char *timestamp = nullptr; - if (DataRX != nullptr) { - if (ActualAccount->Flags & YAMN_ACC_APOP) { - char *lpos = strchr(DataRX, '<'); - char *rpos = strchr(DataRX, '>'); - if (lpos && rpos && rpos > lpos) { - int sz = (int)(rpos - lpos + 2); - timestamp = new char[sz]; - memcpy(timestamp, lpos, sz - 1); - timestamp[sz - 1] = '\0'; - } - } - free(DataRX); - DataRX = nullptr; - } - SetAccountStatus(ActualAccount, TranslateT("Entering POP3 account")); - - if (ActualAccount->Flags & YAMN_ACC_APOP) { - DataRX = MyClient->APOP(ActualCopied.ServerLogin, ActualCopied.ServerPasswd, timestamp); - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - delete[] timestamp; - } - else { - DataRX = MyClient->User(ActualCopied.ServerLogin); - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - DataRX = MyClient->Pass(ActualCopied.ServerPasswd); - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - } - } - - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "<--------Deleting requested mails-------->\n"); - #endif - if (POP3_DELETEFROMCHECK != POP3PluginParam) //We do not need to get mails on server as we have already it from check function - { - SetAccountStatus(ActualAccount, TranslateT("Deleting requested mails")); - - DataRX = MyClient->Stat(); - - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - ExtractStat(DataRX, &mboxsize, &msgs); - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "%d\n", mboxsize); - DebugLog(DecodeFile, "%d\n", msgs); - DebugLog(DecodeFile, "\n"); - #endif - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - for (i = 0; i < msgs; i++) { - if (!i) - MsgQueuePtr = NewMails = (HYAMNMAIL)CallService(MS_YAMN_CREATEACCOUNTMAIL, (WPARAM)ActualAccount, (LPARAM)YAMN_MAILVERSION); - else { - MsgQueuePtr->Next = (HYAMNMAIL)CallService(MS_YAMN_CREATEACCOUNTMAIL, (WPARAM)ActualAccount, (LPARAM)YAMN_MAILVERSION); - MsgQueuePtr = MsgQueuePtr->Next; - } - if (MsgQueuePtr == nullptr) { - ActualAccount->SystemError = EPOP3_QUEUEALLOC; - throw (uint32_t)ActualAccount->SystemError; - } - } - - if (msgs) { - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - DataRX = MyClient->Uidl(); - ExtractUIDL(DataRX, MyClient->NetClient->Rcv, NewMails); - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - // we get "new mails" on server (NewMails will contain all mails on server not found in DeleteMails) - // but also in DeleteMails we get only those, which are still on server with their responsable numbers - SynchroMessages(ActualAccount, (HYAMNMAIL *)&DeleteMails, nullptr, (HYAMNMAIL *)&NewMails, nullptr); - } - } - else SetAccountStatus(ActualAccount, TranslateT("Deleting spam")); - - if (WAIT_OBJECT_0 != MsgsWaitToWrite(ActualAccount)) - throw (uint32_t)EACC_STOPPED; - - if (msgs || POP3_DELETEFROMCHECK == POP3PluginParam) { - try { - HYAMNMAIL Temp; - - for (i = 0, MsgQueuePtr = DeleteMails; MsgQueuePtr != nullptr; i++) { - if (!(MsgQueuePtr->Flags & YAMN_MSG_VIRTUAL)) //of course we can only delete real mails, not virtual - { - DataRX = MyClient->Dele(MsgQueuePtr->Number); - Temp = MsgQueuePtr->Next; - if (POP3_FOK == MyClient->AckFlag) //if server answers that mail was deleted - { - DeleteMIMEMessage((HYAMNMAIL *)&DeleteMails, MsgQueuePtr); - HYAMNMAIL DeletedMail = FindMIMEMessageByID((HYAMNMAIL)ActualAccount->Mails, MsgQueuePtr->ID); - if ((MsgQueuePtr->Flags & YAMN_MSG_MEMDELETE)) //if mail should be deleted from memory (or disk) - { - DeleteMIMEMessage((HYAMNMAIL *)&ActualAccount->Mails, DeletedMail); //remove from queue - CallService(MS_YAMN_DELETEACCOUNTMAIL, (WPARAM)POP3Plugin, (LPARAM)DeletedMail); - } - else //else mark it only as "deleted mail" - { - DeletedMail->Flags |= (YAMN_MSG_VIRTUAL | YAMN_MSG_DELETED); - DeletedMail->Flags &= ~(YAMN_MSG_NEW | YAMN_MSG_USERDELETE | YAMN_MSG_AUTODELETE); //clear "new mail" - } - delete MsgQueuePtr->MailData; - delete[] MsgQueuePtr->ID; - delete MsgQueuePtr; - } - MsgQueuePtr = Temp; - - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - } - else - MsgQueuePtr = MsgQueuePtr->Next; - } - } - catch (...) //if any exception in the code where we have write-access to account occured, don't forget to leave write-access - { - MsgsWriteDone(ActualAccount); - throw; //and go to the main exception handling - } - - if (NewMails != nullptr) - // in ActualAccount->Mails we have all mails stored before calling this function - // in NewMails we have all mails not found in DeleteMails (in other words: we performed new ID checking and we - // stored all mails found on server, then we deleted the ones we wanted to delete in this function - // and NewMails queue now contains actual state of mails on server). But we will not use NewMails as actual state, because NewMails does not contain header data (subject, from...) - // We perform deleting from ActualAccount->Mails: we remove from original queue (ActualAccount->Mails) all deleted mails - SynchroMessages(ActualAccount, (HYAMNMAIL *)&ActualAccount->Mails, nullptr, (HYAMNMAIL *)&NewMails, nullptr); - // Now ActualAccount->Mails contains all mails when calling this function except the ones, we wanted to delete (these are in DeleteMails) - // And in NewMails we have new mails (if any) - else if (POP3_DELETEFROMCHECK != POP3PluginParam) { - DeleteMIMEQueue(ActualAccount, (HYAMNMAIL)ActualAccount->Mails); - ActualAccount->Mails = nullptr; - } - } - else { - DeleteMIMEQueue(ActualAccount, (HYAMNMAIL)ActualAccount->Mails); - ActualAccount->Mails = nullptr; - } - - MsgsWriteDone(ActualAccount); - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - - // TODO: now, we have in NewMails new mails. If NewMails is not NULL, we found some new mails, so Checking for new mail should be performed - // now, we do not call CheckPOP3 - - // if there is no waiting thread for internet connection close it - // else leave connection open - // if this functin was called from SynchroPOP3, then do not try to disconnect - if (POP3_DELETEFROMCHECK != POP3PluginParam) { - YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, ActualAccount, ActualCopied.NFlags, YAMN_ACC_MSGP, YAMNParam}; - - CallService(MS_YAMN_MAILBROWSER, (WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); - - if (0 == SCGetNumber(ActualAccount->InternetQueries)) { - DataRX = MyClient->Quit(); - if (DataRX != nullptr) - free(DataRX); - DataRX = nullptr; - MyClient->NetClient->Disconnect(); - - SetAccountStatus(ActualAccount, TranslateT("Disconnected")); - } - - UsingInternet = FALSE; - SetEvent(ActualAccount->UseInternetFree); - } - SetContactStatus(ActualAccount, ActualAccount->isCounting ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE); - } - #ifdef DEBUG_COMM - catch (uint32_t ErrorCode) - #else - catch (uint32_t) - #endif - { - if (ActualAccount->Client.POP3Error == EPOP3_STOPPED) - ActualAccount->SystemError = EACC_STOPPED; - #ifdef DEBUG_COMM - DebugLog(CommFile, "ERROR %x\n", ErrorCode); - #endif - if (DataRX != nullptr) - free(DataRX); - switch (ActualAccount->SystemError) { - case EACC_QUEUEALLOC: - case EACC_STOPPED: - ActualAccount->Client.NetClient->Disconnect(); - break; - default: - PostErrorProc(ActualAccount, YAMNParam, POP3PluginParam, MyClient->SSL); //it closes internet connection too - } - - if (UsingInternet && (POP3_DELETEFROMCHECK != POP3PluginParam)) //if our thread still uses internet and it is needed to release internet - SetEvent(ActualAccount->UseInternetFree); - } - - free(ActualCopied.ServerName); - free(ActualCopied.ServerLogin); - free(ActualCopied.ServerPasswd); - - DeleteMIMEQueue(ActualAccount, NewMails); - DeleteMIMEQueue(ActualAccount, DeleteMails); - - #ifdef DEBUG_COMM - DebugLog(CommFile, "\n"); - #endif - - // WriteAccounts(); - SCDec(ActualAccount->UsingThreads); - return; -} - -void ExtractStat(char *stream, int *mboxsize, int *mails) -{ - char *finder = stream; - while (WS(finder) || ENDLINE(finder)) finder++; - if (ACKLINE(finder)) { - while (!WS(finder)) finder++; - while (WS(finder)) finder++; - } - if (1 != sscanf(finder, "%d", mails)) - throw (uint32_t)EPOP3_STAT; - while (!WS(finder)) finder++; - while (WS(finder)) finder++; - if (1 != sscanf(finder, "%d", mboxsize)) - throw (uint32_t)EPOP3_STAT; -} -void ExtractMail(char *stream, int len, HYAMNMAIL queue) -{ - char *finder = stream; - char *finderend; - int msgnr, i; - HYAMNMAIL queueptr = queue; - - while (WS(finder) || ENDLINE(finder)) finder++; - while (!ACKLINE(finder)) finder++; - while (!ENDLINE(finder)) finder++; //now we at the end of first ack line - while (finder <= (stream + len)) { - while (ENDLINE(finder)) finder++; //go to the new line - if (DOTLINE(finder + 1)) //at the end of stream - break; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - while (WS(finder)) finder++; //jump whitespace - if (1 != sscanf(finder, "%d", &msgnr)) - throw (uint32_t)EPOP3_UIDL; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "%d\n", msgnr); - #endif - // for (i=1,queueptr=queue;(queueptr->Next != NULL) && (iNext,i++); - // if (i != msgnr) - // throw (uint32_t)EPOP3_UIDL; - while (!WS(finder)) finder++; //jump characters - while (WS(finder)) finder++; //jump whitespace - finderend = finder + 1; - while (!WS(finderend) && !ENDLINE(finderend)) finderend++; - queueptr->ID = new char[finderend - finder + 1]; - for (i = 0; finder != finderend; finder++, i++) - queueptr->MailData->Body[i] = *finder; - queueptr->MailData->Body[i] = 0; //ends string - queueptr->Number = msgnr; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "%s\n", queueptr->MailData->Body); - DebugLog(DecodeFile, "\n"); - #endif - queueptr = queueptr->Next; - while (!ENDLINE(finder)) finder++; - } -} - -void ExtractUIDL(char *stream, int len, HYAMNMAIL queue) -{ - char *finder = stream; - char *finderend; - int msgnr, i; - HYAMNMAIL queueptr = queue; - - while (WS(finder) || ENDLINE(finder)) finder++; - while (!ACKLINE(finder)) finder++; - while (!ENDLINE(finder)) finder++; //now we at the end of first ack line - while (finder <= (stream + len)) { - while (ENDLINE(finder)) finder++; //go to the new line - if (DOTLINE(finder + 1)) //at the end of stream - break; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n"); - #endif - while (WS(finder)) finder++; //jump whitespace - if (1 != sscanf(finder, "%d", &msgnr)) - throw (uint32_t)EPOP3_UIDL; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "%d\n", msgnr); - #endif - // for (i=1,queueptr=queue;(queueptr->Next != NULL) && (iNext,i++); - // if (i != msgnr) - // throw (uint32_t)EPOP3_UIDL; - while (!WS(finder)) finder++; //jump characters - while (WS(finder)) finder++; //jump whitespace - finderend = finder + 1; - while (!WS(finderend) && !ENDLINE(finderend)) finderend++; - queueptr->ID = new char[finderend - finder + 1]; - for (i = 0; finder != finderend; finder++, i++) - queueptr->ID[i] = *finder; - queueptr->ID[i] = 0; //ends string - queueptr->Number = msgnr; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "%s\n", queueptr->ID); - DebugLog(DecodeFile, "\n"); - #endif - queueptr = queueptr->Next; - while (!ENDLINE(finder)) finder++; - } -} - -void ExtractList(char *stream, int len, HYAMNMAIL queue) -{ - char *finder = stream; - char *finderend; - int msgnr, i; - HYAMNMAIL queueptr; - - while (WS(finder) || ENDLINE(finder)) finder++; - while (!ACKLINE(finder)) finder++; - while (!ENDLINE(finder)) finder++; //now we at the end of first ack line - while (finder <= (stream + len)) { - while (ENDLINE(finder)) finder++; //go to the new line - if (DOTLINE(finder + 1)) //at the end of stream - break; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "\n", NULL, 0); - #endif - while (WS(finder)) finder++; //jump whitespace - if (1 != sscanf(finder, "%d", &msgnr)) //message nr. - throw (uint32_t)EPOP3_LIST; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "%d\n", msgnr); - #endif - - for (i = 1, queueptr = queue; (queueptr->Next != nullptr) && (i < msgnr); queueptr = queueptr->Next, i++); - if (i != msgnr) - throw (uint32_t)EPOP3_LIST; - while (!WS(finder)) finder++; //jump characters - while (WS(finder)) finder++; //jump whitespace - finderend = finder + 1; - if (1 != sscanf(finder, "%u", &queueptr->MailData->Size)) - throw (uint32_t)EPOP3_LIST; - #ifdef DEBUG_DECODE - DebugLog(DecodeFile, "%d\n", queueptr->MailData->Size); - #endif - while (!ENDLINE(finder)) finder++; - } -} - -wchar_t *WINAPI GetErrorString(DWORD Code) -{ - static wchar_t *POP3Errors[] = - { - LPGENW("Memory allocation error."), //memory allocation - LPGENW("Account is about to be stopped."), //stop account - LPGENW("Cannot connect to POP3 server."), - LPGENW("Cannot allocate memory for received data."), - LPGENW("Cannot login to POP3 server."), - LPGENW("Bad user or password."), - LPGENW("Server does not support APOP authorization."), - LPGENW("Error while executing POP3 command."), - LPGENW("Error while executing POP3 command."), - LPGENW("Error while executing POP3 command."), - }; - - static wchar_t *NetlibErrors[] = - { - LPGENW("Cannot connect to server with NetLib."), - LPGENW("Cannot send data."), - LPGENW("Cannot receive data."), - LPGENW("Cannot allocate memory for received data."), - }; - - static wchar_t *SSLErrors[] = - { - LPGENW("OpenSSL not loaded."), - LPGENW("Windows socket 2.0 init failed."), - LPGENW("DNS lookup error."), - LPGENW("Error while creating base socket."), - LPGENW("Error connecting to server with socket."), - LPGENW("Error while creating SSL structure."), - LPGENW("Error connecting socket with SSL."), - LPGENW("Server rejected connection with SSL."), - LPGENW("Cannot write SSL data."), - LPGENW("Cannot read SSL data."), - LPGENW("Cannot allocate memory for received data."), - }; - - wchar_t *ErrorString = new wchar_t[ERRORSTR_MAXLEN]; - POP3_ERRORCODE *ErrorCode = (POP3_ERRORCODE *)(UINT_PTR)Code; - - mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, TranslateT("Error %d-%d-%d-%d:"), ErrorCode->AppError, ErrorCode->POP3Error, ErrorCode->NetError, ErrorCode->SystemError); - if (ErrorCode->POP3Error) - mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateW(POP3Errors[ErrorCode->POP3Error - 1])); - if (ErrorCode->NetError) { - if (ErrorCode->SSL) - mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateW(SSLErrors[ErrorCode->NetError - 1])); - else - mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateW(NetlibErrors[ErrorCode->NetError - 4])); - } - - return ErrorString; -} - -void WINAPI DeleteErrorString(LPVOID String) -{ - delete (char *)String; -} +/* + * This code implements POP3 server checking for new mail and so on. + * There's function SynchroPOP3 in this file- for checking and synchronising POP3 account + * and DeleteMailsPOP3- for deleting mails from POP3 server + * + * Note this file acts as main file for internal plugin. + * + * (c) majvan 2002-2004 + * 18/08 + */ + + +#include "../../stdafx.h" + +#define ERRORSTR_MAXLEN 1024 //in wide-chars + + //-------------------------------------------------------------------------------------------------- + +HANDLE hNetLib = nullptr; +PSCOUNTER CPOP3Account::AccountWriterSO = nullptr; + +//Creates new CPOP3Account structure +CAccount *WINAPI CreatePOP3Account(HYAMNPROTOPLUGIN Plugin, DWORD CAccountVersion); + +//Deletes CPOP3Account structure +void WINAPI DeletePOP3Account(CAccount *Which); + +//Sets stop flag to account +void WINAPI StopPOP3Account(CAccount *Which); + +//Function registers standard functions for YAMN +int RegisterPOP3Plugin(WPARAM, LPARAM); + +//Unloads all variables created on heap (delete[]) +DWORD WINAPI UnLoadPOP3(void *); + +//Function writes POP3 accounts using YAMN exported functions +DWORD WINAPI WritePOP3Accounts(); + +//Function stores plugin's data for account to file +DWORD WINAPI WritePOP3Options(HANDLE, CAccount *); + +//Function reads plugin's data for account from file +DWORD WINAPI ReadPOP3Options(CAccount *, char **, char *); + +//Creates new mail for an account +HYAMNMAIL WINAPI CreatePOP3Mail(CAccount *Account, DWORD CMimeMailVersion); + +//Function does all needed work when connection failed or any error occured +//Creates structure containing error code, closes internet session, runs "bad connect" function +static void PostErrorProc(HPOP3ACCOUNT ActualAccount, void *ParamToBadConnect, uint32_t POP3PluginParam, BOOL UseSSL); + +//Checks POP3 account and stores all info to account. It deletes old mails=> synchro +// WhichTemp- pointer to strucure containing needed information +DWORD WINAPI SynchroPOP3(struct CheckParam *WhichTemp); + +//Deletes mails from POP3 server +// WhichTemp- structure containing needed information (queued messages to delete) +//Function deletes from memory queue in WhichTemp structure +void __cdecl DeleteMailsPOP3(void *param); + +//Function makes readable message about error. It sends it back to YAMN, so YAMN then +//can show it to the message window +wchar_t *WINAPI GetErrorString(DWORD Code); + +//Function deletes string allocated in GetErrorString +void WINAPI DeleteErrorString(LPVOID String); + +//Extracts info from result of POP3's STAT command +// stream- source string +// len- length of source string +// mboxsize- adreess to integer, that receives size of mailbox +// mails- adreess to integer, that receives number of mails +void ExtractStat(char *stream, int *mboxsize, int *mails); + +//Extracts mail ID on mailbox +// stream- source string +// len- length of source string +// queue- address of first message, where first ID will be stored +void ExtractUIDL(char *stream, int len, HYAMNMAIL queue); + +//Extracts mail size on mailbox +// stream- source string +// len- length of source string +// queue- address of first message, where size of message #1 will be stored +void ExtractList(char *stream, int len, HYAMNMAIL queue); + +void ExtractMail(char *stream, int len, HYAMNMAIL queue); + +YAMNExportedFcns *pYAMNFcn = nullptr; +MailExportedFcns *pYAMNMailFcn = nullptr; + +YAMN_PROTOIMPORTFCN POP3ProtocolFunctions = +{ + CreatePOP3Account, + DeletePOP3Account, + StopPOP3Account, + WritePOP3Options, + ReadPOP3Options, + SynchroPOP3, + SynchroPOP3, + SynchroPOP3, + DeleteMailsPOP3, + GetErrorString, + nullptr, + DeleteErrorString, + WritePOP3Accounts, + nullptr, + UnLoadPOP3, +}; + +YAMN_MAILIMPORTFCN POP3MailFunctions = +{ + CreatePOP3Mail, + nullptr, + nullptr, + nullptr, +}; + +PYAMN_VARIABLES pYAMNVar = nullptr; +HYAMNPROTOPLUGIN POP3Plugin = nullptr; + +YAMN_PROTOREGISTRATION POP3ProtocolRegistration = +{ + "POP3 protocol (internal)", + __VERSION_STRING_DOTS, + __COPYRIGHT, + __DESCRIPTION, + __AUTHORWEB, +}; + +static wchar_t *FileName = nullptr; + +HANDLE RegisterNLClient(char *name); + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +CPOP3Account::CPOP3Account() +{ + //NOTE! This constructor constructs CAccount structure. If your plugin is not internal, + //you will need these constructors. All you need is in Account.cpp. Just copy to your source code + //constructor and destructor of CAccount. + UseInternetFree = CreateEvent(nullptr, FALSE, TRUE, nullptr); + InternetQueries = new SCOUNTER; + AbilityFlags = YAMN_ACC_BROWSE | YAMN_ACC_POPUP; + + SetAccountStatus((CAccount *)this, TranslateT("Disconnected")); +} + +CPOP3Account::~CPOP3Account() +{ + CloseHandle(UseInternetFree); + if (InternetQueries != nullptr) + delete InternetQueries; +} + +CAccount *WINAPI CreatePOP3Account(HYAMNPROTOPLUGIN, DWORD) +{ + //First, we should check whether CAccountVersion matches. + //But this is internal plugin, so YAMN's CAccount structure and our CAccount structure are + //the same, so we do not need to test version. Otherwise, if CAccount version does not match + //in your plugin, you should return NULL, like this: + // if (CAccountVersion != YAMN_ACCOUNTVERSION) return NULL; + + //Now it is needed to construct our POP3 account and return its handle + return (CAccount *)new struct CPOP3Account(); +} + +void WINAPI DeletePOP3Account(CAccount *Which) +{ + delete (HPOP3ACCOUNT)Which; +} + +void WINAPI StopPOP3Account(CAccount *Which) +{ + ((HPOP3ACCOUNT)Which)->Client.Stopped = TRUE; + if (((HPOP3ACCOUNT)Which)->Client.NetClient != nullptr) //we should inform also network client. Usefull only when network client implements this feature + ((HPOP3ACCOUNT)Which)->Client.NetClient->Stopped = TRUE; +} + +//This function is like main function for POP3 internal protocol +int RegisterPOP3Plugin(WPARAM, LPARAM) +{ + // Get YAMN variables we can use + if (nullptr == (pYAMNVar = (PYAMN_VARIABLES)CallService(MS_YAMN_GETVARIABLES, YAMN_VARIABLESVERSION, 0))) + return 0; + + // We have to get pointers to YAMN exported functions: allocate structure and fill it + if (nullptr == (pYAMNFcn = new struct YAMNExportedFcns)) { +LBL_Error: + UnLoadPOP3(nullptr); + return 0; + } + + // Register new pop3 user in netlib + if (nullptr == (hNetLib = RegisterNLClient("YAMN (POP3)"))) + goto LBL_Error; + + pYAMNFcn->SetProtocolPluginFcnImportFcn = (YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SETPROTOCOLPLUGINFCNIMPORTID, 0); + pYAMNFcn->WaitToWriteFcn = (YAMN_WAITTOWRITEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_WAITTOWRITEID, 0); + pYAMNFcn->WriteDoneFcn = (YAMN_WRITEDONEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_WRITEDONEID, 0); + pYAMNFcn->WaitToReadFcn = (YAMN_WAITTOREADFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_WAITTOREADID, 0); + pYAMNFcn->ReadDoneFcn = (YAMN_READDONEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_READDONEID, 0); + pYAMNFcn->SCGetNumberFcn = (YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SCGETNUMBERID, 0); + pYAMNFcn->SCIncFcn = (YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SCINCID, 0); + pYAMNFcn->SCDecFcn = (YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SCDECID, 0); + pYAMNFcn->SetStatusFcn = (YAMN_SETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SETSTATUSID, 0); + pYAMNFcn->GetStatusFcn = (YAMN_GETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_GETSTATUSID, 0); + + if (nullptr == (pYAMNMailFcn = new struct MailExportedFcns)) + goto LBL_Error; + + pYAMNMailFcn->SynchroMessagesFcn = (YAMN_SYNCHROMIMEMSGSFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_SYNCHROMIMEMSGSID, 0); + pYAMNMailFcn->TranslateHeaderFcn = (YAMN_TRANSLATEHEADERFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_TRANSLATEHEADERID, 0); + pYAMNMailFcn->AppendQueueFcn = (YAMN_APPENDQUEUEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_APPENDQUEUEID, 0); + pYAMNMailFcn->DeleteMessagesToEndFcn = (YAMN_DELETEMIMEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_DELETEMIMEQUEUEID, 0); + pYAMNMailFcn->DeleteMessageFromQueueFcn = (YAMN_DELETEMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_DELETEMIMEMESSAGEID, 0); + pYAMNMailFcn->FindMessageByIDFcn = (YAMN_FINDMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_FINDMIMEMESSAGEID, 0); + pYAMNMailFcn->CreateNewDeleteQueueFcn = (YAMN_CREATENEWDELETEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR, (WPARAM)YAMN_CREATENEWDELETEQUEUEID, 0); + + //set static variable + if (CPOP3Account::AccountWriterSO == nullptr) + if (nullptr == (CPOP3Account::AccountWriterSO = new SCOUNTER)) + goto LBL_Error; + + //First, we register this plugin + //it is quite impossible this function returns zero (failure) as YAMN and internal plugin structre versions are the same + POP3ProtocolRegistration.Name = Translate("POP3 protocol (internal)"); + POP3ProtocolRegistration.Description = Translate(__DESCRIPTION); + if (nullptr == (POP3Plugin = (HYAMNPROTOPLUGIN)CallService(MS_YAMN_REGISTERPROTOPLUGIN, (WPARAM)&POP3ProtocolRegistration, (LPARAM)YAMN_PROTOREGISTRATIONVERSION))) + return 0; + + //Next we set our imported functions for YAMN + if (!SetProtocolPluginFcnImport(POP3Plugin, &POP3ProtocolFunctions, YAMN_PROTOIMPORTFCNVERSION, &POP3MailFunctions, YAMN_MAILIMPORTFCNVERSION)) + return 0; + + //Then, we read all mails for accounts. + //You must first register account, before using this function as YAMN must use CreatePOP3Account function to add new accounts + //But if CreatePOP3Account is not implemented (equals to NULL), YAMN creates account as YAMN's standard CAccount * + if (FileName) CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); //shoud not happen (only for secure) + FileName = (wchar_t *)CallService(MS_YAMN_GETFILENAME, (WPARAM)L"pop3", 0); + + switch (CallService(MS_YAMN_READACCOUNTS, (WPARAM)POP3Plugin, (LPARAM)FileName)) { + case EACC_FILEVERSION: + MessageBox(nullptr, TranslateT("Found new version of account book, not compatible with this version of YAMN."), TranslateT("YAMN (internal POP3) read error"), MB_OK); + CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); + FileName = nullptr; + return 0; + case EACC_FILECOMPATIBILITY: + MessageBox(nullptr, TranslateT("Error reading account file. Account file corrupted."), TranslateT("YAMN (internal POP3) read error"), MB_OK); + CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); + FileName = nullptr; + return 0; + case EACC_ALLOC: + MessageBox(nullptr, TranslateT("Memory allocation error while data reading"), TranslateT("YAMN (internal POP3) read error"), MB_OK); + CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); + FileName = nullptr; + return 0; + case EACC_SYSTEM: + if (ERROR_FILE_NOT_FOUND != GetLastError()) { + wchar_t temp[1024] = {0}; + mir_snwprintf(temp, L"%s\n%s", TranslateT("Reading file error. File already in use?"), FileName); + MessageBox(nullptr, temp, TranslateT("YAMN (internal POP3) read error"), MB_OK); + CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); + FileName = nullptr; + return 0; + } + break; + } + + for (CAccount *Finder = POP3Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) { + Finder->hContact = NULL; + for (auto &hContact : Contacts(YAMN_DBMODULE)) { + DBVARIANT dbv; + if (!g_plugin.getString(hContact, "Id", &dbv)) { + if (mir_strcmp(dbv.pszVal, Finder->Name) == 0) { + Finder->hContact = hContact; + g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_ONLINE); + db_set_s(Finder->hContact, "CList", "StatusMsg", Translate("No new mail message")); + if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) + Contact::Hide(Finder->hContact, false); + + if (!(Finder->Flags & YAMN_ACC_ENA) || !(Finder->NewMailN.Flags & YAMN_ACC_CONT)) + Contact::Hide(Finder->hContact); + } + db_free(&dbv); + } + } + + if (!Finder->hContact && (Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) { + // No account contact found, have to create one + Finder->hContact = db_add_contact(); + Proto_AddToContact(Finder->hContact, YAMN_DBMODULE); + g_plugin.setString(Finder->hContact, "Id", Finder->Name); + g_plugin.setString(Finder->hContact, "Nick", Finder->Name); + g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_OFFLINE); + } + } + + return 0; +} + +DWORD WINAPI UnLoadPOP3(void *) +{ + //pYAMNVar is only a pointr, no need delete or free + if (hNetLib) { + Netlib_CloseHandle(hNetLib); hNetLib = nullptr; + } + if (CPOP3Account::AccountWriterSO) { + delete CPOP3Account::AccountWriterSO; CPOP3Account::AccountWriterSO = nullptr; + } + if (pYAMNMailFcn) { + delete pYAMNMailFcn; pYAMNMailFcn = nullptr; + } + if (pYAMNFcn) { + delete pYAMNFcn; pYAMNFcn = nullptr; + } + if (FileName) { + CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); FileName = nullptr; + } + + return 1; +} + +DWORD WINAPI WritePOP3Accounts() +{ + uint32_t ReturnValue = CallService(MS_YAMN_WRITEACCOUNTS, (WPARAM)POP3Plugin, (LPARAM)FileName); + if (ReturnValue == EACC_SYSTEM) { + wchar_t temp[1024] = {0}; + mir_snwprintf(temp, L"%s\n%s", TranslateT("Error while copying data to disk occurred. Is file in use?"), FileName); + MessageBox(nullptr, temp, TranslateT("POP3 plugin - write file error"), MB_OK); + } + + return ReturnValue; +} + +DWORD WINAPI WritePOP3Options(HANDLE File, CAccount *Which) +{ + DWORD WrittenBytes; + uint32_t Ver = POP3_FILEVERSION; + + if ((!WriteFile(File, (char *)&Ver, sizeof(uint32_t), &WrittenBytes, nullptr)) || + (!WriteFile(File, (char *)&((HPOP3ACCOUNT)Which)->CP, sizeof(uint16_t), &WrittenBytes, nullptr))) + return EACC_SYSTEM; + return 0; +} + +DWORD WINAPI ReadPOP3Options(CAccount *Which, char **Parser, char *End) +{ + uint32_t Ver; + #ifdef DEBUG_FILEREAD + wchar_t Debug[256]; + #endif + Ver = *(uint32_t *)(*Parser); + (*Parser) += sizeof(uint32_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + if (Ver != POP3_FILEVERSION) + return EACC_FILECOMPATIBILITY; + + ((HPOP3ACCOUNT)Which)->CP = *(uint16_t *)(*Parser); + (*Parser) += sizeof(uint16_t); + if (*Parser >= End) + return EACC_FILECOMPATIBILITY; + #ifdef DEBUG_FILEREAD + mir_snwprintf(Debug, L"CodePage: %d, remaining %d chars", ((HPOP3ACCOUNT)Which)->CP, End - *Parser); + MessageBox(NULL, Debug, L"debug", MB_OK); + #endif + return 0; +} + +HYAMNMAIL WINAPI CreatePOP3Mail(CAccount *Account, DWORD) +{ + HYAMNMAIL NewMail; + //First, we should check whether MAILDATA matches. + //But this is internal plugin, so YAMN's MAILDATA structure and our MAILDATA structure are + //the same, so we do not need to test version. Otherwise, if MAILDATA version does not match + //in your plugin, you should return NULL, like this: + // if (MailDataVersion != YAMN_MAILDATAVERSION) return NULL; + + //Now it is needed to construct our POP3 account and return its handle + if (nullptr == (NewMail = new YAMNMAIL)) + return nullptr; + + if (nullptr == (NewMail->MailData = new CMailData())) { + delete NewMail; + return nullptr; + } + NewMail->MailData->CP = ((HPOP3ACCOUNT)Account)->CP; + return (HYAMNMAIL)NewMail; +} + +static void SetContactStatus(CAccount *account, int status) +{ + if ((account->hContact) && (account->NewMailN.Flags & YAMN_ACC_CONT)) + g_plugin.setWord(account->hContact, "Status", status); +} + +static void PostErrorProc(HPOP3ACCOUNT ActualAccount, void *ParamToBadConnection, uint32_t POP3PluginParam, BOOL UseSSL) +{ + char *DataRX; + + //We create new structure, that we pass to bad connection dialog procedure. This procedure next calls YAMN imported fuction + //from POP3 protocol to determine the description of error. We can describe error from our error code structure, because later, + //when YAMN calls our function, it passes us our error code. This is pointer to structure for POP3 protocol in fact. + PPOP3_ERRORCODE ErrorCode; + + //We store status before we do Quit(), because quit can destroy our errorcode status + if (nullptr != (ErrorCode = new POP3_ERRORCODE)) { + ErrorCode->SSL = UseSSL; + ErrorCode->AppError = ActualAccount->SystemError; + ErrorCode->POP3Error = ActualAccount->Client.POP3Error; + ErrorCode->NetError = ActualAccount->Client.NetClient->NetworkError; + ErrorCode->SystemError = ActualAccount->Client.NetClient->SystemError; + } + + if (POP3PluginParam == (uint32_t)NULL) //if it was normal YAMN call (force check or so on) + { + try { + DataRX = ActualAccount->Client.Quit(); + if (DataRX != nullptr) + free(DataRX); + } + catch (...) { + } + //We always close connection if error occured + try { + ActualAccount->Client.NetClient->Disconnect(); + } + catch (...) { + } + + SetAccountStatus(ActualAccount, TranslateT("Disconnected")); + + //If we cannot allocate memory, do nothing + if (ErrorCode == nullptr) { + SetEvent(ActualAccount->UseInternetFree); + return; + } + } + else // else it was called from POP3 plugin, probably error when deleting old mail (POP3 synchro calls POP3 delete) + if (ErrorCode == nullptr) + return; + + if ((ActualAccount->BadConnectN.Flags & YAMN_ACC_MSG) || (ActualAccount->BadConnectN.Flags & YAMN_ACC_ICO) || (ActualAccount->BadConnectN.Flags & YAMN_ACC_POP)) + RunBadConnection(ActualAccount, (UINT_PTR)ErrorCode, ParamToBadConnection); + + if (POP3PluginParam == (uint32_t)NULL) //if it was normal YAMN call + SetEvent(ActualAccount->UseInternetFree); +} + +//Checks POP3 account and synchronizes it +DWORD WINAPI SynchroPOP3(struct CheckParam *WhichTemp) +{ + HPOP3ACCOUNT ActualAccount; + CPop3Client *MyClient; + HYAMNMAIL NewMails = nullptr, MsgQueuePtr = nullptr; + char *DataRX = nullptr, *Temp; + int mboxsize, msgs, i; + SYSTEMTIME now; + LPVOID YAMNParam; + uint32_t CheckFlags; + BOOL UsingInternet = FALSE; + struct + { + char *ServerName; + uint32_t ServerPort; + char *ServerLogin; + char *ServerPasswd; + uint32_t Flags; + uint32_t NFlags; + uint32_t NNFlags; + } ActualCopied; + + //First, we should compare our version of CheckParam structure, but here it is not needed, because YAMN and internal plugin + //have the same version. But your plugin should do that in this way: + // if (((struct CheckParam *)WhichTemp)->Ver != YAMN_CHECKVERSION) + // { + // SetEvent(((struct CheckParam *)WhichTemp)->ThreadRunningEV); //don't forget to unblock YAMN + // return (uint32_t)-1; //ok, but we should return value. + // //When our plugin returns e.g. 0xFFFFFFFF (=-1, this is only our plugin value, YAMN does nothing with return value, + // //but only tests if it is nonzero. If yes, it calls GetErrorStringFcn. We know problem occured in YAMN incompatibility + // //and then we can in our GetErrorStringFcn e.g. return string "Uncompatible version of YAMN". + // } + + ActualAccount = (HPOP3ACCOUNT)WhichTemp->AccountParam; //copy address of structure from calling thread to stack of this thread + YAMNParam = WhichTemp->BrowserParam; + CheckFlags = WhichTemp->Flags; + + SCInc(ActualAccount->UsingThreads); + //Unblock YAMN, signal that we have copied all parameters from YAMN thread stack + if (INVALID_HANDLE_VALUE != WhichTemp->ThreadRunningEV) + SetEvent(WhichTemp->ThreadRunningEV); + + if (WAIT_OBJECT_0 != WaitToRead(ActualAccount)) { + SCDec(ActualAccount->UsingThreads); + return 0; + } + + MyClient = &ActualAccount->Client; + //Now, copy all needed information about account to local variables, so ActualAccount is not blocked in read mode during all connection process, which can last for several minutes. + ActualCopied.ServerName = _strdup(ActualAccount->Server->Name); + ActualCopied.ServerPort = ActualAccount->Server->Port; + ActualCopied.Flags = ActualAccount->Flags; + ActualCopied.ServerLogin = _strdup(ActualAccount->Server->Login); + ActualCopied.ServerPasswd = _strdup(ActualAccount->Server->Passwd); + ActualCopied.NFlags = ActualAccount->NewMailN.Flags; + ActualCopied.NNFlags = ActualAccount->NoNewMailN.Flags; + + ReadDone(ActualAccount); + SCInc(ActualAccount->InternetQueries); //increment counter, that there is one more thread waiting for connection + + WaitForSingleObject(ActualAccount->UseInternetFree, INFINITE); //wait until we can use connection + SCDec(ActualAccount->InternetQueries); + + //OK, we enter the "use internet" section. But after we start communication, we can test if we did not enter the "use internet" section only for the reason, + //that previous thread release the internet section because this account has stop signal (we stop account and there are 2 threads: one communicating, + //the second one waiting for network access- the first one ends because we want to stop account, this one is released, but should be stopped as well). + if (!ActualAccount->AbleToWork) { + SetEvent(ActualAccount->UseInternetFree); + SCDec(ActualAccount->UsingThreads); + return 0; + } + UsingInternet = TRUE; + + GetLocalTime(&now); + ActualAccount->SystemError = 0; //now we can use internet for this socket. First, clear errorcode. + try { + SetContactStatus(ActualAccount, ID_STATUS_OCCUPIED); + + // if we are already connected, we have open session (another thread left us open session), so we don't need to login + // note that connected state without logging cannot occur, because if we close session, we always close socket too (we must close socket is the right word :)) + if ((MyClient->NetClient == nullptr) || !MyClient->NetClient->Connected()) { + SetAccountStatus(ActualAccount, TranslateT("Connecting to server")); + + DataRX = MyClient->Connect(ActualCopied.ServerName, ActualCopied.ServerPort, ActualCopied.Flags & YAMN_ACC_SSL23, ActualCopied.Flags & YAMN_ACC_NOTLS); + char *timestamp = nullptr; + + if (DataRX != nullptr) { + if (ActualCopied.Flags & YAMN_ACC_APOP) { + char *lpos = strchr(DataRX, '<'); + char *rpos = strchr(DataRX, '>'); + if (lpos && rpos && rpos > lpos) { + int sz = (int)(rpos - lpos + 2); + timestamp = new char[sz]; + memcpy(timestamp, lpos, sz - 1); + timestamp[sz - 1] = '\0'; + } + } + free(DataRX); + DataRX = nullptr; + } + + SetAccountStatus(ActualAccount, TranslateT("Entering POP3 account")); + + if (ActualCopied.Flags & YAMN_ACC_APOP) { + DataRX = MyClient->APOP(ActualCopied.ServerLogin, ActualCopied.ServerPasswd, timestamp); + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + delete[] timestamp; + } + else { + DataRX = MyClient->User(ActualCopied.ServerLogin); + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + DataRX = MyClient->Pass(ActualCopied.ServerPasswd); + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + } + } + SetAccountStatus(ActualAccount, TranslateT("Searching for new mail message")); + + DataRX = MyClient->Stat(); + + ExtractStat(DataRX, &mboxsize, &msgs); + + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + for (i = 0; i < msgs; i++) { + if (!i) + MsgQueuePtr = NewMails = (HYAMNMAIL)CallService(MS_YAMN_CREATEACCOUNTMAIL, (WPARAM)ActualAccount, (LPARAM)YAMN_MAILVERSION); + else { + MsgQueuePtr->Next = (HYAMNMAIL)CallService(MS_YAMN_CREATEACCOUNTMAIL, (WPARAM)ActualAccount, (LPARAM)YAMN_MAILVERSION); + MsgQueuePtr = MsgQueuePtr->Next; + } + if (MsgQueuePtr == nullptr) { + ActualAccount->SystemError = EPOP3_QUEUEALLOC; + throw (uint32_t)ActualAccount->SystemError; + } + } + + if (msgs) { + DataRX = MyClient->List(); + ExtractList(DataRX, MyClient->NetClient->Rcv, NewMails); + if (DataRX != nullptr) + free(DataRX); + + DataRX = MyClient->Uidl(); + ExtractUIDL(DataRX, MyClient->NetClient->Rcv, NewMails); + + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + } + + if (WAIT_OBJECT_0 != MsgsWaitToWrite(ActualAccount)) + throw (uint32_t)(ActualAccount->SystemError = EACC_STOPPED); + + ActualAccount->LastChecked = now; + for (MsgQueuePtr = (HYAMNMAIL)ActualAccount->Mails; MsgQueuePtr != nullptr; MsgQueuePtr = MsgQueuePtr->Next) { + if (MsgQueuePtr->Flags & YAMN_MSG_BODYREQUESTED) { + HYAMNMAIL NewMsgsPtr = nullptr; + for (NewMsgsPtr = (HYAMNMAIL)NewMails; NewMsgsPtr != nullptr; NewMsgsPtr = NewMsgsPtr->Next) { + if (!mir_strcmp(MsgQueuePtr->ID, NewMsgsPtr->ID)) { + wchar_t accstatus[512]; + mir_snwprintf(accstatus, TranslateT("Reading body %s"), NewMsgsPtr->ID); + SetAccountStatus(ActualAccount, accstatus); + DataRX = MyClient->Top(MsgQueuePtr->Number, 100); + if (DataRX != nullptr) { + Temp = DataRX; + while ((Temp < DataRX + MyClient->NetClient->Rcv) && (WS(Temp) || ENDLINE(Temp))) Temp++; + + if (OKLINE(DataRX)) + for (Temp = DataRX; (Temp < DataRX + MyClient->NetClient->Rcv) && (!ENDLINE(Temp)); Temp++); + while ((Temp < DataRX + MyClient->NetClient->Rcv) && ENDLINE(Temp)) Temp++; + } + else + continue; + //delete all the headers of the old mail MsgQueuePtr->MailData->TranslatedHeader + struct CMimeItem *TH = MsgQueuePtr->MailData->TranslatedHeader; + if (TH) for (; MsgQueuePtr->MailData->TranslatedHeader != nullptr;) { + TH = TH->Next; + if (MsgQueuePtr->MailData->TranslatedHeader->name != nullptr) + delete[] MsgQueuePtr->MailData->TranslatedHeader->name; + if (MsgQueuePtr->MailData->TranslatedHeader->value != nullptr) + delete[] MsgQueuePtr->MailData->TranslatedHeader->value; + delete MsgQueuePtr->MailData->TranslatedHeader; + MsgQueuePtr->MailData->TranslatedHeader = TH; + } + + TranslateHeader(Temp, MyClient->NetClient->Rcv - (Temp - DataRX), &MsgQueuePtr->MailData->TranslatedHeader); + + MsgQueuePtr->Flags |= YAMN_MSG_BODYRECEIVED; + + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + break; + } + } + } + } + + SynchroMessages(ActualAccount, (HYAMNMAIL *)&ActualAccount->Mails, nullptr, (HYAMNMAIL *)&NewMails, nullptr); //we get only new mails on server! + + MsgsWriteDone(ActualAccount); + for (MsgQueuePtr = (HYAMNMAIL)ActualAccount->Mails; MsgQueuePtr != nullptr; MsgQueuePtr = MsgQueuePtr->Next) { + if ((MsgQueuePtr->Flags & YAMN_MSG_BODYREQUESTED) && (MsgQueuePtr->Flags & YAMN_MSG_BODYRECEIVED)) { + MsgQueuePtr->Flags &= ~YAMN_MSG_BODYREQUESTED; + if (MsgQueuePtr->MsgWindow) + SendMessage(MsgQueuePtr->MsgWindow, WM_YAMN_CHANGECONTENT, 0, 0); + } + } + + for (msgs = 0, MsgQueuePtr = NewMails; MsgQueuePtr != nullptr; MsgQueuePtr = MsgQueuePtr->Next, msgs++); //get number of new mails + + try { + wchar_t accstatus[512]; + + for (i = 0, MsgQueuePtr = NewMails; MsgQueuePtr != nullptr; i++) { + BOOL autoretr = (ActualAccount->Flags & YAMN_ACC_BODY) != 0; + DataRX = MyClient->Top(MsgQueuePtr->Number, autoretr ? 100 : 0); + mir_snwprintf(accstatus, TranslateT("Reading new mail messages (%d%% done)"), 100 * i / msgs); + SetAccountStatus(ActualAccount, accstatus); + + if (DataRX != nullptr) { + Temp = DataRX; + while ((Temp < DataRX + MyClient->NetClient->Rcv) && (WS(Temp) || ENDLINE(Temp))) Temp++; + + if (OKLINE(DataRX)) + for (Temp = DataRX; (Temp < DataRX + MyClient->NetClient->Rcv) && (!ENDLINE(Temp)); Temp++); + while ((Temp < DataRX + MyClient->NetClient->Rcv) && ENDLINE(Temp)) Temp++; + } + else + continue; + + TranslateHeader(Temp, MyClient->NetClient->Rcv - (Temp - DataRX), &MsgQueuePtr->MailData->TranslatedHeader); + + + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + MsgQueuePtr->Flags |= YAMN_MSG_NORMALNEW; + if (autoretr) MsgQueuePtr->Flags |= YAMN_MSG_BODYRECEIVED; + + //We are going to filter mail. Warning!- we must not be in read access neither write access to mails when calling this service + //This is done, because the "NewMails" queue is not synchronised. It is because it is new queue. Only this thread uses new queue yet, it is not + //connected to account mail queue. + // CallService(MS_YAMN_FILTERMAIL,(WPARAM)ActualAccount,(LPARAM)MsgQueuePtr); + FilterMailSvc((WPARAM)ActualAccount, (LPARAM)MsgQueuePtr); + + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + + //MsgQueuePtr->MailData->Body=MyClient->Retr(MsgQueuePtr->Number); + + MsgQueuePtr = MsgQueuePtr->Next; + + } + + if (WAIT_OBJECT_0 != MsgsWaitToWrite(ActualAccount)) + throw (uint32_t)ActualAccount->SystemError == EACC_STOPPED; + + if (ActualAccount->Mails == nullptr) + ActualAccount->Mails = NewMails; + else { + ActualAccount->LastMail = ActualAccount->LastChecked; + AppendQueue((HYAMNMAIL)ActualAccount->Mails, NewMails); + } + + MsgsWriteDone(ActualAccount); + + // we are going to delete mails having SPAM flag level3 and 4 (see m_mails.h) set + { + struct DeleteParam ParamToDeleteMails = {YAMN_DELETEVERSION, INVALID_HANDLE_VALUE, ActualAccount, YAMNParam, (void *)POP3_DELETEFROMCHECK}; + + // Delete mails from server. Here we should not be in write access for account's mails + DeleteMailsPOP3(&ParamToDeleteMails); + } + + // if there is no waiting thread for internet connection close it + // else leave connection open + if (0 == SCGetNumber(ActualAccount->InternetQueries)) { + DataRX = MyClient->Quit(); + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + MyClient->NetClient->Disconnect(); + + SetAccountStatus(ActualAccount, TranslateT("Disconnected")); + } + + UsingInternet = FALSE; + SetEvent(ActualAccount->UseInternetFree); + + ActualAccount->LastSChecked = ActualAccount->LastChecked; + ActualAccount->LastSynchronised = ActualAccount->LastChecked; + } + catch (...) { + throw; //go to the main exception handling + } + + { + YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, ActualAccount, ActualCopied.NFlags, ActualCopied.NNFlags, YAMNParam}; + + if (CheckFlags & YAMN_FORCECHECK) + Param.nnflags |= YAMN_ACC_POP; //if force check, show popup anyway and if mailbrowser was opened, do not close + Param.nnflags |= YAMN_ACC_MSGP; //do not close browser if already open + CallService(MS_YAMN_MAILBROWSER, (WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); + } + SetContactStatus(ActualAccount, ActualAccount->isCounting ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE); + } + #ifdef DEBUG_COMM + catch (uint32_t ErrorCode) + #else + catch (uint32_t) + #endif + { + if (ActualAccount->Client.POP3Error == EPOP3_STOPPED) + ActualAccount->SystemError = EACC_STOPPED; + #ifdef DEBUG_COMM + DebugLog(CommFile, "ERROR: %x\n", ErrorCode); + #endif + if (WAIT_OBJECT_0 == MsgsWaitToWrite(ActualAccount)) { + ActualAccount->LastChecked = now; + MsgsWriteDone(ActualAccount); + } + + DeleteMIMEQueue(ActualAccount, NewMails); + + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + switch (ActualAccount->SystemError) { + case EACC_QUEUEALLOC: + case EACC_STOPPED: + ActualAccount->Client.NetClient->Disconnect(); + break; + default: + PostErrorProc(ActualAccount, YAMNParam, (uint32_t)NULL, MyClient->SSL); //it closes internet connection too + } + + if (UsingInternet) //if our thread still uses internet + SetEvent(ActualAccount->UseInternetFree); + + SetContactStatus(ActualAccount, ID_STATUS_NA); + } + free(ActualCopied.ServerName); + free(ActualCopied.ServerLogin); + free(ActualCopied.ServerPasswd); + #ifdef DEBUG_COMM + DebugLog(CommFile, "\n"); + #endif + + // WriteAccounts(); + SCDec(ActualAccount->UsingThreads); + return 0; +} + +void __cdecl DeleteMailsPOP3(void *param) +{ + DeleteParam *WhichTemp = (DeleteParam *)param; + + CPop3Client *MyClient; + HYAMNMAIL DeleteMails, NewMails = nullptr, MsgQueuePtr = nullptr; + char *DataRX = nullptr; + int mboxsize = 0, msgs = 0, i; + BOOL UsingInternet = FALSE; + struct + { + char *ServerName; + uint32_t ServerPort; + char *ServerLogin; + char *ServerPasswd; + uint32_t Flags; + uint32_t NFlags; + uint32_t NNFlags; + } ActualCopied; + + //First, we should compare our version of DeleteParam structure, but here it is not needed, because YAMN and internal plugin + //have the same version. But your plugin should do that in this way: + // if (((struct DeleteParam *)WhichTemp)->Ver != YAMN_DELETEVERSION) + // { + // SetEvent(((struct DeleteParam *)WhichTemp)->ThreadRunningEV); //don't forget to unblock YAMN + // return (uint32_t)-1; //ok, but we should return value. + // //When our plugin returns e.g. 0xFFFFFFFF (this is only our plugin value, YAMN does nothing with return value, + // //but only tests if it is nonzero. If yes, it calls GetErrorStringFcn), we know problem occured in YAMN incompatibility + // //and then we can in our GetErrorStringFcn e.g. return string "Uncompatible version of YAMN". + // } + + HPOP3ACCOUNT ActualAccount = (HPOP3ACCOUNT)WhichTemp->AccountParam; //copy address of structure from calling thread to stack of this thread + LPVOID YAMNParam = WhichTemp->BrowserParam; + UINT_PTR POP3PluginParam = (UINT_PTR)((struct DeleteParam *)WhichTemp)->CustomParam; + + SCInc(ActualAccount->UsingThreads); + if (INVALID_HANDLE_VALUE != WhichTemp->ThreadRunningEV) + SetEvent(WhichTemp->ThreadRunningEV); + + if (WAIT_OBJECT_0 != WaitToRead(ActualAccount)) { + SCDec(ActualAccount->UsingThreads); + return; + } + + if (nullptr == (DeleteMails = (HYAMNMAIL)CreateNewDeleteQueue((HYAMNMAIL)ActualAccount->Mails))) //if there's no mail for deleting, return + { + if (POP3_DELETEFROMCHECK != POP3PluginParam) //We do not wait for free internet when calling from SynchroPOP3. It is because UseInternetFree is blocked + { + YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, ActualAccount, YAMN_ACC_MSGP, YAMN_ACC_MSGP, YAMNParam}; //Just update the window + CallService(MS_YAMN_MAILBROWSER, (WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); + } + + SCDec(ActualAccount->UsingThreads); + return; + } + + MyClient = &(ActualAccount->Client); + + //Now, copy all needed information about account to local variables, so ActualAccount is not blocked in read mode during all connection process, which can last for several minutes. + ActualCopied.ServerName = _strdup(ActualAccount->Server->Name); + ActualCopied.ServerPort = ActualAccount->Server->Port; + ActualCopied.Flags = ActualAccount->Flags; + ActualCopied.ServerLogin = _strdup(ActualAccount->Server->Login); + ActualCopied.ServerPasswd = _strdup(ActualAccount->Server->Passwd); + ActualCopied.NFlags = ActualAccount->NewMailN.Flags; + ActualCopied.NNFlags = ActualAccount->NoNewMailN.Flags; + + ReadDone(ActualAccount); + + SCInc(ActualAccount->InternetQueries); //This is POP3-internal SCOUNTER, we set another thread wait for this account to be connected to inet + if (POP3_DELETEFROMCHECK != POP3PluginParam) //We do not wait for free internet when calling from SynchroPOP3. It is because UseInternetFree is blocked + WaitForSingleObject(ActualAccount->UseInternetFree, INFINITE); + + SCDec(ActualAccount->InternetQueries); + UsingInternet = TRUE; + + try { + SetContactStatus(ActualAccount, ID_STATUS_OCCUPIED); + #ifdef DEBUG_COMM + DebugLog(CommFile, "<--------Communication-------->\n"); + #endif + if ((MyClient->NetClient == nullptr) || !MyClient->NetClient->Connected()) { + SetAccountStatus(ActualAccount, TranslateT("Connecting to server")); + + DataRX = MyClient->Connect(ActualCopied.ServerName, ActualCopied.ServerPort, ActualCopied.Flags & YAMN_ACC_SSL23, ActualCopied.Flags & YAMN_ACC_NOTLS); + + char *timestamp = nullptr; + if (DataRX != nullptr) { + if (ActualAccount->Flags & YAMN_ACC_APOP) { + char *lpos = strchr(DataRX, '<'); + char *rpos = strchr(DataRX, '>'); + if (lpos && rpos && rpos > lpos) { + int sz = (int)(rpos - lpos + 2); + timestamp = new char[sz]; + memcpy(timestamp, lpos, sz - 1); + timestamp[sz - 1] = '\0'; + } + } + free(DataRX); + DataRX = nullptr; + } + SetAccountStatus(ActualAccount, TranslateT("Entering POP3 account")); + + if (ActualAccount->Flags & YAMN_ACC_APOP) { + DataRX = MyClient->APOP(ActualCopied.ServerLogin, ActualCopied.ServerPasswd, timestamp); + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + delete[] timestamp; + } + else { + DataRX = MyClient->User(ActualCopied.ServerLogin); + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + DataRX = MyClient->Pass(ActualCopied.ServerPasswd); + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + } + } + + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "<--------Deleting requested mails-------->\n"); + #endif + if (POP3_DELETEFROMCHECK != POP3PluginParam) //We do not need to get mails on server as we have already it from check function + { + SetAccountStatus(ActualAccount, TranslateT("Deleting requested mails")); + + DataRX = MyClient->Stat(); + + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + ExtractStat(DataRX, &mboxsize, &msgs); + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "%d\n", mboxsize); + DebugLog(DecodeFile, "%d\n", msgs); + DebugLog(DecodeFile, "\n"); + #endif + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + for (i = 0; i < msgs; i++) { + if (!i) + MsgQueuePtr = NewMails = (HYAMNMAIL)CallService(MS_YAMN_CREATEACCOUNTMAIL, (WPARAM)ActualAccount, (LPARAM)YAMN_MAILVERSION); + else { + MsgQueuePtr->Next = (HYAMNMAIL)CallService(MS_YAMN_CREATEACCOUNTMAIL, (WPARAM)ActualAccount, (LPARAM)YAMN_MAILVERSION); + MsgQueuePtr = MsgQueuePtr->Next; + } + if (MsgQueuePtr == nullptr) { + ActualAccount->SystemError = EPOP3_QUEUEALLOC; + throw (uint32_t)ActualAccount->SystemError; + } + } + + if (msgs) { + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + DataRX = MyClient->Uidl(); + ExtractUIDL(DataRX, MyClient->NetClient->Rcv, NewMails); + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + // we get "new mails" on server (NewMails will contain all mails on server not found in DeleteMails) + // but also in DeleteMails we get only those, which are still on server with their responsable numbers + SynchroMessages(ActualAccount, (HYAMNMAIL *)&DeleteMails, nullptr, (HYAMNMAIL *)&NewMails, nullptr); + } + } + else SetAccountStatus(ActualAccount, TranslateT("Deleting spam")); + + if (WAIT_OBJECT_0 != MsgsWaitToWrite(ActualAccount)) + throw (uint32_t)EACC_STOPPED; + + if (msgs || POP3_DELETEFROMCHECK == POP3PluginParam) { + try { + HYAMNMAIL Temp; + + for (i = 0, MsgQueuePtr = DeleteMails; MsgQueuePtr != nullptr; i++) { + if (!(MsgQueuePtr->Flags & YAMN_MSG_VIRTUAL)) //of course we can only delete real mails, not virtual + { + DataRX = MyClient->Dele(MsgQueuePtr->Number); + Temp = MsgQueuePtr->Next; + if (POP3_FOK == MyClient->AckFlag) //if server answers that mail was deleted + { + DeleteMIMEMessage((HYAMNMAIL *)&DeleteMails, MsgQueuePtr); + HYAMNMAIL DeletedMail = FindMIMEMessageByID((HYAMNMAIL)ActualAccount->Mails, MsgQueuePtr->ID); + if ((MsgQueuePtr->Flags & YAMN_MSG_MEMDELETE)) //if mail should be deleted from memory (or disk) + { + DeleteMIMEMessage((HYAMNMAIL *)&ActualAccount->Mails, DeletedMail); //remove from queue + CallService(MS_YAMN_DELETEACCOUNTMAIL, (WPARAM)POP3Plugin, (LPARAM)DeletedMail); + } + else //else mark it only as "deleted mail" + { + DeletedMail->Flags |= (YAMN_MSG_VIRTUAL | YAMN_MSG_DELETED); + DeletedMail->Flags &= ~(YAMN_MSG_NEW | YAMN_MSG_USERDELETE | YAMN_MSG_AUTODELETE); //clear "new mail" + } + delete MsgQueuePtr->MailData; + delete[] MsgQueuePtr->ID; + delete MsgQueuePtr; + } + MsgQueuePtr = Temp; + + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + } + else + MsgQueuePtr = MsgQueuePtr->Next; + } + } + catch (...) //if any exception in the code where we have write-access to account occured, don't forget to leave write-access + { + MsgsWriteDone(ActualAccount); + throw; //and go to the main exception handling + } + + if (NewMails != nullptr) + // in ActualAccount->Mails we have all mails stored before calling this function + // in NewMails we have all mails not found in DeleteMails (in other words: we performed new ID checking and we + // stored all mails found on server, then we deleted the ones we wanted to delete in this function + // and NewMails queue now contains actual state of mails on server). But we will not use NewMails as actual state, because NewMails does not contain header data (subject, from...) + // We perform deleting from ActualAccount->Mails: we remove from original queue (ActualAccount->Mails) all deleted mails + SynchroMessages(ActualAccount, (HYAMNMAIL *)&ActualAccount->Mails, nullptr, (HYAMNMAIL *)&NewMails, nullptr); + // Now ActualAccount->Mails contains all mails when calling this function except the ones, we wanted to delete (these are in DeleteMails) + // And in NewMails we have new mails (if any) + else if (POP3_DELETEFROMCHECK != POP3PluginParam) { + DeleteMIMEQueue(ActualAccount, (HYAMNMAIL)ActualAccount->Mails); + ActualAccount->Mails = nullptr; + } + } + else { + DeleteMIMEQueue(ActualAccount, (HYAMNMAIL)ActualAccount->Mails); + ActualAccount->Mails = nullptr; + } + + MsgsWriteDone(ActualAccount); + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + + // TODO: now, we have in NewMails new mails. If NewMails is not NULL, we found some new mails, so Checking for new mail should be performed + // now, we do not call CheckPOP3 + + // if there is no waiting thread for internet connection close it + // else leave connection open + // if this functin was called from SynchroPOP3, then do not try to disconnect + if (POP3_DELETEFROMCHECK != POP3PluginParam) { + YAMN_MAILBROWSERPARAM Param = {(HANDLE)nullptr, ActualAccount, ActualCopied.NFlags, YAMN_ACC_MSGP, YAMNParam}; + + CallService(MS_YAMN_MAILBROWSER, (WPARAM)&Param, (LPARAM)YAMN_MAILBROWSERVERSION); + + if (0 == SCGetNumber(ActualAccount->InternetQueries)) { + DataRX = MyClient->Quit(); + if (DataRX != nullptr) + free(DataRX); + DataRX = nullptr; + MyClient->NetClient->Disconnect(); + + SetAccountStatus(ActualAccount, TranslateT("Disconnected")); + } + + UsingInternet = FALSE; + SetEvent(ActualAccount->UseInternetFree); + } + SetContactStatus(ActualAccount, ActualAccount->isCounting ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE); + } + #ifdef DEBUG_COMM + catch (uint32_t ErrorCode) + #else + catch (uint32_t) + #endif + { + if (ActualAccount->Client.POP3Error == EPOP3_STOPPED) + ActualAccount->SystemError = EACC_STOPPED; + #ifdef DEBUG_COMM + DebugLog(CommFile, "ERROR %x\n", ErrorCode); + #endif + if (DataRX != nullptr) + free(DataRX); + switch (ActualAccount->SystemError) { + case EACC_QUEUEALLOC: + case EACC_STOPPED: + ActualAccount->Client.NetClient->Disconnect(); + break; + default: + PostErrorProc(ActualAccount, YAMNParam, POP3PluginParam, MyClient->SSL); //it closes internet connection too + } + + if (UsingInternet && (POP3_DELETEFROMCHECK != POP3PluginParam)) //if our thread still uses internet and it is needed to release internet + SetEvent(ActualAccount->UseInternetFree); + } + + free(ActualCopied.ServerName); + free(ActualCopied.ServerLogin); + free(ActualCopied.ServerPasswd); + + DeleteMIMEQueue(ActualAccount, NewMails); + DeleteMIMEQueue(ActualAccount, DeleteMails); + + #ifdef DEBUG_COMM + DebugLog(CommFile, "\n"); + #endif + + // WriteAccounts(); + SCDec(ActualAccount->UsingThreads); + return; +} + +void ExtractStat(char *stream, int *mboxsize, int *mails) +{ + char *finder = stream; + while (WS(finder) || ENDLINE(finder)) finder++; + if (ACKLINE(finder)) { + while (!WS(finder)) finder++; + while (WS(finder)) finder++; + } + if (1 != sscanf(finder, "%d", mails)) + throw (uint32_t)EPOP3_STAT; + while (!WS(finder)) finder++; + while (WS(finder)) finder++; + if (1 != sscanf(finder, "%d", mboxsize)) + throw (uint32_t)EPOP3_STAT; +} +void ExtractMail(char *stream, int len, HYAMNMAIL queue) +{ + char *finder = stream; + char *finderend; + int msgnr, i; + HYAMNMAIL queueptr = queue; + + while (WS(finder) || ENDLINE(finder)) finder++; + while (!ACKLINE(finder)) finder++; + while (!ENDLINE(finder)) finder++; //now we at the end of first ack line + while (finder <= (stream + len)) { + while (ENDLINE(finder)) finder++; //go to the new line + if (DOTLINE(finder + 1)) //at the end of stream + break; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + while (WS(finder)) finder++; //jump whitespace + if (1 != sscanf(finder, "%d", &msgnr)) + throw (uint32_t)EPOP3_UIDL; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "%d\n", msgnr); + #endif + // for (i=1,queueptr=queue;(queueptr->Next != NULL) && (iNext,i++); + // if (i != msgnr) + // throw (uint32_t)EPOP3_UIDL; + while (!WS(finder)) finder++; //jump characters + while (WS(finder)) finder++; //jump whitespace + finderend = finder + 1; + while (!WS(finderend) && !ENDLINE(finderend)) finderend++; + queueptr->ID = new char[finderend - finder + 1]; + for (i = 0; finder != finderend; finder++, i++) + queueptr->MailData->Body[i] = *finder; + queueptr->MailData->Body[i] = 0; //ends string + queueptr->Number = msgnr; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "%s\n", queueptr->MailData->Body); + DebugLog(DecodeFile, "\n"); + #endif + queueptr = queueptr->Next; + while (!ENDLINE(finder)) finder++; + } +} + +void ExtractUIDL(char *stream, int len, HYAMNMAIL queue) +{ + char *finder = stream; + char *finderend; + int msgnr, i; + HYAMNMAIL queueptr = queue; + + while (WS(finder) || ENDLINE(finder)) finder++; + while (!ACKLINE(finder)) finder++; + while (!ENDLINE(finder)) finder++; //now we at the end of first ack line + while (finder <= (stream + len)) { + while (ENDLINE(finder)) finder++; //go to the new line + if (DOTLINE(finder + 1)) //at the end of stream + break; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n"); + #endif + while (WS(finder)) finder++; //jump whitespace + if (1 != sscanf(finder, "%d", &msgnr)) + throw (uint32_t)EPOP3_UIDL; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "%d\n", msgnr); + #endif + // for (i=1,queueptr=queue;(queueptr->Next != NULL) && (iNext,i++); + // if (i != msgnr) + // throw (uint32_t)EPOP3_UIDL; + while (!WS(finder)) finder++; //jump characters + while (WS(finder)) finder++; //jump whitespace + finderend = finder + 1; + while (!WS(finderend) && !ENDLINE(finderend)) finderend++; + queueptr->ID = new char[finderend - finder + 1]; + for (i = 0; finder != finderend; finder++, i++) + queueptr->ID[i] = *finder; + queueptr->ID[i] = 0; //ends string + queueptr->Number = msgnr; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "%s\n", queueptr->ID); + DebugLog(DecodeFile, "\n"); + #endif + queueptr = queueptr->Next; + while (!ENDLINE(finder)) finder++; + } +} + +void ExtractList(char *stream, int len, HYAMNMAIL queue) +{ + char *finder = stream; + char *finderend; + int msgnr, i; + HYAMNMAIL queueptr; + + while (WS(finder) || ENDLINE(finder)) finder++; + while (!ACKLINE(finder)) finder++; + while (!ENDLINE(finder)) finder++; //now we at the end of first ack line + while (finder <= (stream + len)) { + while (ENDLINE(finder)) finder++; //go to the new line + if (DOTLINE(finder + 1)) //at the end of stream + break; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "\n", NULL, 0); + #endif + while (WS(finder)) finder++; //jump whitespace + if (1 != sscanf(finder, "%d", &msgnr)) //message nr. + throw (uint32_t)EPOP3_LIST; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "%d\n", msgnr); + #endif + + for (i = 1, queueptr = queue; (queueptr->Next != nullptr) && (i < msgnr); queueptr = queueptr->Next, i++); + if (i != msgnr) + throw (uint32_t)EPOP3_LIST; + while (!WS(finder)) finder++; //jump characters + while (WS(finder)) finder++; //jump whitespace + finderend = finder + 1; + if (1 != sscanf(finder, "%u", &queueptr->MailData->Size)) + throw (uint32_t)EPOP3_LIST; + #ifdef DEBUG_DECODE + DebugLog(DecodeFile, "%d\n", queueptr->MailData->Size); + #endif + while (!ENDLINE(finder)) finder++; + } +} + +wchar_t *WINAPI GetErrorString(DWORD Code) +{ + static wchar_t *POP3Errors[] = + { + LPGENW("Memory allocation error."), //memory allocation + LPGENW("Account is about to be stopped."), //stop account + LPGENW("Cannot connect to POP3 server."), + LPGENW("Cannot allocate memory for received data."), + LPGENW("Cannot login to POP3 server."), + LPGENW("Bad user or password."), + LPGENW("Server does not support APOP authorization."), + LPGENW("Error while executing POP3 command."), + LPGENW("Error while executing POP3 command."), + LPGENW("Error while executing POP3 command."), + }; + + static wchar_t *NetlibErrors[] = + { + LPGENW("Cannot connect to server with NetLib."), + LPGENW("Cannot send data."), + LPGENW("Cannot receive data."), + LPGENW("Cannot allocate memory for received data."), + }; + + static wchar_t *SSLErrors[] = + { + LPGENW("OpenSSL not loaded."), + LPGENW("Windows socket 2.0 init failed."), + LPGENW("DNS lookup error."), + LPGENW("Error while creating base socket."), + LPGENW("Error connecting to server with socket."), + LPGENW("Error while creating SSL structure."), + LPGENW("Error connecting socket with SSL."), + LPGENW("Server rejected connection with SSL."), + LPGENW("Cannot write SSL data."), + LPGENW("Cannot read SSL data."), + LPGENW("Cannot allocate memory for received data."), + }; + + wchar_t *ErrorString = new wchar_t[ERRORSTR_MAXLEN]; + POP3_ERRORCODE *ErrorCode = (POP3_ERRORCODE *)(UINT_PTR)Code; + + mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, TranslateT("Error %d-%d-%d-%d:"), ErrorCode->AppError, ErrorCode->POP3Error, ErrorCode->NetError, ErrorCode->SystemError); + if (ErrorCode->POP3Error) + mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateW(POP3Errors[ErrorCode->POP3Error - 1])); + if (ErrorCode->NetError) { + if (ErrorCode->SSL) + mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateW(SSLErrors[ErrorCode->NetError - 1])); + else + mir_snwprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateW(NetlibErrors[ErrorCode->NetError - 4])); + } + + return ErrorString; +} + +void WINAPI DeleteErrorString(LPVOID String) +{ + delete (char *)String; +} diff --git a/protocols/YAMN/src/proto/pop3/pop3opt.cpp b/protocols/YAMN/src/proto/pop3/pop3opt.cpp index 80764d85bb..a1dfa14199 100644 --- a/protocols/YAMN/src/proto/pop3/pop3opt.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3opt.cpp @@ -1,1137 +1,1137 @@ -/* - * This code implements POP3 options window handling - * - * (c) majvan 2002-2003 -*/ - -#include "../../stdafx.h" - -//-------------------------------------------------------------------------------------------------- - -static char DlgInput[MAX_PATH]; - -static BOOL DlgSetItemText(HWND hDlg, WPARAM wParam, const char *str) -{ - if (str == nullptr) - SetDlgItemTextA(hDlg, wParam, ""); - else - SetDlgItemTextA(hDlg, wParam, str); - return TRUE; -} - -static BOOL DlgSetItemTextW(HWND hDlg, WPARAM wParam, const wchar_t *str) -{ - if (str == nullptr) - SetDlgItemTextW(hDlg, wParam, L""); - else - SetDlgItemTextW(hDlg, wParam, str); - return TRUE; -} - -struct CBaseOptionsDlg : public CDlgBase -{ - CBaseOptionsDlg(int iDlgId) : - CDlgBase(g_plugin, iDlgId) - {} - - void DlgShowAccount(HPOP3ACCOUNT pAccount) - { - int i; - - if (pAccount) { - // we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread - WaitToRead(pAccount); - - DlgSetItemText(m_hwnd, IDC_EDITSERVER, pAccount->Server->Name); - DlgSetItemText(m_hwnd, IDC_EDITNAME, pAccount->Name); - DlgSetItemText(m_hwnd, IDC_EDITLOGIN, pAccount->Server->Login); - DlgSetItemText(m_hwnd, IDC_EDITPASS, pAccount->Server->Passwd); - DlgSetItemTextW(m_hwnd, IDC_EDITAPP, pAccount->NewMailN.App); - DlgSetItemTextW(m_hwnd, IDC_EDITAPPPARAM, pAccount->NewMailN.AppParam); - SetDlgItemInt(m_hwnd, IDC_EDITPORT, pAccount->Server->Port, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITINTERVAL, pAccount->Interval / 60, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITPOPS, pAccount->NewMailN.PopupTime, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITNPOPS, pAccount->NoNewMailN.PopupTime, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITFPOPS, pAccount->BadConnectN.PopupTime, FALSE); - for (i = 0; i <= CPLENSUPP; i++) - if ((i < CPLENSUPP) && (CodePageNamesSupp[i].CP == pAccount->CP)) { - SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_SETCURSEL, (WPARAM)i, 0); - break; - } - - if (i == CPLENSUPP) - SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_SETCURSEL, (WPARAM)CPDEFINDEX, 0); - - CheckDlgButton(m_hwnd, IDC_CHECK, pAccount->Flags & YAMN_ACC_ENA ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKSND, pAccount->NewMailN.Flags & YAMN_ACC_SND ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKMSG, pAccount->NewMailN.Flags & YAMN_ACC_MSG ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKICO, pAccount->NewMailN.Flags & YAMN_ACC_ICO ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKPOP, pAccount->NewMailN.Flags & YAMN_ACC_POP ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKCOL, pAccount->NewMailN.Flags & YAMN_ACC_POPC ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKAPP, pAccount->NewMailN.Flags & YAMN_ACC_APP ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKKBN, pAccount->NewMailN.Flags & YAMN_ACC_KBN ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKNPOP, pAccount->NoNewMailN.Flags & YAMN_ACC_POP ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKNCOL, pAccount->NoNewMailN.Flags & YAMN_ACC_POPC ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKNMSGP, pAccount->NoNewMailN.Flags & YAMN_ACC_MSGP ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFSND, pAccount->BadConnectN.Flags & YAMN_ACC_SND ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFMSG, pAccount->BadConnectN.Flags & YAMN_ACC_MSG ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFICO, pAccount->BadConnectN.Flags & YAMN_ACC_ICO ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFPOP, pAccount->BadConnectN.Flags & YAMN_ACC_POP ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFCOL, pAccount->BadConnectN.Flags & YAMN_ACC_POPC ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_RADIOPOPN, pAccount->Flags & YAMN_ACC_POPN ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_RADIOPOP1, pAccount->Flags & YAMN_ACC_POPN ? BST_UNCHECKED : BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKSSL, pAccount->Flags & YAMN_ACC_SSL23 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKNOTLS, pAccount->Flags & YAMN_ACC_NOTLS ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKAPOP, pAccount->Flags & YAMN_ACC_APOP ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_AUTOBODY, pAccount->Flags & YAMN_ACC_BODY ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKSTART, pAccount->StatusFlags & YAMN_ACC_STARTS ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFORCE, pAccount->StatusFlags & YAMN_ACC_FORCE ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKCONTACT, pAccount->NewMailN.Flags & YAMN_ACC_CONT ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKCONTACTNICK, pAccount->NewMailN.Flags & YAMN_ACC_CONTNICK ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKCONTACTNOEVENT, pAccount->NewMailN.Flags & YAMN_ACC_CONTNOEVENT ? BST_CHECKED : BST_UNCHECKED); - - wchar_t accstatus[256]; - GetAccountStatus(pAccount, accstatus); - SetDlgItemText(m_hwnd, IDC_STSTATUS, accstatus); - ReadDone(pAccount); - } - else { - DlgSetItemText(m_hwnd, IDC_EDITSERVER, nullptr); - DlgSetItemText(m_hwnd, IDC_EDITNAME, nullptr); - DlgSetItemText(m_hwnd, IDC_EDITLOGIN, nullptr); - DlgSetItemText(m_hwnd, IDC_EDITPASS, nullptr); - DlgSetItemText(m_hwnd, IDC_EDITAPP, nullptr); - DlgSetItemText(m_hwnd, IDC_EDITAPPPARAM, nullptr); - DlgSetItemText(m_hwnd, IDC_STTIMELEFT, nullptr); - SetDlgItemInt(m_hwnd, IDC_EDITPORT, 110, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITINTERVAL, 30, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITPOPS, 0, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITNPOPS, 0, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITFPOPS, 0, FALSE); - SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_SETCURSEL, (WPARAM)CPDEFINDEX, 0); - CheckDlgButton(m_hwnd, IDC_CHECK, BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKSND, BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKMSG, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKICO, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKPOP, BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKCOL, BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKAPP, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFSND, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFMSG, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFICO, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFPOP, BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFCOL, BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKSTART, BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKFORCE, BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_RADIOPOPN, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_RADIOPOP1, BST_CHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKSSL, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKNOTLS, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKAPOP, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_AUTOBODY, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CHECKCONTACT, BST_CHECKED); - - SetDlgItemText(m_hwnd, IDC_STSTATUS, TranslateT("No account selected")); - } - } -}; - -//======================================================================================= -// General options dialog - -struct CGeneralOptDlg : public CBaseOptionsDlg -{ - CGeneralOptDlg() : - CBaseOptionsDlg(IDD_YAMNOPT) - {} - - bool OnInitDialog() override - { - CheckDlgButton(m_hwnd, IDC_CHECKTTB, g_plugin.getByte(YAMN_TTBFCHECK, 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_LONGDATE, (optDateTime & SHOWDATELONG) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_SMARTDATE, (optDateTime & SHOWDATENOTODAY) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_NOSECONDS, (optDateTime & SHOWDATENOSECONDS) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_CLOSEONDELETE, g_plugin.getByte(YAMN_CLOSEDELETE, 0) ? BST_CHECKED : BST_UNCHECKED); - return true; - } - - bool OnApply() override - { - g_plugin.setByte(YAMN_CLOSEDELETE, IsDlgButtonChecked(m_hwnd, IDC_CLOSEONDELETE)); - g_plugin.setByte(YAMN_TTBFCHECK, IsDlgButtonChecked(m_hwnd, IDC_CHECKTTB)); - - AddTopToolbarIcon(0, 0); - - optDateTime = 0; - if (IsDlgButtonChecked(m_hwnd, IDC_LONGDATE)) optDateTime |= SHOWDATELONG; - if (IsDlgButtonChecked(m_hwnd, IDC_SMARTDATE)) optDateTime |= SHOWDATENOTODAY; - if (IsDlgButtonChecked(m_hwnd, IDC_NOSECONDS)) optDateTime |= SHOWDATENOSECONDS; - g_plugin.setByte(YAMN_DBTIMEOPTIONS, optDateTime); - return true; - } -}; - -//-------------------------------------------------------------------------------------------------- - -static int g_iStatusControls[] = {IDC_CHECKST0, IDC_CHECKST1, IDC_CHECKST2, IDC_CHECKST3, IDC_CHECKST4, IDC_CHECKST5, IDC_CHECKST6, IDC_CHECKST7}; - -static BOOL DlgShowAccountStatus(HWND hDlg, HPOP3ACCOUNT ActualAccount) -{ - if (ActualAccount) { - WaitToRead(ActualAccount); //we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread - - CheckDlgButton(hDlg, IDC_CHECKST0, ActualAccount->StatusFlags & YAMN_ACC_ST0 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST1, ActualAccount->StatusFlags & YAMN_ACC_ST1 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST2, ActualAccount->StatusFlags & YAMN_ACC_ST2 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST3, ActualAccount->StatusFlags & YAMN_ACC_ST3 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST4, ActualAccount->StatusFlags & YAMN_ACC_ST4 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST5, ActualAccount->StatusFlags & YAMN_ACC_ST5 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST6, ActualAccount->StatusFlags & YAMN_ACC_ST6 ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST7, ActualAccount->StatusFlags & YAMN_ACC_ST7 ? BST_CHECKED : BST_UNCHECKED); - - ReadDone(ActualAccount); - } - else { - CheckDlgButton(hDlg, IDC_CHECKST0, BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST1, BST_CHECKED); - CheckDlgButton(hDlg, IDC_CHECKST2, BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST3, BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST4, BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST5, BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST6, BST_UNCHECKED); - CheckDlgButton(hDlg, IDC_CHECKST7, BST_CHECKED); - } - return TRUE; -} - -static INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM) -{ - static HPOP3ACCOUNT ActualAccount; - switch (msg) { - case WM_INITDIALOG: - ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput); - if (ActualAccount != nullptr) { - DlgShowAccountStatus(hDlg, ActualAccount); - for (auto &it : g_iStatusControls) - EnableWindow(GetDlgItem(hDlg, it), true); - } - else { - for (auto &it : g_iStatusControls) - CheckDlgButton(hDlg, it, BST_CHECKED); - } - TranslateDialogDefault(hDlg); - SendMessage(GetParent(hDlg), PSM_UNCHANGED, (WPARAM)hDlg, 0); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDCANCEL: - EndDialog(hDlg, 0); - DestroyWindow(hDlg); - break; - - case IDOK: - int iShift = 1; - ActualAccount->StatusFlags = 0; - for (auto &it : g_iStatusControls) { - if (IsDlgButtonChecked(hDlg, it)) - ActualAccount->StatusFlags |= iShift; - iShift <<= 1; - } - - WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_CHANGESTATUSOPTION, 0, 0); - EndDialog(hDlg, 0); - DestroyWindow(hDlg); - break; - } - } - return FALSE; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Account options - -class CAccOptDlg : public CBaseOptionsDlg -{ - INT_PTR Result; - UCHAR ActualStatus; - HPOP3ACCOUNT ActualAccount = nullptr; - - CCtrlCheck chkContact, chkSsl, chkApp; - CCtrlCombo cmbAccount, cmbCP; - CCtrlButton btnStatus, btnAdd, btnDel, btnApp, btnDefault, btnReset; - - void DlgEnableAccount(bool bEnable) - { - cmbAccount.Enable(POP3Plugin->FirstAccount != nullptr); - - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECK), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITSERVER), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITNAME), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITPORT), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITLOGIN), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITPASS), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITINTERVAL), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKSND), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKMSG), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKICO), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKAPP), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKKBN), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNAPP), chkApp.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITAPP), chkApp.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITAPPPARAM), chkApp.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKNMSGP), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKFSND), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKFMSG), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKFICO), bEnable); - - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKSTART), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKFORCE), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_COMBOCP), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_STTIMELEFT), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNRESET), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEFAULT), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNSTATUS), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKSSL), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKAPOP), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKNOTLS), chkSsl.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_AUTOBODY), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACT), bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACTNICK), chkContact.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACTNOEVENT), chkContact.IsChecked() && bEnable); - } - -public: - CAccOptDlg() : - CBaseOptionsDlg(IDD_POP3ACCOUNTOPT), - cmbCP(this, IDC_COMBOCP), - btnAdd(this, IDC_BTNADD), - btnApp(this, IDC_BTNAPP), - btnDel(this, IDC_BTNDEL), - chkApp(this, IDC_CHECKAPP), - chkSsl(this, IDC_CHECKSSL), - btnReset(this, IDC_BTNRESET), - btnStatus(this, IDC_BTNSTATUS), - btnDefault(this, IDC_BTNDEFAULT), - cmbAccount(this, IDC_COMBOACCOUNT), - chkContact(this, IDC_CHECKCONTACT) - { - cmbCP.OnSelChanged = Callback(this, &CAccOptDlg::onSelChange_CP); - - cmbAccount.OnChange = Callback(this, &CAccOptDlg::onChange_Account); - cmbAccount.OnKillFocus = Callback(this, &CAccOptDlg::onKillFocus_Account); - cmbAccount.OnSelChanged = Callback(this, &CAccOptDlg::onSelChange_Account); - - chkApp.OnChange = Callback(this, &CAccOptDlg::onChangeApp); - chkSsl.OnChange = Callback(this, &CAccOptDlg::onChangeSsl); - chkContact.OnChange = Callback(this, &CAccOptDlg::onChangeContact); - - btnAdd.OnClick = Callback(this, &CAccOptDlg::onClick_Add); - btnDel.OnClick = Callback(this, &CAccOptDlg::onClick_Del); - btnApp.OnClick = Callback(this, &CAccOptDlg::onClick_App); - btnReset.OnClick = Callback(this, &CAccOptDlg::onClick_Reset); - btnStatus.OnClick = Callback(this, &CAccOptDlg::onClick_Status); - btnDefault.OnClick = Callback(this, &CAccOptDlg::onClick_Default); - } - - bool OnInitDialog() override - { - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); - - DlgEnableAccount(false); - DlgShowAccount(0); - - // Fill accounts - WaitToReadSO(POP3Plugin->AccountBrowserSO); - - for (ActualAccount = (HPOP3ACCOUNT)POP3Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = (HPOP3ACCOUNT)ActualAccount->Next) - if (ActualAccount->Name != nullptr) - cmbAccount.AddStringA(ActualAccount->Name); - cmbAccount.SetCurSel(0); - - ReadDoneSO(POP3Plugin->AccountBrowserSO); - - // Fill code pages - cmbCP.AddString(TranslateT("Default")); - for (int i = 1; i < CPLENSUPP; i++) { - CPINFOEX info; GetCPInfoEx(CodePageNamesSupp[i].CP, 0, &info); - size_t len = mir_wstrlen(info.CodePageName + 7); - info.CodePageName[len + 6] = 0; - cmbCP.AddString(info.CodePageName + 7); - } - cmbCP.SetCurSel(0); - - ActualAccount = nullptr; - SendMessage(GetParent(m_hwnd), PSM_UNCHANGED, (WPARAM)m_hwnd, 0); - - WindowList_Add(pYAMNVar->MessageWnds, m_hwnd); - return true; - } - - void OnDestroy() override - { - WindowList_Remove(pYAMNVar->MessageWnds, m_hwnd); - } - - INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override - { - switch (msg) { - case WM_YAMN_CHANGESTATUS: - if ((HPOP3ACCOUNT)wParam == ActualAccount) { - wchar_t accstatus[256]; - GetAccountStatus(ActualAccount, accstatus); - SetDlgItemText(m_hwnd, IDC_STSTATUS, accstatus); - return TRUE; - } - break; - - case WM_YAMN_CHANGESTATUSOPTION: - NotifyChange(); - return TRUE; - - case WM_YAMN_CHANGETIME: - if ((HPOP3ACCOUNT)wParam == ActualAccount) { - wchar_t Text[256]; - mir_snwprintf(Text, TranslateT("Time left to next check [s]: %d"), (uint32_t)lParam); - SetDlgItemText(m_hwnd, IDC_STTIMELEFT, Text); - } - return TRUE; - } - return CDlgBase::DlgProc(msg, wParam, lParam); - } - - void onChange_Account(CCtrlCombo *) - { - ActualAccount = nullptr; - DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); - DlgEnableAccount(0 != GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, DlgInput, _countof(DlgInput))); - } - - void onKillFocus_Account(CCtrlCombo *) - { - GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, DlgInput, _countof(DlgInput)); - if (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput))) { - DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); - DlgEnableAccount(mir_strlen(DlgInput) > 0); - } - else { - DlgShowAccount(ActualAccount); - DlgEnableAccount(true); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), TRUE); - } - } - - void onSelChange_Account(CCtrlCombo *) - { - if (CB_ERR != (Result = cmbAccount.GetCurSel())) - SendDlgItemMessageA(m_hwnd, IDC_COMBOACCOUNT, CB_GETLBTEXT, (WPARAM)Result, (LPARAM)DlgInput); - - if ((Result == CB_ERR) || (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput)))) { - DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); - } - else { - DlgShowAccount(ActualAccount); - DlgEnableAccount(true); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), TRUE); - } - } - - void onSelChange_CP(CCtrlCombo *) - { - int sel = cmbCP.GetCurSel(); - CPINFOEX info; GetCPInfoEx(CodePageNamesSupp[sel].CP, 0, &info); - DlgSetItemTextW(m_hwnd, IDC_STSTATUS, info.CodePageName); - } - - void onChangeContact(CCtrlCheck *) - { - bool bEnabled = chkContact.IsChecked(); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACTNICK), bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACTNOEVENT), bEnabled); - } - - void onChangeSsl(CCtrlCheck *) - { - bool bEnabled = chkSsl.IsChecked(); - SetDlgItemInt(m_hwnd, IDC_EDITPORT, bEnabled ? 995 : 110, FALSE); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKNOTLS), !bEnabled); - } - - void onChangeApp(CCtrlCheck *) - { - bool bEnabled = chkApp.IsChecked(); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNAPP), bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITAPP), bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITAPPPARAM), bEnabled); - } - - void onClick_Status(CCtrlButton *) - { - DialogBoxParamW(g_plugin.getInst(), MAKEINTRESOURCEW(IDD_CHOOSESTATUSMODES), m_hwnd, DlgProcPOP3AccStatusOpt, NULL); - } - - void onClick_Add(CCtrlButton *) - { - DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); - DlgShowAccount(0); - DlgEnableAccount(true); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); - DlgSetItemTextW(m_hwnd, IDC_EDITNAME, TranslateT("New Account")); - - int index = SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_ADDSTRING, 0, (LPARAM)TranslateT("New Account")); - if (index != CB_ERR && index != CB_ERRSPACE) - SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_SETCURSEL, index, (LPARAM)TranslateT("New Account")); - } - - void onClick_App(CCtrlButton *) - { - wchar_t filter[MAX_PATH]; - mir_snwprintf(filter, L"%s (*.exe;*.bat;*.cmd;*.com)%c*.exe;*.bat;*.cmd;*.com%c%s (*.*)%c*.*%c", - TranslateT("Executables"), 0, 0, TranslateT("All Files"), 0, 0); - - OPENFILENAME OFNStruct = {0}; - OFNStruct.lStructSize = sizeof(OPENFILENAME); - OFNStruct.hwndOwner = m_hwnd; - OFNStruct.lpstrFilter = filter; - OFNStruct.nFilterIndex = 1; - OFNStruct.nMaxFile = MAX_PATH; - OFNStruct.lpstrFile = new wchar_t[MAX_PATH]; - OFNStruct.lpstrFile[0] = (wchar_t)0; - OFNStruct.lpstrTitle = TranslateT("Select executable used for notification"); - OFNStruct.Flags = OFN_FILEMUSTEXIST | OFN_NONETWORKBUTTON | OFN_PATHMUSTEXIST | OFN_NOCHANGEDIR; - if (!GetOpenFileName(&OFNStruct)) { - if (CommDlgExtendedError()) - MessageBox(m_hwnd, TranslateT("Dialog box error"), TranslateT("Failed"), MB_OK); - } - else DlgSetItemTextW(m_hwnd, IDC_EDITAPP, OFNStruct.lpstrFile); - delete[] OFNStruct.lpstrFile; - } - - void onClick_Default(CCtrlButton *) - { - DlgShowAccount(0); - } - - void onClick_Del(CCtrlButton *) - { - GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, DlgInput, _countof(DlgInput)); - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); - if ((CB_ERR == (Result = SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_GETCURSEL, 0, 0))) - || (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput)))) - return; - - if (IDOK != MessageBox(m_hwnd, TranslateT("Do you really want to delete this account?"), TranslateT("Delete account confirmation"), MB_OKCANCEL | MB_ICONWARNING)) - return; - - DlgSetItemTextW(m_hwnd, IDC_STTIMELEFT, TranslateT("Please wait while no account is in use.")); - - if (ActualAccount->hContact != NULL) - db_delete_contact(ActualAccount->hContact); - - CallService(MS_YAMN_DELETEACCOUNT, (WPARAM)POP3Plugin, (LPARAM)ActualAccount); - - // We can consider our account as deleted. - SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_DELETESTRING, Result, 0); - DlgSetItemText(m_hwnd, IDC_COMBOACCOUNT, nullptr); - DlgEnableAccount(false); - DlgShowAccount(0); - } - - void onClick_Reset(CCtrlButton *) - { - if (ActualAccount != nullptr) - ActualAccount->TimeLeft = ActualAccount->Interval; - } - - bool OnApply() override - { - char Text[MAX_PATH]; - wchar_t TextW[MAX_PATH]; - BOOL Translated, NewAcc = FALSE; - size_t Length, index; - - if (!GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, Text, _countof(Text))) - return false; - - BOOL Check = (IsDlgButtonChecked(m_hwnd, IDC_CHECK) == BST_CHECKED); - BOOL CheckSSL = (IsDlgButtonChecked(m_hwnd, IDC_CHECKSSL) == BST_CHECKED); - BOOL CheckNoTLS = (IsDlgButtonChecked(m_hwnd, IDC_CHECKNOTLS) == BST_CHECKED); - BOOL CheckAPOP = (IsDlgButtonChecked(m_hwnd, IDC_CHECKAPOP) == BST_CHECKED); - - BOOL CheckABody = (IsDlgButtonChecked(m_hwnd, IDC_AUTOBODY) == BST_CHECKED); - BOOL CheckMsg = (IsDlgButtonChecked(m_hwnd, IDC_CHECKMSG) == BST_CHECKED); - BOOL CheckSnd = (IsDlgButtonChecked(m_hwnd, IDC_CHECKSND) == BST_CHECKED); - BOOL CheckIco = (IsDlgButtonChecked(m_hwnd, IDC_CHECKICO) == BST_CHECKED); - - BOOL CheckApp = (IsDlgButtonChecked(m_hwnd, IDC_CHECKAPP) == BST_CHECKED); - BOOL CheckKBN = (IsDlgButtonChecked(m_hwnd, IDC_CHECKKBN) == BST_CHECKED); - BOOL CheckContact = (IsDlgButtonChecked(m_hwnd, IDC_CHECKCONTACT) == BST_CHECKED); - BOOL CheckContactNick = (IsDlgButtonChecked(m_hwnd, IDC_CHECKCONTACTNICK) == BST_CHECKED); - BOOL CheckContactNoEvent = (IsDlgButtonChecked(m_hwnd, IDC_CHECKCONTACTNOEVENT) == BST_CHECKED); - - BOOL CheckFSnd = (IsDlgButtonChecked(m_hwnd, IDC_CHECKFSND) == BST_CHECKED); - BOOL CheckFMsg = (IsDlgButtonChecked(m_hwnd, IDC_CHECKFMSG) == BST_CHECKED); - BOOL CheckFIco = (IsDlgButtonChecked(m_hwnd, IDC_CHECKFICO) == BST_CHECKED); - - BOOL CheckNMsgP = (IsDlgButtonChecked(m_hwnd, IDC_CHECKNMSGP) == BST_CHECKED); - - UINT Port = GetDlgItemInt(m_hwnd, IDC_EDITPORT, &Translated, FALSE); - if (!Translated) { - MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); - SetFocus(GetDlgItem(m_hwnd, IDC_EDITPORT)); - return false; - } - - UINT Interval = GetDlgItemInt(m_hwnd, IDC_EDITINTERVAL, &Translated, FALSE); - if (!Translated) { - MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); - SetFocus(GetDlgItem(m_hwnd, IDC_EDITINTERVAL)); - return false; - } - - GetDlgItemTextA(m_hwnd, IDC_EDITAPP, Text, _countof(Text)); - if (CheckApp && !(Length = mir_strlen(Text))) { - MessageBox(m_hwnd, TranslateT("Please select application to run"), TranslateT("Input error"), MB_OK); - return false; - } - - GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, Text, _countof(Text)); - if (!(Length = mir_strlen(Text))) { - GetDlgItemTextA(m_hwnd, IDC_EDITNAME, Text, _countof(Text)); - if (!(Length = mir_strlen(Text))) - return false; - } - - DlgSetItemTextW(m_hwnd, IDC_STTIMELEFT, TranslateT("Please wait while no account is in use.")); - - if (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)Text))) { - NewAcc = TRUE; - WaitToWriteSO(POP3Plugin->AccountBrowserSO); - if (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_GETNEXTFREEACCOUNT, (WPARAM)POP3Plugin, (LPARAM)YAMN_ACCOUNTVERSION))) { - WriteDoneSO(POP3Plugin->AccountBrowserSO); - MessageBox(m_hwnd, TranslateT("Cannot allocate memory space for new account"), TranslateT("Memory error"), MB_OK); - return false; - } - DlgEnableAccount(true); - } - else { // We have to get full access to AccountBrowser, so other iterating thrads cannot get new account until new account is right set - WaitToWriteSO(POP3Plugin->AccountBrowserSO); - } - - if (WAIT_OBJECT_0 != WaitToWrite(ActualAccount)) - WriteDoneSO(POP3Plugin->AccountBrowserSO); - - GetDlgItemTextA(m_hwnd, IDC_EDITNAME, Text, _countof(Text)); - if (!(Length = mir_strlen(Text))) - return false; - if (nullptr != ActualAccount->Name) - delete[] ActualAccount->Name; - ActualAccount->Name = new char[mir_strlen(Text) + 1]; - mir_strcpy(ActualAccount->Name, Text); - - GetDlgItemTextA(m_hwnd, IDC_EDITSERVER, Text, _countof(Text)); - if (nullptr != ActualAccount->Server->Name) - delete[] ActualAccount->Server->Name; - ActualAccount->Server->Name = new char[mir_strlen(Text) + 1]; - mir_strcpy(ActualAccount->Server->Name, Text); - - GetDlgItemTextA(m_hwnd, IDC_EDITLOGIN, Text, _countof(Text)); - if (nullptr != ActualAccount->Server->Login) - delete[] ActualAccount->Server->Login; - ActualAccount->Server->Login = new char[mir_strlen(Text) + 1]; - mir_strcpy(ActualAccount->Server->Login, Text); - - GetDlgItemTextA(m_hwnd, IDC_EDITPASS, Text, _countof(Text)); - if (nullptr != ActualAccount->Server->Passwd) - delete[] ActualAccount->Server->Passwd; - ActualAccount->Server->Passwd = new char[mir_strlen(Text) + 1]; - mir_strcpy(ActualAccount->Server->Passwd, Text); - - GetDlgItemTextW(m_hwnd, IDC_EDITAPP, TextW, _countof(TextW)); - if (nullptr != ActualAccount->NewMailN.App) - delete[] ActualAccount->NewMailN.App; - ActualAccount->NewMailN.App = new wchar_t[mir_wstrlen(TextW) + 1]; - mir_wstrcpy(ActualAccount->NewMailN.App, TextW); - - GetDlgItemTextW(m_hwnd, IDC_EDITAPPPARAM, TextW, _countof(TextW)); - if (nullptr != ActualAccount->NewMailN.AppParam) - delete[] ActualAccount->NewMailN.AppParam; - ActualAccount->NewMailN.AppParam = new wchar_t[mir_wstrlen(TextW) + 1]; - mir_wstrcpy(ActualAccount->NewMailN.AppParam, TextW); - - ActualAccount->Server->Port = Port; - ActualAccount->Interval = Interval * 60; - - if (CB_ERR == (index = SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_GETCURSEL, 0, 0))) - index = CPDEFINDEX; - ActualAccount->CP = CodePageNamesSupp[index].CP; - - if (NewAcc) - ActualAccount->TimeLeft = Interval * 60; - - BOOL CheckStart = (IsDlgButtonChecked(m_hwnd, IDC_CHECKSTART) == BST_CHECKED); - BOOL CheckForce = (IsDlgButtonChecked(m_hwnd, IDC_CHECKFORCE) == BST_CHECKED); - - ActualAccount->Flags = - (Check ? YAMN_ACC_ENA : 0) | - (CheckSSL ? YAMN_ACC_SSL23 : 0) | - (CheckNoTLS ? YAMN_ACC_NOTLS : 0) | - (CheckAPOP ? YAMN_ACC_APOP : 0) | - (CheckABody ? YAMN_ACC_BODY : 0) | - (ActualAccount->Flags & YAMN_ACC_POPN); - - ActualAccount->StatusFlags &= 0xFFFF; - ActualAccount->StatusFlags |= - (CheckStart ? YAMN_ACC_STARTS : 0) | - (CheckForce ? YAMN_ACC_FORCE : 0); - - ActualAccount->NewMailN.Flags = - (CheckSnd ? YAMN_ACC_SND : 0) | - (CheckMsg ? YAMN_ACC_MSG : 0) | - (CheckIco ? YAMN_ACC_ICO : 0) | - (ActualAccount->NewMailN.Flags & YAMN_ACC_POP) | - (ActualAccount->NewMailN.Flags & YAMN_ACC_POPC) | - (CheckApp ? YAMN_ACC_APP : 0) | - (CheckKBN ? YAMN_ACC_KBN : 0) | - (CheckContact ? YAMN_ACC_CONT : 0) | - (CheckContactNick ? YAMN_ACC_CONTNICK : 0) | - (CheckContactNoEvent ? YAMN_ACC_CONTNOEVENT : 0) | - YAMN_ACC_MSGP; //this is default: when new mail arrives and window was displayed, leave it displayed. - - ActualAccount->NoNewMailN.Flags = - (ActualAccount->NoNewMailN.Flags & YAMN_ACC_POP) | - (ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC) | - (CheckNMsgP ? YAMN_ACC_MSGP : 0); - - ActualAccount->BadConnectN.Flags = - (CheckFSnd ? YAMN_ACC_SND : 0) | - (CheckFMsg ? YAMN_ACC_MSG : 0) | - (CheckFIco ? YAMN_ACC_ICO : 0) | - (ActualAccount->BadConnectN.Flags & YAMN_ACC_POP) | - (ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC); - - WriteDone(ActualAccount); - WriteDoneSO(POP3Plugin->AccountBrowserSO); - - EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), TRUE); - - DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); - - index = SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_GETCURSEL, 0, 0); - - HPOP3ACCOUNT temp = ActualAccount; - - SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_RESETCONTENT, 0, 0); - if (POP3Plugin->FirstAccount != nullptr) - for (ActualAccount = (HPOP3ACCOUNT)POP3Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = (HPOP3ACCOUNT)ActualAccount->Next) - if (ActualAccount->Name != nullptr) - SendDlgItemMessageA(m_hwnd, IDC_COMBOACCOUNT, CB_ADDSTRING, 0, (LPARAM)ActualAccount->Name); - - ActualAccount = temp; - SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_SETCURSEL, (WPARAM)index, (LPARAM)ActualAccount->Name); - - WritePOP3Accounts(); - RefreshContact(); - return TRUE; - } -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// Popup options - -class CPopupOptsDlg : public CBaseOptionsDlg -{ - HPOP3ACCOUNT ActualAccount = nullptr; - UCHAR ActualStatus; - - CCtrlCombo cmbAccount, cmbCP; - CCtrlCheck chkCol, chkFcol, chkNcol, chkPop, chkFpop, chkNpop; - CCtrlButton btnPreview; - - void DlgShowAccountPopup() - { - if (ActualAccount) { - WaitToRead(ActualAccount); //we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread - SetDlgItemInt(m_hwnd, IDC_EDITPOPS, ActualAccount->NewMailN.PopupTime, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITNPOPS, ActualAccount->NoNewMailN.PopupTime, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITFPOPS, ActualAccount->BadConnectN.PopupTime, FALSE); - - chkPop.SetState(ActualAccount->NewMailN.Flags & YAMN_ACC_POP); - chkCol.SetState(ActualAccount->NewMailN.Flags & YAMN_ACC_POPC); - chkNpop.SetState(ActualAccount->NoNewMailN.Flags & YAMN_ACC_POP); - chkNcol.SetState(ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC); - chkFpop.SetState(ActualAccount->BadConnectN.Flags & YAMN_ACC_POP ? BST_CHECKED : BST_UNCHECKED); - chkFcol.SetState(ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC); - CheckDlgButton(m_hwnd, IDC_RADIOPOPN, ActualAccount->Flags & YAMN_ACC_POPN ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_RADIOPOP1, ActualAccount->Flags & YAMN_ACC_POPN ? BST_UNCHECKED : BST_CHECKED); - ReadDone(ActualAccount); - } - else { // default - SetDlgItemInt(m_hwnd, IDC_EDITPOPS, 0, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITNPOPS, 0, FALSE); - SetDlgItemInt(m_hwnd, IDC_EDITFPOPS, 0, FALSE); - chkPop.SetState(true); - chkCol.SetState(true); - chkNpop.SetState(true); - chkNcol.SetState(true); - chkFpop.SetState(true); - chkFcol.SetState(true); - CheckDlgButton(m_hwnd, IDC_RADIOPOPN, BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_RADIOPOP1, BST_CHECKED); - } - } - - void DlgEnableAccountPopup(bool bEnable) - { - chkPop.Enable(bEnable); - chkCol.Enable(chkPop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITPOPS), chkPop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPB), chkCol.IsChecked() && chkPop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPT), chkCol.IsChecked() && chkPop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_RADIOPOPN), chkPop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_RADIOPOP1), chkPop.IsChecked() && bEnable); - - chkNpop.Enable(bEnable); - chkNcol.Enable(chkNpop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITNPOPS), chkNpop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPNB), chkNcol.IsChecked() && chkNpop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPNT), chkNcol.IsChecked() && chkNpop.IsChecked() && bEnable); - - chkFpop.Enable(bEnable); - chkFcol.Enable(chkFpop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITFPOPS), chkFpop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPFB), chkFcol.IsChecked() && chkFpop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPFT), chkFcol.IsChecked() && chkFpop.IsChecked() && bEnable); - EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKAPOP), bEnable); - } - - void DlgShowAccountColors() - { - WaitToRead(ActualAccount); //we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread - - if (ActualAccount->NewMailN.Flags & YAMN_ACC_POPC) { - SendDlgItemMessage(m_hwnd, IDC_CPB, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->NewMailN.PopupB); - SendDlgItemMessage(m_hwnd, IDC_CPT, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->NewMailN.PopupT); - } - else { - SendDlgItemMessage(m_hwnd, IDC_CPB, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE)); - SendDlgItemMessage(m_hwnd, IDC_CPT, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_WINDOWTEXT)); - } - if (ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC) { - SendDlgItemMessage(m_hwnd, IDC_CPFB, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->BadConnectN.PopupB); - SendDlgItemMessage(m_hwnd, IDC_CPFT, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->BadConnectN.PopupT); - } - else { - SendDlgItemMessage(m_hwnd, IDC_CPFB, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE)); - SendDlgItemMessage(m_hwnd, IDC_CPFT, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_WINDOWTEXT)); - } - if (ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC) { - SendDlgItemMessage(m_hwnd, IDC_CPNB, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->NoNewMailN.PopupB); - SendDlgItemMessage(m_hwnd, IDC_CPNT, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->NoNewMailN.PopupT); - } - else { - SendDlgItemMessage(m_hwnd, IDC_CPNB, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE)); - SendDlgItemMessage(m_hwnd, IDC_CPNT, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_WINDOWTEXT)); - } - - ReadDone(ActualAccount); //we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread - } - -public: - CPopupOptsDlg() : - CBaseOptionsDlg(IDD_POP3ACCOUNTPOPUP), - cmbCP(this, IDC_COMBOCP), - chkCol(this, IDC_CHECKCOL), - chkPop(this, IDC_CHECKPOP), - chkFcol(this, IDC_CHECKFCOL), - chkFpop(this, IDC_CHECKFPOP), - chkNcol(this, IDC_CHECKNCOL), - chkNpop(this, IDC_CHECKNPOP), - btnPreview(this, IDC_PREVIEW), - cmbAccount(this, IDC_COMBOACCOUNT) - { - chkPop.OnChange = Callback(this, &CPopupOptsDlg::onChange_Pop); - chkFpop.OnChange = Callback(this, &CPopupOptsDlg::onChange_Fpop); - chkNpop.OnChange = Callback(this, &CPopupOptsDlg::onChange_Npop); - chkCol.OnChange = chkFcol.OnChange = chkNcol.OnChange = Callback(this, &CPopupOptsDlg::onChange_Col); - - cmbCP.OnSelChanged = Callback(this, &CPopupOptsDlg::onSelChange_CP); - - btnPreview.OnClick = Callback(this, &CPopupOptsDlg::onClick_Preview); - - cmbAccount.OnKillFocus = Callback(this, &CPopupOptsDlg::onKillFocus_Account); - cmbAccount.OnSelChanged = Callback(this, &CPopupOptsDlg::onSelChange_Account); - } - - bool OnInitDialog() override - { - WindowList_Add(pYAMNVar->MessageWnds, m_hwnd); - - DlgEnableAccountPopup(false); - DlgShowAccountPopup(); - - WaitToReadSO(POP3Plugin->AccountBrowserSO); - - if (POP3Plugin->FirstAccount != nullptr) - for (ActualAccount = (HPOP3ACCOUNT)POP3Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = (HPOP3ACCOUNT)ActualAccount->Next) - if (ActualAccount->Name != nullptr) - cmbAccount.AddStringA(ActualAccount->Name); - - ReadDoneSO(POP3Plugin->AccountBrowserSO); - ActualAccount = nullptr; - cmbAccount.SetCurSel(0); - return true; - } - - void OnDestroy() override - { - WindowList_Remove(pYAMNVar->MessageWnds, m_hwnd); - } - - void onKillFocus_Account(CCtrlCombo *) - { - GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, DlgInput, _countof(DlgInput)); - if (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput))) { - DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); - if (mir_strlen(DlgInput)) - DlgEnableAccountPopup(true); - else - DlgEnableAccountPopup(false); - } - else { - DlgShowAccount(ActualAccount); - DlgShowAccountColors(); - DlgEnableAccountPopup(true); - } - } - - void onSelChange_Account(CCtrlCombo *) - { - int Result = SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_GETCURSEL, 0, 0); - if (CB_ERR != Result) - SendDlgItemMessageA(m_hwnd, IDC_COMBOACCOUNT, CB_GETLBTEXT, (WPARAM)Result, (LPARAM)DlgInput); - if ((Result == CB_ERR) || (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput)))) { - DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); - } - else { - DlgShowAccount(ActualAccount); - DlgShowAccountColors(); - DlgEnableAccountPopup(true); - } - } - - void onSelChange_CP(CCtrlCombo *) - { - int sel = SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_GETCURSEL, 0, 0); - CPINFOEX info; GetCPInfoEx(CodePageNamesSupp[sel].CP, 0, &info); - DlgSetItemTextW(m_hwnd, IDC_STSTATUS, info.CodePageName); - } - - void onChange_Col(CCtrlCheck *) - { - EnableWindow(GetDlgItem(m_hwnd, IDC_CPB), chkCol.IsChecked() && chkPop.IsChecked()); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPT), chkCol.IsChecked() && chkPop.IsChecked()); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPNB), chkNcol.IsChecked() && chkNpop.IsChecked()); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPNT), chkNcol.IsChecked() && chkNpop.IsChecked()); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPFB), chkFcol.IsChecked() && chkFpop.IsChecked()); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPFT), chkFcol.IsChecked() && chkFpop.IsChecked()); - } - - void onClick_Preview(CCtrlButton *) - { - if (chkPop.IsChecked()) { - POPUPDATAW Tester = {}; - Tester.lchIcon = g_plugin.getIcon(IDI_NEWMAIL); - mir_wstrncpy(Tester.lpwzContactName, TranslateT("Account Test"), MAX_CONTACTNAME); - mir_wstrncpy(Tester.lpwzText, TranslateT("You have N new mail messages"), MAX_SECONDLINE); - if (chkCol.IsChecked()) { - Tester.colorBack = SendDlgItemMessage(m_hwnd, IDC_CPB, CPM_GETCOLOUR, 0, 0); - Tester.colorText = SendDlgItemMessage(m_hwnd, IDC_CPT, CPM_GETCOLOUR, 0, 0); - } - else { - Tester.colorBack = GetSysColor(COLOR_BTNFACE); - Tester.colorText = GetSysColor(COLOR_WINDOWTEXT); - } - PUAddPopupW(&Tester); - } - - if (chkFpop.IsChecked()) { - POPUPDATAW TesterF = {}; - TesterF.lchIcon = g_plugin.getIcon(IDI_BADCONNECT); - mir_wstrncpy(TesterF.lpwzContactName, TranslateT("Account Test (failed)"), MAX_CONTACTNAME); - mir_wstrncpy(TesterF.lpwzText, TranslateT("Connection failed message"), MAX_SECONDLINE); - if (chkFcol.IsChecked()) { - TesterF.colorBack = SendDlgItemMessage(m_hwnd, IDC_CPFB, CPM_GETCOLOUR, 0, 0); - TesterF.colorText = SendDlgItemMessage(m_hwnd, IDC_CPFT, CPM_GETCOLOUR, 0, 0); - } - else { - TesterF.colorBack = GetSysColor(COLOR_BTNFACE); - TesterF.colorText = GetSysColor(COLOR_WINDOWTEXT); - } - PUAddPopupW(&TesterF); - } - - if (chkNpop.IsChecked()) { - POPUPDATAW TesterN = {}; - TesterN.lchIcon = g_plugin.getIcon(IDI_LAUNCHAPP); - mir_wstrncpy(TesterN.lpwzContactName, TranslateT("Account Test"), MAX_CONTACTNAME); - mir_wstrncpy(TesterN.lpwzText, TranslateT("No new mail message"), MAX_SECONDLINE); - if (chkNcol.IsChecked()) { - TesterN.colorBack = SendDlgItemMessage(m_hwnd, IDC_CPNB, CPM_GETCOLOUR, 0, 0); - TesterN.colorText = SendDlgItemMessage(m_hwnd, IDC_CPNT, CPM_GETCOLOUR, 0, 0); - } - else { - TesterN.colorBack = GetSysColor(COLOR_BTNFACE); - TesterN.colorText = GetSysColor(COLOR_WINDOWTEXT); - } - PUAddPopupW(&TesterN); - } - } - - void onChange_Pop(CCtrlCheck *) - { - bool bEnabled = chkPop.IsChecked(); - chkCol.Enable(bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPB), chkCol.IsChecked() && bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPT), chkCol.IsChecked() && bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_RADIOPOPN), bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_RADIOPOP1), bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITPOPS), bEnabled); - } - - void onChange_Fpop(CCtrlCheck *) - { - bool bEnabled = chkFpop.IsChecked(); - chkFcol.Enable(bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPFB), chkFcol.IsChecked() && bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPFT), chkFcol.IsChecked() && bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITFPOPS), bEnabled); - } - - void onChange_Npop(CCtrlCheck *) - { - bool bEnabled = chkNpop.IsChecked(); - chkNcol.Enable(bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPNB), chkNcol.IsChecked() && bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_CPNT), chkNcol.IsChecked() && bEnabled); - EnableWindow(GetDlgItem(m_hwnd, IDC_EDITNPOPS), bEnabled); - } - - bool OnApply() override - { - wchar_t Text[MAX_PATH]; - if (!GetDlgItemText(m_hwnd, IDC_COMBOACCOUNT, Text, _countof(Text))) - return false; - - BOOL CheckPopup = chkPop.IsChecked(); - BOOL CheckPopupW = chkCol.IsChecked(); - - BOOL CheckFPopup = chkFpop.IsChecked(); - BOOL CheckFPopupW = chkFcol.IsChecked(); - - BOOL CheckNPopup = chkNpop.IsChecked(); - BOOL CheckNPopupW = chkNcol.IsChecked(); - - BOOL CheckPopN = (IsDlgButtonChecked(m_hwnd, IDC_RADIOPOPN) == BST_CHECKED); - - BOOL Translated; - UINT Time = GetDlgItemInt(m_hwnd, IDC_EDITPOPS, &Translated, FALSE); - if (!Translated) { - MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); - SetFocus(GetDlgItem(m_hwnd, IDC_EDITPOPS)); - return false; - } - UINT TimeN = GetDlgItemInt(m_hwnd, IDC_EDITNPOPS, &Translated, FALSE); - if (!Translated) { - MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); - SetFocus(GetDlgItem(m_hwnd, IDC_EDITNPOPS)); - return false; - } - UINT TimeF = GetDlgItemInt(m_hwnd, IDC_EDITFPOPS, &Translated, FALSE); - if (!Translated) { - MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); - SetFocus(GetDlgItem(m_hwnd, IDC_EDITFPOPS)); - return false; - } - - DlgSetItemTextW(m_hwnd, IDC_STTIMELEFT, TranslateT("Please wait while no account is in use.")); - - ActualAccount->Flags = - (ActualAccount->Flags & YAMN_ACC_ENA) | - (ActualAccount->Flags & YAMN_ACC_SSL23) | - (ActualAccount->Flags & YAMN_ACC_NOTLS) | - (ActualAccount->Flags & YAMN_ACC_APOP) | - (ActualAccount->Flags & YAMN_ACC_BODY) | - (CheckPopN ? YAMN_ACC_POPN : 0); - - ActualAccount->NewMailN.Flags = - (ActualAccount->NewMailN.Flags & YAMN_ACC_SND) | - (ActualAccount->NewMailN.Flags & YAMN_ACC_MSG) | - (ActualAccount->NewMailN.Flags & YAMN_ACC_ICO) | - (CheckPopup ? YAMN_ACC_POP : 0) | - (CheckPopupW ? YAMN_ACC_POPC : 0) | - (ActualAccount->NewMailN.Flags & YAMN_ACC_APP) | - (ActualAccount->NewMailN.Flags & YAMN_ACC_KBN) | - (ActualAccount->NewMailN.Flags & YAMN_ACC_CONT) | - (ActualAccount->NewMailN.Flags & YAMN_ACC_CONTNICK) | - (ActualAccount->NewMailN.Flags & YAMN_ACC_CONTNOEVENT) | - YAMN_ACC_MSGP; - - ActualAccount->NoNewMailN.Flags = - (CheckNPopup ? YAMN_ACC_POP : 0) | - (CheckNPopupW ? YAMN_ACC_POPC : 0) | - (ActualAccount->NoNewMailN.Flags & YAMN_ACC_MSGP); - - ActualAccount->BadConnectN.Flags = - (ActualAccount->BadConnectN.Flags & YAMN_ACC_SND) | - (ActualAccount->BadConnectN.Flags & YAMN_ACC_MSG) | - (ActualAccount->BadConnectN.Flags & YAMN_ACC_ICO) | - (CheckFPopup ? YAMN_ACC_POP : 0) | - (CheckFPopupW ? YAMN_ACC_POPC : 0); - - ActualAccount->NewMailN.PopupB = SendDlgItemMessage(m_hwnd, IDC_CPB, CPM_GETCOLOUR, 0, 0); - ActualAccount->NewMailN.PopupT = SendDlgItemMessage(m_hwnd, IDC_CPT, CPM_GETCOLOUR, 0, 0); - ActualAccount->NewMailN.PopupTime = Time; - - ActualAccount->NoNewMailN.PopupB = SendDlgItemMessage(m_hwnd, IDC_CPNB, CPM_GETCOLOUR, 0, 0); - ActualAccount->NoNewMailN.PopupT = SendDlgItemMessage(m_hwnd, IDC_CPNT, CPM_GETCOLOUR, 0, 0); - ActualAccount->NoNewMailN.PopupTime = TimeN; - - ActualAccount->BadConnectN.PopupB = SendDlgItemMessage(m_hwnd, IDC_CPFB, CPM_GETCOLOUR, 0, 0); - ActualAccount->BadConnectN.PopupT = SendDlgItemMessage(m_hwnd, IDC_CPFT, CPM_GETCOLOUR, 0, 0); - ActualAccount->BadConnectN.PopupTime = TimeF; - - WriteDone(ActualAccount); - WriteDoneSO(POP3Plugin->AccountBrowserSO); - - WritePOP3Accounts(); - RefreshContact(); - return TRUE; - } -}; - -//-------------------------------------------------------------------------------------------------- - -int YAMNOptInitSvc(WPARAM wParam, LPARAM) -{ - OPTIONSDIALOGPAGE odp = {}; - odp.szGroup.a = LPGEN("Network"); - odp.szTitle.a = LPGEN("YAMN"); - odp.flags = ODPF_BOLDGROUPS; - - odp.szTab.a = LPGEN("Accounts"); - odp.pDialog = new CAccOptDlg(); - g_plugin.addOptions(wParam, &odp); - - odp.szTab.a = LPGEN("General"); - odp.pDialog = new CGeneralOptDlg(); - g_plugin.addOptions(wParam, &odp); - - odp.szGroup.a = LPGEN("Popups"); - odp.szTab.a = LPGEN("YAMN"); - odp.pDialog = new CPopupOptsDlg(); - g_plugin.addOptions(wParam, &odp); - return 0; -} +/* + * This code implements POP3 options window handling + * + * (c) majvan 2002-2003 +*/ + +#include "../../stdafx.h" + +//-------------------------------------------------------------------------------------------------- + +static char DlgInput[MAX_PATH]; + +static BOOL DlgSetItemText(HWND hDlg, WPARAM wParam, const char *str) +{ + if (str == nullptr) + SetDlgItemTextA(hDlg, wParam, ""); + else + SetDlgItemTextA(hDlg, wParam, str); + return TRUE; +} + +static BOOL DlgSetItemTextW(HWND hDlg, WPARAM wParam, const wchar_t *str) +{ + if (str == nullptr) + SetDlgItemTextW(hDlg, wParam, L""); + else + SetDlgItemTextW(hDlg, wParam, str); + return TRUE; +} + +struct CBaseOptionsDlg : public CDlgBase +{ + CBaseOptionsDlg(int iDlgId) : + CDlgBase(g_plugin, iDlgId) + {} + + void DlgShowAccount(HPOP3ACCOUNT pAccount) + { + int i; + + if (pAccount) { + // we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread + WaitToRead(pAccount); + + DlgSetItemText(m_hwnd, IDC_EDITSERVER, pAccount->Server->Name); + DlgSetItemText(m_hwnd, IDC_EDITNAME, pAccount->Name); + DlgSetItemText(m_hwnd, IDC_EDITLOGIN, pAccount->Server->Login); + DlgSetItemText(m_hwnd, IDC_EDITPASS, pAccount->Server->Passwd); + DlgSetItemTextW(m_hwnd, IDC_EDITAPP, pAccount->NewMailN.App); + DlgSetItemTextW(m_hwnd, IDC_EDITAPPPARAM, pAccount->NewMailN.AppParam); + SetDlgItemInt(m_hwnd, IDC_EDITPORT, pAccount->Server->Port, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITINTERVAL, pAccount->Interval / 60, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITPOPS, pAccount->NewMailN.PopupTime, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITNPOPS, pAccount->NoNewMailN.PopupTime, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITFPOPS, pAccount->BadConnectN.PopupTime, FALSE); + for (i = 0; i <= CPLENSUPP; i++) + if ((i < CPLENSUPP) && (CodePageNamesSupp[i].CP == pAccount->CP)) { + SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_SETCURSEL, (WPARAM)i, 0); + break; + } + + if (i == CPLENSUPP) + SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_SETCURSEL, (WPARAM)CPDEFINDEX, 0); + + CheckDlgButton(m_hwnd, IDC_CHECK, pAccount->Flags & YAMN_ACC_ENA ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKSND, pAccount->NewMailN.Flags & YAMN_ACC_SND ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKMSG, pAccount->NewMailN.Flags & YAMN_ACC_MSG ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKICO, pAccount->NewMailN.Flags & YAMN_ACC_ICO ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKPOP, pAccount->NewMailN.Flags & YAMN_ACC_POP ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKCOL, pAccount->NewMailN.Flags & YAMN_ACC_POPC ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKAPP, pAccount->NewMailN.Flags & YAMN_ACC_APP ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKKBN, pAccount->NewMailN.Flags & YAMN_ACC_KBN ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKNPOP, pAccount->NoNewMailN.Flags & YAMN_ACC_POP ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKNCOL, pAccount->NoNewMailN.Flags & YAMN_ACC_POPC ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKNMSGP, pAccount->NoNewMailN.Flags & YAMN_ACC_MSGP ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFSND, pAccount->BadConnectN.Flags & YAMN_ACC_SND ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFMSG, pAccount->BadConnectN.Flags & YAMN_ACC_MSG ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFICO, pAccount->BadConnectN.Flags & YAMN_ACC_ICO ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFPOP, pAccount->BadConnectN.Flags & YAMN_ACC_POP ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFCOL, pAccount->BadConnectN.Flags & YAMN_ACC_POPC ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_RADIOPOPN, pAccount->Flags & YAMN_ACC_POPN ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_RADIOPOP1, pAccount->Flags & YAMN_ACC_POPN ? BST_UNCHECKED : BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKSSL, pAccount->Flags & YAMN_ACC_SSL23 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKNOTLS, pAccount->Flags & YAMN_ACC_NOTLS ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKAPOP, pAccount->Flags & YAMN_ACC_APOP ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_AUTOBODY, pAccount->Flags & YAMN_ACC_BODY ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKSTART, pAccount->StatusFlags & YAMN_ACC_STARTS ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFORCE, pAccount->StatusFlags & YAMN_ACC_FORCE ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKCONTACT, pAccount->NewMailN.Flags & YAMN_ACC_CONT ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKCONTACTNICK, pAccount->NewMailN.Flags & YAMN_ACC_CONTNICK ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKCONTACTNOEVENT, pAccount->NewMailN.Flags & YAMN_ACC_CONTNOEVENT ? BST_CHECKED : BST_UNCHECKED); + + wchar_t accstatus[256]; + GetAccountStatus(pAccount, accstatus); + SetDlgItemText(m_hwnd, IDC_STSTATUS, accstatus); + ReadDone(pAccount); + } + else { + DlgSetItemText(m_hwnd, IDC_EDITSERVER, nullptr); + DlgSetItemText(m_hwnd, IDC_EDITNAME, nullptr); + DlgSetItemText(m_hwnd, IDC_EDITLOGIN, nullptr); + DlgSetItemText(m_hwnd, IDC_EDITPASS, nullptr); + DlgSetItemText(m_hwnd, IDC_EDITAPP, nullptr); + DlgSetItemText(m_hwnd, IDC_EDITAPPPARAM, nullptr); + DlgSetItemText(m_hwnd, IDC_STTIMELEFT, nullptr); + SetDlgItemInt(m_hwnd, IDC_EDITPORT, 110, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITINTERVAL, 30, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITPOPS, 0, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITNPOPS, 0, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITFPOPS, 0, FALSE); + SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_SETCURSEL, (WPARAM)CPDEFINDEX, 0); + CheckDlgButton(m_hwnd, IDC_CHECK, BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKSND, BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKMSG, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKICO, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKPOP, BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKCOL, BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKAPP, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFSND, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFMSG, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFICO, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFPOP, BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFCOL, BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKSTART, BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKFORCE, BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_RADIOPOPN, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_RADIOPOP1, BST_CHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKSSL, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKNOTLS, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKAPOP, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_AUTOBODY, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CHECKCONTACT, BST_CHECKED); + + SetDlgItemText(m_hwnd, IDC_STSTATUS, TranslateT("No account selected")); + } + } +}; + +//======================================================================================= +// General options dialog + +struct CGeneralOptDlg : public CBaseOptionsDlg +{ + CGeneralOptDlg() : + CBaseOptionsDlg(IDD_YAMNOPT) + {} + + bool OnInitDialog() override + { + CheckDlgButton(m_hwnd, IDC_CHECKTTB, g_plugin.getByte(YAMN_TTBFCHECK, 1) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_LONGDATE, (optDateTime & SHOWDATELONG) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_SMARTDATE, (optDateTime & SHOWDATENOTODAY) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_NOSECONDS, (optDateTime & SHOWDATENOSECONDS) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_CLOSEONDELETE, g_plugin.getByte(YAMN_CLOSEDELETE, 0) ? BST_CHECKED : BST_UNCHECKED); + return true; + } + + bool OnApply() override + { + g_plugin.setByte(YAMN_CLOSEDELETE, IsDlgButtonChecked(m_hwnd, IDC_CLOSEONDELETE)); + g_plugin.setByte(YAMN_TTBFCHECK, IsDlgButtonChecked(m_hwnd, IDC_CHECKTTB)); + + AddTopToolbarIcon(0, 0); + + optDateTime = 0; + if (IsDlgButtonChecked(m_hwnd, IDC_LONGDATE)) optDateTime |= SHOWDATELONG; + if (IsDlgButtonChecked(m_hwnd, IDC_SMARTDATE)) optDateTime |= SHOWDATENOTODAY; + if (IsDlgButtonChecked(m_hwnd, IDC_NOSECONDS)) optDateTime |= SHOWDATENOSECONDS; + g_plugin.setByte(YAMN_DBTIMEOPTIONS, optDateTime); + return true; + } +}; + +//-------------------------------------------------------------------------------------------------- + +static int g_iStatusControls[] = {IDC_CHECKST0, IDC_CHECKST1, IDC_CHECKST2, IDC_CHECKST3, IDC_CHECKST4, IDC_CHECKST5, IDC_CHECKST6, IDC_CHECKST7}; + +static BOOL DlgShowAccountStatus(HWND hDlg, HPOP3ACCOUNT ActualAccount) +{ + if (ActualAccount) { + WaitToRead(ActualAccount); //we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread + + CheckDlgButton(hDlg, IDC_CHECKST0, ActualAccount->StatusFlags & YAMN_ACC_ST0 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST1, ActualAccount->StatusFlags & YAMN_ACC_ST1 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST2, ActualAccount->StatusFlags & YAMN_ACC_ST2 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST3, ActualAccount->StatusFlags & YAMN_ACC_ST3 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST4, ActualAccount->StatusFlags & YAMN_ACC_ST4 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST5, ActualAccount->StatusFlags & YAMN_ACC_ST5 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST6, ActualAccount->StatusFlags & YAMN_ACC_ST6 ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST7, ActualAccount->StatusFlags & YAMN_ACC_ST7 ? BST_CHECKED : BST_UNCHECKED); + + ReadDone(ActualAccount); + } + else { + CheckDlgButton(hDlg, IDC_CHECKST0, BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST1, BST_CHECKED); + CheckDlgButton(hDlg, IDC_CHECKST2, BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST3, BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST4, BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST5, BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST6, BST_UNCHECKED); + CheckDlgButton(hDlg, IDC_CHECKST7, BST_CHECKED); + } + return TRUE; +} + +static INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM) +{ + static HPOP3ACCOUNT ActualAccount; + switch (msg) { + case WM_INITDIALOG: + ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput); + if (ActualAccount != nullptr) { + DlgShowAccountStatus(hDlg, ActualAccount); + for (auto &it : g_iStatusControls) + EnableWindow(GetDlgItem(hDlg, it), true); + } + else { + for (auto &it : g_iStatusControls) + CheckDlgButton(hDlg, it, BST_CHECKED); + } + TranslateDialogDefault(hDlg); + SendMessage(GetParent(hDlg), PSM_UNCHANGED, (WPARAM)hDlg, 0); + return TRUE; + + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDCANCEL: + EndDialog(hDlg, 0); + DestroyWindow(hDlg); + break; + + case IDOK: + int iShift = 1; + ActualAccount->StatusFlags = 0; + for (auto &it : g_iStatusControls) { + if (IsDlgButtonChecked(hDlg, it)) + ActualAccount->StatusFlags |= iShift; + iShift <<= 1; + } + + WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_CHANGESTATUSOPTION, 0, 0); + EndDialog(hDlg, 0); + DestroyWindow(hDlg); + break; + } + } + return FALSE; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Account options + +class CAccOptDlg : public CBaseOptionsDlg +{ + INT_PTR Result; + UCHAR ActualStatus; + HPOP3ACCOUNT ActualAccount = nullptr; + + CCtrlCheck chkContact, chkSsl, chkApp; + CCtrlCombo cmbAccount, cmbCP; + CCtrlButton btnStatus, btnAdd, btnDel, btnApp, btnDefault, btnReset; + + void DlgEnableAccount(bool bEnable) + { + cmbAccount.Enable(POP3Plugin->FirstAccount != nullptr); + + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECK), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITSERVER), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITNAME), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITPORT), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITLOGIN), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITPASS), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITINTERVAL), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKSND), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKMSG), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKICO), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKAPP), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKKBN), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNAPP), chkApp.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITAPP), chkApp.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITAPPPARAM), chkApp.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKNMSGP), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKFSND), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKFMSG), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKFICO), bEnable); + + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKSTART), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKFORCE), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_COMBOCP), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_STTIMELEFT), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNRESET), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEFAULT), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNSTATUS), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKSSL), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKAPOP), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKNOTLS), chkSsl.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_AUTOBODY), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACT), bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACTNICK), chkContact.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACTNOEVENT), chkContact.IsChecked() && bEnable); + } + +public: + CAccOptDlg() : + CBaseOptionsDlg(IDD_POP3ACCOUNTOPT), + cmbCP(this, IDC_COMBOCP), + btnAdd(this, IDC_BTNADD), + btnApp(this, IDC_BTNAPP), + btnDel(this, IDC_BTNDEL), + chkApp(this, IDC_CHECKAPP), + chkSsl(this, IDC_CHECKSSL), + btnReset(this, IDC_BTNRESET), + btnStatus(this, IDC_BTNSTATUS), + btnDefault(this, IDC_BTNDEFAULT), + cmbAccount(this, IDC_COMBOACCOUNT), + chkContact(this, IDC_CHECKCONTACT) + { + cmbCP.OnSelChanged = Callback(this, &CAccOptDlg::onSelChange_CP); + + cmbAccount.OnChange = Callback(this, &CAccOptDlg::onChange_Account); + cmbAccount.OnKillFocus = Callback(this, &CAccOptDlg::onKillFocus_Account); + cmbAccount.OnSelChanged = Callback(this, &CAccOptDlg::onSelChange_Account); + + chkApp.OnChange = Callback(this, &CAccOptDlg::onChangeApp); + chkSsl.OnChange = Callback(this, &CAccOptDlg::onChangeSsl); + chkContact.OnChange = Callback(this, &CAccOptDlg::onChangeContact); + + btnAdd.OnClick = Callback(this, &CAccOptDlg::onClick_Add); + btnDel.OnClick = Callback(this, &CAccOptDlg::onClick_Del); + btnApp.OnClick = Callback(this, &CAccOptDlg::onClick_App); + btnReset.OnClick = Callback(this, &CAccOptDlg::onClick_Reset); + btnStatus.OnClick = Callback(this, &CAccOptDlg::onClick_Status); + btnDefault.OnClick = Callback(this, &CAccOptDlg::onClick_Default); + } + + bool OnInitDialog() override + { + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); + + DlgEnableAccount(false); + DlgShowAccount(0); + + // Fill accounts + WaitToReadSO(POP3Plugin->AccountBrowserSO); + + for (ActualAccount = (HPOP3ACCOUNT)POP3Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = (HPOP3ACCOUNT)ActualAccount->Next) + if (ActualAccount->Name != nullptr) + cmbAccount.AddStringA(ActualAccount->Name); + cmbAccount.SetCurSel(0); + + ReadDoneSO(POP3Plugin->AccountBrowserSO); + + // Fill code pages + cmbCP.AddString(TranslateT("Default")); + for (int i = 1; i < CPLENSUPP; i++) { + CPINFOEX info; GetCPInfoEx(CodePageNamesSupp[i].CP, 0, &info); + size_t len = mir_wstrlen(info.CodePageName + 7); + info.CodePageName[len + 6] = 0; + cmbCP.AddString(info.CodePageName + 7); + } + cmbCP.SetCurSel(0); + + ActualAccount = nullptr; + SendMessage(GetParent(m_hwnd), PSM_UNCHANGED, (WPARAM)m_hwnd, 0); + + WindowList_Add(pYAMNVar->MessageWnds, m_hwnd); + return true; + } + + void OnDestroy() override + { + WindowList_Remove(pYAMNVar->MessageWnds, m_hwnd); + } + + INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override + { + switch (msg) { + case WM_YAMN_CHANGESTATUS: + if ((HPOP3ACCOUNT)wParam == ActualAccount) { + wchar_t accstatus[256]; + GetAccountStatus(ActualAccount, accstatus); + SetDlgItemText(m_hwnd, IDC_STSTATUS, accstatus); + return TRUE; + } + break; + + case WM_YAMN_CHANGESTATUSOPTION: + NotifyChange(); + return TRUE; + + case WM_YAMN_CHANGETIME: + if ((HPOP3ACCOUNT)wParam == ActualAccount) { + wchar_t Text[256]; + mir_snwprintf(Text, TranslateT("Time left to next check [s]: %d"), (uint32_t)lParam); + SetDlgItemText(m_hwnd, IDC_STTIMELEFT, Text); + } + return TRUE; + } + return CDlgBase::DlgProc(msg, wParam, lParam); + } + + void onChange_Account(CCtrlCombo *) + { + ActualAccount = nullptr; + DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); + DlgEnableAccount(0 != GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, DlgInput, _countof(DlgInput))); + } + + void onKillFocus_Account(CCtrlCombo *) + { + GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, DlgInput, _countof(DlgInput)); + if (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput))) { + DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); + DlgEnableAccount(mir_strlen(DlgInput) > 0); + } + else { + DlgShowAccount(ActualAccount); + DlgEnableAccount(true); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), TRUE); + } + } + + void onSelChange_Account(CCtrlCombo *) + { + if (CB_ERR != (Result = cmbAccount.GetCurSel())) + SendDlgItemMessageA(m_hwnd, IDC_COMBOACCOUNT, CB_GETLBTEXT, (WPARAM)Result, (LPARAM)DlgInput); + + if ((Result == CB_ERR) || (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput)))) { + DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); + } + else { + DlgShowAccount(ActualAccount); + DlgEnableAccount(true); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), TRUE); + } + } + + void onSelChange_CP(CCtrlCombo *) + { + int sel = cmbCP.GetCurSel(); + CPINFOEX info; GetCPInfoEx(CodePageNamesSupp[sel].CP, 0, &info); + DlgSetItemTextW(m_hwnd, IDC_STSTATUS, info.CodePageName); + } + + void onChangeContact(CCtrlCheck *) + { + bool bEnabled = chkContact.IsChecked(); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACTNICK), bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKCONTACTNOEVENT), bEnabled); + } + + void onChangeSsl(CCtrlCheck *) + { + bool bEnabled = chkSsl.IsChecked(); + SetDlgItemInt(m_hwnd, IDC_EDITPORT, bEnabled ? 995 : 110, FALSE); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKNOTLS), !bEnabled); + } + + void onChangeApp(CCtrlCheck *) + { + bool bEnabled = chkApp.IsChecked(); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNAPP), bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITAPP), bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITAPPPARAM), bEnabled); + } + + void onClick_Status(CCtrlButton *) + { + DialogBoxParamW(g_plugin.getInst(), MAKEINTRESOURCEW(IDD_CHOOSESTATUSMODES), m_hwnd, DlgProcPOP3AccStatusOpt, NULL); + } + + void onClick_Add(CCtrlButton *) + { + DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); + DlgShowAccount(0); + DlgEnableAccount(true); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); + DlgSetItemTextW(m_hwnd, IDC_EDITNAME, TranslateT("New Account")); + + int index = SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_ADDSTRING, 0, (LPARAM)TranslateT("New Account")); + if (index != CB_ERR && index != CB_ERRSPACE) + SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_SETCURSEL, index, (LPARAM)TranslateT("New Account")); + } + + void onClick_App(CCtrlButton *) + { + wchar_t filter[MAX_PATH]; + mir_snwprintf(filter, L"%s (*.exe;*.bat;*.cmd;*.com)%c*.exe;*.bat;*.cmd;*.com%c%s (*.*)%c*.*%c", + TranslateT("Executables"), 0, 0, TranslateT("All Files"), 0, 0); + + OPENFILENAME OFNStruct = {0}; + OFNStruct.lStructSize = sizeof(OPENFILENAME); + OFNStruct.hwndOwner = m_hwnd; + OFNStruct.lpstrFilter = filter; + OFNStruct.nFilterIndex = 1; + OFNStruct.nMaxFile = MAX_PATH; + OFNStruct.lpstrFile = new wchar_t[MAX_PATH]; + OFNStruct.lpstrFile[0] = (wchar_t)0; + OFNStruct.lpstrTitle = TranslateT("Select executable used for notification"); + OFNStruct.Flags = OFN_FILEMUSTEXIST | OFN_NONETWORKBUTTON | OFN_PATHMUSTEXIST | OFN_NOCHANGEDIR; + if (!GetOpenFileName(&OFNStruct)) { + if (CommDlgExtendedError()) + MessageBox(m_hwnd, TranslateT("Dialog box error"), TranslateT("Failed"), MB_OK); + } + else DlgSetItemTextW(m_hwnd, IDC_EDITAPP, OFNStruct.lpstrFile); + delete[] OFNStruct.lpstrFile; + } + + void onClick_Default(CCtrlButton *) + { + DlgShowAccount(0); + } + + void onClick_Del(CCtrlButton *) + { + GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, DlgInput, _countof(DlgInput)); + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), FALSE); + if ((CB_ERR == (Result = SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_GETCURSEL, 0, 0))) + || (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput)))) + return; + + if (IDOK != MessageBox(m_hwnd, TranslateT("Do you really want to delete this account?"), TranslateT("Delete account confirmation"), MB_OKCANCEL | MB_ICONWARNING)) + return; + + DlgSetItemTextW(m_hwnd, IDC_STTIMELEFT, TranslateT("Please wait while no account is in use.")); + + if (ActualAccount->hContact != NULL) + db_delete_contact(ActualAccount->hContact); + + CallService(MS_YAMN_DELETEACCOUNT, (WPARAM)POP3Plugin, (LPARAM)ActualAccount); + + // We can consider our account as deleted. + SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_DELETESTRING, Result, 0); + DlgSetItemText(m_hwnd, IDC_COMBOACCOUNT, nullptr); + DlgEnableAccount(false); + DlgShowAccount(0); + } + + void onClick_Reset(CCtrlButton *) + { + if (ActualAccount != nullptr) + ActualAccount->TimeLeft = ActualAccount->Interval; + } + + bool OnApply() override + { + char Text[MAX_PATH]; + wchar_t TextW[MAX_PATH]; + BOOL Translated, NewAcc = FALSE; + size_t Length, index; + + if (!GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, Text, _countof(Text))) + return false; + + BOOL Check = (IsDlgButtonChecked(m_hwnd, IDC_CHECK) == BST_CHECKED); + BOOL CheckSSL = (IsDlgButtonChecked(m_hwnd, IDC_CHECKSSL) == BST_CHECKED); + BOOL CheckNoTLS = (IsDlgButtonChecked(m_hwnd, IDC_CHECKNOTLS) == BST_CHECKED); + BOOL CheckAPOP = (IsDlgButtonChecked(m_hwnd, IDC_CHECKAPOP) == BST_CHECKED); + + BOOL CheckABody = (IsDlgButtonChecked(m_hwnd, IDC_AUTOBODY) == BST_CHECKED); + BOOL CheckMsg = (IsDlgButtonChecked(m_hwnd, IDC_CHECKMSG) == BST_CHECKED); + BOOL CheckSnd = (IsDlgButtonChecked(m_hwnd, IDC_CHECKSND) == BST_CHECKED); + BOOL CheckIco = (IsDlgButtonChecked(m_hwnd, IDC_CHECKICO) == BST_CHECKED); + + BOOL CheckApp = (IsDlgButtonChecked(m_hwnd, IDC_CHECKAPP) == BST_CHECKED); + BOOL CheckKBN = (IsDlgButtonChecked(m_hwnd, IDC_CHECKKBN) == BST_CHECKED); + BOOL CheckContact = (IsDlgButtonChecked(m_hwnd, IDC_CHECKCONTACT) == BST_CHECKED); + BOOL CheckContactNick = (IsDlgButtonChecked(m_hwnd, IDC_CHECKCONTACTNICK) == BST_CHECKED); + BOOL CheckContactNoEvent = (IsDlgButtonChecked(m_hwnd, IDC_CHECKCONTACTNOEVENT) == BST_CHECKED); + + BOOL CheckFSnd = (IsDlgButtonChecked(m_hwnd, IDC_CHECKFSND) == BST_CHECKED); + BOOL CheckFMsg = (IsDlgButtonChecked(m_hwnd, IDC_CHECKFMSG) == BST_CHECKED); + BOOL CheckFIco = (IsDlgButtonChecked(m_hwnd, IDC_CHECKFICO) == BST_CHECKED); + + BOOL CheckNMsgP = (IsDlgButtonChecked(m_hwnd, IDC_CHECKNMSGP) == BST_CHECKED); + + UINT Port = GetDlgItemInt(m_hwnd, IDC_EDITPORT, &Translated, FALSE); + if (!Translated) { + MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); + SetFocus(GetDlgItem(m_hwnd, IDC_EDITPORT)); + return false; + } + + UINT Interval = GetDlgItemInt(m_hwnd, IDC_EDITINTERVAL, &Translated, FALSE); + if (!Translated) { + MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); + SetFocus(GetDlgItem(m_hwnd, IDC_EDITINTERVAL)); + return false; + } + + GetDlgItemTextA(m_hwnd, IDC_EDITAPP, Text, _countof(Text)); + if (CheckApp && !(Length = mir_strlen(Text))) { + MessageBox(m_hwnd, TranslateT("Please select application to run"), TranslateT("Input error"), MB_OK); + return false; + } + + GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, Text, _countof(Text)); + if (!(Length = mir_strlen(Text))) { + GetDlgItemTextA(m_hwnd, IDC_EDITNAME, Text, _countof(Text)); + if (!(Length = mir_strlen(Text))) + return false; + } + + DlgSetItemTextW(m_hwnd, IDC_STTIMELEFT, TranslateT("Please wait while no account is in use.")); + + if (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)Text))) { + NewAcc = TRUE; + WaitToWriteSO(POP3Plugin->AccountBrowserSO); + if (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_GETNEXTFREEACCOUNT, (WPARAM)POP3Plugin, (LPARAM)YAMN_ACCOUNTVERSION))) { + WriteDoneSO(POP3Plugin->AccountBrowserSO); + MessageBox(m_hwnd, TranslateT("Cannot allocate memory space for new account"), TranslateT("Memory error"), MB_OK); + return false; + } + DlgEnableAccount(true); + } + else { // We have to get full access to AccountBrowser, so other iterating thrads cannot get new account until new account is right set + WaitToWriteSO(POP3Plugin->AccountBrowserSO); + } + + if (WAIT_OBJECT_0 != WaitToWrite(ActualAccount)) + WriteDoneSO(POP3Plugin->AccountBrowserSO); + + GetDlgItemTextA(m_hwnd, IDC_EDITNAME, Text, _countof(Text)); + if (!(Length = mir_strlen(Text))) + return false; + if (nullptr != ActualAccount->Name) + delete[] ActualAccount->Name; + ActualAccount->Name = new char[mir_strlen(Text) + 1]; + mir_strcpy(ActualAccount->Name, Text); + + GetDlgItemTextA(m_hwnd, IDC_EDITSERVER, Text, _countof(Text)); + if (nullptr != ActualAccount->Server->Name) + delete[] ActualAccount->Server->Name; + ActualAccount->Server->Name = new char[mir_strlen(Text) + 1]; + mir_strcpy(ActualAccount->Server->Name, Text); + + GetDlgItemTextA(m_hwnd, IDC_EDITLOGIN, Text, _countof(Text)); + if (nullptr != ActualAccount->Server->Login) + delete[] ActualAccount->Server->Login; + ActualAccount->Server->Login = new char[mir_strlen(Text) + 1]; + mir_strcpy(ActualAccount->Server->Login, Text); + + GetDlgItemTextA(m_hwnd, IDC_EDITPASS, Text, _countof(Text)); + if (nullptr != ActualAccount->Server->Passwd) + delete[] ActualAccount->Server->Passwd; + ActualAccount->Server->Passwd = new char[mir_strlen(Text) + 1]; + mir_strcpy(ActualAccount->Server->Passwd, Text); + + GetDlgItemTextW(m_hwnd, IDC_EDITAPP, TextW, _countof(TextW)); + if (nullptr != ActualAccount->NewMailN.App) + delete[] ActualAccount->NewMailN.App; + ActualAccount->NewMailN.App = new wchar_t[mir_wstrlen(TextW) + 1]; + mir_wstrcpy(ActualAccount->NewMailN.App, TextW); + + GetDlgItemTextW(m_hwnd, IDC_EDITAPPPARAM, TextW, _countof(TextW)); + if (nullptr != ActualAccount->NewMailN.AppParam) + delete[] ActualAccount->NewMailN.AppParam; + ActualAccount->NewMailN.AppParam = new wchar_t[mir_wstrlen(TextW) + 1]; + mir_wstrcpy(ActualAccount->NewMailN.AppParam, TextW); + + ActualAccount->Server->Port = Port; + ActualAccount->Interval = Interval * 60; + + if (CB_ERR == (index = SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_GETCURSEL, 0, 0))) + index = CPDEFINDEX; + ActualAccount->CP = CodePageNamesSupp[index].CP; + + if (NewAcc) + ActualAccount->TimeLeft = Interval * 60; + + BOOL CheckStart = (IsDlgButtonChecked(m_hwnd, IDC_CHECKSTART) == BST_CHECKED); + BOOL CheckForce = (IsDlgButtonChecked(m_hwnd, IDC_CHECKFORCE) == BST_CHECKED); + + ActualAccount->Flags = + (Check ? YAMN_ACC_ENA : 0) | + (CheckSSL ? YAMN_ACC_SSL23 : 0) | + (CheckNoTLS ? YAMN_ACC_NOTLS : 0) | + (CheckAPOP ? YAMN_ACC_APOP : 0) | + (CheckABody ? YAMN_ACC_BODY : 0) | + (ActualAccount->Flags & YAMN_ACC_POPN); + + ActualAccount->StatusFlags &= 0xFFFF; + ActualAccount->StatusFlags |= + (CheckStart ? YAMN_ACC_STARTS : 0) | + (CheckForce ? YAMN_ACC_FORCE : 0); + + ActualAccount->NewMailN.Flags = + (CheckSnd ? YAMN_ACC_SND : 0) | + (CheckMsg ? YAMN_ACC_MSG : 0) | + (CheckIco ? YAMN_ACC_ICO : 0) | + (ActualAccount->NewMailN.Flags & YAMN_ACC_POP) | + (ActualAccount->NewMailN.Flags & YAMN_ACC_POPC) | + (CheckApp ? YAMN_ACC_APP : 0) | + (CheckKBN ? YAMN_ACC_KBN : 0) | + (CheckContact ? YAMN_ACC_CONT : 0) | + (CheckContactNick ? YAMN_ACC_CONTNICK : 0) | + (CheckContactNoEvent ? YAMN_ACC_CONTNOEVENT : 0) | + YAMN_ACC_MSGP; //this is default: when new mail arrives and window was displayed, leave it displayed. + + ActualAccount->NoNewMailN.Flags = + (ActualAccount->NoNewMailN.Flags & YAMN_ACC_POP) | + (ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC) | + (CheckNMsgP ? YAMN_ACC_MSGP : 0); + + ActualAccount->BadConnectN.Flags = + (CheckFSnd ? YAMN_ACC_SND : 0) | + (CheckFMsg ? YAMN_ACC_MSG : 0) | + (CheckFIco ? YAMN_ACC_ICO : 0) | + (ActualAccount->BadConnectN.Flags & YAMN_ACC_POP) | + (ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC); + + WriteDone(ActualAccount); + WriteDoneSO(POP3Plugin->AccountBrowserSO); + + EnableWindow(GetDlgItem(m_hwnd, IDC_BTNDEL), TRUE); + + DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); + + index = SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_GETCURSEL, 0, 0); + + HPOP3ACCOUNT temp = ActualAccount; + + SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_RESETCONTENT, 0, 0); + if (POP3Plugin->FirstAccount != nullptr) + for (ActualAccount = (HPOP3ACCOUNT)POP3Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = (HPOP3ACCOUNT)ActualAccount->Next) + if (ActualAccount->Name != nullptr) + SendDlgItemMessageA(m_hwnd, IDC_COMBOACCOUNT, CB_ADDSTRING, 0, (LPARAM)ActualAccount->Name); + + ActualAccount = temp; + SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_SETCURSEL, (WPARAM)index, (LPARAM)ActualAccount->Name); + + WritePOP3Accounts(); + RefreshContact(); + return TRUE; + } +}; + +///////////////////////////////////////////////////////////////////////////////////////// +// Popup options + +class CPopupOptsDlg : public CBaseOptionsDlg +{ + HPOP3ACCOUNT ActualAccount = nullptr; + UCHAR ActualStatus; + + CCtrlCombo cmbAccount, cmbCP; + CCtrlCheck chkCol, chkFcol, chkNcol, chkPop, chkFpop, chkNpop; + CCtrlButton btnPreview; + + void DlgShowAccountPopup() + { + if (ActualAccount) { + WaitToRead(ActualAccount); //we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread + SetDlgItemInt(m_hwnd, IDC_EDITPOPS, ActualAccount->NewMailN.PopupTime, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITNPOPS, ActualAccount->NoNewMailN.PopupTime, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITFPOPS, ActualAccount->BadConnectN.PopupTime, FALSE); + + chkPop.SetState(ActualAccount->NewMailN.Flags & YAMN_ACC_POP); + chkCol.SetState(ActualAccount->NewMailN.Flags & YAMN_ACC_POPC); + chkNpop.SetState(ActualAccount->NoNewMailN.Flags & YAMN_ACC_POP); + chkNcol.SetState(ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC); + chkFpop.SetState(ActualAccount->BadConnectN.Flags & YAMN_ACC_POP ? BST_CHECKED : BST_UNCHECKED); + chkFcol.SetState(ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC); + CheckDlgButton(m_hwnd, IDC_RADIOPOPN, ActualAccount->Flags & YAMN_ACC_POPN ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_RADIOPOP1, ActualAccount->Flags & YAMN_ACC_POPN ? BST_UNCHECKED : BST_CHECKED); + ReadDone(ActualAccount); + } + else { // default + SetDlgItemInt(m_hwnd, IDC_EDITPOPS, 0, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITNPOPS, 0, FALSE); + SetDlgItemInt(m_hwnd, IDC_EDITFPOPS, 0, FALSE); + chkPop.SetState(true); + chkCol.SetState(true); + chkNpop.SetState(true); + chkNcol.SetState(true); + chkFpop.SetState(true); + chkFcol.SetState(true); + CheckDlgButton(m_hwnd, IDC_RADIOPOPN, BST_UNCHECKED); + CheckDlgButton(m_hwnd, IDC_RADIOPOP1, BST_CHECKED); + } + } + + void DlgEnableAccountPopup(bool bEnable) + { + chkPop.Enable(bEnable); + chkCol.Enable(chkPop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITPOPS), chkPop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPB), chkCol.IsChecked() && chkPop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPT), chkCol.IsChecked() && chkPop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_RADIOPOPN), chkPop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_RADIOPOP1), chkPop.IsChecked() && bEnable); + + chkNpop.Enable(bEnable); + chkNcol.Enable(chkNpop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITNPOPS), chkNpop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPNB), chkNcol.IsChecked() && chkNpop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPNT), chkNcol.IsChecked() && chkNpop.IsChecked() && bEnable); + + chkFpop.Enable(bEnable); + chkFcol.Enable(chkFpop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITFPOPS), chkFpop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPFB), chkFcol.IsChecked() && chkFpop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPFT), chkFcol.IsChecked() && chkFpop.IsChecked() && bEnable); + EnableWindow(GetDlgItem(m_hwnd, IDC_CHECKAPOP), bEnable); + } + + void DlgShowAccountColors() + { + WaitToRead(ActualAccount); //we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread + + if (ActualAccount->NewMailN.Flags & YAMN_ACC_POPC) { + SendDlgItemMessage(m_hwnd, IDC_CPB, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->NewMailN.PopupB); + SendDlgItemMessage(m_hwnd, IDC_CPT, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->NewMailN.PopupT); + } + else { + SendDlgItemMessage(m_hwnd, IDC_CPB, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE)); + SendDlgItemMessage(m_hwnd, IDC_CPT, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_WINDOWTEXT)); + } + if (ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC) { + SendDlgItemMessage(m_hwnd, IDC_CPFB, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->BadConnectN.PopupB); + SendDlgItemMessage(m_hwnd, IDC_CPFT, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->BadConnectN.PopupT); + } + else { + SendDlgItemMessage(m_hwnd, IDC_CPFB, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE)); + SendDlgItemMessage(m_hwnd, IDC_CPFT, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_WINDOWTEXT)); + } + if (ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC) { + SendDlgItemMessage(m_hwnd, IDC_CPNB, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->NoNewMailN.PopupB); + SendDlgItemMessage(m_hwnd, IDC_CPNT, CPM_SETCOLOUR, 0, (LPARAM)ActualAccount->NoNewMailN.PopupT); + } + else { + SendDlgItemMessage(m_hwnd, IDC_CPNB, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE)); + SendDlgItemMessage(m_hwnd, IDC_CPNT, CPM_SETCOLOUR, 0, (LPARAM)GetSysColor(COLOR_WINDOWTEXT)); + } + + ReadDone(ActualAccount); //we do not need to check if account is deleted. It is not deleted, because only thread that can delete account is this thread + } + +public: + CPopupOptsDlg() : + CBaseOptionsDlg(IDD_POP3ACCOUNTPOPUP), + cmbCP(this, IDC_COMBOCP), + chkCol(this, IDC_CHECKCOL), + chkPop(this, IDC_CHECKPOP), + chkFcol(this, IDC_CHECKFCOL), + chkFpop(this, IDC_CHECKFPOP), + chkNcol(this, IDC_CHECKNCOL), + chkNpop(this, IDC_CHECKNPOP), + btnPreview(this, IDC_PREVIEW), + cmbAccount(this, IDC_COMBOACCOUNT) + { + chkPop.OnChange = Callback(this, &CPopupOptsDlg::onChange_Pop); + chkFpop.OnChange = Callback(this, &CPopupOptsDlg::onChange_Fpop); + chkNpop.OnChange = Callback(this, &CPopupOptsDlg::onChange_Npop); + chkCol.OnChange = chkFcol.OnChange = chkNcol.OnChange = Callback(this, &CPopupOptsDlg::onChange_Col); + + cmbCP.OnSelChanged = Callback(this, &CPopupOptsDlg::onSelChange_CP); + + btnPreview.OnClick = Callback(this, &CPopupOptsDlg::onClick_Preview); + + cmbAccount.OnKillFocus = Callback(this, &CPopupOptsDlg::onKillFocus_Account); + cmbAccount.OnSelChanged = Callback(this, &CPopupOptsDlg::onSelChange_Account); + } + + bool OnInitDialog() override + { + WindowList_Add(pYAMNVar->MessageWnds, m_hwnd); + + DlgEnableAccountPopup(false); + DlgShowAccountPopup(); + + WaitToReadSO(POP3Plugin->AccountBrowserSO); + + if (POP3Plugin->FirstAccount != nullptr) + for (ActualAccount = (HPOP3ACCOUNT)POP3Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = (HPOP3ACCOUNT)ActualAccount->Next) + if (ActualAccount->Name != nullptr) + cmbAccount.AddStringA(ActualAccount->Name); + + ReadDoneSO(POP3Plugin->AccountBrowserSO); + ActualAccount = nullptr; + cmbAccount.SetCurSel(0); + return true; + } + + void OnDestroy() override + { + WindowList_Remove(pYAMNVar->MessageWnds, m_hwnd); + } + + void onKillFocus_Account(CCtrlCombo *) + { + GetDlgItemTextA(m_hwnd, IDC_COMBOACCOUNT, DlgInput, _countof(DlgInput)); + if (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput))) { + DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); + if (mir_strlen(DlgInput)) + DlgEnableAccountPopup(true); + else + DlgEnableAccountPopup(false); + } + else { + DlgShowAccount(ActualAccount); + DlgShowAccountColors(); + DlgEnableAccountPopup(true); + } + } + + void onSelChange_Account(CCtrlCombo *) + { + int Result = SendDlgItemMessage(m_hwnd, IDC_COMBOACCOUNT, CB_GETCURSEL, 0, 0); + if (CB_ERR != Result) + SendDlgItemMessageA(m_hwnd, IDC_COMBOACCOUNT, CB_GETLBTEXT, (WPARAM)Result, (LPARAM)DlgInput); + if ((Result == CB_ERR) || (nullptr == (ActualAccount = (HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)DlgInput)))) { + DlgSetItemText(m_hwnd, (WPARAM)IDC_STTIMELEFT, nullptr); + } + else { + DlgShowAccount(ActualAccount); + DlgShowAccountColors(); + DlgEnableAccountPopup(true); + } + } + + void onSelChange_CP(CCtrlCombo *) + { + int sel = SendDlgItemMessage(m_hwnd, IDC_COMBOCP, CB_GETCURSEL, 0, 0); + CPINFOEX info; GetCPInfoEx(CodePageNamesSupp[sel].CP, 0, &info); + DlgSetItemTextW(m_hwnd, IDC_STSTATUS, info.CodePageName); + } + + void onChange_Col(CCtrlCheck *) + { + EnableWindow(GetDlgItem(m_hwnd, IDC_CPB), chkCol.IsChecked() && chkPop.IsChecked()); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPT), chkCol.IsChecked() && chkPop.IsChecked()); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPNB), chkNcol.IsChecked() && chkNpop.IsChecked()); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPNT), chkNcol.IsChecked() && chkNpop.IsChecked()); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPFB), chkFcol.IsChecked() && chkFpop.IsChecked()); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPFT), chkFcol.IsChecked() && chkFpop.IsChecked()); + } + + void onClick_Preview(CCtrlButton *) + { + if (chkPop.IsChecked()) { + POPUPDATAW Tester = {}; + Tester.lchIcon = g_plugin.getIcon(IDI_NEWMAIL); + mir_wstrncpy(Tester.lpwzContactName, TranslateT("Account Test"), MAX_CONTACTNAME); + mir_wstrncpy(Tester.lpwzText, TranslateT("You have N new mail messages"), MAX_SECONDLINE); + if (chkCol.IsChecked()) { + Tester.colorBack = SendDlgItemMessage(m_hwnd, IDC_CPB, CPM_GETCOLOUR, 0, 0); + Tester.colorText = SendDlgItemMessage(m_hwnd, IDC_CPT, CPM_GETCOLOUR, 0, 0); + } + else { + Tester.colorBack = GetSysColor(COLOR_BTNFACE); + Tester.colorText = GetSysColor(COLOR_WINDOWTEXT); + } + PUAddPopupW(&Tester); + } + + if (chkFpop.IsChecked()) { + POPUPDATAW TesterF = {}; + TesterF.lchIcon = g_plugin.getIcon(IDI_BADCONNECT); + mir_wstrncpy(TesterF.lpwzContactName, TranslateT("Account Test (failed)"), MAX_CONTACTNAME); + mir_wstrncpy(TesterF.lpwzText, TranslateT("Connection failed message"), MAX_SECONDLINE); + if (chkFcol.IsChecked()) { + TesterF.colorBack = SendDlgItemMessage(m_hwnd, IDC_CPFB, CPM_GETCOLOUR, 0, 0); + TesterF.colorText = SendDlgItemMessage(m_hwnd, IDC_CPFT, CPM_GETCOLOUR, 0, 0); + } + else { + TesterF.colorBack = GetSysColor(COLOR_BTNFACE); + TesterF.colorText = GetSysColor(COLOR_WINDOWTEXT); + } + PUAddPopupW(&TesterF); + } + + if (chkNpop.IsChecked()) { + POPUPDATAW TesterN = {}; + TesterN.lchIcon = g_plugin.getIcon(IDI_LAUNCHAPP); + mir_wstrncpy(TesterN.lpwzContactName, TranslateT("Account Test"), MAX_CONTACTNAME); + mir_wstrncpy(TesterN.lpwzText, TranslateT("No new mail message"), MAX_SECONDLINE); + if (chkNcol.IsChecked()) { + TesterN.colorBack = SendDlgItemMessage(m_hwnd, IDC_CPNB, CPM_GETCOLOUR, 0, 0); + TesterN.colorText = SendDlgItemMessage(m_hwnd, IDC_CPNT, CPM_GETCOLOUR, 0, 0); + } + else { + TesterN.colorBack = GetSysColor(COLOR_BTNFACE); + TesterN.colorText = GetSysColor(COLOR_WINDOWTEXT); + } + PUAddPopupW(&TesterN); + } + } + + void onChange_Pop(CCtrlCheck *) + { + bool bEnabled = chkPop.IsChecked(); + chkCol.Enable(bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPB), chkCol.IsChecked() && bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPT), chkCol.IsChecked() && bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_RADIOPOPN), bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_RADIOPOP1), bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITPOPS), bEnabled); + } + + void onChange_Fpop(CCtrlCheck *) + { + bool bEnabled = chkFpop.IsChecked(); + chkFcol.Enable(bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPFB), chkFcol.IsChecked() && bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPFT), chkFcol.IsChecked() && bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITFPOPS), bEnabled); + } + + void onChange_Npop(CCtrlCheck *) + { + bool bEnabled = chkNpop.IsChecked(); + chkNcol.Enable(bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPNB), chkNcol.IsChecked() && bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_CPNT), chkNcol.IsChecked() && bEnabled); + EnableWindow(GetDlgItem(m_hwnd, IDC_EDITNPOPS), bEnabled); + } + + bool OnApply() override + { + wchar_t Text[MAX_PATH]; + if (!GetDlgItemText(m_hwnd, IDC_COMBOACCOUNT, Text, _countof(Text))) + return false; + + BOOL CheckPopup = chkPop.IsChecked(); + BOOL CheckPopupW = chkCol.IsChecked(); + + BOOL CheckFPopup = chkFpop.IsChecked(); + BOOL CheckFPopupW = chkFcol.IsChecked(); + + BOOL CheckNPopup = chkNpop.IsChecked(); + BOOL CheckNPopupW = chkNcol.IsChecked(); + + BOOL CheckPopN = (IsDlgButtonChecked(m_hwnd, IDC_RADIOPOPN) == BST_CHECKED); + + BOOL Translated; + UINT Time = GetDlgItemInt(m_hwnd, IDC_EDITPOPS, &Translated, FALSE); + if (!Translated) { + MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); + SetFocus(GetDlgItem(m_hwnd, IDC_EDITPOPS)); + return false; + } + UINT TimeN = GetDlgItemInt(m_hwnd, IDC_EDITNPOPS, &Translated, FALSE); + if (!Translated) { + MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); + SetFocus(GetDlgItem(m_hwnd, IDC_EDITNPOPS)); + return false; + } + UINT TimeF = GetDlgItemInt(m_hwnd, IDC_EDITFPOPS, &Translated, FALSE); + if (!Translated) { + MessageBox(m_hwnd, TranslateT("This is not a valid number value"), TranslateT("Input error"), MB_OK); + SetFocus(GetDlgItem(m_hwnd, IDC_EDITFPOPS)); + return false; + } + + DlgSetItemTextW(m_hwnd, IDC_STTIMELEFT, TranslateT("Please wait while no account is in use.")); + + ActualAccount->Flags = + (ActualAccount->Flags & YAMN_ACC_ENA) | + (ActualAccount->Flags & YAMN_ACC_SSL23) | + (ActualAccount->Flags & YAMN_ACC_NOTLS) | + (ActualAccount->Flags & YAMN_ACC_APOP) | + (ActualAccount->Flags & YAMN_ACC_BODY) | + (CheckPopN ? YAMN_ACC_POPN : 0); + + ActualAccount->NewMailN.Flags = + (ActualAccount->NewMailN.Flags & YAMN_ACC_SND) | + (ActualAccount->NewMailN.Flags & YAMN_ACC_MSG) | + (ActualAccount->NewMailN.Flags & YAMN_ACC_ICO) | + (CheckPopup ? YAMN_ACC_POP : 0) | + (CheckPopupW ? YAMN_ACC_POPC : 0) | + (ActualAccount->NewMailN.Flags & YAMN_ACC_APP) | + (ActualAccount->NewMailN.Flags & YAMN_ACC_KBN) | + (ActualAccount->NewMailN.Flags & YAMN_ACC_CONT) | + (ActualAccount->NewMailN.Flags & YAMN_ACC_CONTNICK) | + (ActualAccount->NewMailN.Flags & YAMN_ACC_CONTNOEVENT) | + YAMN_ACC_MSGP; + + ActualAccount->NoNewMailN.Flags = + (CheckNPopup ? YAMN_ACC_POP : 0) | + (CheckNPopupW ? YAMN_ACC_POPC : 0) | + (ActualAccount->NoNewMailN.Flags & YAMN_ACC_MSGP); + + ActualAccount->BadConnectN.Flags = + (ActualAccount->BadConnectN.Flags & YAMN_ACC_SND) | + (ActualAccount->BadConnectN.Flags & YAMN_ACC_MSG) | + (ActualAccount->BadConnectN.Flags & YAMN_ACC_ICO) | + (CheckFPopup ? YAMN_ACC_POP : 0) | + (CheckFPopupW ? YAMN_ACC_POPC : 0); + + ActualAccount->NewMailN.PopupB = SendDlgItemMessage(m_hwnd, IDC_CPB, CPM_GETCOLOUR, 0, 0); + ActualAccount->NewMailN.PopupT = SendDlgItemMessage(m_hwnd, IDC_CPT, CPM_GETCOLOUR, 0, 0); + ActualAccount->NewMailN.PopupTime = Time; + + ActualAccount->NoNewMailN.PopupB = SendDlgItemMessage(m_hwnd, IDC_CPNB, CPM_GETCOLOUR, 0, 0); + ActualAccount->NoNewMailN.PopupT = SendDlgItemMessage(m_hwnd, IDC_CPNT, CPM_GETCOLOUR, 0, 0); + ActualAccount->NoNewMailN.PopupTime = TimeN; + + ActualAccount->BadConnectN.PopupB = SendDlgItemMessage(m_hwnd, IDC_CPFB, CPM_GETCOLOUR, 0, 0); + ActualAccount->BadConnectN.PopupT = SendDlgItemMessage(m_hwnd, IDC_CPFT, CPM_GETCOLOUR, 0, 0); + ActualAccount->BadConnectN.PopupTime = TimeF; + + WriteDone(ActualAccount); + WriteDoneSO(POP3Plugin->AccountBrowserSO); + + WritePOP3Accounts(); + RefreshContact(); + return TRUE; + } +}; + +//-------------------------------------------------------------------------------------------------- + +int YAMNOptInitSvc(WPARAM wParam, LPARAM) +{ + OPTIONSDIALOGPAGE odp = {}; + odp.szGroup.a = LPGEN("Network"); + odp.szTitle.a = LPGEN("YAMN"); + odp.flags = ODPF_BOLDGROUPS; + + odp.szTab.a = LPGEN("Accounts"); + odp.pDialog = new CAccOptDlg(); + g_plugin.addOptions(wParam, &odp); + + odp.szTab.a = LPGEN("General"); + odp.pDialog = new CGeneralOptDlg(); + g_plugin.addOptions(wParam, &odp); + + odp.szGroup.a = LPGEN("Popups"); + odp.szTab.a = LPGEN("YAMN"); + odp.pDialog = new CPopupOptsDlg(); + g_plugin.addOptions(wParam, &odp); + return 0; +} diff --git a/protocols/YAMN/src/protoplugin.cpp b/protocols/YAMN/src/protoplugin.cpp index c6e6a6aecc..b192ac1f5f 100644 --- a/protocols/YAMN/src/protoplugin.cpp +++ b/protocols/YAMN/src/protoplugin.cpp @@ -1,172 +1,172 @@ -/* - * YAMN plugin export functions for protocols - * - * (c) majvan 2002-2004 - */ - -#include "stdafx.h" - - //-------------------------------------------------------------------------------------------------- - -PYAMN_PROTOPLUGINQUEUE FirstProtoPlugin = nullptr; - -INT_PTR RegisterProtocolPluginSvc(WPARAM, LPARAM); - -//Removes plugin from queue and deletes registration structures -INT_PTR UnregisterProtocolPlugin(HYAMNPROTOPLUGIN Plugin); - -INT_PTR UnregisterProtocolPluginSvc(WPARAM, LPARAM); - -//Removes plugins from queue and deletes registration structures -INT_PTR UnregisterProtoPlugins(); - -//Sets imported functions for an plugin and therefore it starts plugin to be registered and running -// Plugin- plugin, which wants to set its functions -// YAMNFcn- pointer to imported functions with accounts -// YAMNFcnVer- version of YAMN_PROTOIMPORTFCN, use YAMN_PROTOIMPORTFCNVERSION -// YAMNMailFcn- pointer to imported functions with mails -// YAMNMailFcnVer- version of YAMN_MAILIMPORTFCN, use YAMN_MAILIMPORTFCNVERSION -// returns nonzero if success -int WINAPI SetProtocolPluginFcnImportFcn(HYAMNPROTOPLUGIN Plugin, PYAMN_PROTOIMPORTFCN YAMNFcn, uint32_t YAMNFcnVer, PYAMN_MAILIMPORTFCN YAMNMailFcn, uint32_t YAMNMailFcnVer); - -struct CExportedFunctions ProtoPluginExportedFcn[] = -{ - {YAMN_SETPROTOCOLPLUGINFCNIMPORTID, (void *)SetProtocolPluginFcnImportFcn}, -}; - -struct CExportedServices ProtoPluginExportedSvc[] = -{ - {MS_YAMN_REGISTERPROTOPLUGIN, RegisterProtocolPluginSvc}, - {MS_YAMN_UNREGISTERPROTOPLUGIN, UnregisterProtocolPluginSvc}, - {MS_YAMN_GETFILENAME, GetFileNameSvc}, - {MS_YAMN_DELETEFILENAME, DeleteFileNameSvc}, -}; - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -INT_PTR RegisterProtocolPluginSvc(WPARAM wParam, LPARAM lParam) -{ - PYAMN_PROTOREGISTRATION Registration = (PYAMN_PROTOREGISTRATION)wParam; - HYAMNPROTOPLUGIN Plugin; - - if (lParam != YAMN_PROTOREGISTRATIONVERSION) - return 0; - if ((Registration->Name == nullptr) || (Registration->Ver == nullptr)) - return (INT_PTR)NULL; - if (nullptr == (Plugin = new YAMN_PROTOPLUGIN)) - return (INT_PTR)NULL; - - Plugin->PluginInfo = Registration; - - Plugin->FirstAccount = nullptr; - - Plugin->AccountBrowserSO = new SWMRG; - SWMRGInitialize(Plugin->AccountBrowserSO, nullptr); - - Plugin->Fcn = nullptr; - Plugin->MailFcn = nullptr; - - return (INT_PTR)Plugin; -} - -int WINAPI SetProtocolPluginFcnImportFcn(HYAMNPROTOPLUGIN Plugin, PYAMN_PROTOIMPORTFCN YAMNFcn, uint32_t YAMNFcnVer, PYAMN_MAILIMPORTFCN YAMNMailFcn, uint32_t YAMNMailFcnVer) -{ - PYAMN_PROTOPLUGINQUEUE Parser; - - if (YAMNFcnVer != YAMN_PROTOIMPORTFCNVERSION) - return 0; - if (YAMNMailFcnVer != YAMN_MAILIMPORTFCNVERSION) - return 0; - if (YAMNFcn == nullptr) - return 0; - if (YAMNMailFcn == nullptr) - return 0; - - Plugin->Fcn = YAMNFcn; - Plugin->MailFcn = YAMNMailFcn; - - mir_cslock lck(PluginRegCS); - // We add protocol to the protocol list - for (Parser = FirstProtoPlugin; Parser != nullptr && Parser->Next != nullptr; Parser = Parser->Next); - if (Parser == nullptr) { - FirstProtoPlugin = new YAMN_PROTOPLUGINQUEUE; - Parser = FirstProtoPlugin; - } - else { - Parser->Next = new YAMN_PROTOPLUGINQUEUE; - Parser = Parser->Next; - } - - Parser->Plugin = Plugin; - Parser->Next = nullptr; - return 1; -} - -INT_PTR UnregisterProtocolPlugin(HYAMNPROTOPLUGIN Plugin) -{ - PYAMN_PROTOPLUGINQUEUE Parser, Found; - - if (FirstProtoPlugin->Plugin == Plugin) { - Found = FirstProtoPlugin; - FirstProtoPlugin = FirstProtoPlugin->Next; - } - else { - for (Parser = FirstProtoPlugin; (Parser->Next != nullptr) && (Plugin != Parser->Next->Plugin); Parser = Parser->Next); - if (Parser->Next != nullptr) { - Found = Parser->Next; - Parser->Next = Parser->Next->Next; - } - else - Found = nullptr; - } - if (Found != nullptr) { - StopAccounts(Plugin); - DeleteAccounts(Plugin); - if (Plugin->Fcn->UnLoadFcn != nullptr) - Plugin->Fcn->UnLoadFcn((void *)nullptr); - - delete Found->Plugin->AccountBrowserSO; - delete Found->Plugin; - delete Found; - } - else - return 0; - return 1; -} - -INT_PTR UnregisterProtocolPluginSvc(WPARAM wParam, LPARAM) -{ - HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; - - mir_cslock lck(PluginRegCS); - UnregisterProtocolPlugin(Plugin); - return 1; -} - -INT_PTR UnregisterProtoPlugins() -{ - mir_cslock lck(PluginRegCS); - // We remove protocols from the protocol list - while (FirstProtoPlugin != nullptr) - UnregisterProtocolPlugin(FirstProtoPlugin->Plugin); - return 1; -} - -INT_PTR GetFileNameSvc(WPARAM wParam, LPARAM) -{ - wchar_t *FileName = new wchar_t[MAX_PATH]; - if (FileName == nullptr) - return NULL; - - mir_snwprintf(FileName, MAX_PATH, L"%s\\yamn-accounts.%s.%s.book", UserDirectory, (wchar_t *)wParam, ProfileName); - return (INT_PTR)FileName; -} - -INT_PTR DeleteFileNameSvc(WPARAM wParam, LPARAM) -{ - if ((wchar_t *)wParam != nullptr) - delete[](wchar_t *) wParam; - - return 0; -} +/* + * YAMN plugin export functions for protocols + * + * (c) majvan 2002-2004 + */ + +#include "stdafx.h" + + //-------------------------------------------------------------------------------------------------- + +PYAMN_PROTOPLUGINQUEUE FirstProtoPlugin = nullptr; + +INT_PTR RegisterProtocolPluginSvc(WPARAM, LPARAM); + +//Removes plugin from queue and deletes registration structures +INT_PTR UnregisterProtocolPlugin(HYAMNPROTOPLUGIN Plugin); + +INT_PTR UnregisterProtocolPluginSvc(WPARAM, LPARAM); + +//Removes plugins from queue and deletes registration structures +INT_PTR UnregisterProtoPlugins(); + +//Sets imported functions for an plugin and therefore it starts plugin to be registered and running +// Plugin- plugin, which wants to set its functions +// YAMNFcn- pointer to imported functions with accounts +// YAMNFcnVer- version of YAMN_PROTOIMPORTFCN, use YAMN_PROTOIMPORTFCNVERSION +// YAMNMailFcn- pointer to imported functions with mails +// YAMNMailFcnVer- version of YAMN_MAILIMPORTFCN, use YAMN_MAILIMPORTFCNVERSION +// returns nonzero if success +int WINAPI SetProtocolPluginFcnImportFcn(HYAMNPROTOPLUGIN Plugin, PYAMN_PROTOIMPORTFCN YAMNFcn, uint32_t YAMNFcnVer, PYAMN_MAILIMPORTFCN YAMNMailFcn, uint32_t YAMNMailFcnVer); + +struct CExportedFunctions ProtoPluginExportedFcn[] = +{ + {YAMN_SETPROTOCOLPLUGINFCNIMPORTID, (void *)SetProtocolPluginFcnImportFcn}, +}; + +struct CExportedServices ProtoPluginExportedSvc[] = +{ + {MS_YAMN_REGISTERPROTOPLUGIN, RegisterProtocolPluginSvc}, + {MS_YAMN_UNREGISTERPROTOPLUGIN, UnregisterProtocolPluginSvc}, + {MS_YAMN_GETFILENAME, GetFileNameSvc}, + {MS_YAMN_DELETEFILENAME, DeleteFileNameSvc}, +}; + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +INT_PTR RegisterProtocolPluginSvc(WPARAM wParam, LPARAM lParam) +{ + PYAMN_PROTOREGISTRATION Registration = (PYAMN_PROTOREGISTRATION)wParam; + HYAMNPROTOPLUGIN Plugin; + + if (lParam != YAMN_PROTOREGISTRATIONVERSION) + return 0; + if ((Registration->Name == nullptr) || (Registration->Ver == nullptr)) + return (INT_PTR)NULL; + if (nullptr == (Plugin = new YAMN_PROTOPLUGIN)) + return (INT_PTR)NULL; + + Plugin->PluginInfo = Registration; + + Plugin->FirstAccount = nullptr; + + Plugin->AccountBrowserSO = new SWMRG; + SWMRGInitialize(Plugin->AccountBrowserSO, nullptr); + + Plugin->Fcn = nullptr; + Plugin->MailFcn = nullptr; + + return (INT_PTR)Plugin; +} + +int WINAPI SetProtocolPluginFcnImportFcn(HYAMNPROTOPLUGIN Plugin, PYAMN_PROTOIMPORTFCN YAMNFcn, uint32_t YAMNFcnVer, PYAMN_MAILIMPORTFCN YAMNMailFcn, uint32_t YAMNMailFcnVer) +{ + PYAMN_PROTOPLUGINQUEUE Parser; + + if (YAMNFcnVer != YAMN_PROTOIMPORTFCNVERSION) + return 0; + if (YAMNMailFcnVer != YAMN_MAILIMPORTFCNVERSION) + return 0; + if (YAMNFcn == nullptr) + return 0; + if (YAMNMailFcn == nullptr) + return 0; + + Plugin->Fcn = YAMNFcn; + Plugin->MailFcn = YAMNMailFcn; + + mir_cslock lck(PluginRegCS); + // We add protocol to the protocol list + for (Parser = FirstProtoPlugin; Parser != nullptr && Parser->Next != nullptr; Parser = Parser->Next); + if (Parser == nullptr) { + FirstProtoPlugin = new YAMN_PROTOPLUGINQUEUE; + Parser = FirstProtoPlugin; + } + else { + Parser->Next = new YAMN_PROTOPLUGINQUEUE; + Parser = Parser->Next; + } + + Parser->Plugin = Plugin; + Parser->Next = nullptr; + return 1; +} + +INT_PTR UnregisterProtocolPlugin(HYAMNPROTOPLUGIN Plugin) +{ + PYAMN_PROTOPLUGINQUEUE Parser, Found; + + if (FirstProtoPlugin->Plugin == Plugin) { + Found = FirstProtoPlugin; + FirstProtoPlugin = FirstProtoPlugin->Next; + } + else { + for (Parser = FirstProtoPlugin; (Parser->Next != nullptr) && (Plugin != Parser->Next->Plugin); Parser = Parser->Next); + if (Parser->Next != nullptr) { + Found = Parser->Next; + Parser->Next = Parser->Next->Next; + } + else + Found = nullptr; + } + if (Found != nullptr) { + StopAccounts(Plugin); + DeleteAccounts(Plugin); + if (Plugin->Fcn->UnLoadFcn != nullptr) + Plugin->Fcn->UnLoadFcn((void *)nullptr); + + delete Found->Plugin->AccountBrowserSO; + delete Found->Plugin; + delete Found; + } + else + return 0; + return 1; +} + +INT_PTR UnregisterProtocolPluginSvc(WPARAM wParam, LPARAM) +{ + HYAMNPROTOPLUGIN Plugin = (HYAMNPROTOPLUGIN)wParam; + + mir_cslock lck(PluginRegCS); + UnregisterProtocolPlugin(Plugin); + return 1; +} + +INT_PTR UnregisterProtoPlugins() +{ + mir_cslock lck(PluginRegCS); + // We remove protocols from the protocol list + while (FirstProtoPlugin != nullptr) + UnregisterProtocolPlugin(FirstProtoPlugin->Plugin); + return 1; +} + +INT_PTR GetFileNameSvc(WPARAM wParam, LPARAM) +{ + wchar_t *FileName = new wchar_t[MAX_PATH]; + if (FileName == nullptr) + return NULL; + + mir_snwprintf(FileName, MAX_PATH, L"%s\\yamn-accounts.%s.%s.book", UserDirectory, (wchar_t *)wParam, ProfileName); + return (INT_PTR)FileName; +} + +INT_PTR DeleteFileNameSvc(WPARAM wParam, LPARAM) +{ + if ((wchar_t *)wParam != nullptr) + delete[](wchar_t *) wParam; + + return 0; +} diff --git a/protocols/YAMN/src/resource.h b/protocols/YAMN/src/resource.h index 3f6a52fa55..70cb2647c8 100644 --- a/protocols/YAMN/src/resource.h +++ b/protocols/YAMN/src/resource.h @@ -1,111 +1,111 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by W:\miranda-ng\protocols\YAMN\res\YAMN.rc -// -#define IDI_CHECKMAIL 104 -#define IDI_LAUNCHAPP 105 -#define IDD_DLGVIEWMESSAGES 107 -#define IDD_DLGSHOWMESSAGE 108 -#define IDI_ICOYAMN2 112 -#define IDI_ICOYAMN1 113 -#define IDD_DLGBADCONNECT 115 -#define IDD_POP3ACCOUNTOPT 121 -#define IDD_YAMNOPT 126 -#define IDI_BADCONNECT 131 -#define IDI_ICOTTBUP 138 -#define IDI_NEWMAIL 159 -#define IDD_CHOOSESTATUSMODES 310 -#define IDD_OPTIONS 311 -#define IDD_POP3ACCOUNTPOPUP 312 -#define IDC_EDITSERVER 1000 -#define IDC_EDITPORT 1001 -#define IDC_EDITLOGIN 1002 -#define IDC_EDITPASS 1003 -#define IDC_COMBOACCOUNT 1005 -#define IDC_BTNDEFAULT 1006 -#define IDC_EDITINTERVAL 1007 -#define IDC_CHECKSND 1008 -#define IDC_CHECKMSG 1009 -#define IDC_CHECKAPP 1010 -#define IDC_BTNAPP 1011 -#define IDC_CHECKICO 1012 -#define IDC_CHECK 1013 -#define IDC_BTNDEL 1014 -#define IDC_CHECKFSND 1016 -#define IDC_CHECKFMSG 1017 -#define IDC_CHECKFICO 1018 -#define IDC_CHECKST0 1019 -#define IDC_CHECKST1 1020 -#define IDC_CHECKST2 1021 -#define IDC_CHECKST3 1022 -#define IDC_CHECKST4 1023 -#define IDC_CHECKST5 1024 -#define IDC_CHECKST6 1025 -#define IDC_CHECKST7 1026 -#define IDC_EDITAPP 1027 -#define IDC_CHECKCONTACT 1030 -#define IDC_CHECKCONTACTNICK 1031 -#define IDC_CHECKCONTACTNOEVENT 1032 -#define IDC_STTIMELEFT 1033 -#define IDC_LISTMAILS 1038 -#define IDC_LISTHEADERS 1039 -#define IDC_EDITAPPPARAM 1044 -#define IDC_BTNOK 1047 -#define IDC_COMBOCP 1050 -#define IDC_STATICMSG 1055 -#define IDC_AUTOBODY 1062 -#define IDC_BTNRESET 1063 -#define IDC_CHECKSTART 1064 -#define IDC_STWCHECK 1065 -#define IDC_CHECKFORCE 1066 -#define IDC_RADIOPOP1 1068 -#define IDC_RADIOPOPN 1069 -#define IDC_CPB 1070 -#define IDC_CPNB 1071 -#define IDC_CHECKCOL 1073 -#define IDC_CPT 1074 -#define IDC_CPFB 1075 -#define IDC_CPFT 1076 -#define IDC_CHECKFCOL 1077 -#define IDC_CHECKNCOL 1078 -#define IDC_CPNT 1079 -#define IDC_CHECKPOP 1087 -#define IDC_CHECKNPOP 1088 -#define IDC_CHECKFPOP 1089 -#define IDC_EDITPOPS 1090 -#define IDC_EDITNPOPS 1091 -#define IDC_EDITFPOPS 1092 -#define IDC_GBNEWMAIL 1094 -#define IDC_GBNONEWMAIL 1095 -#define IDC_GBBADCONNECT 1096 -#define IDC_STSTATUS 1102 -#define IDC_CHECKTTB 1117 -#define IDC_CHECKSSL 1117 -#define IDC_CHECKNMSGP 1118 -#define IDC_CHECKNOTLS 1120 -#define IDC_CHECKKBN 1121 -#define IDC_BTNSTATUS 1123 -#define IDC_OPTIONSTAB 1124 -#define IDC_BTNCHECKALL 1125 -#define IDC_CLOSEONDELETE 1127 -#define IDC_LONGDATE 1128 -#define IDC_SMARTDATE 1129 -#define IDC_NOSECONDS 1130 -#define IDC_CHECKAPOP 1200 -#define IDC_STATUSGROUP 1338 -#define IDC_SPLITTER 1400 -#define IDC_EDITBODY 1401 -#define IDC_PREVIEW 1402 -#define IDC_BTNADD 1403 -#define IDC_EDITNAME 1404 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 144 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1407 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by W:\miranda-ng\protocols\YAMN\res\YAMN.rc +// +#define IDI_CHECKMAIL 104 +#define IDI_LAUNCHAPP 105 +#define IDD_DLGVIEWMESSAGES 107 +#define IDD_DLGSHOWMESSAGE 108 +#define IDI_ICOYAMN2 112 +#define IDI_ICOYAMN1 113 +#define IDD_DLGBADCONNECT 115 +#define IDD_POP3ACCOUNTOPT 121 +#define IDD_YAMNOPT 126 +#define IDI_BADCONNECT 131 +#define IDI_ICOTTBUP 138 +#define IDI_NEWMAIL 159 +#define IDD_CHOOSESTATUSMODES 310 +#define IDD_OPTIONS 311 +#define IDD_POP3ACCOUNTPOPUP 312 +#define IDC_EDITSERVER 1000 +#define IDC_EDITPORT 1001 +#define IDC_EDITLOGIN 1002 +#define IDC_EDITPASS 1003 +#define IDC_COMBOACCOUNT 1005 +#define IDC_BTNDEFAULT 1006 +#define IDC_EDITINTERVAL 1007 +#define IDC_CHECKSND 1008 +#define IDC_CHECKMSG 1009 +#define IDC_CHECKAPP 1010 +#define IDC_BTNAPP 1011 +#define IDC_CHECKICO 1012 +#define IDC_CHECK 1013 +#define IDC_BTNDEL 1014 +#define IDC_CHECKFSND 1016 +#define IDC_CHECKFMSG 1017 +#define IDC_CHECKFICO 1018 +#define IDC_CHECKST0 1019 +#define IDC_CHECKST1 1020 +#define IDC_CHECKST2 1021 +#define IDC_CHECKST3 1022 +#define IDC_CHECKST4 1023 +#define IDC_CHECKST5 1024 +#define IDC_CHECKST6 1025 +#define IDC_CHECKST7 1026 +#define IDC_EDITAPP 1027 +#define IDC_CHECKCONTACT 1030 +#define IDC_CHECKCONTACTNICK 1031 +#define IDC_CHECKCONTACTNOEVENT 1032 +#define IDC_STTIMELEFT 1033 +#define IDC_LISTMAILS 1038 +#define IDC_LISTHEADERS 1039 +#define IDC_EDITAPPPARAM 1044 +#define IDC_BTNOK 1047 +#define IDC_COMBOCP 1050 +#define IDC_STATICMSG 1055 +#define IDC_AUTOBODY 1062 +#define IDC_BTNRESET 1063 +#define IDC_CHECKSTART 1064 +#define IDC_STWCHECK 1065 +#define IDC_CHECKFORCE 1066 +#define IDC_RADIOPOP1 1068 +#define IDC_RADIOPOPN 1069 +#define IDC_CPB 1070 +#define IDC_CPNB 1071 +#define IDC_CHECKCOL 1073 +#define IDC_CPT 1074 +#define IDC_CPFB 1075 +#define IDC_CPFT 1076 +#define IDC_CHECKFCOL 1077 +#define IDC_CHECKNCOL 1078 +#define IDC_CPNT 1079 +#define IDC_CHECKPOP 1087 +#define IDC_CHECKNPOP 1088 +#define IDC_CHECKFPOP 1089 +#define IDC_EDITPOPS 1090 +#define IDC_EDITNPOPS 1091 +#define IDC_EDITFPOPS 1092 +#define IDC_GBNEWMAIL 1094 +#define IDC_GBNONEWMAIL 1095 +#define IDC_GBBADCONNECT 1096 +#define IDC_STSTATUS 1102 +#define IDC_CHECKTTB 1117 +#define IDC_CHECKSSL 1117 +#define IDC_CHECKNMSGP 1118 +#define IDC_CHECKNOTLS 1120 +#define IDC_CHECKKBN 1121 +#define IDC_BTNSTATUS 1123 +#define IDC_OPTIONSTAB 1124 +#define IDC_BTNCHECKALL 1125 +#define IDC_CLOSEONDELETE 1127 +#define IDC_LONGDATE 1128 +#define IDC_SMARTDATE 1129 +#define IDC_NOSECONDS 1130 +#define IDC_CHECKAPOP 1200 +#define IDC_STATUSGROUP 1338 +#define IDC_SPLITTER 1400 +#define IDC_EDITBODY 1401 +#define IDC_PREVIEW 1402 +#define IDC_BTNADD 1403 +#define IDC_EDITNAME 1404 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 144 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1407 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/protocols/YAMN/src/services.cpp b/protocols/YAMN/src/services.cpp index 822f5d9f31..361fb01636 100644 --- a/protocols/YAMN/src/services.cpp +++ b/protocols/YAMN/src/services.cpp @@ -1,378 +1,378 @@ -#include "stdafx.h" - -static INT_PTR Service_GetCaps(WPARAM wParam, LPARAM) -{ - switch (wParam) { - case PFLAGNUM_4: - return PF4_NOCUSTOMAUTH; - case PFLAG_UNIQUEIDTEXT: - return (INT_PTR)TranslateT("Nick"); - case PFLAG_MAXLENOFMESSAGE: - return 400; - case PFLAGNUM_2: - case PFLAGNUM_5: - return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND; - } - - return 0; -} - -static INT_PTR Service_GetName(WPARAM wParam, LPARAM lParam) -{ - mir_strncpy((char *)lParam, YAMN_DBMODULE, wParam); - return 0; -} - -static INT_PTR Service_LoadIcon(WPARAM wParam, LPARAM) -{ - if (LOWORD(wParam) == PLI_PROTOCOL) - return (INT_PTR)CopyIcon(g_plugin.getIcon(IDI_CHECKMAIL)); // noone cares about other than PLI_PROTOCOL - - return (INT_PTR)(HICON)NULL; -} - -INT_PTR ClistContactDoubleclicked(WPARAM, LPARAM lParam) -{ - ContactDoubleclicked(((CLISTEVENT *)lParam)->lParam, lParam); - return 0; -} - -static int Service_ContactDoubleclicked(WPARAM wParam, LPARAM lParam) -{ - ContactDoubleclicked(wParam, lParam); - return 0; -} - -static INT_PTR ContactApplication(WPARAM wParam, LPARAM) -{ - char *szProto = Proto_GetBaseAccountName(wParam); - if (mir_strcmp(szProto, YAMN_DBMODULE)) - return 0; - - DBVARIANT dbv; - if (g_plugin.getString(wParam, "Id", &dbv)) - return 0; - - CAccount *ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); - if (ActualAccount != nullptr) { - STARTUPINFOW si = {0}; - si.cb = sizeof(si); - - if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { - if (ActualAccount->NewMailN.App != nullptr) { - wchar_t *Command; - if (ActualAccount->NewMailN.AppParam != nullptr) - Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6]; - else - Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + 6]; - - if (Command != nullptr) { - mir_wstrcpy(Command, L"\""); - mir_wstrcat(Command, ActualAccount->NewMailN.App); - mir_wstrcat(Command, L"\" "); - if (ActualAccount->NewMailN.AppParam != nullptr) - mir_wstrcat(Command, ActualAccount->NewMailN.AppParam); - - PROCESS_INFORMATION pi; - CreateProcessW(nullptr, Command, nullptr, nullptr, FALSE, NORMAL_PRIORITY_CLASS, nullptr, nullptr, &si, &pi); - delete[] Command; - } - } - - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - } - db_free(&dbv); - return 0; -} - -uint32_t WINAPI SWMRGWaitToRead(PSWMRG pSWMRG, uint32_t dwTimeout); -static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam) -{ - //This service will check/sincronize the account pointed by wParam - CAccount *ActualAccount = (CAccount *)wParam; - // copy/paste make mistakes - if (ActualAccount != nullptr) { - //we use event to signal, that running thread has all needed stack parameters copied - HANDLE ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr); - if (ThreadRunningEV == nullptr) - return 0; - //if we want to close miranda, we get event and do not run pop3 checking anymore - if (WAIT_OBJECT_0 == WaitForSingleObject(ExitEV, 0)) - return 0; - - mir_cslock lck(PluginRegCS); - if (WAIT_OBJECT_0 != SWMRGWaitToRead(ActualAccount->AccountAccessSO, 0)) { - } - else { - if ((ActualAccount->Flags & YAMN_ACC_ENA) && ActualAccount->Plugin->Fcn->SynchroFcnPtr) { - CheckParam ParamToPlugin = {YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, lParam != 0 ? YAMN_FORCECHECK : YAMN_NORMALCHECK, nullptr, nullptr}; - - ActualAccount->TimeLeft = ActualAccount->Interval; - DWORD tid; - HANDLE NewThread = CreateThread(nullptr, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->SynchroFcnPtr, &ParamToPlugin, 0, &tid); - if (NewThread) { - WaitForSingleObject(ThreadRunningEV, INFINITE); - CloseHandle(NewThread); - } - } - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - CloseHandle(ThreadRunningEV); - } - return 0; -} - -static INT_PTR ContactMailCheck(WPARAM hContact, LPARAM) -{ - char *szProto = Proto_GetBaseAccountName(hContact); - if (mir_strcmp(szProto, YAMN_DBMODULE)) - return 0; - - DBVARIANT dbv; - if (g_plugin.getString(hContact, "Id", &dbv)) - return 0; - - CAccount *ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); - if (ActualAccount != nullptr) { - //we use event to signal, that running thread has all needed stack parameters copied - HANDLE ThreadRunningEV; - if (nullptr == (ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr))) - return 0; - //if we want to close miranda, we get event and do not run pop3 checking anymore - if (WAIT_OBJECT_0 == WaitForSingleObject(ExitEV, 0)) - return 0; - mir_cslock lck(PluginRegCS); - if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) { - } - else { - if ((ActualAccount->Flags & YAMN_ACC_ENA) && (ActualAccount->StatusFlags & YAMN_ACC_FORCE)) //account cannot be forced to check - { - if (ActualAccount->Plugin->Fcn->ForceCheckFcnPtr == nullptr) - ReadDoneFcn(ActualAccount->AccountAccessSO); - - DWORD tid; - struct CheckParam ParamToPlugin = {YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, YAMN_FORCECHECK, (void *)nullptr, nullptr}; - if (nullptr == CreateThread(nullptr, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->ForceCheckFcnPtr, &ParamToPlugin, 0, &tid)) - ReadDoneFcn(ActualAccount->AccountAccessSO); - else - WaitForSingleObject(ThreadRunningEV, INFINITE); - } - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - CloseHandle(ThreadRunningEV); - } - db_free(&dbv); - return 0; -} - -/*static*/ void ContactDoubleclicked(WPARAM wParam, LPARAM) -{ - char *szProto = Proto_GetBaseAccountName(wParam); - if (mir_strcmp(szProto, YAMN_DBMODULE)) - return; - - DBVARIANT dbv; - if (g_plugin.getString(wParam, "Id", &dbv)) - return; - - CAccount *ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); - if (ActualAccount != nullptr) { - if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { - YAMN_MAILBROWSERPARAM Param = {nullptr, ActualAccount, ActualAccount->NewMailN.Flags, ActualAccount->NoNewMailN.Flags, nullptr}; - - Param.nnflags = Param.nnflags | YAMN_ACC_MSG; //show mails in account even no new mail in account - Param.nnflags = Param.nnflags & ~YAMN_ACC_POP; - - Param.nflags = Param.nflags | YAMN_ACC_MSG; //show mails in account even no new mail in account - Param.nflags = Param.nflags & ~YAMN_ACC_POP; - - RunMailBrowserSvc((WPARAM)&Param, YAMN_MAILBROWSERVERSION); - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - } - db_free(&dbv); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -HBITMAP LoadBmpFromIcon(HICON hIcon) -{ - int IconSizeX = 16; - int IconSizeY = 16; - - HBRUSH hBkgBrush = CreateSolidBrush(GetSysColor(COLOR_3DFACE)); - - BITMAPINFOHEADER bih = {0}; - bih.biSize = sizeof(bih); - bih.biBitCount = 24; - bih.biPlanes = 1; - bih.biCompression = BI_RGB; - bih.biHeight = IconSizeY; - bih.biWidth = IconSizeX; - - RECT rc; - rc.top = rc.left = 0; - rc.right = bih.biWidth; - rc.bottom = bih.biHeight; - - HDC hdc = GetDC(nullptr); - HBITMAP hBmp = CreateCompatibleBitmap(hdc, bih.biWidth, bih.biHeight); - HDC hdcMem = CreateCompatibleDC(hdc); - HBITMAP hoBmp = (HBITMAP)SelectObject(hdcMem, hBmp); - FillRect(hdcMem, &rc, hBkgBrush); - DrawIconEx(hdcMem, 0, 0, hIcon, bih.biWidth, bih.biHeight, 0, nullptr, DI_NORMAL); - SelectObject(hdcMem, hoBmp); - return hBmp; -} - -int AddTopToolbarIcon(WPARAM, LPARAM) -{ - if (g_plugin.getByte(YAMN_TTBFCHECK, 1)) { - if (ServiceExists(MS_TTB_REMOVEBUTTON) && hTTButton == nullptr) { - TTBButton btn = {}; - btn.pszService = MS_YAMN_FORCECHECK; - btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; - btn.hIconHandleUp = btn.hIconHandleDn = g_plugin.getIconHandle(IDI_CHECKMAIL); - btn.name = btn.pszTooltipUp = LPGEN("Check mail"); - hTTButton = g_plugin.addTTB(&btn); - } - } - else { - if (hTTButton != nullptr) { - CallService(MS_TTB_REMOVEBUTTON, (WPARAM)hTTButton, 0); - hTTButton = nullptr; - } - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int Shutdown(WPARAM, LPARAM) -{ - CallService(MS_TTB_REMOVEBUTTON, (WPARAM)hTTButton, 0); - - g_plugin.setDword(YAMN_DBMSGPOSX, HeadPosX); - g_plugin.setDword(YAMN_DBMSGPOSY, HeadPosY); - g_plugin.setDword(YAMN_DBMSGSIZEX, HeadSizeX); - g_plugin.setDword(YAMN_DBMSGSIZEY, HeadSizeY); - g_plugin.setWord(YAMN_DBMSGPOSSPLIT, HeadSplitPos); - YAMNVar.Shutdown = TRUE; - KillTimer(nullptr, SecTimer); - - UnregisterProtoPlugins(); - UnregisterFilterPlugins(); - return 0; -} - -int SystemModulesLoaded(WPARAM, LPARAM); //in main.cpp - -void HookEvents(void) -{ - HookEvent(ME_SYSTEM_MODULESLOADED, SystemModulesLoaded); - HookEvent(ME_TTB_MODULELOADED, AddTopToolbarIcon); - HookEvent(ME_OPT_INITIALISE, YAMNOptInitSvc); - HookEvent(ME_SYSTEM_PRESHUTDOWN, Shutdown); - HookEvent(ME_CLIST_DOUBLECLICKED, Service_ContactDoubleclicked); -} - -void CreateServiceFunctions(void) -{ - // Standard 'protocol' services - CreateServiceFunction(YAMN_DBMODULE PS_GETCAPS, Service_GetCaps); - CreateServiceFunction(YAMN_DBMODULE PS_GETNAME, Service_GetName); - CreateServiceFunction(YAMN_DBMODULE PS_LOADICON, Service_LoadIcon); - - // Function with which protocol plugin can register - CreateServiceFunction(MS_YAMN_GETFCNPTR, GetFcnPtrSvc); - - // Function returns pointer to YAMN variables - CreateServiceFunction(MS_YAMN_GETVARIABLES, GetVariablesSvc); - - // Function with which protocol plugin can register - CreateServiceFunction(MS_YAMN_REGISTERPROTOPLUGIN, RegisterProtocolPluginSvc); - - // Function with which protocol plugin can unregister - CreateServiceFunction(MS_YAMN_UNREGISTERPROTOPLUGIN, UnregisterProtocolPluginSvc); - - // Function creates an account for plugin - CreateServiceFunction(MS_YAMN_CREATEPLUGINACCOUNT, CreatePluginAccountSvc); - - // Function deletes plugin account - CreateServiceFunction(MS_YAMN_DELETEPLUGINACCOUNT, DeletePluginAccountSvc); - - // Finds account for plugin by name - CreateServiceFunction(MS_YAMN_FINDACCOUNTBYNAME, FindAccountByNameSvc); - - // Creates next account for plugin - CreateServiceFunction(MS_YAMN_GETNEXTFREEACCOUNT, GetNextFreeAccountSvc); - - // Function removes account from YAMN queue. Does not delete it from memory - CreateServiceFunction(MS_YAMN_DELETEACCOUNT, DeleteAccountSvc); - - // Function finds accounts for specified plugin - CreateServiceFunction(MS_YAMN_READACCOUNTS, AddAccountsFromFileSvc); - - // Function that stores all plugin mails to one file - CreateServiceFunction(MS_YAMN_WRITEACCOUNTS, WriteAccountsToFileSvc); - - // Function that returns user's filename - CreateServiceFunction(MS_YAMN_GETFILENAME, GetFileNameSvc); - - // Releases unicode string from memory - CreateServiceFunction(MS_YAMN_DELETEFILENAME, DeleteFileNameSvc); - - // Checks mail - CreateServiceFunction(MS_YAMN_FORCECHECK, ForceCheckSvc); - - // Runs YAMN's mail browser - CreateServiceFunction(MS_YAMN_MAILBROWSER, RunMailBrowserSvc); - - // Function creates new mail for plugin - CreateServiceFunction(MS_YAMN_CREATEACCOUNTMAIL, CreateAccountMailSvc); - - // Function deletes plugin account - CreateServiceFunction(MS_YAMN_DELETEACCOUNTMAIL, DeleteAccountMailSvc); - - // Function with which filter plugin can register - CreateServiceFunction(MS_YAMN_REGISTERFILTERPLUGIN, RegisterFilterPluginSvc); - - // Function with which filter plugin can unregister - CreateServiceFunction(MS_YAMN_UNREGISTERFILTERPLUGIN, UnregisterFilterPluginSvc); - - // Function filters mail - CreateServiceFunction(MS_YAMN_FILTERMAIL, FilterMailSvc); - - // Function contact list double click - CreateServiceFunction(MS_YAMN_CLISTDBLCLICK, ClistContactDoubleclicked); - - // Function to check individual account - CreateServiceFunction(MS_YAMN_ACCOUNTCHECK, AccountMailCheck); - - // Function contact list context menu click - CreateServiceFunction(MS_YAMN_CLISTCONTEXT, ContactMailCheck); - - // Function contact list context menu click - CreateServiceFunction(MS_YAMN_CLISTCONTEXTAPP, ContactApplication); -} - -// Function to put all enabled contact to the Online status -void RefreshContact(void) -{ - CAccount *Finder; - for (Finder = POP3Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) { - if (Finder->hContact != NULL) { - Contact::Hide(Finder->hContact, !(Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)); - } - else if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) { - Finder->hContact = db_add_contact(); - Proto_AddToContact(Finder->hContact, YAMN_DBMODULE); - g_plugin.setString(Finder->hContact, "Id", Finder->Name); - g_plugin.setString(Finder->hContact, "Nick", Finder->Name); - g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_ONLINE); - db_set_s(Finder->hContact, "CList", "StatusMsg", Translate("No new mail message")); - } - } -} +#include "stdafx.h" + +static INT_PTR Service_GetCaps(WPARAM wParam, LPARAM) +{ + switch (wParam) { + case PFLAGNUM_4: + return PF4_NOCUSTOMAUTH; + case PFLAG_UNIQUEIDTEXT: + return (INT_PTR)TranslateT("Nick"); + case PFLAG_MAXLENOFMESSAGE: + return 400; + case PFLAGNUM_2: + case PFLAGNUM_5: + return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND; + } + + return 0; +} + +static INT_PTR Service_GetName(WPARAM wParam, LPARAM lParam) +{ + mir_strncpy((char *)lParam, YAMN_DBMODULE, wParam); + return 0; +} + +static INT_PTR Service_LoadIcon(WPARAM wParam, LPARAM) +{ + if (LOWORD(wParam) == PLI_PROTOCOL) + return (INT_PTR)CopyIcon(g_plugin.getIcon(IDI_CHECKMAIL)); // noone cares about other than PLI_PROTOCOL + + return (INT_PTR)(HICON)NULL; +} + +INT_PTR ClistContactDoubleclicked(WPARAM, LPARAM lParam) +{ + ContactDoubleclicked(((CLISTEVENT *)lParam)->lParam, lParam); + return 0; +} + +static int Service_ContactDoubleclicked(WPARAM wParam, LPARAM lParam) +{ + ContactDoubleclicked(wParam, lParam); + return 0; +} + +static INT_PTR ContactApplication(WPARAM wParam, LPARAM) +{ + char *szProto = Proto_GetBaseAccountName(wParam); + if (mir_strcmp(szProto, YAMN_DBMODULE)) + return 0; + + DBVARIANT dbv; + if (g_plugin.getString(wParam, "Id", &dbv)) + return 0; + + CAccount *ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); + if (ActualAccount != nullptr) { + STARTUPINFOW si = {0}; + si.cb = sizeof(si); + + if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { + if (ActualAccount->NewMailN.App != nullptr) { + wchar_t *Command; + if (ActualAccount->NewMailN.AppParam != nullptr) + Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + mir_wstrlen(ActualAccount->NewMailN.AppParam) + 6]; + else + Command = new wchar_t[mir_wstrlen(ActualAccount->NewMailN.App) + 6]; + + if (Command != nullptr) { + mir_wstrcpy(Command, L"\""); + mir_wstrcat(Command, ActualAccount->NewMailN.App); + mir_wstrcat(Command, L"\" "); + if (ActualAccount->NewMailN.AppParam != nullptr) + mir_wstrcat(Command, ActualAccount->NewMailN.AppParam); + + PROCESS_INFORMATION pi; + CreateProcessW(nullptr, Command, nullptr, nullptr, FALSE, NORMAL_PRIORITY_CLASS, nullptr, nullptr, &si, &pi); + delete[] Command; + } + } + + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + } + db_free(&dbv); + return 0; +} + +uint32_t WINAPI SWMRGWaitToRead(PSWMRG pSWMRG, uint32_t dwTimeout); +static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam) +{ + //This service will check/sincronize the account pointed by wParam + CAccount *ActualAccount = (CAccount *)wParam; + // copy/paste make mistakes + if (ActualAccount != nullptr) { + //we use event to signal, that running thread has all needed stack parameters copied + HANDLE ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr); + if (ThreadRunningEV == nullptr) + return 0; + //if we want to close miranda, we get event and do not run pop3 checking anymore + if (WAIT_OBJECT_0 == WaitForSingleObject(ExitEV, 0)) + return 0; + + mir_cslock lck(PluginRegCS); + if (WAIT_OBJECT_0 != SWMRGWaitToRead(ActualAccount->AccountAccessSO, 0)) { + } + else { + if ((ActualAccount->Flags & YAMN_ACC_ENA) && ActualAccount->Plugin->Fcn->SynchroFcnPtr) { + CheckParam ParamToPlugin = {YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, lParam != 0 ? YAMN_FORCECHECK : YAMN_NORMALCHECK, nullptr, nullptr}; + + ActualAccount->TimeLeft = ActualAccount->Interval; + DWORD tid; + HANDLE NewThread = CreateThread(nullptr, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->SynchroFcnPtr, &ParamToPlugin, 0, &tid); + if (NewThread) { + WaitForSingleObject(ThreadRunningEV, INFINITE); + CloseHandle(NewThread); + } + } + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + CloseHandle(ThreadRunningEV); + } + return 0; +} + +static INT_PTR ContactMailCheck(WPARAM hContact, LPARAM) +{ + char *szProto = Proto_GetBaseAccountName(hContact); + if (mir_strcmp(szProto, YAMN_DBMODULE)) + return 0; + + DBVARIANT dbv; + if (g_plugin.getString(hContact, "Id", &dbv)) + return 0; + + CAccount *ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); + if (ActualAccount != nullptr) { + //we use event to signal, that running thread has all needed stack parameters copied + HANDLE ThreadRunningEV; + if (nullptr == (ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr))) + return 0; + //if we want to close miranda, we get event and do not run pop3 checking anymore + if (WAIT_OBJECT_0 == WaitForSingleObject(ExitEV, 0)) + return 0; + mir_cslock lck(PluginRegCS); + if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) { + } + else { + if ((ActualAccount->Flags & YAMN_ACC_ENA) && (ActualAccount->StatusFlags & YAMN_ACC_FORCE)) //account cannot be forced to check + { + if (ActualAccount->Plugin->Fcn->ForceCheckFcnPtr == nullptr) + ReadDoneFcn(ActualAccount->AccountAccessSO); + + DWORD tid; + struct CheckParam ParamToPlugin = {YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, YAMN_FORCECHECK, (void *)nullptr, nullptr}; + if (nullptr == CreateThread(nullptr, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->ForceCheckFcnPtr, &ParamToPlugin, 0, &tid)) + ReadDoneFcn(ActualAccount->AccountAccessSO); + else + WaitForSingleObject(ThreadRunningEV, INFINITE); + } + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + CloseHandle(ThreadRunningEV); + } + db_free(&dbv); + return 0; +} + +/*static*/ void ContactDoubleclicked(WPARAM wParam, LPARAM) +{ + char *szProto = Proto_GetBaseAccountName(wParam); + if (mir_strcmp(szProto, YAMN_DBMODULE)) + return; + + DBVARIANT dbv; + if (g_plugin.getString(wParam, "Id", &dbv)) + return; + + CAccount *ActualAccount = (CAccount *)CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal); + if (ActualAccount != nullptr) { + if (WAIT_OBJECT_0 == WaitToReadFcn(ActualAccount->AccountAccessSO)) { + YAMN_MAILBROWSERPARAM Param = {nullptr, ActualAccount, ActualAccount->NewMailN.Flags, ActualAccount->NoNewMailN.Flags, nullptr}; + + Param.nnflags = Param.nnflags | YAMN_ACC_MSG; //show mails in account even no new mail in account + Param.nnflags = Param.nnflags & ~YAMN_ACC_POP; + + Param.nflags = Param.nflags | YAMN_ACC_MSG; //show mails in account even no new mail in account + Param.nflags = Param.nflags & ~YAMN_ACC_POP; + + RunMailBrowserSvc((WPARAM)&Param, YAMN_MAILBROWSERVERSION); + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + } + db_free(&dbv); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +HBITMAP LoadBmpFromIcon(HICON hIcon) +{ + int IconSizeX = 16; + int IconSizeY = 16; + + HBRUSH hBkgBrush = CreateSolidBrush(GetSysColor(COLOR_3DFACE)); + + BITMAPINFOHEADER bih = {0}; + bih.biSize = sizeof(bih); + bih.biBitCount = 24; + bih.biPlanes = 1; + bih.biCompression = BI_RGB; + bih.biHeight = IconSizeY; + bih.biWidth = IconSizeX; + + RECT rc; + rc.top = rc.left = 0; + rc.right = bih.biWidth; + rc.bottom = bih.biHeight; + + HDC hdc = GetDC(nullptr); + HBITMAP hBmp = CreateCompatibleBitmap(hdc, bih.biWidth, bih.biHeight); + HDC hdcMem = CreateCompatibleDC(hdc); + HBITMAP hoBmp = (HBITMAP)SelectObject(hdcMem, hBmp); + FillRect(hdcMem, &rc, hBkgBrush); + DrawIconEx(hdcMem, 0, 0, hIcon, bih.biWidth, bih.biHeight, 0, nullptr, DI_NORMAL); + SelectObject(hdcMem, hoBmp); + return hBmp; +} + +int AddTopToolbarIcon(WPARAM, LPARAM) +{ + if (g_plugin.getByte(YAMN_TTBFCHECK, 1)) { + if (ServiceExists(MS_TTB_REMOVEBUTTON) && hTTButton == nullptr) { + TTBButton btn = {}; + btn.pszService = MS_YAMN_FORCECHECK; + btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; + btn.hIconHandleUp = btn.hIconHandleDn = g_plugin.getIconHandle(IDI_CHECKMAIL); + btn.name = btn.pszTooltipUp = LPGEN("Check mail"); + hTTButton = g_plugin.addTTB(&btn); + } + } + else { + if (hTTButton != nullptr) { + CallService(MS_TTB_REMOVEBUTTON, (WPARAM)hTTButton, 0); + hTTButton = nullptr; + } + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int Shutdown(WPARAM, LPARAM) +{ + CallService(MS_TTB_REMOVEBUTTON, (WPARAM)hTTButton, 0); + + g_plugin.setDword(YAMN_DBMSGPOSX, HeadPosX); + g_plugin.setDword(YAMN_DBMSGPOSY, HeadPosY); + g_plugin.setDword(YAMN_DBMSGSIZEX, HeadSizeX); + g_plugin.setDword(YAMN_DBMSGSIZEY, HeadSizeY); + g_plugin.setWord(YAMN_DBMSGPOSSPLIT, HeadSplitPos); + YAMNVar.Shutdown = TRUE; + KillTimer(nullptr, SecTimer); + + UnregisterProtoPlugins(); + UnregisterFilterPlugins(); + return 0; +} + +int SystemModulesLoaded(WPARAM, LPARAM); //in main.cpp + +void HookEvents(void) +{ + HookEvent(ME_SYSTEM_MODULESLOADED, SystemModulesLoaded); + HookEvent(ME_TTB_MODULELOADED, AddTopToolbarIcon); + HookEvent(ME_OPT_INITIALISE, YAMNOptInitSvc); + HookEvent(ME_SYSTEM_PRESHUTDOWN, Shutdown); + HookEvent(ME_CLIST_DOUBLECLICKED, Service_ContactDoubleclicked); +} + +void CreateServiceFunctions(void) +{ + // Standard 'protocol' services + CreateServiceFunction(YAMN_DBMODULE PS_GETCAPS, Service_GetCaps); + CreateServiceFunction(YAMN_DBMODULE PS_GETNAME, Service_GetName); + CreateServiceFunction(YAMN_DBMODULE PS_LOADICON, Service_LoadIcon); + + // Function with which protocol plugin can register + CreateServiceFunction(MS_YAMN_GETFCNPTR, GetFcnPtrSvc); + + // Function returns pointer to YAMN variables + CreateServiceFunction(MS_YAMN_GETVARIABLES, GetVariablesSvc); + + // Function with which protocol plugin can register + CreateServiceFunction(MS_YAMN_REGISTERPROTOPLUGIN, RegisterProtocolPluginSvc); + + // Function with which protocol plugin can unregister + CreateServiceFunction(MS_YAMN_UNREGISTERPROTOPLUGIN, UnregisterProtocolPluginSvc); + + // Function creates an account for plugin + CreateServiceFunction(MS_YAMN_CREATEPLUGINACCOUNT, CreatePluginAccountSvc); + + // Function deletes plugin account + CreateServiceFunction(MS_YAMN_DELETEPLUGINACCOUNT, DeletePluginAccountSvc); + + // Finds account for plugin by name + CreateServiceFunction(MS_YAMN_FINDACCOUNTBYNAME, FindAccountByNameSvc); + + // Creates next account for plugin + CreateServiceFunction(MS_YAMN_GETNEXTFREEACCOUNT, GetNextFreeAccountSvc); + + // Function removes account from YAMN queue. Does not delete it from memory + CreateServiceFunction(MS_YAMN_DELETEACCOUNT, DeleteAccountSvc); + + // Function finds accounts for specified plugin + CreateServiceFunction(MS_YAMN_READACCOUNTS, AddAccountsFromFileSvc); + + // Function that stores all plugin mails to one file + CreateServiceFunction(MS_YAMN_WRITEACCOUNTS, WriteAccountsToFileSvc); + + // Function that returns user's filename + CreateServiceFunction(MS_YAMN_GETFILENAME, GetFileNameSvc); + + // Releases unicode string from memory + CreateServiceFunction(MS_YAMN_DELETEFILENAME, DeleteFileNameSvc); + + // Checks mail + CreateServiceFunction(MS_YAMN_FORCECHECK, ForceCheckSvc); + + // Runs YAMN's mail browser + CreateServiceFunction(MS_YAMN_MAILBROWSER, RunMailBrowserSvc); + + // Function creates new mail for plugin + CreateServiceFunction(MS_YAMN_CREATEACCOUNTMAIL, CreateAccountMailSvc); + + // Function deletes plugin account + CreateServiceFunction(MS_YAMN_DELETEACCOUNTMAIL, DeleteAccountMailSvc); + + // Function with which filter plugin can register + CreateServiceFunction(MS_YAMN_REGISTERFILTERPLUGIN, RegisterFilterPluginSvc); + + // Function with which filter plugin can unregister + CreateServiceFunction(MS_YAMN_UNREGISTERFILTERPLUGIN, UnregisterFilterPluginSvc); + + // Function filters mail + CreateServiceFunction(MS_YAMN_FILTERMAIL, FilterMailSvc); + + // Function contact list double click + CreateServiceFunction(MS_YAMN_CLISTDBLCLICK, ClistContactDoubleclicked); + + // Function to check individual account + CreateServiceFunction(MS_YAMN_ACCOUNTCHECK, AccountMailCheck); + + // Function contact list context menu click + CreateServiceFunction(MS_YAMN_CLISTCONTEXT, ContactMailCheck); + + // Function contact list context menu click + CreateServiceFunction(MS_YAMN_CLISTCONTEXTAPP, ContactApplication); +} + +// Function to put all enabled contact to the Online status +void RefreshContact(void) +{ + CAccount *Finder; + for (Finder = POP3Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) { + if (Finder->hContact != NULL) { + Contact::Hide(Finder->hContact, !(Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)); + } + else if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) { + Finder->hContact = db_add_contact(); + Proto_AddToContact(Finder->hContact, YAMN_DBMODULE); + g_plugin.setString(Finder->hContact, "Id", Finder->Name); + g_plugin.setString(Finder->hContact, "Nick", Finder->Name); + g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_ONLINE); + db_set_s(Finder->hContact, "CList", "StatusMsg", Translate("No new mail message")); + } + } +} diff --git a/protocols/YAMN/src/stdafx.h b/protocols/YAMN/src/stdafx.h index 05681d467b..38f1c1b5fe 100644 --- a/protocols/YAMN/src/stdafx.h +++ b/protocols/YAMN/src/stdafx.h @@ -1,253 +1,253 @@ - -#ifndef __YAMN_H -#define __YAMN_H - -#define VC_EXTRALEAN - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "main.h" -#include "mails/decode.h" -#include "browser/browser.h" -#include "resource.h" -#include "debug.h" -#include "version.h" -#include "proto/netclient.h" -#include "proto/netlib.h" -#include "proto/pop3/pop3.h" -#include "proto/pop3/pop3comm.h" - -struct CMPlugin : public PLUGIN -{ - CMPlugin(); - - int Load() override; - int Unload() override; -}; - -// From services.cpp -void CreateServiceFunctions(void); -void HookEvents(void); -void RefreshContact(void); -void ContactDoubleclicked(WPARAM wParam, LPARAM lParam); -INT_PTR ClistContactDoubleclicked(WPARAM wParam, LPARAM lParam); - -extern mir_cs PluginRegCS; -extern SCOUNTER *AccountWriterSO; -extern HANDLE ExitEV; -extern HANDLE WriteToFileEV; - -// From debug.cpp -#ifdef _DEBUG -void InitDebug(); -void UnInitDebug(); -#endif - -// From yamn.cpp -INT_PTR GetFcnPtrSvc(WPARAM wParam, LPARAM lParam); -INT_PTR GetVariablesSvc(WPARAM, LPARAM); -void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD); -INT_PTR ForceCheckSvc(WPARAM, LPARAM); - -extern struct YAMNExportedFcns *pYAMNFcn; - -// From account.cpp -INT_PTR CreatePluginAccountSvc(WPARAM wParam, LPARAM lParam); -INT_PTR DeletePluginAccountSvc(WPARAM wParam, LPARAM); -int InitAccount(CAccount *Which); -void DeInitAccount(CAccount *Which); -void StopSignalFcn(CAccount *Which); -void CodeDecodeString(char *Dest, BOOL Encrypt); -uint32_t FileToMemory(wchar_t *FileName, char **MemFile, char **End); - -#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES) -uint32_t ReadStringFromMemory(char **Parser,char *End,char **StoreTo,char *DebugString); -#endif -uint32_t ReadStringFromMemory(char **Parser, char *End, char **StoreTo); -uint32_t ReadMessagesFromMemory(CAccount *Which, char **Parser, char *End); -uint32_t ReadAccountFromMemory(CAccount *Which, char **Parser, wchar_t *End); -INT_PTR AddAccountsFromFileSvc(WPARAM wParam, LPARAM lParam); - -uint32_t WriteStringToFile(HANDLE File, char *Source); -uint32_t WriteStringToFileW(HANDLE File, wchar_t *Source); - - -DWORD WriteMessagesToFile(HANDLE File, CAccount *Which); -DWORD WINAPI WritePOP3Accounts(); -INT_PTR WriteAccountsToFileSvc(WPARAM wParam, LPARAM lParam); -INT_PTR FindAccountByNameSvc(WPARAM wParam, LPARAM lParam); -INT_PTR GetNextFreeAccountSvc(WPARAM wParam, LPARAM lParam); - -INT_PTR DeleteAccountSvc(WPARAM wParam, LPARAM); -void __cdecl DeleteAccountInBackground(void *Which); -int StopAccounts(HYAMNPROTOPLUGIN Plugin); -int WaitForAllAccounts(HYAMNPROTOPLUGIN Plugin, BOOL GetAccountBrowserAccess = FALSE); -int DeleteAccounts(HYAMNPROTOPLUGIN Plugin); - -void WINAPI GetStatusFcn(CAccount *Which, wchar_t *Value); -void WINAPI SetStatusFcn(CAccount *Which, wchar_t *Value); - -INT_PTR UnregisterProtoPlugins(); -INT_PTR RegisterProtocolPluginSvc(WPARAM, LPARAM); -INT_PTR UnregisterProtocolPluginSvc(WPARAM, LPARAM); -INT_PTR GetFileNameSvc(WPARAM, LPARAM); -INT_PTR DeleteFileNameSvc(WPARAM, LPARAM); - -//From filterplugin.cpp -//struct CExportedFunctions FilterPluginExported[]; -INT_PTR UnregisterFilterPlugins(); -INT_PTR RegisterFilterPluginSvc(WPARAM, LPARAM); -INT_PTR UnregisterFilterPluginSvc(WPARAM, LPARAM); -INT_PTR FilterMailSvc(WPARAM, LPARAM); - -//From mails.cpp (MIME) -//struct CExportedFunctions MailExported[]; -INT_PTR CreateAccountMailSvc(WPARAM wParam, LPARAM lParam); -INT_PTR DeleteAccountMailSvc(WPARAM wParam, LPARAM lParam); -INT_PTR LoadMailDataSvc(WPARAM wParam, LPARAM lParam); -INT_PTR UnloadMailDataSvc(WPARAM wParam, LPARAM); -INT_PTR SaveMailDataSvc(WPARAM wParam, LPARAM lParam); - -//From mime.cpp -//void WINAPI ExtractHeaderFcn(char *,int,uint16_t,HYAMNMAIL); //already in MailExported -struct _tcptable -{ - char *NameBase, *NameSub; - BOOLEAN isValid; - unsigned short int CP; -}; -extern struct _tcptable CodePageNamesAll[]; // in mime/decode.cpp -extern int CPLENALL; -extern struct _tcptable *CodePageNamesSupp; // in mime/decode.cpp -extern int CPLENSUPP; - -extern int PosX, PosY, SizeX, SizeY; -extern int HeadPosX, HeadPosY, HeadSizeX, HeadSizeY, HeadSplitPos; - -//#define CPDEFINDEX 63 //ISO-8859-1 -#define CPDEFINDEX 0 //ACP - -//From pop3comm.cpp -int RegisterPOP3Plugin(WPARAM, LPARAM); - -//From mailbrowser.cpp -INT_PTR RunMailBrowserSvc(WPARAM, LPARAM); - -//From badconnect.cpp -int RunBadConnection(CAccount *acc, UINT_PTR iErrorCode, void *pUserInfo); - -//From YAMNopts.cpp -int YAMNOptInitSvc(WPARAM, LPARAM); - -//From main.cpp -int PostLoad(WPARAM, LPARAM); //Executed after all plugins loaded YAMN reads mails from file and notify every protocol it should set its functions -int Shutdown(WPARAM, LPARAM); //Executed before Miranda is going to shutdown -int AddTopToolbarIcon(WPARAM, LPARAM); //Executed when TopToolBar plugin loaded Adds bitmap to toolbar - -extern wchar_t UserDirectory[]; //e.g. "F:\WINNT\Profiles\UserXYZ" -extern wchar_t ProfileName[]; //e.g. "majvan" -extern SWMRG *AccountBrowserSO; -extern YAMN_VARIABLES YAMNVar; -extern HANDLE hNewMailHook; -extern HANDLE hTTButton; -extern HCURSOR hCurSplitNS, hCurSplitWE; -extern UINT SecTimer; - -//From synchro.cpp -void WINAPI DeleteMessagesToEndFcn(CAccount *Account, HYAMNMAIL From); -uint32_t WINAPI WaitToWriteFcn(PSWMRG SObject, PSCOUNTER SCounter = nullptr); -void WINAPI WriteDoneFcn(PSWMRG SObject, PSCOUNTER SCounter = nullptr); -uint32_t WINAPI WaitToReadFcn(PSWMRG SObject); -void WINAPI ReadDoneFcn(PSWMRG SObject); -uint32_t WINAPI SCIncFcn(PSCOUNTER SCounter); -uint32_t WINAPI SCDecFcn(PSCOUNTER SCounter); -BOOL WINAPI SWMRGInitialize(PSWMRG, wchar_t *); -void WINAPI SWMRGDelete(PSWMRG); -uint32_t WINAPI SWMRGWaitToWrite(PSWMRG pSWMRG, uint32_t dwTimeout); -void WINAPI SWMRGDoneWriting(PSWMRG pSWMRG); -uint32_t WINAPI SWMRGWaitToRead(PSWMRG pSWMRG, uint32_t dwTimeout); -void WINAPI SWMRGDoneReading(PSWMRG pSWMRG); - -//From mails.cpp -void WINAPI DeleteMessageFromQueueFcn(HYAMNMAIL *From, HYAMNMAIL Which, int mode); -void WINAPI SetRemoveFlagsInQueueFcn(HYAMNMAIL From, uint32_t FlagsSet, uint32_t FlagsNotSet, uint32_t FlagsToSet, int mode); - -//From mime.cpp -void ExtractHeader(struct CMimeItem *items, int &CP, struct CHeader *head); -void ExtractShortHeader(struct CMimeItem *items, struct CShortHeader *head); -void DeleteHeaderContent(struct CHeader *head); -void DeleteShortHeaderContent(struct CShortHeader *head); -char *ExtractFromContentType(char *ContentType, char *value); -wchar_t *ParseMultipartBody(char *src, char *bond); - -//From account.cpp -void WINAPI GetStatusFcn(CAccount *Which, wchar_t *Value); - -extern HYAMNPROTOPLUGIN POP3Plugin; - -//from decode.cpp -int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ); -int DecodeBase64(char *Src, char *Dst, int DstLen); - -//From filterplugin.cpp -extern PYAMN_FILTERPLUGINQUEUE FirstFilterPlugin; - -//From protoplugin.cpp -extern PYAMN_PROTOPLUGINQUEUE FirstProtoPlugin; - -extern struct CExportedFunctions ProtoPluginExportedFcn[1]; -extern struct CExportedServices ProtoPluginExportedSvc[5]; -//From filterplugin.cpp -extern struct CExportedFunctions FilterPluginExportedFcn[1]; -extern struct CExportedServices FilterPluginExportedSvc[2]; -//From synchro.cpp -extern struct CExportedFunctions SynchroExportedFcn[7]; -//From account.cpp -extern struct CExportedFunctions AccountExportedFcn[2]; -extern struct CExportedServices AccountExportedSvc[9]; -//From mails.cpp (MIME) -extern struct CExportedFunctions MailExportedFcn[8]; -extern struct CExportedServices MailExportedSvc[5]; - -extern char *iconDescs[]; -extern char *iconNames[]; -extern HIMAGELIST CSImages; - -extern void __stdcall SSL_DebugLog(const char *fmt, ...); - -extern struct WndHandles *MessageWnd; - -extern int GetCharsetFromString(char *input, size_t size); -extern void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, uint32_t cp, int mode); -extern void __cdecl MailBrowser(void *Param); -extern void __cdecl BadConnection(void *Param); -extern PVOID TLSCtx; -extern PVOID SSLCtx; - -extern PYAMN_VARIABLES pYAMNVar; - -#endif + +#ifndef __YAMN_H +#define __YAMN_H + +#define VC_EXTRALEAN + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "main.h" +#include "mails/decode.h" +#include "browser/browser.h" +#include "resource.h" +#include "debug.h" +#include "version.h" +#include "proto/netclient.h" +#include "proto/netlib.h" +#include "proto/pop3/pop3.h" +#include "proto/pop3/pop3comm.h" + +struct CMPlugin : public PLUGIN +{ + CMPlugin(); + + int Load() override; + int Unload() override; +}; + +// From services.cpp +void CreateServiceFunctions(void); +void HookEvents(void); +void RefreshContact(void); +void ContactDoubleclicked(WPARAM wParam, LPARAM lParam); +INT_PTR ClistContactDoubleclicked(WPARAM wParam, LPARAM lParam); + +extern mir_cs PluginRegCS; +extern SCOUNTER *AccountWriterSO; +extern HANDLE ExitEV; +extern HANDLE WriteToFileEV; + +// From debug.cpp +#ifdef _DEBUG +void InitDebug(); +void UnInitDebug(); +#endif + +// From yamn.cpp +INT_PTR GetFcnPtrSvc(WPARAM wParam, LPARAM lParam); +INT_PTR GetVariablesSvc(WPARAM, LPARAM); +void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD); +INT_PTR ForceCheckSvc(WPARAM, LPARAM); + +extern struct YAMNExportedFcns *pYAMNFcn; + +// From account.cpp +INT_PTR CreatePluginAccountSvc(WPARAM wParam, LPARAM lParam); +INT_PTR DeletePluginAccountSvc(WPARAM wParam, LPARAM); +int InitAccount(CAccount *Which); +void DeInitAccount(CAccount *Which); +void StopSignalFcn(CAccount *Which); +void CodeDecodeString(char *Dest, BOOL Encrypt); +uint32_t FileToMemory(wchar_t *FileName, char **MemFile, char **End); + +#if defined(DEBUG_FILEREAD) || defined(DEBUG_FILEREADMESSAGES) +uint32_t ReadStringFromMemory(char **Parser,char *End,char **StoreTo,char *DebugString); +#endif +uint32_t ReadStringFromMemory(char **Parser, char *End, char **StoreTo); +uint32_t ReadMessagesFromMemory(CAccount *Which, char **Parser, char *End); +uint32_t ReadAccountFromMemory(CAccount *Which, char **Parser, wchar_t *End); +INT_PTR AddAccountsFromFileSvc(WPARAM wParam, LPARAM lParam); + +uint32_t WriteStringToFile(HANDLE File, char *Source); +uint32_t WriteStringToFileW(HANDLE File, wchar_t *Source); + + +DWORD WriteMessagesToFile(HANDLE File, CAccount *Which); +DWORD WINAPI WritePOP3Accounts(); +INT_PTR WriteAccountsToFileSvc(WPARAM wParam, LPARAM lParam); +INT_PTR FindAccountByNameSvc(WPARAM wParam, LPARAM lParam); +INT_PTR GetNextFreeAccountSvc(WPARAM wParam, LPARAM lParam); + +INT_PTR DeleteAccountSvc(WPARAM wParam, LPARAM); +void __cdecl DeleteAccountInBackground(void *Which); +int StopAccounts(HYAMNPROTOPLUGIN Plugin); +int WaitForAllAccounts(HYAMNPROTOPLUGIN Plugin, BOOL GetAccountBrowserAccess = FALSE); +int DeleteAccounts(HYAMNPROTOPLUGIN Plugin); + +void WINAPI GetStatusFcn(CAccount *Which, wchar_t *Value); +void WINAPI SetStatusFcn(CAccount *Which, wchar_t *Value); + +INT_PTR UnregisterProtoPlugins(); +INT_PTR RegisterProtocolPluginSvc(WPARAM, LPARAM); +INT_PTR UnregisterProtocolPluginSvc(WPARAM, LPARAM); +INT_PTR GetFileNameSvc(WPARAM, LPARAM); +INT_PTR DeleteFileNameSvc(WPARAM, LPARAM); + +//From filterplugin.cpp +//struct CExportedFunctions FilterPluginExported[]; +INT_PTR UnregisterFilterPlugins(); +INT_PTR RegisterFilterPluginSvc(WPARAM, LPARAM); +INT_PTR UnregisterFilterPluginSvc(WPARAM, LPARAM); +INT_PTR FilterMailSvc(WPARAM, LPARAM); + +//From mails.cpp (MIME) +//struct CExportedFunctions MailExported[]; +INT_PTR CreateAccountMailSvc(WPARAM wParam, LPARAM lParam); +INT_PTR DeleteAccountMailSvc(WPARAM wParam, LPARAM lParam); +INT_PTR LoadMailDataSvc(WPARAM wParam, LPARAM lParam); +INT_PTR UnloadMailDataSvc(WPARAM wParam, LPARAM); +INT_PTR SaveMailDataSvc(WPARAM wParam, LPARAM lParam); + +//From mime.cpp +//void WINAPI ExtractHeaderFcn(char *,int,uint16_t,HYAMNMAIL); //already in MailExported +struct _tcptable +{ + char *NameBase, *NameSub; + BOOLEAN isValid; + unsigned short int CP; +}; +extern struct _tcptable CodePageNamesAll[]; // in mime/decode.cpp +extern int CPLENALL; +extern struct _tcptable *CodePageNamesSupp; // in mime/decode.cpp +extern int CPLENSUPP; + +extern int PosX, PosY, SizeX, SizeY; +extern int HeadPosX, HeadPosY, HeadSizeX, HeadSizeY, HeadSplitPos; + +//#define CPDEFINDEX 63 //ISO-8859-1 +#define CPDEFINDEX 0 //ACP + +//From pop3comm.cpp +int RegisterPOP3Plugin(WPARAM, LPARAM); + +//From mailbrowser.cpp +INT_PTR RunMailBrowserSvc(WPARAM, LPARAM); + +//From badconnect.cpp +int RunBadConnection(CAccount *acc, UINT_PTR iErrorCode, void *pUserInfo); + +//From YAMNopts.cpp +int YAMNOptInitSvc(WPARAM, LPARAM); + +//From main.cpp +int PostLoad(WPARAM, LPARAM); //Executed after all plugins loaded YAMN reads mails from file and notify every protocol it should set its functions +int Shutdown(WPARAM, LPARAM); //Executed before Miranda is going to shutdown +int AddTopToolbarIcon(WPARAM, LPARAM); //Executed when TopToolBar plugin loaded Adds bitmap to toolbar + +extern wchar_t UserDirectory[]; //e.g. "F:\WINNT\Profiles\UserXYZ" +extern wchar_t ProfileName[]; //e.g. "majvan" +extern SWMRG *AccountBrowserSO; +extern YAMN_VARIABLES YAMNVar; +extern HANDLE hNewMailHook; +extern HANDLE hTTButton; +extern HCURSOR hCurSplitNS, hCurSplitWE; +extern UINT SecTimer; + +//From synchro.cpp +void WINAPI DeleteMessagesToEndFcn(CAccount *Account, HYAMNMAIL From); +uint32_t WINAPI WaitToWriteFcn(PSWMRG SObject, PSCOUNTER SCounter = nullptr); +void WINAPI WriteDoneFcn(PSWMRG SObject, PSCOUNTER SCounter = nullptr); +uint32_t WINAPI WaitToReadFcn(PSWMRG SObject); +void WINAPI ReadDoneFcn(PSWMRG SObject); +uint32_t WINAPI SCIncFcn(PSCOUNTER SCounter); +uint32_t WINAPI SCDecFcn(PSCOUNTER SCounter); +BOOL WINAPI SWMRGInitialize(PSWMRG, wchar_t *); +void WINAPI SWMRGDelete(PSWMRG); +uint32_t WINAPI SWMRGWaitToWrite(PSWMRG pSWMRG, uint32_t dwTimeout); +void WINAPI SWMRGDoneWriting(PSWMRG pSWMRG); +uint32_t WINAPI SWMRGWaitToRead(PSWMRG pSWMRG, uint32_t dwTimeout); +void WINAPI SWMRGDoneReading(PSWMRG pSWMRG); + +//From mails.cpp +void WINAPI DeleteMessageFromQueueFcn(HYAMNMAIL *From, HYAMNMAIL Which, int mode); +void WINAPI SetRemoveFlagsInQueueFcn(HYAMNMAIL From, uint32_t FlagsSet, uint32_t FlagsNotSet, uint32_t FlagsToSet, int mode); + +//From mime.cpp +void ExtractHeader(struct CMimeItem *items, int &CP, struct CHeader *head); +void ExtractShortHeader(struct CMimeItem *items, struct CShortHeader *head); +void DeleteHeaderContent(struct CHeader *head); +void DeleteShortHeaderContent(struct CShortHeader *head); +char *ExtractFromContentType(char *ContentType, char *value); +wchar_t *ParseMultipartBody(char *src, char *bond); + +//From account.cpp +void WINAPI GetStatusFcn(CAccount *Which, wchar_t *Value); + +extern HYAMNPROTOPLUGIN POP3Plugin; + +//from decode.cpp +int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ); +int DecodeBase64(char *Src, char *Dst, int DstLen); + +//From filterplugin.cpp +extern PYAMN_FILTERPLUGINQUEUE FirstFilterPlugin; + +//From protoplugin.cpp +extern PYAMN_PROTOPLUGINQUEUE FirstProtoPlugin; + +extern struct CExportedFunctions ProtoPluginExportedFcn[1]; +extern struct CExportedServices ProtoPluginExportedSvc[5]; +//From filterplugin.cpp +extern struct CExportedFunctions FilterPluginExportedFcn[1]; +extern struct CExportedServices FilterPluginExportedSvc[2]; +//From synchro.cpp +extern struct CExportedFunctions SynchroExportedFcn[7]; +//From account.cpp +extern struct CExportedFunctions AccountExportedFcn[2]; +extern struct CExportedServices AccountExportedSvc[9]; +//From mails.cpp (MIME) +extern struct CExportedFunctions MailExportedFcn[8]; +extern struct CExportedServices MailExportedSvc[5]; + +extern char *iconDescs[]; +extern char *iconNames[]; +extern HIMAGELIST CSImages; + +extern void __stdcall SSL_DebugLog(const char *fmt, ...); + +extern struct WndHandles *MessageWnd; + +extern int GetCharsetFromString(char *input, size_t size); +extern void ConvertCodedStringToUnicode(char *stream, wchar_t **storeto, uint32_t cp, int mode); +extern void __cdecl MailBrowser(void *Param); +extern void __cdecl BadConnection(void *Param); +extern PVOID TLSCtx; +extern PVOID SSLCtx; + +extern PYAMN_VARIABLES pYAMNVar; + +#endif diff --git a/protocols/YAMN/src/synchro.cpp b/protocols/YAMN/src/synchro.cpp index c4bb58e6de..184156787d 100644 --- a/protocols/YAMN/src/synchro.cpp +++ b/protocols/YAMN/src/synchro.cpp @@ -1,315 +1,315 @@ -/* - * This code implements synchronization objects code between threads. If you want, you can include it to your - * code. This file is not dependent on any other external code (functions) - * - * (c) majvan 2002-2004 - */ - -#include "stdafx.h" - - // Initializes a SWMRG structure. This structure must be - // initialized before any writer or reader threads attempt - // to wait on it. - // The structure must be allocated by the application and - // the structure's address is passed as the first parameter. - // The lpszName parameter is the name of the object. Pass - // NULL if you do not want to share the object. -BOOL WINAPI SWMRGInitialize(PSWMRG pSWMRG, wchar_t *Name); - -// Deletes the system resources associated with a SWMRG -// structure. The structure must be deleted only when -// no writer or reader threads in the calling process -// will wait on it. -void WINAPI SWMRGDelete(PSWMRG pSWMRG); - -// A writer thread calls this function to know when -// it can successfully write to the shared data. -// returns WAIT_FINISH when we are in write-access or WAIT_FAILED -// when event about quick finishing is set (or when system returns fail when waiting for synchro object) -uint32_t WINAPI SWMRGWaitToWrite(PSWMRG pSWMRG, uint32_t dwTimeout); - -// A writer thread calls this function to let other threads -// know that it no longer needs to write to the shared data. -void WINAPI SWMRGDoneWriting(PSWMRG pSWMRG); - -// A reader thread calls this function to know when -// it can successfully read the shared data. -// returns WAIT_FINISH when we are in read-access or WAIT_FAILED -// when event about quick finishing is set (or when system returns fail when waiting for synchro object) -uint32_t WINAPI SWMRGWaitToRead(PSWMRG pSWMRG, uint32_t dwTimeout); - -// A reader thread calls this function to let other threads -// know when it no longer needs to read the shared data. -void WINAPI SWMRGDoneReading(PSWMRG pSWMRG); - -// WaitToReadFcn -// is used to wait for read access with SWMRG SO, but it also increments counter if successfull -// returns WAIT_FAILED or WAIT_FINISH -// when WAIT_FAILED, we should not begin to access datas, we are not in read-access mode -uint32_t WINAPI WaitToReadFcn(PSWMRG SObject); - -// WriteDoneFcn -// is used to release read access with SWMRG SO, but it also decrements counter if successfull -void WINAPI ReadDoneFcn(PSWMRG SObject); - -// This functions is for export purposes -// Plugin can call this function to manage SCOUNTER synchronization object - -// Gets number value stored in SCOUNTER SO -// Note you must not read the number from memory directly, because -// CPU can stop reading thread when it has read HI-Word, then another thread -// can change the value and then OS starts the previous thread, that reads the -// LO-uint16_t of uint32_t. And the return value HI+LO-uint16_t is corrupted -uint32_t WINAPI SCGetNumberFcn(PSCOUNTER SCounter); - -// Increments SCOUNTER and unsets event -// Returns Number after incrementing -uint32_t WINAPI SCIncFcn(PSCOUNTER SCounter); - -// Decrements SCOUNTER and sets event if zero -// Returns Number after decrementing -uint32_t WINAPI SCDecFcn(PSCOUNTER SCounter); - -struct CExportedFunctions SynchroExportedFcn[] = -{ - {YAMN_WAITTOWRITEID, (void *)WaitToWriteFcn}, - {YAMN_WRITEDONEID, (void *)WriteDoneFcn}, - {YAMN_WAITTOREADID, (void *)WaitToReadFcn}, - {YAMN_READDONEID, (void *)ReadDoneFcn}, - {YAMN_SCGETNUMBERID, (void *)SCGetNumberFcn}, - {YAMN_SCINCID, (void *)SCIncFcn}, - {YAMN_SCDECID, (void *)SCDecFcn}, -}; - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -void WINAPI SWMRGDelete(PSWMRG pSWMRG) -{ - // Destroys any synchronization objects that were - // successfully created. - if (nullptr != pSWMRG->hEventNoWriter) - CloseHandle(pSWMRG->hEventNoWriter); - if (nullptr != pSWMRG->hEventNoReaders) - CloseHandle(pSWMRG->hEventNoReaders); - if (nullptr != pSWMRG->hSemNumReaders) - CloseHandle(pSWMRG->hSemNumReaders); - if (nullptr != pSWMRG->hFinishEV) - CloseHandle(pSWMRG->hFinishEV); -} - -BOOL WINAPI SWMRGInitialize(PSWMRG pSWMRG, wchar_t *Name) -{ - pSWMRG->hEventNoWriter = nullptr; - pSWMRG->hEventNoReaders = nullptr; - pSWMRG->hSemNumReaders = nullptr; - pSWMRG->hFinishEV = nullptr; - - // Creates the automatic-reset event that is signalled when - // no writer threads are writing. - // Initially no reader threads are reading. - if (Name != nullptr) - Name[0] = (wchar_t)'W'; - pSWMRG->hEventNoWriter = CreateEvent(nullptr, FALSE, TRUE, Name); - - // Creates the manual-reset event that is signalled when - // no reader threads are reading. - // Initially no reader threads are reading. - if (Name != nullptr) - Name[0] = (wchar_t)'R'; - pSWMRG->hEventNoReaders = CreateEvent(nullptr, TRUE, TRUE, Name); - - // Initializes the variable that indicates the number of - // reader threads that are reading. - // Initially no reader threads are reading. - if (Name != nullptr) - Name[0] = (wchar_t)'C'; - pSWMRG->hSemNumReaders = CreateSemaphore(nullptr, 0, 0x7FFFFFFF, Name); - - if (Name != nullptr) - Name[0] = (wchar_t)'F'; - pSWMRG->hFinishEV = CreateEvent(nullptr, TRUE, FALSE, Name); - - // If a synchronization object could not be created, - // destroys any created objects and return failure. - if ((nullptr == pSWMRG->hEventNoWriter) || (nullptr == pSWMRG->hEventNoReaders) || (nullptr == pSWMRG->hSemNumReaders) || (nullptr == pSWMRG->hFinishEV)) { - SWMRGDelete(pSWMRG); - return FALSE; - } - return TRUE; -} - -uint32_t WINAPI SWMRGWaitToWrite(PSWMRG pSWMRG, uint32_t dwTimeout) -{ - uint32_t dw; - HANDLE aHandles[2]; - - // We can write if the following are true: - // 1. No other threads are writing. - // 2. No threads are reading. - // But first we have to know if SWMRG structure is not about to delete - aHandles[0] = pSWMRG->hEventNoWriter; - aHandles[1] = pSWMRG->hEventNoReaders; - if (WAIT_OBJECT_0 == (dw = WaitForSingleObject(pSWMRG->hFinishEV, 0))) - return WAIT_FINISH; - if (WAIT_FAILED == dw) - return dw; - dw = WaitForMultipleObjects(2, aHandles, TRUE, dwTimeout); - // if a request to delete became later, we should not catch it. Try once more to ask if account is not about to delete - if ((dw != WAIT_FAILED) && (WAIT_OBJECT_0 == (WaitForSingleObject(pSWMRG->hFinishEV, 0)))) { - SetEvent(pSWMRG->hEventNoWriter); - return WAIT_FINISH; - } - - // This thread can write to the shared data. - // Automatic event for NoWriter sets hEventNoWriter to nonsignaled after WaitForMultipleObject - - // Because a writer thread is writing, the Event - // should not be reset. This stops other - // writers and readers. - return dw; -} - -void WINAPI SWMRGDoneWriting(PSWMRG pSWMRG) -// Presumably, a writer thread calling this function has -// successfully called WaitToWrite. This means that we -// do not have to wait on any synchronization objects -// here because the writer already owns the Event. -{ - // Allow other writer/reader threads to use - // the SWMRG synchronization object. - SetEvent(pSWMRG->hEventNoWriter); -} - -uint32_t WINAPI SWMRGWaitToRead(PSWMRG pSWMRG, uint32_t dwTimeout) -{ - uint32_t dw; - LONG lPreviousCount; - - // We can read if no threads are writing. - // And there's not request to delete structure - if (WAIT_OBJECT_0 == (dw = WaitForSingleObject(pSWMRG->hFinishEV, 0))) - return WAIT_FINISH; - if (WAIT_FAILED == dw) - return dw; - dw = WaitForSingleObject(pSWMRG->hEventNoWriter, dwTimeout); - // if a request to delete became later, we should not catch it. Try once more to ask if account is not about to delete - if ((dw != WAIT_FAILED) && (WAIT_OBJECT_0 == (WaitForSingleObject(pSWMRG->hFinishEV, 0)))) { - SetEvent(pSWMRG->hEventNoWriter); - return WAIT_FINISH; - } - - if (dw == WAIT_OBJECT_0) { - // This thread can read from the shared data. - // Increment the number of reader threads. - // But there can't be more than one thread incrementing readers, - // so this is why we use semaphore. - ReleaseSemaphore(pSWMRG->hSemNumReaders, 1, &lPreviousCount); - if (lPreviousCount == 0) - // If this is the first reader thread, - // set event to reflect this. Other reader threads can read, no writer thread can write. - ResetEvent(pSWMRG->hEventNoReaders); - - // Allow other writer/reader threads to use - // the SWMRG synchronization object. hEventNoWrite is still non-signaled - // (it looks like writer is processing thread, but it is not true) - SetEvent(pSWMRG->hEventNoWriter); - } - - return(dw); -} - -void WINAPI SWMRGDoneReading(PSWMRG pSWMRG) -{ - HANDLE aHandles[2]; - LONG lNumReaders; - - // We can stop reading if the events are available, - // but when we stop reading we must also decrement the - // number of reader threads. - aHandles[0] = pSWMRG->hEventNoWriter; - aHandles[1] = pSWMRG->hSemNumReaders; - WaitForMultipleObjects(2, aHandles, TRUE, INFINITE); - - // Get the remaining number of readers by releasing the - // semaphore and then restoring the count by immediately - // performing a wait. - ReleaseSemaphore(pSWMRG->hSemNumReaders, 1, &lNumReaders); - WaitForSingleObject(pSWMRG->hSemNumReaders, INFINITE); - - // If there are no remaining readers, - // set the event to relect this. - if (lNumReaders == 0) - // If there are no reader threads, - // set our event to reflect this. - SetEvent(pSWMRG->hEventNoReaders); - - // Allow other writer/reader threads to use - // the SWMRG synchronization object. - // (it looks like writer is processing thread, but it is not true) - SetEvent(pSWMRG->hEventNoWriter); -} - -uint32_t WINAPI WaitToWriteFcn(PSWMRG SObject, PSCOUNTER SCounter) -{ - uint32_t EnterCode; - - if (WAIT_OBJECT_0 == (EnterCode = SWMRGWaitToWrite(SObject, INFINITE))) - if (SCounter != nullptr) - SCIncFcn(SCounter); - - return EnterCode; -} - -void WINAPI WriteDoneFcn(PSWMRG SObject, PSCOUNTER SCounter) -{ - SWMRGDoneWriting(SObject); - if (SCounter != nullptr) - SCDecFcn(SCounter); -} - -uint32_t WINAPI WaitToReadFcn(PSWMRG SObject) -{ - uint32_t EnterCode = SWMRGWaitToRead(SObject, INFINITE); - return EnterCode; -} - -void WINAPI ReadDoneFcn(PSWMRG SObject) -{ - SWMRGDoneReading(SObject); -} - -uint32_t WINAPI SCGetNumberFcn(PSCOUNTER SCounter) -{ - - EnterCriticalSection(&SCounter->CounterCS); - - uint32_t Temp = SCounter->Number; - - LeaveCriticalSection(&SCounter->CounterCS); - return Temp; -} - -uint32_t WINAPI SCIncFcn(PSCOUNTER SCounter) -{ - EnterCriticalSection(&SCounter->CounterCS); - - uint32_t Temp = ++SCounter->Number; - ResetEvent(SCounter->Event); - - LeaveCriticalSection(&SCounter->CounterCS); - return Temp; -} - -uint32_t WINAPI SCDecFcn(PSCOUNTER SCounter) -{ - uint32_t Temp; - EnterCriticalSection(&SCounter->CounterCS); - - if (!(Temp = --SCounter->Number)) { - SetEvent(SCounter->Event); - } - - LeaveCriticalSection(&SCounter->CounterCS); - return Temp; -} +/* + * This code implements synchronization objects code between threads. If you want, you can include it to your + * code. This file is not dependent on any other external code (functions) + * + * (c) majvan 2002-2004 + */ + +#include "stdafx.h" + + // Initializes a SWMRG structure. This structure must be + // initialized before any writer or reader threads attempt + // to wait on it. + // The structure must be allocated by the application and + // the structure's address is passed as the first parameter. + // The lpszName parameter is the name of the object. Pass + // NULL if you do not want to share the object. +BOOL WINAPI SWMRGInitialize(PSWMRG pSWMRG, wchar_t *Name); + +// Deletes the system resources associated with a SWMRG +// structure. The structure must be deleted only when +// no writer or reader threads in the calling process +// will wait on it. +void WINAPI SWMRGDelete(PSWMRG pSWMRG); + +// A writer thread calls this function to know when +// it can successfully write to the shared data. +// returns WAIT_FINISH when we are in write-access or WAIT_FAILED +// when event about quick finishing is set (or when system returns fail when waiting for synchro object) +uint32_t WINAPI SWMRGWaitToWrite(PSWMRG pSWMRG, uint32_t dwTimeout); + +// A writer thread calls this function to let other threads +// know that it no longer needs to write to the shared data. +void WINAPI SWMRGDoneWriting(PSWMRG pSWMRG); + +// A reader thread calls this function to know when +// it can successfully read the shared data. +// returns WAIT_FINISH when we are in read-access or WAIT_FAILED +// when event about quick finishing is set (or when system returns fail when waiting for synchro object) +uint32_t WINAPI SWMRGWaitToRead(PSWMRG pSWMRG, uint32_t dwTimeout); + +// A reader thread calls this function to let other threads +// know when it no longer needs to read the shared data. +void WINAPI SWMRGDoneReading(PSWMRG pSWMRG); + +// WaitToReadFcn +// is used to wait for read access with SWMRG SO, but it also increments counter if successfull +// returns WAIT_FAILED or WAIT_FINISH +// when WAIT_FAILED, we should not begin to access datas, we are not in read-access mode +uint32_t WINAPI WaitToReadFcn(PSWMRG SObject); + +// WriteDoneFcn +// is used to release read access with SWMRG SO, but it also decrements counter if successfull +void WINAPI ReadDoneFcn(PSWMRG SObject); + +// This functions is for export purposes +// Plugin can call this function to manage SCOUNTER synchronization object + +// Gets number value stored in SCOUNTER SO +// Note you must not read the number from memory directly, because +// CPU can stop reading thread when it has read HI-Word, then another thread +// can change the value and then OS starts the previous thread, that reads the +// LO-uint16_t of uint32_t. And the return value HI+LO-uint16_t is corrupted +uint32_t WINAPI SCGetNumberFcn(PSCOUNTER SCounter); + +// Increments SCOUNTER and unsets event +// Returns Number after incrementing +uint32_t WINAPI SCIncFcn(PSCOUNTER SCounter); + +// Decrements SCOUNTER and sets event if zero +// Returns Number after decrementing +uint32_t WINAPI SCDecFcn(PSCOUNTER SCounter); + +struct CExportedFunctions SynchroExportedFcn[] = +{ + {YAMN_WAITTOWRITEID, (void *)WaitToWriteFcn}, + {YAMN_WRITEDONEID, (void *)WriteDoneFcn}, + {YAMN_WAITTOREADID, (void *)WaitToReadFcn}, + {YAMN_READDONEID, (void *)ReadDoneFcn}, + {YAMN_SCGETNUMBERID, (void *)SCGetNumberFcn}, + {YAMN_SCINCID, (void *)SCIncFcn}, + {YAMN_SCDECID, (void *)SCDecFcn}, +}; + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +void WINAPI SWMRGDelete(PSWMRG pSWMRG) +{ + // Destroys any synchronization objects that were + // successfully created. + if (nullptr != pSWMRG->hEventNoWriter) + CloseHandle(pSWMRG->hEventNoWriter); + if (nullptr != pSWMRG->hEventNoReaders) + CloseHandle(pSWMRG->hEventNoReaders); + if (nullptr != pSWMRG->hSemNumReaders) + CloseHandle(pSWMRG->hSemNumReaders); + if (nullptr != pSWMRG->hFinishEV) + CloseHandle(pSWMRG->hFinishEV); +} + +BOOL WINAPI SWMRGInitialize(PSWMRG pSWMRG, wchar_t *Name) +{ + pSWMRG->hEventNoWriter = nullptr; + pSWMRG->hEventNoReaders = nullptr; + pSWMRG->hSemNumReaders = nullptr; + pSWMRG->hFinishEV = nullptr; + + // Creates the automatic-reset event that is signalled when + // no writer threads are writing. + // Initially no reader threads are reading. + if (Name != nullptr) + Name[0] = (wchar_t)'W'; + pSWMRG->hEventNoWriter = CreateEvent(nullptr, FALSE, TRUE, Name); + + // Creates the manual-reset event that is signalled when + // no reader threads are reading. + // Initially no reader threads are reading. + if (Name != nullptr) + Name[0] = (wchar_t)'R'; + pSWMRG->hEventNoReaders = CreateEvent(nullptr, TRUE, TRUE, Name); + + // Initializes the variable that indicates the number of + // reader threads that are reading. + // Initially no reader threads are reading. + if (Name != nullptr) + Name[0] = (wchar_t)'C'; + pSWMRG->hSemNumReaders = CreateSemaphore(nullptr, 0, 0x7FFFFFFF, Name); + + if (Name != nullptr) + Name[0] = (wchar_t)'F'; + pSWMRG->hFinishEV = CreateEvent(nullptr, TRUE, FALSE, Name); + + // If a synchronization object could not be created, + // destroys any created objects and return failure. + if ((nullptr == pSWMRG->hEventNoWriter) || (nullptr == pSWMRG->hEventNoReaders) || (nullptr == pSWMRG->hSemNumReaders) || (nullptr == pSWMRG->hFinishEV)) { + SWMRGDelete(pSWMRG); + return FALSE; + } + return TRUE; +} + +uint32_t WINAPI SWMRGWaitToWrite(PSWMRG pSWMRG, uint32_t dwTimeout) +{ + uint32_t dw; + HANDLE aHandles[2]; + + // We can write if the following are true: + // 1. No other threads are writing. + // 2. No threads are reading. + // But first we have to know if SWMRG structure is not about to delete + aHandles[0] = pSWMRG->hEventNoWriter; + aHandles[1] = pSWMRG->hEventNoReaders; + if (WAIT_OBJECT_0 == (dw = WaitForSingleObject(pSWMRG->hFinishEV, 0))) + return WAIT_FINISH; + if (WAIT_FAILED == dw) + return dw; + dw = WaitForMultipleObjects(2, aHandles, TRUE, dwTimeout); + // if a request to delete became later, we should not catch it. Try once more to ask if account is not about to delete + if ((dw != WAIT_FAILED) && (WAIT_OBJECT_0 == (WaitForSingleObject(pSWMRG->hFinishEV, 0)))) { + SetEvent(pSWMRG->hEventNoWriter); + return WAIT_FINISH; + } + + // This thread can write to the shared data. + // Automatic event for NoWriter sets hEventNoWriter to nonsignaled after WaitForMultipleObject + + // Because a writer thread is writing, the Event + // should not be reset. This stops other + // writers and readers. + return dw; +} + +void WINAPI SWMRGDoneWriting(PSWMRG pSWMRG) +// Presumably, a writer thread calling this function has +// successfully called WaitToWrite. This means that we +// do not have to wait on any synchronization objects +// here because the writer already owns the Event. +{ + // Allow other writer/reader threads to use + // the SWMRG synchronization object. + SetEvent(pSWMRG->hEventNoWriter); +} + +uint32_t WINAPI SWMRGWaitToRead(PSWMRG pSWMRG, uint32_t dwTimeout) +{ + uint32_t dw; + LONG lPreviousCount; + + // We can read if no threads are writing. + // And there's not request to delete structure + if (WAIT_OBJECT_0 == (dw = WaitForSingleObject(pSWMRG->hFinishEV, 0))) + return WAIT_FINISH; + if (WAIT_FAILED == dw) + return dw; + dw = WaitForSingleObject(pSWMRG->hEventNoWriter, dwTimeout); + // if a request to delete became later, we should not catch it. Try once more to ask if account is not about to delete + if ((dw != WAIT_FAILED) && (WAIT_OBJECT_0 == (WaitForSingleObject(pSWMRG->hFinishEV, 0)))) { + SetEvent(pSWMRG->hEventNoWriter); + return WAIT_FINISH; + } + + if (dw == WAIT_OBJECT_0) { + // This thread can read from the shared data. + // Increment the number of reader threads. + // But there can't be more than one thread incrementing readers, + // so this is why we use semaphore. + ReleaseSemaphore(pSWMRG->hSemNumReaders, 1, &lPreviousCount); + if (lPreviousCount == 0) + // If this is the first reader thread, + // set event to reflect this. Other reader threads can read, no writer thread can write. + ResetEvent(pSWMRG->hEventNoReaders); + + // Allow other writer/reader threads to use + // the SWMRG synchronization object. hEventNoWrite is still non-signaled + // (it looks like writer is processing thread, but it is not true) + SetEvent(pSWMRG->hEventNoWriter); + } + + return(dw); +} + +void WINAPI SWMRGDoneReading(PSWMRG pSWMRG) +{ + HANDLE aHandles[2]; + LONG lNumReaders; + + // We can stop reading if the events are available, + // but when we stop reading we must also decrement the + // number of reader threads. + aHandles[0] = pSWMRG->hEventNoWriter; + aHandles[1] = pSWMRG->hSemNumReaders; + WaitForMultipleObjects(2, aHandles, TRUE, INFINITE); + + // Get the remaining number of readers by releasing the + // semaphore and then restoring the count by immediately + // performing a wait. + ReleaseSemaphore(pSWMRG->hSemNumReaders, 1, &lNumReaders); + WaitForSingleObject(pSWMRG->hSemNumReaders, INFINITE); + + // If there are no remaining readers, + // set the event to relect this. + if (lNumReaders == 0) + // If there are no reader threads, + // set our event to reflect this. + SetEvent(pSWMRG->hEventNoReaders); + + // Allow other writer/reader threads to use + // the SWMRG synchronization object. + // (it looks like writer is processing thread, but it is not true) + SetEvent(pSWMRG->hEventNoWriter); +} + +uint32_t WINAPI WaitToWriteFcn(PSWMRG SObject, PSCOUNTER SCounter) +{ + uint32_t EnterCode; + + if (WAIT_OBJECT_0 == (EnterCode = SWMRGWaitToWrite(SObject, INFINITE))) + if (SCounter != nullptr) + SCIncFcn(SCounter); + + return EnterCode; +} + +void WINAPI WriteDoneFcn(PSWMRG SObject, PSCOUNTER SCounter) +{ + SWMRGDoneWriting(SObject); + if (SCounter != nullptr) + SCDecFcn(SCounter); +} + +uint32_t WINAPI WaitToReadFcn(PSWMRG SObject) +{ + uint32_t EnterCode = SWMRGWaitToRead(SObject, INFINITE); + return EnterCode; +} + +void WINAPI ReadDoneFcn(PSWMRG SObject) +{ + SWMRGDoneReading(SObject); +} + +uint32_t WINAPI SCGetNumberFcn(PSCOUNTER SCounter) +{ + + EnterCriticalSection(&SCounter->CounterCS); + + uint32_t Temp = SCounter->Number; + + LeaveCriticalSection(&SCounter->CounterCS); + return Temp; +} + +uint32_t WINAPI SCIncFcn(PSCOUNTER SCounter) +{ + EnterCriticalSection(&SCounter->CounterCS); + + uint32_t Temp = ++SCounter->Number; + ResetEvent(SCounter->Event); + + LeaveCriticalSection(&SCounter->CounterCS); + return Temp; +} + +uint32_t WINAPI SCDecFcn(PSCOUNTER SCounter) +{ + uint32_t Temp; + EnterCriticalSection(&SCounter->CounterCS); + + if (!(Temp = --SCounter->Number)) { + SetEvent(SCounter->Event); + } + + LeaveCriticalSection(&SCounter->CounterCS); + return Temp; +} diff --git a/protocols/YAMN/src/yamn.cpp b/protocols/YAMN/src/yamn.cpp index d0d80021f8..2af7efd74f 100644 --- a/protocols/YAMN/src/yamn.cpp +++ b/protocols/YAMN/src/yamn.cpp @@ -1,230 +1,230 @@ -/* - * This code implements miscellaneous usefull functions - * - * (c) majvan 2002-2004 - */ - -#include "stdafx.h" - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -//Plugin registration CS -//Used if we add (register) plugin to YAMN plugins and when we browse through registered plugins -mir_cs PluginRegCS; - -//AccountWriterCS -//We want to store number of writers of Accounts (number of Accounts used for writing) -//If we want to read all accounts (for saving to file) immidiatelly, we have to wait until no account is changing (no thread writing to account) -SCOUNTER *AccountWriterSO; - -//NoExitEV -//Event that is signaled when there's a request to exit, so no new pop3 check should be performed -HANDLE ExitEV; - -//WriteToFileEV -//If this is signaled, write accounts to file is performed. Set this event if you want to actualize your accounts and messages -HANDLE WriteToFileEV; - -//Returns pointer to YAMN exported function -INT_PTR GetFcnPtrSvc(WPARAM wParam, LPARAM lParam); - -//Returns pointer to YAMN variables -INT_PTR GetVariablesSvc(WPARAM wParam, LPARAM); - -// Function every seconds decrements account counter of seconds and checks if they are 0 -// If yes, creates a POP3 thread to check account -void CALLBACK TimerProc(HWND, UINT, UINT, uint32_t); - -// Function called to check all accounts immidialtelly -// no params -INT_PTR ForceCheckSvc(WPARAM, LPARAM); - -//thread is running all the time -//waits for WriteToFileEV and then writes all accounts to file -//uint32_t WINAPI FileWritingThread(PVOID); - -// Function is called when Miranda notifies plugin that it is about to exit -// Ensures succesfull end of POP3 checking, sets event that no next checking should be performed -// If there's no writer to account (POP3 thread), saves the results to the file -//not used now, perhaps in the future - - -//int ExitProc(WPARAM wParam, LPARAM lParam); - -//-------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------- - -INT_PTR GetFcnPtrSvc(WPARAM wParam, LPARAM) -{ - int i; - - for (i=0;iNext) { - if (WAIT_OBJECT_0 != SWMRGWaitToRead(ActualPlugin->Plugin->AccountBrowserSO, 0)) // we want to access accounts immiadtelly - return; - - for (ActualAccount = ActualPlugin->Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = ActualAccount->Next) { - if (ActualAccount->Plugin == nullptr || ActualAccount->Plugin->Fcn == nullptr) //account not inited - continue; - - if (WAIT_OBJECT_0 != SWMRGWaitToRead(ActualAccount->AccountAccessSO, 0)) - continue; - - BOOL isAccountCounting = 0; - if ((ActualAccount->Flags & YAMN_ACC_ENA) && - (((ActualAccount->StatusFlags & YAMN_ACC_ST0) && (Status <= ID_STATUS_OFFLINE)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST1) && (Status == ID_STATUS_ONLINE)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST2) && (Status == ID_STATUS_AWAY)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST3) && (Status == ID_STATUS_DND)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST4) && (Status == ID_STATUS_NA)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST5) && (Status == ID_STATUS_OCCUPIED)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST6) && (Status == ID_STATUS_FREECHAT)) || - ((ActualAccount->StatusFlags & YAMN_ACC_ST7) && (Status == ID_STATUS_INVISIBLE)))) - { - if ((!ActualAccount->Interval && !ActualAccount->TimeLeft) || ActualAccount->Plugin->Fcn->TimeoutFcnPtr == nullptr) - goto ChangeIsCountingStatusLabel; - - if (ActualAccount->TimeLeft) { - ActualAccount->TimeLeft--; - isAccountCounting = TRUE; - } - - WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_CHANGETIME, (WPARAM)ActualAccount, (LPARAM)ActualAccount->TimeLeft); - if (!ActualAccount->TimeLeft) { - struct CheckParam ParamToPlugin = {YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, YAMN_NORMALCHECK, (void *)nullptr, nullptr}; - - ActualAccount->TimeLeft = ActualAccount->Interval; - HANDLE NewThread = CreateThread(nullptr, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->TimeoutFcnPtr, &ParamToPlugin, 0, &tid); - if (NewThread == nullptr) { - ReadDoneFcn(ActualAccount->AccountAccessSO); - continue; - } - else { - WaitForSingleObject(ThreadRunningEV, INFINITE); - CloseHandle(NewThread); - } - } - } - -ChangeIsCountingStatusLabel: - if (((ActualAccount->isCounting) != 0) != isAccountCounting) { - ActualAccount->isCounting = isAccountCounting; - uint16_t cStatus = g_plugin.getWord(ActualAccount->hContact, "Status"); - switch (cStatus) { - case ID_STATUS_ONLINE: - case ID_STATUS_OFFLINE: - g_plugin.setWord(ActualAccount->hContact, "Status", isAccountCounting ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE); - default: - break; - } - } - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - SWMRGDoneReading(ActualPlugin->Plugin->AccountBrowserSO); - } - CloseHandle(ThreadRunningEV); -} - -INT_PTR ForceCheckSvc(WPARAM, LPARAM) -{ - CAccount *ActualAccount; - DWORD tid; - - //we use event to signal, that running thread has all needed stack parameters copied - HANDLE ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr); - if (ThreadRunningEV == nullptr) - return 0; - //if we want to close miranda, we get event and do not run pop3 checking anymore - if (WAIT_OBJECT_0 == WaitForSingleObject(ExitEV, 0)) - return 0; - - { - mir_cslock lck(PluginRegCS); - for (PYAMN_PROTOPLUGINQUEUE ActualPlugin = FirstProtoPlugin; ActualPlugin != nullptr; ActualPlugin = ActualPlugin->Next) { - SWMRGWaitToRead(ActualPlugin->Plugin->AccountBrowserSO, INFINITE); - for (ActualAccount = ActualPlugin->Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = ActualAccount->Next) { - if (ActualAccount->Plugin->Fcn == nullptr) //account not inited - continue; - - if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) - continue; - - if ((ActualAccount->Flags & YAMN_ACC_ENA) && (ActualAccount->StatusFlags & YAMN_ACC_FORCE)) { //account cannot be forced to check - if (ActualAccount->Plugin->Fcn->ForceCheckFcnPtr == nullptr) { - ReadDoneFcn(ActualAccount->AccountAccessSO); - continue; - } - struct CheckParam ParamToPlugin = { YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, YAMN_FORCECHECK, (void *)nullptr, nullptr }; - - if (nullptr == CreateThread(nullptr, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->ForceCheckFcnPtr, &ParamToPlugin, 0, &tid)) { - ReadDoneFcn(ActualAccount->AccountAccessSO); - continue; - } - else - WaitForSingleObject(ThreadRunningEV, INFINITE); - } - ReadDoneFcn(ActualAccount->AccountAccessSO); - } - SWMRGDoneReading(ActualPlugin->Plugin->AccountBrowserSO); - } - } - - CloseHandle(ThreadRunningEV); - - if (hTTButton) - CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, 0); - return 1; -} +/* + * This code implements miscellaneous usefull functions + * + * (c) majvan 2002-2004 + */ + +#include "stdafx.h" + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +//Plugin registration CS +//Used if we add (register) plugin to YAMN plugins and when we browse through registered plugins +mir_cs PluginRegCS; + +//AccountWriterCS +//We want to store number of writers of Accounts (number of Accounts used for writing) +//If we want to read all accounts (for saving to file) immidiatelly, we have to wait until no account is changing (no thread writing to account) +SCOUNTER *AccountWriterSO; + +//NoExitEV +//Event that is signaled when there's a request to exit, so no new pop3 check should be performed +HANDLE ExitEV; + +//WriteToFileEV +//If this is signaled, write accounts to file is performed. Set this event if you want to actualize your accounts and messages +HANDLE WriteToFileEV; + +//Returns pointer to YAMN exported function +INT_PTR GetFcnPtrSvc(WPARAM wParam, LPARAM lParam); + +//Returns pointer to YAMN variables +INT_PTR GetVariablesSvc(WPARAM wParam, LPARAM); + +// Function every seconds decrements account counter of seconds and checks if they are 0 +// If yes, creates a POP3 thread to check account +void CALLBACK TimerProc(HWND, UINT, UINT, uint32_t); + +// Function called to check all accounts immidialtelly +// no params +INT_PTR ForceCheckSvc(WPARAM, LPARAM); + +//thread is running all the time +//waits for WriteToFileEV and then writes all accounts to file +//uint32_t WINAPI FileWritingThread(PVOID); + +// Function is called when Miranda notifies plugin that it is about to exit +// Ensures succesfull end of POP3 checking, sets event that no next checking should be performed +// If there's no writer to account (POP3 thread), saves the results to the file +//not used now, perhaps in the future + + +//int ExitProc(WPARAM wParam, LPARAM lParam); + +//-------------------------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------------------------- + +INT_PTR GetFcnPtrSvc(WPARAM wParam, LPARAM) +{ + int i; + + for (i=0;iNext) { + if (WAIT_OBJECT_0 != SWMRGWaitToRead(ActualPlugin->Plugin->AccountBrowserSO, 0)) // we want to access accounts immiadtelly + return; + + for (ActualAccount = ActualPlugin->Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = ActualAccount->Next) { + if (ActualAccount->Plugin == nullptr || ActualAccount->Plugin->Fcn == nullptr) //account not inited + continue; + + if (WAIT_OBJECT_0 != SWMRGWaitToRead(ActualAccount->AccountAccessSO, 0)) + continue; + + BOOL isAccountCounting = 0; + if ((ActualAccount->Flags & YAMN_ACC_ENA) && + (((ActualAccount->StatusFlags & YAMN_ACC_ST0) && (Status <= ID_STATUS_OFFLINE)) || + ((ActualAccount->StatusFlags & YAMN_ACC_ST1) && (Status == ID_STATUS_ONLINE)) || + ((ActualAccount->StatusFlags & YAMN_ACC_ST2) && (Status == ID_STATUS_AWAY)) || + ((ActualAccount->StatusFlags & YAMN_ACC_ST3) && (Status == ID_STATUS_DND)) || + ((ActualAccount->StatusFlags & YAMN_ACC_ST4) && (Status == ID_STATUS_NA)) || + ((ActualAccount->StatusFlags & YAMN_ACC_ST5) && (Status == ID_STATUS_OCCUPIED)) || + ((ActualAccount->StatusFlags & YAMN_ACC_ST6) && (Status == ID_STATUS_FREECHAT)) || + ((ActualAccount->StatusFlags & YAMN_ACC_ST7) && (Status == ID_STATUS_INVISIBLE)))) + { + if ((!ActualAccount->Interval && !ActualAccount->TimeLeft) || ActualAccount->Plugin->Fcn->TimeoutFcnPtr == nullptr) + goto ChangeIsCountingStatusLabel; + + if (ActualAccount->TimeLeft) { + ActualAccount->TimeLeft--; + isAccountCounting = TRUE; + } + + WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_CHANGETIME, (WPARAM)ActualAccount, (LPARAM)ActualAccount->TimeLeft); + if (!ActualAccount->TimeLeft) { + struct CheckParam ParamToPlugin = {YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, YAMN_NORMALCHECK, (void *)nullptr, nullptr}; + + ActualAccount->TimeLeft = ActualAccount->Interval; + HANDLE NewThread = CreateThread(nullptr, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->TimeoutFcnPtr, &ParamToPlugin, 0, &tid); + if (NewThread == nullptr) { + ReadDoneFcn(ActualAccount->AccountAccessSO); + continue; + } + else { + WaitForSingleObject(ThreadRunningEV, INFINITE); + CloseHandle(NewThread); + } + } + } + +ChangeIsCountingStatusLabel: + if (((ActualAccount->isCounting) != 0) != isAccountCounting) { + ActualAccount->isCounting = isAccountCounting; + uint16_t cStatus = g_plugin.getWord(ActualAccount->hContact, "Status"); + switch (cStatus) { + case ID_STATUS_ONLINE: + case ID_STATUS_OFFLINE: + g_plugin.setWord(ActualAccount->hContact, "Status", isAccountCounting ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE); + default: + break; + } + } + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + SWMRGDoneReading(ActualPlugin->Plugin->AccountBrowserSO); + } + CloseHandle(ThreadRunningEV); +} + +INT_PTR ForceCheckSvc(WPARAM, LPARAM) +{ + CAccount *ActualAccount; + DWORD tid; + + //we use event to signal, that running thread has all needed stack parameters copied + HANDLE ThreadRunningEV = CreateEvent(nullptr, FALSE, FALSE, nullptr); + if (ThreadRunningEV == nullptr) + return 0; + //if we want to close miranda, we get event and do not run pop3 checking anymore + if (WAIT_OBJECT_0 == WaitForSingleObject(ExitEV, 0)) + return 0; + + { + mir_cslock lck(PluginRegCS); + for (PYAMN_PROTOPLUGINQUEUE ActualPlugin = FirstProtoPlugin; ActualPlugin != nullptr; ActualPlugin = ActualPlugin->Next) { + SWMRGWaitToRead(ActualPlugin->Plugin->AccountBrowserSO, INFINITE); + for (ActualAccount = ActualPlugin->Plugin->FirstAccount; ActualAccount != nullptr; ActualAccount = ActualAccount->Next) { + if (ActualAccount->Plugin->Fcn == nullptr) //account not inited + continue; + + if (WAIT_OBJECT_0 != WaitToReadFcn(ActualAccount->AccountAccessSO)) + continue; + + if ((ActualAccount->Flags & YAMN_ACC_ENA) && (ActualAccount->StatusFlags & YAMN_ACC_FORCE)) { //account cannot be forced to check + if (ActualAccount->Plugin->Fcn->ForceCheckFcnPtr == nullptr) { + ReadDoneFcn(ActualAccount->AccountAccessSO); + continue; + } + struct CheckParam ParamToPlugin = { YAMN_CHECKVERSION, ThreadRunningEV, ActualAccount, YAMN_FORCECHECK, (void *)nullptr, nullptr }; + + if (nullptr == CreateThread(nullptr, 0, (YAMN_STANDARDFCN)ActualAccount->Plugin->Fcn->ForceCheckFcnPtr, &ParamToPlugin, 0, &tid)) { + ReadDoneFcn(ActualAccount->AccountAccessSO); + continue; + } + else + WaitForSingleObject(ThreadRunningEV, INFINITE); + } + ReadDoneFcn(ActualAccount->AccountAccessSO); + } + SWMRGDoneReading(ActualPlugin->Plugin->AccountBrowserSO); + } + } + + CloseHandle(ThreadRunningEV); + + if (hTTButton) + CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, 0); + return 1; +} diff --git a/src/mir_app/src/MDatabaseCommon.cpp b/src/mir_app/src/MDatabaseCommon.cpp index 323954a516..b8084148f7 100644 --- a/src/mir_app/src/MDatabaseCommon.cpp +++ b/src/mir_app/src/MDatabaseCommon.cpp @@ -1,661 +1,661 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (C) 2012-23 Miranda NG team, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "stdafx.h" -#include "database.h" - -static int stringCompare2(const char *p1, const char *p2) -{ - return mir_strcmp(p1, p2); -} - -MDatabaseCommon::MDatabaseCommon() : - m_lResidentSettings(50, stringCompare2) -{ - m_codePage = Langpack_GetDefaultCodePage(); - m_cache = new MDatabaseCache(this); -} - -MDatabaseCommon::~MDatabaseCommon() -{ - if (m_crypto) - m_crypto->destroy(); - - UnlockName(); - delete (MDatabaseCache*)m_cache; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -int MDatabaseCommon::CheckProto(DBCachedContact *cc, const char *proto) -{ - if (cc->szProto == nullptr) { - char protobuf[MAX_PATH] = { 0 }; - DBVARIANT dbv; - dbv.type = DBVT_ASCIIZ; - dbv.pszVal = protobuf; - dbv.cchVal = sizeof(protobuf); - if (GetContactSettingStatic(cc->contactID, "Protocol", "p", &dbv) != 0 || (dbv.type != DBVT_ASCIIZ)) - return 0; - - cc->szProto = m_cache->GetCachedSetting(nullptr, protobuf, 0, mir_strlen(protobuf)); - } - - return !mir_strcmp(cc->szProto, proto); -} - -void MDatabaseCommon::FillContactSettings() -{ - for (DBCachedContact *cc = m_cache->GetFirstContact(); cc; cc = m_cache->GetNextContact(cc->contactID)) { - CheckProto(cc, ""); - - DBVARIANT dbv; dbv.type = DBVT_DWORD; - cc->nSubs = (0 != GetContactSetting(cc->contactID, META_PROTO, "NumContacts", &dbv)) ? -1 : dbv.dVal; - if (cc->nSubs != -1) { - cc->pSubs = (MCONTACT*)mir_alloc(cc->nSubs * sizeof(MCONTACT)); - for (int k = 0; k < cc->nSubs; k++) { - char setting[100]; - mir_snprintf(setting, _countof(setting), "Handle%d", k); - cc->pSubs[k] = (0 != GetContactSetting(cc->contactID, META_PROTO, setting, &dbv)) ? 0 : dbv.dVal; - } - } - cc->nDefault = (0 != GetContactSetting(cc->contactID, META_PROTO, "Default", &dbv)) ? -1 : dbv.dVal; - cc->parentID = (0 != GetContactSetting(cc->contactID, META_PROTO, "ParentMeta", &dbv)) ? 0 : dbv.dVal; - } -} - -bool MDatabaseCommon::LockName(const wchar_t *pwszProfileName) -{ - if (m_hLock != nullptr) - return true; - - if (pwszProfileName == nullptr) - return false; - - CMStringW wszPhysName(pwszProfileName); - wszPhysName.Replace(L"\\", L"_"); - wszPhysName.Insert(0, L"Global\\"); - - HANDLE hMutex = ::CreateMutexW(nullptr, false, wszPhysName); - if (hMutex == nullptr) - return false; - - if (GetLastError() == ERROR_ALREADY_EXISTS) { - ::CloseHandle(hMutex); - return false; - } - - m_hLock = hMutex; - return true; -} - -void MDatabaseCommon::UnlockName() -{ - if (m_hLock) { - CloseHandle(m_hLock); - m_hLock = nullptr; - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Modules - -static int sttEnumVars(const char *szVarName, void *param) -{ - LIST* vars = (LIST*)param; - vars->insert(mir_strdup(szVarName)); - return 0; -} - -BOOL MDatabaseCommon::DeleteModule(MCONTACT hContact, LPCSTR szModule) -{ - LIST vars(20); - EnumContactSettings(hContact, sttEnumVars, szModule, &vars); - - for (auto &it : vars.rev_iter()) { - DeleteContactSetting(hContact, szModule, it); - mir_free(it); - } - return 0; -} - -BOOL MDatabaseCommon::Compact(void) -{ - return ERROR_NOT_SUPPORTED; -} - -BOOL MDatabaseCommon::Backup(LPCWSTR) -{ - return ERROR_NOT_SUPPORTED; -} - -BOOL MDatabaseCommon::Flush(void) -{ - return ERROR_NOT_SUPPORTED; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Contacts - -STDMETHODIMP_(MCONTACT) MDatabaseCommon::FindFirstContact(const char *szProto) -{ - mir_cslock lck(m_csDbAccess); - DBCachedContact *cc = m_cache->GetFirstContact(); - if (cc == nullptr) - return 0; - - if (!szProto || CheckProto(cc, szProto)) - return cc->contactID; - - return FindNextContact(cc->contactID, szProto); -} - -STDMETHODIMP_(MCONTACT) MDatabaseCommon::FindNextContact(MCONTACT contactID, const char *szProto) -{ - mir_cslock lck(m_csDbAccess); - while (contactID) { - DBCachedContact *cc = m_cache->GetNextContact(contactID); - if (cc == nullptr) - break; - - if (!szProto || CheckProto(cc, szProto)) - return cc->contactID; - - contactID = cc->contactID; - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Meta-contacts support - -BOOL MDatabaseCommon::MetaDetouchSub(DBCachedContact *cc, int nSub) -{ - return DeleteModule(cc->pSubs[nSub], META_PROTO); -} - -BOOL MDatabaseCommon::MetaSetDefault(DBCachedContact *cc) -{ - DBVARIANT dbv; - dbv.type = DBVT_DWORD; - dbv.dVal = cc->nDefault; - return WriteContactSetting(cc->contactID, META_PROTO, "Default", &dbv); -} - -BOOL MDatabaseCommon::MetaRemoveSubHistory(DBCachedContact*) -{ - return 1; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Getting settings - -STDMETHODIMP_(BOOL) MDatabaseCommon::GetContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) -{ - dbv->type = 0; - if (GetContactSettingWorker(contactID, szModule, szSetting, dbv, 0)) - return 1; - - if (dbv->type == DBVT_UTF8) { - wchar_t *tmp = mir_utf8decodeW(dbv->pszVal); - if (tmp != nullptr) { - mir_free(dbv->pszVal); - dbv->type = DBVT_WCHAR; - dbv->pwszVal = tmp; - } - else { - dbv->type = DBVT_ASCIIZ; - mir_free(tmp); - } - } - - return 0; -} - -STDMETHODIMP_(BOOL) MDatabaseCommon::GetContactSettingStr(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) -{ - int iSaveType = dbv->type; - - if (GetContactSettingWorker(contactID, szModule, szSetting, dbv, 0)) - return 1; - - if (iSaveType == 0 || iSaveType == dbv->type) - return 0; - - if (dbv->type != DBVT_ASCIIZ && dbv->type != DBVT_UTF8) - return 1; - - if (iSaveType == DBVT_WCHAR) { - if (dbv->type != DBVT_UTF8) { - int len = MultiByteToWideChar(CP_ACP, 0, dbv->pszVal, -1, nullptr, 0); - wchar_t* wszResult = (wchar_t*)mir_alloc((len + 1) * sizeof(wchar_t)); - if (wszResult == nullptr) - return 1; - - MultiByteToWideChar(CP_ACP, 0, dbv->pszVal, -1, wszResult, len); - wszResult[len] = 0; - mir_free(dbv->pszVal); - dbv->pwszVal = wszResult; - } - else { - char* savePtr = NEWSTR_ALLOCA(dbv->pszVal); - mir_free(dbv->pszVal); - if (!mir_utf8decode(savePtr, &dbv->pwszVal)) - return 1; - } - } - else if (iSaveType == DBVT_UTF8) { - char* tmpBuf = mir_utf8encode(dbv->pszVal); - if (tmpBuf == nullptr) - return 1; - - mir_free(dbv->pszVal); - dbv->pszVal = tmpBuf; - } - else if (iSaveType == DBVT_ASCIIZ) - mir_utf8decode(dbv->pszVal, nullptr); - - dbv->type = iSaveType; - return 0; -} - -STDMETHODIMP_(BOOL) MDatabaseCommon::GetContactSettingStatic(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) -{ - bool bNeedsWchars; - size_t cbSaved = 0; - - if (dbv->type == DBVT_WCHAR) { // there's no wchar_t strings in a database, we need conversion - cbSaved = dbv->cchVal - 1; - dbv->cchVal *= sizeof(wchar_t); // extend a room for the utf8 string - dbv->type = DBVT_UTF8; - bNeedsWchars = true; - } - else bNeedsWchars = false; - - if (GetContactSettingWorker(contactID, szModule, szSetting, dbv, 1)) - return 1; - - if (bNeedsWchars) { - char *pBuf = NEWSTR_ALLOCA(dbv->pszVal); - int cbLen = Utf8toUcs2(pBuf, dbv->cchVal, dbv->pwszVal, cbSaved); - if (cbLen < 0) - return 1; - - dbv->pwszVal[cbLen] = 0; - } - else if (dbv->type == DBVT_UTF8) { - mir_utf8decode(dbv->pszVal, nullptr); - dbv->type = DBVT_ASCIIZ; - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static bool ValidLookupName(const char *szModule, const char *szSetting) -{ - if (!strcmp(szModule, META_PROTO)) - return strcmp(szSetting, "IsSubcontact") && strcmp(szSetting, "ParentMetaID"); - - return false; -} - -STDMETHODIMP_(int) MDatabaseCommon::GetContactSettingWorker(MCONTACT contactID, const char *szModule, const char *szSetting, DBVARIANT *dbv, int isStatic) -{ - if (szSetting == nullptr || szModule == nullptr) - return 1; - - DBVARIANT *pCachedValue; - size_t settingNameLen = strlen(szSetting); - size_t moduleNameLen = strlen(szModule); - { - mir_cslock lck(m_csDbAccess); - -LBL_Seek: - char *szCachedSettingName = m_cache->GetCachedSetting(szModule, szSetting, moduleNameLen, settingNameLen); - - pCachedValue = m_cache->GetCachedValuePtr(contactID, szCachedSettingName, 0); - if (pCachedValue == nullptr) { - // if nothing was faund, try to lookup the same setting from meta's default contact - if (contactID) { - DBCachedContact *cc = m_cache->GetCachedContact(contactID); - if (cc && cc->IsMeta() && ValidLookupName(szModule, szSetting)) { - if (contactID = db_mc_getDefault(contactID)) { - szModule = Proto_GetBaseAccountName(contactID); - if (szModule == nullptr) // smth went wrong - return 1; - - moduleNameLen = strlen(szModule); - goto LBL_Seek; - } - } - } - - // otherwise fail - return 1; - } - } - - switch(pCachedValue->type) { - case DBVT_ASCIIZ: - case DBVT_UTF8: - dbv->type = pCachedValue->type; - if (isStatic) { - int cbLen = (int)mir_strlen(pCachedValue->pszVal); - int cbOrigLen = dbv->cchVal; - cbOrigLen--; - if (cbLen < cbOrigLen) - cbOrigLen = cbLen; - memcpy(dbv->pszVal, pCachedValue->pszVal, cbOrigLen); - dbv->pszVal[cbOrigLen] = 0; - dbv->cchVal = cbLen; - } - else { - dbv->pszVal = (char *)mir_alloc(strlen(pCachedValue->pszVal) + 1); - strcpy(dbv->pszVal, pCachedValue->pszVal); - dbv->cchVal = pCachedValue->cchVal; - } - break; - - case DBVT_BLOB: - dbv->type = DBVT_BLOB; - if (isStatic) { - if (pCachedValue->cpbVal < dbv->cpbVal) - dbv->cpbVal = pCachedValue->cpbVal; - memcpy(dbv->pbVal, pCachedValue->pbVal, dbv->cpbVal); - } - else { - dbv->pbVal = (uint8_t *)mir_alloc(pCachedValue->cpbVal); - memcpy(dbv->pbVal, pCachedValue->pbVal, pCachedValue->cpbVal); - } - dbv->cpbVal = pCachedValue->cpbVal; - break; - - case DBVT_ENCRYPTED: - if (m_crypto != nullptr) { - size_t realLen; - ptrA decoded(m_crypto->decodeString(pCachedValue->pbVal, pCachedValue->cpbVal, &realLen)); - if (decoded == nullptr) - return 1; - - dbv->type = DBVT_UTF8; - if (isStatic) { - dbv->cchVal--; - if (realLen < dbv->cchVal) - dbv->cchVal = uint16_t(realLen); - memcpy(dbv->pszVal, decoded, dbv->cchVal); - dbv->pszVal[dbv->cchVal] = 0; - dbv->cchVal = uint16_t(realLen); - } - else { - dbv->pszVal = (char *)mir_alloc(1 + realLen); - memcpy(dbv->pszVal, decoded, realLen); - dbv->pszVal[realLen] = 0; - } - break; - } - return 1; - - default: - memcpy(dbv, pCachedValue, sizeof(DBVARIANT)); - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -STDMETHODIMP_(BOOL) MDatabaseCommon::FreeVariant(DBVARIANT *dbv) -{ - if (dbv == nullptr) return 1; - - switch (dbv->type) { - case DBVT_ASCIIZ: - case DBVT_UTF8: - case DBVT_WCHAR: - if (dbv->pszVal) mir_free(dbv->pszVal); - dbv->pszVal = nullptr; - break; - case DBVT_BLOB: - if (dbv->pbVal) mir_free(dbv->pbVal); - dbv->pbVal = nullptr; - break; - } - dbv->type = 0; - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -STDMETHODIMP_(BOOL) MDatabaseCommon::WriteContactSetting(MCONTACT contactID, const char *szModule, const char *szSetting, DBVARIANT *dbv) -{ - if (dbv == nullptr || szSetting == nullptr || szModule == nullptr) - return 1; - - // the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name - size_t settingNameLen = strlen(szSetting); - size_t moduleNameLen = strlen(szModule); - - // used for notifications - DBCONTACTWRITESETTING dbcwNotif = {szModule, szSetting, *dbv}; - if (dbcwNotif.value.type == DBVT_WCHAR) { - if (dbcwNotif.value.pszVal != nullptr) { - T2Utf val(dbcwNotif.value.pwszVal); - if (!val) - return 1; - - dbcwNotif.value.pszVal = NEWSTR_ALLOCA(val); - dbcwNotif.value.type = DBVT_UTF8; - } - else return 1; - } - - if (dbcwNotif.szModule == nullptr || dbcwNotif.szSetting == nullptr) - return 1; - - DBCONTACTWRITESETTING dbcwWork = dbcwNotif; - - mir_ptr pEncoded(nullptr); - bool bIsEncrypted = false; - switch (dbcwWork.value.type) { - case DBVT_BYTE: case DBVT_WORD: case DBVT_DWORD: - break; - - case DBVT_ASCIIZ: - case DBVT_UTF8: - bIsEncrypted = m_bEncrypted || IsSettingEncrypted(szModule, szSetting); - if (dbcwWork.value.pszVal == nullptr) - return 1; - - dbcwWork.value.cchVal = (uint16_t)strlen(dbcwWork.value.pszVal); - if (bIsEncrypted && m_crypto) { - size_t len; - uint8_t *pResult = m_crypto->encodeString(dbcwWork.value.pszVal, &len); - if (pResult != nullptr) { - pEncoded = dbcwWork.value.pbVal = pResult; - dbcwWork.value.cpbVal = (uint16_t)len; - dbcwWork.value.type = DBVT_ENCRYPTED; - } - } - break; - - case DBVT_BLOB: - case DBVT_ENCRYPTED: - if (dbcwWork.value.pbVal == nullptr) - return 1; - break; - - default: - return 1; - } - - mir_cslockfull lck(m_csDbAccess); - char *szCachedSettingName = m_cache->GetCachedSetting(dbcwWork.szModule, dbcwWork.szSetting, moduleNameLen, settingNameLen); - - DBVARIANT *pCachedValue = m_cache->GetCachedValuePtr(contactID, szCachedSettingName, 1); - if (pCachedValue != nullptr) { - bool bIsIdentical = false; - if (pCachedValue->type == dbcwWork.value.type) { - switch (dbcwWork.value.type) { - case DBVT_BYTE: bIsIdentical = pCachedValue->bVal == dbcwWork.value.bVal; break; - case DBVT_WORD: bIsIdentical = pCachedValue->wVal == dbcwWork.value.wVal; break; - case DBVT_DWORD: bIsIdentical = pCachedValue->dVal == dbcwWork.value.dVal; break; - case DBVT_UTF8: - case DBVT_ASCIIZ: bIsIdentical = strcmp(pCachedValue->pszVal, dbcwWork.value.pszVal) == 0; break; - case DBVT_BLOB: - case DBVT_ENCRYPTED: - if (pCachedValue->cpbVal == dbcwWork.value.cchVal) - bIsIdentical = memcmp(pCachedValue->pbVal, dbcwWork.value.pbVal, dbcwWork.value.cchVal); - break; - } - if (bIsIdentical) - return 0; - } - m_cache->SetCachedVariant(&dbcwWork.value, pCachedValue); - } - - // for non-resident settings we call a write worker - if (szCachedSettingName[-1] == 0) - if (WriteContactSettingWorker(contactID, dbcwWork)) - return 1; - - lck.unlock(); - NotifyEventHooks(g_hevSettingChanged, contactID, (LPARAM)&dbcwNotif); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Resident settings - -STDMETHODIMP_(BOOL) MDatabaseCommon::EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam) -{ - for (auto &it : m_lResidentSettings) { - int ret = pFunc(it, pParam); - if (ret) - return ret; - } - return 0; -} - -STDMETHODIMP_(BOOL) MDatabaseCommon::SetSettingResident(BOOL bIsResident, const char *pszSettingName) -{ - char *szSetting = m_cache->GetCachedSetting(nullptr, pszSettingName, 0, mir_strlen(pszSettingName)); - szSetting[-1] = (char)bIsResident; - - mir_cslock lck(m_csDbAccess); - int idx = m_lResidentSettings.getIndex(szSetting); - if (idx == -1) { - if (bIsResident) - m_lResidentSettings.insert(szSetting); - } - else if (!bIsResident) - m_lResidentSettings.remove(idx); - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -class MDefaultChecker : public MIDatabaseChecker -{ - STDMETHODIMP_(int) Start(DBCHeckCallback*) override - { return ERROR_SUCCESS; - } - - STDMETHODIMP_(BOOL) CheckDb(int /*phase*/) override - { return ERROR_OUT_OF_PAPER; - } - - STDMETHODIMP_(VOID) Destroy() override - {} -}; - -static MDefaultChecker sttDefaultChecker; - -STDMETHODIMP_(MIDatabaseChecker *) MDatabaseCommon::GetChecker() -{ - return &sttDefaultChecker; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Event cursors - -class CCompatiblityCursor : public DB::EventCursor -{ - MDatabaseCommon *db; - MEVENT curr; - -public: - CCompatiblityCursor(MDatabaseCommon *pDb, MCONTACT hContact, MEVENT hEvent) : - DB::EventCursor(hContact), - db(pDb) - { - curr = (hEvent == 0) ? db->FindFirstEvent(hContact) : db->FindNextEvent(hContact, hEvent); - } - - MEVENT FetchNext() override - { - if (curr == 0) - return 0; - - MEVENT ret = curr; curr = db->FindNextEvent(hContact, curr); - return ret; - } -}; - -STDMETHODIMP_(DB::EventCursor*) MDatabaseCommon::EventCursor(MCONTACT hContact, MEVENT hEvent) -{ - return new CCompatiblityCursor(this, hContact, hEvent); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -class CCompatiblityCursorRev : public DB::EventCursor -{ - MDatabaseCommon *db; - MEVENT curr; - -public: - CCompatiblityCursorRev(MDatabaseCommon *pDb, MCONTACT hContact, MEVENT hEvent) : - DB::EventCursor(hContact), - db(pDb) - { - curr = (hEvent == 0) ? db->FindLastEvent(hContact) : db->FindPrevEvent(hContact, hEvent); - } - - MEVENT FetchNext() override - { - if (curr == 0) - return 0; - - MEVENT ret = curr; curr = db->FindPrevEvent(hContact, curr); - return ret; - } -}; - -STDMETHODIMP_(DB::EventCursor*) MDatabaseCommon::EventCursorRev(MCONTACT hContact, MEVENT hEvent) -{ - return new CCompatiblityCursorRev(this, hContact, hEvent); -} +/* + +Miranda NG: the free IM client for Microsoft* Windows* + +Copyright (C) 2012-23 Miranda NG team, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "stdafx.h" +#include "database.h" + +static int stringCompare2(const char *p1, const char *p2) +{ + return mir_strcmp(p1, p2); +} + +MDatabaseCommon::MDatabaseCommon() : + m_lResidentSettings(50, stringCompare2) +{ + m_codePage = Langpack_GetDefaultCodePage(); + m_cache = new MDatabaseCache(this); +} + +MDatabaseCommon::~MDatabaseCommon() +{ + if (m_crypto) + m_crypto->destroy(); + + UnlockName(); + delete (MDatabaseCache*)m_cache; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +int MDatabaseCommon::CheckProto(DBCachedContact *cc, const char *proto) +{ + if (cc->szProto == nullptr) { + char protobuf[MAX_PATH] = { 0 }; + DBVARIANT dbv; + dbv.type = DBVT_ASCIIZ; + dbv.pszVal = protobuf; + dbv.cchVal = sizeof(protobuf); + if (GetContactSettingStatic(cc->contactID, "Protocol", "p", &dbv) != 0 || (dbv.type != DBVT_ASCIIZ)) + return 0; + + cc->szProto = m_cache->GetCachedSetting(nullptr, protobuf, 0, mir_strlen(protobuf)); + } + + return !mir_strcmp(cc->szProto, proto); +} + +void MDatabaseCommon::FillContactSettings() +{ + for (DBCachedContact *cc = m_cache->GetFirstContact(); cc; cc = m_cache->GetNextContact(cc->contactID)) { + CheckProto(cc, ""); + + DBVARIANT dbv; dbv.type = DBVT_DWORD; + cc->nSubs = (0 != GetContactSetting(cc->contactID, META_PROTO, "NumContacts", &dbv)) ? -1 : dbv.dVal; + if (cc->nSubs != -1) { + cc->pSubs = (MCONTACT*)mir_alloc(cc->nSubs * sizeof(MCONTACT)); + for (int k = 0; k < cc->nSubs; k++) { + char setting[100]; + mir_snprintf(setting, _countof(setting), "Handle%d", k); + cc->pSubs[k] = (0 != GetContactSetting(cc->contactID, META_PROTO, setting, &dbv)) ? 0 : dbv.dVal; + } + } + cc->nDefault = (0 != GetContactSetting(cc->contactID, META_PROTO, "Default", &dbv)) ? -1 : dbv.dVal; + cc->parentID = (0 != GetContactSetting(cc->contactID, META_PROTO, "ParentMeta", &dbv)) ? 0 : dbv.dVal; + } +} + +bool MDatabaseCommon::LockName(const wchar_t *pwszProfileName) +{ + if (m_hLock != nullptr) + return true; + + if (pwszProfileName == nullptr) + return false; + + CMStringW wszPhysName(pwszProfileName); + wszPhysName.Replace(L"\\", L"_"); + wszPhysName.Insert(0, L"Global\\"); + + HANDLE hMutex = ::CreateMutexW(nullptr, false, wszPhysName); + if (hMutex == nullptr) + return false; + + if (GetLastError() == ERROR_ALREADY_EXISTS) { + ::CloseHandle(hMutex); + return false; + } + + m_hLock = hMutex; + return true; +} + +void MDatabaseCommon::UnlockName() +{ + if (m_hLock) { + CloseHandle(m_hLock); + m_hLock = nullptr; + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Modules + +static int sttEnumVars(const char *szVarName, void *param) +{ + LIST* vars = (LIST*)param; + vars->insert(mir_strdup(szVarName)); + return 0; +} + +BOOL MDatabaseCommon::DeleteModule(MCONTACT hContact, LPCSTR szModule) +{ + LIST vars(20); + EnumContactSettings(hContact, sttEnumVars, szModule, &vars); + + for (auto &it : vars.rev_iter()) { + DeleteContactSetting(hContact, szModule, it); + mir_free(it); + } + return 0; +} + +BOOL MDatabaseCommon::Compact(void) +{ + return ERROR_NOT_SUPPORTED; +} + +BOOL MDatabaseCommon::Backup(LPCWSTR) +{ + return ERROR_NOT_SUPPORTED; +} + +BOOL MDatabaseCommon::Flush(void) +{ + return ERROR_NOT_SUPPORTED; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Contacts + +STDMETHODIMP_(MCONTACT) MDatabaseCommon::FindFirstContact(const char *szProto) +{ + mir_cslock lck(m_csDbAccess); + DBCachedContact *cc = m_cache->GetFirstContact(); + if (cc == nullptr) + return 0; + + if (!szProto || CheckProto(cc, szProto)) + return cc->contactID; + + return FindNextContact(cc->contactID, szProto); +} + +STDMETHODIMP_(MCONTACT) MDatabaseCommon::FindNextContact(MCONTACT contactID, const char *szProto) +{ + mir_cslock lck(m_csDbAccess); + while (contactID) { + DBCachedContact *cc = m_cache->GetNextContact(contactID); + if (cc == nullptr) + break; + + if (!szProto || CheckProto(cc, szProto)) + return cc->contactID; + + contactID = cc->contactID; + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Meta-contacts support + +BOOL MDatabaseCommon::MetaDetouchSub(DBCachedContact *cc, int nSub) +{ + return DeleteModule(cc->pSubs[nSub], META_PROTO); +} + +BOOL MDatabaseCommon::MetaSetDefault(DBCachedContact *cc) +{ + DBVARIANT dbv; + dbv.type = DBVT_DWORD; + dbv.dVal = cc->nDefault; + return WriteContactSetting(cc->contactID, META_PROTO, "Default", &dbv); +} + +BOOL MDatabaseCommon::MetaRemoveSubHistory(DBCachedContact*) +{ + return 1; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Getting settings + +STDMETHODIMP_(BOOL) MDatabaseCommon::GetContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) +{ + dbv->type = 0; + if (GetContactSettingWorker(contactID, szModule, szSetting, dbv, 0)) + return 1; + + if (dbv->type == DBVT_UTF8) { + wchar_t *tmp = mir_utf8decodeW(dbv->pszVal); + if (tmp != nullptr) { + mir_free(dbv->pszVal); + dbv->type = DBVT_WCHAR; + dbv->pwszVal = tmp; + } + else { + dbv->type = DBVT_ASCIIZ; + mir_free(tmp); + } + } + + return 0; +} + +STDMETHODIMP_(BOOL) MDatabaseCommon::GetContactSettingStr(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) +{ + int iSaveType = dbv->type; + + if (GetContactSettingWorker(contactID, szModule, szSetting, dbv, 0)) + return 1; + + if (iSaveType == 0 || iSaveType == dbv->type) + return 0; + + if (dbv->type != DBVT_ASCIIZ && dbv->type != DBVT_UTF8) + return 1; + + if (iSaveType == DBVT_WCHAR) { + if (dbv->type != DBVT_UTF8) { + int len = MultiByteToWideChar(CP_ACP, 0, dbv->pszVal, -1, nullptr, 0); + wchar_t* wszResult = (wchar_t*)mir_alloc((len + 1) * sizeof(wchar_t)); + if (wszResult == nullptr) + return 1; + + MultiByteToWideChar(CP_ACP, 0, dbv->pszVal, -1, wszResult, len); + wszResult[len] = 0; + mir_free(dbv->pszVal); + dbv->pwszVal = wszResult; + } + else { + char* savePtr = NEWSTR_ALLOCA(dbv->pszVal); + mir_free(dbv->pszVal); + if (!mir_utf8decode(savePtr, &dbv->pwszVal)) + return 1; + } + } + else if (iSaveType == DBVT_UTF8) { + char* tmpBuf = mir_utf8encode(dbv->pszVal); + if (tmpBuf == nullptr) + return 1; + + mir_free(dbv->pszVal); + dbv->pszVal = tmpBuf; + } + else if (iSaveType == DBVT_ASCIIZ) + mir_utf8decode(dbv->pszVal, nullptr); + + dbv->type = iSaveType; + return 0; +} + +STDMETHODIMP_(BOOL) MDatabaseCommon::GetContactSettingStatic(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) +{ + bool bNeedsWchars; + size_t cbSaved = 0; + + if (dbv->type == DBVT_WCHAR) { // there's no wchar_t strings in a database, we need conversion + cbSaved = dbv->cchVal - 1; + dbv->cchVal *= sizeof(wchar_t); // extend a room for the utf8 string + dbv->type = DBVT_UTF8; + bNeedsWchars = true; + } + else bNeedsWchars = false; + + if (GetContactSettingWorker(contactID, szModule, szSetting, dbv, 1)) + return 1; + + if (bNeedsWchars) { + char *pBuf = NEWSTR_ALLOCA(dbv->pszVal); + int cbLen = Utf8toUcs2(pBuf, dbv->cchVal, dbv->pwszVal, cbSaved); + if (cbLen < 0) + return 1; + + dbv->pwszVal[cbLen] = 0; + } + else if (dbv->type == DBVT_UTF8) { + mir_utf8decode(dbv->pszVal, nullptr); + dbv->type = DBVT_ASCIIZ; + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static bool ValidLookupName(const char *szModule, const char *szSetting) +{ + if (!strcmp(szModule, META_PROTO)) + return strcmp(szSetting, "IsSubcontact") && strcmp(szSetting, "ParentMetaID"); + + return false; +} + +STDMETHODIMP_(int) MDatabaseCommon::GetContactSettingWorker(MCONTACT contactID, const char *szModule, const char *szSetting, DBVARIANT *dbv, int isStatic) +{ + if (szSetting == nullptr || szModule == nullptr) + return 1; + + DBVARIANT *pCachedValue; + size_t settingNameLen = strlen(szSetting); + size_t moduleNameLen = strlen(szModule); + { + mir_cslock lck(m_csDbAccess); + +LBL_Seek: + char *szCachedSettingName = m_cache->GetCachedSetting(szModule, szSetting, moduleNameLen, settingNameLen); + + pCachedValue = m_cache->GetCachedValuePtr(contactID, szCachedSettingName, 0); + if (pCachedValue == nullptr) { + // if nothing was faund, try to lookup the same setting from meta's default contact + if (contactID) { + DBCachedContact *cc = m_cache->GetCachedContact(contactID); + if (cc && cc->IsMeta() && ValidLookupName(szModule, szSetting)) { + if (contactID = db_mc_getDefault(contactID)) { + szModule = Proto_GetBaseAccountName(contactID); + if (szModule == nullptr) // smth went wrong + return 1; + + moduleNameLen = strlen(szModule); + goto LBL_Seek; + } + } + } + + // otherwise fail + return 1; + } + } + + switch(pCachedValue->type) { + case DBVT_ASCIIZ: + case DBVT_UTF8: + dbv->type = pCachedValue->type; + if (isStatic) { + int cbLen = (int)mir_strlen(pCachedValue->pszVal); + int cbOrigLen = dbv->cchVal; + cbOrigLen--; + if (cbLen < cbOrigLen) + cbOrigLen = cbLen; + memcpy(dbv->pszVal, pCachedValue->pszVal, cbOrigLen); + dbv->pszVal[cbOrigLen] = 0; + dbv->cchVal = cbLen; + } + else { + dbv->pszVal = (char *)mir_alloc(strlen(pCachedValue->pszVal) + 1); + strcpy(dbv->pszVal, pCachedValue->pszVal); + dbv->cchVal = pCachedValue->cchVal; + } + break; + + case DBVT_BLOB: + dbv->type = DBVT_BLOB; + if (isStatic) { + if (pCachedValue->cpbVal < dbv->cpbVal) + dbv->cpbVal = pCachedValue->cpbVal; + memcpy(dbv->pbVal, pCachedValue->pbVal, dbv->cpbVal); + } + else { + dbv->pbVal = (uint8_t *)mir_alloc(pCachedValue->cpbVal); + memcpy(dbv->pbVal, pCachedValue->pbVal, pCachedValue->cpbVal); + } + dbv->cpbVal = pCachedValue->cpbVal; + break; + + case DBVT_ENCRYPTED: + if (m_crypto != nullptr) { + size_t realLen; + ptrA decoded(m_crypto->decodeString(pCachedValue->pbVal, pCachedValue->cpbVal, &realLen)); + if (decoded == nullptr) + return 1; + + dbv->type = DBVT_UTF8; + if (isStatic) { + dbv->cchVal--; + if (realLen < dbv->cchVal) + dbv->cchVal = uint16_t(realLen); + memcpy(dbv->pszVal, decoded, dbv->cchVal); + dbv->pszVal[dbv->cchVal] = 0; + dbv->cchVal = uint16_t(realLen); + } + else { + dbv->pszVal = (char *)mir_alloc(1 + realLen); + memcpy(dbv->pszVal, decoded, realLen); + dbv->pszVal[realLen] = 0; + } + break; + } + return 1; + + default: + memcpy(dbv, pCachedValue, sizeof(DBVARIANT)); + } + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +STDMETHODIMP_(BOOL) MDatabaseCommon::FreeVariant(DBVARIANT *dbv) +{ + if (dbv == nullptr) return 1; + + switch (dbv->type) { + case DBVT_ASCIIZ: + case DBVT_UTF8: + case DBVT_WCHAR: + if (dbv->pszVal) mir_free(dbv->pszVal); + dbv->pszVal = nullptr; + break; + case DBVT_BLOB: + if (dbv->pbVal) mir_free(dbv->pbVal); + dbv->pbVal = nullptr; + break; + } + dbv->type = 0; + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +STDMETHODIMP_(BOOL) MDatabaseCommon::WriteContactSetting(MCONTACT contactID, const char *szModule, const char *szSetting, DBVARIANT *dbv) +{ + if (dbv == nullptr || szSetting == nullptr || szModule == nullptr) + return 1; + + // the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name + size_t settingNameLen = strlen(szSetting); + size_t moduleNameLen = strlen(szModule); + + // used for notifications + DBCONTACTWRITESETTING dbcwNotif = {szModule, szSetting, *dbv}; + if (dbcwNotif.value.type == DBVT_WCHAR) { + if (dbcwNotif.value.pszVal != nullptr) { + T2Utf val(dbcwNotif.value.pwszVal); + if (!val) + return 1; + + dbcwNotif.value.pszVal = NEWSTR_ALLOCA(val); + dbcwNotif.value.type = DBVT_UTF8; + } + else return 1; + } + + if (dbcwNotif.szModule == nullptr || dbcwNotif.szSetting == nullptr) + return 1; + + DBCONTACTWRITESETTING dbcwWork = dbcwNotif; + + mir_ptr pEncoded(nullptr); + bool bIsEncrypted = false; + switch (dbcwWork.value.type) { + case DBVT_BYTE: case DBVT_WORD: case DBVT_DWORD: + break; + + case DBVT_ASCIIZ: + case DBVT_UTF8: + bIsEncrypted = m_bEncrypted || IsSettingEncrypted(szModule, szSetting); + if (dbcwWork.value.pszVal == nullptr) + return 1; + + dbcwWork.value.cchVal = (uint16_t)strlen(dbcwWork.value.pszVal); + if (bIsEncrypted && m_crypto) { + size_t len; + uint8_t *pResult = m_crypto->encodeString(dbcwWork.value.pszVal, &len); + if (pResult != nullptr) { + pEncoded = dbcwWork.value.pbVal = pResult; + dbcwWork.value.cpbVal = (uint16_t)len; + dbcwWork.value.type = DBVT_ENCRYPTED; + } + } + break; + + case DBVT_BLOB: + case DBVT_ENCRYPTED: + if (dbcwWork.value.pbVal == nullptr) + return 1; + break; + + default: + return 1; + } + + mir_cslockfull lck(m_csDbAccess); + char *szCachedSettingName = m_cache->GetCachedSetting(dbcwWork.szModule, dbcwWork.szSetting, moduleNameLen, settingNameLen); + + DBVARIANT *pCachedValue = m_cache->GetCachedValuePtr(contactID, szCachedSettingName, 1); + if (pCachedValue != nullptr) { + bool bIsIdentical = false; + if (pCachedValue->type == dbcwWork.value.type) { + switch (dbcwWork.value.type) { + case DBVT_BYTE: bIsIdentical = pCachedValue->bVal == dbcwWork.value.bVal; break; + case DBVT_WORD: bIsIdentical = pCachedValue->wVal == dbcwWork.value.wVal; break; + case DBVT_DWORD: bIsIdentical = pCachedValue->dVal == dbcwWork.value.dVal; break; + case DBVT_UTF8: + case DBVT_ASCIIZ: bIsIdentical = strcmp(pCachedValue->pszVal, dbcwWork.value.pszVal) == 0; break; + case DBVT_BLOB: + case DBVT_ENCRYPTED: + if (pCachedValue->cpbVal == dbcwWork.value.cchVal) + bIsIdentical = memcmp(pCachedValue->pbVal, dbcwWork.value.pbVal, dbcwWork.value.cchVal); + break; + } + if (bIsIdentical) + return 0; + } + m_cache->SetCachedVariant(&dbcwWork.value, pCachedValue); + } + + // for non-resident settings we call a write worker + if (szCachedSettingName[-1] == 0) + if (WriteContactSettingWorker(contactID, dbcwWork)) + return 1; + + lck.unlock(); + NotifyEventHooks(g_hevSettingChanged, contactID, (LPARAM)&dbcwNotif); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Resident settings + +STDMETHODIMP_(BOOL) MDatabaseCommon::EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam) +{ + for (auto &it : m_lResidentSettings) { + int ret = pFunc(it, pParam); + if (ret) + return ret; + } + return 0; +} + +STDMETHODIMP_(BOOL) MDatabaseCommon::SetSettingResident(BOOL bIsResident, const char *pszSettingName) +{ + char *szSetting = m_cache->GetCachedSetting(nullptr, pszSettingName, 0, mir_strlen(pszSettingName)); + szSetting[-1] = (char)bIsResident; + + mir_cslock lck(m_csDbAccess); + int idx = m_lResidentSettings.getIndex(szSetting); + if (idx == -1) { + if (bIsResident) + m_lResidentSettings.insert(szSetting); + } + else if (!bIsResident) + m_lResidentSettings.remove(idx); + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +class MDefaultChecker : public MIDatabaseChecker +{ + STDMETHODIMP_(int) Start(DBCHeckCallback*) override + { return ERROR_SUCCESS; + } + + STDMETHODIMP_(BOOL) CheckDb(int /*phase*/) override + { return ERROR_OUT_OF_PAPER; + } + + STDMETHODIMP_(VOID) Destroy() override + {} +}; + +static MDefaultChecker sttDefaultChecker; + +STDMETHODIMP_(MIDatabaseChecker *) MDatabaseCommon::GetChecker() +{ + return &sttDefaultChecker; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Event cursors + +class CCompatiblityCursor : public DB::EventCursor +{ + MDatabaseCommon *db; + MEVENT curr; + +public: + CCompatiblityCursor(MDatabaseCommon *pDb, MCONTACT hContact, MEVENT hEvent) : + DB::EventCursor(hContact), + db(pDb) + { + curr = (hEvent == 0) ? db->FindFirstEvent(hContact) : db->FindNextEvent(hContact, hEvent); + } + + MEVENT FetchNext() override + { + if (curr == 0) + return 0; + + MEVENT ret = curr; curr = db->FindNextEvent(hContact, curr); + return ret; + } +}; + +STDMETHODIMP_(DB::EventCursor*) MDatabaseCommon::EventCursor(MCONTACT hContact, MEVENT hEvent) +{ + return new CCompatiblityCursor(this, hContact, hEvent); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +class CCompatiblityCursorRev : public DB::EventCursor +{ + MDatabaseCommon *db; + MEVENT curr; + +public: + CCompatiblityCursorRev(MDatabaseCommon *pDb, MCONTACT hContact, MEVENT hEvent) : + DB::EventCursor(hContact), + db(pDb) + { + curr = (hEvent == 0) ? db->FindLastEvent(hContact) : db->FindPrevEvent(hContact, hEvent); + } + + MEVENT FetchNext() override + { + if (curr == 0) + return 0; + + MEVENT ret = curr; curr = db->FindPrevEvent(hContact, curr); + return ret; + } +}; + +STDMETHODIMP_(DB::EventCursor*) MDatabaseCommon::EventCursorRev(MCONTACT hContact, MEVENT hEvent) +{ + return new CCompatiblityCursorRev(this, hContact, hEvent); +} diff --git a/src/mir_core/src/Windows/CCtrlTreeOpts.cpp b/src/mir_core/src/Windows/CCtrlTreeOpts.cpp index 7935283285..0366201369 100644 --- a/src/mir_core/src/Windows/CCtrlTreeOpts.cpp +++ b/src/mir_core/src/Windows/CCtrlTreeOpts.cpp @@ -1,209 +1,209 @@ -/* - -Object UI extensions -Copyright (c) 2008 Victor Pavlychko, George Hazan -Copyright (C) 2012-23 Miranda NG team - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../stdafx.h" - -enum { IMG_SHIT, IMG_GRPOPEN, IMG_GRPCLOSED }; - -CCtrlTreeOpts::CCtrlTreeOpts(CDlgBase* dlg, int ctrlId): - CCtrlTreeView(dlg, ctrlId), - m_options(5) -{ - m_bCheckBox = true; -} - -CCtrlTreeOpts::~CCtrlTreeOpts() -{ -} - -void CCtrlTreeOpts::AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, CMOption &option) -{ - auto *p = new COptionsItem(pwszSection, pwszName, COptionsItem::CMOPTION); - p->m_option = &option; - m_options.insert(p, m_options.getCount()); -} - -void CCtrlTreeOpts::AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, bool &option) -{ - auto *p = new COptionsItem(pwszSection, pwszName, COptionsItem::BOOL); - p->m_pBool = &option; - m_options.insert(p, m_options.getCount()); -} - -void CCtrlTreeOpts::AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, uint32_t &option, uint32_t mask) -{ - auto *p = new COptionsItem(pwszSection, pwszName, COptionsItem::MASK); - p->m_pDword = &option; - p->m_mask = mask; - m_options.insert(p, m_options.getCount()); -} - -BOOL CCtrlTreeOpts::OnNotify(int idCtrl, NMHDR *pnmh) -{ - switch (pnmh->code) { - case TVN_KEYDOWN: - { - LPNMTVKEYDOWN lpnmtvkd = (LPNMTVKEYDOWN)pnmh; - HTREEITEM hti; - if ((lpnmtvkd->wVKey == VK_SPACE) && (hti = GetSelection())) - ProcessItemClick(hti); - } - break; - - case NM_CLICK: - TVHITTESTINFO htti; - htti.pt.x = (short)LOWORD(GetMessagePos()); - htti.pt.y = (short)HIWORD(GetMessagePos()); - ScreenToClient(pnmh->hwndFrom, &htti.pt); - if (HitTest(&htti)) - if (htti.flags & TVHT_ONITEMICON) - ProcessItemClick(htti.hItem); - break; - - case TVN_ITEMEXPANDED: - LPNMTREEVIEW lpnmtv = (LPNMTREEVIEW)pnmh; - TVITEM tvi; - tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; - tvi.hItem = lpnmtv->itemNew.hItem; - tvi.iImage = tvi.iSelectedImage = (lpnmtv->itemNew.state & TVIS_EXPANDED) ? IMG_GRPOPEN : IMG_GRPCLOSED; - SendMessage(pnmh->hwndFrom, TVM_SETITEM, 0, (LPARAM)&tvi); - break; - } - - return CSuper::OnNotify(idCtrl, pnmh); -} - -void CCtrlTreeOpts::OnInit() -{ - CSuper::OnInit(); - - SelectItem(nullptr); - DeleteAllItems(); - - HIMAGELIST hImgLst = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR | ILC_COLOR32 | ILC_MASK, 5, 1); - ImageList_AddSkinIcon(hImgLst, SKINICON_OTHER_BLANK); - ImageList_AddSkinIcon(hImgLst, SKINICON_OTHER_GROUPOPEN); - ImageList_AddSkinIcon(hImgLst, SKINICON_OTHER_GROUPSHUT); - SetImageList(hImgLst, TVSIL_NORMAL); - - /* build options tree. based on code from IcoLib */ - for (auto &it : m_options) { - if (it->m_pwszSection) { - HTREEITEM hSection = FindNamedItem(nullptr, it->m_pwszSection); - if (!hSection) { - TVINSERTSTRUCT tvis = {}; - tvis.hParent = hSection; - tvis.hInsertAfter = TVI_LAST; - tvis.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; - tvis.item.pszText = (LPWSTR)it->m_pwszSection; - tvis.item.state = TVIS_EXPANDED | TVIS_BOLD | INDEXTOSTATEIMAGEMASK(3); - tvis.item.stateMask = TVIS_EXPANDED | TVIS_BOLD | TVIS_STATEIMAGEMASK; - tvis.item.iImage = tvis.item.iSelectedImage = IMG_GRPOPEN; - hSection = InsertItem(&tvis); - } - - bool bValue; - switch (it->m_type) { - case COptionsItem::CMOPTION: - bValue = *it->m_option; - break; - case COptionsItem::BOOL: - bValue = *it->m_pBool; - break; - case COptionsItem::MASK: - bValue = (*it->m_pDword & it->m_mask) != 0; - break; - default: - continue; - } - - TVINSERTSTRUCT tvis = {}; - tvis.hParent = hSection; - tvis.hInsertAfter = TVI_LAST; - tvis.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_STATE | TVIF_IMAGE; - tvis.item.pszText = (LPWSTR)it->m_pwszName; - tvis.item.lParam = m_options.indexOf(&it); - tvis.item.iImage = -1; - tvis.item.state = INDEXTOSTATEIMAGEMASK(bValue ? 2 : 1); - tvis.item.stateMask = TVIS_STATEIMAGEMASK; - it->m_hItem = InsertItem(&tvis); - } - } - - TranslateTree(); - ShowWindow(m_hwnd, SW_SHOW); - SelectItem(FindNamedItem(nullptr, nullptr)); -} - -void CCtrlTreeOpts::OnDestroy() -{ - ImageList_Destroy(GetImageList(TVSIL_NORMAL)); -} - -bool CCtrlTreeOpts::OnApply() -{ - CSuper::OnApply(); - - for (auto &it : m_options) { - TVITEMEX tvi; - tvi.mask = TVIF_STATE; - GetItem(it->m_hItem, &tvi); - - bool bValue = (tvi.state >> 12) == 2; - switch (it->m_type) { - case COptionsItem::CMOPTION: - *it->m_option = bValue; - break; - case COptionsItem::BOOL: - *it->m_pBool = bValue; - break; - case COptionsItem::MASK: - if (bValue) - *it->m_pDword |= it->m_mask; - else - *it->m_pDword &= ~it->m_mask; - break; - } - } - return true; -} - -void CCtrlTreeOpts::ProcessItemClick(HTREEITEM hti) -{ - TVITEMEX tvi; - tvi.mask = TVIF_IMAGE; - GetItem(hti, &tvi); - switch (tvi.iImage) { - case IMG_GRPOPEN: - tvi.iImage = tvi.iSelectedImage = IMG_GRPCLOSED; - Expand(tvi.hItem, TVE_COLLAPSE); - break; - - case IMG_GRPCLOSED: - tvi.iImage = tvi.iSelectedImage = IMG_GRPOPEN; - Expand(tvi.hItem, TVE_EXPAND); - break; - - } - - SetItem(&tvi); -} +/* + +Object UI extensions +Copyright (c) 2008 Victor Pavlychko, George Hazan +Copyright (C) 2012-23 Miranda NG team + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#include "../stdafx.h" + +enum { IMG_SHIT, IMG_GRPOPEN, IMG_GRPCLOSED }; + +CCtrlTreeOpts::CCtrlTreeOpts(CDlgBase* dlg, int ctrlId): + CCtrlTreeView(dlg, ctrlId), + m_options(5) +{ + m_bCheckBox = true; +} + +CCtrlTreeOpts::~CCtrlTreeOpts() +{ +} + +void CCtrlTreeOpts::AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, CMOption &option) +{ + auto *p = new COptionsItem(pwszSection, pwszName, COptionsItem::CMOPTION); + p->m_option = &option; + m_options.insert(p, m_options.getCount()); +} + +void CCtrlTreeOpts::AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, bool &option) +{ + auto *p = new COptionsItem(pwszSection, pwszName, COptionsItem::BOOL); + p->m_pBool = &option; + m_options.insert(p, m_options.getCount()); +} + +void CCtrlTreeOpts::AddOption(const wchar_t *pwszSection, const wchar_t *pwszName, uint32_t &option, uint32_t mask) +{ + auto *p = new COptionsItem(pwszSection, pwszName, COptionsItem::MASK); + p->m_pDword = &option; + p->m_mask = mask; + m_options.insert(p, m_options.getCount()); +} + +BOOL CCtrlTreeOpts::OnNotify(int idCtrl, NMHDR *pnmh) +{ + switch (pnmh->code) { + case TVN_KEYDOWN: + { + LPNMTVKEYDOWN lpnmtvkd = (LPNMTVKEYDOWN)pnmh; + HTREEITEM hti; + if ((lpnmtvkd->wVKey == VK_SPACE) && (hti = GetSelection())) + ProcessItemClick(hti); + } + break; + + case NM_CLICK: + TVHITTESTINFO htti; + htti.pt.x = (short)LOWORD(GetMessagePos()); + htti.pt.y = (short)HIWORD(GetMessagePos()); + ScreenToClient(pnmh->hwndFrom, &htti.pt); + if (HitTest(&htti)) + if (htti.flags & TVHT_ONITEMICON) + ProcessItemClick(htti.hItem); + break; + + case TVN_ITEMEXPANDED: + LPNMTREEVIEW lpnmtv = (LPNMTREEVIEW)pnmh; + TVITEM tvi; + tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + tvi.hItem = lpnmtv->itemNew.hItem; + tvi.iImage = tvi.iSelectedImage = (lpnmtv->itemNew.state & TVIS_EXPANDED) ? IMG_GRPOPEN : IMG_GRPCLOSED; + SendMessage(pnmh->hwndFrom, TVM_SETITEM, 0, (LPARAM)&tvi); + break; + } + + return CSuper::OnNotify(idCtrl, pnmh); +} + +void CCtrlTreeOpts::OnInit() +{ + CSuper::OnInit(); + + SelectItem(nullptr); + DeleteAllItems(); + + HIMAGELIST hImgLst = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR | ILC_COLOR32 | ILC_MASK, 5, 1); + ImageList_AddSkinIcon(hImgLst, SKINICON_OTHER_BLANK); + ImageList_AddSkinIcon(hImgLst, SKINICON_OTHER_GROUPOPEN); + ImageList_AddSkinIcon(hImgLst, SKINICON_OTHER_GROUPSHUT); + SetImageList(hImgLst, TVSIL_NORMAL); + + /* build options tree. based on code from IcoLib */ + for (auto &it : m_options) { + if (it->m_pwszSection) { + HTREEITEM hSection = FindNamedItem(nullptr, it->m_pwszSection); + if (!hSection) { + TVINSERTSTRUCT tvis = {}; + tvis.hParent = hSection; + tvis.hInsertAfter = TVI_LAST; + tvis.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + tvis.item.pszText = (LPWSTR)it->m_pwszSection; + tvis.item.state = TVIS_EXPANDED | TVIS_BOLD | INDEXTOSTATEIMAGEMASK(3); + tvis.item.stateMask = TVIS_EXPANDED | TVIS_BOLD | TVIS_STATEIMAGEMASK; + tvis.item.iImage = tvis.item.iSelectedImage = IMG_GRPOPEN; + hSection = InsertItem(&tvis); + } + + bool bValue; + switch (it->m_type) { + case COptionsItem::CMOPTION: + bValue = *it->m_option; + break; + case COptionsItem::BOOL: + bValue = *it->m_pBool; + break; + case COptionsItem::MASK: + bValue = (*it->m_pDword & it->m_mask) != 0; + break; + default: + continue; + } + + TVINSERTSTRUCT tvis = {}; + tvis.hParent = hSection; + tvis.hInsertAfter = TVI_LAST; + tvis.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_STATE | TVIF_IMAGE; + tvis.item.pszText = (LPWSTR)it->m_pwszName; + tvis.item.lParam = m_options.indexOf(&it); + tvis.item.iImage = -1; + tvis.item.state = INDEXTOSTATEIMAGEMASK(bValue ? 2 : 1); + tvis.item.stateMask = TVIS_STATEIMAGEMASK; + it->m_hItem = InsertItem(&tvis); + } + } + + TranslateTree(); + ShowWindow(m_hwnd, SW_SHOW); + SelectItem(FindNamedItem(nullptr, nullptr)); +} + +void CCtrlTreeOpts::OnDestroy() +{ + ImageList_Destroy(GetImageList(TVSIL_NORMAL)); +} + +bool CCtrlTreeOpts::OnApply() +{ + CSuper::OnApply(); + + for (auto &it : m_options) { + TVITEMEX tvi; + tvi.mask = TVIF_STATE; + GetItem(it->m_hItem, &tvi); + + bool bValue = (tvi.state >> 12) == 2; + switch (it->m_type) { + case COptionsItem::CMOPTION: + *it->m_option = bValue; + break; + case COptionsItem::BOOL: + *it->m_pBool = bValue; + break; + case COptionsItem::MASK: + if (bValue) + *it->m_pDword |= it->m_mask; + else + *it->m_pDword &= ~it->m_mask; + break; + } + } + return true; +} + +void CCtrlTreeOpts::ProcessItemClick(HTREEITEM hti) +{ + TVITEMEX tvi; + tvi.mask = TVIF_IMAGE; + GetItem(hti, &tvi); + switch (tvi.iImage) { + case IMG_GRPOPEN: + tvi.iImage = tvi.iSelectedImage = IMG_GRPCLOSED; + Expand(tvi.hItem, TVE_COLLAPSE); + break; + + case IMG_GRPCLOSED: + tvi.iImage = tvi.iSelectedImage = IMG_GRPOPEN; + Expand(tvi.hItem, TVE_EXPAND); + break; + + } + + SetItem(&tvi); +} diff --git a/src/mir_core/src/Windows/CCtrlTreeView.cpp b/src/mir_core/src/Windows/CCtrlTreeView.cpp index 178b6b730e..92ad166f91 100644 --- a/src/mir_core/src/Windows/CCtrlTreeView.cpp +++ b/src/mir_core/src/Windows/CCtrlTreeView.cpp @@ -1,800 +1,800 @@ -/* - -Object UI extensions -Copyright (c) 2008 Victor Pavlychko, George Hazan -Copyright (C) 2012-23 Miranda NG team - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../stdafx.h" - -int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, int iconId) -{ - HICON hIcon = Skin_LoadIcon(iconId); - int res = ImageList_AddIcon(hIml, hIcon); - IcoLib_ReleaseIcon(hIcon); - return res; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// CCtrlTreeView - -CCtrlTreeView::CCtrlTreeView(CDlgBase *dlg, int ctrlId) : - CCtrlBase(dlg, ctrlId), - m_dwFlags(0), - m_hDragItem(nullptr) -{} - -void CCtrlTreeView::SetFlags(uint32_t dwFlags) -{ - if (dwFlags & MTREE_CHECKBOX) - m_bCheckBox = true; - - if (dwFlags & MTREE_MULTISELECT) - m_bMultiSelect = true; - - if (dwFlags & MTREE_DND) { - m_bDndEnabled = true; - m_bDragging = false; - m_hDragItem = nullptr; - } -} - -void CCtrlTreeView::OnInit() -{ - CSuper::OnInit(); - - Subclass(); - - if (m_bCheckBox) - SetWindowLongW(m_hwnd, GWL_STYLE, TVS_CHECKBOXES | GetWindowLongW(m_hwnd, GWL_STYLE)); -} - -HTREEITEM CCtrlTreeView::MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter, HTREEITEM hParent) -{ - if (hItem == nullptr || hInsertAfter == nullptr) - return nullptr; - - if (hItem == hInsertAfter) - return hItem; - - wchar_t name[128]; - TVINSERTSTRUCT tvis = {}; - tvis.itemex.mask = (UINT)-1; - tvis.itemex.pszText = name; - tvis.itemex.cchTextMax = _countof(name); - tvis.itemex.hItem = hItem; - if (!GetItem(&tvis.itemex)) - return nullptr; - - OBJLIST arChildren(1); - for (HTREEITEM p = GetChild(hItem); p; p = GetNextSibling(p)) { - wchar_t buf[128]; - TVINSERTSTRUCT tvis2 = {}; - tvis2.itemex.mask = (UINT)-1; - tvis2.itemex.pszText = buf; - tvis2.itemex.cchTextMax = _countof(buf); - tvis2.itemex.hItem = p; - if (GetItem(&tvis2.itemex)) { - tvis2.itemex.pszText = mir_wstrdup(tvis2.itemex.pszText); - arChildren.insert(new TVINSERTSTRUCT(tvis2)); - - tvis2.itemex.lParam = 0; - SetItem(&tvis2.itemex); - } - } - - // the pointed lParam will be freed inside TVN_DELETEITEM - // so lets substitute it with 0 - LPARAM saveOldData = tvis.itemex.lParam; - tvis.itemex.lParam = 0; - SetItem(&tvis.itemex); - - // now current item contain lParam = 0 we can delete it. the memory will be kept. - DeleteItem(hItem); - - for (auto &it : arChildren) - DeleteItem(it->itemex.hItem); - - tvis.itemex.stateMask = tvis.itemex.state; - tvis.itemex.lParam = saveOldData; - tvis.hParent = hParent; - tvis.hInsertAfter = hInsertAfter; - auto hNewItem = InsertItem(&tvis); - - hInsertAfter = nullptr; - for (auto &it : arChildren) { - it->hParent = hNewItem; - it->hInsertAfter = hInsertAfter; - hInsertAfter = InsertItem(it); - - mir_free(it->itemex.pszText); - } - - return hNewItem; -} - -LRESULT CCtrlTreeView::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) -{ - TVHITTESTINFO hti; - - switch (msg) { - case WM_MOUSEMOVE: - if (m_bDragging) { - hti.pt.x = (short)LOWORD(lParam); - hti.pt.y = (short)HIWORD(lParam); - HitTest(&hti); - if (hti.flags & (TVHT_ONITEM | TVHT_ONITEMRIGHT)) { - HTREEITEM it = hti.hItem; - hti.pt.y -= GetItemHeight() / 2; - HitTest(&hti); - if (!(hti.flags & TVHT_ABOVE)) - SetInsertMark(hti.hItem, 1); - else - SetInsertMark(it, 0); - } - else { - if (hti.flags & TVHT_ABOVE) SendMsg(WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0); - if (hti.flags & TVHT_BELOW) SendMsg(WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0); - SetInsertMark(nullptr, 0); - } - } - break; - - case WM_LBUTTONUP: - if (m_bDragging) { - SetInsertMark(nullptr, 0); - m_bDragging = false; - ReleaseCapture(); - - hti.pt.x = (short)LOWORD(lParam); - hti.pt.y = (short)HIWORD(lParam) - GetItemHeight() / 2; - HitTest(&hti); - if (m_hDragItem == hti.hItem) - break; - - if (hti.flags & TVHT_ABOVE) - hti.hItem = TVI_FIRST; - else if (hti.flags & TVHT_BELOW) - hti.hItem = TVI_LAST; - - HTREEITEM insertAfter = hti.hItem, hParent; - if (insertAfter != TVI_FIRST) { - hParent = GetParent(insertAfter); - if (GetChild(insertAfter) != nullptr) { - hParent = insertAfter; - insertAfter = TVI_FIRST; - } - } - else hParent = nullptr; - - HTREEITEM FirstItem = nullptr; - if (m_bMultiSelect) { - LIST<_TREEITEM> arItems(10); - GetSelected(arItems); - - // Proceed moving - for (auto &it : arItems) { - if (!insertAfter) - break; - if (GetParent(it) != hParent) // prevent subitems from being inserted at the same level - continue; - - insertAfter = MoveItemAbove(it, insertAfter, hParent); - if (it == arItems[0]) - FirstItem = insertAfter; - } - } - else FirstItem = MoveItemAbove(m_hDragItem, insertAfter, hParent); - if (FirstItem) - SelectItem(FirstItem); - - NotifyChange(); - } - break; - - case WM_LBUTTONDOWN: - if (!m_bMultiSelect) - break; - - hti.pt.x = (short)LOWORD(lParam); - hti.pt.y = (short)HIWORD(lParam); - if (!TreeView_HitTest(m_hwnd, &hti)) { - UnselectAll(); - break; - } - - if (!m_bDndEnabled) - if (!(wParam & (MK_CONTROL | MK_SHIFT)) || !(hti.flags & (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMRIGHT))) { - UnselectAll(); - TreeView_SelectItem(m_hwnd, hti.hItem); - break; - } - - if (wParam & MK_CONTROL) { - LIST<_TREEITEM> selected(1); - GetSelected(selected); - - // Check if have to deselect it - for (int i = 0; i < selected.getCount(); i++) { - if (selected[i] == hti.hItem) { - // Deselect it - UnselectAll(); - selected.remove(i); - - if (i > 0) - hti.hItem = selected[0]; - else if (i < selected.getCount()) - hti.hItem = selected[i]; - else - hti.hItem = nullptr; - break; - } - } - - TreeView_SelectItem(m_hwnd, hti.hItem); - Select(selected); - } - else if (wParam & MK_SHIFT) { - HTREEITEM hItem = TreeView_GetSelection(m_hwnd); - if (hItem == nullptr) - break; - - LIST<_TREEITEM> selected(1); - GetSelected(selected); - - TreeView_SelectItem(m_hwnd, hti.hItem); - Select(selected); - SelectRange(hItem, hti.hItem); - } - break; - } - - return CSuper::CustomWndProc(msg, wParam, lParam); -} - -BOOL CCtrlTreeView::OnNotify(int, NMHDR *pnmh) -{ - TEventInfo evt = { this, pnmh }; - - switch (pnmh->code) { - case NM_RCLICK: OnRightClick(&evt); return TRUE; - case NM_CUSTOMDRAW: OnCustomDraw(&evt); return TRUE; - case TVN_BEGINLABELEDIT: OnBeginLabelEdit(&evt); return TRUE; - case TVN_BEGINRDRAG: OnBeginRDrag(&evt); return TRUE; - case TVN_DELETEITEM: OnDeleteItem(&evt); return TRUE; - case TVN_ENDLABELEDIT: OnEndLabelEdit(&evt); return TRUE; - case TVN_GETDISPINFO: OnGetDispInfo(&evt); return TRUE; - case TVN_GETINFOTIP: OnGetInfoTip(&evt); return TRUE; - case TVN_ITEMEXPANDED: OnItemExpanded(&evt); return TRUE; - case TVN_ITEMEXPANDING: OnItemExpanding(&evt); return TRUE; - case TVN_SELCHANGED: OnSelChanged(&evt); return TRUE; - case TVN_SELCHANGING: OnSelChanging(&evt); return TRUE; - case TVN_SETDISPINFO: OnSetDispInfo(&evt); return TRUE; - case TVN_SINGLEEXPAND: OnSingleExpand(&evt); return TRUE; - - case TVN_BEGINDRAG: - OnBeginDrag(&evt); - - // user-defined can clear the event code to disable dragging - if (m_bDndEnabled && pnmh->code) { - ::SetCapture(m_hwnd); - m_bDragging = true; - m_hDragItem = evt.nmtv->itemNew.hItem; - SelectItem(m_hDragItem); - } - return TRUE; - - case TVN_KEYDOWN: - if (evt.nmtvkey->wVKey == VK_SPACE) { - evt.hItem = GetSelection(); - OnItemChanged(&evt); - NotifyChange(); - } - - OnKeyDown(&evt); - return TRUE; - } - - if (pnmh->code == NM_CLICK) { - TVHITTESTINFO hti; - hti.pt.x = (short)LOWORD(GetMessagePos()); - hti.pt.y = (short)HIWORD(GetMessagePos()); - ScreenToClient(pnmh->hwndFrom, &hti.pt); - if (HitTest(&hti)) { - if (hti.flags & TVHT_ONITEMSTATEICON) { - SelectItem(hti.hItem); - - evt.hItem = hti.hItem; - OnItemChanged(&evt); - NotifyChange(); - } - } - } - - return FALSE; -} - -void CCtrlTreeView::InvertCheck(HTREEITEM hItem) -{ - TVITEMEX tvi; - tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM | TVIF_STATEEX; - tvi.hItem = hItem; - if (!GetItem(&tvi)) - return; - - if (IsWinVerVistaPlus() && (tvi.uStateEx & TVIS_EX_DISABLED)) - return; - - tvi.iImage = tvi.iSelectedImage = !tvi.iImage; - SetItem(&tvi); - - SelectItem(hItem); -} - -void CCtrlTreeView::TranslateItem(HTREEITEM hItem) -{ - TVITEMEX tvi; - wchar_t buf[128]; - GetItem(hItem, &tvi, buf, _countof(buf)); - tvi.pszText = TranslateW_LP(tvi.pszText); - SetItem(&tvi); -} - -void CCtrlTreeView::TranslateTree() -{ - HTREEITEM hItem = GetRoot(); - while (hItem) { - TranslateItem(hItem); - - HTREEITEM hItemTmp = nullptr; - if (hItemTmp = GetChild(hItem)) - hItem = hItemTmp; - else if (hItemTmp = GetNextSibling(hItem)) - hItem = hItemTmp; - else { - while (true) { - if (!(hItem = GetParent(hItem))) - break; - if (hItemTmp = GetNextSibling(hItem)) { - hItem = hItemTmp; - break; - } - } - } - } -} - -HTREEITEM CCtrlTreeView::FindNamedItem(HTREEITEM hItem, const wchar_t *name) -{ - TVITEMEX tvi = { 0 }; - wchar_t str[MAX_PATH]; - - if (hItem) - tvi.hItem = GetChild(hItem); - else - tvi.hItem = GetRoot(); - - if (!name) - return tvi.hItem; - - tvi.mask = TVIF_TEXT; - tvi.pszText = str; - tvi.cchTextMax = _countof(str); - - while (tvi.hItem) { - GetItem(&tvi); - - if (!mir_wstrcmp(tvi.pszText, name)) - return tvi.hItem; - - tvi.hItem = GetNextSibling(tvi.hItem); - } - return nullptr; -} - -void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi) const -{ - memset(tvi, 0, sizeof(*tvi)); - tvi->mask = TVIF_CHILDREN | TVIF_HANDLE | TVIF_IMAGE | TVIF_INTEGRAL | TVIF_PARAM | TVIF_SELECTEDIMAGE | TVIF_STATE; - tvi->hItem = hItem; - GetItem(tvi); -} - -void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi, wchar_t *szText, int iTextLength) const -{ - memset(tvi, 0, sizeof(*tvi)); - tvi->mask = TVIF_CHILDREN | TVIF_HANDLE | TVIF_IMAGE | TVIF_INTEGRAL | TVIF_PARAM | TVIF_SELECTEDIMAGE | TVIF_STATE | TVIF_TEXT; - tvi->hItem = hItem; - tvi->pszText = szText; - tvi->cchTextMax = iTextLength; - GetItem(tvi); -} - -bool CCtrlTreeView::IsSelected(HTREEITEM hItem) -{ - return (TVIS_SELECTED & TreeView_GetItemState(m_hwnd, hItem, TVIS_SELECTED)) == TVIS_SELECTED; -} - -void CCtrlTreeView::Select(HTREEITEM hItem) -{ - TreeView_SetItemState(m_hwnd, hItem, TVIS_SELECTED, TVIS_SELECTED); -} - -void CCtrlTreeView::Unselect(HTREEITEM hItem) -{ - TreeView_SetItemState(m_hwnd, hItem, 0, TVIS_SELECTED); -} - -void CCtrlTreeView::DropHilite(HTREEITEM hItem) -{ - TreeView_SetItemState(m_hwnd, hItem, TVIS_DROPHILITED, TVIS_DROPHILITED); -} - -void CCtrlTreeView::DropUnhilite(HTREEITEM hItem) -{ - TreeView_SetItemState(m_hwnd, hItem, 0, TVIS_DROPHILITED); -} - -void CCtrlTreeView::SelectAll() -{ - TreeView_SelectItem(m_hwnd, nullptr); - - HTREEITEM hItem = TreeView_GetRoot(m_hwnd); - while (hItem) { - Select(hItem); - hItem = TreeView_GetNextSibling(m_hwnd, hItem); - } -} - -void CCtrlTreeView::UnselectAll() -{ - TreeView_SelectItem(m_hwnd, nullptr); - - HTREEITEM hItem = TreeView_GetRoot(m_hwnd); - while (hItem) { - Unselect(hItem); - hItem = TreeView_GetNextSibling(m_hwnd, hItem); - } -} - -void CCtrlTreeView::SelectRange(HTREEITEM hStart, HTREEITEM hEnd) -{ - int start = 0, end = 0, i = 0; - HTREEITEM hItem = TreeView_GetRoot(m_hwnd); - while (hItem) { - if (hItem == hStart) - start = i; - if (hItem == hEnd) - end = i; - - i++; - hItem = TreeView_GetNextSibling(m_hwnd, hItem); - } - - if (end < start) { - int tmp = start; - start = end; - end = tmp; - } - - i = 0; - hItem = TreeView_GetRoot(m_hwnd); - while (hItem) { - if (i >= start) - Select(hItem); - if (i == end) - break; - - i++; - hItem = TreeView_GetNextSibling(m_hwnd, hItem); - } -} - -int CCtrlTreeView::GetNumSelected() -{ - int ret = 0; - for (HTREEITEM hItem = TreeView_GetRoot(m_hwnd); hItem; hItem = TreeView_GetNextSibling(m_hwnd, hItem)) - if (IsSelected(hItem)) - ret++; - - return ret; -} - -void CCtrlTreeView::GetSelected(LIST<_TREEITEM> &selected) -{ - HTREEITEM hItem = TreeView_GetRoot(m_hwnd); - while (hItem) { - if (IsSelected(hItem)) - selected.insert(hItem); - hItem = TreeView_GetNextSibling(m_hwnd, hItem); - } -} - -void CCtrlTreeView::Select(LIST<_TREEITEM> &selected) -{ - for (auto &it : selected) - if (it != nullptr) - Select(it); -} - -void CCtrlTreeView::GetCaretPos(CContextMenuPos &pos) const -{ - pos.pCtrl = this; - - // position is empty, let's fill it using selection - if (pos.pt.x == 0 && pos.pt.y == 0) { - HTREEITEM hItem = GetSelection(); - if (hItem != nullptr) { - pos.pCtrl = this; - pos.hItem = hItem; - - RECT rc; - GetItemRect(hItem, &rc, TRUE); - pos.pt.x = rc.left + 8; - pos.pt.y = rc.top + 8; - ClientToScreen(m_hwnd, &pos.pt); - return; - } - } - // position is present, let's calculate current item - else { - TVHITTESTINFO hti; - hti.pt = pos.pt; - ScreenToClient(m_hwnd, &hti.pt); - if (HitTest(&hti) && (hti.flags & TVHT_ONITEM)) { - pos.hItem = hti.hItem; - return; - } - } - - CSuper::GetCaretPos(pos); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -HIMAGELIST CCtrlTreeView::CreateDragImage(HTREEITEM hItem) -{ return TreeView_CreateDragImage(m_hwnd, hItem); -} - -void CCtrlTreeView::DeleteAllItems() -{ TreeView_DeleteAllItems(m_hwnd); -} - -void CCtrlTreeView::DeleteItem(HTREEITEM hItem) -{ TreeView_DeleteItem(m_hwnd, hItem); -} - -HWND CCtrlTreeView::EditLabel(HTREEITEM hItem) -{ return TreeView_EditLabel(m_hwnd, hItem); -} - -void CCtrlTreeView::EndEditLabelNow(BOOL cancel) -{ TreeView_EndEditLabelNow(m_hwnd, cancel); -} - -void CCtrlTreeView::EnsureVisible(HTREEITEM hItem) -{ TreeView_EnsureVisible(m_hwnd, hItem); -} - -void CCtrlTreeView::Expand(HTREEITEM hItem, uint32_t flag) -{ TreeView_Expand(m_hwnd, hItem, flag); -} - -COLORREF CCtrlTreeView::GetBkColor() const -{ return TreeView_GetBkColor(m_hwnd); -} - -uint32_t CCtrlTreeView::GetCheckState(HTREEITEM hItem) const -{ return TreeView_GetCheckState(m_hwnd, hItem); -} - -HTREEITEM CCtrlTreeView::GetChild(HTREEITEM hItem) const -{ return TreeView_GetChild(m_hwnd, hItem); -} - -int CCtrlTreeView::GetCount() const -{ return TreeView_GetCount(m_hwnd); -} - -HTREEITEM CCtrlTreeView::GetDropHilight() const -{ return TreeView_GetDropHilight(m_hwnd); -} - -HWND CCtrlTreeView::GetEditControl() const -{ return TreeView_GetEditControl(m_hwnd); -} - -HTREEITEM CCtrlTreeView::GetFirstVisible() const -{ return TreeView_GetFirstVisible(m_hwnd); -} - -HIMAGELIST CCtrlTreeView::GetImageList(int iImage) const -{ return TreeView_GetImageList(m_hwnd, iImage); -} - -int CCtrlTreeView::GetIndent() const -{ return TreeView_GetIndent(m_hwnd); -} - -COLORREF CCtrlTreeView::GetInsertMarkColor() const -{ return TreeView_GetInsertMarkColor(m_hwnd); -} - -bool CCtrlTreeView::GetItem(TVITEMEX *tvi) const -{ return TreeView_GetItem(m_hwnd, tvi) == TRUE; -} - -int CCtrlTreeView::GetItemHeight() const -{ return TreeView_GetItemHeight(m_hwnd); -} - -void CCtrlTreeView::GetItemRect(HTREEITEM hItem, RECT *rcItem, BOOL fItemRect) const -{ TreeView_GetItemRect(m_hwnd, hItem, rcItem, fItemRect); -} - -uint32_t CCtrlTreeView::GetItemState(HTREEITEM hItem, uint32_t stateMask) const -{ return TreeView_GetItemState(m_hwnd, hItem, stateMask); -} - -HTREEITEM CCtrlTreeView::GetLastVisible() const -{ return TreeView_GetLastVisible(m_hwnd); -} - -COLORREF CCtrlTreeView::GetLineColor() const -{ return TreeView_GetLineColor(m_hwnd); -} - -HTREEITEM CCtrlTreeView::GetNextItem(HTREEITEM hItem, uint32_t flag) const -{ return TreeView_GetNextItem(m_hwnd, hItem, flag); -} - -HTREEITEM CCtrlTreeView::GetNextSibling(HTREEITEM hItem) const -{ return TreeView_GetNextSibling(m_hwnd, hItem); -} - -HTREEITEM CCtrlTreeView::GetNextVisible(HTREEITEM hItem) const -{ return TreeView_GetNextVisible(m_hwnd, hItem); -} - -HTREEITEM CCtrlTreeView::GetParent(HTREEITEM hItem) const -{ return TreeView_GetParent(m_hwnd, hItem); -} - -HTREEITEM CCtrlTreeView::GetPrevSibling(HTREEITEM hItem) const -{ return TreeView_GetPrevSibling(m_hwnd, hItem); -} - -HTREEITEM CCtrlTreeView::GetPrevVisible(HTREEITEM hItem) const -{ return TreeView_GetPrevVisible(m_hwnd, hItem); -} - -HTREEITEM CCtrlTreeView::GetRoot() const -{ return TreeView_GetRoot(m_hwnd); -} - -uint32_t CCtrlTreeView::GetScrollTime() const -{ return TreeView_GetScrollTime(m_hwnd); -} - -HTREEITEM CCtrlTreeView::GetSelection() const -{ return TreeView_GetSelection(m_hwnd); -} - -COLORREF CCtrlTreeView::GetTextColor() const -{ return TreeView_GetTextColor(m_hwnd); -} - -HWND CCtrlTreeView::GetToolTips() const -{ return TreeView_GetToolTips(m_hwnd); -} - -BOOL CCtrlTreeView::GetUnicodeFormat() const -{ return TreeView_GetUnicodeFormat(m_hwnd); -} - -unsigned CCtrlTreeView::GetVisibleCount() const -{ return TreeView_GetVisibleCount(m_hwnd); -} - -HTREEITEM CCtrlTreeView::HitTest(TVHITTESTINFO *hti) const -{ return TreeView_HitTest(m_hwnd, hti); -} - -HTREEITEM CCtrlTreeView::InsertItem(TVINSERTSTRUCT *tvis) -{ return TreeView_InsertItem(m_hwnd, tvis); -} - -void CCtrlTreeView::Select(HTREEITEM hItem, uint32_t flag) -{ TreeView_Select(m_hwnd, hItem, flag); -} - -void CCtrlTreeView::SelectDropTarget(HTREEITEM hItem) -{ TreeView_SelectDropTarget(m_hwnd, hItem); -} - -void CCtrlTreeView::SelectItem(HTREEITEM hItem) -{ TreeView_SelectItem(m_hwnd, hItem); -} - -void CCtrlTreeView::SelectSetFirstVisible(HTREEITEM hItem) -{ TreeView_SelectSetFirstVisible(m_hwnd, hItem); -} - -COLORREF CCtrlTreeView::SetBkColor(COLORREF clBack) -{ return TreeView_SetBkColor(m_hwnd, clBack); -} - -void CCtrlTreeView::SetCheckState(HTREEITEM hItem, uint32_t state) -{ TreeView_SetCheckState(m_hwnd, hItem, state); -} - -HIMAGELIST CCtrlTreeView::SetImageList(HIMAGELIST hIml, int iImage) -{ return TreeView_SetImageList(m_hwnd, hIml, iImage); -} - -void CCtrlTreeView::SetIndent(int iIndent) -{ TreeView_SetIndent(m_hwnd, iIndent); -} - -void CCtrlTreeView::SetInsertMark(HTREEITEM hItem, BOOL fAfter) -{ TreeView_SetInsertMark(m_hwnd, hItem, fAfter); -} - -COLORREF CCtrlTreeView::SetInsertMarkColor(COLORREF clMark) -{ return TreeView_SetInsertMarkColor(m_hwnd, clMark); -} - -void CCtrlTreeView::SetItem(TVITEMEX *tvi) -{ TreeView_SetItem(m_hwnd, tvi); -} - -void CCtrlTreeView::SetItemHeight(short cyItem) -{ TreeView_SetItemHeight(m_hwnd, cyItem); -} - -void CCtrlTreeView::SetItemState(HTREEITEM hItem, uint32_t state, uint32_t stateMask) -{ TreeView_SetItemState(m_hwnd, hItem, state, stateMask); -} - -COLORREF CCtrlTreeView::SetLineColor(COLORREF clLine) -{ return TreeView_SetLineColor(m_hwnd, clLine); -} - -void CCtrlTreeView::SetScrollTime(UINT uMaxScrollTime) -{ TreeView_SetScrollTime(m_hwnd, uMaxScrollTime); -} - -COLORREF CCtrlTreeView::SetTextColor(COLORREF clText) -{ return TreeView_SetTextColor(m_hwnd, clText); -} - -HWND CCtrlTreeView::SetToolTips(HWND hwndToolTips) -{ return TreeView_SetToolTips(m_hwnd, hwndToolTips); -} - -BOOL CCtrlTreeView::SetUnicodeFormat(BOOL fUnicode) -{ return TreeView_SetUnicodeFormat(m_hwnd, fUnicode); -} - -void CCtrlTreeView::SortChildren(HTREEITEM hItem, BOOL fRecurse) -{ TreeView_SortChildren(m_hwnd, hItem, fRecurse); -} - -void CCtrlTreeView::SortChildrenCB(TVSORTCB *cb, BOOL fRecurse) -{ TreeView_SortChildrenCB(m_hwnd, cb, fRecurse); -} +/* + +Object UI extensions +Copyright (c) 2008 Victor Pavlychko, George Hazan +Copyright (C) 2012-23 Miranda NG team + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#include "../stdafx.h" + +int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, int iconId) +{ + HICON hIcon = Skin_LoadIcon(iconId); + int res = ImageList_AddIcon(hIml, hIcon); + IcoLib_ReleaseIcon(hIcon); + return res; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlTreeView + +CCtrlTreeView::CCtrlTreeView(CDlgBase *dlg, int ctrlId) : + CCtrlBase(dlg, ctrlId), + m_dwFlags(0), + m_hDragItem(nullptr) +{} + +void CCtrlTreeView::SetFlags(uint32_t dwFlags) +{ + if (dwFlags & MTREE_CHECKBOX) + m_bCheckBox = true; + + if (dwFlags & MTREE_MULTISELECT) + m_bMultiSelect = true; + + if (dwFlags & MTREE_DND) { + m_bDndEnabled = true; + m_bDragging = false; + m_hDragItem = nullptr; + } +} + +void CCtrlTreeView::OnInit() +{ + CSuper::OnInit(); + + Subclass(); + + if (m_bCheckBox) + SetWindowLongW(m_hwnd, GWL_STYLE, TVS_CHECKBOXES | GetWindowLongW(m_hwnd, GWL_STYLE)); +} + +HTREEITEM CCtrlTreeView::MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter, HTREEITEM hParent) +{ + if (hItem == nullptr || hInsertAfter == nullptr) + return nullptr; + + if (hItem == hInsertAfter) + return hItem; + + wchar_t name[128]; + TVINSERTSTRUCT tvis = {}; + tvis.itemex.mask = (UINT)-1; + tvis.itemex.pszText = name; + tvis.itemex.cchTextMax = _countof(name); + tvis.itemex.hItem = hItem; + if (!GetItem(&tvis.itemex)) + return nullptr; + + OBJLIST arChildren(1); + for (HTREEITEM p = GetChild(hItem); p; p = GetNextSibling(p)) { + wchar_t buf[128]; + TVINSERTSTRUCT tvis2 = {}; + tvis2.itemex.mask = (UINT)-1; + tvis2.itemex.pszText = buf; + tvis2.itemex.cchTextMax = _countof(buf); + tvis2.itemex.hItem = p; + if (GetItem(&tvis2.itemex)) { + tvis2.itemex.pszText = mir_wstrdup(tvis2.itemex.pszText); + arChildren.insert(new TVINSERTSTRUCT(tvis2)); + + tvis2.itemex.lParam = 0; + SetItem(&tvis2.itemex); + } + } + + // the pointed lParam will be freed inside TVN_DELETEITEM + // so lets substitute it with 0 + LPARAM saveOldData = tvis.itemex.lParam; + tvis.itemex.lParam = 0; + SetItem(&tvis.itemex); + + // now current item contain lParam = 0 we can delete it. the memory will be kept. + DeleteItem(hItem); + + for (auto &it : arChildren) + DeleteItem(it->itemex.hItem); + + tvis.itemex.stateMask = tvis.itemex.state; + tvis.itemex.lParam = saveOldData; + tvis.hParent = hParent; + tvis.hInsertAfter = hInsertAfter; + auto hNewItem = InsertItem(&tvis); + + hInsertAfter = nullptr; + for (auto &it : arChildren) { + it->hParent = hNewItem; + it->hInsertAfter = hInsertAfter; + hInsertAfter = InsertItem(it); + + mir_free(it->itemex.pszText); + } + + return hNewItem; +} + +LRESULT CCtrlTreeView::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) +{ + TVHITTESTINFO hti; + + switch (msg) { + case WM_MOUSEMOVE: + if (m_bDragging) { + hti.pt.x = (short)LOWORD(lParam); + hti.pt.y = (short)HIWORD(lParam); + HitTest(&hti); + if (hti.flags & (TVHT_ONITEM | TVHT_ONITEMRIGHT)) { + HTREEITEM it = hti.hItem; + hti.pt.y -= GetItemHeight() / 2; + HitTest(&hti); + if (!(hti.flags & TVHT_ABOVE)) + SetInsertMark(hti.hItem, 1); + else + SetInsertMark(it, 0); + } + else { + if (hti.flags & TVHT_ABOVE) SendMsg(WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0); + if (hti.flags & TVHT_BELOW) SendMsg(WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0); + SetInsertMark(nullptr, 0); + } + } + break; + + case WM_LBUTTONUP: + if (m_bDragging) { + SetInsertMark(nullptr, 0); + m_bDragging = false; + ReleaseCapture(); + + hti.pt.x = (short)LOWORD(lParam); + hti.pt.y = (short)HIWORD(lParam) - GetItemHeight() / 2; + HitTest(&hti); + if (m_hDragItem == hti.hItem) + break; + + if (hti.flags & TVHT_ABOVE) + hti.hItem = TVI_FIRST; + else if (hti.flags & TVHT_BELOW) + hti.hItem = TVI_LAST; + + HTREEITEM insertAfter = hti.hItem, hParent; + if (insertAfter != TVI_FIRST) { + hParent = GetParent(insertAfter); + if (GetChild(insertAfter) != nullptr) { + hParent = insertAfter; + insertAfter = TVI_FIRST; + } + } + else hParent = nullptr; + + HTREEITEM FirstItem = nullptr; + if (m_bMultiSelect) { + LIST<_TREEITEM> arItems(10); + GetSelected(arItems); + + // Proceed moving + for (auto &it : arItems) { + if (!insertAfter) + break; + if (GetParent(it) != hParent) // prevent subitems from being inserted at the same level + continue; + + insertAfter = MoveItemAbove(it, insertAfter, hParent); + if (it == arItems[0]) + FirstItem = insertAfter; + } + } + else FirstItem = MoveItemAbove(m_hDragItem, insertAfter, hParent); + if (FirstItem) + SelectItem(FirstItem); + + NotifyChange(); + } + break; + + case WM_LBUTTONDOWN: + if (!m_bMultiSelect) + break; + + hti.pt.x = (short)LOWORD(lParam); + hti.pt.y = (short)HIWORD(lParam); + if (!TreeView_HitTest(m_hwnd, &hti)) { + UnselectAll(); + break; + } + + if (!m_bDndEnabled) + if (!(wParam & (MK_CONTROL | MK_SHIFT)) || !(hti.flags & (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMRIGHT))) { + UnselectAll(); + TreeView_SelectItem(m_hwnd, hti.hItem); + break; + } + + if (wParam & MK_CONTROL) { + LIST<_TREEITEM> selected(1); + GetSelected(selected); + + // Check if have to deselect it + for (int i = 0; i < selected.getCount(); i++) { + if (selected[i] == hti.hItem) { + // Deselect it + UnselectAll(); + selected.remove(i); + + if (i > 0) + hti.hItem = selected[0]; + else if (i < selected.getCount()) + hti.hItem = selected[i]; + else + hti.hItem = nullptr; + break; + } + } + + TreeView_SelectItem(m_hwnd, hti.hItem); + Select(selected); + } + else if (wParam & MK_SHIFT) { + HTREEITEM hItem = TreeView_GetSelection(m_hwnd); + if (hItem == nullptr) + break; + + LIST<_TREEITEM> selected(1); + GetSelected(selected); + + TreeView_SelectItem(m_hwnd, hti.hItem); + Select(selected); + SelectRange(hItem, hti.hItem); + } + break; + } + + return CSuper::CustomWndProc(msg, wParam, lParam); +} + +BOOL CCtrlTreeView::OnNotify(int, NMHDR *pnmh) +{ + TEventInfo evt = { this, pnmh }; + + switch (pnmh->code) { + case NM_RCLICK: OnRightClick(&evt); return TRUE; + case NM_CUSTOMDRAW: OnCustomDraw(&evt); return TRUE; + case TVN_BEGINLABELEDIT: OnBeginLabelEdit(&evt); return TRUE; + case TVN_BEGINRDRAG: OnBeginRDrag(&evt); return TRUE; + case TVN_DELETEITEM: OnDeleteItem(&evt); return TRUE; + case TVN_ENDLABELEDIT: OnEndLabelEdit(&evt); return TRUE; + case TVN_GETDISPINFO: OnGetDispInfo(&evt); return TRUE; + case TVN_GETINFOTIP: OnGetInfoTip(&evt); return TRUE; + case TVN_ITEMEXPANDED: OnItemExpanded(&evt); return TRUE; + case TVN_ITEMEXPANDING: OnItemExpanding(&evt); return TRUE; + case TVN_SELCHANGED: OnSelChanged(&evt); return TRUE; + case TVN_SELCHANGING: OnSelChanging(&evt); return TRUE; + case TVN_SETDISPINFO: OnSetDispInfo(&evt); return TRUE; + case TVN_SINGLEEXPAND: OnSingleExpand(&evt); return TRUE; + + case TVN_BEGINDRAG: + OnBeginDrag(&evt); + + // user-defined can clear the event code to disable dragging + if (m_bDndEnabled && pnmh->code) { + ::SetCapture(m_hwnd); + m_bDragging = true; + m_hDragItem = evt.nmtv->itemNew.hItem; + SelectItem(m_hDragItem); + } + return TRUE; + + case TVN_KEYDOWN: + if (evt.nmtvkey->wVKey == VK_SPACE) { + evt.hItem = GetSelection(); + OnItemChanged(&evt); + NotifyChange(); + } + + OnKeyDown(&evt); + return TRUE; + } + + if (pnmh->code == NM_CLICK) { + TVHITTESTINFO hti; + hti.pt.x = (short)LOWORD(GetMessagePos()); + hti.pt.y = (short)HIWORD(GetMessagePos()); + ScreenToClient(pnmh->hwndFrom, &hti.pt); + if (HitTest(&hti)) { + if (hti.flags & TVHT_ONITEMSTATEICON) { + SelectItem(hti.hItem); + + evt.hItem = hti.hItem; + OnItemChanged(&evt); + NotifyChange(); + } + } + } + + return FALSE; +} + +void CCtrlTreeView::InvertCheck(HTREEITEM hItem) +{ + TVITEMEX tvi; + tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM | TVIF_STATEEX; + tvi.hItem = hItem; + if (!GetItem(&tvi)) + return; + + if (IsWinVerVistaPlus() && (tvi.uStateEx & TVIS_EX_DISABLED)) + return; + + tvi.iImage = tvi.iSelectedImage = !tvi.iImage; + SetItem(&tvi); + + SelectItem(hItem); +} + +void CCtrlTreeView::TranslateItem(HTREEITEM hItem) +{ + TVITEMEX tvi; + wchar_t buf[128]; + GetItem(hItem, &tvi, buf, _countof(buf)); + tvi.pszText = TranslateW_LP(tvi.pszText); + SetItem(&tvi); +} + +void CCtrlTreeView::TranslateTree() +{ + HTREEITEM hItem = GetRoot(); + while (hItem) { + TranslateItem(hItem); + + HTREEITEM hItemTmp = nullptr; + if (hItemTmp = GetChild(hItem)) + hItem = hItemTmp; + else if (hItemTmp = GetNextSibling(hItem)) + hItem = hItemTmp; + else { + while (true) { + if (!(hItem = GetParent(hItem))) + break; + if (hItemTmp = GetNextSibling(hItem)) { + hItem = hItemTmp; + break; + } + } + } + } +} + +HTREEITEM CCtrlTreeView::FindNamedItem(HTREEITEM hItem, const wchar_t *name) +{ + TVITEMEX tvi = { 0 }; + wchar_t str[MAX_PATH]; + + if (hItem) + tvi.hItem = GetChild(hItem); + else + tvi.hItem = GetRoot(); + + if (!name) + return tvi.hItem; + + tvi.mask = TVIF_TEXT; + tvi.pszText = str; + tvi.cchTextMax = _countof(str); + + while (tvi.hItem) { + GetItem(&tvi); + + if (!mir_wstrcmp(tvi.pszText, name)) + return tvi.hItem; + + tvi.hItem = GetNextSibling(tvi.hItem); + } + return nullptr; +} + +void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi) const +{ + memset(tvi, 0, sizeof(*tvi)); + tvi->mask = TVIF_CHILDREN | TVIF_HANDLE | TVIF_IMAGE | TVIF_INTEGRAL | TVIF_PARAM | TVIF_SELECTEDIMAGE | TVIF_STATE; + tvi->hItem = hItem; + GetItem(tvi); +} + +void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi, wchar_t *szText, int iTextLength) const +{ + memset(tvi, 0, sizeof(*tvi)); + tvi->mask = TVIF_CHILDREN | TVIF_HANDLE | TVIF_IMAGE | TVIF_INTEGRAL | TVIF_PARAM | TVIF_SELECTEDIMAGE | TVIF_STATE | TVIF_TEXT; + tvi->hItem = hItem; + tvi->pszText = szText; + tvi->cchTextMax = iTextLength; + GetItem(tvi); +} + +bool CCtrlTreeView::IsSelected(HTREEITEM hItem) +{ + return (TVIS_SELECTED & TreeView_GetItemState(m_hwnd, hItem, TVIS_SELECTED)) == TVIS_SELECTED; +} + +void CCtrlTreeView::Select(HTREEITEM hItem) +{ + TreeView_SetItemState(m_hwnd, hItem, TVIS_SELECTED, TVIS_SELECTED); +} + +void CCtrlTreeView::Unselect(HTREEITEM hItem) +{ + TreeView_SetItemState(m_hwnd, hItem, 0, TVIS_SELECTED); +} + +void CCtrlTreeView::DropHilite(HTREEITEM hItem) +{ + TreeView_SetItemState(m_hwnd, hItem, TVIS_DROPHILITED, TVIS_DROPHILITED); +} + +void CCtrlTreeView::DropUnhilite(HTREEITEM hItem) +{ + TreeView_SetItemState(m_hwnd, hItem, 0, TVIS_DROPHILITED); +} + +void CCtrlTreeView::SelectAll() +{ + TreeView_SelectItem(m_hwnd, nullptr); + + HTREEITEM hItem = TreeView_GetRoot(m_hwnd); + while (hItem) { + Select(hItem); + hItem = TreeView_GetNextSibling(m_hwnd, hItem); + } +} + +void CCtrlTreeView::UnselectAll() +{ + TreeView_SelectItem(m_hwnd, nullptr); + + HTREEITEM hItem = TreeView_GetRoot(m_hwnd); + while (hItem) { + Unselect(hItem); + hItem = TreeView_GetNextSibling(m_hwnd, hItem); + } +} + +void CCtrlTreeView::SelectRange(HTREEITEM hStart, HTREEITEM hEnd) +{ + int start = 0, end = 0, i = 0; + HTREEITEM hItem = TreeView_GetRoot(m_hwnd); + while (hItem) { + if (hItem == hStart) + start = i; + if (hItem == hEnd) + end = i; + + i++; + hItem = TreeView_GetNextSibling(m_hwnd, hItem); + } + + if (end < start) { + int tmp = start; + start = end; + end = tmp; + } + + i = 0; + hItem = TreeView_GetRoot(m_hwnd); + while (hItem) { + if (i >= start) + Select(hItem); + if (i == end) + break; + + i++; + hItem = TreeView_GetNextSibling(m_hwnd, hItem); + } +} + +int CCtrlTreeView::GetNumSelected() +{ + int ret = 0; + for (HTREEITEM hItem = TreeView_GetRoot(m_hwnd); hItem; hItem = TreeView_GetNextSibling(m_hwnd, hItem)) + if (IsSelected(hItem)) + ret++; + + return ret; +} + +void CCtrlTreeView::GetSelected(LIST<_TREEITEM> &selected) +{ + HTREEITEM hItem = TreeView_GetRoot(m_hwnd); + while (hItem) { + if (IsSelected(hItem)) + selected.insert(hItem); + hItem = TreeView_GetNextSibling(m_hwnd, hItem); + } +} + +void CCtrlTreeView::Select(LIST<_TREEITEM> &selected) +{ + for (auto &it : selected) + if (it != nullptr) + Select(it); +} + +void CCtrlTreeView::GetCaretPos(CContextMenuPos &pos) const +{ + pos.pCtrl = this; + + // position is empty, let's fill it using selection + if (pos.pt.x == 0 && pos.pt.y == 0) { + HTREEITEM hItem = GetSelection(); + if (hItem != nullptr) { + pos.pCtrl = this; + pos.hItem = hItem; + + RECT rc; + GetItemRect(hItem, &rc, TRUE); + pos.pt.x = rc.left + 8; + pos.pt.y = rc.top + 8; + ClientToScreen(m_hwnd, &pos.pt); + return; + } + } + // position is present, let's calculate current item + else { + TVHITTESTINFO hti; + hti.pt = pos.pt; + ScreenToClient(m_hwnd, &hti.pt); + if (HitTest(&hti) && (hti.flags & TVHT_ONITEM)) { + pos.hItem = hti.hItem; + return; + } + } + + CSuper::GetCaretPos(pos); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +HIMAGELIST CCtrlTreeView::CreateDragImage(HTREEITEM hItem) +{ return TreeView_CreateDragImage(m_hwnd, hItem); +} + +void CCtrlTreeView::DeleteAllItems() +{ TreeView_DeleteAllItems(m_hwnd); +} + +void CCtrlTreeView::DeleteItem(HTREEITEM hItem) +{ TreeView_DeleteItem(m_hwnd, hItem); +} + +HWND CCtrlTreeView::EditLabel(HTREEITEM hItem) +{ return TreeView_EditLabel(m_hwnd, hItem); +} + +void CCtrlTreeView::EndEditLabelNow(BOOL cancel) +{ TreeView_EndEditLabelNow(m_hwnd, cancel); +} + +void CCtrlTreeView::EnsureVisible(HTREEITEM hItem) +{ TreeView_EnsureVisible(m_hwnd, hItem); +} + +void CCtrlTreeView::Expand(HTREEITEM hItem, uint32_t flag) +{ TreeView_Expand(m_hwnd, hItem, flag); +} + +COLORREF CCtrlTreeView::GetBkColor() const +{ return TreeView_GetBkColor(m_hwnd); +} + +uint32_t CCtrlTreeView::GetCheckState(HTREEITEM hItem) const +{ return TreeView_GetCheckState(m_hwnd, hItem); +} + +HTREEITEM CCtrlTreeView::GetChild(HTREEITEM hItem) const +{ return TreeView_GetChild(m_hwnd, hItem); +} + +int CCtrlTreeView::GetCount() const +{ return TreeView_GetCount(m_hwnd); +} + +HTREEITEM CCtrlTreeView::GetDropHilight() const +{ return TreeView_GetDropHilight(m_hwnd); +} + +HWND CCtrlTreeView::GetEditControl() const +{ return TreeView_GetEditControl(m_hwnd); +} + +HTREEITEM CCtrlTreeView::GetFirstVisible() const +{ return TreeView_GetFirstVisible(m_hwnd); +} + +HIMAGELIST CCtrlTreeView::GetImageList(int iImage) const +{ return TreeView_GetImageList(m_hwnd, iImage); +} + +int CCtrlTreeView::GetIndent() const +{ return TreeView_GetIndent(m_hwnd); +} + +COLORREF CCtrlTreeView::GetInsertMarkColor() const +{ return TreeView_GetInsertMarkColor(m_hwnd); +} + +bool CCtrlTreeView::GetItem(TVITEMEX *tvi) const +{ return TreeView_GetItem(m_hwnd, tvi) == TRUE; +} + +int CCtrlTreeView::GetItemHeight() const +{ return TreeView_GetItemHeight(m_hwnd); +} + +void CCtrlTreeView::GetItemRect(HTREEITEM hItem, RECT *rcItem, BOOL fItemRect) const +{ TreeView_GetItemRect(m_hwnd, hItem, rcItem, fItemRect); +} + +uint32_t CCtrlTreeView::GetItemState(HTREEITEM hItem, uint32_t stateMask) const +{ return TreeView_GetItemState(m_hwnd, hItem, stateMask); +} + +HTREEITEM CCtrlTreeView::GetLastVisible() const +{ return TreeView_GetLastVisible(m_hwnd); +} + +COLORREF CCtrlTreeView::GetLineColor() const +{ return TreeView_GetLineColor(m_hwnd); +} + +HTREEITEM CCtrlTreeView::GetNextItem(HTREEITEM hItem, uint32_t flag) const +{ return TreeView_GetNextItem(m_hwnd, hItem, flag); +} + +HTREEITEM CCtrlTreeView::GetNextSibling(HTREEITEM hItem) const +{ return TreeView_GetNextSibling(m_hwnd, hItem); +} + +HTREEITEM CCtrlTreeView::GetNextVisible(HTREEITEM hItem) const +{ return TreeView_GetNextVisible(m_hwnd, hItem); +} + +HTREEITEM CCtrlTreeView::GetParent(HTREEITEM hItem) const +{ return TreeView_GetParent(m_hwnd, hItem); +} + +HTREEITEM CCtrlTreeView::GetPrevSibling(HTREEITEM hItem) const +{ return TreeView_GetPrevSibling(m_hwnd, hItem); +} + +HTREEITEM CCtrlTreeView::GetPrevVisible(HTREEITEM hItem) const +{ return TreeView_GetPrevVisible(m_hwnd, hItem); +} + +HTREEITEM CCtrlTreeView::GetRoot() const +{ return TreeView_GetRoot(m_hwnd); +} + +uint32_t CCtrlTreeView::GetScrollTime() const +{ return TreeView_GetScrollTime(m_hwnd); +} + +HTREEITEM CCtrlTreeView::GetSelection() const +{ return TreeView_GetSelection(m_hwnd); +} + +COLORREF CCtrlTreeView::GetTextColor() const +{ return TreeView_GetTextColor(m_hwnd); +} + +HWND CCtrlTreeView::GetToolTips() const +{ return TreeView_GetToolTips(m_hwnd); +} + +BOOL CCtrlTreeView::GetUnicodeFormat() const +{ return TreeView_GetUnicodeFormat(m_hwnd); +} + +unsigned CCtrlTreeView::GetVisibleCount() const +{ return TreeView_GetVisibleCount(m_hwnd); +} + +HTREEITEM CCtrlTreeView::HitTest(TVHITTESTINFO *hti) const +{ return TreeView_HitTest(m_hwnd, hti); +} + +HTREEITEM CCtrlTreeView::InsertItem(TVINSERTSTRUCT *tvis) +{ return TreeView_InsertItem(m_hwnd, tvis); +} + +void CCtrlTreeView::Select(HTREEITEM hItem, uint32_t flag) +{ TreeView_Select(m_hwnd, hItem, flag); +} + +void CCtrlTreeView::SelectDropTarget(HTREEITEM hItem) +{ TreeView_SelectDropTarget(m_hwnd, hItem); +} + +void CCtrlTreeView::SelectItem(HTREEITEM hItem) +{ TreeView_SelectItem(m_hwnd, hItem); +} + +void CCtrlTreeView::SelectSetFirstVisible(HTREEITEM hItem) +{ TreeView_SelectSetFirstVisible(m_hwnd, hItem); +} + +COLORREF CCtrlTreeView::SetBkColor(COLORREF clBack) +{ return TreeView_SetBkColor(m_hwnd, clBack); +} + +void CCtrlTreeView::SetCheckState(HTREEITEM hItem, uint32_t state) +{ TreeView_SetCheckState(m_hwnd, hItem, state); +} + +HIMAGELIST CCtrlTreeView::SetImageList(HIMAGELIST hIml, int iImage) +{ return TreeView_SetImageList(m_hwnd, hIml, iImage); +} + +void CCtrlTreeView::SetIndent(int iIndent) +{ TreeView_SetIndent(m_hwnd, iIndent); +} + +void CCtrlTreeView::SetInsertMark(HTREEITEM hItem, BOOL fAfter) +{ TreeView_SetInsertMark(m_hwnd, hItem, fAfter); +} + +COLORREF CCtrlTreeView::SetInsertMarkColor(COLORREF clMark) +{ return TreeView_SetInsertMarkColor(m_hwnd, clMark); +} + +void CCtrlTreeView::SetItem(TVITEMEX *tvi) +{ TreeView_SetItem(m_hwnd, tvi); +} + +void CCtrlTreeView::SetItemHeight(short cyItem) +{ TreeView_SetItemHeight(m_hwnd, cyItem); +} + +void CCtrlTreeView::SetItemState(HTREEITEM hItem, uint32_t state, uint32_t stateMask) +{ TreeView_SetItemState(m_hwnd, hItem, state, stateMask); +} + +COLORREF CCtrlTreeView::SetLineColor(COLORREF clLine) +{ return TreeView_SetLineColor(m_hwnd, clLine); +} + +void CCtrlTreeView::SetScrollTime(UINT uMaxScrollTime) +{ TreeView_SetScrollTime(m_hwnd, uMaxScrollTime); +} + +COLORREF CCtrlTreeView::SetTextColor(COLORREF clText) +{ return TreeView_SetTextColor(m_hwnd, clText); +} + +HWND CCtrlTreeView::SetToolTips(HWND hwndToolTips) +{ return TreeView_SetToolTips(m_hwnd, hwndToolTips); +} + +BOOL CCtrlTreeView::SetUnicodeFormat(BOOL fUnicode) +{ return TreeView_SetUnicodeFormat(m_hwnd, fUnicode); +} + +void CCtrlTreeView::SortChildren(HTREEITEM hItem, BOOL fRecurse) +{ TreeView_SortChildren(m_hwnd, hItem, fRecurse); +} + +void CCtrlTreeView::SortChildrenCB(TVSORTCB *cb, BOOL fRecurse) +{ TreeView_SortChildrenCB(m_hwnd, cb, fRecurse); +} diff --git a/src/mir_core/src/Windows/miranda.cpp b/src/mir_core/src/Windows/miranda.cpp index ce52b20b0b..5649a69e4c 100644 --- a/src/mir_core/src/Windows/miranda.cpp +++ b/src/mir_core/src/Windows/miranda.cpp @@ -1,406 +1,406 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org), -Copyright (c) 2000-12 Miranda IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "../stdafx.h" - -HWND hAPCWindow = nullptr; - -int InitPathUtils(void); -void RecalculateTime(void); - -void CheckLogs(); -void InitLogs(); -void UninitLogs(); - -void InitColourPicker(); -void InitHyperlink(); -void InitTimeZones(); -void InitWinver(); - -HINSTANCE g_hInst = nullptr; - -HCURSOR g_hCursorNS, g_hCursorWE; -HANDLE hThreadQueueEmpty; -HANDLE hShutdownEvent, hPreShutdownEvent; -uint32_t mir_tls = 0; - -static bool g_bMirandaTerminated = false; -bool g_bEnableDpiAware = false; - -MIR_CORE_DLL(bool) Miranda_IsTerminated() -{ - return g_bMirandaTerminated; -} - -MIR_CORE_DLL(void) Miranda_SetTerminated(void) -{ - g_bMirandaTerminated = true; - - NotifyEventHooks(hPreShutdownEvent, 0, 0); - NotifyEventHooks(hShutdownEvent, 0, 0); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -struct MWaitableObject -{ - MWaitableObject(MWaitableStub pFunc, HANDLE hEvent) : - m_bOwnsEvent(false), - m_hEvent(hEvent), - m_pFunc(pFunc), - m_pInfo(INVALID_HANDLE_VALUE) - { - if (hEvent == nullptr) { - m_hEvent = CreateEvent(nullptr, TRUE, TRUE, nullptr); - m_bOwnsEvent = true; - } - } - - MWaitableObject(MWaitableStubEx pFunc, void *pInfo) : - m_bOwnsEvent(true), - m_hEvent(CreateEvent(nullptr, TRUE, TRUE, nullptr)), - m_pFuncEx(pFunc), - m_pInfo(pInfo) - {} - - ~MWaitableObject() - { - if (m_bOwnsEvent) - ::CloseHandle(m_hEvent); - } - - HANDLE m_hEvent; - union - { - MWaitableStub m_pFunc; - MWaitableStubEx m_pFuncEx; - }; - void *m_pInfo; - - bool m_bOwnsEvent; -}; - -static OBJLIST arWaitableObjects(1, HandleKeySortT); - -MIR_CORE_DLL(void) Miranda_WaitOnHandle(MWaitableStub pFunc, HANDLE hEvent) -{ - arWaitableObjects.insert(new MWaitableObject(pFunc, hEvent)); -} - -MIR_CORE_DLL(void) Miranda_WaitOnHandleEx(MWaitableStubEx pFunc, void *pInfo) -{ - arWaitableObjects.insert(new MWaitableObject(pFunc, pInfo)); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static INT_PTR RestartMiranda(WPARAM wParam, LPARAM lParam) -{ - wchar_t mirandaPath[MAX_PATH], cmdLine[MAX_PATH]; - if (lParam) - wcsncpy_s(mirandaPath, (const wchar_t*)lParam, _TRUNCATE); - else - GetModuleFileName(nullptr, mirandaPath, _countof(mirandaPath)); - - if (wParam) { - VARSW profilename(L"%miranda_profilename%"); - mir_snwprintf(cmdLine, L"\"%s\" /restart:%d /profile=%s", mirandaPath, GetCurrentProcessId(), (wchar_t*)profilename); - } - else mir_snwprintf(cmdLine, L"\"%s\" /restart:%d", mirandaPath, GetCurrentProcessId()); - - CallService("CloseAction", 0, 0); - - PROCESS_INFORMATION pi; - STARTUPINFO startupInfo = { 0 }; - startupInfo.cb = sizeof(startupInfo); - CreateProcess(mirandaPath, cmdLine, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &startupInfo, &pi); - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// module init - -static LRESULT CALLBACK APCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if (msg == WM_USER+1) { - PAPCFUNC pFunc = (PAPCFUNC)wParam; - pFunc((ULONG_PTR)lParam); - return 0; - } - - if (msg == WM_TIMER) - CheckLogs(); - - if (msg == WM_TIMECHANGE) - RecalculateTime(); - - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -static void LoadCoreModule(void) -{ - INITCOMMONCONTROLSEX icce = {0}; - icce.dwSize = sizeof(icce); - icce.dwICC = ICC_WIN95_CLASSES | ICC_USEREX_CLASSES; - InitCommonControlsEx(&icce); - - hAPCWindow = CreateWindowEx(0, L"ComboLBox", nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr); - SetClassLongPtr(hAPCWindow, GCL_STYLE, GetClassLongPtr(hAPCWindow, GCL_STYLE) | CS_DROPSHADOW); - DestroyWindow(hAPCWindow); - - hAPCWindow = CreateWindowEx(0, L"STATIC", nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr); - SetWindowLongPtr(hAPCWindow, GWLP_WNDPROC, (LONG_PTR)APCWndProc); - SetTimer(hAPCWindow, 1, 1000, nullptr); - hThreadQueueEmpty = CreateEvent(nullptr, TRUE, TRUE, nullptr); - - InitWinver(); - InitPathUtils(); - InitLogs(); - InitColourPicker(); - InitHyperlink(); - InitTimeZones(); - InitialiseModularEngine(); - - wchar_t wszIniPath[MAX_PATH]; - PathToAbsoluteW(L"mirandaboot.ini", wszIniPath); - if (GetPrivateProfileIntW(L"Interface", L"DpiAware", 0, wszIniPath) == 1) - g_bEnableDpiAware = true; - - CreateServiceFunction(MS_SYSTEM_RESTART, RestartMiranda); - - hShutdownEvent = CreateHookableEvent(ME_SYSTEM_SHUTDOWN); - hPreShutdownEvent = CreateHookableEvent(ME_SYSTEM_PRESHUTDOWN); - - pfnRtlGenRandom = (PGENRANDOM)GetProcAddress(GetModuleHandleA("advapi32"), "SystemFunction036"); -} - -MIR_CORE_DLL(void) UnloadCoreModule(void) -{ - DestroyWindow(hAPCWindow); - CloseHandle(hThreadQueueEmpty); - TlsFree(mir_tls); - - DestroyModularEngine(); - UninitLogs(); - UnloadLangPackModule(); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Message loop - -static HMODULE hThemeAPI; - -typedef HRESULT(STDAPICALLTYPE *pfnBufferedPaintInit)(void); -pfnBufferedPaintInit bufferedPaintInit; - -typedef HRESULT(STDAPICALLTYPE *pfnBufferedPaintUninit)(void); -pfnBufferedPaintUninit bufferedPaintUninit; - -static void crtErrorHandler(const wchar_t *, const wchar_t *, const wchar_t *, unsigned, uintptr_t) -{} - -static void __cdecl compactHeapsThread(void*) -{ - Thread_SetName("compactHeapsThread"); - - while (!Miranda_IsTerminated()) { - SleepEx((1000 * 60) * 5, TRUE); // every 5 minutes - - HANDLE hHeaps[256]; - uint32_t hc = GetProcessHeaps(255, (PHANDLE)&hHeaps); - if (hc != 0 && hc < 256) { - __try { - for (uint32_t j = 0; j < hc; j++) - HeapCompact(hHeaps[j], 0); - } - __except (EXCEPTION_EXECUTE_HANDLER) - {} - } - } -} - -static void EnableDpiAware() -{ - if (HMODULE hInst = GetModuleHandleW(L"user32")) { - typedef void (WINAPI *pfnSetProcessDpiAwarenessContext)(HANDLE); - if (auto *pFunc = (pfnSetProcessDpiAwarenessContext)GetProcAddress(hInst, "SetProcessDpiAwarenessContext")) { - pFunc(HANDLE(-4)); - return; - } - - typedef void (WINAPI *pfnSetProcessDpiAwareness)(DWORD); - if (auto *pFunc = (pfnSetProcessDpiAwareness)GetProcAddress(hInst, "SetProcessDpiAwareness")) { - pFunc(2); - return; - } - - typedef void (WINAPI *pfnSetProcessDPIAware_t)(void); - if (auto *pFunc = (pfnSetProcessDPIAware_t)GetProcAddress(hInst, "SetProcessDPIAware")) - pFunc(); - } -} - -MIR_CORE_DLL(void) BeginMessageLoop() -{ - _set_invalid_parameter_handler(&crtErrorHandler); - - #ifdef _DEBUG - _CrtSetReportMode(_CRT_ASSERT, 0); - #endif - - #ifdef _DEBUG - if (CmdLine_GetOption(L"memdebug")) - _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); - #endif - - hThemeAPI = LoadLibrary(L"uxtheme.dll"); - if (hThemeAPI) { - bufferedPaintInit = (pfnBufferedPaintInit)GetProcAddress(hThemeAPI, "BufferedPaintInit"); - bufferedPaintUninit = (pfnBufferedPaintUninit)GetProcAddress(hThemeAPI, "BufferedPaintUninit"); - } - - if (g_bEnableDpiAware) - EnableDpiAware(); - - if (bufferedPaintInit) - bufferedPaintInit(); - - OleInitialize(nullptr); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static uint32_t dwEventTime = 0; - -void checkIdle(MSG *msg) -{ - switch (msg->message) { - case WM_MOUSEACTIVATE: - case WM_MOUSEMOVE: - case WM_CHAR: - dwEventTime = GetTickCount(); - } -} - -MIR_CORE_DLL(uint32_t) Miranda_GetIdle() -{ - return dwEventTime; -} - -static uint32_t myWait() -{ - HANDLE *hWaitObjects = (HANDLE *)_alloca(arWaitableObjects.getCount() * sizeof(HANDLE)); - for (int i = 0; i < arWaitableObjects.getCount(); i++) - hWaitObjects[i] = arWaitableObjects[i].m_hEvent; - - return MsgWaitForMultipleObjectsEx(arWaitableObjects.getCount(), hWaitObjects, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE); -} - -MIR_CORE_DLL(void) EnterMessageLoop() -{ - mir_forkthread(compactHeapsThread); - dwEventTime = GetTickCount(); - uint32_t myPid = GetCurrentProcessId(); - - bool messageloop = true; - while (messageloop) { - MSG msg; - BOOL dying = FALSE; - uint32_t rc = myWait(); - if (rc < WAIT_OBJECT_0 + arWaitableObjects.getCount()) { - auto &pWait = arWaitableObjects[rc - WAIT_OBJECT_0]; - if (pWait.m_pInfo == INVALID_HANDLE_VALUE) - (*pWait.m_pFunc)(); - else - (*pWait.m_pFuncEx)(pWait.m_pInfo); - - if (pWait.m_bOwnsEvent) - arWaitableObjects.remove(&pWait); - } - - while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) { - if (msg.message != WM_QUIT) { - HWND h = GetForegroundWindow(); - DWORD pid = 0; - checkIdle(&msg); - if (h != nullptr && GetWindowThreadProcessId(h, &pid) && pid == myPid && GetClassLongPtr(h, GCW_ATOM) == 32770) - if (h != nullptr && IsDialogMessage(h, &msg)) /* Wine fix. */ - continue; - - TranslateMessage(&msg); - DispatchMessage(&msg); - } - else if (!dying) { - dying++; - g_bMirandaTerminated = true; - NotifyEventHooks(hPreShutdownEvent, 0, 0); - - // this spins and processes the msg loop, objects and APC. - Thread_Wait(); - NotifyEventHooks(hShutdownEvent, 0, 0); - // if the hooks generated any messages, it'll get processed before the second WM_QUIT - PostQuitMessage(0); - } - else if (dying) - messageloop = false; - } - } -} - -///////////////////////////////////////////////////////////////////////////////////////// - -MIR_CORE_DLL(void) LeaveMessageLoop() -{ - // Dragons live there... - __try { - OleUninitialize(); - } - __except (EXCEPTION_EXECUTE_HANDLER) - { - } - - if (bufferedPaintUninit) { - bufferedPaintUninit(); - FreeLibrary(hThemeAPI); - } -} - -///////////////////////////////////////////////////////////////////////////////////////// -// entry point - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, uint32_t fdwReason, LPVOID) -{ - if (fdwReason == DLL_PROCESS_ATTACH) { - g_hInst = hinstDLL; - mir_tls = TlsAlloc(); - LoadCoreModule(); - } - else if (fdwReason == DLL_THREAD_DETACH) { - HANDLE hEvent = TlsGetValue(mir_tls); - if (hEvent) - CloseHandle(hEvent); - } - return TRUE; -} +/* + +Miranda NG: the free IM client for Microsoft* Windows* + +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org), +Copyright (c) 2000-12 Miranda IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#include "../stdafx.h" + +HWND hAPCWindow = nullptr; + +int InitPathUtils(void); +void RecalculateTime(void); + +void CheckLogs(); +void InitLogs(); +void UninitLogs(); + +void InitColourPicker(); +void InitHyperlink(); +void InitTimeZones(); +void InitWinver(); + +HINSTANCE g_hInst = nullptr; + +HCURSOR g_hCursorNS, g_hCursorWE; +HANDLE hThreadQueueEmpty; +HANDLE hShutdownEvent, hPreShutdownEvent; +uint32_t mir_tls = 0; + +static bool g_bMirandaTerminated = false; +bool g_bEnableDpiAware = false; + +MIR_CORE_DLL(bool) Miranda_IsTerminated() +{ + return g_bMirandaTerminated; +} + +MIR_CORE_DLL(void) Miranda_SetTerminated(void) +{ + g_bMirandaTerminated = true; + + NotifyEventHooks(hPreShutdownEvent, 0, 0); + NotifyEventHooks(hShutdownEvent, 0, 0); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +struct MWaitableObject +{ + MWaitableObject(MWaitableStub pFunc, HANDLE hEvent) : + m_bOwnsEvent(false), + m_hEvent(hEvent), + m_pFunc(pFunc), + m_pInfo(INVALID_HANDLE_VALUE) + { + if (hEvent == nullptr) { + m_hEvent = CreateEvent(nullptr, TRUE, TRUE, nullptr); + m_bOwnsEvent = true; + } + } + + MWaitableObject(MWaitableStubEx pFunc, void *pInfo) : + m_bOwnsEvent(true), + m_hEvent(CreateEvent(nullptr, TRUE, TRUE, nullptr)), + m_pFuncEx(pFunc), + m_pInfo(pInfo) + {} + + ~MWaitableObject() + { + if (m_bOwnsEvent) + ::CloseHandle(m_hEvent); + } + + HANDLE m_hEvent; + union + { + MWaitableStub m_pFunc; + MWaitableStubEx m_pFuncEx; + }; + void *m_pInfo; + + bool m_bOwnsEvent; +}; + +static OBJLIST arWaitableObjects(1, HandleKeySortT); + +MIR_CORE_DLL(void) Miranda_WaitOnHandle(MWaitableStub pFunc, HANDLE hEvent) +{ + arWaitableObjects.insert(new MWaitableObject(pFunc, hEvent)); +} + +MIR_CORE_DLL(void) Miranda_WaitOnHandleEx(MWaitableStubEx pFunc, void *pInfo) +{ + arWaitableObjects.insert(new MWaitableObject(pFunc, pInfo)); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static INT_PTR RestartMiranda(WPARAM wParam, LPARAM lParam) +{ + wchar_t mirandaPath[MAX_PATH], cmdLine[MAX_PATH]; + if (lParam) + wcsncpy_s(mirandaPath, (const wchar_t*)lParam, _TRUNCATE); + else + GetModuleFileName(nullptr, mirandaPath, _countof(mirandaPath)); + + if (wParam) { + VARSW profilename(L"%miranda_profilename%"); + mir_snwprintf(cmdLine, L"\"%s\" /restart:%d /profile=%s", mirandaPath, GetCurrentProcessId(), (wchar_t*)profilename); + } + else mir_snwprintf(cmdLine, L"\"%s\" /restart:%d", mirandaPath, GetCurrentProcessId()); + + CallService("CloseAction", 0, 0); + + PROCESS_INFORMATION pi; + STARTUPINFO startupInfo = { 0 }; + startupInfo.cb = sizeof(startupInfo); + CreateProcess(mirandaPath, cmdLine, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &startupInfo, &pi); + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// module init + +static LRESULT CALLBACK APCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (msg == WM_USER+1) { + PAPCFUNC pFunc = (PAPCFUNC)wParam; + pFunc((ULONG_PTR)lParam); + return 0; + } + + if (msg == WM_TIMER) + CheckLogs(); + + if (msg == WM_TIMECHANGE) + RecalculateTime(); + + return DefWindowProc(hwnd, msg, wParam, lParam); +} + +static void LoadCoreModule(void) +{ + INITCOMMONCONTROLSEX icce = {0}; + icce.dwSize = sizeof(icce); + icce.dwICC = ICC_WIN95_CLASSES | ICC_USEREX_CLASSES; + InitCommonControlsEx(&icce); + + hAPCWindow = CreateWindowEx(0, L"ComboLBox", nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr); + SetClassLongPtr(hAPCWindow, GCL_STYLE, GetClassLongPtr(hAPCWindow, GCL_STYLE) | CS_DROPSHADOW); + DestroyWindow(hAPCWindow); + + hAPCWindow = CreateWindowEx(0, L"STATIC", nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr); + SetWindowLongPtr(hAPCWindow, GWLP_WNDPROC, (LONG_PTR)APCWndProc); + SetTimer(hAPCWindow, 1, 1000, nullptr); + hThreadQueueEmpty = CreateEvent(nullptr, TRUE, TRUE, nullptr); + + InitWinver(); + InitPathUtils(); + InitLogs(); + InitColourPicker(); + InitHyperlink(); + InitTimeZones(); + InitialiseModularEngine(); + + wchar_t wszIniPath[MAX_PATH]; + PathToAbsoluteW(L"mirandaboot.ini", wszIniPath); + if (GetPrivateProfileIntW(L"Interface", L"DpiAware", 0, wszIniPath) == 1) + g_bEnableDpiAware = true; + + CreateServiceFunction(MS_SYSTEM_RESTART, RestartMiranda); + + hShutdownEvent = CreateHookableEvent(ME_SYSTEM_SHUTDOWN); + hPreShutdownEvent = CreateHookableEvent(ME_SYSTEM_PRESHUTDOWN); + + pfnRtlGenRandom = (PGENRANDOM)GetProcAddress(GetModuleHandleA("advapi32"), "SystemFunction036"); +} + +MIR_CORE_DLL(void) UnloadCoreModule(void) +{ + DestroyWindow(hAPCWindow); + CloseHandle(hThreadQueueEmpty); + TlsFree(mir_tls); + + DestroyModularEngine(); + UninitLogs(); + UnloadLangPackModule(); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// Message loop + +static HMODULE hThemeAPI; + +typedef HRESULT(STDAPICALLTYPE *pfnBufferedPaintInit)(void); +pfnBufferedPaintInit bufferedPaintInit; + +typedef HRESULT(STDAPICALLTYPE *pfnBufferedPaintUninit)(void); +pfnBufferedPaintUninit bufferedPaintUninit; + +static void crtErrorHandler(const wchar_t *, const wchar_t *, const wchar_t *, unsigned, uintptr_t) +{} + +static void __cdecl compactHeapsThread(void*) +{ + Thread_SetName("compactHeapsThread"); + + while (!Miranda_IsTerminated()) { + SleepEx((1000 * 60) * 5, TRUE); // every 5 minutes + + HANDLE hHeaps[256]; + uint32_t hc = GetProcessHeaps(255, (PHANDLE)&hHeaps); + if (hc != 0 && hc < 256) { + __try { + for (uint32_t j = 0; j < hc; j++) + HeapCompact(hHeaps[j], 0); + } + __except (EXCEPTION_EXECUTE_HANDLER) + {} + } + } +} + +static void EnableDpiAware() +{ + if (HMODULE hInst = GetModuleHandleW(L"user32")) { + typedef void (WINAPI *pfnSetProcessDpiAwarenessContext)(HANDLE); + if (auto *pFunc = (pfnSetProcessDpiAwarenessContext)GetProcAddress(hInst, "SetProcessDpiAwarenessContext")) { + pFunc(HANDLE(-4)); + return; + } + + typedef void (WINAPI *pfnSetProcessDpiAwareness)(DWORD); + if (auto *pFunc = (pfnSetProcessDpiAwareness)GetProcAddress(hInst, "SetProcessDpiAwareness")) { + pFunc(2); + return; + } + + typedef void (WINAPI *pfnSetProcessDPIAware_t)(void); + if (auto *pFunc = (pfnSetProcessDPIAware_t)GetProcAddress(hInst, "SetProcessDPIAware")) + pFunc(); + } +} + +MIR_CORE_DLL(void) BeginMessageLoop() +{ + _set_invalid_parameter_handler(&crtErrorHandler); + + #ifdef _DEBUG + _CrtSetReportMode(_CRT_ASSERT, 0); + #endif + + #ifdef _DEBUG + if (CmdLine_GetOption(L"memdebug")) + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); + #endif + + hThemeAPI = LoadLibrary(L"uxtheme.dll"); + if (hThemeAPI) { + bufferedPaintInit = (pfnBufferedPaintInit)GetProcAddress(hThemeAPI, "BufferedPaintInit"); + bufferedPaintUninit = (pfnBufferedPaintUninit)GetProcAddress(hThemeAPI, "BufferedPaintUninit"); + } + + if (g_bEnableDpiAware) + EnableDpiAware(); + + if (bufferedPaintInit) + bufferedPaintInit(); + + OleInitialize(nullptr); +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static uint32_t dwEventTime = 0; + +void checkIdle(MSG *msg) +{ + switch (msg->message) { + case WM_MOUSEACTIVATE: + case WM_MOUSEMOVE: + case WM_CHAR: + dwEventTime = GetTickCount(); + } +} + +MIR_CORE_DLL(uint32_t) Miranda_GetIdle() +{ + return dwEventTime; +} + +static uint32_t myWait() +{ + HANDLE *hWaitObjects = (HANDLE *)_alloca(arWaitableObjects.getCount() * sizeof(HANDLE)); + for (int i = 0; i < arWaitableObjects.getCount(); i++) + hWaitObjects[i] = arWaitableObjects[i].m_hEvent; + + return MsgWaitForMultipleObjectsEx(arWaitableObjects.getCount(), hWaitObjects, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE); +} + +MIR_CORE_DLL(void) EnterMessageLoop() +{ + mir_forkthread(compactHeapsThread); + dwEventTime = GetTickCount(); + uint32_t myPid = GetCurrentProcessId(); + + bool messageloop = true; + while (messageloop) { + MSG msg; + BOOL dying = FALSE; + uint32_t rc = myWait(); + if (rc < WAIT_OBJECT_0 + arWaitableObjects.getCount()) { + auto &pWait = arWaitableObjects[rc - WAIT_OBJECT_0]; + if (pWait.m_pInfo == INVALID_HANDLE_VALUE) + (*pWait.m_pFunc)(); + else + (*pWait.m_pFuncEx)(pWait.m_pInfo); + + if (pWait.m_bOwnsEvent) + arWaitableObjects.remove(&pWait); + } + + while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) { + if (msg.message != WM_QUIT) { + HWND h = GetForegroundWindow(); + DWORD pid = 0; + checkIdle(&msg); + if (h != nullptr && GetWindowThreadProcessId(h, &pid) && pid == myPid && GetClassLongPtr(h, GCW_ATOM) == 32770) + if (h != nullptr && IsDialogMessage(h, &msg)) /* Wine fix. */ + continue; + + TranslateMessage(&msg); + DispatchMessage(&msg); + } + else if (!dying) { + dying++; + g_bMirandaTerminated = true; + NotifyEventHooks(hPreShutdownEvent, 0, 0); + + // this spins and processes the msg loop, objects and APC. + Thread_Wait(); + NotifyEventHooks(hShutdownEvent, 0, 0); + // if the hooks generated any messages, it'll get processed before the second WM_QUIT + PostQuitMessage(0); + } + else if (dying) + messageloop = false; + } + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +MIR_CORE_DLL(void) LeaveMessageLoop() +{ + // Dragons live there... + __try { + OleUninitialize(); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + } + + if (bufferedPaintUninit) { + bufferedPaintUninit(); + FreeLibrary(hThemeAPI); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// entry point + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, uint32_t fdwReason, LPVOID) +{ + if (fdwReason == DLL_PROCESS_ATTACH) { + g_hInst = hinstDLL; + mir_tls = TlsAlloc(); + LoadCoreModule(); + } + else if (fdwReason == DLL_THREAD_DETACH) { + HANDLE hEvent = TlsGetValue(mir_tls); + if (hEvent) + CloseHandle(hEvent); + } + return TRUE; +} diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp index 63899787c7..5b2048c2bb 100644 --- a/src/mir_core/src/db.cpp +++ b/src/mir_core/src/db.cpp @@ -1,576 +1,576 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org), -Copyright (c) 2000-12 Miranda IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "stdafx.h" - -MIR_CORE_EXPORT MDatabaseCommon* g_pCurrDb = nullptr; - -///////////////////////////////////////////////////////////////////////////////////////// -// database functions - -MIR_CORE_DLL(void) db_set_safety_mode(BOOL bNewMode) -{ - if (g_pCurrDb) - g_pCurrDb->SetCacheSafetyMode(bNewMode != 0); -} - -MIR_CORE_DLL(int) db_get_contact_count(void) -{ - return (g_pCurrDb) ? g_pCurrDb->GetContactCount() : 0; -} - -MIR_CORE_DLL(MDatabaseCommon*) db_get_current() -{ - return g_pCurrDb; -} - -MIR_CORE_DLL(int) db_delete_module(MCONTACT hContact, const char *szModuleName) -{ - return (g_pCurrDb) ? g_pCurrDb->DeleteModule(hContact, szModuleName) : 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -static int CheckIfModuleIsEmptyProc(const char *, void *) -{ - return 1; -} - -MIR_CORE_DLL(bool) db_is_module_empty(MCONTACT hContact, const char *szModule) -{ - return (g_pCurrDb) ? g_pCurrDb->EnumContactSettings(hContact, CheckIfModuleIsEmptyProc, szModule, 0) < 0 : true; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -struct EnumProcParam -{ - MCONTACT hContact; - LPCSTR szModule, szNewModule; -}; - -static int EnumProc(const char *szSetting, void *lParam) -{ - EnumProcParam *param = (EnumProcParam *)lParam; - - DBVARIANT dbv; - if (!db_get(param->hContact, param->szModule, szSetting, &dbv)) { - db_set(param->hContact, param->szNewModule, szSetting, &dbv); - db_free(&dbv); - } - return 0; -} - -MIR_CORE_DLL(int) db_copy_module(const char *szModule, const char *szNewModule, MCONTACT hContact) -{ - EnumProcParam param = { hContact, szModule, szNewModule }; - return db_enum_settings(hContact, EnumProc, szModule, ¶m); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// contact functions - -MIR_CORE_DLL(MCONTACT) db_add_contact(void) -{ - MCONTACT hNew = (g_pCurrDb) ? g_pCurrDb->AddContact() : 0; - Netlib_Logf(nullptr, "New contact created: %d", hNew); - return hNew; -} - -MIR_CORE_DLL(int) db_delete_contact(MCONTACT hContact) -{ - ptrW wszPhoto(db_get_wsa(hContact, "ContactPhoto", "File")); - if (wszPhoto != nullptr) { - #ifdef _MSC_VER - DeleteFileW(wszPhoto); - #else - remove(T2Utf(wszPhoto)); - #endif - } - - Netlib_Logf(nullptr, "Contact deleted: %d", hContact); - return (g_pCurrDb) ? g_pCurrDb->DeleteContact(hContact) : 0; -} - -MIR_CORE_DLL(int) db_is_contact(MCONTACT hContact) -{ - return (g_pCurrDb) ? g_pCurrDb->IsDbContact(hContact) : 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// enumerators - -MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC pFunc, void *param) -{ - return (g_pCurrDb) ? g_pCurrDb->EnumModuleNames(pFunc, param) : 0; -} - -MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, void *param) -{ - return (g_pCurrDb) ? g_pCurrDb->EnumResidentSettings(pFunc, param) : 0; -} - -MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pFunc, const char *szModule, void *param) -{ - return (g_pCurrDb) ? g_pCurrDb->EnumContactSettings(hContact, pFunc, szModule, param) : 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// getting data - -MIR_CORE_DLL(int) db_get_b(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) -{ - if (g_pCurrDb != nullptr) { - DBVARIANT dbv; - if (!g_pCurrDb->GetContactSetting(hContact, szModule, szSetting, &dbv)) - { - switch(dbv.type) { - case DBVT_BYTE: return dbv.bVal; - case DBVT_WORD: return uint8_t(dbv.wVal); - case DBVT_DWORD: return uint8_t(dbv.dVal); - } - g_pCurrDb->FreeVariant(&dbv); - } - } - return errorValue; -} - -MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) -{ - if (g_pCurrDb != nullptr) { - DBVARIANT dbv; - if (!g_pCurrDb->GetContactSetting(hContact, szModule, szSetting, &dbv)) { - switch(dbv.type) { - case DBVT_BYTE: return dbv.bVal; - case DBVT_WORD: return dbv.wVal; - case DBVT_DWORD: return uint16_t(dbv.dVal); - } - g_pCurrDb->FreeVariant(&dbv); - } - } - return errorValue; -} - -MIR_CORE_DLL(uint32_t) db_get_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t errorValue) -{ - if (g_pCurrDb != nullptr) { - DBVARIANT dbv; - if (!g_pCurrDb->GetContactSetting(hContact, szModule, szSetting, &dbv)) { - switch(dbv.type) { - case DBVT_BYTE: return dbv.bVal; - case DBVT_WORD: return dbv.wVal; - case DBVT_DWORD: return dbv.dVal; - } - g_pCurrDb->FreeVariant(&dbv); - } - } - - return errorValue; -} - -MIR_CORE_DLL(INT_PTR) db_get(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) -{ - if (g_pCurrDb == nullptr) - return 1; - - return g_pCurrDb->GetContactSetting(hContact, szModule, szSetting, dbv); -} - -MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType) -{ - if (g_pCurrDb == nullptr) - return 1; - - dbv->type = (uint8_t)nType; - return g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, dbv); -} - -MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue) -{ - if (g_pCurrDb) { - DBVARIANT dbv = { DBVT_ASCIIZ }; - if (!g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) - return dbv.pszVal; - } - - return (szValue == nullptr) ? nullptr : mir_strdup(szValue); -} - -MIR_CORE_DLL(char*) db_get_utfa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue) -{ - if (g_pCurrDb) { - DBVARIANT dbv = { DBVT_UTF8 }; - if (!g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) - return dbv.pszVal; - } - - return (szValue == nullptr) ? nullptr : mir_strdup(szValue); -} - -MIR_CORE_DLL(wchar_t*) db_get_wsa(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szValue) -{ - if (g_pCurrDb) { - DBVARIANT dbv = { DBVT_WCHAR }; - if (!g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) - return dbv.pwszVal; - } - - return (szValue == nullptr) ? nullptr : mir_wstrdup(szValue); -} - -MIR_CORE_DLL(CMStringA) db_get_sm(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, const char *szValue) -{ - if (g_pCurrDb == nullptr) - return (szValue == nullptr) ? CMStringA() : CMStringA(szValue); - - DBVARIANT dbv = { DBVT_ASCIIZ }; - if (g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) - return (szValue == nullptr) ? CMStringA() : CMStringA(szValue); - - return CMStringA(ptrA(dbv.pszVal).get()); -} - -MIR_CORE_DLL(CMStringW) db_get_wsm(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, const wchar_t *szValue) -{ - if (g_pCurrDb == nullptr) - return (szValue == nullptr) ? CMStringW() : CMStringW(szValue); - - DBVARIANT dbv = { DBVT_WCHAR }; - if (g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) - return (szValue == nullptr) ? CMStringW() : CMStringW(szValue); - - return CMStringW(ptrW(dbv.pwszVal).get()); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// getting static data - -MIR_CORE_DLL(int) db_get_static(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest) -{ - if (g_pCurrDb == nullptr) - return 1; - - DBVARIANT dbv; - dbv.type = DBVT_ASCIIZ; - dbv.pszVal = pDest; - dbv.cchVal = cbDest; - return g_pCurrDb->GetContactSettingStatic(hContact, szModule, szSetting, &dbv); -} - -MIR_CORE_DLL(int) db_get_static_utf(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest) -{ - if (g_pCurrDb == nullptr) - return 1; - - DBVARIANT dbv; - dbv.type = DBVT_UTF8; - dbv.pszVal = pDest; - dbv.cchVal = cbDest; - return g_pCurrDb->GetContactSettingStatic(hContact, szModule, szSetting, &dbv); -} - -MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, const char *szModule, const char *szSetting, wchar_t *pDest, int cbDest) -{ - if (g_pCurrDb == nullptr) - return 1; - - DBVARIANT dbv; - dbv.type = DBVT_WCHAR; - dbv.pwszVal = pDest; - dbv.cchVal = cbDest; - return g_pCurrDb->GetContactSettingStatic(hContact, szModule, szSetting, &dbv); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// setting data - -MIR_CORE_DLL(INT_PTR) db_set(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) -{ - if (g_pCurrDb == nullptr) return 1; - - return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, dbv); -} - -MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, const char *szModule, const char *szSetting, uint8_t val) -{ - if (g_pCurrDb == nullptr) return 1; - - DBVARIANT dbv; - dbv.type = DBVT_BYTE; - dbv.bVal = val; - return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); -} - -MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const char *szSetting, uint16_t val) -{ - if (g_pCurrDb == nullptr) return 1; - - DBVARIANT dbv; - dbv.type = DBVT_WORD; - dbv.wVal = val; - return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); -} - -MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t val) -{ - if (g_pCurrDb == nullptr) return 1; - - DBVARIANT dbv; - dbv.type = DBVT_DWORD; - dbv.dVal = val; - return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); -} - -MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val) -{ - if (g_pCurrDb == nullptr) return 1; - - DBVARIANT dbv; - dbv.type = DBVT_ASCIIZ; - dbv.pszVal = (char*)(val == nullptr ? "" : val); - return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); -} - -MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *val) -{ - if (g_pCurrDb == nullptr) return 1; - - DBVARIANT dbv; - dbv.type = DBVT_WCHAR; - dbv.pwszVal = (wchar_t*)(val == nullptr ? L"" : val); - return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); -} - -MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val) -{ - if (g_pCurrDb == nullptr) return 1; - - DBVARIANT dbv; - dbv.type = DBVT_UTF8; - dbv.pszVal = (char*)(val == nullptr ? "" : val); - return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); -} - -MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, const char *szModule, const char *szSetting, const void *val, unsigned len) -{ - if (g_pCurrDb == nullptr) return 1; - - DBVARIANT dbv; - dbv.type = DBVT_BLOB; - dbv.cpbVal = (uint16_t)len; - dbv.pbVal = (unsigned char*)val; - return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// events - -MIR_CORE_DLL(MEVENT) db_event_add(MCONTACT hContact, const DBEVENTINFO *dbei) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->AddEvent(hContact, dbei); -} - -MIR_CORE_DLL(int) db_event_count(MCONTACT hContact) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->GetEventCount(hContact); -} - -MIR_CORE_DLL(int) db_event_delete(MEVENT hDbEvent) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->DeleteEvent(hDbEvent); -} - -MIR_CORE_DLL(int) db_event_edit(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *dbei) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->EditEvent(hContact, hDbEvent, dbei); -} - -MIR_CORE_DLL(MEVENT) db_event_first(MCONTACT hContact) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindFirstEvent(hContact); -} - -MIR_CORE_DLL(MEVENT) db_event_firstUnread(MCONTACT hContact) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindFirstUnreadEvent(hContact); -} - -MIR_CORE_DLL(int) db_event_get(MEVENT hDbEvent, DBEVENTINFO *dbei) -{ - return (g_pCurrDb == nullptr) ? 1 : g_pCurrDb->GetEvent(hDbEvent, dbei); -} - -MIR_CORE_DLL(int) db_event_getBlobSize(MEVENT hDbEvent) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->GetBlobSize(hDbEvent); -} - -MIR_CORE_DLL(MCONTACT) db_event_getContact(MEVENT hDbEvent) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->GetEventContact(hDbEvent); -} - -MIR_CORE_DLL(MEVENT) db_event_last(MCONTACT hContact) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindLastEvent(hContact); -} - -MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, MEVENT hDbEvent) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->MarkEventRead(hContact, hDbEvent); -} - -MIR_CORE_DLL(MEVENT) db_event_next(MCONTACT hContact, MEVENT hDbEvent) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindNextEvent(hContact, hDbEvent); -} - -MIR_CORE_DLL(MEVENT) db_event_prev(MCONTACT hContact, MEVENT hDbEvent) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindPrevEvent(hContact, hDbEvent); -} - -MIR_CORE_DLL(MEVENT) db_event_replace(MCONTACT hContact, const DBEVENTINFO *dbei) -{ - MEVENT ret = 0; - if (dbei->szId) - ret = db_event_getById(dbei->szModule, dbei->szId); - if (!ret) - ret = db_event_add(hContact, dbei); - // do not uncomment - // else - // db_event_edit(hContact, ret, dbei); - return ret; -} - -MIR_CORE_DLL(MEVENT) db_event_getById(const char *szModule, const char *szId) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->GetEventById(szModule, szId); -} - -MIR_CORE_DLL(int) db_event_updateId(MEVENT hDbEvent, const char *szId) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->UpdateEventId(hDbEvent, szId); -} - -///////////////////////////////////////////////////////////////////////////////////////// -// event cursors - -DB::EventCursor::~EventCursor() -{ -} - -MIR_CORE_DLL(DB::EventCursor*) DB::Events(MCONTACT hContact, MEVENT iStartEvent) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->EventCursor(hContact, iStartEvent); -} - -MIR_CORE_DLL(DB::EventCursor*) DB::EventsRev(MCONTACT hContact, MEVENT iStartEvent) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->EventCursorRev(hContact, iStartEvent); -} - -DB::ECPTR::ECPTR(EventCursor *_pCursor) : - m_cursor(_pCursor), - m_prevFetched(-1), - m_currEvent(0) -{ -} - -DB::ECPTR::~ECPTR() -{ - delete m_cursor; -} - -void DB::ECPTR::DeleteEvent() -{ - m_prevFetched = m_cursor->FetchNext(); - db_event_delete(m_currEvent); -} - -MEVENT DB::ECPTR::FetchNext() -{ - if (m_prevFetched != -1) { - m_currEvent = m_prevFetched; - m_prevFetched = -1; - } - else m_currEvent = m_cursor->FetchNext(); - - return m_currEvent; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// misc functions - -MIR_CORE_DLL(INT_PTR) db_free(DBVARIANT *dbv) -{ - return (g_pCurrDb == nullptr) ? 1 : g_pCurrDb->FreeVariant(dbv); -} - -MIR_CORE_DLL(INT_PTR) db_unset(MCONTACT hContact, const char *szModule, const char *szSetting) -{ - if (g_pCurrDb == nullptr) - return 1; - - return g_pCurrDb->DeleteContactSetting(hContact, szModule, szSetting); -} - -MIR_CORE_DLL(DBCachedContact*) db_get_contact(MCONTACT hContact) -{ - return (g_pCurrDb == nullptr) ? nullptr : g_pCurrDb->getCache()->GetCachedContact(hContact); -} - -MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindFirstContact(szProto); -} - -MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto) -{ - return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindNextContact(hContact, szProto); -} - -MIR_CORE_DLL(void) db_setCurrent(MDatabaseCommon *_db) -{ - g_pCurrDb = _db; - if (g_pCurrDb == nullptr) - return; - - // try to get the langpack's name from a profile - ptrW langpack(db_get_wsa(0, "Langpack", "Current")); - if (langpack && langpack[0] != '\0') - LoadLangPack(langpack); - else - GetDefaultLang(); -} - -MIR_CORE_DLL(BOOL) db_set_resident(const char *szModule, const char *szService, BOOL bEnable) -{ - if (g_pCurrDb == nullptr || szModule == nullptr || szService == nullptr) - return FALSE; - - char str[MAXMODULELABELLENGTH * 2]; - mir_snprintf(str, "%s/%s", szModule, szService); - return g_pCurrDb->SetSettingResident(bEnable, str); -} +/* + +Miranda NG: the free IM client for Microsoft* Windows* + +Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org), +Copyright (c) 2000-12 Miranda IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "stdafx.h" + +MIR_CORE_EXPORT MDatabaseCommon* g_pCurrDb = nullptr; + +///////////////////////////////////////////////////////////////////////////////////////// +// database functions + +MIR_CORE_DLL(void) db_set_safety_mode(BOOL bNewMode) +{ + if (g_pCurrDb) + g_pCurrDb->SetCacheSafetyMode(bNewMode != 0); +} + +MIR_CORE_DLL(int) db_get_contact_count(void) +{ + return (g_pCurrDb) ? g_pCurrDb->GetContactCount() : 0; +} + +MIR_CORE_DLL(MDatabaseCommon*) db_get_current() +{ + return g_pCurrDb; +} + +MIR_CORE_DLL(int) db_delete_module(MCONTACT hContact, const char *szModuleName) +{ + return (g_pCurrDb) ? g_pCurrDb->DeleteModule(hContact, szModuleName) : 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +static int CheckIfModuleIsEmptyProc(const char *, void *) +{ + return 1; +} + +MIR_CORE_DLL(bool) db_is_module_empty(MCONTACT hContact, const char *szModule) +{ + return (g_pCurrDb) ? g_pCurrDb->EnumContactSettings(hContact, CheckIfModuleIsEmptyProc, szModule, 0) < 0 : true; +} + +///////////////////////////////////////////////////////////////////////////////////////// + +struct EnumProcParam +{ + MCONTACT hContact; + LPCSTR szModule, szNewModule; +}; + +static int EnumProc(const char *szSetting, void *lParam) +{ + EnumProcParam *param = (EnumProcParam *)lParam; + + DBVARIANT dbv; + if (!db_get(param->hContact, param->szModule, szSetting, &dbv)) { + db_set(param->hContact, param->szNewModule, szSetting, &dbv); + db_free(&dbv); + } + return 0; +} + +MIR_CORE_DLL(int) db_copy_module(const char *szModule, const char *szNewModule, MCONTACT hContact) +{ + EnumProcParam param = { hContact, szModule, szNewModule }; + return db_enum_settings(hContact, EnumProc, szModule, ¶m); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// contact functions + +MIR_CORE_DLL(MCONTACT) db_add_contact(void) +{ + MCONTACT hNew = (g_pCurrDb) ? g_pCurrDb->AddContact() : 0; + Netlib_Logf(nullptr, "New contact created: %d", hNew); + return hNew; +} + +MIR_CORE_DLL(int) db_delete_contact(MCONTACT hContact) +{ + ptrW wszPhoto(db_get_wsa(hContact, "ContactPhoto", "File")); + if (wszPhoto != nullptr) { + #ifdef _MSC_VER + DeleteFileW(wszPhoto); + #else + remove(T2Utf(wszPhoto)); + #endif + } + + Netlib_Logf(nullptr, "Contact deleted: %d", hContact); + return (g_pCurrDb) ? g_pCurrDb->DeleteContact(hContact) : 0; +} + +MIR_CORE_DLL(int) db_is_contact(MCONTACT hContact) +{ + return (g_pCurrDb) ? g_pCurrDb->IsDbContact(hContact) : 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// enumerators + +MIR_CORE_DLL(int) db_enum_modules(DBMODULEENUMPROC pFunc, void *param) +{ + return (g_pCurrDb) ? g_pCurrDb->EnumModuleNames(pFunc, param) : 0; +} + +MIR_CORE_DLL(int) db_enum_residents(DBMODULEENUMPROC pFunc, void *param) +{ + return (g_pCurrDb) ? g_pCurrDb->EnumResidentSettings(pFunc, param) : 0; +} + +MIR_CORE_DLL(int) db_enum_settings(MCONTACT hContact, DBSETTINGENUMPROC pFunc, const char *szModule, void *param) +{ + return (g_pCurrDb) ? g_pCurrDb->EnumContactSettings(hContact, pFunc, szModule, param) : 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// getting data + +MIR_CORE_DLL(int) db_get_b(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) +{ + if (g_pCurrDb != nullptr) { + DBVARIANT dbv; + if (!g_pCurrDb->GetContactSetting(hContact, szModule, szSetting, &dbv)) + { + switch(dbv.type) { + case DBVT_BYTE: return dbv.bVal; + case DBVT_WORD: return uint8_t(dbv.wVal); + case DBVT_DWORD: return uint8_t(dbv.dVal); + } + g_pCurrDb->FreeVariant(&dbv); + } + } + return errorValue; +} + +MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) +{ + if (g_pCurrDb != nullptr) { + DBVARIANT dbv; + if (!g_pCurrDb->GetContactSetting(hContact, szModule, szSetting, &dbv)) { + switch(dbv.type) { + case DBVT_BYTE: return dbv.bVal; + case DBVT_WORD: return dbv.wVal; + case DBVT_DWORD: return uint16_t(dbv.dVal); + } + g_pCurrDb->FreeVariant(&dbv); + } + } + return errorValue; +} + +MIR_CORE_DLL(uint32_t) db_get_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t errorValue) +{ + if (g_pCurrDb != nullptr) { + DBVARIANT dbv; + if (!g_pCurrDb->GetContactSetting(hContact, szModule, szSetting, &dbv)) { + switch(dbv.type) { + case DBVT_BYTE: return dbv.bVal; + case DBVT_WORD: return dbv.wVal; + case DBVT_DWORD: return dbv.dVal; + } + g_pCurrDb->FreeVariant(&dbv); + } + } + + return errorValue; +} + +MIR_CORE_DLL(INT_PTR) db_get(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) +{ + if (g_pCurrDb == nullptr) + return 1; + + return g_pCurrDb->GetContactSetting(hContact, szModule, szSetting, dbv); +} + +MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType) +{ + if (g_pCurrDb == nullptr) + return 1; + + dbv->type = (uint8_t)nType; + return g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, dbv); +} + +MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue) +{ + if (g_pCurrDb) { + DBVARIANT dbv = { DBVT_ASCIIZ }; + if (!g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) + return dbv.pszVal; + } + + return (szValue == nullptr) ? nullptr : mir_strdup(szValue); +} + +MIR_CORE_DLL(char*) db_get_utfa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue) +{ + if (g_pCurrDb) { + DBVARIANT dbv = { DBVT_UTF8 }; + if (!g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) + return dbv.pszVal; + } + + return (szValue == nullptr) ? nullptr : mir_strdup(szValue); +} + +MIR_CORE_DLL(wchar_t*) db_get_wsa(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szValue) +{ + if (g_pCurrDb) { + DBVARIANT dbv = { DBVT_WCHAR }; + if (!g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) + return dbv.pwszVal; + } + + return (szValue == nullptr) ? nullptr : mir_wstrdup(szValue); +} + +MIR_CORE_DLL(CMStringA) db_get_sm(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, const char *szValue) +{ + if (g_pCurrDb == nullptr) + return (szValue == nullptr) ? CMStringA() : CMStringA(szValue); + + DBVARIANT dbv = { DBVT_ASCIIZ }; + if (g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) + return (szValue == nullptr) ? CMStringA() : CMStringA(szValue); + + return CMStringA(ptrA(dbv.pszVal).get()); +} + +MIR_CORE_DLL(CMStringW) db_get_wsm(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, const wchar_t *szValue) +{ + if (g_pCurrDb == nullptr) + return (szValue == nullptr) ? CMStringW() : CMStringW(szValue); + + DBVARIANT dbv = { DBVT_WCHAR }; + if (g_pCurrDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv)) + return (szValue == nullptr) ? CMStringW() : CMStringW(szValue); + + return CMStringW(ptrW(dbv.pwszVal).get()); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// getting static data + +MIR_CORE_DLL(int) db_get_static(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest) +{ + if (g_pCurrDb == nullptr) + return 1; + + DBVARIANT dbv; + dbv.type = DBVT_ASCIIZ; + dbv.pszVal = pDest; + dbv.cchVal = cbDest; + return g_pCurrDb->GetContactSettingStatic(hContact, szModule, szSetting, &dbv); +} + +MIR_CORE_DLL(int) db_get_static_utf(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest) +{ + if (g_pCurrDb == nullptr) + return 1; + + DBVARIANT dbv; + dbv.type = DBVT_UTF8; + dbv.pszVal = pDest; + dbv.cchVal = cbDest; + return g_pCurrDb->GetContactSettingStatic(hContact, szModule, szSetting, &dbv); +} + +MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, const char *szModule, const char *szSetting, wchar_t *pDest, int cbDest) +{ + if (g_pCurrDb == nullptr) + return 1; + + DBVARIANT dbv; + dbv.type = DBVT_WCHAR; + dbv.pwszVal = pDest; + dbv.cchVal = cbDest; + return g_pCurrDb->GetContactSettingStatic(hContact, szModule, szSetting, &dbv); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// setting data + +MIR_CORE_DLL(INT_PTR) db_set(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) +{ + if (g_pCurrDb == nullptr) return 1; + + return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, dbv); +} + +MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, const char *szModule, const char *szSetting, uint8_t val) +{ + if (g_pCurrDb == nullptr) return 1; + + DBVARIANT dbv; + dbv.type = DBVT_BYTE; + dbv.bVal = val; + return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); +} + +MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const char *szSetting, uint16_t val) +{ + if (g_pCurrDb == nullptr) return 1; + + DBVARIANT dbv; + dbv.type = DBVT_WORD; + dbv.wVal = val; + return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); +} + +MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t val) +{ + if (g_pCurrDb == nullptr) return 1; + + DBVARIANT dbv; + dbv.type = DBVT_DWORD; + dbv.dVal = val; + return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); +} + +MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val) +{ + if (g_pCurrDb == nullptr) return 1; + + DBVARIANT dbv; + dbv.type = DBVT_ASCIIZ; + dbv.pszVal = (char*)(val == nullptr ? "" : val); + return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); +} + +MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *val) +{ + if (g_pCurrDb == nullptr) return 1; + + DBVARIANT dbv; + dbv.type = DBVT_WCHAR; + dbv.pwszVal = (wchar_t*)(val == nullptr ? L"" : val); + return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); +} + +MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val) +{ + if (g_pCurrDb == nullptr) return 1; + + DBVARIANT dbv; + dbv.type = DBVT_UTF8; + dbv.pszVal = (char*)(val == nullptr ? "" : val); + return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); +} + +MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, const char *szModule, const char *szSetting, const void *val, unsigned len) +{ + if (g_pCurrDb == nullptr) return 1; + + DBVARIANT dbv; + dbv.type = DBVT_BLOB; + dbv.cpbVal = (uint16_t)len; + dbv.pbVal = (unsigned char*)val; + return g_pCurrDb->WriteContactSetting(hContact, szModule, szSetting, &dbv); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// events + +MIR_CORE_DLL(MEVENT) db_event_add(MCONTACT hContact, const DBEVENTINFO *dbei) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->AddEvent(hContact, dbei); +} + +MIR_CORE_DLL(int) db_event_count(MCONTACT hContact) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->GetEventCount(hContact); +} + +MIR_CORE_DLL(int) db_event_delete(MEVENT hDbEvent) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->DeleteEvent(hDbEvent); +} + +MIR_CORE_DLL(int) db_event_edit(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO *dbei) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->EditEvent(hContact, hDbEvent, dbei); +} + +MIR_CORE_DLL(MEVENT) db_event_first(MCONTACT hContact) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindFirstEvent(hContact); +} + +MIR_CORE_DLL(MEVENT) db_event_firstUnread(MCONTACT hContact) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindFirstUnreadEvent(hContact); +} + +MIR_CORE_DLL(int) db_event_get(MEVENT hDbEvent, DBEVENTINFO *dbei) +{ + return (g_pCurrDb == nullptr) ? 1 : g_pCurrDb->GetEvent(hDbEvent, dbei); +} + +MIR_CORE_DLL(int) db_event_getBlobSize(MEVENT hDbEvent) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->GetBlobSize(hDbEvent); +} + +MIR_CORE_DLL(MCONTACT) db_event_getContact(MEVENT hDbEvent) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->GetEventContact(hDbEvent); +} + +MIR_CORE_DLL(MEVENT) db_event_last(MCONTACT hContact) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindLastEvent(hContact); +} + +MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, MEVENT hDbEvent) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->MarkEventRead(hContact, hDbEvent); +} + +MIR_CORE_DLL(MEVENT) db_event_next(MCONTACT hContact, MEVENT hDbEvent) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindNextEvent(hContact, hDbEvent); +} + +MIR_CORE_DLL(MEVENT) db_event_prev(MCONTACT hContact, MEVENT hDbEvent) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindPrevEvent(hContact, hDbEvent); +} + +MIR_CORE_DLL(MEVENT) db_event_replace(MCONTACT hContact, const DBEVENTINFO *dbei) +{ + MEVENT ret = 0; + if (dbei->szId) + ret = db_event_getById(dbei->szModule, dbei->szId); + if (!ret) + ret = db_event_add(hContact, dbei); + // do not uncomment + // else + // db_event_edit(hContact, ret, dbei); + return ret; +} + +MIR_CORE_DLL(MEVENT) db_event_getById(const char *szModule, const char *szId) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->GetEventById(szModule, szId); +} + +MIR_CORE_DLL(int) db_event_updateId(MEVENT hDbEvent, const char *szId) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->UpdateEventId(hDbEvent, szId); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// event cursors + +DB::EventCursor::~EventCursor() +{ +} + +MIR_CORE_DLL(DB::EventCursor*) DB::Events(MCONTACT hContact, MEVENT iStartEvent) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->EventCursor(hContact, iStartEvent); +} + +MIR_CORE_DLL(DB::EventCursor*) DB::EventsRev(MCONTACT hContact, MEVENT iStartEvent) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->EventCursorRev(hContact, iStartEvent); +} + +DB::ECPTR::ECPTR(EventCursor *_pCursor) : + m_cursor(_pCursor), + m_prevFetched(-1), + m_currEvent(0) +{ +} + +DB::ECPTR::~ECPTR() +{ + delete m_cursor; +} + +void DB::ECPTR::DeleteEvent() +{ + m_prevFetched = m_cursor->FetchNext(); + db_event_delete(m_currEvent); +} + +MEVENT DB::ECPTR::FetchNext() +{ + if (m_prevFetched != -1) { + m_currEvent = m_prevFetched; + m_prevFetched = -1; + } + else m_currEvent = m_cursor->FetchNext(); + + return m_currEvent; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// misc functions + +MIR_CORE_DLL(INT_PTR) db_free(DBVARIANT *dbv) +{ + return (g_pCurrDb == nullptr) ? 1 : g_pCurrDb->FreeVariant(dbv); +} + +MIR_CORE_DLL(INT_PTR) db_unset(MCONTACT hContact, const char *szModule, const char *szSetting) +{ + if (g_pCurrDb == nullptr) + return 1; + + return g_pCurrDb->DeleteContactSetting(hContact, szModule, szSetting); +} + +MIR_CORE_DLL(DBCachedContact*) db_get_contact(MCONTACT hContact) +{ + return (g_pCurrDb == nullptr) ? nullptr : g_pCurrDb->getCache()->GetCachedContact(hContact); +} + +MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindFirstContact(szProto); +} + +MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto) +{ + return (g_pCurrDb == nullptr) ? 0 : g_pCurrDb->FindNextContact(hContact, szProto); +} + +MIR_CORE_DLL(void) db_setCurrent(MDatabaseCommon *_db) +{ + g_pCurrDb = _db; + if (g_pCurrDb == nullptr) + return; + + // try to get the langpack's name from a profile + ptrW langpack(db_get_wsa(0, "Langpack", "Current")); + if (langpack && langpack[0] != '\0') + LoadLangPack(langpack); + else + GetDefaultLang(); +} + +MIR_CORE_DLL(BOOL) db_set_resident(const char *szModule, const char *szService, BOOL bEnable) +{ + if (g_pCurrDb == nullptr || szModule == nullptr || szService == nullptr) + return FALSE; + + char str[MAXMODULELABELLENGTH * 2]; + mir_snprintf(str, "%s/%s", szModule, szService); + return g_pCurrDb->SetSettingResident(bEnable, str); +} -- cgit v1.2.3