Source code of Windows XP (NT5)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#ifndef _GLOBALS_H_
#define _GLOBALS_H_
#include "clusapi.h"
#include "clusutil.h"
#define NAME_LEN 80
#define WM_GOTEVENT WM_USER + 1
#define WM_EXITEVENTTHREAD WM_USER + 2
#define WM_REFRESH WM_USER + 3
// Event Defintions
typedef struct { DWORD dwCatagory ; time_t time ; DWORD dwFilter ; DWORD dwSubFilter ; WCHAR szSourceName[NAME_LEN] ; WCHAR szObjectName[NAME_LEN] ; } EVTFILTER_TYPE, *PEVTFILTER_TYPE ;
// Event Catagories
#define EVENT_CATAGORY_CLUSTER 1
#define EVENT_CATAGORY_CLUSTER_CONSISTENCY 2
// Event filter definitions
#define EVENT_FILTER 1
#define EVENT_SUBFILTER 2
// Define Distinct Types of Events.
// Events Generated By the clustering system.
struct EVENTDEFINITION { DWORD_PTR dwCatagory ;
PDWORDTOSTRINGMAP pFilter ; PDWORDTOSUBSTRINGMAP pSubFilter ;
WCHAR szCatagory [NAME_LEN] ; WCHAR szFilterPrompt [NAME_LEN] ; WCHAR szSubFilterPrompt [NAME_LEN] ; WCHAR szSourceNamePrompt [NAME_LEN] ; WCHAR szObjectNamePrompt [NAME_LEN] ; } ;
typedef EVENTDEFINITION *PEVENTDEFINITION ;
struct EVENTTHREADPARAM { HWND hWnd ; CDocument *pDoc ; WCHAR szSourceName [NAME_LEN] ; HANDLE hEvent ; } ;
extern CPtrList ptrlstEventDef ;
// Clustering Related
extern EVENTDEFINITION aClusEventDefinition ;
// For Cluster Consistency Checks.
#define EVENT_FILTER_CONSISTENCY 1
// -1 in any of the following stands for any value
#define SCHEDULE_SUNDAY 1
#define SCHEDULE_MONDAY 2
#define SCHEDULE_TUESDAY 4
#define SCHEDULE_WEDNESDAY 8
#define SCHEDULE_THURSDAY 16
#define SCHEDULE_FRIDAY 32
#define SCHEDULE_SATURDAY 64
// Action Type definitions.
#define SCHEDULE_ACTION_COMMAND 1
struct SCHEDULE_TIMEINFO { int iYear ; int iMonth ; int iDay ; int iHour ; int iMin ; int iSec ; int iWeekDay ; CTime ctime ; } ;
struct SCHEDULE_EVENTINFO { DWORD_PTR dwCatagory ; DWORD_PTR dwFilter ; DWORD_PTR dwSubFilter ; // online or Offline or Fail or Pause
WCHAR szSourceName [NAME_LEN] ; WCHAR szObjectName [NAME_LEN] ; } ;
struct SCHEDULE_ACTIONINFO { DWORD_PTR dwActionType ; CString stParam ; } ;
struct SCHEDULE_INFO { CTime minTime ; CPtrList lstTimeInfo ; // List of SCHEDULE_TIMEINFO
CPtrList lstEventInfo ; // List of SCHEDULE_EVENTINFO
CPtrList lstActionInfo ; // List of SCHEDULE_ACTIONINFO
} ;
extern DWORDTOSTRINGMAP aAction [] ;
//extern CTime minTime ;
extern HWND hScheduleWnd ; extern UINT_PTR nIDTimer ; extern CPtrList ptrlstSInfo ;
// For the modeless dialog to display the event list
LPCWSTR GetType (DWORD_PTR dwCatagory, DWORD_PTR dwCode) ; LPCWSTR GetSubType (DWORD_PTR dwCatagory, DWORD dwCode, DWORD dwSubCode) ; extern PEVENTDEFINITION GetEventDefinition (DWORD_PTR dwType) ;
// Functions defined in schedule.cpp
extern AddSchedule () ; extern ModifySchedule (SCHEDULE_INFO *pSOldInfo) ; extern ScheduleInit () ; extern void ScheduleDeInit() ; extern void ResetTimer () ; extern void FreeEventList (CPtrList &ptrlst) ; extern void FreeActionList (CPtrList &ptrlst) ; extern void FreeTimeList (CPtrList &ptrlst) ; void ComputeAbsoluteTime (SCHEDULE_INFO *pSInfo) ;
#endif // _GLOBALS_H_
|