From ab2438d317799cc265c6f392f877947c61ecd585 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 4 Jun 2012 12:56:59 +0000 Subject: typo fix git-svn-id: http://svn.miranda-ng.org/main/trunk@297 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewsAggregator/AtomText.txt | 482 +++++++ plugins/NewsAggregator/NewsAggregator_10.sln | 26 + plugins/NewsAggregator/NewsAggregator_10.vcxproj | 210 +++ .../NewsAggregator_10.vcxproj.filters | 79 ++ plugins/NewsAggregator/Res/AddFeed.ico | Bin 0 -> 318 bytes plugins/NewsAggregator/Res/CheckALL.ico | Bin 0 -> 318 bytes plugins/NewsAggregator/Res/Export.ico | Bin 0 -> 318 bytes plugins/NewsAggregator/Res/Import.ico | Bin 0 -> 318 bytes plugins/NewsAggregator/Res/Main.ico | Bin 0 -> 6318 bytes plugins/NewsAggregator/Resource.rc | 148 +++ plugins/NewsAggregator/RssText.txt | 713 ++++++++++ plugins/NewsAggregator/Src/Common.h | 162 +++ plugins/NewsAggregator/Src/Entities.cpp | 381 ++++++ plugins/NewsAggregator/Src/Icons.cpp | 79 ++ plugins/NewsAggregator/Src/Menus.cpp | 78 ++ plugins/NewsAggregator/Src/NewsAggregator.cpp | 141 ++ plugins/NewsAggregator/Src/Options.cpp | 649 +++++++++ plugins/NewsAggregator/Src/Services.cpp | 240 ++++ plugins/NewsAggregator/Src/Update.cpp | 147 ++ plugins/NewsAggregator/Src/Utils.cpp | 1404 ++++++++++++++++++++ plugins/NewsAggregator/ToDo.txt | 11 + plugins/NewsAggregator/Version.h | 28 + plugins/NewsAggregator/Version.rc | 38 + plugins/NewsAggregator/resource.h | 39 + plugins/NewsAggregstor/AtomText.txt | 482 ------- plugins/NewsAggregstor/NewsAggregator_10.sln | 26 - plugins/NewsAggregstor/NewsAggregator_10.vcxproj | 210 --- .../NewsAggregator_10.vcxproj.filters | 79 -- plugins/NewsAggregstor/Res/AddFeed.ico | Bin 318 -> 0 bytes plugins/NewsAggregstor/Res/CheckALL.ico | Bin 318 -> 0 bytes plugins/NewsAggregstor/Res/Export.ico | Bin 318 -> 0 bytes plugins/NewsAggregstor/Res/Import.ico | Bin 318 -> 0 bytes plugins/NewsAggregstor/Res/Main.ico | Bin 6318 -> 0 bytes plugins/NewsAggregstor/Resource.rc | 148 --- plugins/NewsAggregstor/RssText.txt | 713 ---------- plugins/NewsAggregstor/Src/Common.h | 162 --- plugins/NewsAggregstor/Src/Entities.cpp | 381 ------ plugins/NewsAggregstor/Src/Icons.cpp | 79 -- plugins/NewsAggregstor/Src/Menus.cpp | 78 -- plugins/NewsAggregstor/Src/NewsAggregator.cpp | 141 -- plugins/NewsAggregstor/Src/Options.cpp | 649 --------- plugins/NewsAggregstor/Src/Services.cpp | 240 ---- plugins/NewsAggregstor/Src/Update.cpp | 147 -- plugins/NewsAggregstor/Src/Utils.cpp | 1404 -------------------- plugins/NewsAggregstor/ToDo.txt | 11 - plugins/NewsAggregstor/Version.h | 28 - plugins/NewsAggregstor/Version.rc | 38 - plugins/NewsAggregstor/resource.h | 39 - 48 files changed, 5055 insertions(+), 5055 deletions(-) create mode 100644 plugins/NewsAggregator/AtomText.txt create mode 100644 plugins/NewsAggregator/NewsAggregator_10.sln create mode 100644 plugins/NewsAggregator/NewsAggregator_10.vcxproj create mode 100644 plugins/NewsAggregator/NewsAggregator_10.vcxproj.filters create mode 100644 plugins/NewsAggregator/Res/AddFeed.ico create mode 100644 plugins/NewsAggregator/Res/CheckALL.ico create mode 100644 plugins/NewsAggregator/Res/Export.ico create mode 100644 plugins/NewsAggregator/Res/Import.ico create mode 100644 plugins/NewsAggregator/Res/Main.ico create mode 100644 plugins/NewsAggregator/Resource.rc create mode 100644 plugins/NewsAggregator/RssText.txt create mode 100644 plugins/NewsAggregator/Src/Common.h create mode 100644 plugins/NewsAggregator/Src/Entities.cpp create mode 100644 plugins/NewsAggregator/Src/Icons.cpp create mode 100644 plugins/NewsAggregator/Src/Menus.cpp create mode 100644 plugins/NewsAggregator/Src/NewsAggregator.cpp create mode 100644 plugins/NewsAggregator/Src/Options.cpp create mode 100644 plugins/NewsAggregator/Src/Services.cpp create mode 100644 plugins/NewsAggregator/Src/Update.cpp create mode 100644 plugins/NewsAggregator/Src/Utils.cpp create mode 100644 plugins/NewsAggregator/ToDo.txt create mode 100644 plugins/NewsAggregator/Version.h create mode 100644 plugins/NewsAggregator/Version.rc create mode 100644 plugins/NewsAggregator/resource.h delete mode 100644 plugins/NewsAggregstor/AtomText.txt delete mode 100644 plugins/NewsAggregstor/NewsAggregator_10.sln delete mode 100644 plugins/NewsAggregstor/NewsAggregator_10.vcxproj delete mode 100644 plugins/NewsAggregstor/NewsAggregator_10.vcxproj.filters delete mode 100644 plugins/NewsAggregstor/Res/AddFeed.ico delete mode 100644 plugins/NewsAggregstor/Res/CheckALL.ico delete mode 100644 plugins/NewsAggregstor/Res/Export.ico delete mode 100644 plugins/NewsAggregstor/Res/Import.ico delete mode 100644 plugins/NewsAggregstor/Res/Main.ico delete mode 100644 plugins/NewsAggregstor/Resource.rc delete mode 100644 plugins/NewsAggregstor/RssText.txt delete mode 100644 plugins/NewsAggregstor/Src/Common.h delete mode 100644 plugins/NewsAggregstor/Src/Entities.cpp delete mode 100644 plugins/NewsAggregstor/Src/Icons.cpp delete mode 100644 plugins/NewsAggregstor/Src/Menus.cpp delete mode 100644 plugins/NewsAggregstor/Src/NewsAggregator.cpp delete mode 100644 plugins/NewsAggregstor/Src/Options.cpp delete mode 100644 plugins/NewsAggregstor/Src/Services.cpp delete mode 100644 plugins/NewsAggregstor/Src/Update.cpp delete mode 100644 plugins/NewsAggregstor/Src/Utils.cpp delete mode 100644 plugins/NewsAggregstor/ToDo.txt delete mode 100644 plugins/NewsAggregstor/Version.h delete mode 100644 plugins/NewsAggregstor/Version.rc delete mode 100644 plugins/NewsAggregstor/resource.h diff --git a/plugins/NewsAggregator/AtomText.txt b/plugins/NewsAggregator/AtomText.txt new file mode 100644 index 0000000000..052516a6bb --- /dev/null +++ b/plugins/NewsAggregator/AtomText.txt @@ -0,0 +1,482 @@ + + + + 2012-01-04T06:45:38Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic + + watcher-miranda project updates - Google Code + + + + + + 2012-01-04T06:45:38Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12pftbjzm31hlgp204cepjgmoicsl1oq1w + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=miranda-0.10.latest-vc2010_x64-static.7z">miranda-0.10.latest-vc2010_x64-static.7z</a> (Miranda IM 0.10.0 Alpha #2 VC2010 x64) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2012-01-03T21:06:03Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12qdzfqdumlchjgm04cepjgmoicsl1oq1w + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=miranda-v0100a2w11.7z">miranda-v0100a2w11.7z</a> (T - ) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2012-01-03T20:47:25Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z135ypx45kehgtcq304cepjgmoicsl1oq1w + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=miranda-v0100a2w11.7z">miranda-v0100a2w11.7z</a> (Miranda IM 0.10.0 Alpha #2 VC6111) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2012-01-03T09:21:55Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12szb1zzybuejnnv22pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=mirotr1.7z">mirotr1.7z</a> (Miranda IM 0.10.0 Alpha #2 VC6) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2012-01-02T20:12:28Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12ltxpzuvr4xvahk04cepjgmoicsl1oq1w + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=miranda32.exe">miranda32.exe</a> (Miranda32 v.0.9.40.0) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2012-01-01T18:00:06Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13idtjadwu5y3q2322pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.1.0.exe">Miranda IM Watcher Pack v3.1.0.exe</a> (Miranda IM Watcher Pack v3.1.0) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + + <span class="ot-field-label">Type-Installer</span> + + + + <span class="ot-field-label">OpSys-Windows</span> + + + </span> + </div> + + + + + 2011-12-30T11:06:47Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12vzfygpwqng3m3b22pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda_Empoli_Pack_Mod.exe">Miranda_Empoli_Pack_Mod.exe</a> (Miranda IM Empoli Pack Mod v.2.2 (core 0.9.39)) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2011-12-29T14:08:24Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z135in4x1yi1fd2ou04cepjgmoicsl1oq1w + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=mirotr.7z">mirotr.7z</a> (MirOTR 0.11.0.3) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2011-12-25T10:59:24Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13dgrs5elfkfp0n122pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=LangpackSuite.exe">LangpackSuite.exe</a> (Test upload) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2011-12-25T10:58:18Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13cu14hyzzawjmev22pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=LangpackSuite.exe">LangpackSuite.exe</a> (Test) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2011-12-21T21:55:28Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12sh1jqflzkj3ofd22pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.9.exe">Miranda IM Watcher Pack v3.0.9.exe</a> (Miranda IM Watcher Pack v3.0.9) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + + <span class="ot-field-label">Type-Installer</span> + + + + <span class="ot-field-label">OpSys-Windows</span> + + + </span> + </div> + + + + + 2011-12-13T19:46:02Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13nxvbpft3ezr5ps04cepjgmoicsl1oq1w + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.8.exe">Miranda IM Watcher Pack v3.0.8.exe</a> (Miranda IM Watcher Pack v3.0.8) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + + <span class="ot-field-label">Type-Installer</span> + + + + <span class="ot-field-label">OpSys-Windows</span> + + + </span> + </div> + + + + + 2011-12-04T10:52:49Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13vubiqswqqe1cf222pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Fingerprint.dll">Fingerprint.dll</a> (Fingerprint.dll WP update) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + + + + + + 2011-12-04T10:52:32Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z125fjy5qruixxloh04cepjgmoicsl1oq1w + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=PackUpdater.dll">PackUpdater.dll</a> (PackUpdater.dll WP update) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + + + + + + 2011-12-03T15:01:42Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13etferquvuyzd0z22pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=packupdater.7z">packupdater.7z</a> (Pack Updater 0.0.1.0) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2011-12-02T22:21:54Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12ysnhy4zi2wvudo22pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=fingerprintmodplus.7z">fingerprintmodplus.7z</a> (Fingerprint Mod Plus 0.2.2.4 (latest svn revision)) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2011-11-28T06:15:02Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13hy1xpcr2hgbrfv22pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.7.exe">Miranda IM Watcher Pack v3.0.7.exe</a> (Miranda IM Watcher Pack v3.0.7) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + + <span class="ot-field-label">Type-Installer</span> + + + + <span class="ot-field-label">OpSys-Windows</span> + + + </span> + </div> + + + + + 2011-11-24T16:35:48Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13mcvxqurmeybypn04cepjgmoicsl1oq1w + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.6.exe">Miranda IM Watcher Pack v3.0.6.exe</a> (Miranda IM Watcher Pack v3.0.6) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + + <span class="ot-field-label">Type-Installer</span> + + + + <span class="ot-field-label">OpSys-Windows</span> + + + </span> + </div> + + + + + 2011-11-23T04:58:16Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13rxxbauu3wxtfmz22pfv4p3ma4ch5kj + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=simplestatusmsg.7z">simplestatusmsg.7z</a> (Simple Status Message 1.9.0.4) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + </span> + </div> + + + + + 2011-11-19T06:13:19Z + http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13di1rprvjfhpta004cepjgmoicsl1oq1w + + <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.5.exe">Miranda IM Watcher Pack v3.0.5.exe</a> (Miranda IM Watcher Pack v3.0.5) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> + + watcherhd + + + <div class="ot-labels-field-wrapper"> + <span class="ot-labels-field-name">Labels: </span> + <span class="ot-labels-field-value"> + + + <span class="ot-field-label">Featured</span> + + + + <span class="ot-field-label">Type-Installer</span> + + + + <span class="ot-field-label">OpSys-Windows</span> + + + </span> + </div> + + + + diff --git a/plugins/NewsAggregator/NewsAggregator_10.sln b/plugins/NewsAggregator/NewsAggregator_10.sln new file mode 100644 index 0000000000..aee50b713e --- /dev/null +++ b/plugins/NewsAggregator/NewsAggregator_10.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewsAggregator", "NewsAggregator_10.vcxproj", "{6DE11A47-2268-4B08-8DE5-15A1705FCE28}" +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 + {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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/plugins/NewsAggregator/NewsAggregator_10.vcxproj b/plugins/NewsAggregator/NewsAggregator_10.vcxproj new file mode 100644 index 0000000000..5b419a7806 --- /dev/null +++ b/plugins/NewsAggregator/NewsAggregator_10.vcxproj @@ -0,0 +1,210 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + NewsAggregator + {6DE11A47-2268-4B08-8DE5-15A1705FCE28} + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\Plugins\ + $(SolutionDir)$(Configuration)64\Plugins\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)\Plugins\ + $(SolutionDir)$(Configuration)64\Plugins\ + $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ + $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ + true + true + true + true + + + + Disabled + ..\..\include;..\ExternalAPI;..\..\..\boost_1_49_0;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;NEWSAGGREGATOR_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Level3 + EditAndContinue + 4996 + Use + Common.h + + + true + Windows + false + $(IntDir)$(TargetName).lib + comdlg32.lib;%(AdditionalDependencies) + ..\..\..\boost_1_49_0\lib + + + ..\..\include\msapi + _DEBUG;%(PreprocessorDefinitions) + + + + + Disabled + ..\..\include;..\ExternalAPI;..\..\..\boost_1_49_0;%(AdditionalIncludeDirectories) + WIN64;_DEBUG;_WINDOWS;_USRDLL;NEWSAGGREGATOR_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Level3 + 4996 + Use + Common.h + + + comdlg32.lib;%(AdditionalDependencies) + true + Windows + false + $(IntDir)$(TargetName).lib + ..\..\..\boost_1_49_0\lib64 + + + ..\..\include\msapi + _DEBUG;%(PreprocessorDefinitions) + + + + + Full + Size + ..\..\include;..\ExternalAPI;..\..\..\boost_1_49_0;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;NEWSAGGREGATOR_EXPORTS;%(PreprocessorDefinitions) + Level3 + 4996 + Use + Common.h + + + Windows + true + true + false + $(IntDir)$(TargetName).lib + true + comdlg32.lib;%(AdditionalDependencies) + ..\..\..\boost_1_49_0\lib + + + ..\..\include\msapi + NDEBUG;%(PreprocessorDefinitions) + + + + + Full + Size + ..\..\include;..\ExternalAPI;..\..\..\boost_1_49_0;%(AdditionalIncludeDirectories) + WIN64;NDEBUG;_WINDOWS;_USRDLL;NEWSAGGREGATOR_EXPORTS;%(PreprocessorDefinitions) + Level3 + 4996 + Use + Common.h + + + comdlg32.lib;%(AdditionalDependencies) + Windows + true + true + false + $(IntDir)$(TargetName).lib + true + ..\..\..\boost_1_49_0\lib64 + + + ..\..\include\msapi + NDEBUG;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/NewsAggregator/NewsAggregator_10.vcxproj.filters b/plugins/NewsAggregator/NewsAggregator_10.vcxproj.filters new file mode 100644 index 0000000000..7b08037070 --- /dev/null +++ b/plugins/NewsAggregator/NewsAggregator_10.vcxproj.filters @@ -0,0 +1,79 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Resource Files + + + Resource Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/plugins/NewsAggregator/Res/AddFeed.ico b/plugins/NewsAggregator/Res/AddFeed.ico new file mode 100644 index 0000000000..2503d8ec60 Binary files /dev/null and b/plugins/NewsAggregator/Res/AddFeed.ico differ diff --git a/plugins/NewsAggregator/Res/CheckALL.ico b/plugins/NewsAggregator/Res/CheckALL.ico new file mode 100644 index 0000000000..98d434b2ba Binary files /dev/null and b/plugins/NewsAggregator/Res/CheckALL.ico differ diff --git a/plugins/NewsAggregator/Res/Export.ico b/plugins/NewsAggregator/Res/Export.ico new file mode 100644 index 0000000000..ef475bb5cd Binary files /dev/null and b/plugins/NewsAggregator/Res/Export.ico differ diff --git a/plugins/NewsAggregator/Res/Import.ico b/plugins/NewsAggregator/Res/Import.ico new file mode 100644 index 0000000000..4becddf394 Binary files /dev/null and b/plugins/NewsAggregator/Res/Import.ico differ diff --git a/plugins/NewsAggregator/Res/Main.ico b/plugins/NewsAggregator/Res/Main.ico new file mode 100644 index 0000000000..4e9d1abc51 Binary files /dev/null and b/plugins/NewsAggregator/Res/Main.ico differ diff --git a/plugins/NewsAggregator/Resource.rc b/plugins/NewsAggregator/Resource.rc new file mode 100644 index 0000000000..a092bb26ea --- /dev/null +++ b/plugins/NewsAggregator/Resource.rc @@ -0,0 +1,148 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// () resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +#pragma code_page(1251) + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ICON ICON "res/Main.ico" +IDI_CHECKALL ICON "res/CheckAll.ico" +IDI_ADDFEED ICON "res/AddFeed.ico" +IDI_IMPORTFEEDS ICON "res/Import.ico" +IDI_EXPORTFEEDS ICON "res/Export.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_OPTIONS DIALOGEX 0, 0, 314, 234 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + CONTROL "",IDC_FEEDLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_TABSTOP,9,8,294,174 + PUSHBUTTON "Add",IDC_ADD,79,187,50,14 + PUSHBUTTON "Change",IDC_CHANGE,133,187,50,14 + PUSHBUTTON "Remove",IDC_REMOVE,187,187,50,14 + PUSHBUTTON "Import",IDC_IMORT,252,204,50,14 + PUSHBUTTON "Export",IDC_EXORT,252,219,50,14 +END + +IDD_ADDFEED DIALOGEX 0, 0, 250, 228 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "OK",IDOK,140,209,50,14 + PUSHBUTTON "Cancel",IDCANCEL,194,209,50,14 + GROUPBOX "General Settings",IDC_STATIC,6,3,238,61 + RTEXT "Title",IDC_STATIC,17,16,44,8 + EDITTEXT IDC_FEEDTITLE,63,14,173,13,ES_AUTOHSCROLL + RTEXT "URL",IDC_STATIC,17,31,44,8 + EDITTEXT IDC_FEEDURL,63,29,173,13,ES_AUTOHSCROLL + RTEXT "Check every",IDC_STATIC,7,46,54,8 + LTEXT "minutes",IDC_STATIC,100,46,75,8 + PUSHBUTTON "Check Feed",IDC_DISCOVERY,177,44,59,12 + GROUPBOX "Authentication",IDC_STATIC,6,67,238,48 + CONTROL "Use &authentication",IDC_USEAUTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,80,157,10 + RTEXT "Login",IDC_STATIC,16,96,42,8 + EDITTEXT IDC_LOGIN,61,94,63,14,ES_AUTOHSCROLL | WS_DISABLED + RTEXT "Password",IDC_STATIC,129,96,41,8 + EDITTEXT IDC_PASSWORD,173,94,63,14,ES_PASSWORD | ES_AUTOHSCROLL | WS_DISABLED + GROUPBOX "Visualization",IDC_STATIC,6,119,238,85 + LTEXT "Display news using the following format:",IDC_STATIC,13,132,168,8 + EDITTEXT IDC_TAGSEDIT,13,143,224,36,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL + LTEXT "All item's tags are valid. Put them between #. Example: ##",IDC_STATIC,14,182,167,16 + PUSHBUTTON "Reset",IDC_RESET,192,184,45,14 + PUSHBUTTON "?",IDC_TAGHELP,175,184,15,14 + LTEXT "0 - check manually",IDC_STATIC,100,55,79,8 + EDITTEXT IDC_CHECKTIME,64,45,32,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_TIMEOUT_VALUE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,85,45,11,12 +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "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_OPTIONS, DIALOG + BEGIN + BOTTOMMARGIN, 189 + END + + IDD_ADDFEED, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 241 + TOPMARGIN, 7 + END +END +#endif // APSTUDIO_INVOKED + +#endif // () resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/plugins/NewsAggregator/RssText.txt b/plugins/NewsAggregator/RssText.txt new file mode 100644 index 0000000000..b229fc9e78 --- /dev/null +++ b/plugins/NewsAggregator/RssText.txt @@ -0,0 +1,713 @@ + + + + Bash.Org.Ru + http://bash.org.ru/ + + + ru + + b3cf2d64d57bdfea405b43426ec354e4b89a98912c71f243c93568020e2f0a70 + http://bash.org.ru/quote/414990 + #414990 + Fri, 30 Dec 2011 12:12:01 +0400 + ]]> + + + 9f3028db6c6020de238a5d27b14d85c21e5f4c8a5f96506b757925df8500c940 + http://bash.org.ru/quote/414989 + #414989 + Fri, 30 Dec 2011 11:45:18 +0400 + + + + c917324b76e57d2d6103af4b154f41fb335e9a4cc3f973b0b077a8c857c1353a + http://bash.org.ru/quote/414988 + #414988 + Fri, 30 Dec 2011 11:44:38 +0400 + :
: ?
: , , )]]>
+
+ + 96b70712a7185b7d1167f6f9aee454841a4246b0f270185ea3f29d034b9bd39f + http://bash.org.ru/quote/414987 + #414987 + Fri, 30 Dec 2011 11:44:01 +0400 + :
***. !!! , . .]]>
+
+ + 793886d798688d3e6bec7d2ffb51d6397f356e5c0e00ef06d07f22b87643c93a + http://bash.org.ru/quote/414986 + #414986 + Fri, 30 Dec 2011 11:13:16 +0400 + + + + 6eac3f54c4f58d8a41c7e7f72f72ca6e0c6bf5869f0eefc99044ef4427db28d0 + http://bash.org.ru/quote/414985 + #414985 + Fri, 30 Dec 2011 11:12:02 +0400 + + + + 744d1d505dce7f1877c45baee1fdf97009a403d6dedb3ae1cd185480ec3dbbd0 + http://bash.org.ru/quote/414984 + #414984 + Fri, 30 Dec 2011 11:11:01 +0400 + ()?
.

yyy:
... .]]>
+
+ + aadc7f6194e8062c44250a9a878f010c0fe7d9d95af9a8389fbf8a8f748d6c6f + http://bash.org.ru/quote/414983 + #414983 + Fri, 30 Dec 2011 10:45:08 +0400 + xxx:
yyy: wifi ?]]>
+
+ + 01511c230d7cdf4ed42f09106b3075a5021797ae5a11d3063dc9332bb7baf858 + http://bash.org.ru/quote/414982 + #414982 + Fri, 30 Dec 2011 10:44:36 +0400 + Ergo: . . .]]> + + + cc05613e48d3f285e2a2a95a12f542586c5c0fe4499addf3c2a633cf4940e572 + http://bash.org.ru/quote/414981 + #414981 + Fri, 30 Dec 2011 10:44:01 +0400 + + + + 589fe99078c1447d672503cd8ffb9ba7524d9bd9e03cb5444e7c6fcd2be55269 + http://bash.org.ru/quote/414980 + #414980 + Fri, 30 Dec 2011 10:12:44 +0400 + + + + 58b960aeadb0e2700dd3ec5c18a0f9ca1f446d49f66edabf2ad3ea0f4a9f4933 + http://bash.org.ru/quote/414979 + #414979 + Fri, 30 Dec 2011 10:12:01 +0400 + ! >.<]]> + + + dda44cf9be0c8bf4691ce24629fd67dca371952e1dc45aa5dc1cce16ca095d29 + http://bash.org.ru/quote/414978 + #414978 + Fri, 30 Dec 2011 09:46:04 +0400 + + + + 33f18d83baf27fbd1e28e525c942b2c7e379b42a7d91f7436e2e199400ceda30 + http://bash.org.ru/quote/414977 + #414977 + Fri, 30 Dec 2011 09:45:01 +0400 + : . , - . , , " ". .]]> + + + 5599090163fe32efddbf295e457fd9cc4f3426b524eebaaaa4fa8277f34e9be2 + http://bash.org.ru/quote/414976 + #414976 + Fri, 30 Dec 2011 09:13:01 +0400 + yyy: ?]]> + + + 1bb26a5bc553b0570cbdf64be1a9ba3af74c3fd64dc60fe0bf9335ecb74600d0 + http://bash.org.ru/quote/414975 + #414975 + Fri, 30 Dec 2011 08:45:35 +0400 + yyy: :D]]> + + + cf4da48b55d3fdb9e9825e39a664bd4d41dc5c7a64227796ad1afb0900bdec19 + http://bash.org.ru/quote/414974 + #414974 + Fri, 30 Dec 2011 08:45:01 +0400 + ]]> + + + 1a7a8ba066100acdf40b79f4fbc967932320641e3565b230678920432e80e1e3 + http://bash.org.ru/quote/414973 + #414973 + Fri, 30 Dec 2011 08:12:44 +0400 + + + + 339e00558b293e087749ba42e0f06916531e712b1edfb25e470e2c0d10494aea + http://bash.org.ru/quote/414972 + #414972 + Fri, 30 Dec 2011 08:11:44 +0400 +
XXX: , , ?
, , , , ( , ) , , 2008...

YYY: ? )))]]>
+
+ + cfa6ff32cedafbf49ef812730e850a6abc9ec61c7682f3518d95fa00db4e1a14 + http://bash.org.ru/quote/414971 + #414971 + Fri, 30 Dec 2011 08:11:01 +0400 + + + + 128696d56057a228c43deb8cad49205905868817d0b4e834e37e3fdaccecafb4 + http://bash.org.ru/quote/414970 + #414970 + Thu, 29 Dec 2011 12:12:42 +0400 + yyy: , .]]> + + + 2d15491a51b88af3e66c02b4d326f1e2802656b6361f8f07dd667fbbe9dce728 + http://bash.org.ru/quote/414969 + #414969 + Thu, 29 Dec 2011 12:11:34 +0400 + + + + ed64e480321c46a51035c44a445cfd98927e2e303d972ac8874e8e36c11a8371 + http://bash.org.ru/quote/414968 + #414968 + Thu, 29 Dec 2011 12:11:01 +0400 +
troydm: , 5 ! !
muzhig: , . . .
ozgg: , ;)
Vexilurz: . - 5 ]]>
+
+ + aaa2f3a8dd486d209a697ecd4e3d728d99a2aa37dd482a3a859af5c473143b69 + http://bash.org.ru/quote/414967 + #414967 + Thu, 29 Dec 2011 11:46:07 +0400 + + + + dc470e391715c450eef79e82aaadfb0342ecc256504946f0a32d2f8c1160557e + http://bash.org.ru/quote/414966 + #414966 + Thu, 29 Dec 2011 11:45:06 +0400 +
, , , 1917 .

.]]>
+
+ + a7147227d4c9f64edae338c2cec9f4456a1214ea3f9d899c2486038abe99a8f5 + http://bash.org.ru/quote/414965 + #414965 + Thu, 29 Dec 2011 11:44:01 +0400 + + + + d35adf64ed961a7e7ff88e11a9b57760b1cd3f0a835f008b6e9782a27ee1a31a + http://bash.org.ru/quote/414964 + #414964 + Thu, 29 Dec 2011 11:13:11 +0400 + + + + 8ce06ad45b760d6b51e2432476e5c13dc9158f589c9b662147b760b0a1b967ac + http://bash.org.ru/quote/414963 + #414963 + Thu, 29 Dec 2011 11:12:01 +0400 +
. , . : , , , !]]>
+
+ + c64eb292881cc760ac0d2f7ac0b1010a8047b1271d39a0bc759076633640bbb4 + http://bash.org.ru/quote/414962 + #414962 + Thu, 29 Dec 2011 10:45:24 +0400 + Lightning: ???
Lilith: , -
Lightning: ,
Lilith: ,
Lilith: ,
Lightning: , - -?
Lilith: , ?
Lilith:
Lightning: ? ?
Lightning: ,
Lightning: , ,
Lightning: ]]>
+
+ + 19ee3858da403abdebc2f2694ade27e224d83cb2d0325964d802f3313c1333de + http://bash.org.ru/quote/414961 + #414961 + Thu, 29 Dec 2011 10:44:36 +0400 + : ??
: . . . .]]>
+
+ + e0270fd309b6e90cb9f26d9012a1db8ed681fd071f5848b395535442033ffe3a + http://bash.org.ru/quote/414960 + #414960 + Thu, 29 Dec 2011 10:44:01 +0400 + BreakDancer:
Luba: ?
BreakDancer: , ,
BreakDancer: , 29
BreakDancer: !
BreakDancer: , ]]>
+
+ + 8187c704ade265c329ccc02384e4206607407657bc6c9b9425a9542f0cb5a6a1 + http://bash.org.ru/quote/414959 + #414959 + Thu, 29 Dec 2011 10:13:01 +0400 + + + + 1e5eadf8678f61893bcf84e0dfb41290f63266eab736941b7ca07653b70f17d4 + http://bash.org.ru/quote/414958 + #414958 + Thu, 29 Dec 2011 09:45:26 +0400 + : , ...
: ? ? ?
: !
: , ...
: , ...
: , ? ?]]>
+
+ + b7c708279640f1efe4ec3401970cb89f075864203ed0fbeeb612e9592655a4c3 + http://bash.org.ru/quote/414957 + #414957 + Thu, 29 Dec 2011 09:44:52 +0400 + " ". . . , , . :
- ! - .
.]]>
+
+ + e91f03e5e391060d916a7e7e827cb6eaeec132c17a1ac5d78af70d5368461ec5 + http://bash.org.ru/quote/414956 + #414956 + Thu, 29 Dec 2011 09:44:01 +0400 + + + + c805cfaf28bf072384933e50ea8e1c48f815063c3bfbfe05a0986d6b944bd14e + http://bash.org.ru/quote/414955 + #414955 + Thu, 29 Dec 2011 09:13:01 +0400 + YYY: ?
XXX: : " " vs " ". .]]>
+
+ + 0636538a5462fc292f9b4fc6439cd6f7f8ab0fe79ba081c47e36d3d8338806fe + http://bash.org.ru/quote/414954 + #414954 + Thu, 29 Dec 2011 08:46:01 +0400 + xxx: . .
yyy: ,
: , , - ...
: ]]>
+
+ + c8591055f839c5dbc882d36e7a4d2db9ce399460048e8e0e6d466dd43a88cae1 + http://bash.org.ru/quote/414953 + #414953 + Thu, 29 Dec 2011 08:13:04 +0400 + xxx: ! , ! )))
yyy: . - , - ... =(
xxx: ... !
xxx: , , ?]]>
+
+ + 714be978a8678d201b16981150150166752145feaefa2f159980d76051602d87 + http://bash.org.ru/quote/414952 + #414952 + Thu, 29 Dec 2011 08:11:54 +0400 + , =)]]> + + + dd7d36ba1543a7ac360b28c72f669816d3551bb09f34156635f80efbc9a4f390 + http://bash.org.ru/quote/414951 + #414951 + Thu, 29 Dec 2011 08:11:01 +0400 + - , ? .
, :
- , ...]]>
+
+ + 174e14053635b5325be15ae0a37b47953115b33e0d082053064572907d2829a0 + http://bash.org.ru/quote/414950 + #414950 + Wed, 28 Dec 2011 12:46:01 +0400 + [QuizMaster7] : : 9
[EwokDoUrden] !
[EwokDoUrden] ]]>
+
+ + 691660b05378e2d242a7a60429e2cd94a44e8d2041b2facb2597cb21ec213fbf + http://bash.org.ru/quote/414949 + #414949 + Wed, 28 Dec 2011 12:13:18 +0400 + + + + 634c63c05a37bbb5933ccae9bd50bbc4e04d2a27dfd2895ab8f4be5cc77a5707 + http://bash.org.ru/quote/414948 + #414948 + Wed, 28 Dec 2011 12:12:02 +0400 + + + + 2309307a0dd79a2f77f63dbbbf3239d5de3cd41409ce23750c0e8ebecd20466f + http://bash.org.ru/quote/414946 + #414946 + Wed, 28 Dec 2011 11:44:57 +0400 +
Explay T-7, ()]]>
+
+ + c58a33a67db26dab4b121d14ebad5cd80d78040eea517835a90bbdc81887b4dc + http://bash.org.ru/quote/414945 + #414945 + Wed, 28 Dec 2011 11:44:01 +0400 + : , ?
: , ? )
: , ....]]>
+
+ + 3a8ab041c452b16f9f415d3f6d209f1d58f11ed2ab0ee5f928a5f6b8e22a78b9 + http://bash.org.ru/quote/414944 + #414944 + Wed, 28 Dec 2011 11:12:55 +0400 + + + + d72696e62bb007bb3004d7403e5915734f7ca02ef54757e08cb0a689a1b4df4d + http://bash.org.ru/quote/414943 + #414943 + Wed, 28 Dec 2011 11:12:01 +0400 + fintar: ?]]> + + + 9ffbfa3d0268a0dc955b9969e4c2b77cc50443a7d6bd9b60f9cf4102daeb7fb1 + http://bash.org.ru/quote/414942 + #414942 + Wed, 28 Dec 2011 10:45:41 +0400 + :
!
?
, ? , , , . !

, . , , , ]]>
+
+ + 6017310e922bd529b5ad3be09f4f0c5e8b6b2fb76d0bd05b617a8eac0ae27193 + http://bash.org.ru/quote/414941 + #414941 + Wed, 28 Dec 2011 10:44:47 +0400 + + + + b101af3976aa2e9b7841576433b0c68af93c3ce85ac75383a6f7b20a0106a9c6 + http://bash.org.ru/quote/414940 + #414940 + Wed, 28 Dec 2011 10:44:01 +0400 + :
- .
- .
, .
- 174 , 80 . , , , .
:
- , .
, ...]]>
+
+ + 1d3da2d78ecf5bac86c480e26d65184e8b69cab96bc8d6c038de7de9ca468ebd + http://bash.org.ru/quote/414939 + #414939 + Wed, 28 Dec 2011 10:13:07 +0400 + : " ".]]> + + + 0365ddac152e7a1f45d4fe35cc5d673ff9e9cbce8d9d125e40b5dca139cd293e + http://bash.org.ru/quote/414938 + #414938 + Wed, 28 Dec 2011 10:12:01 +0400 + + + + 8774184a10feb87ab76c3eac63fcf6873b572cd376d06b87ec2cafa48464b57b + http://bash.org.ru/quote/414937 + #414937 + Wed, 28 Dec 2011 09:45:31 +0400 + + + + 5f9e58d114c8a86764bd26780e94bb3f00f0a4db026821f84d06b4540db7b5ed + http://bash.org.ru/quote/414936 + #414936 + Wed, 28 Dec 2011 09:45:01 +0400 + yyy: - . . .
xxx: ?
yyy: . . .]]>
+
+ + 8b1acd9ec8457ac318c78b1dc88005edf4fc9f0ace4d47c1080c1b670de19e2e + http://bash.org.ru/quote/414935 + #414935 + Wed, 28 Dec 2011 09:13:01 +0400 + Dimes: ]]> + + + 187c05af1edfcce0de5da82d30a58fb83ae474e6fa897ad684bd3ad7c50e9dd7 + http://bash.org.ru/quote/414934 + #414934 + Wed, 28 Dec 2011 08:46:02 +0400 + yyy: ?
xxx:
yyy: ? )
xxx:
xxx:
yyy:
yyy: , ]]>
+
+ + 00822e572762f43d2fb56ef00c2f7be12f703a27a39949f99036f7734a26f566 + http://bash.org.ru/quote/414933 + #414933 + Wed, 28 Dec 2011 08:45:02 +0400 + misterIT: , . .
misterIT: !!! ?
xxx@qip: , , ? ? ?
misterIT:
misterIT: , !
xxx@qip: . .]]>
+
+ + a6231be02247fcfffbaa07e020f43a4c7a1c7ed628ed86af16443ffe45ed7127 + http://bash.org.ru/quote/414932 + #414932 + Wed, 28 Dec 2011 08:12:38 +0400 + + + + 039ba4efda1619b3b4374b223e344b3423a8d9788a18bf73ac07bce7bac04bea + http://bash.org.ru/quote/414931 + #414931 + Wed, 28 Dec 2011 08:12:01 +0400 + :
- ,
- ,
- , , , z !
- - ?
- , !
- ... 5 2
- .
- 5, 2, ,
- - , ... ( !!!!) .

