From 22f052f313379a8e864e61fdd3593126e088ded4 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 3 Mar 2013 14:04:30 +0000 Subject: removed not used headers added version info fixed crash #169 (patch from $ergi0) git-svn-id: http://svn.miranda-ng.org/main/trunk@3873 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Ping/src/common.h | 85 ++++++++++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 35 deletions(-) (limited to 'plugins/Ping/src/common.h') diff --git a/plugins/Ping/src/common.h b/plugins/Ping/src/common.h index e4e338cc34..48ddd31e03 100644 --- a/plugins/Ping/src/common.h +++ b/plugins/Ping/src/common.h @@ -1,64 +1,63 @@ #ifndef _COMMON_H #define _COMMON_H -#define MAX_HISTORY (1440) // 12 hrs at 30 sec intervals - -#define PLUG "PING" - -#define DEFAULT_PING_PERIOD 30 -#define DEFAULT_PING_TIMEOUT 2 -#define DEFAULT_SHOW_POPUP true -#define DEFAULT_SHOW_POPUP2 false -#define DEFAULT_BLOCK_REPS true -#define DEFAULT_LOGGING_ENABLED false -#define DEFAULT_LOG_FILENAME "ping_log.txt" -#define DEFAULT_NO_TEST_ICON true -#define DEFAULT_ATTACH_TO_CLIST false - -#define MAX_PINGADDRESS_STRING_LENGTH 256 - -//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -//#define VC_EXTRALEAN -//#define _WIN32_WINNT 0x0500 +#define _CRT_SECURE_NO_DEPRECATE +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define WINVER 0x0500 #define _WIN32_WINNT 0x0500 #define _WIN32_IE 0x0300 -#define MIRANDA_VER 0x0600 #include - -//#include +#include #include #include #include -#include - -#include +#include +#include #include -#include #include #include #include -#include #include #include #include -#include -#include #include -#include -#include #include -#include #include -#include #include #include #include +#include "resource.h" #include "collection.h" +#include "Version.h" +#include "icmp.h" +#include "log.h" +#include "menu.h" +#include "pinggraph.h" +#include "pinglist.h" +#include "pingthread.h" +#include "rawping.h" +#include "utils.h" + +#define MAX_HISTORY (1440) // 12 hrs at 30 sec intervals + +#define PLUG "PING" + +#define DEFAULT_PING_PERIOD 30 +#define DEFAULT_PING_TIMEOUT 2 +#define DEFAULT_SHOW_POPUP true +#define DEFAULT_SHOW_POPUP2 false +#define DEFAULT_BLOCK_REPS true +#define DEFAULT_LOGGING_ENABLED false +#define DEFAULT_LOG_FILENAME "ping_log.txt" +#define DEFAULT_NO_TEST_ICON true +#define DEFAULT_ATTACH_TO_CLIST false + +#define MAX_PINGADDRESS_STRING_LENGTH 256 + typedef struct { int ping_period, ping_timeout; @@ -72,8 +71,6 @@ typedef struct { bool log_csv; } PingOptions; -#pragma warning( disable : 4786 ) - // a deque of pairs - ping time and timestamp struct HistPair { short first; @@ -110,7 +107,10 @@ struct PINGADDRESS { const bool operator<(const PINGADDRESS &b) const; }; +#include "options.h" typedef Map HistoryMap; +typedef std::list PINGLIST; +typedef std::list::iterator pinglist_it; extern HANDLE hNetlibUser; @@ -118,4 +118,19 @@ extern HINSTANCE hInst; extern bool use_raw_ping; +// wake event for ping thread +extern HANDLE hWakeEvent; + +extern PingOptions options; +extern PINGADDRESS add_edit_addr; +extern HistoryMap history_map; +extern PINGLIST list_items; +extern HANDLE reload_event_handle; +extern CRITICAL_SECTION list_cs; +extern HANDLE mainThread; +extern HANDLE hWakeEvent; +extern CRITICAL_SECTION thread_finished_cs, list_changed_cs, data_list_cs; + +extern PINGLIST data_list; + #endif -- cgit v1.2.3