Leaked source code of windows server 2003
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.

112 lines
3.7 KiB

  1. /*++
  2. Copyright (C) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. smalrtq.h
  5. Abstract:
  6. This object is used to represent performance alert queries (a.k.a.
  7. sysmon alert queries).
  8. --*/
  9. #ifndef _CLASS_SMALRTQ_
  10. #define _CLASS_SMALRTQ_
  11. #include "smlogqry.h"
  12. typedef struct _ALERT_ACTION_INFO {
  13. DWORD dwSize;
  14. DWORD dwActionFlags;
  15. LPWSTR szNetName;
  16. LPWSTR szCmdFilePath;
  17. LPWSTR szUserText;
  18. LPWSTR szLogName;
  19. } ALERT_ACTION_INFO, *PALERT_ACTION_INFO;
  20. class CSmLogService;
  21. class CSmAlertQuery : public CSmLogQuery
  22. {
  23. // constructor/destructor
  24. public:
  25. CSmAlertQuery( CSmLogService* );
  26. virtual ~CSmAlertQuery( void );
  27. // public methods
  28. public:
  29. virtual DWORD Open ( const CString& rstrName, HKEY hKeyQuery, BOOL bReadOnly);
  30. virtual DWORD Close ( void );
  31. virtual DWORD UpdateRegistry( void ); // load reg. w/ internal values
  32. virtual DWORD SyncWithRegistry( void );
  33. virtual BOOL GetLogTime(PSLQ_TIME_INFO pTimeInfo, DWORD dwFlags);
  34. virtual BOOL SetLogTime(PSLQ_TIME_INFO pTimeInfo, const DWORD dwFlags);
  35. virtual BOOL GetDefaultLogTime(SLQ_TIME_INFO& rTimeInfo, DWORD dwFlags);
  36. virtual DWORD GetLogType( void );
  37. virtual const CString& GetLogFileType ( void );
  38. virtual void GetLogFileType ( DWORD& );
  39. virtual BOOL SetLogFileType ( const DWORD );
  40. virtual const CString& GetLogFileName( BOOL bLatestRunning = FALSE );
  41. // Methods specific to this query type
  42. LPCWSTR GetCounterList( LPDWORD pcchListSize );
  43. BOOL SetCounterList( LPCWSTR mszCounterList, DWORD cchListSize );
  44. LPCWSTR GetFirstCounter( void );
  45. LPCWSTR GetNextCounter( void );
  46. VOID ResetCounterList( void );
  47. BOOL AddCounter(LPCWSTR szCounterPath);
  48. DWORD TranslateCounterListToLocale();
  49. BOOL GetActionInfo( PALERT_ACTION_INFO pInfo, LPDWORD pdwInfoBufSize);
  50. DWORD SetActionInfo( PALERT_ACTION_INFO pInfo );
  51. virtual HRESULT LoadFromPropertyBag ( IPropertyBag*, IErrorLog* );
  52. virtual HRESULT SaveToPropertyBag ( IPropertyBag*, BOOL fSaveAllProps );
  53. virtual HRESULT LoadCountersFromPropertyBag ( IPropertyBag*, IErrorLog* );
  54. virtual HRESULT SaveCountersToPropertyBag ( IPropertyBag* );
  55. virtual DWORD TranslateMSZAlertCounterList(
  56. LPWSTR pszCounterList,
  57. LPWSTR pBuffer,
  58. LPDWORD pdwBufferSize,
  59. BOOL bFlag);
  60. virtual CSmAlertQuery* CastToAlertQuery( void ) { return this; };
  61. // protected methods
  62. protected:
  63. // private member variables
  64. private:
  65. LPWSTR m_szNextCounter;
  66. DWORD m_dwCounterListLength; // in chars including MSZ null
  67. // Registry Values
  68. LPWSTR mr_szCounterList;
  69. BOOL m_bCounterListInLocale;
  70. DWORD mr_dwActionFlags;
  71. CString mr_strNetName;
  72. CString mr_strCmdFileName;
  73. CString mr_strCmdUserText;
  74. CString mr_strCmdUserTextIndirect;
  75. CString mr_strPerfLogName;
  76. };
  77. typedef CSmAlertQuery SLALERTQUERY;
  78. typedef CSmAlertQuery* PSLALERTQUERY;
  79. #endif //_CLASS_SMALRTQ_