:
, , , - ]]>
+
+ + 66fab6cb65e11c7de896d7c6840095b9a90bd70ed8d49f8fb7adc0adb9b6a43c + http://bash.org.ru/quote/414930 + #414930 + Tue, 27 Dec 2011 13:46:01 +0400 + + + + 39b40cb066f0a9b64c53dbc67c1a521a1b3948a5b021efd4b1982753059aaee1 + http://bash.org.ru/quote/414929 + #414929 + Tue, 27 Dec 2011 13:13:01 +0400 + xxx:
yyy:
xxx:
xxx: , ]]>
+
+ + 4f3b79bfba6994d73b3eb21530d98188f4830c26c4f8108a6d8120a4c0b5e8fc + http://bash.org.ru/quote/414928 + #414928 + Tue, 27 Dec 2011 12:46:01 +0400 + xxx: , , ?
yyy: .
zzz: ! , ! :)]]>
+
+ + d3162ccb1c30aa3f654c0c6b368fa9e583c020dc3d04bcc07b6c5f02eeadaaeb + http://bash.org.ru/quote/414927 + #414927 + Tue, 27 Dec 2011 12:13:01 +0400 + xxx: , , : ,
yyy: , , !
]]>
+
+ + 69e05b82fc5a5028a65e0435a584a83ffaa44e9784c024fb30eda9b7d87f38ba + http://bash.org.ru/quote/414926 + #414926 + Tue, 27 Dec 2011 11:46:03 +0400 + iNote: :D]]> + + + caa3a31eca89b56e3669c9910f23564e1ee2bd2c67f0be5472e206496b688609 + http://bash.org.ru/quote/414925 + #414925 + Tue, 27 Dec 2011 11:45:01 +0400 + xxx: .
xxx: .
xxx: , .
xxx: , , , .
xxx: .]]>
+
+ + d3db54801b673716d6b41137bbf9ca64c62a04a1211bf43ea44876c411f88728 + http://bash.org.ru/quote/414924 + #414924 + Tue, 27 Dec 2011 11:13:12 +0400 + - , ? "--", "--"
- . : "-".
- . , , "" "" )]]>
+
+ + 6206e668575ef7364ca52bacdfc3d6b45da5ab80d4c69c0f1467269cec9ee6c4 + http://bash.org.ru/quote/414923 + #414923 + Tue, 27 Dec 2011 11:12:01 +0400 + xxx: .
xxx: ! )))]]>
+
+ + 47c8ec43ac12036ac0528b4b4077f8d9f80a0fe8d4aa029f8a39b7b9d4327b6f + http://bash.org.ru/quote/414922 + #414922 + Tue, 27 Dec 2011 10:45:34 +0400 + + + + 7871bd6a1b62f062468316e82234015b27a0c448d21c39120579d4c66c1b3367 + http://bash.org.ru/quote/414921 + #414921 + Tue, 27 Dec 2011 10:45:01 +0400 + yyy: . .]]> + + + c5fcb5c4cf429099d6540943fd5f376998aee7e5ac90409e8afc3e6a61ef177f + http://bash.org.ru/quote/414920 + #414920 + Tue, 27 Dec 2011 10:13:01 +0400 + + + + 72838435dc732ed7410037dd17b0e38588ac91999f5f195421621a8355ded16e + http://bash.org.ru/quote/414919 + #414919 + Tue, 27 Dec 2011 09:45:45 +0400 +


