From ed9e9297ad8ae631d8856ba8917c92b545be4ebf Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 1 Aug 2015 19:49:12 +0000 Subject: TrafficCounter: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14792 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TrafficCounter/TrafficCounter.vcxproj | 28 +++ .../TrafficCounter/TrafficCounter.vcxproj.filters | 4 + plugins/TrafficCounter/TrafficCounter_10.vcxproj | 216 -------------------- .../TrafficCounter_10.vcxproj.filters | 74 ------- plugins/TrafficCounter/TrafficCounter_12.vcxproj | 221 --------------------- .../TrafficCounter_12.vcxproj.filters | 74 ------- plugins/TrafficCounter/TrafficCounter_14.vcxproj | 221 --------------------- .../TrafficCounter_14.vcxproj.filters | 74 ------- plugins/TrafficCounter/src/TrafficCounter.cpp | 2 +- plugins/TrafficCounter/src/commonheaders.cpp | 1 - plugins/TrafficCounter/src/commonheaders.h | 175 ---------------- plugins/TrafficCounter/src/misc.cpp | 2 +- plugins/TrafficCounter/src/options.cpp | 2 +- plugins/TrafficCounter/src/opttree.cpp | 2 +- plugins/TrafficCounter/src/statistics.cpp | 2 +- plugins/TrafficCounter/src/stdafx.cxx | 18 ++ plugins/TrafficCounter/src/stdafx.h | 173 ++++++++++++++++ plugins/TrafficCounter/src/vars.cpp | 2 +- 18 files changed, 229 insertions(+), 1062 deletions(-) create mode 100644 plugins/TrafficCounter/TrafficCounter.vcxproj create mode 100644 plugins/TrafficCounter/TrafficCounter.vcxproj.filters delete mode 100644 plugins/TrafficCounter/TrafficCounter_10.vcxproj delete mode 100644 plugins/TrafficCounter/TrafficCounter_10.vcxproj.filters delete mode 100644 plugins/TrafficCounter/TrafficCounter_12.vcxproj delete mode 100644 plugins/TrafficCounter/TrafficCounter_12.vcxproj.filters delete mode 100644 plugins/TrafficCounter/TrafficCounter_14.vcxproj delete mode 100644 plugins/TrafficCounter/TrafficCounter_14.vcxproj.filters delete mode 100644 plugins/TrafficCounter/src/commonheaders.cpp delete mode 100644 plugins/TrafficCounter/src/commonheaders.h create mode 100644 plugins/TrafficCounter/src/stdafx.cxx create mode 100644 plugins/TrafficCounter/src/stdafx.h (limited to 'plugins/TrafficCounter') diff --git a/plugins/TrafficCounter/TrafficCounter.vcxproj b/plugins/TrafficCounter/TrafficCounter.vcxproj new file mode 100644 index 0000000000..bf64716b38 --- /dev/null +++ b/plugins/TrafficCounter/TrafficCounter.vcxproj @@ -0,0 +1,28 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + TrafficCounter + {885010EA-D008-4E38-85D4-487693F0BA00} + + + + + \ No newline at end of file diff --git a/plugins/TrafficCounter/TrafficCounter.vcxproj.filters b/plugins/TrafficCounter/TrafficCounter.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/plugins/TrafficCounter/TrafficCounter.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/TrafficCounter/TrafficCounter_10.vcxproj b/plugins/TrafficCounter/TrafficCounter_10.vcxproj deleted file mode 100644 index c2fbe64760..0000000000 --- a/plugins/TrafficCounter/TrafficCounter_10.vcxproj +++ /dev/null @@ -1,216 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - TrafficCounter - {885010EA-D008-4E38-85D4-487693F0BA00} - - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - true - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.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;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - commonheaders.h - Level3 - false - EditAndContinue - Use - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - false - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - Windows - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - commonheaders.h - Level3 - NotSet - false - Use - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - false - true - true - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% %(AdditionalOptions) - Windows - - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - commonheaders.h - Level3 - false - Use - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - Windows - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - commonheaders.h - Level3 - false - Use - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - true - true - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - /PDBALTPATH:%_PDB% %(AdditionalOptions) - Windows - - - - - Create - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/TrafficCounter/TrafficCounter_10.vcxproj.filters b/plugins/TrafficCounter/TrafficCounter_10.vcxproj.filters deleted file mode 100644 index 19e970c487..0000000000 --- a/plugins/TrafficCounter/TrafficCounter_10.vcxproj.filters +++ /dev/null @@ -1,74 +0,0 @@ - - - - - {7248dd69-8a94-4e9f-81c4-1883723a61f6} - h;hpp;hxx;hm;inl - - - {7a03a86b-8068-47d0-bc10-07e824854944} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {379f9a87-c54b-4f64-ae10-cddbc3c96dbf} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/TrafficCounter/TrafficCounter_12.vcxproj b/plugins/TrafficCounter/TrafficCounter_12.vcxproj deleted file mode 100644 index e52e344a69..0000000000 --- a/plugins/TrafficCounter/TrafficCounter_12.vcxproj +++ /dev/null @@ -1,221 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - TrafficCounter - {885010EA-D008-4E38-85D4-487693F0BA00} - - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - Unicode - true - v120_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.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;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - commonheaders.h - Level3 - false - EditAndContinue - Use - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - false - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - Windows - false - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - commonheaders.h - Level3 - NotSet - false - Use - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - false - true - true - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - /PDBALTPATH:%_PDB% %(AdditionalOptions) - Windows - - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - commonheaders.h - Level3 - false - Use - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - Windows - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - commonheaders.h - Level3 - false - Use - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - true - true - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - /PDBALTPATH:%_PDB% %(AdditionalOptions) - Windows - - - - - Create - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/TrafficCounter/TrafficCounter_12.vcxproj.filters b/plugins/TrafficCounter/TrafficCounter_12.vcxproj.filters deleted file mode 100644 index 19e970c487..0000000000 --- a/plugins/TrafficCounter/TrafficCounter_12.vcxproj.filters +++ /dev/null @@ -1,74 +0,0 @@ - - - - - {7248dd69-8a94-4e9f-81c4-1883723a61f6} - h;hpp;hxx;hm;inl - - - {7a03a86b-8068-47d0-bc10-07e824854944} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {379f9a87-c54b-4f64-ae10-cddbc3c96dbf} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/TrafficCounter/TrafficCounter_14.vcxproj b/plugins/TrafficCounter/TrafficCounter_14.vcxproj deleted file mode 100644 index bcc2042a65..0000000000 --- a/plugins/TrafficCounter/TrafficCounter_14.vcxproj +++ /dev/null @@ -1,221 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - TrafficCounter - {885010EA-D008-4E38-85D4-487693F0BA00} - - - - DynamicLibrary - Unicode - v140_xp - - - DynamicLibrary - Unicode - true - v140_xp - - - DynamicLibrary - Unicode - v140_xp - - - DynamicLibrary - Unicode - true - v140_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.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;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - commonheaders.h - Level3 - false - EditAndContinue - Use - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - false - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin14\lib - Windows - false - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - commonheaders.h - Level3 - NotSet - false - Use - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - false - true - true - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin14\lib - /PDBALTPATH:%_PDB% %(AdditionalOptions) - Windows - - - - - Disabled - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - commonheaders.h - Level3 - false - Use - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin14\lib - Windows - - - - - Full - OnlyExplicitInline - Size - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - commonheaders.h - Level3 - false - Use - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - Msimg32.lib;comctl32.lib;%(AdditionalDependencies) - true - true - true - false - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin14\lib - /PDBALTPATH:%_PDB% %(AdditionalOptions) - Windows - - - - - Create - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/TrafficCounter/TrafficCounter_14.vcxproj.filters b/plugins/TrafficCounter/TrafficCounter_14.vcxproj.filters deleted file mode 100644 index 19e970c487..0000000000 --- a/plugins/TrafficCounter/TrafficCounter_14.vcxproj.filters +++ /dev/null @@ -1,74 +0,0 @@ - - - - - {7248dd69-8a94-4e9f-81c4-1883723a61f6} - h;hpp;hxx;hm;inl - - - {7a03a86b-8068-47d0-bc10-07e824854944} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {379f9a87-c54b-4f64-ae10-cddbc3c96dbf} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 8e04d461c6..511e6d5266 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /*-------------------------------------------------------------------------------------------------------------------*/ //GLOBAL diff --git a/plugins/TrafficCounter/src/commonheaders.cpp b/plugins/TrafficCounter/src/commonheaders.cpp deleted file mode 100644 index 14f99f7d71..0000000000 --- a/plugins/TrafficCounter/src/commonheaders.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "commonheaders.h" diff --git a/plugins/TrafficCounter/src/commonheaders.h b/plugins/TrafficCounter/src/commonheaders.h deleted file mode 100644 index 4a2a56be57..0000000000 --- a/plugins/TrafficCounter/src/commonheaders.h +++ /dev/null @@ -1,175 +0,0 @@ -#ifndef commonheaders_h__ -#define commonheaders_h__ - -/* -Traffic Counter plugin for Miranda IM -Copyright 2007-2011 Mironych. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#define _CRT_SECURE_NO_WARNINGS - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "resource.h" -#include "version.h" -#include "misc.h" -#include "opttree.h" -#include "vars.h" -#include "statistics.h" -#include "TrafficCounter.h" - -#pragma pack(push) -#pragma pack(1) -typedef struct -{ - BYTE Hour, Day, Month; - WORD Year; - DWORD Incoming, Outgoing; - WORD Time; -} HOURLYSTATS; -#pragma pack(pop) - -typedef struct tagTimer -{ - DWORD TimeAtStart; // Âðåìÿ â ìîìåíò çàïóñêà òàéìåðà - â ìèëëèñåêóíäàõ. - DWORD Timer; // Êîëè÷åñòâî ñåêóíä ñî âðåìåíè çàïóñêà òàéìåðà. -} TIMER; - -typedef struct -{ - char *name; // Èìÿ àêêàóíòà. - - TIMER Session; // Òàéìåð òåêóùåé ñåññèè (ïðîòîêîë â îíëàéíå). - TIMER Total; // Òàéìåð îáùèé. - - DWORD TotalRecvTraffic, // Îáùèé òðàôèê ïðîòîêîëà (çà âûáðàííûé ïåðèîä) - TotalSentTraffic, - CurrentRecvTraffic, // Òåêóùèé òðàôèê ïðîòîêîëà (çà ñåññèþ) - CurrentSentTraffic; - union - { - BYTE Flags; - struct - { - unsigned int Reserv0:1; // Àêòèâíîñòü ïîòåðÿëà ñìûñë - ñòàòèñòèêà âåä¸òñÿ ïî âñåì àêêàóíòàì. - unsigned int Visible:1; // = 1 - àêêàóíò áóäåò ïîêàçûâàòüñÿ âî ôðåéìå ñ÷¸ò÷èêîâ - unsigned int Enabled:1; // = 1 - àêêàóíò âêëþ÷åí è íå ïðÿ÷åòñÿ - unsigned int State:1; // = 1 - àêêàóíò ñåé÷àñ îíëàéí - unsigned int Reserv1:3; - }; - }; - - // Äîáàâëåíî â âåðñèè 0.1.1.0. - DWORD NumberOfRecords; // Êîëè÷åñòâî ÷àñîâ â îáùåé ñòàòèñòèêå. - HOURLYSTATS *AllStatistics; // Ïîëíàÿ ñòàòèñòèêà âìåñòå ñî ñòàòèñòèêîé îíëàéíà. - HANDLE hFile; // Ôàéë ñ ñîõðàí¸ííîé ñòàòèñòèêîé äàííîãî ïðîòîêîëà. - - DWORD StartIndex; // Íîìåð çàïèñè â ñòàòèñòèêå, áûâøèé àêòóàëüíûì íà ìîìåíò çàïóñêà. - DWORD StartIncoming; // Çíà÷åíèå âõîäÿùåãî òðàôèêà íà ìîìåíò çàïóñêà. - DWORD StartOutgoing; // Çíà÷åíèå èñõîäÿùåãî òðàôèêà íà ìîìåíò çàïóñêà. - - // 0.1.1.5. - DWORD Shift; // Íîìåð çàïèñè â ñòàòèñòèêå ñòàðåéøåãî âûáðàííîãî àêêàóíòà, - // äàòà êîòîðîé ñîîòâåòñòâóåò íà÷àëó ñòàòèñòèêè äàííîãî àêêàóíòà. - - // 0.1.1.6 - TCHAR *tszAccountName; // ×åëîâå÷åñêîå èìÿ àêêàóíòà äëÿ èñïîëüçîâàíèÿ â ãðàôè÷åñêîì èíòåðôåéñå. -} PROTOLIST; - -//--------------------------------------------------------------------------------------------- -// Ðàçëè÷íûå ôëàãè -//--------------------------------------------------------------------------------------------- -typedef union -{ - DWORD Flags; - struct - { - unsigned int NotifyBySize:1; //0 - unsigned int DrawCurrentTraffic:1; //1 - unsigned int DrawTotalTraffic:1; //2 - unsigned int DrawCurrentTimeCounter:1; //3 - unsigned int DrawProtoIcon:1; //4 - unsigned int Reserv0:1; //5 - unsigned int DrawProtoName:1; //6 - unsigned int DrawFrmAsSkin:1; //7 - unsigned int ShowSummary:1; //8 - unsigned int ShowTooltip:1; //9 - unsigned int ShowMainMenuItem:1; //10 - unsigned int ShowOverall:1; //11 - unsigned int Stat_Units:2; //12,13 - unsigned int Stat_Tab:3; //14,15,16 - unsigned int NotifyByTime:1; //17 - unsigned int Reserv2:1; //18 - unsigned int PeriodForShow:2; //19,20 - unsigned int FrameIsVisible:1; //21 - unsigned int Reserv1:1; //22 - unsigned int DrawTotalTimeCounter:1; //23 - }; -} uTCFLAGS; - -extern HINSTANCE hInst; - -extern HWND TrafficHwnd; -extern PROTOLIST *ProtoList; -extern uTCFLAGS unOptions; - -extern int Traffic_PopupBkColor; -extern int Traffic_PopupFontColor; -extern char Traffic_Notify_time_value; -extern int Traffic_Notify_size_value; -extern char Traffic_PopupTimeoutDefault; -extern char Traffic_PopupTimeoutValue; -extern char Traffic_AdditionSpace; - -extern TCHAR Traffic_CounterFormat[512]; -extern TCHAR Traffic_TooltipFormat[512]; - -extern BOOL bPopupExists, bVariablesExists, bTooltipExists; - -extern BOOL UseKeyColor; -extern COLORREF KeyColor; - -extern HGENMENU hTrafficMainMenuItem; - -extern WORD Stat_SelAcc; -extern OPTTREE_OPTION *pOptions; // Îáúÿâëåíî â ìîäóëå TrafficCounter.c. -extern PROTOLIST OverallInfo; - -#endif diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp index ebc9c515f6..c798f14add 100644 --- a/plugins/TrafficCounter/src/misc.cpp +++ b/plugins/TrafficCounter/src/misc.cpp @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /* Ôóíêöèÿ ðàçáèðàåò ñòðîêó è âîçâðàùàåò ñïèñîê òåãîâ è ñîîòâåòñòâóþùèõ èì ñòðîê. Àðãóìåíòû: diff --git a/plugins/TrafficCounter/src/options.cpp b/plugins/TrafficCounter/src/options.cpp index 3d383cb86d..449ef3b315 100644 --- a/plugins/TrafficCounter/src/options.cpp +++ b/plugins/TrafficCounter/src/options.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Àâòîð: Mironych =======================================================================================*/ -#include "commonheaders.h" +#include "stdafx.h" OPTTREE_OPTION *pOptions; // ×åðåç ýòîò óêàçàòåëü ìîäóëü opttree.c ìîæåò äîáðàòüñÿ äî ñïèñêà îïöèé. diff --git a/plugins/TrafficCounter/src/opttree.cpp b/plugins/TrafficCounter/src/opttree.cpp index 846e9fef93..8189b5d7f5 100644 --- a/plugins/TrafficCounter/src/opttree.cpp +++ b/plugins/TrafficCounter/src/opttree.cpp @@ -21,7 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TCHAR *name); HTREEITEM OptTree_AddItem(HWND hwndTree, TCHAR *name, LPARAM lParam, int iconIndex); diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp index 511560baa3..d8ef8fac80 100644 --- a/plugins/TrafficCounter/src/statistics.cpp +++ b/plugins/TrafficCounter/src/statistics.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Àâòîð: Mironych =======================================================================================*/ -#include "commonheaders.h" +#include "stdafx.h" WORD Stat_SelAcc; // Âûáðàííûå àêêàóíòû â îêíå ñòàòèñòèêè diff --git a/plugins/TrafficCounter/src/stdafx.cxx b/plugins/TrafficCounter/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/TrafficCounter/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 . +*/ + +#include "stdafx.h" \ No newline at end of file diff --git a/plugins/TrafficCounter/src/stdafx.h b/plugins/TrafficCounter/src/stdafx.h new file mode 100644 index 0000000000..b8e8bb1618 --- /dev/null +++ b/plugins/TrafficCounter/src/stdafx.h @@ -0,0 +1,173 @@ +#ifndef commonheaders_h__ +#define commonheaders_h__ + +/* +Traffic Counter plugin for Miranda IM +Copyright 2007-2011 Mironych. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "resource.h" +#include "version.h" +#include "misc.h" +#include "opttree.h" +#include "vars.h" +#include "statistics.h" +#include "TrafficCounter.h" + +#pragma pack(push) +#pragma pack(1) +typedef struct +{ + BYTE Hour, Day, Month; + WORD Year; + DWORD Incoming, Outgoing; + WORD Time; +} HOURLYSTATS; +#pragma pack(pop) + +typedef struct tagTimer +{ + DWORD TimeAtStart; // Âðåìÿ â ìîìåíò çàïóñêà òàéìåðà - â ìèëëèñåêóíäàõ. + DWORD Timer; // Êîëè÷åñòâî ñåêóíä ñî âðåìåíè çàïóñêà òàéìåðà. +} TIMER; + +typedef struct +{ + char *name; // Èìÿ àêêàóíòà. + + TIMER Session; // Òàéìåð òåêóùåé ñåññèè (ïðîòîêîë â îíëàéíå). + TIMER Total; // Òàéìåð îáùèé. + + DWORD TotalRecvTraffic, // Îáùèé òðàôèê ïðîòîêîëà (çà âûáðàííûé ïåðèîä) + TotalSentTraffic, + CurrentRecvTraffic, // Òåêóùèé òðàôèê ïðîòîêîëà (çà ñåññèþ) + CurrentSentTraffic; + union + { + BYTE Flags; + struct + { + unsigned int Reserv0:1; // Àêòèâíîñòü ïîòåðÿëà ñìûñë - ñòàòèñòèêà âåä¸òñÿ ïî âñåì àêêàóíòàì. + unsigned int Visible:1; // = 1 - àêêàóíò áóäåò ïîêàçûâàòüñÿ âî ôðåéìå ñ÷¸ò÷èêîâ + unsigned int Enabled:1; // = 1 - àêêàóíò âêëþ÷åí è íå ïðÿ÷åòñÿ + unsigned int State:1; // = 1 - àêêàóíò ñåé÷àñ îíëàéí + unsigned int Reserv1:3; + }; + }; + + // Äîáàâëåíî â âåðñèè 0.1.1.0. + DWORD NumberOfRecords; // Êîëè÷åñòâî ÷àñîâ â îáùåé ñòàòèñòèêå. + HOURLYSTATS *AllStatistics; // Ïîëíàÿ ñòàòèñòèêà âìåñòå ñî ñòàòèñòèêîé îíëàéíà. + HANDLE hFile; // Ôàéë ñ ñîõðàí¸ííîé ñòàòèñòèêîé äàííîãî ïðîòîêîëà. + + DWORD StartIndex; // Íîìåð çàïèñè â ñòàòèñòèêå, áûâøèé àêòóàëüíûì íà ìîìåíò çàïóñêà. + DWORD StartIncoming; // Çíà÷åíèå âõîäÿùåãî òðàôèêà íà ìîìåíò çàïóñêà. + DWORD StartOutgoing; // Çíà÷åíèå èñõîäÿùåãî òðàôèêà íà ìîìåíò çàïóñêà. + + // 0.1.1.5. + DWORD Shift; // Íîìåð çàïèñè â ñòàòèñòèêå ñòàðåéøåãî âûáðàííîãî àêêàóíòà, + // äàòà êîòîðîé ñîîòâåòñòâóåò íà÷àëó ñòàòèñòèêè äàííîãî àêêàóíòà. + + // 0.1.1.6 + TCHAR *tszAccountName; // ×åëîâå÷åñêîå èìÿ àêêàóíòà äëÿ èñïîëüçîâàíèÿ â ãðàôè÷åñêîì èíòåðôåéñå. +} PROTOLIST; + +//--------------------------------------------------------------------------------------------- +// Ðàçëè÷íûå ôëàãè +//--------------------------------------------------------------------------------------------- +typedef union +{ + DWORD Flags; + struct + { + unsigned int NotifyBySize:1; //0 + unsigned int DrawCurrentTraffic:1; //1 + unsigned int DrawTotalTraffic:1; //2 + unsigned int DrawCurrentTimeCounter:1; //3 + unsigned int DrawProtoIcon:1; //4 + unsigned int Reserv0:1; //5 + unsigned int DrawProtoName:1; //6 + unsigned int DrawFrmAsSkin:1; //7 + unsigned int ShowSummary:1; //8 + unsigned int ShowTooltip:1; //9 + unsigned int ShowMainMenuItem:1; //10 + unsigned int ShowOverall:1; //11 + unsigned int Stat_Units:2; //12,13 + unsigned int Stat_Tab:3; //14,15,16 + unsigned int NotifyByTime:1; //17 + unsigned int Reserv2:1; //18 + unsigned int PeriodForShow:2; //19,20 + unsigned int FrameIsVisible:1; //21 + unsigned int Reserv1:1; //22 + unsigned int DrawTotalTimeCounter:1; //23 + }; +} uTCFLAGS; + +extern HINSTANCE hInst; + +extern HWND TrafficHwnd; +extern PROTOLIST *ProtoList; +extern uTCFLAGS unOptions; + +extern int Traffic_PopupBkColor; +extern int Traffic_PopupFontColor; +extern char Traffic_Notify_time_value; +extern int Traffic_Notify_size_value; +extern char Traffic_PopupTimeoutDefault; +extern char Traffic_PopupTimeoutValue; +extern char Traffic_AdditionSpace; + +extern TCHAR Traffic_CounterFormat[512]; +extern TCHAR Traffic_TooltipFormat[512]; + +extern BOOL bPopupExists, bVariablesExists, bTooltipExists; + +extern BOOL UseKeyColor; +extern COLORREF KeyColor; + +extern HGENMENU hTrafficMainMenuItem; + +extern WORD Stat_SelAcc; +extern OPTTREE_OPTION *pOptions; // Îáúÿâëåíî â ìîäóëå TrafficCounter.c. +extern PROTOLIST OverallInfo; + +#endif diff --git a/plugins/TrafficCounter/src/vars.cpp b/plugins/TrafficCounter/src/vars.cpp index 769685f1fc..5f55778802 100644 --- a/plugins/TrafficCounter/src/vars.cpp +++ b/plugins/TrafficCounter/src/vars.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Àâòîð: Mironych =======================================================================================*/ -#include "commonheaders.h" +#include "stdafx.h" static TCHAR* GetTraffic(ARGUMENTSINFO *ai) { -- cgit v1.2.3