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.

119 lines
2.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000 - 2001.
  5. //
  6. // File: headers.hxx
  7. //
  8. // Contents: Contains class definition for Snapin's Root Node
  9. //
  10. // History: 07-26-2001 Hiteshr Created
  11. //
  12. //----------------------------------------------------------------------------
  13. //Values for ADSTATE
  14. #define AD_STATE_UNKNOWN 0
  15. #define AD_NOT_AVAILABLE 1
  16. #define AD_AVAILABLE 2
  17. class CRoleRootData : public CRootData
  18. {
  19. public:
  20. CRoleRootData(CComponentDataObject* pComponentData);
  21. virtual ~CRoleRootData();
  22. BOOL
  23. IsDeveloperMode(){return m_bDeveloperMode;}
  24. const CString&
  25. GetXMLStorePath();
  26. void
  27. SetXMLStorePath(const CString& strXMLStorePath);
  28. //
  29. // node info
  30. //
  31. DECLARE_NODE_GUID()
  32. virtual HRESULT OnCommand(long nCommandID,
  33. DATA_OBJECT_TYPES type,
  34. CComponentDataObject* pComponentData,
  35. CNodeList* pNodeList);
  36. //
  37. //Cannot Delete Root Node
  38. //
  39. virtual void OnDelete(CComponentDataObject*,
  40. CNodeList*){ ASSERT(FALSE);}
  41. virtual BOOL OnRefresh(CComponentDataObject* pComponentData,
  42. CNodeList* pNodeList);
  43. virtual BOOL OnSetRefreshVerbState(DATA_OBJECT_TYPES type,
  44. BOOL* pbHide,
  45. CNodeList* pNodeList);
  46. virtual int GetImageIndex(BOOL) { return iIconRoleSnapin;}
  47. //
  48. // Filtering
  49. //
  50. BOOL IsAdvancedView() { return m_bAdvancedView; }
  51. virtual BOOL OnEnumerate(CComponentDataObject* pComponentData,
  52. BOOL bAsync = TRUE);
  53. //
  54. // IStream manipulation helpers overrides
  55. //
  56. virtual HRESULT IsDirty();
  57. virtual HRESULT Load(IStream* pStm);
  58. virtual HRESULT Save(IStream* pStm, BOOL fClearDirty);
  59. virtual CColumnSet* GetColumnSet();
  60. virtual LPCWSTR GetColumnID() { return GetColumnSet()->GetColumnID(); }
  61. HRESULT GetResultViewType(CComponentDataObject* pComponentData,
  62. LPOLESTR *ppViewType,
  63. long *pViewOptions);
  64. HRESULT OnShow(LPCONSOLE lpConsole);
  65. virtual BOOL CanExpandSync() { return TRUE; }
  66. virtual BOOL HasPropertyPages(DATA_OBJECT_TYPES,
  67. BOOL* pbHideVerb,
  68. CNodeList*);
  69. DWORD
  70. GetADState();
  71. CADInfo& GetAdInfo(){return m_ADInfo;};
  72. // DECLARE_TOOLBAR_MAP()
  73. protected:
  74. virtual BOOL CanCloseSheets();
  75. virtual LPCONTEXTMENUITEM2 OnGetContextMenuItemTable();
  76. virtual BOOL OnAddMenuItem(LPCONTEXTMENUITEM2 pContextMenuItem2,
  77. long *pInsertionAllowed);
  78. private:
  79. void OnOpenPolicyStore(BOOL bNew);
  80. void OnOptions();
  81. BOOL m_bAdvancedView; // view option toggle
  82. BOOL m_bDeveloperMode;
  83. CString m_strXMLStoreDirectory;
  84. DWORD m_dwADState;
  85. CADInfo m_ADInfo;
  86. private:
  87. CColumnSet* m_pColumnSet;
  88. };