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.

127 lines
3.7 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1997 - 1999
  4. Module Name:
  5. LoggingMethodsNode.h
  6. Abstract:
  7. Header file for the CLoggingMethodsNode subnode.
  8. See LoggingMethodsNode.cpp for implementation.
  9. Author:
  10. Michael A. Maguire 12/15/97
  11. Revision History:
  12. mmaguire 12/15/97 - created
  13. --*/
  14. //////////////////////////////////////////////////////////////////////////////
  15. #if !defined(_LOG_LOGGING_METHODS_NODE_H_)
  16. #define _LOG_LOGGING_METHODS_NODE_H_
  17. //////////////////////////////////////////////////////////////////////////////
  18. // BEGIN INCLUDES
  19. //
  20. // where we can find what this class derives from:
  21. //
  22. #include "NodeWithResultChildrenList.h"
  23. //
  24. //
  25. // where we can find what this class has or uses:
  26. //
  27. //
  28. // END INCLUDES
  29. //////////////////////////////////////////////////////////////////////////////
  30. class CLocalFileLoggingNode;
  31. class CLoggingMachineNode;
  32. class CLoggingComponentData;
  33. class CLoggingComponent;
  34. class CLoggingMethodsNode : public CNodeWithResultChildrenList<CLoggingMethodsNode, CLocalFileLoggingNode, CSimpleArray<CLocalFileLoggingNode*>, CLoggingComponentData, CLoggingComponent>
  35. {
  36. public:
  37. SNAPINMENUID(IDM_LOGGING_METHODS_NODE)
  38. BEGIN_SNAPINTOOLBARID_MAP(CLoggingMethodsNode)
  39. // SNAPINTOOLBARID_ENTRY(IDR_LOGGING_METHODS_TOOLBAR)
  40. END_SNAPINTOOLBARID_MAP()
  41. HRESULT DataRefresh( ISdo* pServiceSdo );
  42. // Constructor/Destructor
  43. CLoggingMethodsNode(CSnapInItem * pParentNode, bool extendRasNode);
  44. ~CLoggingMethodsNode();
  45. STDMETHOD(FillData)(CLIPFORMAT cf, LPSTREAM pStream);
  46. virtual HRESULT OnRefresh(
  47. LPARAM arg
  48. , LPARAM param
  49. , IComponentData * pComponentData
  50. , IComponent * pComponent
  51. , DATA_OBJECT_TYPES type
  52. );
  53. // Used to get access to snapin-global data.
  54. CLoggingComponentData * GetComponentData( void );
  55. // Used to get access to server-global data.
  56. CLoggingMachineNode * GetServerRoot( void );
  57. // SDO management.
  58. HRESULT InitSdoPointers( ISdo *pSdo );
  59. HRESULT LoadCachedInfoFromSdo( void );
  60. // Some overrides for standard MMC functionality.
  61. OLECHAR* GetResultPaneColInfo( int nCol );
  62. HRESULT InsertColumns( IHeaderCtrl* pHeaderCtrl );
  63. HRESULT PopulateResultChildrenList( void );
  64. HRESULT SetVerbs( IConsoleVerb * pConsoleVerb );
  65. // Our own handling of property page changes.
  66. HRESULT OnPropertyChange(
  67. LPARAM arg
  68. , LPARAM param
  69. , IComponentData * pComponentData
  70. , IComponent * pComponent
  71. , DATA_OBJECT_TYPES type
  72. );
  73. // ATTENTION: We did something a little unusual in
  74. // this class to solve a problem.
  75. // We want to be able to have a fixed pointer which other
  76. // parts of the snapin (e.g. the taskpad's Configure Logging command)
  77. // can use to get at the local file logging node.
  78. // So we have a member variable m_pLocalFileLoggingNode which
  79. // points to that node object. However, we wanted to re-use
  80. // the features of CResultNodeWithChildrenList,
  81. // so we added this node to the list of children.
  82. // The children list will automatically take care of deleting
  83. // any nodes added to the list, so we must be careful that if the
  84. // list of children ever deletes these nodes,
  85. // we don't still try to use m_pLocalFileLoggingNode.
  86. // The practical solution is to never allow the children
  87. // list to try to repopulate itself, which in this case
  88. // means to not enable the MMC_VERB_REFRESH for the
  89. // CLoggingMethodsNode. This is what we do.
  90. CLocalFileLoggingNode * m_pLocalFileLoggingNode;
  91. bool m_ExtendRas;
  92. private:
  93. // pointer to our root Server Data Object;
  94. CComPtr<ISdo> m_spSdo;
  95. };
  96. #endif // _IAS_LOGGING_METHODS_NODE_H_