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.

98 lines
2.6 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. HsmCom.h
  5. Abstract:
  6. Root node of snapin - represents the Computer.
  7. Author:
  8. Rohde Wakefield [rohde] 12-Aug-1997
  9. Revision History:
  10. --*/
  11. #ifndef _HSMCOM_H
  12. #define _HSMCOM_H
  13. #include "prhsmcom.h"
  14. #include "SakNodeI.h"
  15. class ATL_NO_VTABLE CUiHsmCom :
  16. public CSakNodeImpl<CUiHsmCom>,
  17. public CComCoClass<CUiHsmCom,&CLSID_CUiHsmCom>
  18. {
  19. public:
  20. // constructor/destructor
  21. CUiHsmCom(void) {};
  22. BEGIN_COM_MAP(CUiHsmCom)
  23. COM_INTERFACE_ENTRY2(IDispatch, ISakNodeProp)
  24. COM_INTERFACE_ENTRY(ISakNode)
  25. COM_INTERFACE_ENTRY(IDataObject)
  26. COM_INTERFACE_ENTRY(ISakNodeProp)
  27. END_COM_MAP()
  28. DECLARE_REGISTRY_RESOURCEID(IDR_CUiHsmCom)
  29. HRESULT FinalConstruct( void );
  30. void FinalRelease( void );
  31. public:
  32. // ISakNode methods
  33. STDMETHOD( InvokeCommand ) ( SHORT sCmd, IDataObject *pDataObject );
  34. STDMETHOD( GetContextMenu ) ( BOOL bMultiSelect, HMENU *phMenu );
  35. STDMETHOD( CreateChildren ) ( );
  36. STDMETHOD( InitNode ) ( ISakSnapAsk* pSakSnapAsk, IUnknown* pHsmObj, ISakNode* pParent );
  37. STDMETHOD( AddPropertyPages) ( RS_NOTIFY_HANDLE handle, IUnknown* pUnkPropSheetCallback, IEnumGUID* pEnumObjectId, IEnumUnknown *pEnumUnkNode );
  38. // data members
  39. // static, class-wide variables
  40. static INT m_nScopeOpenIconIndex; // virtual scope index of Open Icon
  41. static INT m_nScopeCloseIconIndex; // virtual scope index of Close Icon
  42. static INT m_nResultIconIndex; // virtual scope index of Close Icon
  43. // data member unique to this class.
  44. CWsbStringPtr m_szHsmName; // name of Hsm
  45. // property pages
  46. CPropHsmComStat* m_pPageStat;
  47. CPropHsmComStat* m_pPageServices;
  48. // Private helper functions
  49. HRESULT GetEngineStatus (HSM_SYS_STS *status);
  50. HRESULT SetEngineStatus (HSM_SYS_STS status);
  51. HRESULT CheckStatusChange (HSM_SYS_STS oldStatus, HSM_SYS_STS newStatus, BOOL *fOk);
  52. };
  53. class CUiHsmComSheet : public CSakPropertySheet
  54. {
  55. public:
  56. CUiHsmComSheet( ) { };
  57. HRESULT AddPropertyPages( );
  58. HRESULT InitSheet(
  59. RS_NOTIFY_HANDLE handle,
  60. IUnknown *pUnkPropSheetCallback,
  61. CSakNode *pSakNode,
  62. ISakSnapAsk *pSakSnapAsk,
  63. IEnumGUID *pEnumObjectId,
  64. IEnumUnknown *pEnumUnkNode);
  65. CString m_NodeTitle;
  66. private:
  67. };
  68. #endif
  69. /////////////////////////////////////////////////////////////////////////////