,

]]>
+
+ + 7b098f0d541bdc4ac0f90634a82e781d38e174ef380aa56ff6c94e69734fcde8 + http://bash.org.ru/quote/414918 + #414918 + Tue, 27 Dec 2011 09:44:43 +0400 + + + + 5af15998f29f5f063b9ce01b54dc8d3f0b73bb7d3f877edcc5eaa7ff8f71013b + http://bash.org.ru/quote/414917 + #414917 + Tue, 27 Dec 2011 09:44:01 +0400 + : ? ?
: , . , . ]]>
+
+ + b5a66cb535552b46159d467911174f1e4aac941c8c1d891a62619a8cdb00a3ea + http://bash.org.ru/quote/414916 + #414916 + Tue, 27 Dec 2011 09:13:02 +0400 + xxx: , ?
yyy: . , ...]]>
+
+ + 9e007ee3d9984de85c727f6885f913891b11676f10b053ba8a51bec6fba0e23c + http://bash.org.ru/quote/414915 + #414915 + Tue, 27 Dec 2011 08:46:11 +0400 + xxx: ?
yyy:
yyy: , ]]>
+
+ + 3dc9ddc2fad185181993315c5c3a404405ab704423d3c24bd9213dcb23bad2eb + http://bash.org.ru/quote/414914 + #414914 + Tue, 27 Dec 2011 08:45:01 +0400 + : , ?
: , ]]>
+
+ + 61e793991c5dea07ea5a5afa2bbc899e49c23d8a0d8a1f48918915129a13a35c + http://bash.org.ru/quote/414913 + #414913 + Tue, 27 Dec 2011 08:12:04 +0400 +
: !
yyy: , , - ...
: , ! -!]]>
+
+ + ed2932ac0768ceb5ec1a155d4b039fb2cba050296935d7852baccb238ada1819 + http://bash.org.ru/quote/414912 + #414912 + Tue, 27 Dec 2011 08:11:31 +0400 + <xxx> , " ": , , ]]> + + + 1989a43d3a03de416d16788589caaa318ece611245b328df9b1567c13205cf70 + http://bash.org.ru/quote/414911 + #414911 + Tue, 27 Dec 2011 08:11:01 +0400 + yyy: - , ]]> + + + c207fd198261176146047e54ccfff9058582e311ab402e32dfe67837c3e61e64 + http://bash.org.ru/quote/414910 + #414910 + Mon, 26 Dec 2011 13:12:49 +0400 +
: ?
: .
: ? ?
: -. SPIDER-MAN. , , S.]]>
+
+ + 245f34c6c6da77a68ba258f717177e3ecb27865bd7cd72c5966a9bae3d68cdab + http://bash.org.ru/quote/414909 + #414909 + Mon, 26 Dec 2011 13:11:56 +0400 + yyy: ?
xxx: , !]]>
+
+ + b9674cdf642593a5c193c3262031513822c50bcb950170cc07aadfb7fddc2649 + http://bash.org.ru/quote/414908 + #414908 + Mon, 26 Dec 2011 13:11:02 +0400 + : ,
: ?
: ]]>
+
+ + f5e384c1050a5d6df2cbe999fbae0e082deda5e89839ad0a913b490b3fada8c0 + http://bash.org.ru/quote/414907 + #414907 + Mon, 26 Dec 2011 12:46:14 +0400 + : , , )))
: , ,
: - , ]]>
+
+ + 71aba0126bc495b6efcd494e8b95c11b4e27fadb96f8fa31475db7aa85c7f1a4 + http://bash.org.ru/quote/414906 + #414906 + Mon, 26 Dec 2011 12:45:14 +0400 +
xxx: , ...]]>
+
+ + 3d3b28ac59593143fe32ecbb4c5df048f39482f38d336d6dc4ad119ffbeea78b + http://bash.org.ru/quote/414905 + #414905 + Mon, 26 Dec 2011 12:44:01 +0400 + yyy: )]]> + + + 2931790e946054e81789e63e91d5dc9237bf492d3f26c6d7bc530b59ef2672fe + http://bash.org.ru/quote/414904 + #414904 + Mon, 26 Dec 2011 12:13:01 +0400 + yyy: , - , . :)]]> + + + 5ee6027cf4758aa3989a3552db60d21acfc4bce66518265e9137abc3ce1fc3c7 + http://bash.org.ru/quote/414903 + #414903 + Mon, 26 Dec 2011 11:46:01 +0400 + , . " !". , " ".]]> + + + a47fdbea7602bfa4df71054ed3d391d00a1c0dd13f8adaa983bb5f93e5ac3d90 + http://bash.org.ru/quote/414902 + #414902 + Mon, 26 Dec 2011 11:13:01 +0400 + + + + bc8b51fdf44d63edc888ad063db2fa66d1ad92c48d999408fff00a8cbec8e4ae + http://bash.org.ru/quote/414901 + #414901 + Mon, 26 Dec 2011 10:46:12 +0400 + + + + e5174f709f5372c11eaf170b06efe25bf23fd3a65dbc9669e7b55b83ad598340 + http://bash.org.ru/quote/414900 + #414900 + Mon, 26 Dec 2011 10:45:01 +0400 + yyy:
yyy: ]]>
+
+ + 0f5c7eaee411484a37e8071fb60030eb902f42a26969363233116d425faec446 + http://bash.org.ru/quote/414899 + #414899 + Mon, 26 Dec 2011 10:12:34 +0400 + + + + 1941999057f97da275dbaee167f5314de54a3de0f1ccc0f25c983cfe08845e71 + http://bash.org.ru/quote/414898 + #414898 + Mon, 26 Dec 2011 10:12:01 +0400 + + + + 1493df9ec128867419e1c9e0f8adf1e7c73eaecba9ba81e51395778f2c599faf + http://bash.org.ru/quote/414897 + #414897 + Mon, 26 Dec 2011 09:46:15 +0400 + : ? . , + .
: , : " - ".
: !
: , .]]>
+
+ + 507045f7af9d1dbc586b1ea528ecc9edb09ea5a1f35dab1141afc0dee491c7f2 + http://bash.org.ru/quote/414896 + #414896 + Mon, 26 Dec 2011 09:45:01 +0400 + + + + e4f30a21e7ffa737cc164ea71ddf1fe24a2c87b269a1b47db1dbf591ebe3e843 + http://bash.org.ru/quote/414895 + #414895 + Mon, 26 Dec 2011 09:12:45 +0400 + xxx: 12- - .]]> + + + 0ac1bcd3e77c115764edf2fef78568d7e88f0dcfa2830ebff7a4a67ca246192b + http://bash.org.ru/quote/414894 + #414894 + Mon, 26 Dec 2011 09:11:52 +0400 + Telecantrelem: - ?
1143r: Telecantrelem, . , , . . ! , !]]>
+
+ + 0b0d1ae0708037d49d4edd71c8e1d7a488907c379787b7827be44ba7adab6cef + http://bash.org.ru/quote/414893 + #414893 + Mon, 26 Dec 2011 09:11:01 +0400 +
12.12 4 "..." . , "", "". , , "" "", "" "", . . , .]]>
+
+ + 4caeec3b83a23c4ef7e6822f1b9151c62dd719538f9719fd9dc49079edf12869 + http://bash.org.ru/quote/414892 + #414892 + Mon, 26 Dec 2011 08:46:01 +0400 + : )]]> + + + 533d63288a28594dd6858f5eb212c9fd62c95da02ef6c532902585a525f78b2e + http://bash.org.ru/quote/414891 + #414891 + Mon, 26 Dec 2011 08:13:01 +0400 + : - , -
: )
: )]]>
+
+ + 92cf655d26cbe5d10b1af532ab4abb491a0d74ae9759cb81cd6dd4bb84a1d2bc + http://bash.org.ru/quote/414890 + #414890 + Sun, 25 Dec 2011 09:13:01 +0400 +
: , . 12 , , . : ! ?]]>
+
+
+
\ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Common.h b/plugins/NewsAggregator/Src/Common.h new file mode 100644 index 0000000000..fedb81250c --- /dev/null +++ b/plugins/NewsAggregator/Src/Common.h @@ -0,0 +1,162 @@ +/* +Copyright (C) 2012 Mataes + +This 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 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 file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#define MIRANDA_VER 0x0A00 + +// Windows Header Files: +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +// Miranda header files +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "..\version.h" +#include "..\resource.h" + +#define MODULE "NewsAggr" +#define TAGSHELP "## - The title of the item.\r\n#<description># - The item synopsis.\r\n#<link># - The URL of the item.\r\n#<author># - Email address of the author of the item.\r\n#<comments># - URL of a page for comments relating to the item.\r\n#<guid># - A string that uniquely identifies the item.\r\n#<category># - Specify one or more categories that the item belongs to." +#define TAGSDEFAULT "#<title>#\r\n#<link>#\r\n#<description>#" +#define DEFAULT_AVATARS_FOLDER "NewsAggregator" +extern HINSTANCE hInst; +extern HWND hAddFeedDlg; +extern HANDLE hChangeFeedDlgList; +extern UINT_PTR timerId; +// check if Feeds is currently updating +extern BOOL ThreadRunning; +extern BOOL UpdateListFlag; +extern TCHAR tszRoot[MAX_PATH]; +struct ItemInfo +{ + HWND hwndList; + HANDLE hContact; + int SelNumber; + TCHAR nick[MAX_PATH]; + TCHAR url[MAX_PATH]; +}; + +//============ STRUCT USED TO MAKE AN UPDATE LIST ============ + +struct NEWSCONTACTLIST { + HANDLE hContact; + struct NEWSCONTACTLIST *next; +}; + +typedef struct NEWSCONTACTLIST UPDATELIST; + +extern UPDATELIST *UpdateListHead; +extern UPDATELIST *UpdateListTail; + +void UpdateListAdd(HANDLE hContact); +void UpdateThreadProc(LPVOID hWnd); +void DestroyUpdateList(void); + +extern HANDLE hUpdateMutex; + +int NewsAggrInit(WPARAM wParam,LPARAM lParam); +INT OptInit(WPARAM wParam, LPARAM lParam); +int NewsAggrPreShutdown(WPARAM wParam,LPARAM lParam); +VOID NetlibInit(); +VOID NetlibUnInit(); +VOID InitMenu(); +VOID InitIcons(); +HICON LoadIconEx(const char* name, BOOL big); +HANDLE GetIconHandle(const char* name); +INT_PTR NewsAggrGetName(WPARAM wParam, LPARAM lParam); +INT_PTR NewsAggrGetCaps(WPARAM wp,LPARAM lp); +INT_PTR NewsAggrSetStatus(WPARAM wp,LPARAM /*lp*/); +INT_PTR NewsAggrGetStatus(WPARAM/* wp*/,LPARAM/* lp*/); +INT_PTR NewsAggrLoadIcon(WPARAM wParam,LPARAM lParam); +INT_PTR NewsAggrGetInfo(WPARAM wParam,LPARAM lParam); +INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam,LPARAM lParam); + +INT_PTR CheckAllFeeds(WPARAM wParam,LPARAM lParam); +INT_PTR AddFeed(WPARAM wParam,LPARAM lParam); +INT_PTR ChangeFeed(WPARAM wParam,LPARAM lParam); +INT_PTR ImportFeeds(WPARAM wParam,LPARAM lParam); +INT_PTR ExportFeeds(WPARAM wParam,LPARAM lParam); +INT_PTR CheckFeed(WPARAM wParam,LPARAM lParam); +INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); +VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); +VOID CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); + +BOOL IsMyContact(HANDLE hContact); +VOID GetNewsData(TCHAR *szUrl, char** szData, HANDLE hContact, HWND hwndDlg); +VOID CreateList (HWND hwndList); +VOID UpdateList (HWND hwndList); +VOID DeleteAllItems(HWND hwndList); +time_t __stdcall DateToUnixTime(TCHAR *stamp, BOOL FeedType); +VOID CheckCurrentFeed (HANDLE hContact); +TCHAR* CheckFeed(TCHAR* tszURL, HWND hwndDlg); +size_t decode_html_entities_utf8(char *dest, const char *src); + +// =============== NewsAggr SERVICES ================ +// Check all Feeds info +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGR_CHECKALLFEEDS "NEWSAGGR/CheckAllFeeds" + +// Add new Feed channel +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGR_ADDFEED "NEWSAGGR/AddNewsFeed" + +// Add new Feed channel +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGR_CHANGEFEED "NEWSAGGR/ChangeNewsFeed" + +// Import Feed chanels from file +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGR_IMPORTFEEDS "NEWSAGGR/ImportFeeds" + +// Export Feed chanels to file +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGR_EXPORTFEEDS "NEWSAGGR/ExportFeeds" + +// Check Feed info +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGR_CHECKFEED "NEWSAGGR/CheckFeed" \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Entities.cpp b/plugins/NewsAggregator/Src/Entities.cpp new file mode 100644 index 0000000000..46a00d2d8d --- /dev/null +++ b/plugins/NewsAggregator/Src/Entities.cpp @@ -0,0 +1,381 @@ +#include "common.h" + +#define UNICODE_MAX 0x10FFFFul + +static const char *named_entities[][2] = +{ + { "AElig;", "Æ" }, + { "Aacute;", "Á" }, + { "Acirc;", "Â" }, + { "Agrave;", "À" }, + { "Alpha;", "Α" }, + { "Aring;", "Å" }, + { "Atilde;", "Ã" }, + { "Auml;", "Ä" }, + { "Beta;", "Β" }, + { "Ccedil;", "Ç" }, + { "Chi;", "Χ" }, + { "Dagger;", "‡" }, + { "Delta;", "Δ" }, + { "ETH;", "Ð" }, + { "Eacute;", "É" }, + { "Ecirc;", "Ê" }, + { "Egrave;", "È" }, + { "Epsilon;", "Ε" }, + { "Eta;", "Η" }, + { "Euml;", "Ë" }, + { "Gamma;", "Γ" }, + { "Iacute;", "Í" }, + { "Icirc;", "Î" }, + { "Igrave;", "Ì" }, + { "Iota;", "Ι" }, + { "Iuml;", "Ï" }, + { "Kappa;", "Κ" }, + { "Lambda;", "Λ" }, + { "Mu;", "Μ" }, + { "Ntilde;", "Ñ" }, + { "Nu;", "Ν" }, + { "OElig;", "Œ" }, + { "Oacute;", "Ó" }, + { "Ocirc;", "Ô" }, + { "Ograve;", "Ò" }, + { "Omega;", "Ω" }, + { "Omicron;", "Ο" }, + { "Oslash;", "Ø" }, + { "Otilde;", "Õ" }, + { "Ouml;", "Ö" }, + { "Phi;", "Φ" }, + { "Pi;", "Π" }, + { "Prime;", "″" }, + { "Psi;", "Ψ" }, + { "Rho;", "Ρ" }, + { "Scaron;", "Š" }, + { "Sigma;", "Σ" }, + { "THORN;", "Þ" }, + { "Tau;", "Τ" }, + { "Theta;", "Θ" }, + { "Uacute;", "Ú" }, + { "Ucirc;", "Û" }, + { "Ugrave;", "Ù" }, + { "Upsilon;", "Υ" }, + { "Uuml;", "Ü" }, + { "Xi;", "Ξ" }, + { "Yacute;", "Ý" }, + { "Yuml;", "Ÿ" }, + { "Zeta;", "Ζ" }, + { "aacute;", "á" }, + { "acirc;", "â" }, + { "acute;", "´" }, + { "aelig;", "æ" }, + { "agrave;", "à" }, + { "alefsym;", "ℵ" }, + { "alpha;", "α" }, + { "amp;", "&" }, + { "and;", "∧" }, + { "ang;", "∠" }, + { "apos;", "'" }, + { "aring;", "å" }, + { "asymp;", "≈" }, + { "atilde;", "ã" }, + { "auml;", "ä" }, + { "bdquo;", "„" }, + { "beta;", "β" }, + { "brvbar;", "¦" }, + { "bull;", "•" }, + { "cap;", "∩" }, + { "ccedil;", "ç" }, + { "cedil;", "¸" }, + { "cent;", "¢" }, + { "chi;", "χ" }, + { "circ;", "ˆ" }, + { "clubs;", "♣" }, + { "cong;", "≅" }, + { "copy;", "©" }, + { "crarr;", "↵" }, + { "cup;", "∪" }, + { "curren;", "¤" }, + { "dArr;", "⇓" }, + { "dagger;", "†" }, + { "darr;", "↓" }, + { "deg;", "°" }, + { "delta;", "δ" }, + { "diams;", "♦" }, + { "divide;", "÷" }, + { "eacute;", "é" }, + { "ecirc;", "ê" }, + { "egrave;", "è" }, + { "empty;", "∅" }, + { "emsp;", " " }, + { "ensp;", " " }, + { "epsilon;", "ε" }, + { "equiv;", "≡" }, + { "eta;", "η" }, + { "eth;", "ð" }, + { "euml;", "ë" }, + { "euro;", "€" }, + { "exist;", "∃" }, + { "fnof;", "ƒ" }, + { "forall;", "∀" }, + { "frac12;", "½" }, + { "frac14;", "¼" }, + { "frac34;", "¾" }, + { "frasl;", "⁄" }, + { "gamma;", "γ" }, + { "ge;", "≥" }, + { "gt;", ">" }, + { "hArr;", "⇔" }, + { "harr;", "↔" }, + { "hearts;", "♥" }, + { "hellip;", "…" }, + { "iacute;", "í" }, + { "icirc;", "î" }, + { "iexcl;", "¡" }, + { "igrave;", "ì" }, + { "image;", "ℑ" }, + { "infin;", "∞" }, + { "int;", "∫" }, + { "iota;", "ι" }, + { "iquest;", "¿" }, + { "isin;", "∈" }, + { "iuml;", "ï" }, + { "kappa;", "κ" }, + { "lArr;", "⇐" }, + { "lambda;", "λ" }, + { "lang;", "〈" }, + { "laquo;", "«" }, + { "larr;", "←" }, + { "lceil;", "⌈" }, + { "ldquo;", "“" }, + { "le;", "≤" }, + { "lfloor;", "⌊" }, + { "lowast;", "∗" }, + { "loz;", "◊" }, + { "lrm;", "\xE2\x80\x8E" }, + { "lsaquo;", "‹" }, + { "lsquo;", "‘" }, + { "lt;", "<" }, + { "macr;", "¯" }, + { "mdash;", "—" }, + { "micro;", "µ" }, + { "middot;", "·" }, + { "minus;", "−" }, + { "mu;", "μ" }, + { "nabla;", "∇" }, + { "nbsp;", " " }, + { "ndash;", "–" }, + { "ne;", "≠" }, + { "ni;", "∋" }, + { "not;", "¬" }, + { "notin;", "∉" }, + { "nsub;", "⊄" }, + { "ntilde;", "ñ" }, + { "nu;", "ν" }, + { "oacute;", "ó" }, + { "ocirc;", "ô" }, + { "oelig;", "œ" }, + { "ograve;", "ò" }, + { "oline;", "‾" }, + { "omega;", "ω" }, + { "omicron;", "ο" }, + { "oplus;", "⊕" }, + { "or;", "∨" }, + { "ordf;", "ª" }, + { "ordm;", "º" }, + { "oslash;", "ø" }, + { "otilde;", "õ" }, + { "otimes;", "⊗" }, + { "ouml;", "ö" }, + { "para;", "¶" }, + { "part;", "∂" }, + { "permil;", "‰" }, + { "perp;", "⊥" }, + { "phi;", "φ" }, + { "pi;", "π" }, + { "piv;", "ϖ" }, + { "plusmn;", "±" }, + { "pound;", "£" }, + { "prime;", "′" }, + { "prod;", "∏" }, + { "prop;", "∝" }, + { "psi;", "ψ" }, + { "quot;", "\"" }, + { "rArr;", "⇒" }, + { "radic;", "√" }, + { "rang;", "〉" }, + { "raquo;", "»" }, + { "rarr;", "→" }, + { "rceil;", "⌉" }, + { "rdquo;", "”" }, + { "real;", "ℜ" }, + { "reg;", "®" }, + { "rfloor;", "⌋" }, + { "rho;", "ρ" }, + { "rlm;", "\xE2\x80\x8F" }, + { "rsaquo;", "›" }, + { "rsquo;", "’" }, + { "sbquo;", "‚" }, + { "scaron;", "š" }, + { "sdot;", "⋅" }, + { "sect;", "§" }, + { "shy;", "\xC2\xAD" }, + { "sigma;", "σ" }, + { "sigmaf;", "ς" }, + { "sim;", "∼" }, + { "spades;", "♠" }, + { "sub;", "⊂" }, + { "sube;", "⊆" }, + { "sum;", "∑" }, + { "sup;", "⊃" }, + { "sup1;", "¹" }, + { "sup2;", "²" }, + { "sup3;", "³" }, + { "supe;", "⊇" }, + { "szlig;", "ß" }, + { "tau;", "τ" }, + { "there4;", "∴" }, + { "theta;", "θ" }, + { "thetasym;", "ϑ" }, + { "thinsp;", " " }, + { "thorn;", "þ" }, + { "tilde;", "˜" }, + { "times;", "×" }, + { "trade;", "™" }, + { "uArr;", "⇑" }, + { "uacute;", "ú" }, + { "uarr;", "↑" }, + { "ucirc;", "û" }, + { "ugrave;", "ù" }, + { "uml;", "¨" }, + { "upsih;", "ϒ" }, + { "upsilon;", "υ" }, + { "uuml;", "ü" }, + { "weierp;", "℘" }, + { "xi;", "ξ" }, + { "yacute;", "ý" }, + { "yen;", "¥" }, + { "yuml;", "ÿ" }, + { "zeta;", "ζ" }, + { "zwj;", "\xE2\x80\x8D" }, + { "zwnj;", "\xE2\x80\x8C" } +}; + +static int cmp(const void *key, const void *element) +{ + return strncmp((const char *)key, *(const char **)element, + strlen(*(const char **)element)); +} + +static const char *get_named_entity(const char *name) +{ + const char **entity = (const char **)bsearch(name, named_entities, sizeof(named_entities) / sizeof(*named_entities), + sizeof(*named_entities), cmp); + + return entity ? entity[1] : NULL; +} + +static size_t putc_utf8(unsigned long cp, char *buffer) +{ + unsigned char *bytes = (unsigned char *)buffer; + + if(cp <= 0x007Ful) + { + bytes[0] = (unsigned char)cp; + return 1; + } + + if(cp <= 0x07FFul) + { + bytes[1] = (unsigned char)((2u << 6) | (cp & 0x3Fu)); + bytes[0] = (unsigned char)((6u << 5) | (cp >> 6)); + return 2; + } + + if(cp <= 0xFFFFul) + { + bytes[2] = (unsigned char)(( 2u << 6) | ( cp & 0x3Fu)); + bytes[1] = (unsigned char)(( 2u << 6) | ((cp >> 6) & 0x3Fu)); + bytes[0] = (unsigned char)((14u << 4) | (cp >> 12)); + return 3; + } + + if(cp <= 0x10FFFFul) + { + bytes[3] = (unsigned char)(( 2u << 6) | ( cp & 0x3Fu)); + bytes[2] = (unsigned char)(( 2u << 6) | ((cp >> 6) & 0x3Fu)); + bytes[1] = (unsigned char)(( 2u << 6) | ((cp >> 12) & 0x3Fu)); + bytes[0] = (unsigned char)((30u << 3) | (cp >> 18)); + return 4; + } + + return 0; +} + +static BOOL parse_entity(const char *current, char **to, const char **from) +{ + const char *end = strchr(current, ';'); + if (!end) return 0; + + if(current[1] == '#') + { + char *tail = NULL; + errno = 0; + + BOOL hex = current[2] == 'x' || current[2] == 'X'; + + unsigned long cp = strtoul( + current + (hex ? 3 : 2), &tail, hex ? 16 : 10); + + if(tail == end && !errno && cp <= UNICODE_MAX) + { + *to += putc_utf8(cp, *to); + *from = end + 1; + + return 1; + } + } + else + { + const char *entity = get_named_entity(¤t[1]); + if(entity) + { + size_t len = strlen(entity); + memcpy(*to, entity, len); + + *to += len; + *from = end + 1; + + return 1; + } + } + + return 0; +} + +size_t decode_html_entities_utf8(char *dest, const char *src) +{ + if (!src) src = dest; + + char *to = dest; + const char *from = src; + + const char *current; + while(current = strchr(from, '&')) + { + memcpy(to, from, (size_t)(current - from)); + to += current - from; + + if(parse_entity(current, &to, &from)) + continue; + + from = current; + *to++ = *from++; + } + + size_t remaining = strlen(from); + + memcpy(to, from, remaining); + to += remaining; + + *to = 0; + return (size_t)(to - dest); +} \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Icons.cpp b/plugins/NewsAggregator/Src/Icons.cpp new file mode 100644 index 0000000000..096a38086b --- /dev/null +++ b/plugins/NewsAggregator/Src/Icons.cpp @@ -0,0 +1,79 @@ +/* +Copyright (C) 2012 Mataes + +This 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 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 file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#include "common.h" + +struct _tag_iconList +{ + TCHAR* szDescr; + char* szName; + int defIconID; + HANDLE hIconLibItem; +} + +static iconList[] = +{ + { LPGENT("Protocol icon"), "main", IDI_ICON }, + { LPGENT("Check All Feeds"), "checkall", IDI_CHECKALL }, + { LPGENT("Add Feed"), "addfeed", IDI_ADDFEED }, + { LPGENT("Import Feeds"), "importfeeds", IDI_IMPORTFEEDS }, + { LPGENT("Export Feeds"), "exportfeeds", IDI_EXPORTFEEDS }, + { LPGENT("Check Feed"), "checkfeed", IDI_CHECKALL }, +}; + +VOID InitIcons() +{ + TCHAR szFile[MAX_PATH]; + char szSettingName[100]; + SKINICONDESC sid = {0}; + unsigned i; + + GetModuleFileName(hInst, szFile, MAX_PATH); + + sid.cbSize = sizeof(SKINICONDESC); + sid.flags = SIDF_ALL_TCHAR; + sid.ptszDefaultFile = szFile; + sid.pszName = szSettingName; + sid.ptszSection = _T("News Aggregator"); + + for (i = 0; i < SIZEOF(iconList); i++) + { + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODULE, iconList[i].szName); + + sid.ptszDescription = iconList[i].szDescr; + sid.iDefaultIndex = -iconList[i].defIconID; + iconList[i].hIconLibItem = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); + } +} + +HICON LoadIconEx(const char* name, BOOL big) +{ + char szSettingName[100]; + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODULE, name); + return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName); +} + +HANDLE GetIconHandle(const char* name) +{ + unsigned i; + for (i=0; i < SIZEOF(iconList); i++) + if (strcmp(iconList[i].szName, name) == 0) + return iconList[i].hIconLibItem; + return NULL; +} \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp new file mode 100644 index 0000000000..2ff20ce596 --- /dev/null +++ b/plugins/NewsAggregator/Src/Menus.cpp @@ -0,0 +1,78 @@ +/* +Copyright (C) 2012 Mataes + +This 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 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 file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#include "common.h" + +HANDLE hService2[6]; + +VOID InitMenu() +{ + CLISTMENUITEM mi = {0}; + mi.cbSize = sizeof(mi); + mi.pszContactOwner = MODULE; + mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_NOTOFFLINE; + + // adding main menu items + mi.ptszPopupName = LPGENT("News Aggregator"); + mi.popupPosition = 500099000; + + mi.position=10100001; + mi.icolibItem = GetIconHandle("main"); + mi.ptszName = LPGENT("Check All Feeds"); + mi.pszService = MS_NEWSAGGR_CHECKALLFEEDS; + hService2[0] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi); + + mi.position=10100002; + mi.icolibItem = GetIconHandle("addfeed"); + mi.ptszName = LPGENT("Add Feed"); + mi.pszService = MS_NEWSAGGR_ADDFEED; + hService2[1] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi); + + mi.position=10100003; + mi.icolibItem = GetIconHandle("importfeeds"); + mi.ptszName = LPGENT("Import Feeds"); + mi.pszService = MS_NEWSAGGR_IMPORTFEEDS; + hService2[2] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi); + + mi.position=10100004; + mi.icolibItem = GetIconHandle("exportfeeds"); + mi.ptszName = LPGENT("Export Feeds"); + mi.pszService = MS_NEWSAGGR_EXPORTFEEDS; + hService2[3] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi); + + // adding contact menu items + mi.position=-0x7FFFFFFA; + mi.icolibItem = GetIconHandle("checkfeed"); + mi.ptszName = LPGENT("Check feed"); + mi.pszService = MS_NEWSAGGR_CHECKFEED; + hService2[4] = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi); + + // adding contact menu items + mi.position=-0x7FFFFFFA; + //mi.icolibItem = GetIconHandle("checkfeed"); + mi.ptszName = LPGENT("Change feed"); + mi.pszService = MS_NEWSAGGR_CHANGEFEED; + hService2[5] = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi); + + ZeroMemory(&mi, sizeof(mi)); + mi.cbSize = sizeof(mi); + mi.flags = CMIM_ICON; + mi.icolibItem = GetIconHandle("checkall"); + CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hService2[0], (LPARAM)&mi); +} \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp new file mode 100644 index 0000000000..3d7c0e1251 --- /dev/null +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -0,0 +1,141 @@ +/* +Copyright (C) 2012 Mataes + +This 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 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 file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#include "Common.h" + +HINSTANCE hInst = NULL; +PLUGINLINK *pluginLink; +int hLangpack; +struct MM_INTERFACE mmi; +HANDLE hOptHook = NULL, hLoadHook = NULL, hOnPreShutdown = NULL, hPrebuildMenuHook = NULL, hPackUpdaterFolder = NULL; +HANDLE hProtoService[7]; +HWND hAddFeedDlg; +HANDLE hChangeFeedDlgList = NULL; +XML_API xi = {0}; +struct UTF8_INTERFACE utfi; +TCHAR tszRoot[MAX_PATH] = {0}; +HANDLE hUpdateMutex; +#define NUM_SERVICES 6 +HANDLE hService[NUM_SERVICES]; + +PLUGININFOEX pluginInfoEx = { + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + 0, + // {56CC3F29-CCBF-4546-A8BA-9856248A412A} + {0x56cc3f29, 0xccbf, 0x4546, {0xa8, 0xba, 0x98, 0x56, 0x24, 0x8a, 0x41, 0x2a}} +}; + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + hInst = hinstDLL; + return TRUE; +} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + if(mirandaVersion < 0x0900) + { + MessageBox(NULL, TranslateT("News Aggregator plugin requires Miranda IM 0.9.0.0 or later"), TranslateT("Fatal error"), MB_OK); + return NULL; + } + return &pluginInfoEx; +} + +static const MUUID interfaces[] = {{0x29517be5, 0x779a, 0x48e5, {0x89, 0x50, 0xcb, 0x4d, 0xe1, 0xd4, 0x31, 0x72}}, MIID_LAST}; + +extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) +{ + return interfaces; +} + +extern "C" __declspec(dllexport) int Load(PLUGINLINK *link) +{ + pluginLink = link; + mir_getLP(&pluginInfoEx); + mir_getMMI(&mmi); + mir_getXI(&xi); + mir_getUTFI(&utfi); + + if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) + { + hPackUpdaterFolder = FoldersRegisterCustomPathT("News Aggregator", "Avatars", MIRANDA_USERDATAT _T("\\Avatars\\")_T(DEFAULT_AVATARS_FOLDER)); + FoldersGetCustomPathT(hPackUpdaterFolder, tszRoot, MAX_PATH, _T("")); + } + else + { + TCHAR* tszFolder = Utils_ReplaceVarsT(_T("%miranda_userdata%\\"_T(DEFAULT_AVATARS_FOLDER))); + lstrcpyn(tszRoot, tszFolder, SIZEOF(tszRoot)); + mir_free(tszFolder); + } + + // Add options hook + hOptHook = HookEvent(ME_OPT_INITIALISE, OptInit); + hLoadHook = HookEvent(ME_SYSTEM_MODULESLOADED, NewsAggrInit); + hOnPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, NewsAggrPreShutdown); + + hUpdateMutex = CreateMutex(NULL, FALSE, NULL); + hChangeFeedDlgList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST,0,0); + + // register weather protocol + PROTOCOLDESCRIPTOR pd = {0}; + pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE; + pd.szName = MODULE; + pd.type = PROTOTYPE_PROTOCOL; + CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd); + + hProtoService[0] = CreateProtoServiceFunction(MODULE, PS_GETNAME, NewsAggrGetName); + hProtoService[1] = CreateProtoServiceFunction(MODULE, PS_GETCAPS, NewsAggrGetCaps); + hProtoService[2] = CreateProtoServiceFunction(MODULE, PS_SETSTATUS, NewsAggrSetStatus); + hProtoService[3] = CreateProtoServiceFunction(MODULE, PS_GETSTATUS, NewsAggrGetStatus); + hProtoService[4] = CreateProtoServiceFunction(MODULE, PS_LOADICON, NewsAggrLoadIcon); + hProtoService[5] = CreateProtoServiceFunction(MODULE, PSS_GETINFO, NewsAggrGetInfo); + hProtoService[6] = CreateProtoServiceFunction(MODULE, PS_GETAVATARINFO, NewsAggrGetAvatarInfo); + + hService[0] = CreateServiceFunction(MS_NEWSAGGR_CHECKALLFEEDS, CheckAllFeeds); + hService[1] = CreateServiceFunction(MS_NEWSAGGR_ADDFEED, AddFeed); + hService[2] = CreateServiceFunction(MS_NEWSAGGR_IMPORTFEEDS, ImportFeeds); + hService[3] = CreateServiceFunction(MS_NEWSAGGR_EXPORTFEEDS, ExportFeeds); + hService[4] = CreateServiceFunction(MS_NEWSAGGR_CHECKFEED, CheckFeed); + hService[5] = CreateServiceFunction(MS_NEWSAGGR_CHANGEFEED, ChangeFeed); + + return 0; +} + +extern "C" __declspec(dllexport) int Unload(void) +{ + for (int i = 0;i<NUM_SERVICES;i++) + DestroyServiceFunction(hService[i]); + + UnhookEvent(hOptHook); + UnhookEvent(hLoadHook); + UnhookEvent(hOnPreShutdown); + + DestroyUpdateList(); + CloseHandle(hUpdateMutex); + + return 0; +} \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp new file mode 100644 index 0000000000..b9dc78b90c --- /dev/null +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -0,0 +1,649 @@ +/* +Copyright (C) 2012 Mataes + +This 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 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 file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#include "common.h" + +INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwndDlg); + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); + SetWindowText(hwndDlg, TranslateT("Add Feed")); + SetDlgItemText(hwndDlg, IDC_FEEDURL, _T("http://")); + SetDlgItemText(hwndDlg, IDC_TAGSEDIT, _T(TAGSDEFAULT)); + SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, EM_LIMITTEXT, 3, 0); + SetDlgItemInt(hwndDlg, IDC_CHECKTIME, 60, TRUE); + SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999); + Utils_RestoreWindowPositionNoSize(hwndDlg,NULL,MODULE,"AddDlg"); + return TRUE; + } + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + case IDOK: + { + TCHAR str[MAX_PATH]; + if (!GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str))) + { + MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK); + break; + } + else if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) + { + MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); + break; + } + else if (GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false) < 0) + { + MessageBox(hwndDlg, TranslateT("Enter checking interval"), TranslateT("Error"), MB_OK); + break; + } + else if (!GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str))) + { + MessageBox(hwndDlg, TranslateT("Enter message format"), TranslateT("Error"), MB_OK); + break; + } + else + { + HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0); + CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)MODULE); + GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "Nick", str); + HWND hwndList = (HWND)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "URL", str); + DBWriteContactSettingByte(hContact, MODULE, "CheckState", 1); + DBWriteContactSettingDword(hContact, MODULE, "UpdateTime", GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false)); + GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "MsgFormat", str); + DBWriteContactSettingWord(hContact, MODULE, "Status", CallProtoService(MODULE, PS_GETSTATUS, 0, 0)); + if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) + { + DBWriteContactSettingByte(hContact, MODULE, "UseAuth", 1); + GetDlgItemText(hwndDlg, IDC_LOGIN, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "Login", str); + GetDlgItemText(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "Password", str); + } + DeleteAllItems(hwndList); + UpdateList(hwndList); + } + } + + case IDCANCEL: + DestroyWindow(hwndDlg); + break; + + case IDC_USEAUTH: + { + if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE); + } + } + break; + + case IDC_TAGHELP: + MessageBox(hwndDlg, TranslateT(TAGSHELP), TranslateT("Feed Tag Help"), MB_OK); + break; + + case IDC_RESET: + if (MessageBox(hwndDlg, TranslateT("Are you sure?"), TranslateT("Tags Mask Reset"), MB_YESNO | MB_ICONWARNING) == IDYES) + SetDlgItemText(hwndDlg, IDC_TAGSEDIT, _T(TAGSDEFAULT)); + break; + + case IDC_DISCOVERY: + { + EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE); + SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait...")); + TCHAR tszURL[MAX_PATH] = {0}, *tszTitle = NULL; + if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) + tszTitle = CheckFeed(tszURL, hwndDlg); + else + MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); + SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle); + EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE); + SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed")); + } + break; + } + break; + } + case WM_CLOSE: + { + DestroyWindow(hwndDlg); + break; + } + case WM_DESTROY: + { + Utils_SaveWindowPosition(hwndDlg,NULL,MODULE,"AddDlg"); + } + } + + return FALSE; +} + +INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwndDlg); + ItemInfo &SelItem = *(ItemInfo*)lParam; + ItemInfo *nSelItem = new ItemInfo(SelItem); + SetWindowText(hwndDlg, TranslateT("Change Feed")); + SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, EM_LIMITTEXT, 3, 0); + SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999); + + HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + while (hContact != NULL) + { + if (IsMyContact(hContact)) + { + DBVARIANT dbNick = {0}; + if (DBGetContactSettingTString(hContact, MODULE, "Nick", &dbNick)) + continue; + else if (lstrcmp(dbNick.ptszVal, SelItem.nick) == 0) + { + DBFreeVariant(&dbNick); + DBVARIANT dbURL = {0}; + if (DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) + continue; + else if (lstrcmp(dbURL.ptszVal, SelItem.url) == 0) + { + DBFreeVariant(&dbURL); + nSelItem->hContact = hContact; + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG)nSelItem); + SetDlgItemText(hwndDlg, IDC_FEEDURL, SelItem.url); + SetDlgItemText(hwndDlg, IDC_FEEDTITLE, SelItem.nick); + SetDlgItemInt(hwndDlg, IDC_CHECKTIME, DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60), TRUE); + DBVARIANT dbMsg = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "MsgFormat", &dbMsg)) + { + SetDlgItemText(hwndDlg, IDC_TAGSEDIT, dbMsg.ptszVal); + DBFreeVariant(&dbMsg); + } + if (DBGetContactSettingByte(hContact, MODULE, "UseAuth", 0)) + { + CheckDlgButton(hwndDlg, IDC_USEAUTH, BST_CHECKED); + EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); + DBVARIANT dbLogin = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "Login", &dbLogin)) + { + SetDlgItemText(hwndDlg, IDC_LOGIN, dbLogin.ptszVal); + DBFreeVariant(&dbLogin); + } + DBVARIANT dbPass = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "Password", &dbPass)) + { + SetDlgItemText(hwndDlg, IDC_PASSWORD, dbPass.ptszVal); + DBFreeVariant(&dbPass); + } + } + break; + } + DBFreeVariant(&dbURL); + } + DBFreeVariant(&dbNick); + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + WindowList_Add(hChangeFeedDlgList,hwndDlg,hContact); + Utils_RestoreWindowPositionNoSize(hwndDlg,hContact,MODULE,"ChangeDlg"); + return TRUE; + } + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + case IDOK: + { + ItemInfo *SelItem = (ItemInfo*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + TCHAR str[MAX_PATH]; + if (!GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str))) + { + MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK); + break; + } + else if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) + { + MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); + break; + } + else if (GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false) < 0) + { + MessageBox(hwndDlg, TranslateT("Enter checking interval"), TranslateT("Error"), MB_OK); + break; + } + else if (!GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str))) + { + MessageBox(hwndDlg, TranslateT("Enter message format"), TranslateT("Error"), MB_OK); + break; + } + else + { + GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)); + DBWriteContactSettingTString(SelItem->hContact, MODULE, "URL", str); + GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str)); + DBWriteContactSettingTString(SelItem->hContact, MODULE, "Nick", str); + DBWriteContactSettingDword(SelItem->hContact, MODULE, "UpdateTime", GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false)); + GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str)); + DBWriteContactSettingTString(SelItem->hContact, MODULE, "MsgFormat", str); + if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) + { + DBWriteContactSettingByte(SelItem->hContact, MODULE, "UseAuth", 1); + GetDlgItemText(hwndDlg, IDC_LOGIN, str, SIZEOF(str)); + DBWriteContactSettingTString(SelItem->hContact, MODULE, "Login", str); + GetDlgItemText(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); + DBWriteContactSettingTString(SelItem->hContact, MODULE, "Password", str); + } + DeleteAllItems(SelItem->hwndList); + UpdateList(SelItem->hwndList); + } + } + + case IDCANCEL: + DestroyWindow(hwndDlg); + break; + + case IDC_USEAUTH: + { + if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE); + } + break; + } + + case IDC_TAGHELP: + MessageBox(hwndDlg, TranslateT(TAGSHELP), TranslateT("Feed Tag Help"), MB_OK); + break; + + case IDC_RESET: + if (MessageBox(hwndDlg, TranslateT("Are you sure?"), TranslateT("Tags Mask Reset"), MB_YESNO | MB_ICONWARNING) == IDYES) + SetDlgItemText(hwndDlg, IDC_TAGSEDIT, _T(TAGSDEFAULT)); + break; + + case IDC_DISCOVERY: + { + TCHAR tszURL[MAX_PATH] = {0}; + if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE); + SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait...")); + TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg); + SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle); + EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE); + SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed")); + } + else + MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); + } + break; + } + break; + } + + case WM_CLOSE: + { + DestroyWindow(hwndDlg); + break; + } + + case WM_DESTROY: + { + HANDLE hContact = (HANDLE) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + Utils_SaveWindowPosition(hwndDlg,hContact,MODULE,"ChangeDlg"); + WindowList_Remove(hChangeFeedDlgList,hwndDlg); + ItemInfo *SelItem = (ItemInfo*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + delete SelItem; + break; + } + } + + return FALSE; +} + +INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwndDlg); + SetWindowText(hwndDlg, TranslateT("Change Feed")); + SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, UDM_SETRANGE32, 0, 999); + + HANDLE hContact = (HANDLE)lParam; + WindowList_Add(hChangeFeedDlgList,hwndDlg,hContact); + Utils_RestoreWindowPositionNoSize(hwndDlg,hContact,MODULE,"ChangeDlg"); + DBVARIANT dbNick = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "Nick", &dbNick)) + { + SetDlgItemText(hwndDlg, IDC_FEEDTITLE, dbNick.ptszVal); + DBFreeVariant(&dbNick); + DBVARIANT dbURL = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) + { + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG)lParam); + SetDlgItemText(hwndDlg, IDC_FEEDURL, dbURL.ptszVal); + DBFreeVariant(&dbURL); + SetDlgItemInt(hwndDlg, IDC_CHECKTIME, DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60), TRUE); + DBVARIANT dbMsg = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "MsgFormat", &dbMsg)) + { + SetDlgItemText(hwndDlg, IDC_TAGSEDIT, dbMsg.ptszVal); + DBFreeVariant(&dbMsg); + } + if (DBGetContactSettingByte(hContact, MODULE, "UseAuth", 0)) + { + CheckDlgButton(hwndDlg, IDC_USEAUTH, BST_CHECKED); + EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); + DBVARIANT dbLogin = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "Login", &dbLogin)) + { + SetDlgItemText(hwndDlg, IDC_LOGIN, dbLogin.ptszVal); + DBFreeVariant(&dbLogin); + } + DBVARIANT dbPass = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "Password", &dbPass)) + { + SetDlgItemText(hwndDlg, IDC_PASSWORD, dbPass.ptszVal); + DBFreeVariant(&dbPass); + } + } + break; + } + } + return TRUE; + } + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + case IDOK: + { + HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + TCHAR str[MAX_PATH]; + if (!GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str))) + { + MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK); + break; + } + else if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) + { + MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); + break; + } + else if (GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false) < 0) + { + MessageBox(hwndDlg, TranslateT("Enter checking interval"), TranslateT("Error"), MB_OK); + break; + } + else if (!GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str))) + { + MessageBox(hwndDlg, TranslateT("Enter message format"), TranslateT("Error"), MB_OK); + break; + } + else + { + GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "URL", str); + GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "Nick", str); + DBWriteContactSettingDword(hContact, MODULE, "UpdateTime", GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false)); + GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "MsgFormat", str); + if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) + { + DBWriteContactSettingByte(hContact, MODULE, "UseAuth", 1); + GetDlgItemText(hwndDlg, IDC_LOGIN, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "Login", str); + GetDlgItemText(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); + DBWriteContactSettingTString(hContact, MODULE, "Password", str); + } + } + } + + case IDCANCEL: + DestroyWindow(hwndDlg); + break; + + case IDC_USEAUTH: + { + if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE); + } + break; + } + + case IDC_TAGHELP: + MessageBox(hwndDlg, TranslateT(TAGSHELP), TranslateT("Feed Tag Help"), MB_OK); + break; + + case IDC_RESET: + if (MessageBox(hwndDlg, TranslateT("Are you sure?"), TranslateT("Tags Mask Reset"), MB_YESNO | MB_ICONWARNING) == IDYES) + SetDlgItemText(hwndDlg, IDC_TAGSEDIT, _T(TAGSDEFAULT)); + break; + + case IDC_DISCOVERY: + { + TCHAR tszURL[MAX_PATH] = {0}; + if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE); + SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait...")); + TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg); + SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle); + EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE); + SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed")); + } + else + MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); + } + break; + } + break; + } + + case WM_CLOSE: + { + DestroyWindow(hwndDlg); + break; + } + case WM_DESTROY: + { + HANDLE hContact = (HANDLE) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + Utils_SaveWindowPosition(hwndDlg,hContact,MODULE,"ChangeDlg"); + WindowList_Remove(hChangeFeedDlgList,hwndDlg); + } + } + + return FALSE; +} + +INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + HWND hwndList = GetDlgItem(hwndDlg, IDC_FEEDLIST); + switch (msg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwndDlg); + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0); + CreateList(hwndList); + UpdateList(hwndList); + return TRUE; + } + + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + case IDC_ADD: + { + CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), hwndDlg, DlgProcAddFeedOpts, (LPARAM)hwndList); + } + return FALSE; + case IDC_CHANGE: + { + ItemInfo SelItem = {0}; + int sel = ListView_GetSelectionMark(hwndList); + ListView_GetItemText(hwndList, sel, 0, SelItem.nick, MAX_PATH); + ListView_GetItemText(hwndList, sel, 1, SelItem.url, MAX_PATH); + SelItem.hwndList = hwndList; + SelItem.SelNumber = sel; + CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), hwndDlg, DlgProcChangeFeedOpts, (LPARAM)&SelItem); + } + return FALSE; + case IDC_REMOVE: + { + if (MessageBox(hwndDlg, TranslateT("Are you sure?"), TranslateT("Contact deleting"), MB_YESNO | MB_ICONWARNING) == IDYES) + { + TCHAR nick[MAX_PATH], url[MAX_PATH]; + int sel = ListView_GetSelectionMark(hwndList); + ListView_GetItemText(hwndList, sel, 0, nick, MAX_PATH); + ListView_GetItemText(hwndList, sel, 1, url, MAX_PATH); + + HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + while (hContact != NULL) + { + if(IsMyContact(hContact)) + { + DBVARIANT dbNick = {0}; + if (DBGetContactSettingTString(hContact, MODULE, "Nick", &dbNick)) + break; + else if (lstrcmp(dbNick.ptszVal, nick) == 0) + { + DBFreeVariant(&dbNick); + DBVARIANT dbURL = {0}; + if (DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) + break; + else if (lstrcmp(dbURL.ptszVal, url) == 0) + { + DBFreeVariant(&dbURL); + CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0); + ListView_DeleteItem(hwndList, sel); + break; + } + DBFreeVariant(&dbURL); + } + DBFreeVariant(&dbNick); + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + } + return FALSE; + } + } + break; + } + case WM_NOTIFY: + { + NMHDR *hdr = (NMHDR *)lParam; + switch (hdr->code) + { + case PSN_APPLY: + { + HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + int i = 0; + while (hContact != NULL) + { + if(IsMyContact(hContact)) + { + DBWriteContactSettingByte(hContact, MODULE, "CheckState", ListView_GetCheckState(hwndList, i)); + i += 1; + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + break; + } + + case NM_DBLCLK: + { + ItemInfo SelItem = {0}; + int sel = ListView_GetHotItem(hwndList); + if (sel != -1) + { + ListView_GetItemText(hwndList, sel, 0, SelItem.nick, MAX_PATH); + ListView_GetItemText(hwndList, sel, 1, SelItem.url, MAX_PATH); + SelItem.hwndList = hwndList; + SelItem.SelNumber = sel; + CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), hwndDlg, DlgProcChangeFeedOpts, (LPARAM)&SelItem); + } + break; + } + + case LVN_ITEMCHANGED: + { + NMLISTVIEW *nmlv = (NMLISTVIEW *)lParam; + if (((nmlv->uNewState ^ nmlv->uOldState) & LVIS_STATEIMAGEMASK) && !UpdateListFlag) + { + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + } + break; + } + } + } + }//end* switch (msg) + return FALSE; +} + +INT OptInit(WPARAM wParam, LPARAM lParam) +{ + OPTIONSDIALOGPAGE odp = {0}; + + ZeroMemory(&odp, sizeof(odp)); + odp.cbSize = sizeof(odp); + odp.position = 100000000; + odp.hInstance = hInst; + odp.flags = ODPF_TCHAR | ODPF_BOLDGROUPS; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS); + odp.ptszGroup = LPGENT("Network"); + odp.ptszTitle = LPGENT("News Aggregator"); + odp.pfnDlgProc = UpdateNotifyOptsProc; + CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp); + return 0; +} \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp new file mode 100644 index 0000000000..0c23983c79 --- /dev/null +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -0,0 +1,240 @@ +/* +Copyright (C) 2012 Mataes + +This 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 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 file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#include "common.h" + +int g_nStatus = ID_STATUS_OFFLINE; +UINT_PTR timerId = 0; + +void SetContactStatus(HANDLE hContact,int nNewStatus) +{ + if(DBGetContactSettingWord(hContact,MODULE,"Status",ID_STATUS_OFFLINE) != nNewStatus) + DBWriteContactSettingWord(hContact,MODULE,"Status",nNewStatus); +} + +static void __cdecl WorkingThread(void* param) +{ + int nStatus = (int)param; +// UpdateAll(FALSE, FALSE); + HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + while (hContact != NULL) + { + if(IsMyContact(hContact)) + { + SetContactStatus(hContact, nStatus); + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } +} + +int NewsAggrInit(WPARAM wParam,LPARAM lParam) +{ + HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + while (hContact != NULL) + { + if(IsMyContact(hContact)) + { + SetContactStatus(hContact, ID_STATUS_OFFLINE); + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + NetlibInit(); + InitIcons(); + InitMenu(); + + // timer for the first update + timerId = SetTimer(NULL, 0, 5000, timerProc2); // first update is 5 sec after load + + return 0; +} + +int NewsAggrPreShutdown(WPARAM wParam,LPARAM lParam) +{ + if (hAddFeedDlg) + { + SendMessage(hAddFeedDlg, WM_CLOSE, 0, 0); + } + WindowList_Broadcast(hChangeFeedDlgList, WM_CLOSE, 0, 0); + + mir_forkthread(WorkingThread, (void*)ID_STATUS_OFFLINE); + KillTimer(NULL, timerId); + NetlibUnInit(); + + return 0; +} + +INT_PTR NewsAggrGetName(WPARAM wParam, LPARAM lParam) +{ + if(lParam) + { + lstrcpynA((char*)lParam, MODULE, wParam); + return 0; + } + else + { + return 1; + } +} + +INT_PTR NewsAggrGetCaps(WPARAM wp,LPARAM lp) +{ + switch(wp) + { + case PFLAGNUM_1: + return PF1_IM | PF1_PEER2PEER; + case PFLAGNUM_3: + case PFLAGNUM_2: + return PF2_ONLINE; + case PFLAGNUM_4: + return PF4_AVATARS; + case PFLAG_UNIQUEIDTEXT: + return (INT_PTR) "News Feed"; + case PFLAG_UNIQUEIDSETTING: + return (INT_PTR) "URL"; + default: + return 0; + } +} + +INT_PTR NewsAggrSetStatus(WPARAM wp,LPARAM /*lp*/) +{ + int nStatus = wp; + if ((ID_STATUS_ONLINE == nStatus) || (ID_STATUS_OFFLINE == nStatus)) + { + int nOldStatus = g_nStatus; + if(nStatus != g_nStatus) + { + g_nStatus = nStatus; + mir_forkthread(WorkingThread, (void*)g_nStatus); + ProtoBroadcastAck(MODULE, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, g_nStatus); + } + + } + + return 0; +} + +INT_PTR NewsAggrGetStatus(WPARAM/* wp*/,LPARAM/* lp*/) +{ + return g_nStatus; +} + +INT_PTR NewsAggrLoadIcon(WPARAM wParam,LPARAM lParam) +{ + return (LOWORD(wParam) == PLI_PROTOCOL) ? (INT_PTR)CopyIcon(LoadIconEx("main", FALSE)) : 0; +} + +static void __cdecl AckThreadProc(HANDLE param) +{ + Sleep(100); + ProtoBroadcastAck(MODULE, param, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0); +} + +INT_PTR NewsAggrGetInfo(WPARAM wParam,LPARAM lParam) +{ + CCSDATA *ccs = (CCSDATA *) lParam; + mir_forkthread(AckThreadProc, ccs->hContact); + return 0; +} + +INT_PTR CheckAllFeeds(WPARAM wParam,LPARAM lParam) +{ + HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + while (hContact != NULL) + { + if(IsMyContact(hContact)) + { + UpdateListAdd(hContact); + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + if (!ThreadRunning) + mir_forkthread(UpdateThreadProc, NULL); + + + return 0; +} + +INT_PTR AddFeed(WPARAM wParam,LPARAM lParam) +{ + hAddFeedDlg = CreateDialog(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcAddFeedOpts); + ShowWindow(hAddFeedDlg, SW_SHOW); + return 0; +} + +INT_PTR ChangeFeed(WPARAM wParam,LPARAM lParam) +{ + HANDLE hContact = (HANDLE) wParam; + HWND hChangeFeedDlg = WindowList_Find(hChangeFeedDlgList,hContact); + if (!hChangeFeedDlg) + { + hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcChangeFeedMenu, (LPARAM)hContact); + ShowWindow(hChangeFeedDlg, SW_SHOW); + } + else + { + SetForegroundWindow(hChangeFeedDlg); + SetFocus(hChangeFeedDlg); + } + return 0; +} + +INT_PTR ImportFeeds(WPARAM wParam,LPARAM lParam) +{ + return 0; +} + +INT_PTR ExportFeeds(WPARAM wParam,LPARAM lParam) +{ + return 0; +} + +INT_PTR CheckFeed(WPARAM wParam,LPARAM lParam) +{ + HANDLE hContact = (HANDLE)wParam; + if(IsMyContact(hContact)) + UpdateListAdd(hContact); + if (!ThreadRunning) + mir_forkthread(UpdateThreadProc, NULL); + return 0; +} + +INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam,LPARAM lParam) +{ + PROTO_AVATAR_INFORMATION* pai = (PROTO_AVATAR_INFORMATION*) lParam; + + if (!IsMyContact(pai->hContact)) + return GAIR_NOAVATAR; + + // if GAIF_FORCE is set, we are updating the feed + // otherwise, cached avatar is used + if (wParam & GAIF_FORCE) + UpdateListAdd(pai->hContact); + //CheckCurrentFeed(pai->hContact); + if (!ThreadRunning) + mir_forkthread(UpdateThreadProc, NULL); + + DBVARIANT dbv = {0}; + if(DBGetContactSettingTString(pai->hContact,MODULE,"ImageURL",&dbv)) + { + return GAIR_NOAVATAR; + } + DBFreeVariant(&dbv); + return GAIR_WAITFOR; +} \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp new file mode 100644 index 0000000000..f2f5ecf92a --- /dev/null +++ b/plugins/NewsAggregator/Src/Update.cpp @@ -0,0 +1,147 @@ +/* +Copyright (C) 2012 Mataes + +This 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 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 file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#include "common.h" + +// check if Feed is currently updating +BOOL ThreadRunning; +UPDATELIST *UpdateListHead = NULL; +UPDATELIST *UpdateListTail = NULL; + +// main auto-update timer +VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) +{ + // only run if it is not current updating and the auto update option is enabled + if (!ThreadRunning && !Miranda_Terminated()) + { + BOOL HaveUpdates = FALSE; + HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + while (hContact != NULL) + { + if(IsMyContact(hContact)) + { + if (DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60)) + { + double diff = difftime(time(NULL), DBGetContactSettingDword(hContact, MODULE, "LastCheck", 0)); + if (diff >= DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60) * 60) + { + UpdateListAdd(hContact); + HaveUpdates = TRUE; + } + } + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + if (!ThreadRunning && HaveUpdates) + mir_forkthread(UpdateThreadProc, NULL); + } +} + +// temporary timer for first run +// when this is run, it kill the old startup timer and create the permenant one above +VOID CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) +{ + KillTimer(NULL, timerId); + ThreadRunning = FALSE; + + if (!Miranda_Terminated()) + { + CheckAllFeeds(0,0); + timerId = SetTimer(NULL, 0, 30000, (TIMERPROC)timerProc); + } +} + +void UpdateListAdd(HANDLE hContact) +{ + UPDATELIST *newItem; + + newItem = (UPDATELIST*)mir_alloc(sizeof(UPDATELIST)); + newItem->hContact = hContact; + newItem->next = NULL; + + WaitForSingleObject(hUpdateMutex, INFINITE); + + if (UpdateListTail == NULL) UpdateListHead = newItem; + else UpdateListTail->next = newItem; + UpdateListTail = newItem; + + ReleaseMutex(hUpdateMutex); +} + +HANDLE UpdateGetFirst() +{ + HANDLE hContact = NULL; + + WaitForSingleObject(hUpdateMutex, INFINITE); + + if (UpdateListHead != NULL) + { + UPDATELIST* Item = UpdateListHead; + + hContact = Item->hContact; + UpdateListHead = Item->next; + mir_free(Item); + + if (UpdateListHead == NULL) UpdateListTail = NULL; + } + + ReleaseMutex(hUpdateMutex); + + return hContact; +} + +void DestroyUpdateList(void) +{ + UPDATELIST *temp; + + WaitForSingleObject(hUpdateMutex, INFINITE); + + temp = UpdateListHead; + + // free the list one by one + while (temp != NULL) + { + UpdateListHead = temp->next; + mir_free(temp); + temp = UpdateListHead; + } + // make sure the entire list is clear + UpdateListTail = NULL; + + ReleaseMutex(hUpdateMutex); +} + +void UpdateThreadProc(LPVOID hWnd) +{ + WaitForSingleObject(hUpdateMutex, INFINITE); + if (ThreadRunning) + { + ReleaseMutex(hUpdateMutex); + return; + } + ThreadRunning = TRUE; // prevent 2 instance of this thread running + ReleaseMutex(hUpdateMutex); + + // update weather by getting the first station from the queue until the queue is empty + while (UpdateListHead != NULL && !Miranda_Terminated()) + CheckCurrentFeed(UpdateGetFirst()); + + // exit the update thread + ThreadRunning = FALSE; +} \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp new file mode 100644 index 0000000000..c42a3f7dd1 --- /dev/null +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -0,0 +1,1404 @@ +/* +Copyright (C) 2012 Mataes + +This 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 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 file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#include "common.h" + +HANDLE hNetlibUser = NULL, hNetlibHttp; +BOOL UpdateListFlag = FALSE; + +BOOL IsMyContact(HANDLE hContact) +{ + const char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + return szProto != NULL && strcmp(MODULE, szProto) == 0; +} + +VOID NetlibInit() +{ + NETLIBUSER nlu = {0}; + nlu.cbSize = sizeof(nlu); + nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY; + nlu.ptszDescriptiveName = TranslateT("NewsAggr HTTP connection"); + nlu.szSettingsModule = MODULE; + hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); +} + +VOID NetlibUnInit() +{ + Netlib_CloseHandle(hNetlibUser); + hNetlibUser = NULL; +} + +static void arrayToHex(BYTE* data, size_t datasz, char* res) +{ + char* resptr = res; + for (unsigned i=0; i<datasz ; i++) + { + const BYTE ch = data[i]; + + const char ch0 = (char)(ch >> 4); + *resptr++ = (char)((ch0 <= 9) ? ('0' + ch0) : (('a' - 10) + ch0)); + + const char ch1 = (char)(ch & 0xF); + *resptr++ = (char)((ch1 <= 9) ? ('0' + ch1) : (('a' - 10) + ch1)); + } + *resptr = '\0'; +} + +int GetImageFormat(const TCHAR* ext) +{ + if(lstrcmp(ext,_T(".jpg")) || lstrcmp(ext,_T(".jpeg"))) + { + return PA_FORMAT_JPEG; + } + else if(lstrcmp(ext,_T(".png"))) + { + return PA_FORMAT_PNG; + } + else if(lstrcmp(ext,_T(".gif"))) + { + return PA_FORMAT_GIF; + } + else if(lstrcmp(ext,_T(".ico"))) + { + return PA_FORMAT_ICON; + } + else if(lstrcmp(ext,_T(".bmp"))) + { + return PA_FORMAT_BMP; + } + else if(lstrcmp(ext,_T(".swf"))) + { + return PA_FORMAT_SWF; + } + else if(lstrcmp(ext,_T(".xml"))) + { + return PA_FORMAT_XML; + } + else if(lstrcmp(ext,_T(".jpg")) || lstrcmp(ext,_T(".jpeg"))) + { + return PA_FORMAT_JPEG; + } + else + { + return PA_FORMAT_UNKNOWN; + } +} +void CreateAuthString(char* auth, HANDLE hContact, HWND hwndDlg) +{ + char *user = NULL, *pass = NULL; + TCHAR *tlogin = NULL, *tpass = NULL, buf[MAX_PATH] = {0}; + if (hContact && DBGetContactSettingByte(hContact, MODULE, "UseAuth", 0)) + { + DBVARIANT dbLogin = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "Login", &dbLogin)) + { + tlogin = (TCHAR*)mir_alloc(_tcslen(dbLogin.ptszVal)*sizeof(TCHAR)); + memcpy(tlogin, dbLogin.ptszVal, _tcslen(dbLogin.ptszVal)*sizeof(TCHAR)); + tlogin[_tcslen(dbLogin.ptszVal)] = 0; + DBFreeVariant(&dbLogin); + } + DBVARIANT dbPass = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "Password", &dbPass)) + { + tpass = (TCHAR*)mir_alloc(_tcslen(dbPass.ptszVal)*sizeof(TCHAR)); + memcpy(tpass, dbPass.ptszVal, _tcslen(dbPass.ptszVal)*sizeof(TCHAR)); + tpass[_tcslen(dbPass.ptszVal)] = 0; + DBFreeVariant(&dbPass); + } + } + else if (hwndDlg && IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) + { + GetDlgItemText(hwndDlg, IDC_LOGIN, buf, SIZEOF(buf)); + tlogin = buf; + GetDlgItemText(hwndDlg, IDC_PASSWORD, buf, SIZEOF(buf)); + tpass = buf; + } + user = mir_t2a(tlogin); + pass = mir_t2a(tpass); + + char str[MAX_PATH]; + int len = mir_snprintf(str, SIZEOF(str), "%s:%s", user, pass); + mir_free(user); + mir_free(pass); + + strcpy(auth, "Basic "); + NETLIBBASE64 nlb = { auth+6, 250, (PBYTE)str, len }; + CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb)); +} + +VOID GetNewsData(TCHAR *tszUrl, char** szData, HANDLE hContact, HWND hwndDlg) +{ + char* szRedirUrl = NULL; + NETLIBHTTPREQUEST nlhr = {0}; + NETLIBHTTPHEADER headers[5]; + + // initialize the netlib request + nlhr.cbSize = sizeof(nlhr); + nlhr.requestType = REQUEST_GET; + nlhr.flags = NLHRF_NODUMP | NLHRF_HTTP11; + char *szUrl = mir_t2a(tszUrl); + nlhr.szUrl = szUrl; + nlhr.nlc = hNetlibHttp; + + // change the header so the plugin is pretended to be IE 6 + WinXP + nlhr.headers = headers; + nlhr.headers[0].szName = "User-Agent"; + nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"; + nlhr.headers[1].szName = "Cache-Control"; + nlhr.headers[1].szValue = "no-cache"; + nlhr.headers[2].szName = "Pragma"; + nlhr.headers[2].szValue = "no-cache"; + nlhr.headers[3].szName = "Connection"; + nlhr.headers[3].szValue = "close"; + nlhr.headers[4].szName = "Accept"; + nlhr.headers[4].szValue = "ext/html, application/xml"; + if (DBGetContactSettingByte(hContact, MODULE, "UseAuth", 0) || IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) + { + nlhr.headersCount = 6; + nlhr.headers[5].szName = "Authorization"; + + char auth[256]; + CreateAuthString(auth, hContact, hwndDlg); + nlhr.headers[5].szValue = auth; + } + else + nlhr.headersCount = 5; + + // download the page + NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&nlhr); + if (nlhrReply) + { + // if the recieved code is 200 OK + switch(nlhrReply->resultCode) + { + case 200: + { + if (nlhrReply->dataLength) + { + // allocate memory and save the retrieved data + *szData = (char *)mir_alloc(nlhrReply->dataLength + 2); + memcpy(*szData, nlhrReply->pData, nlhrReply->dataLength); + (*szData)[nlhrReply->dataLength] = 0; + } + break; + } + + case 401: + { + //ShowMessage(0, TranslateT("Cannot upload VersionInfo. Incorrect username or password")); + break; + } + + case 301: + case 302: + case 307: + // get the url for the new location and save it to szInfo + // look for the reply header "Location" + for (int i=0; i<nlhrReply->headersCount; i++) + { + if (!strcmp(nlhrReply->headers[i].szName, "Location")) + { + size_t rlen = 0; + if (nlhrReply->headers[i].szValue[0] == '/') + { + const char* szPath; + const char* szPref = strstr(szUrl, "://"); + szPref = szPref ? szPref + 3 : szUrl; + szPath = strchr(szPref, '/'); + rlen = szPath != NULL ? szPath - szUrl : strlen(szUrl); + } + + szRedirUrl = (char*)mir_realloc(szRedirUrl, + rlen + strlen(nlhrReply->headers[i].szValue)*3 + 1); + + strncpy(szRedirUrl, szUrl, rlen); + strcpy(szRedirUrl+rlen, nlhrReply->headers[i].szValue); + + nlhr.szUrl = szRedirUrl; + break; + } + } + break; + + default: + //ShowMessage(0, TranslateT("Cannot upload VersionInfo. Unknown error")); + break; + } + CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)nlhrReply); + } + mir_free(szUrl); +} + +VOID CreateList (HWND hwndList) +{ + SendMessage(hwndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES); + + LVCOLUMN lvc = {0}; + // Initialize the LVCOLUMN structure. + // The mask specifies that the format, width, text, and + // subitem members of the structure are valid. + lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + lvc.fmt = LVCFMT_LEFT; + + lvc.iSubItem = 0; + lvc.pszText = TranslateT("Feed"); + lvc.cx = 160; // width of column in pixels + ListView_InsertColumn(hwndList, 0, &lvc); + + lvc.iSubItem = 1; + lvc.pszText = TranslateT("URL"); + lvc.cx = 280; // width of column in pixels + ListView_InsertColumn(hwndList, 1, &lvc); +} + +VOID UpdateList (HWND hwndList) +{ + LVITEM lvI = {0}; + + // Some code to create the list-view control. + // Initialize LVITEM members that are common to all + // items. + HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + int i = 0; + while (hContact != NULL) + { + if (IsMyContact(hContact)) + { + UpdateListFlag = TRUE; + lvI.mask = LVIF_TEXT; + lvI.iSubItem = 0; + DBVARIANT dbNick = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "Nick", &dbNick)) + { + lvI.pszText = dbNick.ptszVal; + lvI.iItem = i; + ListView_InsertItem(hwndList, &lvI); + lvI.iSubItem = 1; + DBVARIANT dbURL = {0}; + if (!DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) + { + lvI.pszText = dbURL.ptszVal; + ListView_SetItem(hwndList, &lvI); + i += 1; + ListView_SetCheckState(hwndList, lvI.iItem, DBGetContactSettingByte(hContact, MODULE, "CheckState", 1)); + DBFreeVariant(&dbURL); + } + DBFreeVariant(&dbNick); + } + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + UpdateListFlag = FALSE; +} + +VOID DeleteAllItems(HWND hwndList) +{ + ListView_DeleteAllItems(hwndList); +} + +time_t __stdcall DateToUnixTime(TCHAR* stamp, BOOL FeedType) +{ + struct tm timestamp; + TCHAR date[9]; + int i, y; + time_t t; + + if ( stamp == NULL ) return ( time_t ) 0; + + TCHAR *p = stamp; + + if (FeedType) + { + // skip '-' chars + int si = 0, sj = 0; + while (1) { + if ( p[si] == _T('-') ) + si++; + else + if ( !( p[sj++] = p[si++] )) + break; + }; + } + else + { + TCHAR weekday[4], monthstr[4], timezonesign[2]; + INT day, month, year, hour, min, sec, timezoneh, timezonem; + if (_tcsstr(p, _T(","))) + { + _stscanf( p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); + if (lstrcmpi(monthstr, _T("Jan")) ==0) + month = 1; + if (lstrcmpi(monthstr, _T("Feb")) ==0) + month = 2; + if (lstrcmpi(monthstr, _T("Mar")) ==0) + month = 3; + if (lstrcmpi(monthstr, _T("Apr")) ==0) + month = 4; + if (lstrcmpi(monthstr, _T("May")) ==0) + month = 5; + if (lstrcmpi(monthstr, _T("Jun")) ==0) + month = 6; + if (lstrcmpi(monthstr, _T("Jul")) ==0) + month = 7; + if (lstrcmpi(monthstr, _T("Aug")) ==0) + month = 8; + if (lstrcmpi(monthstr, _T("Sep")) ==0) + month = 9; + if (lstrcmpi(monthstr, _T("Oct")) ==0) + month = 10; + if (lstrcmpi(monthstr, _T("Nov")) ==0) + month = 11; + if (lstrcmpi(monthstr, _T("Dec")) ==0) + month = 12; + if (lstrcmp(timezonesign, _T("+")) ==0) + mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec); + else if (lstrcmp(timezonesign, _T("-")) ==0) + mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec); + else + mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec); + } + else + { + _stscanf( p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); + if (lstrcmp(timezonesign, _T("+")) ==0) + mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec); + else if (lstrcmp(timezonesign, _T("-")) ==0) + mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec); + else + mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec); + } + } + // Get the date part + for ( i=0; *p!='\0' && i<8 && isdigit( *p ); p++,i++ ) + date[i] = *p; + + // Parse year + if ( i == 6 ) { + // 2-digit year ( 1970-2069 ) + y = ( date[0]-'0' )*10 + ( date[1]-'0' ); + if ( y < 70 ) y += 100; + } + else if ( i == 8 ) { + // 4-digit year + y = ( date[0]-'0' )*1000 + ( date[1]-'0' )*100 + ( date[2]-'0' )*10 + date[3]-'0'; + y -= 1900; + } + else + return ( time_t ) 0; + timestamp.tm_year = y; + // Parse month + timestamp.tm_mon = ( date[i-4]-'0' )*10 + date[i-3]-'0' - 1; + // Parse date + timestamp.tm_mday = ( date[i-2]-'0' )*10 + date[i-1]-'0'; + + // Skip any date/time delimiter + for ( ; *p!='\0' && !isdigit( *p ); p++ ); + + // Parse time + if ( _stscanf( p, _T("%d:%d:%d"), ×tamp.tm_hour, ×tamp.tm_min, ×tamp.tm_sec ) != 3 ) + return ( time_t ) 0; + + timestamp.tm_isdst = 0; // DST is already present in _timezone below + t = mktime( ×tamp ); + + _tzset(); + t -= _timezone; + + if ( t >= 0 ) + return t; + else + return ( time_t ) 0; +} + +TCHAR* StrReplace (TCHAR* Search, TCHAR* Replace, TCHAR* Resource) +{ + int i = 0; + int SearchLen = (int)_tcslen(Search); + TCHAR* Work = mir_tstrdup(Replace); + int ReplaceLen = (int)_tcslen(Work); + + TCHAR* Pointer = _tcsstr(Resource, Search); + + while (Pointer != NULL) + { + int PointerLen = (int)_tcslen(Pointer); + int ResourceLen = (int)_tcslen(Resource); + + TCHAR* NewText = (TCHAR*)mir_calloc((ResourceLen - SearchLen + ReplaceLen + 1)*sizeof(TCHAR)); + + _tcsncpy(NewText, Resource, ResourceLen - PointerLen); + _tcscat(NewText, Work); + _tcscat(NewText, Pointer + SearchLen); + + Resource = (TCHAR*)mir_alloc((ResourceLen - SearchLen + ReplaceLen + 1)*sizeof(TCHAR)); + + for (i = 0; i < (ResourceLen - SearchLen + ReplaceLen); i++) + Resource[i] = NewText[i]; + Resource[i] = 0; + mir_free(NewText); + + Pointer = _tcsstr(Resource + (ResourceLen - PointerLen + ReplaceLen), Search); + } + mir_free(Work); + + return Resource; +} + +BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) +{ + HANDLE hFile = NULL; + DWORD dwBytes; + + NETLIBHTTPREQUEST nlhr = {0}; + nlhr.cbSize = sizeof(nlhr); + nlhr.requestType = REQUEST_GET; + nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11; + char* szUrl = mir_t2a(tszURL); + nlhr.szUrl = szUrl; + nlhr.headersCount = 4; + nlhr.headers=(NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount); + nlhr.headers[0].szName = "User-Agent"; + nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"; + nlhr.headers[1].szName = "Connection"; + nlhr.headers[1].szValue = "close"; + nlhr.headers[2].szName = "Cache-Control"; + nlhr.headers[2].szValue = "no-cache"; + nlhr.headers[3].szName = "Pragma"; + nlhr.headers[3].szValue = "no-cache"; + + bool ret = false; + NETLIBHTTPREQUEST *pReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser,(LPARAM)&nlhr); + + if(pReply) + { + if ((200 == pReply->resultCode) && (pReply->dataLength > 0)) + { + char *date = NULL, *size = NULL; + for (int i = 0; i < pReply->headersCount; i++) + { + if (lstrcmpiA(pReply->headers[i].szName, "Last-Modified") == 0) + { + date = pReply->headers[i].szValue; + continue; + } + if (lstrcmpiA(pReply->headers[i].szName, "Content-Length") == 0) + { + size = pReply->headers[i].szValue; + continue; + } + } + if (date != NULL && size != NULL) + { + TCHAR *tdate = mir_a2t(date); + TCHAR *tsize = mir_a2t(size); + int fh; + struct _stat buf; + + fh = _topen(tszLocal, _O_RDONLY); + if (fh != -1) + { + _fstat(fh, &buf); + time_t modtime = DateToUnixTime(tdate, 0); + time_t filemodtime = mktime(localtime(&buf.st_atime)); + if (modtime > filemodtime && buf.st_size != _ttoi(tsize)) + { + hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, NULL); + ret = true; + } + _close(fh); + } + else + { + hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, NULL); + ret = true; + } + mir_free(tdate); + mir_free(tsize); + } + else + { + hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, NULL); + ret = true; + } + } + CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)pReply); + } + + mir_free(szUrl); + mir_free(nlhr.headers); + + if (hFile) + CloseHandle(hFile); + + return ret; +} + +size_t PathToRelative(const TCHAR *pSrc, TCHAR *pOut) +{ return CallService( MS_UTILS_PATHTORELATIVET, (WPARAM)pSrc, (LPARAM)pOut ); +} + +TCHAR* CheckFeed(TCHAR* tszURL, HWND hwndDlg) +{ + char *szData = NULL; + DBVARIANT dbVar = {0}; + if (CallProtoService(MODULE, PS_GETSTATUS, 0, 0) != ID_STATUS_OFFLINE) + { + GetNewsData(tszURL, &szData, NULL, hwndDlg); + if (szData) + { + TCHAR *tszData = mir_a2t(szData); + int bytesParsed = 0; + HXML hXml = xi.parseString(tszData, &bytesParsed, NULL); + BOOL UtfEncode = FALSE; + TCHAR *newtszData = mir_utf8decodeT(szData); + if (newtszData) + { + UtfEncode = TRUE; + mir_free(newtszData); + } + mir_free(tszData); + mir_free(szData); + if(hXml != NULL) + { + int childcount = 0; + HXML node = xi.getChild(hXml, childcount); + while(node) + { + if (lstrcmpi(xi.getName(node), _T("rss")) == 0 || lstrcmpi(xi.getName(node), _T("rdf")) == 0) + { + HXML chan = xi.getChild(node, 0); + for (int j = 0; j < xi.getChildCount(chan); j++) + { + HXML child = xi.getChild(chan, j); + if (lstrcmpi(xi.getName(child), _T("title")) == 0) + { + TCHAR mes[MAX_PATH]; + mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL); + MessageBox(NULL, mes, TranslateT("New Aggregator"), MB_OK|MB_ICONINFORMATION); + TCHAR *tszTitle = (TCHAR*)xi.getText(child); + if (UtfEncode) + { + char* szstring = mir_t2a(tszTitle); + TCHAR* tszstring = mir_utf8decodeT(szstring); + tszTitle = (TCHAR*)mir_alloc(sizeof(TCHAR)*lstrlen(tszstring)+1); + _tcscpy(tszTitle, tszstring); + mir_free(tszstring); + mir_free(szstring); + } + return tszTitle; + } + } + } + else if (lstrcmpi(xi.getName(node), _T("feed")) == 0) + { + for (int j = 0; j < xi.getChildCount(node); j++) + { + HXML child = xi.getChild(node, j); + if (lstrcmpi(xi.getName(child), _T("title")) == 0) + { + TCHAR mes[MAX_PATH]; + mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL); + MessageBox(NULL, mes, TranslateT("New Aggregator"), MB_OK|MB_ICONINFORMATION); + TCHAR *tszTitle = (TCHAR*)xi.getText(child); + if (UtfEncode) + { + char* szstring = mir_t2a(tszTitle); + TCHAR* tszstring = mir_utf8decodeT(szstring); + tszTitle = (TCHAR*)mir_alloc(sizeof(TCHAR)*lstrlen(tszstring)+1); + _tcscpy(tszTitle, tszstring); + mir_free(tszstring); + mir_free(szstring); + } + return tszTitle; + } + } + } + childcount +=1; + node = xi.getChild(hXml, childcount); + } + } + xi.destroyNode(hXml); + } + else + { + TCHAR mes[MAX_PATH]; + mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a not valid feed's address."), tszURL); + MessageBox(NULL, mes, TranslateT("New Aggregator"), MB_OK|MB_ICONERROR); + } + } + return NULL; +} + +VOID CheckCurrentFeed(HANDLE hContact) +{ + char *szData = NULL; + DBVARIANT dbURL = {0}; + if (DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) + return; + else if ((DBGetContactSettingWord(hContact, MODULE, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) && DBGetContactSettingByte(hContact, MODULE, "CheckState", 1) != 0) + { + GetNewsData(dbURL.ptszVal, &szData, hContact, NULL); + DBFreeVariant(&dbURL); + if (szData) + { + TCHAR *tszData = mir_a2t(szData); + int bytesParsed = 0; + HXML hXml = xi.parseString(tszData, &bytesParsed, NULL); + BOOL UtfEncode = FALSE; + TCHAR *newtszData = mir_utf8decodeT(szData); + if (newtszData) + { + UtfEncode = TRUE; + mir_free(newtszData); + } + mir_free(tszData); + mir_free(szData); + if(hXml != NULL) + { + int childcount = 0; + HXML node = xi.getChild(hXml, childcount); + while(node) + { + if (lstrcmpi(xi.getName(node), _T("rss")) == 0 || lstrcmpi(xi.getName(node), _T("rdf")) == 0) + { + if (lstrcmpi(xi.getName(node), _T("rss")) == 0) + { + for (int i = 0; i < xi.getAttrCount(node); i++) + { + if (lstrcmpi(xi.getAttrName(node, i), _T("version")) == 0) + { + TCHAR ver[MAX_PATH]; + mir_sntprintf(ver, SIZEOF(ver), _T("RSS %s"), xi.getAttrValue(node, xi.getAttrName(node, i))); + DBWriteContactSettingTString(hContact, MODULE, "MirVer", ver); + break; + } + } + } + else if (lstrcmpi(xi.getName(node), _T("rdf")) == 0) + { + DBWriteContactSettingTString(hContact, MODULE, "MirVer", _T("RSS 1.0")); + } + + HXML chan = xi.getChild(node, 0); + for (int j = 0; j < xi.getChildCount(chan); j++) + { + HXML child = xi.getChild(chan, j); + if (lstrcmpi(xi.getName(child), _T("title")) == 0 && xi.getText(child)) + { + char* szstring = mir_t2a(xi.getText(child)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + if (UtfEncode) + { + TCHAR* tszstring = mir_utf8decodeT(szstring); + DBWriteContactSettingTString(hContact, MODULE, "FirstName", tszstring); + mir_free(tszstring); + } + else + { + TCHAR* tszstring = mir_a2t(szstring); + DBWriteContactSettingTString(hContact, MODULE, "FirstName", tszstring); + mir_free(tszstring); + } + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(child), _T("link")) == 0) + { + DBWriteContactSettingTString(hContact, MODULE, "Homepage", xi.getText(child)); + continue; + } + if (lstrcmpi(xi.getName(child), _T("description")) == 0 && xi.getText(child)) + { + char* szstring = mir_t2a(xi.getText(child)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + if (UtfEncode) + { + TCHAR* tszstring = mir_utf8decodeT(szstring); + DBWriteContactSettingTString(hContact, MODULE, "About", tszstring); + DBWriteContactSettingTString(hContact, "CList", "StatusMsg", tszstring); + mir_free(tszstring); + } + else + { + TCHAR* tszstring = mir_a2t(szstring); + DBWriteContactSettingTString(hContact, MODULE, "About", tszstring); + DBWriteContactSettingTString(hContact, "CList", "StatusMsg", tszstring); + mir_free(tszstring); + } + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(child), _T("language")) == 0 && xi.getText(child)) + { + char* szstring = mir_t2a(xi.getText(child)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + if (UtfEncode) + { + TCHAR* tszstring = mir_utf8decodeT(szstring); + DBWriteContactSettingTString(hContact, MODULE, "Language1", tszstring); + mir_free(tszstring); + } + else + { + TCHAR* tszstring = mir_a2t(szstring); + DBWriteContactSettingTString(hContact, MODULE, "Language1", tszstring); + mir_free(tszstring); + } + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(child), _T("managingEditor")) == 0 && xi.getText(child)) + { + char* szstring = mir_t2a(xi.getText(child)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + if (UtfEncode) + { + TCHAR* tszstring = mir_utf8decodeT(szstring); + DBWriteContactSettingTString(hContact, MODULE, "e-mail", tszstring); + mir_free(tszstring); + } + else + { + TCHAR* tszstring = mir_a2t(szstring); + DBWriteContactSettingTString(hContact, MODULE, "e-mail", tszstring); + mir_free(tszstring); + } + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(child), _T("category")) == 0 && xi.getText(child)) + { + char* szstring = mir_t2a(xi.getText(child)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + if (UtfEncode) + { + TCHAR* tszstring = mir_utf8decodeT(szstring); + DBWriteContactSettingTString(hContact, MODULE, "Interest0Text", tszstring); + mir_free(tszstring); + } + else + { + TCHAR* tszstring = mir_a2t(szstring); + DBWriteContactSettingTString(hContact, MODULE, "Interest0Text", tszstring); + mir_free(tszstring); + } + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(child), _T("image")) == 0) + { + for (int x = 0; x < xi.getChildCount(child); x++) + { + HXML imageval = xi.getChild(child, x); + if (lstrcmpi(xi.getName(imageval), _T("url")) == 0) + { + LPCTSTR url = xi.getText(imageval); + DBWriteContactSettingTString(hContact, MODULE, "ImageURL", url); + + PROTO_AVATAR_INFORMATIONT pai = {NULL}; + pai.cbSize = sizeof(pai); + pai.hContact = hContact; + DBVARIANT dbVar = {0}; + + if (!DBGetContactSettingTString(hContact, MODULE, "Nick", &dbVar)) + { + TCHAR *ext = _tcsrchr((TCHAR*)url, _T('.')) + 1; + pai.format = GetImageFormat(ext); + + TCHAR *filename = dbVar.ptszVal; + mir_sntprintf(pai.filename, SIZEOF(pai.filename), _T("%s\\%s.%s"), tszRoot, filename, ext); + if (DownloadFile(url, pai.filename)) + { + DBWriteContactSettingTString(hContact, MODULE, "ImagePath", pai.filename); + ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE) &pai, NULL); + } + else + ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE) &pai, NULL); + DBFreeVariant(&dbVar); + break; + } + } + else + { + DBDeleteContactSetting(hContact, MODULE, "ImageURL"); + DBDeleteContactSetting(hContact, MODULE, "ImagePath"); + } + } + } + if (lstrcmpi(xi.getName(child), _T("lastBuildDate")) == 0 && xi.getText(child)) + { + TCHAR *lastupdtime = (TCHAR*)xi.getText(child); + time_t stamp = DateToUnixTime(lastupdtime, 0); + double deltaupd = difftime(time(NULL), stamp); + double deltacheck = difftime(time(NULL), DBGetContactSettingDword(hContact, MODULE, "LastCheck", 0)); + if (deltaupd - deltacheck >= 0) + { + DBWriteContactSettingDword(hContact, MODULE, "LastCheck", time(NULL)); + xi.destroyNode(hXml); + return; + } + continue; + } + if (lstrcmpi(xi.getName(child), _T("item")) == 0) + { + TCHAR *title = NULL, *link = NULL, *datetime = NULL, *descr = NULL, *author = NULL, *comments = NULL, *guid = NULL, *category = NULL; + for (int z = 0; z < xi.getChildCount(child); z++) + { + HXML itemval = xi.getChild(child, z); + if (lstrcmpi(xi.getName(itemval), _T("title")) == 0) + { + title = (TCHAR*)xi.getText(itemval); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("link")) == 0) + { + link = (TCHAR*)xi.getText(itemval); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("pubDate")) == 0) + { + datetime = (TCHAR*)xi.getText(itemval); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("dc:date")) == 0) + { + datetime = (TCHAR*)xi.getText(itemval); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("description")) == 0) + { + descr = (TCHAR*)xi.getText(itemval); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("author")) == 0) + { + author = (TCHAR*)xi.getText(itemval); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("comments")) == 0) + { + comments = (TCHAR*)xi.getText(itemval); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("guid")) == 0) + { + guid = (TCHAR*)xi.getText(itemval); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("category")) == 0) + { + category = (TCHAR*)xi.getText(itemval); + continue; + } + } + TCHAR* message; + DBVARIANT dbMsg = {0}; + if (DBGetContactSettingTString(hContact, MODULE, "MsgFormat", &dbMsg)) + message = _T(TAGSDEFAULT); + else + { + message = (TCHAR*)mir_alloc(_tcslen(dbMsg.ptszVal)*sizeof(TCHAR)); + memcpy(message, dbMsg.ptszVal, _tcslen(dbMsg.ptszVal)*sizeof(TCHAR)); + message[_tcslen(dbMsg.ptszVal)] = 0; + DBFreeVariant(&dbMsg); + } + if (lstrcmp(title, NULL) == 0) + message = StrReplace(_T("#<title>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<title>#"), title, message); + if (lstrcmp(link, NULL) == 0) + message = StrReplace(_T("#<link>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<link>#"), link, message); + if (lstrcmp(descr, NULL) == 0) + message = StrReplace(_T("#<description>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<description>#"), descr, message); + if (lstrcmp(author, NULL) == 0) + message = StrReplace(_T("#<author>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<author>#"), author, message); + if (lstrcmp(comments, NULL) == 0) + message = StrReplace(_T("#<comments>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<comments>#"), comments, message); + if (lstrcmp(guid, NULL) == 0) + message = StrReplace(_T("#<guid>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<guid>#"), guid, message); + if (lstrcmp(category, NULL) == 0) + message = StrReplace(_T("#<category>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<category>#"), category, message); + + message = StrReplace(_T("<br>"), _T("\n"), message); + message = StrReplace(_T("<br/>"), _T("\n"), message); + message = StrReplace(_T("<br />"), _T("\n"), message); + + char* pszUtf; + if (!UtfEncode) + pszUtf = mir_utf8encodeT(message); + else + pszUtf = mir_t2a(message); + decode_html_entities_utf8(pszUtf, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(pszUtf); + strcpy(pszUtf, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + xRegEx = "^\\s+"; + xStr = pszUtf; + strcpy(pszUtf, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + + time_t stamp; + if (lstrcmpi(datetime, NULL) ==0) + stamp = time(NULL); + else + stamp = DateToUnixTime(datetime, 0); + + DBEVENTINFO olddbei = { 0 }; + HANDLE hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0); + BOOL MesExist = FALSE; + while(hDbEvent) + { + ZeroMemory(&olddbei, sizeof(olddbei)); + olddbei.cbSize = sizeof(olddbei); + olddbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0); + olddbei.pBlob = (PBYTE)mir_alloc(olddbei.cbBlob); + CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&olddbei); + if (olddbei.cbBlob == lstrlenA(pszUtf) + 1 && lstrcmpA((char*)olddbei.pBlob, pszUtf) == 0) + MesExist = TRUE; + hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0); + mir_free(olddbei.pBlob); + } + + if (!MesExist) + { + DBEVENTINFO dbei = {0}; + dbei.cbSize = sizeof(dbei); + dbei.eventType = EVENTTYPE_MESSAGE; + dbei.flags = DBEF_UTF; + dbei.szModule = MODULE; + dbei.timestamp = stamp; + dbei.cbBlob = lstrlenA(pszUtf) + 1; + dbei.pBlob = (PBYTE)pszUtf; + CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&dbei); + } + mir_free(pszUtf); + mir_free(message); + } + } + } + else if (lstrcmpi(xi.getName(node), _T("feed")) == 0) + { + DBWriteContactSettingTString(hContact, MODULE, "MirVer", _T("Atom 3")); + for (int j = 0; j < xi.getChildCount(node); j++) + { + HXML child = xi.getChild(node, j); + if (lstrcmpi(xi.getName(child), _T("title")) == 0 && xi.getText(child)) + { + char* szstring = mir_t2a(xi.getText(child)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + if (UtfEncode) + { + TCHAR* tszstring = mir_utf8decodeT(szstring); + DBWriteContactSettingTString(hContact, MODULE, "FirstName", tszstring); + mir_free(tszstring); + } + else + { + TCHAR* tszstring = mir_a2t(szstring); + DBWriteContactSettingTString(hContact, MODULE, "FirstName", tszstring); + mir_free(tszstring); + } + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(child), _T("link")) == 0) + { + for (int x = 0; x < xi.getAttrCount(child); x++) + { + if (lstrcmpi(xi.getAttrName(child, x), _T("rel")) == 0) + { + if (lstrcmpi(xi.getAttrValue(child, xi.getAttrName(child, x)), _T("self")) == 0) + break; + } + if (lstrcmpi(xi.getAttrName(child, x), _T("href")) == 0) + { + DBWriteContactSettingTString(hContact, MODULE, "Homepage", xi.getAttrValue(child, xi.getAttrName(child, x))); + } + } + continue; + } + if (lstrcmpi(xi.getName(child), _T("subtitle")) == 0 && xi.getText(child)) + { + char* szstring = mir_t2a(xi.getText(child)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + if (UtfEncode) + { + TCHAR* tszstring = mir_utf8decodeT(szstring); + DBWriteContactSettingTString(hContact, MODULE, "About", tszstring); + DBWriteContactSettingTString(hContact, "CList", "StatusMsg", tszstring); + mir_free(tszstring); + } + else + { + TCHAR* tszstring = mir_a2t(szstring); + DBWriteContactSettingTString(hContact, MODULE, "About", tszstring); + DBWriteContactSettingTString(hContact, "CList", "StatusMsg", tszstring); + mir_free(tszstring); + } + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(child), _T("language")) == 0 && xi.getText(child)) + { + char* szstring = mir_t2a(xi.getText(child)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + if (UtfEncode) + { + TCHAR* tszstring = mir_utf8decodeT(szstring); + DBWriteContactSettingTString(hContact, MODULE, "Language1", tszstring); + mir_free(tszstring); + } + else + { + TCHAR* tszstring = mir_a2t(szstring); + DBWriteContactSettingTString(hContact, MODULE, "Language1", tszstring); + mir_free(tszstring); + } + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(child), _T("author")) == 0) + { + for (int x = 0; x < xi.getChildCount(child); x++) + { + HXML authorval = xi.getChild(child, x); + if (lstrcmpi(xi.getName(authorval), _T("name")) == 0) + { + DBWriteContactSettingTString(hContact, MODULE, "e-mail", xi.getText(authorval)); + break; + } + } + continue; + } + if (lstrcmpi(xi.getName(child), _T("category")) == 0 && xi.getText(child)) + { + char* szstring = mir_t2a(xi.getText(child)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + if (UtfEncode) + { + TCHAR* tszstring = mir_utf8decodeT(szstring); + DBWriteContactSettingTString(hContact, MODULE, "Interest0Text", tszstring); + mir_free(tszstring); + } + else + { + TCHAR* tszstring = mir_a2t(szstring); + DBWriteContactSettingTString(hContact, MODULE, "Interest0Text", tszstring); + mir_free(tszstring); + } + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(child), _T("icon")) == 0) + { + for (int x = 0; x < xi.getChildCount(child); x++) + { + HXML imageval = xi.getChild(child, x); + if (lstrcmpi(xi.getName(imageval), _T("url")) == 0) + { + LPCTSTR url = xi.getText(imageval); + DBWriteContactSettingTString(hContact, MODULE, "ImageURL", url); + + PROTO_AVATAR_INFORMATIONT pai = {NULL}; + pai.cbSize = sizeof(pai); + pai.hContact = hContact; + DBVARIANT dbVar = {0}; + + if (!DBGetContactSettingTString(hContact, MODULE, "Nick", &dbVar)) + { + TCHAR *ext = _tcsrchr((TCHAR*)url, _T('.')) + 1; + pai.format = GetImageFormat(ext); + + TCHAR *filename = dbVar.ptszVal; + mir_sntprintf(pai.filename, SIZEOF(pai.filename), _T("%s\\%s.%s"), tszRoot, filename, ext); + if (DownloadFile(url, pai.filename)) + { + DBWriteContactSettingTString(hContact, MODULE, "ImagePath", pai.filename); + ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE) &pai, NULL); + } + else + ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE) &pai, NULL); + DBFreeVariant(&dbVar); + break; + } + } + else + { + DBDeleteContactSetting(hContact, MODULE, "ImageURL"); + DBDeleteContactSetting(hContact, MODULE, "ImagePath"); + } + } + } + if (lstrcmpi(xi.getName(child), _T("updated")) == 0 && xi.getText(child)) + { + TCHAR *lastupdtime = (TCHAR*)xi.getText(child); + time_t stamp = DateToUnixTime(lastupdtime, 1); + double deltaupd = difftime(time(NULL), stamp); + double deltacheck = difftime(time(NULL), DBGetContactSettingDword(hContact, MODULE, "LastCheck", 0)); + if (deltaupd - deltacheck >= 0) + { + DBWriteContactSettingDword(hContact, MODULE, "LastCheck", time(NULL)); + xi.destroyNode(hXml); + return; + } + continue; + } + if (lstrcmpi(xi.getName(child), _T("entry")) == 0) + { + TCHAR *title = NULL, *link = NULL, *datetime = NULL, *descr = NULL, *author = NULL, *comments = NULL, *guid = NULL, *category = NULL; + for (int z = 0; z < xi.getChildCount(child); z++) + { + HXML itemval = xi.getChild(child, z); + if (lstrcmpi(xi.getName(itemval), _T("title")) == 0 && xi.getText(itemval)) + { + char* szstring = mir_t2a(xi.getText(itemval)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + title = mir_a2t(szstring); + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("link")) == 0) + { + for (int x = 0; x < xi.getAttrCount(itemval); x++) + { + if (lstrcmpi(xi.getAttrName(itemval, x), _T("href")) == 0) + { + link = (TCHAR*)xi.getAttrValue(itemval, xi.getAttrName(itemval, x)); + break; + } + } + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("updated")) == 0) + { + datetime = (TCHAR*)xi.getText(itemval); + continue; + } + if ((lstrcmpi(xi.getName(itemval), _T("summary")) == 0 || lstrcmpi(xi.getName(itemval), _T("content")) == 0) && xi.getText(itemval)) + { + char* szstring = mir_t2a(xi.getText(itemval)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + descr = mir_a2t(szstring); + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("author")) == 0) + { + for (int x = 0; x < xi.getChildCount(itemval); x++) + { + HXML authorval = xi.getChild(itemval, x); + if (lstrcmpi(xi.getName(authorval), _T("name")) == 0 && xi.getText(authorval)) + { + char* szstring = mir_t2a(xi.getText(authorval)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + author = mir_a2t(szstring); + mir_free(szstring); + break; + } + } + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("comments")) == 0 && xi.getText(itemval)) + { + char* szstring = mir_t2a(xi.getText(itemval)); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + comments = mir_a2t(szstring); + mir_free(szstring); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("id")) == 0) + { + guid = (TCHAR*)xi.getText(itemval); + continue; + } + if (lstrcmpi(xi.getName(itemval), _T("category")) == 0) + { + for (int x = 0; x < xi.getAttrCount(itemval); x++) + { + if (lstrcmpi(xi.getAttrName(itemval, x), _T("term")) == 0 && xi.getText(itemval)) + { + char* szstring = mir_t2a(xi.getAttrValue(itemval, xi.getAttrName(itemval, x))); + decode_html_entities_utf8(szstring, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(szstring); + strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + category = mir_a2t(szstring); + mir_free(szstring); + break; + } + } + continue; + } + } + TCHAR* message; + DBVARIANT dbMsg = {0}; + if (DBGetContactSettingTString(hContact, MODULE, "MsgFormat", &dbMsg)) + message = _T(TAGSDEFAULT); + else + { + message = (TCHAR*)mir_alloc(_tcslen(dbMsg.ptszVal)*sizeof(TCHAR)); + memcpy(message, dbMsg.ptszVal, _tcslen(dbMsg.ptszVal)*sizeof(TCHAR)); + message[_tcslen(dbMsg.ptszVal)] = 0; + DBFreeVariant(&dbMsg); + } + if (lstrcmp(title, NULL) == 0) + message = StrReplace(_T("#<title>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<title>#"), title, message); + if (lstrcmp(link, NULL) == 0) + message = StrReplace(_T("#<link>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<link>#"), link, message); + if (lstrcmp(descr, NULL) == 0) + message = StrReplace(_T("#<description>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<description>#"), descr, message); + if (lstrcmp(author, NULL) == 0) + message = StrReplace(_T("#<author>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<author>#"), author, message); + if (lstrcmp(comments, NULL) == 0) + message = StrReplace(_T("#<comments>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<comments>#"), comments, message); + if (lstrcmp(guid, NULL) == 0) + message = StrReplace(_T("#<guid>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<guid>#"), guid, message); + if (lstrcmp(category, NULL) == 0) + message = StrReplace(_T("#<category>#"), TranslateT("empty"), message); + else + message = StrReplace(_T("#<category>#"), category, message); + + message = StrReplace(_T("<br>"), _T("\n"), message); + message = StrReplace(_T("<br/>"), _T("\n"), message); + message = StrReplace(_T("<br />"), _T("\n"), message); + + char* pszUtf; + if (!UtfEncode) + pszUtf = mir_utf8encodeT(message); + else + pszUtf = mir_t2a(message); + decode_html_entities_utf8(pszUtf, 0); + boost::regex xRegEx("<(.|\n)*?>"); + std::string xStr(pszUtf); + strcpy(pszUtf, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + xRegEx = "^\\s+"; + xStr = pszUtf; + strcpy(pszUtf, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); + + time_t stamp; + if (lstrcmpi(datetime, NULL) ==0) + stamp = time(NULL); + else + stamp = DateToUnixTime(datetime, 1); + + DBEVENTINFO olddbei = { 0 }; + HANDLE hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0); + BOOL MesExist = FALSE; + while(hDbEvent) + { + ZeroMemory(&olddbei, sizeof(olddbei)); + olddbei.cbSize = sizeof(olddbei); + olddbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0); + olddbei.pBlob = (PBYTE)malloc(olddbei.cbBlob); + CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&olddbei); + if (olddbei.cbBlob == lstrlenA(pszUtf) + 1 && lstrcmpA((char*)olddbei.pBlob, pszUtf) == 0) + MesExist = TRUE; + hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0); + } + + if (!MesExist) + { + DBEVENTINFO dbei = {0}; + dbei.cbSize = sizeof(dbei); + dbei.eventType = EVENTTYPE_MESSAGE; + dbei.flags = DBEF_UTF; + dbei.szModule = MODULE; + dbei.timestamp = stamp; + dbei.cbBlob = lstrlenA(pszUtf) + 1; + dbei.pBlob = (PBYTE)pszUtf; + CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&dbei); + } + mir_free(pszUtf); + } + } + } + childcount +=1; + node = xi.getChild(hXml, childcount); + } + xi.destroyNode(hXml); + } + } + DBWriteContactSettingDword(hContact, MODULE, "LastCheck", time(NULL)); + } +} \ No newline at end of file diff --git a/plugins/NewsAggregator/ToDo.txt b/plugins/NewsAggregator/ToDo.txt new file mode 100644 index 0000000000..fa08c1a5f3 --- /dev/null +++ b/plugins/NewsAggregator/ToDo.txt @@ -0,0 +1,11 @@ + xml +\ + + + html' + +xml parse +contacts export\import +autoimport from file service +authorization +replace all html to text \ No newline at end of file diff --git a/plugins/NewsAggregator/Version.h b/plugins/NewsAggregator/Version.h new file mode 100644 index 0000000000..fe5d837fe3 --- /dev/null +++ b/plugins/NewsAggregator/Version.h @@ -0,0 +1,28 @@ +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 0 +#define __RELEASE_NUM 0 +#define __BUILD_NUM 1 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM +#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM + +#define __STRINGIFY_IMPL(x) #x +#define __STRINGIFY(x) __STRINGIFY_IMPL(x) +#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS) + +#ifdef _UNICODE +#if defined(WIN64) || defined(_WIN64) + #define __PLUGIN_NAME "NewsAggregator (Unicode x64)" +#else + #define __PLUGIN_NAME "NewsAggregator (Unicode)" +#endif +#else + #define __PLUGIN_NAME "NewsAggregator" +#endif +#define __INTERNAL_NAME "NewsAggregator" +#define __FILENAME "NewsAggregator.dll" +#define __DESCRIPTION "RSS/Atom news aggregator." +#define __AUTHOR "Mataes, FREAK_THEMIGHTY" +#define __AUTHOREMAIL "mataes2007@gmail.com" +#define __AUTHORWEB "http://mataes.googlecode.com/svn/Miranda/Plugins/NewsAggregator/" +#define __COPYRIGHT " 2012 Mataes, FREAK_THEMIGHTY" diff --git a/plugins/NewsAggregator/Version.rc b/plugins/NewsAggregator/Version.rc new file mode 100644 index 0000000000..e637f0cb33 --- /dev/null +++ b/plugins/NewsAggregator/Version.rc @@ -0,0 +1,38 @@ +// Microsoft Visual C++ generated resource script. +// +#include "afxres.h" +#include "version.h" + +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#endif //_WIN32 + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", __DESCRIPTION + VALUE "InternalName", __PLUGIN_NAME + VALUE "LegalCopyright", __COPYRIGHT + VALUE "OriginalFilename", __FILENAME + VALUE "ProductName", __PLUGIN_NAME + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END diff --git a/plugins/NewsAggregator/resource.h b/plugins/NewsAggregator/resource.h new file mode 100644 index 0000000000..f243b95585 --- /dev/null +++ b/plugins/NewsAggregator/resource.h @@ -0,0 +1,39 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Resource.rc +// +#define IDD_OPTIONS 101 +#define IDI_ICON 109 +#define IDD_ADDFEED 110 +#define IDI_CHECKALL 111 +#define IDI_ADDFEED 112 +#define IDI_IMPORTFEEDS 113 +#define IDI_EXPORTFEEDS 114 +#define IDC_TIMEOUT_VALUE_SPIN 1035 +#define IDC_FEEDLIST 1036 +#define IDC_ADD 1037 +#define IDC_CHANGE 1038 +#define IDC_REMOVE 1039 +#define IDC_IMORT 1040 +#define IDC_EXORT 1041 +#define IDC_FEEDTITLE 1042 +#define IDC_FEEDURL 1043 +#define IDC_CHECKTIME 1044 +#define IDC_DISCOVERY 1045 +#define IDC_USEAUTH 1046 +#define IDC_LOGIN 1047 +#define IDC_PASSWORD 1048 +#define IDC_TAGSEDIT 1049 +#define IDC_RESET 1050 +#define IDC_TAGHELP 1051 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 111 +#define _APS_NEXT_COMMAND_VALUE 40075 +#define _APS_NEXT_CONTROL_VALUE 1052 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/plugins/NewsAggregstor/AtomText.txt b/plugins/NewsAggregstor/AtomText.txt deleted file mode 100644 index 052516a6bb..0000000000 --- a/plugins/NewsAggregstor/AtomText.txt +++ /dev/null @@ -1,482 +0,0 @@ -<?xml version="1.0"?> - -<feed xmlns="http://www.w3.org/2005/Atom"> - <updated>2012-01-04T06:45:38Z</updated> - <id>http://code.google.com/feeds/p/watcher-miranda/updates/basic</id> - - <title>watcher-miranda project updates - Google Code - - - - - - 2012-01-04T06:45:38Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12pftbjzm31hlgp204cepjgmoicsl1oq1w - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=miranda-0.10.latest-vc2010_x64-static.7z">miranda-0.10.latest-vc2010_x64-static.7z</a> (Miranda IM 0.10.0 Alpha #2 VC2010 x64) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2012-01-03T21:06:03Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12qdzfqdumlchjgm04cepjgmoicsl1oq1w - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=miranda-v0100a2w11.7z">miranda-v0100a2w11.7z</a> (T - ) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2012-01-03T20:47:25Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z135ypx45kehgtcq304cepjgmoicsl1oq1w - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=miranda-v0100a2w11.7z">miranda-v0100a2w11.7z</a> (Miranda IM 0.10.0 Alpha #2 VC6111) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2012-01-03T09:21:55Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12szb1zzybuejnnv22pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=mirotr1.7z">mirotr1.7z</a> (Miranda IM 0.10.0 Alpha #2 VC6) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2012-01-02T20:12:28Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12ltxpzuvr4xvahk04cepjgmoicsl1oq1w - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=miranda32.exe">miranda32.exe</a> (Miranda32 v.0.9.40.0) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2012-01-01T18:00:06Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13idtjadwu5y3q2322pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.1.0.exe">Miranda IM Watcher Pack v3.1.0.exe</a> (Miranda IM Watcher Pack v3.1.0) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - - <span class="ot-field-label">Type-Installer</span> - - - - <span class="ot-field-label">OpSys-Windows</span> - - - </span> - </div> - - - - - 2011-12-30T11:06:47Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12vzfygpwqng3m3b22pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda_Empoli_Pack_Mod.exe">Miranda_Empoli_Pack_Mod.exe</a> (Miranda IM Empoli Pack Mod v.2.2 (core 0.9.39)) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2011-12-29T14:08:24Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z135in4x1yi1fd2ou04cepjgmoicsl1oq1w - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=mirotr.7z">mirotr.7z</a> (MirOTR 0.11.0.3) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2011-12-25T10:59:24Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13dgrs5elfkfp0n122pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=LangpackSuite.exe">LangpackSuite.exe</a> (Test upload) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2011-12-25T10:58:18Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13cu14hyzzawjmev22pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=LangpackSuite.exe">LangpackSuite.exe</a> (Test) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2011-12-21T21:55:28Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12sh1jqflzkj3ofd22pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.9.exe">Miranda IM Watcher Pack v3.0.9.exe</a> (Miranda IM Watcher Pack v3.0.9) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - - <span class="ot-field-label">Type-Installer</span> - - - - <span class="ot-field-label">OpSys-Windows</span> - - - </span> - </div> - - - - - 2011-12-13T19:46:02Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13nxvbpft3ezr5ps04cepjgmoicsl1oq1w - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.8.exe">Miranda IM Watcher Pack v3.0.8.exe</a> (Miranda IM Watcher Pack v3.0.8) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - - <span class="ot-field-label">Type-Installer</span> - - - - <span class="ot-field-label">OpSys-Windows</span> - - - </span> - </div> - - - - - 2011-12-04T10:52:49Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13vubiqswqqe1cf222pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Fingerprint.dll">Fingerprint.dll</a> (Fingerprint.dll WP update) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - - - - - - 2011-12-04T10:52:32Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z125fjy5qruixxloh04cepjgmoicsl1oq1w - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=PackUpdater.dll">PackUpdater.dll</a> (PackUpdater.dll WP update) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - - - - - - 2011-12-03T15:01:42Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13etferquvuyzd0z22pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=packupdater.7z">packupdater.7z</a> (Pack Updater 0.0.1.0) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2011-12-02T22:21:54Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z12ysnhy4zi2wvudo22pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=fingerprintmodplus.7z">fingerprintmodplus.7z</a> (Fingerprint Mod Plus 0.2.2.4 (latest svn revision)) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2011-11-28T06:15:02Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13hy1xpcr2hgbrfv22pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.7.exe">Miranda IM Watcher Pack v3.0.7.exe</a> (Miranda IM Watcher Pack v3.0.7) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - - <span class="ot-field-label">Type-Installer</span> - - - - <span class="ot-field-label">OpSys-Windows</span> - - - </span> - </div> - - - - - 2011-11-24T16:35:48Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13mcvxqurmeybypn04cepjgmoicsl1oq1w - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.6.exe">Miranda IM Watcher Pack v3.0.6.exe</a> (Miranda IM Watcher Pack v3.0.6) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - - <span class="ot-field-label">Type-Installer</span> - - - - <span class="ot-field-label">OpSys-Windows</span> - - - </span> - </div> - - - - - 2011-11-23T04:58:16Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13rxxbauu3wxtfmz22pfv4p3ma4ch5kj - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=simplestatusmsg.7z">simplestatusmsg.7z</a> (Simple Status Message 1.9.0.4) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - </span> - </div> - - - - - 2011-11-19T06:13:19Z - http://code.google.com/feeds/p/watcher-miranda/updates/basic/z13di1rprvjfhpta004cepjgmoicsl1oq1w - - <a class="ot-download-link" href="http://code.google.com/p/watcher-miranda/downloads/detail?name=Miranda%20IM%20Watcher%20Pack%20v3.0.5.exe">Miranda IM Watcher Pack v3.0.5.exe</a> (Miranda IM Watcher Pack v3.0.5) file uploaded by <a class="ot-profile-link-2" href="http://code.google.com/u/watcherhd/">watcherhd</a> - - watcherhd - - - <div class="ot-labels-field-wrapper"> - <span class="ot-labels-field-name">Labels: </span> - <span class="ot-labels-field-value"> - - - <span class="ot-field-label">Featured</span> - - - - <span class="ot-field-label">Type-Installer</span> - - - - <span class="ot-field-label">OpSys-Windows</span> - - - </span> - </div> - - - - diff --git a/plugins/NewsAggregstor/NewsAggregator_10.sln b/plugins/NewsAggregstor/NewsAggregator_10.sln deleted file mode 100644 index aee50b713e..0000000000 --- a/plugins/NewsAggregstor/NewsAggregator_10.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NewsAggregator", "NewsAggregator_10.vcxproj", "{6DE11A47-2268-4B08-8DE5-15A1705FCE28}" -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 - {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 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/plugins/NewsAggregstor/NewsAggregator_10.vcxproj b/plugins/NewsAggregstor/NewsAggregator_10.vcxproj deleted file mode 100644 index 5b419a7806..0000000000 --- a/plugins/NewsAggregstor/NewsAggregator_10.vcxproj +++ /dev/null @@ -1,210 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - NewsAggregator - {6DE11A47-2268-4B08-8DE5-15A1705FCE28} - - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - true - true - true - - - - Disabled - ..\..\include;..\ExternalAPI;..\..\..\boost_1_49_0;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;NEWSAGGREGATOR_EXPORTS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level3 - EditAndContinue - 4996 - Use - Common.h - - - true - Windows - false - $(IntDir)$(TargetName).lib - comdlg32.lib;%(AdditionalDependencies) - ..\..\..\boost_1_49_0\lib - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Disabled - ..\..\include;..\ExternalAPI;..\..\..\boost_1_49_0;%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;NEWSAGGREGATOR_EXPORTS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level3 - 4996 - Use - Common.h - - - comdlg32.lib;%(AdditionalDependencies) - true - Windows - false - $(IntDir)$(TargetName).lib - ..\..\..\boost_1_49_0\lib64 - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\ExternalAPI;..\..\..\boost_1_49_0;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;NEWSAGGREGATOR_EXPORTS;%(PreprocessorDefinitions) - Level3 - 4996 - Use - Common.h - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - comdlg32.lib;%(AdditionalDependencies) - ..\..\..\boost_1_49_0\lib - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\ExternalAPI;..\..\..\boost_1_49_0;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;NEWSAGGREGATOR_EXPORTS;%(PreprocessorDefinitions) - Level3 - 4996 - Use - Common.h - - - comdlg32.lib;%(AdditionalDependencies) - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - ..\..\..\boost_1_49_0\lib64 - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/NewsAggregstor/NewsAggregator_10.vcxproj.filters b/plugins/NewsAggregstor/NewsAggregator_10.vcxproj.filters deleted file mode 100644 index 7b08037070..0000000000 --- a/plugins/NewsAggregstor/NewsAggregator_10.vcxproj.filters +++ /dev/null @@ -1,79 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Resource Files - - - Resource Files - - - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/NewsAggregstor/Res/AddFeed.ico b/plugins/NewsAggregstor/Res/AddFeed.ico deleted file mode 100644 index 2503d8ec60..0000000000 Binary files a/plugins/NewsAggregstor/Res/AddFeed.ico and /dev/null differ diff --git a/plugins/NewsAggregstor/Res/CheckALL.ico b/plugins/NewsAggregstor/Res/CheckALL.ico deleted file mode 100644 index 98d434b2ba..0000000000 Binary files a/plugins/NewsAggregstor/Res/CheckALL.ico and /dev/null differ diff --git a/plugins/NewsAggregstor/Res/Export.ico b/plugins/NewsAggregstor/Res/Export.ico deleted file mode 100644 index ef475bb5cd..0000000000 Binary files a/plugins/NewsAggregstor/Res/Export.ico and /dev/null differ diff --git a/plugins/NewsAggregstor/Res/Import.ico b/plugins/NewsAggregstor/Res/Import.ico deleted file mode 100644 index 4becddf394..0000000000 Binary files a/plugins/NewsAggregstor/Res/Import.ico and /dev/null differ diff --git a/plugins/NewsAggregstor/Res/Main.ico b/plugins/NewsAggregstor/Res/Main.ico deleted file mode 100644 index 4e9d1abc51..0000000000 Binary files a/plugins/NewsAggregstor/Res/Main.ico and /dev/null differ diff --git a/plugins/NewsAggregstor/Resource.rc b/plugins/NewsAggregstor/Resource.rc deleted file mode 100644 index a092bb26ea..0000000000 --- a/plugins/NewsAggregstor/Resource.rc +++ /dev/null @@ -1,148 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// () resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON ICON "res/Main.ico" -IDI_CHECKALL ICON "res/CheckAll.ico" -IDI_ADDFEED ICON "res/AddFeed.ico" -IDI_IMPORTFEEDS ICON "res/Import.ico" -IDI_EXPORTFEEDS ICON "res/Export.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_OPTIONS DIALOGEX 0, 0, 314, 234 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - CONTROL "",IDC_FEEDLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_TABSTOP,9,8,294,174 - PUSHBUTTON "Add",IDC_ADD,79,187,50,14 - PUSHBUTTON "Change",IDC_CHANGE,133,187,50,14 - PUSHBUTTON "Remove",IDC_REMOVE,187,187,50,14 - PUSHBUTTON "Import",IDC_IMORT,252,204,50,14 - PUSHBUTTON "Export",IDC_EXORT,252,219,50,14 -END - -IDD_ADDFEED DIALOGEX 0, 0, 250, 228 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_NOFAILCREATE | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - DEFPUSHBUTTON "OK",IDOK,140,209,50,14 - PUSHBUTTON "Cancel",IDCANCEL,194,209,50,14 - GROUPBOX "General Settings",IDC_STATIC,6,3,238,61 - RTEXT "Title",IDC_STATIC,17,16,44,8 - EDITTEXT IDC_FEEDTITLE,63,14,173,13,ES_AUTOHSCROLL - RTEXT "URL",IDC_STATIC,17,31,44,8 - EDITTEXT IDC_FEEDURL,63,29,173,13,ES_AUTOHSCROLL - RTEXT "Check every",IDC_STATIC,7,46,54,8 - LTEXT "minutes",IDC_STATIC,100,46,75,8 - PUSHBUTTON "Check Feed",IDC_DISCOVERY,177,44,59,12 - GROUPBOX "Authentication",IDC_STATIC,6,67,238,48 - CONTROL "Use &authentication",IDC_USEAUTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,80,157,10 - RTEXT "Login",IDC_STATIC,16,96,42,8 - EDITTEXT IDC_LOGIN,61,94,63,14,ES_AUTOHSCROLL | WS_DISABLED - RTEXT "Password",IDC_STATIC,129,96,41,8 - EDITTEXT IDC_PASSWORD,173,94,63,14,ES_PASSWORD | ES_AUTOHSCROLL | WS_DISABLED - GROUPBOX "Visualization",IDC_STATIC,6,119,238,85 - LTEXT "Display news using the following format:",IDC_STATIC,13,132,168,8 - EDITTEXT IDC_TAGSEDIT,13,143,224,36,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL - LTEXT "All item's tags are valid. Put them between #. Example: ##",IDC_STATIC,14,182,167,16 - PUSHBUTTON "Reset",IDC_RESET,192,184,45,14 - PUSHBUTTON "?",IDC_TAGHELP,175,184,15,14 - LTEXT "0 - check manually",IDC_STATIC,100,55,79,8 - EDITTEXT IDC_CHECKTIME,64,45,32,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_TIMEOUT_VALUE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,85,45,11,12 -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "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_OPTIONS, DIALOG - BEGIN - BOTTOMMARGIN, 189 - END - - IDD_ADDFEED, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 241 - TOPMARGIN, 7 - END -END -#endif // APSTUDIO_INVOKED - -#endif // () resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/plugins/NewsAggregstor/RssText.txt b/plugins/NewsAggregstor/RssText.txt deleted file mode 100644 index b229fc9e78..0000000000 --- a/plugins/NewsAggregstor/RssText.txt +++ /dev/null @@ -1,713 +0,0 @@ - - - - Bash.Org.Ru - http://bash.org.ru/ - - - ru - - b3cf2d64d57bdfea405b43426ec354e4b89a98912c71f243c93568020e2f0a70 - http://bash.org.ru/quote/414990 - #414990 - Fri, 30 Dec 2011 12:12:01 +0400 - ]]> - - - 9f3028db6c6020de238a5d27b14d85c21e5f4c8a5f96506b757925df8500c940 - http://bash.org.ru/quote/414989 - #414989 - Fri, 30 Dec 2011 11:45:18 +0400 - - - - c917324b76e57d2d6103af4b154f41fb335e9a4cc3f973b0b077a8c857c1353a - http://bash.org.ru/quote/414988 - #414988 - Fri, 30 Dec 2011 11:44:38 +0400 - :
: ?
: , , )]]>
-
- - 96b70712a7185b7d1167f6f9aee454841a4246b0f270185ea3f29d034b9bd39f - http://bash.org.ru/quote/414987 - #414987 - Fri, 30 Dec 2011 11:44:01 +0400 - :
***. !!! , . .]]>
-
- - 793886d798688d3e6bec7d2ffb51d6397f356e5c0e00ef06d07f22b87643c93a - http://bash.org.ru/quote/414986 - #414986 - Fri, 30 Dec 2011 11:13:16 +0400 - - - - 6eac3f54c4f58d8a41c7e7f72f72ca6e0c6bf5869f0eefc99044ef4427db28d0 - http://bash.org.ru/quote/414985 - #414985 - Fri, 30 Dec 2011 11:12:02 +0400 - - - - 744d1d505dce7f1877c45baee1fdf97009a403d6dedb3ae1cd185480ec3dbbd0 - http://bash.org.ru/quote/414984 - #414984 - Fri, 30 Dec 2011 11:11:01 +0400 - ()?
.

