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.

82 lines
2.9 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // HsmStgPl.h : Declaration of the CHsmStoragePool collectable
  3. /////////////////////////////////////////////////////////////////////////////
  4. #include "resource.h"
  5. #include "wsb.h"
  6. /////////////////////////////////////////////////////////////////////////////
  7. class CHsmStoragePool :
  8. public CWsbObject,
  9. public IHsmStoragePool,
  10. public CComCoClass<CHsmStoragePool,&CLSID_CHsmStoragePool>
  11. {
  12. public:
  13. CHsmStoragePool( ) {}
  14. BEGIN_COM_MAP( CHsmStoragePool )
  15. COM_INTERFACE_ENTRY( IHsmStoragePool )
  16. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  17. COM_INTERFACE_ENTRY(IPersistStream)
  18. COM_INTERFACE_ENTRY2(IWsbCollectable, IHsmStoragePool)
  19. COM_INTERFACE_ENTRY(IWsbPersistStream)
  20. COM_INTERFACE_ENTRY(IWsbTestable)
  21. END_COM_MAP( )
  22. DECLARE_REGISTRY_RESOURCEID( IDR_CHsmStoragePool )
  23. //CComObjectRoot
  24. STDMETHOD(FinalConstruct)(void);
  25. // IPersist
  26. public:
  27. STDMETHOD(GetClassID)(LPCLSID pClsid);
  28. // IPersistStream
  29. public:
  30. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  31. STDMETHOD(Load)(IStream* pStream);
  32. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  33. // IWsbCollectable
  34. public:
  35. STDMETHOD(CompareTo)(IUnknown* pCollectable, SHORT* pResult);
  36. WSB_FROM_CWSBOBJECT;
  37. // IWsbTestable
  38. public:
  39. STDMETHOD(Test)(USHORT *pTestsPassed, USHORT* pTestsFailed);
  40. // IHsmStoragePool
  41. public:
  42. STDMETHOD( GetId )( GUID *pId );
  43. STDMETHOD( SetId )( GUID Id );
  44. STDMETHOD( GetMediaSet)( GUID *pMediaSetId, BSTR *pMediaSetName );
  45. STDMETHOD( SetMediaSet)( GUID mediaSetId, BSTR mediaSetName );
  46. STDMETHOD( GetNumOnlineMedia )( ULONG *pNumOnlineMedia );
  47. STDMETHOD( SetNumOnlineMedia )( ULONG numOnlineMedia );
  48. STDMETHOD( GetNumMediaCopies )( USHORT *pNumMediaCopies );
  49. STDMETHOD( SetNumMediaCopies )( USHORT numMediaCopies );
  50. STDMETHOD( GetManagementPolicy )( GUID *pManagementPolicyId );
  51. STDMETHOD( SetManagementPolicy )( GUID managementPolicyId );
  52. STDMETHOD( InitFromRmsMediaSet )( IUnknown *pRmsMediaSet );
  53. STDMETHOD( GetRmsMediaSet )( IUnknown **ppRmsMediaSet );
  54. STDMETHOD( CompareToIHsmStoragePool )( IHsmStoragePool* pHsmStoragePool, short* psResult );
  55. STDMETHOD( GetMediaSetType )( USHORT *pMediaType );
  56. // Internal Helper functions
  57. private:
  58. GUID m_Id; //HSM engine storage pool ID
  59. GUID m_MediaSetId; //HSM RMS/NTMS media pool ID
  60. GUID m_PolicyId; //None for Sakkara
  61. ULONG m_NumOnlineMedia; //None for Sakkara
  62. USHORT m_NumMediaCopies; //Number of media copies
  63. CWsbBstrPtr m_MediaSetName; //HSM RMS/NTMS media pool name
  64. };