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.

210 lines
6.5 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1997 - 1999
  4. Module Name:
  5. MachineNode.h
  6. Abstract:
  7. Header file for the MachineNode subnode.
  8. See MachineNode.cpp for implementation.
  9. Revision History:
  10. mmaguire 12/03/97 - created
  11. --*/
  12. //////////////////////////////////////////////////////////////////////////////
  13. #if !defined(_LOG_MACHINE_NODE_H_)
  14. #define _LOG_MACHINE_NODE_H_
  15. //////////////////////////////////////////////////////////////////////////////
  16. // BEGIN INCLUDES
  17. //
  18. // where we can find what this class derives from:
  19. //
  20. #include "SnapinNode.h"
  21. #include "rtradvise.h"
  22. //
  23. //
  24. // where we can find what this class has or uses:
  25. //
  26. #include "LoggingMethodsNode.h"
  27. #include "ConnectionToServer.h"
  28. #include <map>
  29. #include <string>
  30. //
  31. // END INCLUDES
  32. //////////////////////////////////////////////////////////////////////////////
  33. class CLoggingMachineNode;
  34. class CLoggingComponentData;
  35. typedef std::map< std::basic_string< wchar_t > , CLoggingMachineNode * > LOGGINGSERVERSMAP;
  36. class CLoggingMachineNode : public CSnapinNode< CLoggingMachineNode, CLoggingComponentData, CLoggingComponent >
  37. {
  38. public:
  39. // Clipboard format through which this extension snapin receives
  40. // information about machine it's focussed on.
  41. static CLIPFORMAT m_CCF_MMC_SNAPIN_MACHINE_NAME;
  42. static void InitClipboardFormat();
  43. // Returns whether we extend a particular GUID and sets the
  44. // m_enumExtendedSnapin to indicate which snapin we are extending.
  45. BOOL IsSupportedGUID( GUID & guid );
  46. // Indicates which standalone snapin we are extending.
  47. _enum_EXTENDED_SNAPIN m_enumExtendedSnapin;
  48. HRESULT InitSdoObjects();
  49. SNAPINMENUID(IDM_MACHINE_NODE)
  50. BEGIN_SNAPINTOOLBARID_MAP(CLoggingMachineNode)
  51. SNAPINTOOLBARID_ENTRY(IDR_MACHINE_TOOLBAR)
  52. END_SNAPINTOOLBARID_MAP()
  53. CSnapInItem * GetExtNodeObject(LPDATAOBJECT pDataObject, CLoggingMachineNode * pDataClass );
  54. CLoggingMachineNode();
  55. ~CLoggingMachineNode();
  56. LPOLESTR GetResultPaneColInfo(int nCol);
  57. STDMETHOD(CheckConnectionToServer)( BOOL fVerbose = TRUE );
  58. // Pointer to the CComponentData object owning this node.
  59. // A root node doesn't belong to another node, so its
  60. // m_pParentNode pointer is NULL.
  61. // Rather it is owned by the unique IComponentData object
  62. // for this snapin.
  63. // We pass in this CComponentData pointer during CComponentData initialization.
  64. // By storing this pointer, we can have access to member
  65. // variables stored in CComponentData, e.g. a pointer to IConsole.
  66. // Since all nodes store a pointer to their parent, any node
  67. // can look its way up the tree and get access to CComponentData.
  68. CLoggingComponentData * m_pComponentData;
  69. void InitDataClass(IDataObject* pDataObject, CSnapInItem* pDefault);
  70. BOOL m_fAlreadyAnalyzedDataClass;
  71. BOOL m_bConfigureLocal;
  72. CComBSTR m_bstrServerAddress;
  73. virtual HRESULT OnExpand(
  74. LPARAM arg
  75. , LPARAM param
  76. , IComponentData * pComponentData
  77. , IComponent * pComponent
  78. , DATA_OBJECT_TYPES type
  79. );
  80. virtual HRESULT OnRename(
  81. LPARAM arg
  82. , LPARAM param
  83. , IComponentData * pComponentData
  84. , IComponent * pComponent
  85. , DATA_OBJECT_TYPES type
  86. );
  87. virtual HRESULT OnRefresh(
  88. LPARAM arg
  89. , LPARAM param
  90. , IComponentData * pComponentData
  91. , IComponent * pComponent
  92. , DATA_OBJECT_TYPES type
  93. );
  94. virtual HRESULT OnRemoveChildren(
  95. LPARAM arg
  96. , LPARAM param
  97. , IComponentData * pComponentData
  98. , IComponent * pComponent
  99. , DATA_OBJECT_TYPES type
  100. );
  101. STDMETHOD(TaskNotify)(
  102. IDataObject * pDataObject
  103. , VARIANT * pvarg
  104. , VARIANT * pvparam
  105. );
  106. STDMETHOD(EnumTasks)(
  107. IDataObject * pDataObject
  108. , BSTR szTaskGroup
  109. , IEnumTASK** ppEnumTASK
  110. );
  111. HRESULT OnTaskPadDefineNetworkAccessPolicy(
  112. IDataObject * pDataObject
  113. , VARIANT * pvarg
  114. , VARIANT * pvparam
  115. );
  116. CLoggingComponentData * GetComponentData( void );
  117. HRESULT DataRefresh();
  118. // Pointers to child nodes.
  119. CLoggingMethodsNode * m_pLoggingNode; // this is one CPoliciesNode object
  120. ////////////////////////////////////////////////////////////////////////////
  121. //
  122. // Asynchrnous connect related...
  123. //
  124. ////////////////////////////////////////////////////////////////////////////
  125. HRESULT BeginConnectAction( void );
  126. HRESULT LoadSdoData(BOOL fDSAvailable);
  127. HRESULT LoadCachedInfoFromSdo( void );
  128. ////////////////////////////////////////////////////////////////////////////
  129. // OnRRASChange -- to decide if to show LOGGING node under the machine node
  130. // Only show LOGGING node if NT Accounting is selected
  131. HRESULT OnRRASChange(
  132. /* [in] */ LONG_PTR ulConnection,
  133. /* [in] */ DWORD dwChangeType,
  134. /* [in] */ DWORD dwObjectType,
  135. /* [in] */ LPARAM lUserParam,
  136. /* [in] */ LPARAM lParam);
  137. HRESULT TryShow(BOOL* pbVisible);
  138. ////////////////////////////////////////////////////////////////////////////
  139. //
  140. // SDO related pointers
  141. //
  142. ////////////////////////////////////////////////////////////////////////////
  143. CComPtr<ISdoDictionaryOld> m_spDictionarySdo; // Dictionary SDO
  144. // if the server being focused is supported by this node
  145. // during connection, if server is NT4, this is set to false
  146. BOOL m_bServerSupported;
  147. protected:
  148. virtual HRESULT SetVerbs( IConsoleVerb * pConsoleVerb );
  149. BOOL m_fSdoConnected;
  150. BOOL m_fUseActiveDirectory;
  151. BOOL m_fDSAvailable;
  152. CLoggingConnectionToServer * m_pConnectionToServer;
  153. BOOL m_fNodeHasUI;
  154. // For extending snapins like RRAS which have multiple machine views.
  155. LOGGINGSERVERSMAP m_mapMachineNodes;
  156. CComPtr< CRtrAdviseSinkForIAS<CLoggingMachineNode> > m_spRtrAdviseSink;
  157. };
  158. _declspec( selectany ) CLIPFORMAT CLoggingMachineNode::m_CCF_MMC_SNAPIN_MACHINE_NAME = 0;
  159. // _declspec( selectany ) _enum_EXTENDED_SNAPIN CLoggingMachineNode::m_enumExtendedSnapin = INTERNET_AUTHENTICATION_SERVICE_SNAPIN;
  160. #endif // _LOG_MACHINE_NODE_H_