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.

109 lines
2.8 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved
  3. Module Name:
  4. RmsSSlot.h
  5. Abstract:
  6. Declaration of the CRmsStorageSlot class
  7. Author:
  8. Brian Dodd [brian] 15-Nov-1996
  9. Revision History:
  10. --*/
  11. #ifndef _RMSSSLOT_
  12. #define _RMSSSLOT_
  13. #include "resource.h" // resource symbols
  14. #include "RmsObjct.h" // CRmsComObject
  15. #include "RmsCElmt.h" // CRmsChangerElement
  16. /*++
  17. Class Name:
  18. CRmsStorageSlot
  19. Class Description:
  20. A CRmsStorageSlot represents a specific storage location within a libray.
  21. --*/
  22. class CRmsStorageSlot :
  23. public CComDualImpl<IRmsStorageSlot, &IID_IRmsStorageSlot, &LIBID_RMSLib>,
  24. public CRmsChangerElement, // inherits CRmsComObject
  25. public CWsbObject, // inherits CComObjectRoot
  26. public CComCoClass<CRmsStorageSlot,&CLSID_CRmsStorageSlot>
  27. {
  28. public:
  29. CRmsStorageSlot() {}
  30. BEGIN_COM_MAP(CRmsStorageSlot)
  31. COM_INTERFACE_ENTRY2(IDispatch, IRmsStorageSlot)
  32. COM_INTERFACE_ENTRY(IRmsStorageSlot)
  33. COM_INTERFACE_ENTRY(IRmsComObject)
  34. COM_INTERFACE_ENTRY(IRmsChangerElement)
  35. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  36. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  37. COM_INTERFACE_ENTRY(IPersistStream)
  38. COM_INTERFACE_ENTRY(IWsbCollectable)
  39. // COM_INTERFACE_ENTRY(IWsbPersistable)
  40. COM_INTERFACE_ENTRY(IWsbTestable)
  41. END_COM_MAP()
  42. DECLARE_REGISTRY_RESOURCEID(IDR_RmsStorageSlot)
  43. // CComObjectRoot
  44. public:
  45. STDMETHOD(FinalConstruct)(void);
  46. // IPersist
  47. public:
  48. STDMETHOD(GetClassID)(CLSID *pClsid);
  49. // IPersistStream
  50. public:
  51. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  52. STDMETHOD(Load)(IStream* pStream);
  53. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  54. // IWsbCollectable
  55. public:
  56. STDMETHOD(CompareTo)(IUnknown* pCollectable, SHORT* pResult);
  57. WSB_FROM_CWSBOBJECT;
  58. // IWsbTestable
  59. public:
  60. STDMETHOD(Test)(USHORT *pPassed, USHORT *pFailed);
  61. // IRmsStorageSlot
  62. public:
  63. STDMETHOD(SetIsInMagazine)(BOOL flag);
  64. STDMETHOD(IsInMagazine)(void);
  65. STDMETHOD(GetMagazineAndCell)(LONG *pMag, LONG *pCell);
  66. STDMETHOD(SetMagazineAndCell)(LONG mag, LONG cell);
  67. private:
  68. enum { // Class specific constants:
  69. //
  70. Version = 1, // Class version, this should be
  71. // incremented each time the
  72. // the class definition changes.
  73. }; //
  74. BOOL m_isInMagazine; // If TRUE, the slot is contained within
  75. // a magazine.
  76. LONG m_magazineNo; // The magazine number for this slot.
  77. LONG m_cellNo; // The cell number for this slot.
  78. };
  79. #endif // _RMSSSLOT_