yyy:
... .]]>
-
- - aadc7f6194e8062c44250a9a878f010c0fe7d9d95af9a8389fbf8a8f748d6c6f - http://bash.org.ru/quote/414983 - #414983 - Fri, 30 Dec 2011 10:45:08 +0400 - xxx:
yyy: wifi ?]]>
-
- - 01511c230d7cdf4ed42f09106b3075a5021797ae5a11d3063dc9332bb7baf858 - http://bash.org.ru/quote/414982 - #414982 - Fri, 30 Dec 2011 10:44:36 +0400 - Ergo: . . .]]> - - - cc05613e48d3f285e2a2a95a12f542586c5c0fe4499addf3c2a633cf4940e572 - http://bash.org.ru/quote/414981 - #414981 - Fri, 30 Dec 2011 10:44:01 +0400 - - - - 589fe99078c1447d672503cd8ffb9ba7524d9bd9e03cb5444e7c6fcd2be55269 - http://bash.org.ru/quote/414980 - #414980 - Fri, 30 Dec 2011 10:12:44 +0400 - - - - 58b960aeadb0e2700dd3ec5c18a0f9ca1f446d49f66edabf2ad3ea0f4a9f4933 - http://bash.org.ru/quote/414979 - #414979 - Fri, 30 Dec 2011 10:12:01 +0400 - ! >.<]]> - - - dda44cf9be0c8bf4691ce24629fd67dca371952e1dc45aa5dc1cce16ca095d29 - http://bash.org.ru/quote/414978 - #414978 - Fri, 30 Dec 2011 09:46:04 +0400 - - - - 33f18d83baf27fbd1e28e525c942b2c7e379b42a7d91f7436e2e199400ceda30 - http://bash.org.ru/quote/414977 - #414977 - Fri, 30 Dec 2011 09:45:01 +0400 - : . , - . , , " ". .]]> - - - 5599090163fe32efddbf295e457fd9cc4f3426b524eebaaaa4fa8277f34e9be2 - http://bash.org.ru/quote/414976 - #414976 - Fri, 30 Dec 2011 09:13:01 +0400 - yyy: ?]]> - - - 1bb26a5bc553b0570cbdf64be1a9ba3af74c3fd64dc60fe0bf9335ecb74600d0 - http://bash.org.ru/quote/414975 - #414975 - Fri, 30 Dec 2011 08:45:35 +0400 - yyy: :D]]> - - - cf4da48b55d3fdb9e9825e39a664bd4d41dc5c7a64227796ad1afb0900bdec19 - http://bash.org.ru/quote/414974 - #414974 - Fri, 30 Dec 2011 08:45:01 +0400 - ]]> - - - 1a7a8ba066100acdf40b79f4fbc967932320641e3565b230678920432e80e1e3 - http://bash.org.ru/quote/414973 - #414973 - Fri, 30 Dec 2011 08:12:44 +0400 - - - - 339e00558b293e087749ba42e0f06916531e712b1edfb25e470e2c0d10494aea - http://bash.org.ru/quote/414972 - #414972 - Fri, 30 Dec 2011 08:11:44 +0400 -
XXX: , , ?
, , , , ( , ) , , 2008...

