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.

128 lines
3.1 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. acscomp.h
  7. This file contains the prototypes for the derived classes
  8. for CComponent and CComponentData. Most of these functions
  9. are pure virtual functions that need to be overridden
  10. for snapin functionality.
  11. FILE HISTORY:
  12. 11/05/97 Wei Jiang Created
  13. */
  14. #include "resource.h" // main symbols
  15. #ifndef __mmc_h__
  16. #include <mmc.h>
  17. #endif
  18. #ifndef _COMPONT_H_
  19. #include "compont.h"
  20. #endif
  21. #ifndef _ACSCOMPONENT_H_
  22. #define _ACSCOMPONENT_H_
  23. /////////////////////////////////////////////////////////////////////////////
  24. //
  25. // CACSComponentData
  26. //
  27. /////////////////////////////////////////////////////////////////////////////
  28. #define ACS_CONSOLE_VERSION 0x50001 // NT5, version 1
  29. #define ACS_CONSOLE_MAX_COL 32 // max col used for this version
  30. struct CACSConsoleData
  31. {
  32. ULONG ulVersion;
  33. ULONG ulSize;
  34. ULONG ulMaxCol; // should be ACS_CONSOLE_MAX_COL
  35. ULONG ulPolicyColWidth[ACS_CONSOLE_MAX_COL + 1];
  36. ULONG ulSubnetColWidth[ACS_CONSOLE_MAX_COL + 1];
  37. };
  38. class CACSComponentData :
  39. public CComponentData,
  40. public CComObjectRoot
  41. {
  42. public:
  43. BEGIN_COM_MAP(CACSComponentData)
  44. COM_INTERFACE_ENTRY(IComponentData)
  45. COM_INTERFACE_ENTRY(IExtendPropertySheet)
  46. COM_INTERFACE_ENTRY(IExtendContextMenu)
  47. COM_INTERFACE_ENTRY(IPersistStreamInit)
  48. COM_INTERFACE_ENTRY(ISnapinHelp)
  49. END_COM_MAP()
  50. // These are the interfaces that we MUST implement
  51. // We will implement our common behavior here, with the derived
  52. // classes implementing the specific behavior.
  53. DeclareIPersistStreamInitMembers(IMPL)
  54. DeclareITFSCompDataCallbackMembers(IMPL)
  55. STDMETHOD(OnNotifyPropertyChange)(LPDATAOBJECT lpDataObject,
  56. MMC_NOTIFY_TYPE event,
  57. LPARAM arg,
  58. LPARAM param);
  59. CACSComponentData();
  60. HRESULT FinalConstruct();
  61. void FinalRelease();
  62. void GetConsoleData();
  63. void SetConsoleData();
  64. protected:
  65. SPITFSNodeMgr m_spNodeMgr;
  66. CACSConsoleData m_ConsoleData;
  67. };
  68. /////////////////////////////////////////////////////////////////////////////
  69. //
  70. // CACSComponent
  71. //
  72. /////////////////////////////////////////////////////////////////////////////
  73. class CACSComponent :
  74. public TFSComponent
  75. {
  76. public:
  77. CACSComponent();
  78. ~CACSComponent();
  79. DeclareITFSCompCallbackMembers(IMPL)
  80. STDMETHOD(OnSnapinHelp)(LPDATAOBJECT pDataObject, long arg, long param);
  81. virtual HRESULT OnNotifyPropertyChange(LPDATAOBJECT lpDataObject,
  82. MMC_NOTIFY_TYPE event,
  83. LPARAM arg,
  84. LPARAM param);
  85. //Attributes
  86. private:
  87. };
  88. // Note - These are offsets into my image list
  89. typedef enum _IMAGE_INDICIES
  90. {
  91. IMAGE_IDX_ACS = 0,
  92. IMAGE_IDX_SUBNETWORK,
  93. IMAGE_IDX_PROFILES,
  94. IMAGE_IDX_USERPOLICIES,
  95. IMAGE_IDX_POLICY,
  96. IMAGE_IDX_OPENFOLDER,
  97. IMAGE_IDX_CLOSEDFOLDER,
  98. IMAGE_IDX_CONFLICTPOLICY,
  99. IMAGE_IDX_DISABLEDPOLICY,
  100. Not_being_used,
  101. IMAGE_IDX_SUBNETWORK_NO_ACSPOLICY,
  102. } IMAGE_INDICIES, *LPIMAGE_INDICIES;
  103. #endif _ACSCOMPONENT_H_