From ef518e70b8f3380982cf29e9b9fb333d2f2b68fe Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 26 Jul 2015 07:01:30 +0000 Subject: NewsAggregator: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14707 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewsAggregator/NewsAggregator.vcxproj | 28 +++ .../NewsAggregator/NewsAggregator.vcxproj.filters | 4 + plugins/NewsAggregator/NewsAggregator_10.vcxproj | 206 ------------------- .../NewsAggregator_10.vcxproj.filters | 71 ------- plugins/NewsAggregator/NewsAggregator_12.vcxproj | 218 --------------------- .../NewsAggregator_12.vcxproj.filters | 97 --------- plugins/NewsAggregator/NewsAggregator_14.vcxproj | 218 --------------------- .../NewsAggregator_14.vcxproj.filters | 97 --------- plugins/NewsAggregator/Src/Authentication.cpp | 2 +- plugins/NewsAggregator/Src/CheckFeed.cpp | 2 +- plugins/NewsAggregator/Src/Common.h | 174 ---------------- plugins/NewsAggregator/Src/ExportImport.cpp | 2 +- plugins/NewsAggregator/Src/Icons.cpp | 2 +- plugins/NewsAggregator/Src/Menus.cpp | 2 +- plugins/NewsAggregator/Src/NewsAggregator.cpp | 2 +- plugins/NewsAggregator/Src/Options.cpp | 2 +- plugins/NewsAggregator/Src/Services.cpp | 2 +- plugins/NewsAggregator/Src/Stdafx.cpp | 18 -- plugins/NewsAggregator/Src/Update.cpp | 2 +- plugins/NewsAggregator/Src/Utils.cpp | 2 +- plugins/NewsAggregator/Src/stdafx.cxx | 18 ++ plugins/NewsAggregator/Src/stdafx.h | 174 ++++++++++++++++ 22 files changed, 234 insertions(+), 1109 deletions(-) create mode 100644 plugins/NewsAggregator/NewsAggregator.vcxproj create mode 100644 plugins/NewsAggregator/NewsAggregator.vcxproj.filters delete mode 100644 plugins/NewsAggregator/NewsAggregator_10.vcxproj delete mode 100644 plugins/NewsAggregator/NewsAggregator_10.vcxproj.filters delete mode 100644 plugins/NewsAggregator/NewsAggregator_12.vcxproj delete mode 100644 plugins/NewsAggregator/NewsAggregator_12.vcxproj.filters delete mode 100644 plugins/NewsAggregator/NewsAggregator_14.vcxproj delete mode 100644 plugins/NewsAggregator/NewsAggregator_14.vcxproj.filters delete mode 100644 plugins/NewsAggregator/Src/Common.h delete mode 100644 plugins/NewsAggregator/Src/Stdafx.cpp create mode 100644 plugins/NewsAggregator/Src/stdafx.cxx create mode 100644 plugins/NewsAggregator/Src/stdafx.h (limited to 'plugins/NewsAggregator') diff --git a/plugins/NewsAggregator/NewsAggregator.vcxproj b/plugins/NewsAggregator/NewsAggregator.vcxproj new file mode 100644 index 0000000000..06d60e347d --- /dev/null +++ b/plugins/NewsAggregator/NewsAggregator.vcxproj @@ -0,0 +1,28 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + NewsAggregator + {6DE11A47-2268-4B08-8DE5-15A1705FCE28} + + + + + \ No newline at end of file diff --git a/plugins/NewsAggregator/NewsAggregator.vcxproj.filters b/plugins/NewsAggregator/NewsAggregator.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/plugins/NewsAggregator/NewsAggregator.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/NewsAggregator/NewsAggregator_10.vcxproj b/plugins/NewsAggregator/NewsAggregator_10.vcxproj deleted file mode 100644 index 156ceb2326..0000000000 --- a/plugins/NewsAggregator/NewsAggregator_10.vcxproj +++ /dev/null @@ -1,206 +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 - - - - Disabled - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level3 - EditAndContinue - 4996 - Use - Common.h - false - - - true - Windows - false - $(IntDir)$(TargetName).lib - comdlg32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin10\lib - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Disabled - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level3 - 4996 - Use - Common.h - false - - - comdlg32.lib;%(AdditionalDependencies) - true - Windows - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Level3 - 4996 - Use - Common.h - false - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - comdlg32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Level3 - 4996 - Use - Common.h - false - - - comdlg32.lib;%(AdditionalDependencies) - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - \ No newline at end of file diff --git a/plugins/NewsAggregator/NewsAggregator_10.vcxproj.filters b/plugins/NewsAggregator/NewsAggregator_10.vcxproj.filters deleted file mode 100644 index aa60bf2dba..0000000000 --- a/plugins/NewsAggregator/NewsAggregator_10.vcxproj.filters +++ /dev/null @@ -1,71 +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 - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/plugins/NewsAggregator/NewsAggregator_12.vcxproj b/plugins/NewsAggregator/NewsAggregator_12.vcxproj deleted file mode 100644 index 751d0f6642..0000000000 --- a/plugins/NewsAggregator/NewsAggregator_12.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - NewsAggregator - {6DE11A47-2268-4B08-8DE5-15A1705FCE28} - - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - - - - - - - - - - - - - - - - - <_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 - - - - Disabled - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level4 - EditAndContinue - 4996 - Use - Common.h - false - - - true - Windows - false - $(IntDir)$(TargetName).lib - comdlg32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin12\lib - false - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Disabled - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level4 - 4996 - Use - Common.h - false - - - comdlg32.lib;%(AdditionalDependencies) - true - Windows - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Level4 - 4996 - Use - Common.h - false - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - comdlg32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin12\lib - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Level4 - 4996 - Use - Common.h - false - - - comdlg32.lib;%(AdditionalDependencies) - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - $(ProfileDir)..\..\bin12\lib - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/NewsAggregator/NewsAggregator_12.vcxproj.filters b/plugins/NewsAggregator/NewsAggregator_12.vcxproj.filters deleted file mode 100644 index d207133ec7..0000000000 --- a/plugins/NewsAggregator/NewsAggregator_12.vcxproj.filters +++ /dev/null @@ -1,97 +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 - - - {8d39e269-e9a1-4af1-b278-6d65d1afe13b} - - - - - 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 - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - \ No newline at end of file diff --git a/plugins/NewsAggregator/NewsAggregator_14.vcxproj b/plugins/NewsAggregator/NewsAggregator_14.vcxproj deleted file mode 100644 index 660fa974a4..0000000000 --- a/plugins/NewsAggregator/NewsAggregator_14.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - NewsAggregator - {6DE11A47-2268-4B08-8DE5-15A1705FCE28} - - - - DynamicLibrary - Unicode - true - v140_xp - - - DynamicLibrary - Unicode - true - v140_xp - - - DynamicLibrary - Unicode - v140_xp - - - DynamicLibrary - Unicode - v140_xp - - - - - - - - - - - - - - - - - - - <_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 - - - - Disabled - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level4 - EditAndContinue - 4996 - Use - Common.h - false - - - true - Windows - false - $(IntDir)$(TargetName).lib - comdlg32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin14\lib - false - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Disabled - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - Level4 - 4996 - Use - Common.h - false - - - comdlg32.lib;%(AdditionalDependencies) - true - Windows - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin14\lib - - - ..\..\include\msapi - _DEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Level4 - 4996 - Use - Common.h - false - - - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - comdlg32.lib;%(AdditionalDependencies) - $(ProfileDir)..\..\bin14\lib - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - Full - Size - ..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - Level4 - 4996 - Use - Common.h - false - - - comdlg32.lib;%(AdditionalDependencies) - Windows - true - true - false - $(IntDir)$(TargetName).lib - true - $(ProfileDir)..\..\bin14\lib - - - ..\..\include\msapi - NDEBUG;%(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/NewsAggregator/NewsAggregator_14.vcxproj.filters b/plugins/NewsAggregator/NewsAggregator_14.vcxproj.filters deleted file mode 100644 index d207133ec7..0000000000 --- a/plugins/NewsAggregator/NewsAggregator_14.vcxproj.filters +++ /dev/null @@ -1,97 +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 - - - {8d39e269-e9a1-4af1-b278-6d65d1afe13b} - - - - - 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 - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - Resource Files\Icons - - - \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Authentication.cpp b/plugins/NewsAggregator/Src/Authentication.cpp index 5824d075a0..c2f23cc1f1 100644 --- a/plugins/NewsAggregator/Src/Authentication.cpp +++ b/plugins/NewsAggregator/Src/Authentication.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg) { diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index 6b19b6eb23..cf96ded215 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg) { diff --git a/plugins/NewsAggregator/Src/Common.h b/plugins/NewsAggregator/Src/Common.h deleted file mode 100644 index 6e84892346..0000000000 --- a/plugins/NewsAggregator/Src/Common.h +++ /dev/null @@ -1,174 +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. -*/ - -// Windows Header Files: -#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 "version.h" -#include "resource.h" - -#define MODULE "NewsAggregator" -#define TAGSDEFAULT _T("##\r\n#<link>#\r\n#<description>#") -#define DEFAULT_AVATARS_FOLDER "NewsAggregator" -#define DEFAULT_UPDATE_TIME 60 - -extern HINSTANCE hInst; -extern HWND hAddFeedDlg; -extern MWindowList hChangeFeedDlgList; -extern HANDLE hNetlibUser; -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; - MCONTACT hContact; - int SelNumber; - TCHAR nick[MAX_PATH]; - TCHAR url[MAX_PATH]; -}; - -//============ STRUCT USED TO MAKE AN UPDATE LIST ============ - -struct NEWSCONTACTLIST { - MCONTACT hContact; - struct NEWSCONTACTLIST *next; -}; - -typedef struct NEWSCONTACTLIST UPDATELIST; - -extern UPDATELIST *UpdateListHead; -extern UPDATELIST *UpdateListTail; - -void UpdateListAdd(MCONTACT hContact); -void UpdateThreadProc(LPVOID AvatarCheck); -void DestroyUpdateList(void); - -extern HANDLE hUpdateMutex; -extern HGENMENU hService2[7]; - -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 NewsAggrRecvMessage(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 EnableDisable(WPARAM wParam, LPARAM lParam); -int OnToolbarLoaded(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(MCONTACT hContact); -void GetNewsData(TCHAR *szUrl, char **szData, MCONTACT hContact, HWND hwndDlg); -void CreateList(HWND hwndList); -void UpdateList(HWND hwndList); -void DeleteAllItems(HWND hwndList); -time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType); -void CheckCurrentFeed(MCONTACT hContact); -void CheckCurrentFeedAvatar(MCONTACT hContact); -LPCTSTR CheckFeed(TCHAR* tszURL, HWND hwndDlg); -void UpdateMenu(bool State); -int ImportFeedsDialog(); -LPCTSTR ClearText(CMString &value, const TCHAR *message); -bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal); -void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg); -INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -MCONTACT GetContactByNick(const TCHAR *nick); -MCONTACT GetContactByURL(const TCHAR *url); - -// =============== NewsAggregator SERVICES ================ -// Check all Feeds info -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGREGATOR_CHECKALLFEEDS "NewsAggregator/CheckAllFeeds" - -// Add new Feed channel -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGREGATOR_ADDFEED "NewsAggregator/AddNewsFeed" - -// Change Feed channel -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGREGATOR_CHANGEFEED "NewsAggregator/ChangeNewsFeed" - -// Import Feed channels from file -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGREGATOR_IMPORTFEEDS "NewsAggregator/ImportFeeds" - -// Export Feed channels to file -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGREGATOR_EXPORTFEEDS "NewsAggregator/ExportFeeds" - -// Check Feed info -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGREGATOR_CHECKFEED "NewsAggregator/CheckFeed" - -// Enable/disable getting feed info -// WPARAM = LPARAM = NULL -#define MS_NEWSAGGREGATOR_ENABLED "NewsAggregator/Enabled" \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp index d62d9b6f39..006e21a99a 100644 --- a/plugins/NewsAggregator/Src/ExportImport.cpp +++ b/plugins/NewsAggregator/Src/ExportImport.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { diff --git a/plugins/NewsAggregator/Src/Icons.cpp b/plugins/NewsAggregator/Src/Icons.cpp index 05828449ff..9a25f711c1 100644 --- a/plugins/NewsAggregator/Src/Icons.cpp +++ b/plugins/NewsAggregator/Src/Icons.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" static IconItem iconList[] = { diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp index 8fcd74890f..4685c32e83 100644 --- a/plugins/NewsAggregator/Src/Menus.cpp +++ b/plugins/NewsAggregator/Src/Menus.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" HGENMENU hService2[7]; diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp index 279a69ea5a..ecfd2009ec 100644 --- a/plugins/NewsAggregator/Src/NewsAggregator.cpp +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "Common.h" +#include "stdafx.h" HINSTANCE hInst = NULL; diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index 4c2bcd6995..ad0f4eaa46 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index fe66190baa..9ca89eabab 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" int g_nStatus = ID_STATUS_ONLINE; UINT_PTR timerId = 0; diff --git a/plugins/NewsAggregator/Src/Stdafx.cpp b/plugins/NewsAggregator/Src/Stdafx.cpp deleted file mode 100644 index c5fe5abaad..0000000000 --- a/plugins/NewsAggregator/Src/Stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "common.h" \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp index 56ff1a1f39..196d47df2a 100644 --- a/plugins/NewsAggregator/Src/Update.cpp +++ b/plugins/NewsAggregator/Src/Update.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" // check if Feed is currently updating bool ThreadRunning; diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 01cf2ae15d..45d7891281 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "common.h" +#include "stdafx.h" HANDLE hNetlibUser = NULL, hNetlibHttp; bool UpdateListFlag = FALSE; diff --git a/plugins/NewsAggregator/Src/stdafx.cxx b/plugins/NewsAggregator/Src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/NewsAggregator/Src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "stdafx.h" \ No newline at end of file diff --git a/plugins/NewsAggregator/Src/stdafx.h b/plugins/NewsAggregator/Src/stdafx.h new file mode 100644 index 0000000000..6e84892346 --- /dev/null +++ b/plugins/NewsAggregator/Src/stdafx.h @@ -0,0 +1,174 @@ +/* +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. +*/ + +// Windows Header Files: +#include <windows.h> +#include <commctrl.h> +#include <time.h> +#include <malloc.h> +#include <fcntl.h> +#include <io.h> +#include <sys\stat.h> +#include <mshtml.h> + +// Miranda header files +#include <newpluginapi.h> +#include <m_clist.h> +#include <m_langpack.h> +#include <m_options.h> +#include <m_protosvc.h> +#include <m_database.h> +#include <m_netlib.h> +#include <m_icolib.h> +#include <m_message.h> +#include <win2k.h> +#include <m_xml.h> +#include <m_avatars.h> +#include <m_hotkeys.h> + +#include <m_folders.h> +#include <m_toptoolbar.h> +#include <m_string.h> + +#include "version.h" +#include "resource.h" + +#define MODULE "NewsAggregator" +#define TAGSDEFAULT _T("#<title>#\r\n#<link>#\r\n#<description>#") +#define DEFAULT_AVATARS_FOLDER "NewsAggregator" +#define DEFAULT_UPDATE_TIME 60 + +extern HINSTANCE hInst; +extern HWND hAddFeedDlg; +extern MWindowList hChangeFeedDlgList; +extern HANDLE hNetlibUser; +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; + MCONTACT hContact; + int SelNumber; + TCHAR nick[MAX_PATH]; + TCHAR url[MAX_PATH]; +}; + +//============ STRUCT USED TO MAKE AN UPDATE LIST ============ + +struct NEWSCONTACTLIST { + MCONTACT hContact; + struct NEWSCONTACTLIST *next; +}; + +typedef struct NEWSCONTACTLIST UPDATELIST; + +extern UPDATELIST *UpdateListHead; +extern UPDATELIST *UpdateListTail; + +void UpdateListAdd(MCONTACT hContact); +void UpdateThreadProc(LPVOID AvatarCheck); +void DestroyUpdateList(void); + +extern HANDLE hUpdateMutex; +extern HGENMENU hService2[7]; + +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 NewsAggrRecvMessage(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 EnableDisable(WPARAM wParam, LPARAM lParam); +int OnToolbarLoaded(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(MCONTACT hContact); +void GetNewsData(TCHAR *szUrl, char **szData, MCONTACT hContact, HWND hwndDlg); +void CreateList(HWND hwndList); +void UpdateList(HWND hwndList); +void DeleteAllItems(HWND hwndList); +time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType); +void CheckCurrentFeed(MCONTACT hContact); +void CheckCurrentFeedAvatar(MCONTACT hContact); +LPCTSTR CheckFeed(TCHAR* tszURL, HWND hwndDlg); +void UpdateMenu(bool State); +int ImportFeedsDialog(); +LPCTSTR ClearText(CMString &value, const TCHAR *message); +bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal); +void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg); +INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); +MCONTACT GetContactByNick(const TCHAR *nick); +MCONTACT GetContactByURL(const TCHAR *url); + +// =============== NewsAggregator SERVICES ================ +// Check all Feeds info +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGREGATOR_CHECKALLFEEDS "NewsAggregator/CheckAllFeeds" + +// Add new Feed channel +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGREGATOR_ADDFEED "NewsAggregator/AddNewsFeed" + +// Change Feed channel +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGREGATOR_CHANGEFEED "NewsAggregator/ChangeNewsFeed" + +// Import Feed channels from file +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGREGATOR_IMPORTFEEDS "NewsAggregator/ImportFeeds" + +// Export Feed channels to file +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGREGATOR_EXPORTFEEDS "NewsAggregator/ExportFeeds" + +// Check Feed info +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGREGATOR_CHECKFEED "NewsAggregator/CheckFeed" + +// Enable/disable getting feed info +// WPARAM = LPARAM = NULL +#define MS_NEWSAGGREGATOR_ENABLED "NewsAggregator/Enabled" \ No newline at end of file -- cgit v1.2.3