YYY: ? )))]]>
-
- - cfa6ff32cedafbf49ef812730e850a6abc9ec61c7682f3518d95fa00db4e1a14 - http://bash.org.ru/quote/414971 - #414971 - Fri, 30 Dec 2011 08:11:01 +0400 - - - - 128696d56057a228c43deb8cad49205905868817d0b4e834e37e3fdaccecafb4 - http://bash.org.ru/quote/414970 - #414970 - Thu, 29 Dec 2011 12:12:42 +0400 - yyy: , .]]> - - - 2d15491a51b88af3e66c02b4d326f1e2802656b6361f8f07dd667fbbe9dce728 - http://bash.org.ru/quote/414969 - #414969 - Thu, 29 Dec 2011 12:11:34 +0400 - - - - ed64e480321c46a51035c44a445cfd98927e2e303d972ac8874e8e36c11a8371 - http://bash.org.ru/quote/414968 - #414968 - Thu, 29 Dec 2011 12:11:01 +0400 -
troydm: , 5 ! !
muzhig: , . . .
ozgg: , ;)
Vexilurz: . - 5 ]]>
-
- - aaa2f3a8dd486d209a697ecd4e3d728d99a2aa37dd482a3a859af5c473143b69 - http://bash.org.ru/quote/414967 - #414967 - Thu, 29 Dec 2011 11:46:07 +0400 - - - - dc470e391715c450eef79e82aaadfb0342ecc256504946f0a32d2f8c1160557e - http://bash.org.ru/quote/414966 - #414966 - Thu, 29 Dec 2011 11:45:06 +0400 -
, , , 1917 .

.]]>
-
- - a7147227d4c9f64edae338c2cec9f4456a1214ea3f9d899c2486038abe99a8f5 - http://bash.org.ru/quote/414965 - #414965 - Thu, 29 Dec 2011 11:44:01 +0400 - - - - d35adf64ed961a7e7ff88e11a9b57760b1cd3f0a835f008b6e9782a27ee1a31a - http://bash.org.ru/quote/414964 - #414964 - Thu, 29 Dec 2011 11:13:11 +0400 - - - - 8ce06ad45b760d6b51e2432476e5c13dc9158f589c9b662147b760b0a1b967ac - http://bash.org.ru/quote/414963 - #414963 - Thu, 29 Dec 2011 11:12:01 +0400 -
. , . : , , , !]]>
-
- - c64eb292881cc760ac0d2f7ac0b1010a8047b1271d39a0bc759076633640bbb4 - http://bash.org.ru/quote/414962 - #414962 - Thu, 29 Dec 2011 10:45:24 +0400 - Lightning: ???
Lilith: , -
Lightning: ,
Lilith: ,
Lilith: ,
Lightning: , - -?
Lilith: , ?
Lilith:
Lightning: ? ?
Lightning: ,
Lightning: , ,
Lightning: ]]>
-
- - 19ee3858da403abdebc2f2694ade27e224d83cb2d0325964d802f3313c1333de - http://bash.org.ru/quote/414961 - #414961 - Thu, 29 Dec 2011 10:44:36 +0400 - : ??
: . . . .]]>
-
- - e0270fd309b6e90cb9f26d9012a1db8ed681fd071f5848b395535442033ffe3a - http://bash.org.ru/quote/414960 - #414960 - Thu, 29 Dec 2011 10:44:01 +0400 - BreakDancer:
Luba: ?
BreakDancer: , ,
BreakDancer: , 29
BreakDancer: !
BreakDancer: , ]]>
-
- - 8187c704ade265c329ccc02384e4206607407657bc6c9b9425a9542f0cb5a6a1 - http://bash.org.ru/quote/414959 - #414959 - Thu, 29 Dec 2011 10:13:01 +0400 - - - - 1e5eadf8678f61893bcf84e0dfb41290f63266eab736941b7ca07653b70f17d4 - http://bash.org.ru/quote/414958 - #414958 - Thu, 29 Dec 2011 09:45:26 +0400 - : , ...
: ? ? ?
: !
: , ...
: , ...
: , ? ?]]>
-
- - b7c708279640f1efe4ec3401970cb89f075864203ed0fbeeb612e9592655a4c3 - http://bash.org.ru/quote/414957 - #414957 - Thu, 29 Dec 2011 09:44:52 +0400 - " ". . . , , . :
- ! - .
.]]>
-
- - e91f03e5e391060d916a7e7e827cb6eaeec132c17a1ac5d78af70d5368461ec5 - http://bash.org.ru/quote/414956 - #414956 - Thu, 29 Dec 2011 09:44:01 +0400 - - - - c805cfaf28bf072384933e50ea8e1c48f815063c3bfbfe05a0986d6b944bd14e - http://bash.org.ru/quote/414955 - #414955 - Thu, 29 Dec 2011 09:13:01 +0400 - YYY: ?
XXX: : " " vs " ". .]]>
-
- - 0636538a5462fc292f9b4fc6439cd6f7f8ab0fe79ba081c47e36d3d8338806fe - http://bash.org.ru/quote/414954 - #414954 - Thu, 29 Dec 2011 08:46:01 +0400 - xxx: . .
yyy: ,
: , , - ...
: ]]>
-
- - c8591055f839c5dbc882d36e7a4d2db9ce399460048e8e0e6d466dd43a88cae1 - http://bash.org.ru/quote/414953 - #414953 - Thu, 29 Dec 2011 08:13:04 +0400 - xxx: ! , ! )))
yyy: . - , - ... =(
xxx: ... !
xxx: , , ?]]>
-
- - 714be978a8678d201b16981150150166752145feaefa2f159980d76051602d87 - http://bash.org.ru/quote/414952 - #414952 - Thu, 29 Dec 2011 08:11:54 +0400 - , =)]]> - - - dd7d36ba1543a7ac360b28c72f669816d3551bb09f34156635f80efbc9a4f390 - http://bash.org.ru/quote/414951 - #414951 - Thu, 29 Dec 2011 08:11:01 +0400 - - , ? .
, :
- , ...]]>
-
- - 174e14053635b5325be15ae0a37b47953115b33e0d082053064572907d2829a0 - http://bash.org.ru/quote/414950 - #414950 - Wed, 28 Dec 2011 12:46:01 +0400 - [QuizMaster7] : : 9
[EwokDoUrden] !
[EwokDoUrden] ]]>
-
- - 691660b05378e2d242a7a60429e2cd94a44e8d2041b2facb2597cb21ec213fbf - http://bash.org.ru/quote/414949 - #414949 - Wed, 28 Dec 2011 12:13:18 +0400 - - - - 634c63c05a37bbb5933ccae9bd50bbc4e04d2a27dfd2895ab8f4be5cc77a5707 - http://bash.org.ru/quote/414948 - #414948 - Wed, 28 Dec 2011 12:12:02 +0400 - - - - 2309307a0dd79a2f77f63dbbbf3239d5de3cd41409ce23750c0e8ebecd20466f - http://bash.org.ru/quote/414946 - #414946 - Wed, 28 Dec 2011 11:44:57 +0400 -
Explay T-7, ()]]>
-
- - c58a33a67db26dab4b121d14ebad5cd80d78040eea517835a90bbdc81887b4dc - http://bash.org.ru/quote/414945 - #414945 - Wed, 28 Dec 2011 11:44:01 +0400 - : , ?
: , ? )
: , ....]]>
-
- - 3a8ab041c452b16f9f415d3f6d209f1d58f11ed2ab0ee5f928a5f6b8e22a78b9 - http://bash.org.ru/quote/414944 - #414944 - Wed, 28 Dec 2011 11:12:55 +0400 - - - - d72696e62bb007bb3004d7403e5915734f7ca02ef54757e08cb0a689a1b4df4d - http://bash.org.ru/quote/414943 - #414943 - Wed, 28 Dec 2011 11:12:01 +0400 - fintar: ?]]> - - - 9ffbfa3d0268a0dc955b9969e4c2b77cc50443a7d6bd9b60f9cf4102daeb7fb1 - http://bash.org.ru/quote/414942 - #414942 - Wed, 28 Dec 2011 10:45:41 +0400 - :
!
?
, ? , , , . !

, . , , , ]]>
-
- - 6017310e922bd529b5ad3be09f4f0c5e8b6b2fb76d0bd05b617a8eac0ae27193 - http://bash.org.ru/quote/414941 - #414941 - Wed, 28 Dec 2011 10:44:47 +0400 - - - - b101af3976aa2e9b7841576433b0c68af93c3ce85ac75383a6f7b20a0106a9c6 - http://bash.org.ru/quote/414940 - #414940 - Wed, 28 Dec 2011 10:44:01 +0400 - :
- .
- .
, .
- 174 , 80 . , , , .
:
- , .
, ...]]>
-
- - 1d3da2d78ecf5bac86c480e26d65184e8b69cab96bc8d6c038de7de9ca468ebd - http://bash.org.ru/quote/414939 - #414939 - Wed, 28 Dec 2011 10:13:07 +0400 - : " ".]]> - - - 0365ddac152e7a1f45d4fe35cc5d673ff9e9cbce8d9d125e40b5dca139cd293e - http://bash.org.ru/quote/414938 - #414938 - Wed, 28 Dec 2011 10:12:01 +0400 - - - - 8774184a10feb87ab76c3eac63fcf6873b572cd376d06b87ec2cafa48464b57b - http://bash.org.ru/quote/414937 - #414937 - Wed, 28 Dec 2011 09:45:31 +0400 - - - - 5f9e58d114c8a86764bd26780e94bb3f00f0a4db026821f84d06b4540db7b5ed - http://bash.org.ru/quote/414936 - #414936 - Wed, 28 Dec 2011 09:45:01 +0400 - yyy: - . . .
xxx: ?
yyy: . . .]]>
-
- - 8b1acd9ec8457ac318c78b1dc88005edf4fc9f0ace4d47c1080c1b670de19e2e - http://bash.org.ru/quote/414935 - #414935 - Wed, 28 Dec 2011 09:13:01 +0400 - Dimes: ]]> - - - 187c05af1edfcce0de5da82d30a58fb83ae474e6fa897ad684bd3ad7c50e9dd7 - http://bash.org.ru/quote/414934 - #414934 - Wed, 28 Dec 2011 08:46:02 +0400 - yyy: ?
xxx:
yyy: ? )
xxx:
xxx:
yyy:
yyy: , ]]>
-
- - 00822e572762f43d2fb56ef00c2f7be12f703a27a39949f99036f7734a26f566 - http://bash.org.ru/quote/414933 - #414933 - Wed, 28 Dec 2011 08:45:02 +0400 - misterIT: , . .
misterIT: !!! ?
xxx@qip: , , ? ? ?
misterIT:
misterIT: , !
xxx@qip: . .]]>
-
- - a6231be02247fcfffbaa07e020f43a4c7a1c7ed628ed86af16443ffe45ed7127 - http://bash.org.ru/quote/414932 - #414932 - Wed, 28 Dec 2011 08:12:38 +0400 - - - - 039ba4efda1619b3b4374b223e344b3423a8d9788a18bf73ac07bce7bac04bea - http://bash.org.ru/quote/414931 - #414931 - Wed, 28 Dec 2011 08:12:01 +0400 - :
- ,
- ,
- , , , z !
- - ?
- , !
- ... 5 2
- .
- 5, 2, ,
- - , ... ( !!!!) .

:
, , , - ]]>
-
- - 66fab6cb65e11c7de896d7c6840095b9a90bd70ed8d49f8fb7adc0adb9b6a43c - http://bash.org.ru/quote/414930 - #414930 - Tue, 27 Dec 2011 13:46:01 +0400 - - - - 39b40cb066f0a9b64c53dbc67c1a521a1b3948a5b021efd4b1982753059aaee1 - http://bash.org.ru/quote/414929 - #414929 - Tue, 27 Dec 2011 13:13:01 +0400 - xxx:
yyy:
xxx:
xxx: , ]]>
-
- - 4f3b79bfba6994d73b3eb21530d98188f4830c26c4f8108a6d8120a4c0b5e8fc - http://bash.org.ru/quote/414928 - #414928 - Tue, 27 Dec 2011 12:46:01 +0400 - xxx: , , ?
yyy: .
zzz: ! , ! :)]]>
-
- - d3162ccb1c30aa3f654c0c6b368fa9e583c020dc3d04bcc07b6c5f02eeadaaeb - http://bash.org.ru/quote/414927 - #414927 - Tue, 27 Dec 2011 12:13:01 +0400 - xxx: , , : ,
yyy: , , !
]]>
-
- - 69e05b82fc5a5028a65e0435a584a83ffaa44e9784c024fb30eda9b7d87f38ba - http://bash.org.ru/quote/414926 - #414926 - Tue, 27 Dec 2011 11:46:03 +0400 - iNote: :D]]> - - - caa3a31eca89b56e3669c9910f23564e1ee2bd2c67f0be5472e206496b688609 - http://bash.org.ru/quote/414925 - #414925 - Tue, 27 Dec 2011 11:45:01 +0400 - xxx: .
xxx: .
xxx: , .
xxx: , , , .
xxx: .]]>
-
- - d3db54801b673716d6b41137bbf9ca64c62a04a1211bf43ea44876c411f88728 - http://bash.org.ru/quote/414924 - #414924 - Tue, 27 Dec 2011 11:13:12 +0400 - - , ? "--", "--"
- . : "-".
- . , , "" "" )]]>
-
- - 6206e668575ef7364ca52bacdfc3d6b45da5ab80d4c69c0f1467269cec9ee6c4 - http://bash.org.ru/quote/414923 - #414923 - Tue, 27 Dec 2011 11:12:01 +0400 - xxx: .
xxx: ! )))]]>
-
- - 47c8ec43ac12036ac0528b4b4077f8d9f80a0fe8d4aa029f8a39b7b9d4327b6f - http://bash.org.ru/quote/414922 - #414922 - Tue, 27 Dec 2011 10:45:34 +0400 - - - - 7871bd6a1b62f062468316e82234015b27a0c448d21c39120579d4c66c1b3367 - http://bash.org.ru/quote/414921 - #414921 - Tue, 27 Dec 2011 10:45:01 +0400 - yyy: . .]]> - - - c5fcb5c4cf429099d6540943fd5f376998aee7e5ac90409e8afc3e6a61ef177f - http://bash.org.ru/quote/414920 - #414920 - Tue, 27 Dec 2011 10:13:01 +0400 - - - - 72838435dc732ed7410037dd17b0e38588ac91999f5f195421621a8355ded16e - http://bash.org.ru/quote/414919 - #414919 - Tue, 27 Dec 2011 09:45:45 +0400 -


