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.

161 lines
4.3 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1997 - 1999
  4. Module Name:
  5. LocalFileLoggingPage2.h
  6. Abstract:
  7. Header file for the CLocalFileLoggingPage2 class.
  8. This is our handler class for the second CMachineNode property page.
  9. See LocalFileLoggingPage2.cpp for implementation.
  10. Author:
  11. Michael A. Maguire 12/15/97
  12. Revision History:
  13. mmaguire 12/15/97 - created
  14. --*/
  15. //////////////////////////////////////////////////////////////////////////////
  16. #if !defined(_LOG_LOCAL_FILE_LOGGING_PAGE_2_H_)
  17. #define _LOG_LOCAL_FILE_LOGGING_PAGE_2_H_
  18. //////////////////////////////////////////////////////////////////////////////
  19. // BEGIN INCLUDES
  20. //
  21. // where we can find what this class derives from:
  22. //
  23. #include "PropertyPage.h"
  24. //
  25. //
  26. // where we can find what this class has or uses:
  27. //
  28. //
  29. // END INCLUDES
  30. //////////////////////////////////////////////////////////////////////////////
  31. class CLocalFileLoggingNode;
  32. class CLocalFileLoggingPage2 : public CIASPropertyPage<CLocalFileLoggingPage2>
  33. {
  34. public :
  35. CLocalFileLoggingPage2( LONG_PTR hNotificationHandle, CLocalFileLoggingNode *pLocalFileLoggingNode, TCHAR* pTitle = NULL, BOOL bOwnsNotificationHandle = FALSE );
  36. ~CLocalFileLoggingPage2();
  37. // This is the ID of the dialog resource we want for this class.
  38. // An enum is used here because the correct value of
  39. // IDD must be initialized before the base class's constructor is called
  40. enum { IDD = IDD_PROPPAGE_LOCAL_FILE_LOGGING2 };
  41. BEGIN_MSG_MAP(CLocalFileLoggingPage2)
  42. COMMAND_CODE_HANDLER(BN_CLICKED, OnChange)
  43. COMMAND_CODE_HANDLER(EN_CHANGE, OnChange)
  44. COMMAND_CODE_HANDLER(CBN_SELCHANGE, OnChange)
  45. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  46. COMMAND_ID_HANDLER( IDC_BUTTON_LOCAL_FILE_LOGGING_PAGE2__BROWSE, OnBrowse )
  47. // COMMAND_ID_HANDLER( IDC_CHECK_LOCAL_FILE_LOGGING_PAGE2__AUTOMATICALLY_OPEN_NEW_LOG, OnAutomaticallyOpenNewLog )
  48. COMMAND_ID_HANDLER( IDC_RADIO_LOCAL_FILE_LOGGING_PAGE2__DAILY, OnNewLogInterval )
  49. COMMAND_ID_HANDLER( IDC_RADIO_LOCAL_FILE_LOGGING_PAGE2__WEEKLY, OnNewLogInterval )
  50. COMMAND_ID_HANDLER( IDC_RADIO_LOCAL_FILE_LOGGING_PAGE2__MONTHLY, OnNewLogInterval )
  51. COMMAND_ID_HANDLER( IDC_RADIO_LOCAL_FILE_LOGGING_PAGE2__UNLIMITED, OnNewLogInterval )
  52. COMMAND_ID_HANDLER( IDC_RADIO_LOCAL_FILE_LOGGING_PAGE2__WHEN_LOG_FILE_REACHES, OnNewLogInterval )
  53. CHAIN_MSG_MAP(CIASPropertyPage<CLocalFileLoggingPage2>)
  54. END_MSG_MAP()
  55. BOOL OnApply();
  56. BOOL OnQueryCancel();
  57. HRESULT GetHelpPath( LPTSTR szFilePath );
  58. // Pointer to stream into which this page's Sdo interface
  59. // pointer will be marshalled.
  60. LPSTREAM m_pStreamSdoAccountingMarshal;
  61. LPSTREAM m_pStreamSdoServiceControlMarshal;
  62. protected:
  63. // Interface pointer for this page's client's sdo.
  64. CComPtr<ISdo> m_spSdoAccounting;
  65. // Smart pointer to interface for telling service to reload data.
  66. CComPtr<ISdoServiceControl> m_spSdoServiceControl;
  67. // When we are passed a pointer to the client node in our constructor,
  68. // we will save away a pointer to its parent, as this is the node
  69. // which will need to receive an update message once we have
  70. // applied any changes.
  71. CSnapInItem * m_pParentOfNodeBeingModified;
  72. CSnapInItem * m_pNodeBeingModified;
  73. private:
  74. LRESULT OnInitDialog(
  75. UINT uMsg
  76. , WPARAM wParam
  77. , LPARAM lParam
  78. , BOOL& bHandled
  79. );
  80. LRESULT OnChange(
  81. UINT uMsg
  82. , WPARAM wParam
  83. , HWND hwnd
  84. , BOOL& bHandled
  85. );
  86. LRESULT OnBrowse(
  87. UINT uMsg
  88. , WPARAM wParam
  89. , HWND hwnd
  90. , BOOL& bHandled
  91. );
  92. // LRESULT OnAutomaticallyOpenNewLog(
  93. // UINT uMsg
  94. // , WPARAM wParam
  95. // , HWND hwnd
  96. // , BOOL& bHandled
  97. // );
  98. LRESULT OnNewLogInterval(
  99. UINT uMsg
  100. , WPARAM wParam
  101. , HWND hwnd
  102. , BOOL& bHandled
  103. );
  104. // void SetAutomaticallyOpenNewLogDependencies( void );
  105. void SetLogFileFrequencyDependencies( void );
  106. protected:
  107. // Dirty bits -- for keeping track of data which has been touched
  108. // so that we only save data we have to.
  109. BOOL m_fDirtyAutomaticallyOpenNewLog;
  110. BOOL m_fDirtyFrequency;
  111. BOOL m_fDirtyLogFileSize;
  112. BOOL m_fDirtyLogFileDirectory;
  113. BOOL m_fDirtyLogInV1Format;
  114. BOOL m_fDirtyDeleteIfFull;
  115. };
  116. #endif // _LOG_LOCAL_FILE_LOGGING_PAGE_2_H_