,

]]>
-
- - 7b098f0d541bdc4ac0f90634a82e781d38e174ef380aa56ff6c94e69734fcde8 - http://bash.org.ru/quote/414918 - #414918 - Tue, 27 Dec 2011 09:44:43 +0400 - - - - 5af15998f29f5f063b9ce01b54dc8d3f0b73bb7d3f877edcc5eaa7ff8f71013b - http://bash.org.ru/quote/414917 - #414917 - Tue, 27 Dec 2011 09:44:01 +0400 - : ? ?
: , . , . ]]>
-
- - b5a66cb535552b46159d467911174f1e4aac941c8c1d891a62619a8cdb00a3ea - http://bash.org.ru/quote/414916 - #414916 - Tue, 27 Dec 2011 09:13:02 +0400 - xxx: , ?
yyy: . , ...]]>
-
- - 9e007ee3d9984de85c727f6885f913891b11676f10b053ba8a51bec6fba0e23c - http://bash.org.ru/quote/414915 - #414915 - Tue, 27 Dec 2011 08:46:11 +0400 - xxx: ?
yyy:
yyy: , ]]>
-
- - 3dc9ddc2fad185181993315c5c3a404405ab704423d3c24bd9213dcb23bad2eb - http://bash.org.ru/quote/414914 - #414914 - Tue, 27 Dec 2011 08:45:01 +0400 - : , ?
: , ]]>
-
- - 61e793991c5dea07ea5a5afa2bbc899e49c23d8a0d8a1f48918915129a13a35c - http://bash.org.ru/quote/414913 - #414913 - Tue, 27 Dec 2011 08:12:04 +0400 -
: !
yyy: , , - ...
: , ! -!]]>
-
- - ed2932ac0768ceb5ec1a155d4b039fb2cba050296935d7852baccb238ada1819 - http://bash.org.ru/quote/414912 - #414912 - Tue, 27 Dec 2011 08:11:31 +0400 - <xxx> , " ": , , ]]> - - - 1989a43d3a03de416d16788589caaa318ece611245b328df9b1567c13205cf70 - http://bash.org.ru/quote/414911 - #414911 - Tue, 27 Dec 2011 08:11:01 +0400 - yyy: - , ]]> - - - c207fd198261176146047e54ccfff9058582e311ab402e32dfe67837c3e61e64 - http://bash.org.ru/quote/414910 - #414910 - Mon, 26 Dec 2011 13:12:49 +0400 -
: ?
: .
: ? ?
: -. SPIDER-MAN. , , S.]]>
-
- - 245f34c6c6da77a68ba258f717177e3ecb27865bd7cd72c5966a9bae3d68cdab - http://bash.org.ru/quote/414909 - #414909 - Mon, 26 Dec 2011 13:11:56 +0400 - yyy: ?
xxx: , !]]>
-
- - b9674cdf642593a5c193c3262031513822c50bcb950170cc07aadfb7fddc2649 - http://bash.org.ru/quote/414908 - #414908 - Mon, 26 Dec 2011 13:11:02 +0400 - : ,
: ?
: ]]>
-
- - f5e384c1050a5d6df2cbe999fbae0e082deda5e89839ad0a913b490b3fada8c0 - http://bash.org.ru/quote/414907 - #414907 - Mon, 26 Dec 2011 12:46:14 +0400 - : , , )))
: , ,
: - , ]]>
-
- - 71aba0126bc495b6efcd494e8b95c11b4e27fadb96f8fa31475db7aa85c7f1a4 - http://bash.org.ru/quote/414906 - #414906 - Mon, 26 Dec 2011 12:45:14 +0400 -
xxx: , ...]]>
-
- - 3d3b28ac59593143fe32ecbb4c5df048f39482f38d336d6dc4ad119ffbeea78b - http://bash.org.ru/quote/414905 - #414905 - Mon, 26 Dec 2011 12:44:01 +0400 - yyy: )]]> - - - 2931790e946054e81789e63e91d5dc9237bf492d3f26c6d7bc530b59ef2672fe - http://bash.org.ru/quote/414904 - #414904 - Mon, 26 Dec 2011 12:13:01 +0400 - yyy: , - , . :)]]> - - - 5ee6027cf4758aa3989a3552db60d21acfc4bce66518265e9137abc3ce1fc3c7 - http://bash.org.ru/quote/414903 - #414903 - Mon, 26 Dec 2011 11:46:01 +0400 - , . " !". , " ".]]> - - - a47fdbea7602bfa4df71054ed3d391d00a1c0dd13f8adaa983bb5f93e5ac3d90 - http://bash.org.ru/quote/414902 - #414902 - Mon, 26 Dec 2011 11:13:01 +0400 - - - - bc8b51fdf44d63edc888ad063db2fa66d1ad92c48d999408fff00a8cbec8e4ae - http://bash.org.ru/quote/414901 - #414901 - Mon, 26 Dec 2011 10:46:12 +0400 - - - - e5174f709f5372c11eaf170b06efe25bf23fd3a65dbc9669e7b55b83ad598340 - http://bash.org.ru/quote/414900 - #414900 - Mon, 26 Dec 2011 10:45:01 +0400 - yyy:
yyy: ]]>
-
- - 0f5c7eaee411484a37e8071fb60030eb902f42a26969363233116d425faec446 - http://bash.org.ru/quote/414899 - #414899 - Mon, 26 Dec 2011 10:12:34 +0400 - - - - 1941999057f97da275dbaee167f5314de54a3de0f1ccc0f25c983cfe08845e71 - http://bash.org.ru/quote/414898 - #414898 - Mon, 26 Dec 2011 10:12:01 +0400 - - - - 1493df9ec128867419e1c9e0f8adf1e7c73eaecba9ba81e51395778f2c599faf - http://bash.org.ru/quote/414897 - #414897 - Mon, 26 Dec 2011 09:46:15 +0400 - : ? . , + .
: , : " - ".
: !
: , .]]>
-
- - 507045f7af9d1dbc586b1ea528ecc9edb09ea5a1f35dab1141afc0dee491c7f2 - http://bash.org.ru/quote/414896 - #414896 - Mon, 26 Dec 2011 09:45:01 +0400 - - - - e4f30a21e7ffa737cc164ea71ddf1fe24a2c87b269a1b47db1dbf591ebe3e843 - http://bash.org.ru/quote/414895 - #414895 - Mon, 26 Dec 2011 09:12:45 +0400 - xxx: 12- - .]]> - - - 0ac1bcd3e77c115764edf2fef78568d7e88f0dcfa2830ebff7a4a67ca246192b - http://bash.org.ru/quote/414894 - #414894 - Mon, 26 Dec 2011 09:11:52 +0400 - Telecantrelem: - ?
1143r: Telecantrelem, . , , . . ! , !]]>
-
- - 0b0d1ae0708037d49d4edd71c8e1d7a488907c379787b7827be44ba7adab6cef - http://bash.org.ru/quote/414893 - #414893 - Mon, 26 Dec 2011 09:11:01 +0400 -
12.12 4 "..." . , "", "". , , "" "", "" "", . . , .]]>
-
- - 4caeec3b83a23c4ef7e6822f1b9151c62dd719538f9719fd9dc49079edf12869 - http://bash.org.ru/quote/414892 - #414892 - Mon, 26 Dec 2011 08:46:01 +0400 - : )]]> - - - 533d63288a28594dd6858f5eb212c9fd62c95da02ef6c532902585a525f78b2e - http://bash.org.ru/quote/414891 - #414891 - Mon, 26 Dec 2011 08:13:01 +0400 - : - , -
: )
: )]]>
-
- - 92cf655d26cbe5d10b1af532ab4abb491a0d74ae9759cb81cd6dd4bb84a1d2bc - http://bash.org.ru/quote/414890 - #414890 - Sun, 25 Dec 2011 09:13:01 +0400 -
: , . 12 , , . : ! ?]]>
-
-
-
\ No newline at end of file diff --git a/plugins/NewsAggregstor/Src/Common.h b/plugins/NewsAggregstor/Src/Common.h deleted file mode 100644 index fedb81250c..0000000000 --- a/plugins/NewsAggregstor/Src/Common.h +++ /dev/null @@ -1,162 +0,0 @@ -/* -Copyright (C) 2012 Mataes - -This 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 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 file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#define MIRANDA_VER 0x0A00 - -// Windows Header Files: -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -// Miranda header files -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "..\version.h" -#include "..\resource.h" - -#define MODULE "NewsAggr" -#define TAGSHELP "## - The title of the item.\r\n#<description># - The item synopsis.\r\n#<link># - The URL of the item.\r\n#<author># - Email address of the author of the item.\r\n#<comments># - URL of a page for comments relating to the item.\r\n#<guid># - A string that uniquely identifies the item.\r\n#<category># - Specify one or more categories that the item belongs to." -#define TAGSDEFAULT "#<title>#\r\n#<link>#\r\n#<description>#" -#define DEFAULT_AVATARS_FOLDER "NewsAggregator" -extern HINSTANCE hInst; -extern HWND hAddFeedDlg; -extern HANDLE hChangeFeedDlgList; -extern UINT_PTR timerId; -// check if Feeds is currently updating -extern BOOL ThreadRunning; -extern BOOL UpdateListFlag; -extern TCHAR tszRoot[MAX_PATH]; -struct ItemInfo -{ - HWND hwndList; - HANDLE hContact; - int SelNumber; - TCHAR nick[MAX_PATH]; - TCHAR url[MAX_PATH]; -}; - -//============ STRUCT USED TO MAKE AN UPDATE LIST ============ - -struct NEWSCONTACTLIST { - HANDLE hContact; - struct NEWSCONTACTLIST *next; -}; - -typedef struct NEWSCONTACTLIST UPDATELIST; - -extern UPDATELIST *UpdateListHead; -extern UPDATELIST *UpdateListTail; - -void UpdateListAdd(HANDLE hContact); -void UpdateThreadProc(LPVOID hWnd); -void DestroyUpdateList(void); - -extern HANDLE hUpdateMutex; - -int NewsAggrInit(WPARAM wParam,LPARAM lParam); -INT OptInit(WPARAM wParam, LPARAM lParam); -int NewsAggrPreShutdown(WPARAM wParam,LPARAM lParam); -VOID NetlibInit(); -VOID NetlibUnInit(); -VOID InitMenu(); -VOID InitIcons(); -HICON LoadIconEx(const char* name, BOOL big); -HANDLE GetIconHandle(const char* name); -INT_PTR NewsAggrGetName(WPARAM wParam, LPARAM lParam); -INT_PTR NewsAggrGetCaps(WPARAM wp,LPARAM lp); -INT_PTR NewsAggrSetStatus(WPARAM wp,LPARAM /*lp*/); -INT_PTR NewsAggrGetStatus(WPARAM/* wp*/,LPARAM/* lp*/); -INT_PTR NewsAggrLoadIcon(WPARAM wParam,LPARAM lParam); -INT_PTR NewsAggrGetInfo(WPARAM wParam,LPARAM lParam); -INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam,LPARAM lParam); - -INT_PTR CheckAllFeeds(WPARAM wParam,LPARAM lParam); -INT_PTR AddFeed(WPARAM wParam,LPARAM lParam); -INT_PTR ChangeFeed(WPARAM wParam,LPARAM lParam); -INT_PTR ImportFeeds(WPARAM wParam,LPARAM lParam); -INT_PTR ExportFeeds(WPARAM wParam,LPARAM lParam); -INT_PTR CheckFeed(WPARAM wParam,LPARAM lParam); -INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); -VOID CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime); - -BOOL IsMyContact(HANDLE hContact); -VOID GetNewsData(TCHAR *szUrl, char** szData, HANDLE hContact, HWND hwndDlg); -VOID CreateList (HWND hwndList); -VOID UpdateList (HWND hwndList); -VOID DeleteAllItems(HWND hwndList); -time_t __stdcall DateToUnixTime(TCHAR *stamp, BOOL FeedType); -VOID CheckCurrentFeed (HANDLE hContact); -TCHAR* CheckFeed(TCHAR* tszURL, HWND hwndDlg); -size_t decode_html_entities_utf8(char *dest, const char *src); - -// =============== NewsAggr SERVICES ================ -// Check all Feeds info -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGR_CHECKALLFEEDS "NEWSAGGR/CheckAllFeeds" - -// Add new Feed channel -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGR_ADDFEED "NEWSAGGR/AddNewsFeed" - -// Add new Feed channel -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGR_CHANGEFEED "NEWSAGGR/ChangeNewsFeed" - -// Import Feed chanels from file -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGR_IMPORTFEEDS "NEWSAGGR/ImportFeeds" - -// Export Feed chanels to file -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGR_EXPORTFEEDS "NEWSAGGR/ExportFeeds" - -// Check Feed info -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGR_CHECKFEED "NEWSAGGR/CheckFeed" \ No newline at end of file diff --git a/plugins/NewsAggregstor/Src/Entities.cpp b/plugins/NewsAggregstor/Src/Entities.cpp deleted file mode 100644 index 46a00d2d8d..0000000000 --- a/plugins/NewsAggregstor/Src/Entities.cpp +++ /dev/null @@ -1,381 +0,0 @@ -#include "common.h" - -#define UNICODE_MAX 0x10FFFFul - -static const char *named_entities[][2] = -{ - { "AElig;", "Æ" }, - { "Aacute;", "Á" }, - { "Acirc;", "Â" }, - { "Agrave;", "À" }, - { "Alpha;", "Α" }, - { "Aring;", "Å" }, - { "Atilde;", "Ã" }, - { "Auml;", "Ä" }, - { "Beta;", "Β" }, - { "Ccedil;", "Ç" }, - { "Chi;", "Χ" }, - { "Dagger;", "‡" }, - { "Delta;", "Δ" }, - { "ETH;", "Ð" }, - { "Eacute;", "É" }, - { "Ecirc;", "Ê" }, - { "Egrave;", "È" }, - { "Epsilon;", "Ε" }, - { "Eta;", "Η" }, - { "Euml;", "Ë" }, - { "Gamma;", "Γ" }, - { "Iacute;", "Í" }, - { "Icirc;", "Î" }, - { "Igrave;", "Ì" }, - { "Iota;", "Ι" }, - { "Iuml;", "Ï" }, - { "Kappa;", "Κ" }, - { "Lambda;", "Λ" }, - { "Mu;", "Μ" }, - { "Ntilde;", "Ñ" }, - { "Nu;", "Ν" }, - { "OElig;", "Œ" }, - { "Oacute;", "Ó" }, - { "Ocirc;", "Ô" }, - { "Ograve;", "Ò" }, - { "Omega;", "Ω" }, - { "Omicron;", "Ο" }, - { "Oslash;", "Ø" }, - { "Otilde;", "Õ" }, - { "Ouml;", "Ö" }, - { "Phi;", "Φ" }, - { "Pi;", "Π" }, - { "Prime;", "″" }, - { "Psi;", "Ψ" }, - { "Rho;", "Ρ" }, - { "Scaron;", "Š" }, - { "Sigma;", "Σ" }, - { "THORN;", "Þ" }, - { "Tau;", "Τ" }, - { "Theta;", "Θ" }, - { "Uacute;", "Ú" }, - { "Ucirc;", "Û" }, - { "Ugrave;", "Ù" }, - { "Upsilon;", "Υ" }, - { "Uuml;", "Ü" }, - { "Xi;", "Ξ" }, - { "Yacute;", "Ý" }, - { "Yuml;", "Ÿ" }, - { "Zeta;", "Ζ" }, - { "aacute;", "á" }, - { "acirc;", "â" }, - { "acute;", "´" }, - { "aelig;", "æ" }, - { "agrave;", "à" }, - { "alefsym;", "ℵ" }, - { "alpha;", "α" }, - { "amp;", "&" }, - { "and;", "∧" }, - { "ang;", "∠" }, - { "apos;", "'" }, - { "aring;", "å" }, - { "asymp;", "≈" }, - { "atilde;", "ã" }, - { "auml;", "ä" }, - { "bdquo;", "„" }, - { "beta;", "β" }, - { "brvbar;", "¦" }, - { "bull;", "•" }, - { "cap;", "∩" }, - { "ccedil;", "ç" }, - { "cedil;", "¸" }, - { "cent;", "¢" }, - { "chi;", "χ" }, - { "circ;", "ˆ" }, - { "clubs;", "♣" }, - { "cong;", "≅" }, - { "copy;", "©" }, - { "crarr;", "↵" }, - { "cup;", "∪" }, - { "curren;", "¤" }, - { "dArr;", "⇓" }, - { "dagger;", "†" }, - { "darr;", "↓" }, - { "deg;", "°" }, - { "delta;", "δ" }, - { "diams;", "♦" }, - { "divide;", "÷" }, - { "eacute;", "é" }, - { "ecirc;", "ê" }, - { "egrave;", "è" }, - { "empty;", "∅" }, - { "emsp;", " " }, - { "ensp;", " " }, - { "epsilon;", "ε" }, - { "equiv;", "≡" }, - { "eta;", "η" }, - { "eth;", "ð" }, - { "euml;", "ë" }, - { "euro;", "€" }, - { "exist;", "∃" }, - { "fnof;", "ƒ" }, - { "forall;", "∀" }, - { "frac12;", "½" }, - { "frac14;", "¼" }, - { "frac34;", "¾" }, - { "frasl;", "⁄" }, - { "gamma;", "γ" }, - { "ge;", "≥" }, - { "gt;", ">" }, - { "hArr;", "⇔" }, - { "harr;", "↔" }, - { "hearts;", "♥" }, - { "hellip;", "…" }, - { "iacute;", "í" }, - { "icirc;", "î" }, - { "iexcl;", "¡" }, - { "igrave;", "ì" }, - { "image;", "ℑ" }, - { "infin;", "∞" }, - { "int;", "∫" }, - { "iota;", "ι" }, - { "iquest;", "¿" }, - { "isin;", "∈" }, - { "iuml;", "ï" }, - { "kappa;", "κ" }, - { "lArr;", "⇐" }, - { "lambda;", "λ" }, - { "lang;", "〈" }, - { "laquo;", "«" }, - { "larr;", "←" }, - { "lceil;", "⌈" }, - { "ldquo;", "“" }, - { "le;", "≤" }, - { "lfloor;", "⌊" }, - { "lowast;", "∗" }, - { "loz;", "◊" }, - { "lrm;", "\xE2\x80\x8E" }, - { "lsaquo;", "‹" }, - { "lsquo;", "‘" }, - { "lt;", "<" }, - { "macr;", "¯" }, - { "mdash;", "—" }, - { "micro;", "µ" }, - { "middot;", "·" }, - { "minus;", "−" }, - { "mu;", "μ" }, - { "nabla;", "∇" }, - { "nbsp;", " " }, - { "ndash;", "–" }, - { "ne;", "≠" }, - { "ni;", "∋" }, - { "not;", "¬" }, - { "notin;", "∉" }, - { "nsub;", "⊄" }, - { "ntilde;", "ñ" }, - { "nu;", "ν" }, - { "oacute;", "ó" }, - { "ocirc;", "ô" }, - { "oelig;", "œ" }, - { "ograve;", "ò" }, - { "oline;", "‾" }, - { "omega;", "ω" }, - { "omicron;", "ο" }, - { "oplus;", "⊕" }, - { "or;", "∨" }, - { "ordf;", "ª" }, - { "ordm;", "º" }, - { "oslash;", "ø" }, - { "otilde;", "õ" }, - { "otimes;", "⊗" }, - { "ouml;", "ö" }, - { "para;", "¶" }, - { "part;", "∂" }, - { "permil;", "‰" }, - { "perp;", "⊥" }, - { "phi;", "φ" }, - { "pi;", "π" }, - { "piv;", "ϖ" }, - { "plusmn;", "±" }, - { "pound;", "£" }, - { "prime;", "′" }, - { "prod;", "∏" }, - { "prop;", "∝" }, - { "psi;", "ψ" }, - { "quot;", "\"" }, - { "rArr;", "⇒" }, - { "radic;", "√" }, - { "rang;", "〉" }, - { "raquo;", "»" }, - { "rarr;", "→" }, - { "rceil;", "⌉" }, - { "rdquo;", "”" }, - { "real;", "ℜ" }, - { "reg;", "®" }, - { "rfloor;", "⌋" }, - { "rho;", "ρ" }, - { "rlm;", "\xE2\x80\x8F" }, - { "rsaquo;", "›" }, - { "rsquo;", "’" }, - { "sbquo;", "‚" }, - { "scaron;", "š" }, - { "sdot;", "⋅" }, - { "sect;", "§" }, - { "shy;", "\xC2\xAD" }, - { "sigma;", "σ" }, - { "sigmaf;", "ς" }, - { "sim;", "∼" }, - { "spades;", "♠" }, - { "sub;", "⊂" }, - { "sube;", "⊆" }, - { "sum;", "∑" }, - { "sup;", "⊃" }, - { "sup1;", "¹" }, - { "sup2;", "²" }, - { "sup3;", "³" }, - { "supe;", "⊇" }, - { "szlig;", "ß" }, - { "tau;", "τ" }, - { "there4;", "∴" }, - { "theta;", "θ" }, - { "thetasym;", "ϑ" }, - { "thinsp;", " " }, - { "thorn;", "þ" }, - { "tilde;", "˜" }, - { "times;", "×" }, - { "trade;", "™" }, - { "uArr;", "⇑" }, - { "uacute;", "ú" }, - { "uarr;", "↑" }, - { "ucirc;", "û" }, - { "ugrave;", "ù" }, - { "uml;", "¨" }, - { "upsih;", "ϒ" }, - { "upsilon;", "υ" }, - { "uuml;", "ü" }, - { "weierp;", "℘" }, - { "xi;", "ξ" }, - { "yacute;", "ý" }, - { "yen;", "¥" }, - { "yuml;", "ÿ" }, - { "zeta;", "ζ" }, - { "zwj;", "\xE2\x80\x8D" }, - { "zwnj;", "\xE2\x80\x8C" } -}; - -static int cmp(const void *key, const void *element) -{ - return strncmp((const char *)key, *(const char **)element, - strlen(*(const char **)element)); -} - -static const char *get_named_entity(const char *name) -{ - const char **entity = (const char **)bsearch(name, named_entities, sizeof(named_entities) / sizeof(*named_entities), - sizeof(*named_entities), cmp); - - return entity ? entity[1] : NULL; -} - -static size_t putc_utf8(unsigned long cp, char *buffer) -{ - unsigned char *bytes = (unsigned char *)buffer; - - if(cp <= 0x007Ful) - { - bytes[0] = (unsigned char)cp; - return 1; - } - - if(cp <= 0x07FFul) - { - bytes[1] = (unsigned char)((2u << 6) | (cp & 0x3Fu)); - bytes[0] = (unsigned char)((6u << 5) | (cp >> 6)); - return 2; - } - - if(cp <= 0xFFFFul) - { - bytes[2] = (unsigned char)(( 2u << 6) | ( cp & 0x3Fu)); - bytes[1] = (unsigned char)(( 2u << 6) | ((cp >> 6) & 0x3Fu)); - bytes[0] = (unsigned char)((14u << 4) | (cp >> 12)); - return 3; - } - - if(cp <= 0x10FFFFul) - { - bytes[3] = (unsigned char)(( 2u << 6) | ( cp & 0x3Fu)); - bytes[2] = (unsigned char)(( 2u << 6) | ((cp >> 6) & 0x3Fu)); - bytes[1] = (unsigned char)(( 2u << 6) | ((cp >> 12) & 0x3Fu)); - bytes[0] = (unsigned char)((30u << 3) | (cp >> 18)); - return 4; - } - - return 0; -} - -static BOOL parse_entity(const char *current, char **to, const char **from) -{ - const char *end = strchr(current, ';'); - if (!end) return 0; - - if(current[1] == '#') - { - char *tail = NULL; - errno = 0; - - BOOL hex = current[2] == 'x' || current[2] == 'X'; - - unsigned long cp = strtoul( - current + (hex ? 3 : 2), &tail, hex ? 16 : 10); - - if(tail == end && !errno && cp <= UNICODE_MAX) - { - *to += putc_utf8(cp, *to); - *from = end + 1; - - return 1; - } - } - else - { - const char *entity = get_named_entity(¤t[1]); - if(entity) - { - size_t len = strlen(entity); - memcpy(*to, entity, len); - - *to += len; - *from = end + 1; - - return 1; - } - } - - return 0; -} - -size_t decode_html_entities_utf8(char *dest, const char *src) -{ - if (!src) src = dest; - - char *to = dest; - const char *from = src; - - const char *current; - while(current = strchr(from, '&')) - { - memcpy(to, from, (size_t)(current - from)); - to += current - from; - - if(parse_entity(current, &to, &from)) - continue; - - from = current; - *to++ = *from++; - } - - size_t remaining = strlen(from); - - memcpy(to, from, remaining); - to += remaining; - - *to = 0; - return (size_t)(to - dest); -} \ No newline at end of file diff --git a/plugins/NewsAggregstor/Src/Icons.cpp b/plugins/NewsAggregstor/Src/Icons.cpp deleted file mode 100644 index 096a38086b..0000000000 --- a/plugins/NewsAggregstor/Src/Icons.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright (C) 2012 Mataes - -This 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 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 file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#include "common.h" - -struct _tag_iconList -{ - TCHAR* szDescr; - char* szName; - int defIconID; - HANDLE hIconLibItem; -} - -static iconList[] = -{ - { LPGENT("Protocol icon"), "main", IDI_ICON }, - { LPGENT("Check All Feeds"), "checkall", IDI_CHECKALL }, - { LPGENT("Add Feed"), "addfeed", IDI_ADDFEED }, - { LPGENT("Import Feeds"), "importfeeds", IDI_IMPORTFEEDS }, - { LPGENT("Export Feeds"), "exportfeeds", IDI_EXPORTFEEDS }, - { LPGENT("Check Feed"), "checkfeed", IDI_CHECKALL }, -}; - -VOID InitIcons() -{ - TCHAR szFile[MAX_PATH]; - char szSettingName[100]; - SKINICONDESC sid = {0}; - unsigned i; - - GetModuleFileName(hInst, szFile, MAX_PATH); - - sid.cbSize = sizeof(SKINICONDESC); - sid.flags = SIDF_ALL_TCHAR; - sid.ptszDefaultFile = szFile; - sid.pszName = szSettingName; - sid.ptszSection = _T("News Aggregator"); - - for (i = 0; i < SIZEOF(iconList); i++) - { - mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODULE, iconList[i].szName); - - sid.ptszDescription = iconList[i].szDescr; - sid.iDefaultIndex = -iconList[i].defIconID; - iconList[i].hIconLibItem = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); - } -} - -HICON LoadIconEx(const char* name, BOOL big) -{ - char szSettingName[100]; - mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODULE, name); - return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName); -} - -HANDLE GetIconHandle(const char* name) -{ - unsigned i; - for (i=0; i < SIZEOF(iconList); i++) - if (strcmp(iconList[i].szName, name) == 0) - return iconList[i].hIconLibItem; - return NULL; -} \ No newline at end of file diff --git a/plugins/NewsAggregstor/Src/Menus.cpp b/plugins/NewsAggregstor/Src/Menus.cpp deleted file mode 100644 index 2ff20ce596..0000000000 --- a/plugins/NewsAggregstor/Src/Menus.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright (C) 2012 Mataes - -This 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 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 file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#include "common.h" - -HANDLE hService2[6]; - -VOID InitMenu() -{ - CLISTMENUITEM mi = {0}; - mi.cbSize = sizeof(mi); - mi.pszContactOwner = MODULE; - mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_NOTOFFLINE; - - // adding main menu items - mi.ptszPopupName = LPGENT("News Aggregator"); - mi.popupPosition = 500099000; - - mi.position=10100001; - mi.icolibItem = GetIconHandle("main"); - mi.ptszName = LPGENT("Check All Feeds"); - mi.pszService = MS_NEWSAGGR_CHECKALLFEEDS; - hService2[0] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi); - - mi.position=10100002; - mi.icolibItem = GetIconHandle("addfeed"); - mi.ptszName = LPGENT("Add Feed"); - mi.pszService = MS_NEWSAGGR_ADDFEED; - hService2[1] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi); - - mi.position=10100003; - mi.icolibItem = GetIconHandle("importfeeds"); - mi.ptszName = LPGENT("Import Feeds"); - mi.pszService = MS_NEWSAGGR_IMPORTFEEDS; - hService2[2] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi); - - mi.position=10100004; - mi.icolibItem = GetIconHandle("exportfeeds"); - mi.ptszName = LPGENT("Export Feeds"); - mi.pszService = MS_NEWSAGGR_EXPORTFEEDS; - hService2[3] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi); - - // adding contact menu items - mi.position=-0x7FFFFFFA; - mi.icolibItem = GetIconHandle("checkfeed"); - mi.ptszName = LPGENT("Check feed"); - mi.pszService = MS_NEWSAGGR_CHECKFEED; - hService2[4] = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi); - - // adding contact menu items - mi.position=-0x7FFFFFFA; - //mi.icolibItem = GetIconHandle("checkfeed"); - mi.ptszName = LPGENT("Change feed"); - mi.pszService = MS_NEWSAGGR_CHANGEFEED; - hService2[5] = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi); - - ZeroMemory(&mi, sizeof(mi)); - mi.cbSize = sizeof(mi); - mi.flags = CMIM_ICON; - mi.icolibItem = GetIconHandle("checkall"); - CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hService2[0], (LPARAM)&mi); -} \ No newline at end of file diff --git a/plugins/NewsAggregstor/Src/NewsAggregator.cpp b/plugins/NewsAggregstor/Src/NewsAggregator.cpp deleted file mode 100644 index 3d7c0e1251..0000000000 --- a/plugins/NewsAggregstor/Src/NewsAggregator.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* -Copyright (C) 2012 Mataes - -This 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 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 file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#include "Common.h" - -HINSTANCE hInst = NULL; -PLUGINLINK *pluginLink; -int hLangpack; -struct MM_INTERFACE mmi; -HANDLE hOptHook = NULL, hLoadHook = NULL, hOnPreShutdown = NULL, hPrebuildMenuHook = NULL, hPackUpdaterFolder = NULL; -HANDLE hProtoService[7]; -HWND hAddFeedDlg; -HANDLE hChangeFeedDlgList = NULL; -XML_API xi = {0}; -struct UTF8_INTERFACE utfi; -TCHAR tszRoot[MAX_PATH] = {0}; -HANDLE hUpdateMutex; -#define NUM_SERVICES 6 -HANDLE hService[NUM_SERVICES]; - -PLUGININFOEX pluginInfoEx = { - sizeof(PLUGININFOEX), - __PLUGIN_NAME, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - __DESCRIPTION, - __AUTHOR, - __AUTHOREMAIL, - __COPYRIGHT, - __AUTHORWEB, - UNICODE_AWARE, - 0, - // {56CC3F29-CCBF-4546-A8BA-9856248A412A} - {0x56cc3f29, 0xccbf, 0x4546, {0xa8, 0xba, 0x98, 0x56, 0x24, 0x8a, 0x41, 0x2a}} -}; - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - hInst = hinstDLL; - return TRUE; -} - -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) -{ - if(mirandaVersion < 0x0900) - { - MessageBox(NULL, TranslateT("News Aggregator plugin requires Miranda IM 0.9.0.0 or later"), TranslateT("Fatal error"), MB_OK); - return NULL; - } - return &pluginInfoEx; -} - -static const MUUID interfaces[] = {{0x29517be5, 0x779a, 0x48e5, {0x89, 0x50, 0xcb, 0x4d, 0xe1, 0xd4, 0x31, 0x72}}, MIID_LAST}; - -extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) -{ - return interfaces; -} - -extern "C" __declspec(dllexport) int Load(PLUGINLINK *link) -{ - pluginLink = link; - mir_getLP(&pluginInfoEx); - mir_getMMI(&mmi); - mir_getXI(&xi); - mir_getUTFI(&utfi); - - if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) - { - hPackUpdaterFolder = FoldersRegisterCustomPathT("News Aggregator", "Avatars", MIRANDA_USERDATAT _T("\\Avatars\\")_T(DEFAULT_AVATARS_FOLDER)); - FoldersGetCustomPathT(hPackUpdaterFolder, tszRoot, MAX_PATH, _T("")); - } - else - { - TCHAR* tszFolder = Utils_ReplaceVarsT(_T("%miranda_userdata%\\"_T(DEFAULT_AVATARS_FOLDER))); - lstrcpyn(tszRoot, tszFolder, SIZEOF(tszRoot)); - mir_free(tszFolder); - } - - // Add options hook - hOptHook = HookEvent(ME_OPT_INITIALISE, OptInit); - hLoadHook = HookEvent(ME_SYSTEM_MODULESLOADED, NewsAggrInit); - hOnPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, NewsAggrPreShutdown); - - hUpdateMutex = CreateMutex(NULL, FALSE, NULL); - hChangeFeedDlgList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST,0,0); - - // register weather protocol - PROTOCOLDESCRIPTOR pd = {0}; - pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE; - pd.szName = MODULE; - pd.type = PROTOTYPE_PROTOCOL; - CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd); - - hProtoService[0] = CreateProtoServiceFunction(MODULE, PS_GETNAME, NewsAggrGetName); - hProtoService[1] = CreateProtoServiceFunction(MODULE, PS_GETCAPS, NewsAggrGetCaps); - hProtoService[2] = CreateProtoServiceFunction(MODULE, PS_SETSTATUS, NewsAggrSetStatus); - hProtoService[3] = CreateProtoServiceFunction(MODULE, PS_GETSTATUS, NewsAggrGetStatus); - hProtoService[4] = CreateProtoServiceFunction(MODULE, PS_LOADICON, NewsAggrLoadIcon); - hProtoService[5] = CreateProtoServiceFunction(MODULE, PSS_GETINFO, NewsAggrGetInfo); - hProtoService[6] = CreateProtoServiceFunction(MODULE, PS_GETAVATARINFO, NewsAggrGetAvatarInfo); - - hService[0] = CreateServiceFunction(MS_NEWSAGGR_CHECKALLFEEDS, CheckAllFeeds); - hService[1] = CreateServiceFunction(MS_NEWSAGGR_ADDFEED, AddFeed); - hService[2] = CreateServiceFunction(MS_NEWSAGGR_IMPORTFEEDS, ImportFeeds); - hService[3] = CreateServiceFunction(MS_NEWSAGGR_EXPORTFEEDS, ExportFeeds); - hService[4] = CreateServiceFunction(MS_NEWSAGGR_CHECKFEED, CheckFeed); - hService[5] = CreateServiceFunction(MS_NEWSAGGR_CHANGEFEED, ChangeFeed); - - return 0; -} - -extern "C" __declspec(dllexport) int Unload(void) -{ - for (int i = 0;i<NUM_SERVICES;i++) - DestroyServiceFunction(hService[i]); - - UnhookEvent(hOptHook); - UnhookEvent(hLoadHook); - UnhookEvent(hOnPreShutdown); - - DestroyUpdateList(); - CloseHandle(hUpdateMutex); - - return 0; -} \ No newline at end of file diff --git a/plugins/NewsAggregstor/Src/Options.cpp b/plugins/NewsAggregstor/Src/Options.cpp deleted file mode 100644 index b9dc78b90c..0000000000 --- a/plugins/NewsAggregstor/Src/Options.cpp +++ /dev/null @@ -1,649 +0,0 @@ -/* -Copyright (C) 2012 Mataes - -This 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 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 file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#include "common.h" - -INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_INITDIALOG: - { - TranslateDialogDefault(hwndDlg); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); - SetWindowText(hwndDlg, TranslateT("Add Feed")); - SetDlgItemText(hwndDlg, IDC_FEEDURL, _T("http://")); - SetDlgItemText(hwndDlg, IDC_TAGSEDIT, _T(TAGSDEFAULT)); - SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, EM_LIMITTEXT, 3, 0); - SetDlgItemInt(hwndDlg, IDC_CHECKTIME, 60, TRUE); - SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999); - Utils_RestoreWindowPositionNoSize(hwndDlg,NULL,MODULE,"AddDlg"); - return TRUE; - } - case WM_COMMAND: - { - switch (LOWORD(wParam)) - { - case IDOK: - { - TCHAR str[MAX_PATH]; - if (!GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str))) - { - MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK); - break; - } - else if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) - { - MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); - break; - } - else if (GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false) < 0) - { - MessageBox(hwndDlg, TranslateT("Enter checking interval"), TranslateT("Error"), MB_OK); - break; - } - else if (!GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str))) - { - MessageBox(hwndDlg, TranslateT("Enter message format"), TranslateT("Error"), MB_OK); - break; - } - else - { - HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0); - CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)MODULE); - GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "Nick", str); - HWND hwndList = (HWND)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "URL", str); - DBWriteContactSettingByte(hContact, MODULE, "CheckState", 1); - DBWriteContactSettingDword(hContact, MODULE, "UpdateTime", GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false)); - GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "MsgFormat", str); - DBWriteContactSettingWord(hContact, MODULE, "Status", CallProtoService(MODULE, PS_GETSTATUS, 0, 0)); - if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) - { - DBWriteContactSettingByte(hContact, MODULE, "UseAuth", 1); - GetDlgItemText(hwndDlg, IDC_LOGIN, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "Login", str); - GetDlgItemText(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "Password", str); - } - DeleteAllItems(hwndList); - UpdateList(hwndList); - } - } - - case IDCANCEL: - DestroyWindow(hwndDlg); - break; - - case IDC_USEAUTH: - { - if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); - } - else - { - EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE); - } - } - break; - - case IDC_TAGHELP: - MessageBox(hwndDlg, TranslateT(TAGSHELP), TranslateT("Feed Tag Help"), MB_OK); - break; - - case IDC_RESET: - if (MessageBox(hwndDlg, TranslateT("Are you sure?"), TranslateT("Tags Mask Reset"), MB_YESNO | MB_ICONWARNING) == IDYES) - SetDlgItemText(hwndDlg, IDC_TAGSEDIT, _T(TAGSDEFAULT)); - break; - - case IDC_DISCOVERY: - { - EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE); - SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait...")); - TCHAR tszURL[MAX_PATH] = {0}, *tszTitle = NULL; - if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) - tszTitle = CheckFeed(tszURL, hwndDlg); - else - MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); - SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle); - EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE); - SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed")); - } - break; - } - break; - } - case WM_CLOSE: - { - DestroyWindow(hwndDlg); - break; - } - case WM_DESTROY: - { - Utils_SaveWindowPosition(hwndDlg,NULL,MODULE,"AddDlg"); - } - } - - return FALSE; -} - -INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_INITDIALOG: - { - TranslateDialogDefault(hwndDlg); - ItemInfo &SelItem = *(ItemInfo*)lParam; - ItemInfo *nSelItem = new ItemInfo(SelItem); - SetWindowText(hwndDlg, TranslateT("Change Feed")); - SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, EM_LIMITTEXT, 3, 0); - SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999); - - HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact != NULL) - { - if (IsMyContact(hContact)) - { - DBVARIANT dbNick = {0}; - if (DBGetContactSettingTString(hContact, MODULE, "Nick", &dbNick)) - continue; - else if (lstrcmp(dbNick.ptszVal, SelItem.nick) == 0) - { - DBFreeVariant(&dbNick); - DBVARIANT dbURL = {0}; - if (DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) - continue; - else if (lstrcmp(dbURL.ptszVal, SelItem.url) == 0) - { - DBFreeVariant(&dbURL); - nSelItem->hContact = hContact; - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG)nSelItem); - SetDlgItemText(hwndDlg, IDC_FEEDURL, SelItem.url); - SetDlgItemText(hwndDlg, IDC_FEEDTITLE, SelItem.nick); - SetDlgItemInt(hwndDlg, IDC_CHECKTIME, DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60), TRUE); - DBVARIANT dbMsg = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "MsgFormat", &dbMsg)) - { - SetDlgItemText(hwndDlg, IDC_TAGSEDIT, dbMsg.ptszVal); - DBFreeVariant(&dbMsg); - } - if (DBGetContactSettingByte(hContact, MODULE, "UseAuth", 0)) - { - CheckDlgButton(hwndDlg, IDC_USEAUTH, BST_CHECKED); - EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); - DBVARIANT dbLogin = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "Login", &dbLogin)) - { - SetDlgItemText(hwndDlg, IDC_LOGIN, dbLogin.ptszVal); - DBFreeVariant(&dbLogin); - } - DBVARIANT dbPass = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "Password", &dbPass)) - { - SetDlgItemText(hwndDlg, IDC_PASSWORD, dbPass.ptszVal); - DBFreeVariant(&dbPass); - } - } - break; - } - DBFreeVariant(&dbURL); - } - DBFreeVariant(&dbNick); - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - WindowList_Add(hChangeFeedDlgList,hwndDlg,hContact); - Utils_RestoreWindowPositionNoSize(hwndDlg,hContact,MODULE,"ChangeDlg"); - return TRUE; - } - case WM_COMMAND: - { - switch (LOWORD(wParam)) - { - case IDOK: - { - ItemInfo *SelItem = (ItemInfo*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - TCHAR str[MAX_PATH]; - if (!GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str))) - { - MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK); - break; - } - else if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) - { - MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); - break; - } - else if (GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false) < 0) - { - MessageBox(hwndDlg, TranslateT("Enter checking interval"), TranslateT("Error"), MB_OK); - break; - } - else if (!GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str))) - { - MessageBox(hwndDlg, TranslateT("Enter message format"), TranslateT("Error"), MB_OK); - break; - } - else - { - GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)); - DBWriteContactSettingTString(SelItem->hContact, MODULE, "URL", str); - GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str)); - DBWriteContactSettingTString(SelItem->hContact, MODULE, "Nick", str); - DBWriteContactSettingDword(SelItem->hContact, MODULE, "UpdateTime", GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false)); - GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str)); - DBWriteContactSettingTString(SelItem->hContact, MODULE, "MsgFormat", str); - if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) - { - DBWriteContactSettingByte(SelItem->hContact, MODULE, "UseAuth", 1); - GetDlgItemText(hwndDlg, IDC_LOGIN, str, SIZEOF(str)); - DBWriteContactSettingTString(SelItem->hContact, MODULE, "Login", str); - GetDlgItemText(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); - DBWriteContactSettingTString(SelItem->hContact, MODULE, "Password", str); - } - DeleteAllItems(SelItem->hwndList); - UpdateList(SelItem->hwndList); - } - } - - case IDCANCEL: - DestroyWindow(hwndDlg); - break; - - case IDC_USEAUTH: - { - if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); - } - else - { - EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE); - } - break; - } - - case IDC_TAGHELP: - MessageBox(hwndDlg, TranslateT(TAGSHELP), TranslateT("Feed Tag Help"), MB_OK); - break; - - case IDC_RESET: - if (MessageBox(hwndDlg, TranslateT("Are you sure?"), TranslateT("Tags Mask Reset"), MB_YESNO | MB_ICONWARNING) == IDYES) - SetDlgItemText(hwndDlg, IDC_TAGSEDIT, _T(TAGSDEFAULT)); - break; - - case IDC_DISCOVERY: - { - TCHAR tszURL[MAX_PATH] = {0}; - if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE); - SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait...")); - TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg); - SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle); - EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE); - SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed")); - } - else - MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); - } - break; - } - break; - } - - case WM_CLOSE: - { - DestroyWindow(hwndDlg); - break; - } - - case WM_DESTROY: - { - HANDLE hContact = (HANDLE) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - Utils_SaveWindowPosition(hwndDlg,hContact,MODULE,"ChangeDlg"); - WindowList_Remove(hChangeFeedDlgList,hwndDlg); - ItemInfo *SelItem = (ItemInfo*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - delete SelItem; - break; - } - } - - return FALSE; -} - -INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_INITDIALOG: - { - TranslateDialogDefault(hwndDlg); - SetWindowText(hwndDlg, TranslateT("Change Feed")); - SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, UDM_SETRANGE32, 0, 999); - - HANDLE hContact = (HANDLE)lParam; - WindowList_Add(hChangeFeedDlgList,hwndDlg,hContact); - Utils_RestoreWindowPositionNoSize(hwndDlg,hContact,MODULE,"ChangeDlg"); - DBVARIANT dbNick = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "Nick", &dbNick)) - { - SetDlgItemText(hwndDlg, IDC_FEEDTITLE, dbNick.ptszVal); - DBFreeVariant(&dbNick); - DBVARIANT dbURL = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) - { - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG)lParam); - SetDlgItemText(hwndDlg, IDC_FEEDURL, dbURL.ptszVal); - DBFreeVariant(&dbURL); - SetDlgItemInt(hwndDlg, IDC_CHECKTIME, DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60), TRUE); - DBVARIANT dbMsg = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "MsgFormat", &dbMsg)) - { - SetDlgItemText(hwndDlg, IDC_TAGSEDIT, dbMsg.ptszVal); - DBFreeVariant(&dbMsg); - } - if (DBGetContactSettingByte(hContact, MODULE, "UseAuth", 0)) - { - CheckDlgButton(hwndDlg, IDC_USEAUTH, BST_CHECKED); - EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); - DBVARIANT dbLogin = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "Login", &dbLogin)) - { - SetDlgItemText(hwndDlg, IDC_LOGIN, dbLogin.ptszVal); - DBFreeVariant(&dbLogin); - } - DBVARIANT dbPass = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "Password", &dbPass)) - { - SetDlgItemText(hwndDlg, IDC_PASSWORD, dbPass.ptszVal); - DBFreeVariant(&dbPass); - } - } - break; - } - } - return TRUE; - } - case WM_COMMAND: - { - switch (LOWORD(wParam)) - { - case IDOK: - { - HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - TCHAR str[MAX_PATH]; - if (!GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str))) - { - MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK); - break; - } - else if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) - { - MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); - break; - } - else if (GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false) < 0) - { - MessageBox(hwndDlg, TranslateT("Enter checking interval"), TranslateT("Error"), MB_OK); - break; - } - else if (!GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str))) - { - MessageBox(hwndDlg, TranslateT("Enter message format"), TranslateT("Error"), MB_OK); - break; - } - else - { - GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "URL", str); - GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "Nick", str); - DBWriteContactSettingDword(hContact, MODULE, "UpdateTime", GetDlgItemInt(hwndDlg, IDC_CHECKTIME, false, false)); - GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "MsgFormat", str); - if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) - { - DBWriteContactSettingByte(hContact, MODULE, "UseAuth", 1); - GetDlgItemText(hwndDlg, IDC_LOGIN, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "Login", str); - GetDlgItemText(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); - DBWriteContactSettingTString(hContact, MODULE, "Password", str); - } - } - } - - case IDCANCEL: - DestroyWindow(hwndDlg); - break; - - case IDC_USEAUTH: - { - if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE); - } - else - { - EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), FALSE); - } - break; - } - - case IDC_TAGHELP: - MessageBox(hwndDlg, TranslateT(TAGSHELP), TranslateT("Feed Tag Help"), MB_OK); - break; - - case IDC_RESET: - if (MessageBox(hwndDlg, TranslateT("Are you sure?"), TranslateT("Tags Mask Reset"), MB_YESNO | MB_ICONWARNING) == IDYES) - SetDlgItemText(hwndDlg, IDC_TAGSEDIT, _T(TAGSDEFAULT)); - break; - - case IDC_DISCOVERY: - { - TCHAR tszURL[MAX_PATH] = {0}; - if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE); - SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait...")); - TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg); - SetDlgItemText(hwndDlg, IDC_FEEDTITLE, tszTitle); - EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), TRUE); - SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Check Feed")); - } - else - MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); - } - break; - } - break; - } - - case WM_CLOSE: - { - DestroyWindow(hwndDlg); - break; - } - case WM_DESTROY: - { - HANDLE hContact = (HANDLE) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - Utils_SaveWindowPosition(hwndDlg,hContact,MODULE,"ChangeDlg"); - WindowList_Remove(hChangeFeedDlgList,hwndDlg); - } - } - - return FALSE; -} - -INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - HWND hwndList = GetDlgItem(hwndDlg, IDC_FEEDLIST); - switch (msg) - { - case WM_INITDIALOG: - { - TranslateDialogDefault(hwndDlg); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0); - CreateList(hwndList); - UpdateList(hwndList); - return TRUE; - } - - case WM_COMMAND: - { - switch (LOWORD(wParam)) - { - case IDC_ADD: - { - CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), hwndDlg, DlgProcAddFeedOpts, (LPARAM)hwndList); - } - return FALSE; - case IDC_CHANGE: - { - ItemInfo SelItem = {0}; - int sel = ListView_GetSelectionMark(hwndList); - ListView_GetItemText(hwndList, sel, 0, SelItem.nick, MAX_PATH); - ListView_GetItemText(hwndList, sel, 1, SelItem.url, MAX_PATH); - SelItem.hwndList = hwndList; - SelItem.SelNumber = sel; - CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), hwndDlg, DlgProcChangeFeedOpts, (LPARAM)&SelItem); - } - return FALSE; - case IDC_REMOVE: - { - if (MessageBox(hwndDlg, TranslateT("Are you sure?"), TranslateT("Contact deleting"), MB_YESNO | MB_ICONWARNING) == IDYES) - { - TCHAR nick[MAX_PATH], url[MAX_PATH]; - int sel = ListView_GetSelectionMark(hwndList); - ListView_GetItemText(hwndList, sel, 0, nick, MAX_PATH); - ListView_GetItemText(hwndList, sel, 1, url, MAX_PATH); - - HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact != NULL) - { - if(IsMyContact(hContact)) - { - DBVARIANT dbNick = {0}; - if (DBGetContactSettingTString(hContact, MODULE, "Nick", &dbNick)) - break; - else if (lstrcmp(dbNick.ptszVal, nick) == 0) - { - DBFreeVariant(&dbNick); - DBVARIANT dbURL = {0}; - if (DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) - break; - else if (lstrcmp(dbURL.ptszVal, url) == 0) - { - DBFreeVariant(&dbURL); - CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0); - ListView_DeleteItem(hwndList, sel); - break; - } - DBFreeVariant(&dbURL); - } - DBFreeVariant(&dbNick); - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - } - return FALSE; - } - } - break; - } - case WM_NOTIFY: - { - NMHDR *hdr = (NMHDR *)lParam; - switch (hdr->code) - { - case PSN_APPLY: - { - HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - int i = 0; - while (hContact != NULL) - { - if(IsMyContact(hContact)) - { - DBWriteContactSettingByte(hContact, MODULE, "CheckState", ListView_GetCheckState(hwndList, i)); - i += 1; - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - break; - } - - case NM_DBLCLK: - { - ItemInfo SelItem = {0}; - int sel = ListView_GetHotItem(hwndList); - if (sel != -1) - { - ListView_GetItemText(hwndList, sel, 0, SelItem.nick, MAX_PATH); - ListView_GetItemText(hwndList, sel, 1, SelItem.url, MAX_PATH); - SelItem.hwndList = hwndList; - SelItem.SelNumber = sel; - CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), hwndDlg, DlgProcChangeFeedOpts, (LPARAM)&SelItem); - } - break; - } - - case LVN_ITEMCHANGED: - { - NMLISTVIEW *nmlv = (NMLISTVIEW *)lParam; - if (((nmlv->uNewState ^ nmlv->uOldState) & LVIS_STATEIMAGEMASK) && !UpdateListFlag) - { - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - } - break; - } - } - } - }//end* switch (msg) - return FALSE; -} - -INT OptInit(WPARAM wParam, LPARAM lParam) -{ - OPTIONSDIALOGPAGE odp = {0}; - - ZeroMemory(&odp, sizeof(odp)); - odp.cbSize = sizeof(odp); - odp.position = 100000000; - odp.hInstance = hInst; - odp.flags = ODPF_TCHAR | ODPF_BOLDGROUPS; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS); - odp.ptszGroup = LPGENT("Network"); - odp.ptszTitle = LPGENT("News Aggregator"); - odp.pfnDlgProc = UpdateNotifyOptsProc; - CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp); - return 0; -} \ No newline at end of file diff --git a/plugins/NewsAggregstor/Src/Services.cpp b/plugins/NewsAggregstor/Src/Services.cpp deleted file mode 100644 index 0c23983c79..0000000000 --- a/plugins/NewsAggregstor/Src/Services.cpp +++ /dev/null @@ -1,240 +0,0 @@ -/* -Copyright (C) 2012 Mataes - -This 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 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 file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#include "common.h" - -int g_nStatus = ID_STATUS_OFFLINE; -UINT_PTR timerId = 0; - -void SetContactStatus(HANDLE hContact,int nNewStatus) -{ - if(DBGetContactSettingWord(hContact,MODULE,"Status",ID_STATUS_OFFLINE) != nNewStatus) - DBWriteContactSettingWord(hContact,MODULE,"Status",nNewStatus); -} - -static void __cdecl WorkingThread(void* param) -{ - int nStatus = (int)param; -// UpdateAll(FALSE, FALSE); - HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact != NULL) - { - if(IsMyContact(hContact)) - { - SetContactStatus(hContact, nStatus); - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } -} - -int NewsAggrInit(WPARAM wParam,LPARAM lParam) -{ - HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact != NULL) - { - if(IsMyContact(hContact)) - { - SetContactStatus(hContact, ID_STATUS_OFFLINE); - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - NetlibInit(); - InitIcons(); - InitMenu(); - - // timer for the first update - timerId = SetTimer(NULL, 0, 5000, timerProc2); // first update is 5 sec after load - - return 0; -} - -int NewsAggrPreShutdown(WPARAM wParam,LPARAM lParam) -{ - if (hAddFeedDlg) - { - SendMessage(hAddFeedDlg, WM_CLOSE, 0, 0); - } - WindowList_Broadcast(hChangeFeedDlgList, WM_CLOSE, 0, 0); - - mir_forkthread(WorkingThread, (void*)ID_STATUS_OFFLINE); - KillTimer(NULL, timerId); - NetlibUnInit(); - - return 0; -} - -INT_PTR NewsAggrGetName(WPARAM wParam, LPARAM lParam) -{ - if(lParam) - { - lstrcpynA((char*)lParam, MODULE, wParam); - return 0; - } - else - { - return 1; - } -} - -INT_PTR NewsAggrGetCaps(WPARAM wp,LPARAM lp) -{ - switch(wp) - { - case PFLAGNUM_1: - return PF1_IM | PF1_PEER2PEER; - case PFLAGNUM_3: - case PFLAGNUM_2: - return PF2_ONLINE; - case PFLAGNUM_4: - return PF4_AVATARS; - case PFLAG_UNIQUEIDTEXT: - return (INT_PTR) "News Feed"; - case PFLAG_UNIQUEIDSETTING: - return (INT_PTR) "URL"; - default: - return 0; - } -} - -INT_PTR NewsAggrSetStatus(WPARAM wp,LPARAM /*lp*/) -{ - int nStatus = wp; - if ((ID_STATUS_ONLINE == nStatus) || (ID_STATUS_OFFLINE == nStatus)) - { - int nOldStatus = g_nStatus; - if(nStatus != g_nStatus) - { - g_nStatus = nStatus; - mir_forkthread(WorkingThread, (void*)g_nStatus); - ProtoBroadcastAck(MODULE, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, g_nStatus); - } - - } - - return 0; -} - -INT_PTR NewsAggrGetStatus(WPARAM/* wp*/,LPARAM/* lp*/) -{ - return g_nStatus; -} - -INT_PTR NewsAggrLoadIcon(WPARAM wParam,LPARAM lParam) -{ - return (LOWORD(wParam) == PLI_PROTOCOL) ? (INT_PTR)CopyIcon(LoadIconEx("main", FALSE)) : 0; -} - -static void __cdecl AckThreadProc(HANDLE param) -{ - Sleep(100); - ProtoBroadcastAck(MODULE, param, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0); -} - -INT_PTR NewsAggrGetInfo(WPARAM wParam,LPARAM lParam) -{ - CCSDATA *ccs = (CCSDATA *) lParam; - mir_forkthread(AckThreadProc, ccs->hContact); - return 0; -} - -INT_PTR CheckAllFeeds(WPARAM wParam,LPARAM lParam) -{ - HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact != NULL) - { - if(IsMyContact(hContact)) - { - UpdateListAdd(hContact); - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - if (!ThreadRunning) - mir_forkthread(UpdateThreadProc, NULL); - - - return 0; -} - -INT_PTR AddFeed(WPARAM wParam,LPARAM lParam) -{ - hAddFeedDlg = CreateDialog(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcAddFeedOpts); - ShowWindow(hAddFeedDlg, SW_SHOW); - return 0; -} - -INT_PTR ChangeFeed(WPARAM wParam,LPARAM lParam) -{ - HANDLE hContact = (HANDLE) wParam; - HWND hChangeFeedDlg = WindowList_Find(hChangeFeedDlgList,hContact); - if (!hChangeFeedDlg) - { - hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcChangeFeedMenu, (LPARAM)hContact); - ShowWindow(hChangeFeedDlg, SW_SHOW); - } - else - { - SetForegroundWindow(hChangeFeedDlg); - SetFocus(hChangeFeedDlg); - } - return 0; -} - -INT_PTR ImportFeeds(WPARAM wParam,LPARAM lParam) -{ - return 0; -} - -INT_PTR ExportFeeds(WPARAM wParam,LPARAM lParam) -{ - return 0; -} - -INT_PTR CheckFeed(WPARAM wParam,LPARAM lParam) -{ - HANDLE hContact = (HANDLE)wParam; - if(IsMyContact(hContact)) - UpdateListAdd(hContact); - if (!ThreadRunning) - mir_forkthread(UpdateThreadProc, NULL); - return 0; -} - -INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam,LPARAM lParam) -{ - PROTO_AVATAR_INFORMATION* pai = (PROTO_AVATAR_INFORMATION*) lParam; - - if (!IsMyContact(pai->hContact)) - return GAIR_NOAVATAR; - - // if GAIF_FORCE is set, we are updating the feed - // otherwise, cached avatar is used - if (wParam & GAIF_FORCE) - UpdateListAdd(pai->hContact); - //CheckCurrentFeed(pai->hContact); - if (!ThreadRunning) - mir_forkthread(UpdateThreadProc, NULL); - - DBVARIANT dbv = {0}; - if(DBGetContactSettingTString(pai->hContact,MODULE,"ImageURL",&dbv)) - { - return GAIR_NOAVATAR; - } - DBFreeVariant(&dbv); - return GAIR_WAITFOR; -} \ No newline at end of file diff --git a/plugins/NewsAggregstor/Src/Update.cpp b/plugins/NewsAggregstor/Src/Update.cpp deleted file mode 100644 index f2f5ecf92a..0000000000 --- a/plugins/NewsAggregstor/Src/Update.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* -Copyright (C) 2012 Mataes - -This 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 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 file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#include "common.h" - -// check if Feed is currently updating -BOOL ThreadRunning; -UPDATELIST *UpdateListHead = NULL; -UPDATELIST *UpdateListTail = NULL; - -// main auto-update timer -VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - // only run if it is not current updating and the auto update option is enabled - if (!ThreadRunning && !Miranda_Terminated()) - { - BOOL HaveUpdates = FALSE; - HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact != NULL) - { - if(IsMyContact(hContact)) - { - if (DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60)) - { - double diff = difftime(time(NULL), DBGetContactSettingDword(hContact, MODULE, "LastCheck", 0)); - if (diff >= DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60) * 60) - { - UpdateListAdd(hContact); - HaveUpdates = TRUE; - } - } - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - if (!ThreadRunning && HaveUpdates) - mir_forkthread(UpdateThreadProc, NULL); - } -} - -// temporary timer for first run -// when this is run, it kill the old startup timer and create the permenant one above -VOID CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - KillTimer(NULL, timerId); - ThreadRunning = FALSE; - - if (!Miranda_Terminated()) - { - CheckAllFeeds(0,0); - timerId = SetTimer(NULL, 0, 30000, (TIMERPROC)timerProc); - } -} - -void UpdateListAdd(HANDLE hContact) -{ - UPDATELIST *newItem; - - newItem = (UPDATELIST*)mir_alloc(sizeof(UPDATELIST)); - newItem->hContact = hContact; - newItem->next = NULL; - - WaitForSingleObject(hUpdateMutex, INFINITE); - - if (UpdateListTail == NULL) UpdateListHead = newItem; - else UpdateListTail->next = newItem; - UpdateListTail = newItem; - - ReleaseMutex(hUpdateMutex); -} - -HANDLE UpdateGetFirst() -{ - HANDLE hContact = NULL; - - WaitForSingleObject(hUpdateMutex, INFINITE); - - if (UpdateListHead != NULL) - { - UPDATELIST* Item = UpdateListHead; - - hContact = Item->hContact; - UpdateListHead = Item->next; - mir_free(Item); - - if (UpdateListHead == NULL) UpdateListTail = NULL; - } - - ReleaseMutex(hUpdateMutex); - - return hContact; -} - -void DestroyUpdateList(void) -{ - UPDATELIST *temp; - - WaitForSingleObject(hUpdateMutex, INFINITE); - - temp = UpdateListHead; - - // free the list one by one - while (temp != NULL) - { - UpdateListHead = temp->next; - mir_free(temp); - temp = UpdateListHead; - } - // make sure the entire list is clear - UpdateListTail = NULL; - - ReleaseMutex(hUpdateMutex); -} - -void UpdateThreadProc(LPVOID hWnd) -{ - WaitForSingleObject(hUpdateMutex, INFINITE); - if (ThreadRunning) - { - ReleaseMutex(hUpdateMutex); - return; - } - ThreadRunning = TRUE; // prevent 2 instance of this thread running - ReleaseMutex(hUpdateMutex); - - // update weather by getting the first station from the queue until the queue is empty - while (UpdateListHead != NULL && !Miranda_Terminated()) - CheckCurrentFeed(UpdateGetFirst()); - - // exit the update thread - ThreadRunning = FALSE; -} \ No newline at end of file diff --git a/plugins/NewsAggregstor/Src/Utils.cpp b/plugins/NewsAggregstor/Src/Utils.cpp deleted file mode 100644 index c42a3f7dd1..0000000000 --- a/plugins/NewsAggregstor/Src/Utils.cpp +++ /dev/null @@ -1,1404 +0,0 @@ -/* -Copyright (C) 2012 Mataes - -This 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 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 file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#include "common.h" - -HANDLE hNetlibUser = NULL, hNetlibHttp; -BOOL UpdateListFlag = FALSE; - -BOOL IsMyContact(HANDLE hContact) -{ - const char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); - return szProto != NULL && strcmp(MODULE, szProto) == 0; -} - -VOID NetlibInit() -{ - NETLIBUSER nlu = {0}; - nlu.cbSize = sizeof(nlu); - nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY; - nlu.ptszDescriptiveName = TranslateT("NewsAggr HTTP connection"); - nlu.szSettingsModule = MODULE; - hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); -} - -VOID NetlibUnInit() -{ - Netlib_CloseHandle(hNetlibUser); - hNetlibUser = NULL; -} - -static void arrayToHex(BYTE* data, size_t datasz, char* res) -{ - char* resptr = res; - for (unsigned i=0; i<datasz ; i++) - { - const BYTE ch = data[i]; - - const char ch0 = (char)(ch >> 4); - *resptr++ = (char)((ch0 <= 9) ? ('0' + ch0) : (('a' - 10) + ch0)); - - const char ch1 = (char)(ch & 0xF); - *resptr++ = (char)((ch1 <= 9) ? ('0' + ch1) : (('a' - 10) + ch1)); - } - *resptr = '\0'; -} - -int GetImageFormat(const TCHAR* ext) -{ - if(lstrcmp(ext,_T(".jpg")) || lstrcmp(ext,_T(".jpeg"))) - { - return PA_FORMAT_JPEG; - } - else if(lstrcmp(ext,_T(".png"))) - { - return PA_FORMAT_PNG; - } - else if(lstrcmp(ext,_T(".gif"))) - { - return PA_FORMAT_GIF; - } - else if(lstrcmp(ext,_T(".ico"))) - { - return PA_FORMAT_ICON; - } - else if(lstrcmp(ext,_T(".bmp"))) - { - return PA_FORMAT_BMP; - } - else if(lstrcmp(ext,_T(".swf"))) - { - return PA_FORMAT_SWF; - } - else if(lstrcmp(ext,_T(".xml"))) - { - return PA_FORMAT_XML; - } - else if(lstrcmp(ext,_T(".jpg")) || lstrcmp(ext,_T(".jpeg"))) - { - return PA_FORMAT_JPEG; - } - else - { - return PA_FORMAT_UNKNOWN; - } -} -void CreateAuthString(char* auth, HANDLE hContact, HWND hwndDlg) -{ - char *user = NULL, *pass = NULL; - TCHAR *tlogin = NULL, *tpass = NULL, buf[MAX_PATH] = {0}; - if (hContact && DBGetContactSettingByte(hContact, MODULE, "UseAuth", 0)) - { - DBVARIANT dbLogin = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "Login", &dbLogin)) - { - tlogin = (TCHAR*)mir_alloc(_tcslen(dbLogin.ptszVal)*sizeof(TCHAR)); - memcpy(tlogin, dbLogin.ptszVal, _tcslen(dbLogin.ptszVal)*sizeof(TCHAR)); - tlogin[_tcslen(dbLogin.ptszVal)] = 0; - DBFreeVariant(&dbLogin); - } - DBVARIANT dbPass = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "Password", &dbPass)) - { - tpass = (TCHAR*)mir_alloc(_tcslen(dbPass.ptszVal)*sizeof(TCHAR)); - memcpy(tpass, dbPass.ptszVal, _tcslen(dbPass.ptszVal)*sizeof(TCHAR)); - tpass[_tcslen(dbPass.ptszVal)] = 0; - DBFreeVariant(&dbPass); - } - } - else if (hwndDlg && IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) - { - GetDlgItemText(hwndDlg, IDC_LOGIN, buf, SIZEOF(buf)); - tlogin = buf; - GetDlgItemText(hwndDlg, IDC_PASSWORD, buf, SIZEOF(buf)); - tpass = buf; - } - user = mir_t2a(tlogin); - pass = mir_t2a(tpass); - - char str[MAX_PATH]; - int len = mir_snprintf(str, SIZEOF(str), "%s:%s", user, pass); - mir_free(user); - mir_free(pass); - - strcpy(auth, "Basic "); - NETLIBBASE64 nlb = { auth+6, 250, (PBYTE)str, len }; - CallService(MS_NETLIB_BASE64ENCODE, 0, LPARAM(&nlb)); -} - -VOID GetNewsData(TCHAR *tszUrl, char** szData, HANDLE hContact, HWND hwndDlg) -{ - char* szRedirUrl = NULL; - NETLIBHTTPREQUEST nlhr = {0}; - NETLIBHTTPHEADER headers[5]; - - // initialize the netlib request - nlhr.cbSize = sizeof(nlhr); - nlhr.requestType = REQUEST_GET; - nlhr.flags = NLHRF_NODUMP | NLHRF_HTTP11; - char *szUrl = mir_t2a(tszUrl); - nlhr.szUrl = szUrl; - nlhr.nlc = hNetlibHttp; - - // change the header so the plugin is pretended to be IE 6 + WinXP - nlhr.headers = headers; - nlhr.headers[0].szName = "User-Agent"; - nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"; - nlhr.headers[1].szName = "Cache-Control"; - nlhr.headers[1].szValue = "no-cache"; - nlhr.headers[2].szName = "Pragma"; - nlhr.headers[2].szValue = "no-cache"; - nlhr.headers[3].szName = "Connection"; - nlhr.headers[3].szValue = "close"; - nlhr.headers[4].szName = "Accept"; - nlhr.headers[4].szValue = "ext/html, application/xml"; - if (DBGetContactSettingByte(hContact, MODULE, "UseAuth", 0) || IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) - { - nlhr.headersCount = 6; - nlhr.headers[5].szName = "Authorization"; - - char auth[256]; - CreateAuthString(auth, hContact, hwndDlg); - nlhr.headers[5].szValue = auth; - } - else - nlhr.headersCount = 5; - - // download the page - NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&nlhr); - if (nlhrReply) - { - // if the recieved code is 200 OK - switch(nlhrReply->resultCode) - { - case 200: - { - if (nlhrReply->dataLength) - { - // allocate memory and save the retrieved data - *szData = (char *)mir_alloc(nlhrReply->dataLength + 2); - memcpy(*szData, nlhrReply->pData, nlhrReply->dataLength); - (*szData)[nlhrReply->dataLength] = 0; - } - break; - } - - case 401: - { - //ShowMessage(0, TranslateT("Cannot upload VersionInfo. Incorrect username or password")); - break; - } - - case 301: - case 302: - case 307: - // get the url for the new location and save it to szInfo - // look for the reply header "Location" - for (int i=0; i<nlhrReply->headersCount; i++) - { - if (!strcmp(nlhrReply->headers[i].szName, "Location")) - { - size_t rlen = 0; - if (nlhrReply->headers[i].szValue[0] == '/') - { - const char* szPath; - const char* szPref = strstr(szUrl, "://"); - szPref = szPref ? szPref + 3 : szUrl; - szPath = strchr(szPref, '/'); - rlen = szPath != NULL ? szPath - szUrl : strlen(szUrl); - } - - szRedirUrl = (char*)mir_realloc(szRedirUrl, - rlen + strlen(nlhrReply->headers[i].szValue)*3 + 1); - - strncpy(szRedirUrl, szUrl, rlen); - strcpy(szRedirUrl+rlen, nlhrReply->headers[i].szValue); - - nlhr.szUrl = szRedirUrl; - break; - } - } - break; - - default: - //ShowMessage(0, TranslateT("Cannot upload VersionInfo. Unknown error")); - break; - } - CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)nlhrReply); - } - mir_free(szUrl); -} - -VOID CreateList (HWND hwndList) -{ - SendMessage(hwndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES); - - LVCOLUMN lvc = {0}; - // Initialize the LVCOLUMN structure. - // The mask specifies that the format, width, text, and - // subitem members of the structure are valid. - lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; - lvc.fmt = LVCFMT_LEFT; - - lvc.iSubItem = 0; - lvc.pszText = TranslateT("Feed"); - lvc.cx = 160; // width of column in pixels - ListView_InsertColumn(hwndList, 0, &lvc); - - lvc.iSubItem = 1; - lvc.pszText = TranslateT("URL"); - lvc.cx = 280; // width of column in pixels - ListView_InsertColumn(hwndList, 1, &lvc); -} - -VOID UpdateList (HWND hwndList) -{ - LVITEM lvI = {0}; - - // Some code to create the list-view control. - // Initialize LVITEM members that are common to all - // items. - HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - int i = 0; - while (hContact != NULL) - { - if (IsMyContact(hContact)) - { - UpdateListFlag = TRUE; - lvI.mask = LVIF_TEXT; - lvI.iSubItem = 0; - DBVARIANT dbNick = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "Nick", &dbNick)) - { - lvI.pszText = dbNick.ptszVal; - lvI.iItem = i; - ListView_InsertItem(hwndList, &lvI); - lvI.iSubItem = 1; - DBVARIANT dbURL = {0}; - if (!DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) - { - lvI.pszText = dbURL.ptszVal; - ListView_SetItem(hwndList, &lvI); - i += 1; - ListView_SetCheckState(hwndList, lvI.iItem, DBGetContactSettingByte(hContact, MODULE, "CheckState", 1)); - DBFreeVariant(&dbURL); - } - DBFreeVariant(&dbNick); - } - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - UpdateListFlag = FALSE; -} - -VOID DeleteAllItems(HWND hwndList) -{ - ListView_DeleteAllItems(hwndList); -} - -time_t __stdcall DateToUnixTime(TCHAR* stamp, BOOL FeedType) -{ - struct tm timestamp; - TCHAR date[9]; - int i, y; - time_t t; - - if ( stamp == NULL ) return ( time_t ) 0; - - TCHAR *p = stamp; - - if (FeedType) - { - // skip '-' chars - int si = 0, sj = 0; - while (1) { - if ( p[si] == _T('-') ) - si++; - else - if ( !( p[sj++] = p[si++] )) - break; - }; - } - else - { - TCHAR weekday[4], monthstr[4], timezonesign[2]; - INT day, month, year, hour, min, sec, timezoneh, timezonem; - if (_tcsstr(p, _T(","))) - { - _stscanf( p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); - if (lstrcmpi(monthstr, _T("Jan")) ==0) - month = 1; - if (lstrcmpi(monthstr, _T("Feb")) ==0) - month = 2; - if (lstrcmpi(monthstr, _T("Mar")) ==0) - month = 3; - if (lstrcmpi(monthstr, _T("Apr")) ==0) - month = 4; - if (lstrcmpi(monthstr, _T("May")) ==0) - month = 5; - if (lstrcmpi(monthstr, _T("Jun")) ==0) - month = 6; - if (lstrcmpi(monthstr, _T("Jul")) ==0) - month = 7; - if (lstrcmpi(monthstr, _T("Aug")) ==0) - month = 8; - if (lstrcmpi(monthstr, _T("Sep")) ==0) - month = 9; - if (lstrcmpi(monthstr, _T("Oct")) ==0) - month = 10; - if (lstrcmpi(monthstr, _T("Nov")) ==0) - month = 11; - if (lstrcmpi(monthstr, _T("Dec")) ==0) - month = 12; - if (lstrcmp(timezonesign, _T("+")) ==0) - mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec); - else if (lstrcmp(timezonesign, _T("-")) ==0) - mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec); - else - mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec); - } - else - { - _stscanf( p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); - if (lstrcmp(timezonesign, _T("+")) ==0) - mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec); - else if (lstrcmp(timezonesign, _T("-")) ==0) - mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec); - else - mir_sntprintf(p, 4+2+2+1+2+1+2+1+2+1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec); - } - } - // Get the date part - for ( i=0; *p!='\0' && i<8 && isdigit( *p ); p++,i++ ) - date[i] = *p; - - // Parse year - if ( i == 6 ) { - // 2-digit year ( 1970-2069 ) - y = ( date[0]-'0' )*10 + ( date[1]-'0' ); - if ( y < 70 ) y += 100; - } - else if ( i == 8 ) { - // 4-digit year - y = ( date[0]-'0' )*1000 + ( date[1]-'0' )*100 + ( date[2]-'0' )*10 + date[3]-'0'; - y -= 1900; - } - else - return ( time_t ) 0; - timestamp.tm_year = y; - // Parse month - timestamp.tm_mon = ( date[i-4]-'0' )*10 + date[i-3]-'0' - 1; - // Parse date - timestamp.tm_mday = ( date[i-2]-'0' )*10 + date[i-1]-'0'; - - // Skip any date/time delimiter - for ( ; *p!='\0' && !isdigit( *p ); p++ ); - - // Parse time - if ( _stscanf( p, _T("%d:%d:%d"), ×tamp.tm_hour, ×tamp.tm_min, ×tamp.tm_sec ) != 3 ) - return ( time_t ) 0; - - timestamp.tm_isdst = 0; // DST is already present in _timezone below - t = mktime( ×tamp ); - - _tzset(); - t -= _timezone; - - if ( t >= 0 ) - return t; - else - return ( time_t ) 0; -} - -TCHAR* StrReplace (TCHAR* Search, TCHAR* Replace, TCHAR* Resource) -{ - int i = 0; - int SearchLen = (int)_tcslen(Search); - TCHAR* Work = mir_tstrdup(Replace); - int ReplaceLen = (int)_tcslen(Work); - - TCHAR* Pointer = _tcsstr(Resource, Search); - - while (Pointer != NULL) - { - int PointerLen = (int)_tcslen(Pointer); - int ResourceLen = (int)_tcslen(Resource); - - TCHAR* NewText = (TCHAR*)mir_calloc((ResourceLen - SearchLen + ReplaceLen + 1)*sizeof(TCHAR)); - - _tcsncpy(NewText, Resource, ResourceLen - PointerLen); - _tcscat(NewText, Work); - _tcscat(NewText, Pointer + SearchLen); - - Resource = (TCHAR*)mir_alloc((ResourceLen - SearchLen + ReplaceLen + 1)*sizeof(TCHAR)); - - for (i = 0; i < (ResourceLen - SearchLen + ReplaceLen); i++) - Resource[i] = NewText[i]; - Resource[i] = 0; - mir_free(NewText); - - Pointer = _tcsstr(Resource + (ResourceLen - PointerLen + ReplaceLen), Search); - } - mir_free(Work); - - return Resource; -} - -BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) -{ - HANDLE hFile = NULL; - DWORD dwBytes; - - NETLIBHTTPREQUEST nlhr = {0}; - nlhr.cbSize = sizeof(nlhr); - nlhr.requestType = REQUEST_GET; - nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11; - char* szUrl = mir_t2a(tszURL); - nlhr.szUrl = szUrl; - nlhr.headersCount = 4; - nlhr.headers=(NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount); - nlhr.headers[0].szName = "User-Agent"; - nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"; - nlhr.headers[1].szName = "Connection"; - nlhr.headers[1].szValue = "close"; - nlhr.headers[2].szName = "Cache-Control"; - nlhr.headers[2].szValue = "no-cache"; - nlhr.headers[3].szName = "Pragma"; - nlhr.headers[3].szValue = "no-cache"; - - bool ret = false; - NETLIBHTTPREQUEST *pReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser,(LPARAM)&nlhr); - - if(pReply) - { - if ((200 == pReply->resultCode) && (pReply->dataLength > 0)) - { - char *date = NULL, *size = NULL; - for (int i = 0; i < pReply->headersCount; i++) - { - if (lstrcmpiA(pReply->headers[i].szName, "Last-Modified") == 0) - { - date = pReply->headers[i].szValue; - continue; - } - if (lstrcmpiA(pReply->headers[i].szName, "Content-Length") == 0) - { - size = pReply->headers[i].szValue; - continue; - } - } - if (date != NULL && size != NULL) - { - TCHAR *tdate = mir_a2t(date); - TCHAR *tsize = mir_a2t(size); - int fh; - struct _stat buf; - - fh = _topen(tszLocal, _O_RDONLY); - if (fh != -1) - { - _fstat(fh, &buf); - time_t modtime = DateToUnixTime(tdate, 0); - time_t filemodtime = mktime(localtime(&buf.st_atime)); - if (modtime > filemodtime && buf.st_size != _ttoi(tsize)) - { - hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, NULL); - ret = true; - } - _close(fh); - } - else - { - hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, NULL); - ret = true; - } - mir_free(tdate); - mir_free(tsize); - } - else - { - hFile = CreateFile(tszLocal, GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(hFile, pReply->pData, (DWORD)pReply->dataLength, &dwBytes, NULL); - ret = true; - } - } - CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)pReply); - } - - mir_free(szUrl); - mir_free(nlhr.headers); - - if (hFile) - CloseHandle(hFile); - - return ret; -} - -size_t PathToRelative(const TCHAR *pSrc, TCHAR *pOut) -{ return CallService( MS_UTILS_PATHTORELATIVET, (WPARAM)pSrc, (LPARAM)pOut ); -} - -TCHAR* CheckFeed(TCHAR* tszURL, HWND hwndDlg) -{ - char *szData = NULL; - DBVARIANT dbVar = {0}; - if (CallProtoService(MODULE, PS_GETSTATUS, 0, 0) != ID_STATUS_OFFLINE) - { - GetNewsData(tszURL, &szData, NULL, hwndDlg); - if (szData) - { - TCHAR *tszData = mir_a2t(szData); - int bytesParsed = 0; - HXML hXml = xi.parseString(tszData, &bytesParsed, NULL); - BOOL UtfEncode = FALSE; - TCHAR *newtszData = mir_utf8decodeT(szData); - if (newtszData) - { - UtfEncode = TRUE; - mir_free(newtszData); - } - mir_free(tszData); - mir_free(szData); - if(hXml != NULL) - { - int childcount = 0; - HXML node = xi.getChild(hXml, childcount); - while(node) - { - if (lstrcmpi(xi.getName(node), _T("rss")) == 0 || lstrcmpi(xi.getName(node), _T("rdf")) == 0) - { - HXML chan = xi.getChild(node, 0); - for (int j = 0; j < xi.getChildCount(chan); j++) - { - HXML child = xi.getChild(chan, j); - if (lstrcmpi(xi.getName(child), _T("title")) == 0) - { - TCHAR mes[MAX_PATH]; - mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL); - MessageBox(NULL, mes, TranslateT("New Aggregator"), MB_OK|MB_ICONINFORMATION); - TCHAR *tszTitle = (TCHAR*)xi.getText(child); - if (UtfEncode) - { - char* szstring = mir_t2a(tszTitle); - TCHAR* tszstring = mir_utf8decodeT(szstring); - tszTitle = (TCHAR*)mir_alloc(sizeof(TCHAR)*lstrlen(tszstring)+1); - _tcscpy(tszTitle, tszstring); - mir_free(tszstring); - mir_free(szstring); - } - return tszTitle; - } - } - } - else if (lstrcmpi(xi.getName(node), _T("feed")) == 0) - { - for (int j = 0; j < xi.getChildCount(node); j++) - { - HXML child = xi.getChild(node, j); - if (lstrcmpi(xi.getName(child), _T("title")) == 0) - { - TCHAR mes[MAX_PATH]; - mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL); - MessageBox(NULL, mes, TranslateT("New Aggregator"), MB_OK|MB_ICONINFORMATION); - TCHAR *tszTitle = (TCHAR*)xi.getText(child); - if (UtfEncode) - { - char* szstring = mir_t2a(tszTitle); - TCHAR* tszstring = mir_utf8decodeT(szstring); - tszTitle = (TCHAR*)mir_alloc(sizeof(TCHAR)*lstrlen(tszstring)+1); - _tcscpy(tszTitle, tszstring); - mir_free(tszstring); - mir_free(szstring); - } - return tszTitle; - } - } - } - childcount +=1; - node = xi.getChild(hXml, childcount); - } - } - xi.destroyNode(hXml); - } - else - { - TCHAR mes[MAX_PATH]; - mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a not valid feed's address."), tszURL); - MessageBox(NULL, mes, TranslateT("New Aggregator"), MB_OK|MB_ICONERROR); - } - } - return NULL; -} - -VOID CheckCurrentFeed(HANDLE hContact) -{ - char *szData = NULL; - DBVARIANT dbURL = {0}; - if (DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL)) - return; - else if ((DBGetContactSettingWord(hContact, MODULE, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) && DBGetContactSettingByte(hContact, MODULE, "CheckState", 1) != 0) - { - GetNewsData(dbURL.ptszVal, &szData, hContact, NULL); - DBFreeVariant(&dbURL); - if (szData) - { - TCHAR *tszData = mir_a2t(szData); - int bytesParsed = 0; - HXML hXml = xi.parseString(tszData, &bytesParsed, NULL); - BOOL UtfEncode = FALSE; - TCHAR *newtszData = mir_utf8decodeT(szData); - if (newtszData) - { - UtfEncode = TRUE; - mir_free(newtszData); - } - mir_free(tszData); - mir_free(szData); - if(hXml != NULL) - { - int childcount = 0; - HXML node = xi.getChild(hXml, childcount); - while(node) - { - if (lstrcmpi(xi.getName(node), _T("rss")) == 0 || lstrcmpi(xi.getName(node), _T("rdf")) == 0) - { - if (lstrcmpi(xi.getName(node), _T("rss")) == 0) - { - for (int i = 0; i < xi.getAttrCount(node); i++) - { - if (lstrcmpi(xi.getAttrName(node, i), _T("version")) == 0) - { - TCHAR ver[MAX_PATH]; - mir_sntprintf(ver, SIZEOF(ver), _T("RSS %s"), xi.getAttrValue(node, xi.getAttrName(node, i))); - DBWriteContactSettingTString(hContact, MODULE, "MirVer", ver); - break; - } - } - } - else if (lstrcmpi(xi.getName(node), _T("rdf")) == 0) - { - DBWriteContactSettingTString(hContact, MODULE, "MirVer", _T("RSS 1.0")); - } - - HXML chan = xi.getChild(node, 0); - for (int j = 0; j < xi.getChildCount(chan); j++) - { - HXML child = xi.getChild(chan, j); - if (lstrcmpi(xi.getName(child), _T("title")) == 0 && xi.getText(child)) - { - char* szstring = mir_t2a(xi.getText(child)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - if (UtfEncode) - { - TCHAR* tszstring = mir_utf8decodeT(szstring); - DBWriteContactSettingTString(hContact, MODULE, "FirstName", tszstring); - mir_free(tszstring); - } - else - { - TCHAR* tszstring = mir_a2t(szstring); - DBWriteContactSettingTString(hContact, MODULE, "FirstName", tszstring); - mir_free(tszstring); - } - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(child), _T("link")) == 0) - { - DBWriteContactSettingTString(hContact, MODULE, "Homepage", xi.getText(child)); - continue; - } - if (lstrcmpi(xi.getName(child), _T("description")) == 0 && xi.getText(child)) - { - char* szstring = mir_t2a(xi.getText(child)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - if (UtfEncode) - { - TCHAR* tszstring = mir_utf8decodeT(szstring); - DBWriteContactSettingTString(hContact, MODULE, "About", tszstring); - DBWriteContactSettingTString(hContact, "CList", "StatusMsg", tszstring); - mir_free(tszstring); - } - else - { - TCHAR* tszstring = mir_a2t(szstring); - DBWriteContactSettingTString(hContact, MODULE, "About", tszstring); - DBWriteContactSettingTString(hContact, "CList", "StatusMsg", tszstring); - mir_free(tszstring); - } - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(child), _T("language")) == 0 && xi.getText(child)) - { - char* szstring = mir_t2a(xi.getText(child)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - if (UtfEncode) - { - TCHAR* tszstring = mir_utf8decodeT(szstring); - DBWriteContactSettingTString(hContact, MODULE, "Language1", tszstring); - mir_free(tszstring); - } - else - { - TCHAR* tszstring = mir_a2t(szstring); - DBWriteContactSettingTString(hContact, MODULE, "Language1", tszstring); - mir_free(tszstring); - } - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(child), _T("managingEditor")) == 0 && xi.getText(child)) - { - char* szstring = mir_t2a(xi.getText(child)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - if (UtfEncode) - { - TCHAR* tszstring = mir_utf8decodeT(szstring); - DBWriteContactSettingTString(hContact, MODULE, "e-mail", tszstring); - mir_free(tszstring); - } - else - { - TCHAR* tszstring = mir_a2t(szstring); - DBWriteContactSettingTString(hContact, MODULE, "e-mail", tszstring); - mir_free(tszstring); - } - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(child), _T("category")) == 0 && xi.getText(child)) - { - char* szstring = mir_t2a(xi.getText(child)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - if (UtfEncode) - { - TCHAR* tszstring = mir_utf8decodeT(szstring); - DBWriteContactSettingTString(hContact, MODULE, "Interest0Text", tszstring); - mir_free(tszstring); - } - else - { - TCHAR* tszstring = mir_a2t(szstring); - DBWriteContactSettingTString(hContact, MODULE, "Interest0Text", tszstring); - mir_free(tszstring); - } - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(child), _T("image")) == 0) - { - for (int x = 0; x < xi.getChildCount(child); x++) - { - HXML imageval = xi.getChild(child, x); - if (lstrcmpi(xi.getName(imageval), _T("url")) == 0) - { - LPCTSTR url = xi.getText(imageval); - DBWriteContactSettingTString(hContact, MODULE, "ImageURL", url); - - PROTO_AVATAR_INFORMATIONT pai = {NULL}; - pai.cbSize = sizeof(pai); - pai.hContact = hContact; - DBVARIANT dbVar = {0}; - - if (!DBGetContactSettingTString(hContact, MODULE, "Nick", &dbVar)) - { - TCHAR *ext = _tcsrchr((TCHAR*)url, _T('.')) + 1; - pai.format = GetImageFormat(ext); - - TCHAR *filename = dbVar.ptszVal; - mir_sntprintf(pai.filename, SIZEOF(pai.filename), _T("%s\\%s.%s"), tszRoot, filename, ext); - if (DownloadFile(url, pai.filename)) - { - DBWriteContactSettingTString(hContact, MODULE, "ImagePath", pai.filename); - ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE) &pai, NULL); - } - else - ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE) &pai, NULL); - DBFreeVariant(&dbVar); - break; - } - } - else - { - DBDeleteContactSetting(hContact, MODULE, "ImageURL"); - DBDeleteContactSetting(hContact, MODULE, "ImagePath"); - } - } - } - if (lstrcmpi(xi.getName(child), _T("lastBuildDate")) == 0 && xi.getText(child)) - { - TCHAR *lastupdtime = (TCHAR*)xi.getText(child); - time_t stamp = DateToUnixTime(lastupdtime, 0); - double deltaupd = difftime(time(NULL), stamp); - double deltacheck = difftime(time(NULL), DBGetContactSettingDword(hContact, MODULE, "LastCheck", 0)); - if (deltaupd - deltacheck >= 0) - { - DBWriteContactSettingDword(hContact, MODULE, "LastCheck", time(NULL)); - xi.destroyNode(hXml); - return; - } - continue; - } - if (lstrcmpi(xi.getName(child), _T("item")) == 0) - { - TCHAR *title = NULL, *link = NULL, *datetime = NULL, *descr = NULL, *author = NULL, *comments = NULL, *guid = NULL, *category = NULL; - for (int z = 0; z < xi.getChildCount(child); z++) - { - HXML itemval = xi.getChild(child, z); - if (lstrcmpi(xi.getName(itemval), _T("title")) == 0) - { - title = (TCHAR*)xi.getText(itemval); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("link")) == 0) - { - link = (TCHAR*)xi.getText(itemval); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("pubDate")) == 0) - { - datetime = (TCHAR*)xi.getText(itemval); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("dc:date")) == 0) - { - datetime = (TCHAR*)xi.getText(itemval); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("description")) == 0) - { - descr = (TCHAR*)xi.getText(itemval); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("author")) == 0) - { - author = (TCHAR*)xi.getText(itemval); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("comments")) == 0) - { - comments = (TCHAR*)xi.getText(itemval); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("guid")) == 0) - { - guid = (TCHAR*)xi.getText(itemval); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("category")) == 0) - { - category = (TCHAR*)xi.getText(itemval); - continue; - } - } - TCHAR* message; - DBVARIANT dbMsg = {0}; - if (DBGetContactSettingTString(hContact, MODULE, "MsgFormat", &dbMsg)) - message = _T(TAGSDEFAULT); - else - { - message = (TCHAR*)mir_alloc(_tcslen(dbMsg.ptszVal)*sizeof(TCHAR)); - memcpy(message, dbMsg.ptszVal, _tcslen(dbMsg.ptszVal)*sizeof(TCHAR)); - message[_tcslen(dbMsg.ptszVal)] = 0; - DBFreeVariant(&dbMsg); - } - if (lstrcmp(title, NULL) == 0) - message = StrReplace(_T("#<title>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<title>#"), title, message); - if (lstrcmp(link, NULL) == 0) - message = StrReplace(_T("#<link>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<link>#"), link, message); - if (lstrcmp(descr, NULL) == 0) - message = StrReplace(_T("#<description>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<description>#"), descr, message); - if (lstrcmp(author, NULL) == 0) - message = StrReplace(_T("#<author>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<author>#"), author, message); - if (lstrcmp(comments, NULL) == 0) - message = StrReplace(_T("#<comments>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<comments>#"), comments, message); - if (lstrcmp(guid, NULL) == 0) - message = StrReplace(_T("#<guid>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<guid>#"), guid, message); - if (lstrcmp(category, NULL) == 0) - message = StrReplace(_T("#<category>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<category>#"), category, message); - - message = StrReplace(_T("<br>"), _T("\n"), message); - message = StrReplace(_T("<br/>"), _T("\n"), message); - message = StrReplace(_T("<br />"), _T("\n"), message); - - char* pszUtf; - if (!UtfEncode) - pszUtf = mir_utf8encodeT(message); - else - pszUtf = mir_t2a(message); - decode_html_entities_utf8(pszUtf, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(pszUtf); - strcpy(pszUtf, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - xRegEx = "^\\s+"; - xStr = pszUtf; - strcpy(pszUtf, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - - time_t stamp; - if (lstrcmpi(datetime, NULL) ==0) - stamp = time(NULL); - else - stamp = DateToUnixTime(datetime, 0); - - DBEVENTINFO olddbei = { 0 }; - HANDLE hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0); - BOOL MesExist = FALSE; - while(hDbEvent) - { - ZeroMemory(&olddbei, sizeof(olddbei)); - olddbei.cbSize = sizeof(olddbei); - olddbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0); - olddbei.pBlob = (PBYTE)mir_alloc(olddbei.cbBlob); - CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&olddbei); - if (olddbei.cbBlob == lstrlenA(pszUtf) + 1 && lstrcmpA((char*)olddbei.pBlob, pszUtf) == 0) - MesExist = TRUE; - hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0); - mir_free(olddbei.pBlob); - } - - if (!MesExist) - { - DBEVENTINFO dbei = {0}; - dbei.cbSize = sizeof(dbei); - dbei.eventType = EVENTTYPE_MESSAGE; - dbei.flags = DBEF_UTF; - dbei.szModule = MODULE; - dbei.timestamp = stamp; - dbei.cbBlob = lstrlenA(pszUtf) + 1; - dbei.pBlob = (PBYTE)pszUtf; - CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&dbei); - } - mir_free(pszUtf); - mir_free(message); - } - } - } - else if (lstrcmpi(xi.getName(node), _T("feed")) == 0) - { - DBWriteContactSettingTString(hContact, MODULE, "MirVer", _T("Atom 3")); - for (int j = 0; j < xi.getChildCount(node); j++) - { - HXML child = xi.getChild(node, j); - if (lstrcmpi(xi.getName(child), _T("title")) == 0 && xi.getText(child)) - { - char* szstring = mir_t2a(xi.getText(child)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - if (UtfEncode) - { - TCHAR* tszstring = mir_utf8decodeT(szstring); - DBWriteContactSettingTString(hContact, MODULE, "FirstName", tszstring); - mir_free(tszstring); - } - else - { - TCHAR* tszstring = mir_a2t(szstring); - DBWriteContactSettingTString(hContact, MODULE, "FirstName", tszstring); - mir_free(tszstring); - } - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(child), _T("link")) == 0) - { - for (int x = 0; x < xi.getAttrCount(child); x++) - { - if (lstrcmpi(xi.getAttrName(child, x), _T("rel")) == 0) - { - if (lstrcmpi(xi.getAttrValue(child, xi.getAttrName(child, x)), _T("self")) == 0) - break; - } - if (lstrcmpi(xi.getAttrName(child, x), _T("href")) == 0) - { - DBWriteContactSettingTString(hContact, MODULE, "Homepage", xi.getAttrValue(child, xi.getAttrName(child, x))); - } - } - continue; - } - if (lstrcmpi(xi.getName(child), _T("subtitle")) == 0 && xi.getText(child)) - { - char* szstring = mir_t2a(xi.getText(child)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - if (UtfEncode) - { - TCHAR* tszstring = mir_utf8decodeT(szstring); - DBWriteContactSettingTString(hContact, MODULE, "About", tszstring); - DBWriteContactSettingTString(hContact, "CList", "StatusMsg", tszstring); - mir_free(tszstring); - } - else - { - TCHAR* tszstring = mir_a2t(szstring); - DBWriteContactSettingTString(hContact, MODULE, "About", tszstring); - DBWriteContactSettingTString(hContact, "CList", "StatusMsg", tszstring); - mir_free(tszstring); - } - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(child), _T("language")) == 0 && xi.getText(child)) - { - char* szstring = mir_t2a(xi.getText(child)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - if (UtfEncode) - { - TCHAR* tszstring = mir_utf8decodeT(szstring); - DBWriteContactSettingTString(hContact, MODULE, "Language1", tszstring); - mir_free(tszstring); - } - else - { - TCHAR* tszstring = mir_a2t(szstring); - DBWriteContactSettingTString(hContact, MODULE, "Language1", tszstring); - mir_free(tszstring); - } - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(child), _T("author")) == 0) - { - for (int x = 0; x < xi.getChildCount(child); x++) - { - HXML authorval = xi.getChild(child, x); - if (lstrcmpi(xi.getName(authorval), _T("name")) == 0) - { - DBWriteContactSettingTString(hContact, MODULE, "e-mail", xi.getText(authorval)); - break; - } - } - continue; - } - if (lstrcmpi(xi.getName(child), _T("category")) == 0 && xi.getText(child)) - { - char* szstring = mir_t2a(xi.getText(child)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - if (UtfEncode) - { - TCHAR* tszstring = mir_utf8decodeT(szstring); - DBWriteContactSettingTString(hContact, MODULE, "Interest0Text", tszstring); - mir_free(tszstring); - } - else - { - TCHAR* tszstring = mir_a2t(szstring); - DBWriteContactSettingTString(hContact, MODULE, "Interest0Text", tszstring); - mir_free(tszstring); - } - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(child), _T("icon")) == 0) - { - for (int x = 0; x < xi.getChildCount(child); x++) - { - HXML imageval = xi.getChild(child, x); - if (lstrcmpi(xi.getName(imageval), _T("url")) == 0) - { - LPCTSTR url = xi.getText(imageval); - DBWriteContactSettingTString(hContact, MODULE, "ImageURL", url); - - PROTO_AVATAR_INFORMATIONT pai = {NULL}; - pai.cbSize = sizeof(pai); - pai.hContact = hContact; - DBVARIANT dbVar = {0}; - - if (!DBGetContactSettingTString(hContact, MODULE, "Nick", &dbVar)) - { - TCHAR *ext = _tcsrchr((TCHAR*)url, _T('.')) + 1; - pai.format = GetImageFormat(ext); - - TCHAR *filename = dbVar.ptszVal; - mir_sntprintf(pai.filename, SIZEOF(pai.filename), _T("%s\\%s.%s"), tszRoot, filename, ext); - if (DownloadFile(url, pai.filename)) - { - DBWriteContactSettingTString(hContact, MODULE, "ImagePath", pai.filename); - ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE) &pai, NULL); - } - else - ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE) &pai, NULL); - DBFreeVariant(&dbVar); - break; - } - } - else - { - DBDeleteContactSetting(hContact, MODULE, "ImageURL"); - DBDeleteContactSetting(hContact, MODULE, "ImagePath"); - } - } - } - if (lstrcmpi(xi.getName(child), _T("updated")) == 0 && xi.getText(child)) - { - TCHAR *lastupdtime = (TCHAR*)xi.getText(child); - time_t stamp = DateToUnixTime(lastupdtime, 1); - double deltaupd = difftime(time(NULL), stamp); - double deltacheck = difftime(time(NULL), DBGetContactSettingDword(hContact, MODULE, "LastCheck", 0)); - if (deltaupd - deltacheck >= 0) - { - DBWriteContactSettingDword(hContact, MODULE, "LastCheck", time(NULL)); - xi.destroyNode(hXml); - return; - } - continue; - } - if (lstrcmpi(xi.getName(child), _T("entry")) == 0) - { - TCHAR *title = NULL, *link = NULL, *datetime = NULL, *descr = NULL, *author = NULL, *comments = NULL, *guid = NULL, *category = NULL; - for (int z = 0; z < xi.getChildCount(child); z++) - { - HXML itemval = xi.getChild(child, z); - if (lstrcmpi(xi.getName(itemval), _T("title")) == 0 && xi.getText(itemval)) - { - char* szstring = mir_t2a(xi.getText(itemval)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - title = mir_a2t(szstring); - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("link")) == 0) - { - for (int x = 0; x < xi.getAttrCount(itemval); x++) - { - if (lstrcmpi(xi.getAttrName(itemval, x), _T("href")) == 0) - { - link = (TCHAR*)xi.getAttrValue(itemval, xi.getAttrName(itemval, x)); - break; - } - } - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("updated")) == 0) - { - datetime = (TCHAR*)xi.getText(itemval); - continue; - } - if ((lstrcmpi(xi.getName(itemval), _T("summary")) == 0 || lstrcmpi(xi.getName(itemval), _T("content")) == 0) && xi.getText(itemval)) - { - char* szstring = mir_t2a(xi.getText(itemval)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - descr = mir_a2t(szstring); - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("author")) == 0) - { - for (int x = 0; x < xi.getChildCount(itemval); x++) - { - HXML authorval = xi.getChild(itemval, x); - if (lstrcmpi(xi.getName(authorval), _T("name")) == 0 && xi.getText(authorval)) - { - char* szstring = mir_t2a(xi.getText(authorval)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - author = mir_a2t(szstring); - mir_free(szstring); - break; - } - } - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("comments")) == 0 && xi.getText(itemval)) - { - char* szstring = mir_t2a(xi.getText(itemval)); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - comments = mir_a2t(szstring); - mir_free(szstring); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("id")) == 0) - { - guid = (TCHAR*)xi.getText(itemval); - continue; - } - if (lstrcmpi(xi.getName(itemval), _T("category")) == 0) - { - for (int x = 0; x < xi.getAttrCount(itemval); x++) - { - if (lstrcmpi(xi.getAttrName(itemval, x), _T("term")) == 0 && xi.getText(itemval)) - { - char* szstring = mir_t2a(xi.getAttrValue(itemval, xi.getAttrName(itemval, x))); - decode_html_entities_utf8(szstring, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(szstring); - strcpy(szstring, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - category = mir_a2t(szstring); - mir_free(szstring); - break; - } - } - continue; - } - } - TCHAR* message; - DBVARIANT dbMsg = {0}; - if (DBGetContactSettingTString(hContact, MODULE, "MsgFormat", &dbMsg)) - message = _T(TAGSDEFAULT); - else - { - message = (TCHAR*)mir_alloc(_tcslen(dbMsg.ptszVal)*sizeof(TCHAR)); - memcpy(message, dbMsg.ptszVal, _tcslen(dbMsg.ptszVal)*sizeof(TCHAR)); - message[_tcslen(dbMsg.ptszVal)] = 0; - DBFreeVariant(&dbMsg); - } - if (lstrcmp(title, NULL) == 0) - message = StrReplace(_T("#<title>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<title>#"), title, message); - if (lstrcmp(link, NULL) == 0) - message = StrReplace(_T("#<link>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<link>#"), link, message); - if (lstrcmp(descr, NULL) == 0) - message = StrReplace(_T("#<description>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<description>#"), descr, message); - if (lstrcmp(author, NULL) == 0) - message = StrReplace(_T("#<author>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<author>#"), author, message); - if (lstrcmp(comments, NULL) == 0) - message = StrReplace(_T("#<comments>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<comments>#"), comments, message); - if (lstrcmp(guid, NULL) == 0) - message = StrReplace(_T("#<guid>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<guid>#"), guid, message); - if (lstrcmp(category, NULL) == 0) - message = StrReplace(_T("#<category>#"), TranslateT("empty"), message); - else - message = StrReplace(_T("#<category>#"), category, message); - - message = StrReplace(_T("<br>"), _T("\n"), message); - message = StrReplace(_T("<br/>"), _T("\n"), message); - message = StrReplace(_T("<br />"), _T("\n"), message); - - char* pszUtf; - if (!UtfEncode) - pszUtf = mir_utf8encodeT(message); - else - pszUtf = mir_t2a(message); - decode_html_entities_utf8(pszUtf, 0); - boost::regex xRegEx("<(.|\n)*?>"); - std::string xStr(pszUtf); - strcpy(pszUtf, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - xRegEx = "^\\s+"; - xStr = pszUtf; - strcpy(pszUtf, boost::regex_replace(xStr, xRegEx, "", boost::match_default | boost::format_perl).c_str()); - - time_t stamp; - if (lstrcmpi(datetime, NULL) ==0) - stamp = time(NULL); - else - stamp = DateToUnixTime(datetime, 1); - - DBEVENTINFO olddbei = { 0 }; - HANDLE hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0); - BOOL MesExist = FALSE; - while(hDbEvent) - { - ZeroMemory(&olddbei, sizeof(olddbei)); - olddbei.cbSize = sizeof(olddbei); - olddbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0); - olddbei.pBlob = (PBYTE)malloc(olddbei.cbBlob); - CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&olddbei); - if (olddbei.cbBlob == lstrlenA(pszUtf) + 1 && lstrcmpA((char*)olddbei.pBlob, pszUtf) == 0) - MesExist = TRUE; - hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hDbEvent, 0); - } - - if (!MesExist) - { - DBEVENTINFO dbei = {0}; - dbei.cbSize = sizeof(dbei); - dbei.eventType = EVENTTYPE_MESSAGE; - dbei.flags = DBEF_UTF; - dbei.szModule = MODULE; - dbei.timestamp = stamp; - dbei.cbBlob = lstrlenA(pszUtf) + 1; - dbei.pBlob = (PBYTE)pszUtf; - CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&dbei); - } - mir_free(pszUtf); - } - } - } - childcount +=1; - node = xi.getChild(hXml, childcount); - } - xi.destroyNode(hXml); - } - } - DBWriteContactSettingDword(hContact, MODULE, "LastCheck", time(NULL)); - } -} \ No newline at end of file diff --git a/plugins/NewsAggregstor/ToDo.txt b/plugins/NewsAggregstor/ToDo.txt deleted file mode 100644 index fa08c1a5f3..0000000000 --- a/plugins/NewsAggregstor/ToDo.txt +++ /dev/null @@ -1,11 +0,0 @@ - xml -\ - - - html' - -xml parse -contacts export\import -autoimport from file service -authorization -replace all html to text \ No newline at end of file diff --git a/plugins/NewsAggregstor/Version.h b/plugins/NewsAggregstor/Version.h deleted file mode 100644 index fe5d837fe3..0000000000 --- a/plugins/NewsAggregstor/Version.h +++ /dev/null @@ -1,28 +0,0 @@ -#define __MAJOR_VERSION 0 -#define __MINOR_VERSION 0 -#define __RELEASE_NUM 0 -#define __BUILD_NUM 1 - -#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM -#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM - -#define __STRINGIFY_IMPL(x) #x -#define __STRINGIFY(x) __STRINGIFY_IMPL(x) -#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS) - -#ifdef _UNICODE -#if defined(WIN64) || defined(_WIN64) - #define __PLUGIN_NAME "NewsAggregator (Unicode x64)" -#else - #define __PLUGIN_NAME "NewsAggregator (Unicode)" -#endif -#else - #define __PLUGIN_NAME "NewsAggregator" -#endif -#define __INTERNAL_NAME "NewsAggregator" -#define __FILENAME "NewsAggregator.dll" -#define __DESCRIPTION "RSS/Atom news aggregator." -#define __AUTHOR "Mataes, FREAK_THEMIGHTY" -#define __AUTHOREMAIL "mataes2007@gmail.com" -#define __AUTHORWEB "http://mataes.googlecode.com/svn/Miranda/Plugins/NewsAggregator/" -#define __COPYRIGHT " 2012 Mataes, FREAK_THEMIGHTY" diff --git a/plugins/NewsAggregstor/Version.rc b/plugins/NewsAggregstor/Version.rc deleted file mode 100644 index e637f0cb33..0000000000 --- a/plugins/NewsAggregstor/Version.rc +++ /dev/null @@ -1,38 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "afxres.h" -#include "version.h" - -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#endif //_WIN32 - -VS_VERSION_INFO VERSIONINFO - FILEVERSION __FILEVERSION_STRING - PRODUCTVERSION __FILEVERSION_STRING - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x0L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "FileDescription", __DESCRIPTION - VALUE "InternalName", __PLUGIN_NAME - VALUE "LegalCopyright", __COPYRIGHT - VALUE "OriginalFilename", __FILENAME - VALUE "ProductName", __PLUGIN_NAME - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END diff --git a/plugins/NewsAggregstor/resource.h b/plugins/NewsAggregstor/resource.h deleted file mode 100644 index f243b95585..0000000000 --- a/plugins/NewsAggregstor/resource.h +++ /dev/null @@ -1,39 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Resource.rc -// -#define IDD_OPTIONS 101 -#define IDI_ICON 109 -#define IDD_ADDFEED 110 -#define IDI_CHECKALL 111 -#define IDI_ADDFEED 112 -#define IDI_IMPORTFEEDS 113 -#define IDI_EXPORTFEEDS 114 -#define IDC_TIMEOUT_VALUE_SPIN 1035 -#define IDC_FEEDLIST 1036 -#define IDC_ADD 1037 -#define IDC_CHANGE 1038 -#define IDC_REMOVE 1039 -#define IDC_IMORT 1040 -#define IDC_EXORT 1041 -#define IDC_FEEDTITLE 1042 -#define IDC_FEEDURL 1043 -#define IDC_CHECKTIME 1044 -#define IDC_DISCOVERY 1045 -#define IDC_USEAUTH 1046 -#define IDC_LOGIN 1047 -#define IDC_PASSWORD 1048 -#define IDC_TAGSEDIT 1049 -#define IDC_RESET 1050 -#define IDC_TAGHELP 1051 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 111 -#define _APS_NEXT_COMMAND_VALUE 40075 -#define _APS_NEXT_CONTROL_VALUE 1052 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif -- cgit v1.2.3