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.

107 lines
3.6 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved
  3. Module Name:
  4. RmsDvice.h
  5. Abstract:
  6. Declaration of the CRmsDevice class
  7. Author:
  8. Brian Dodd [brian] 15-Nov-1996
  9. Revision History:
  10. --*/
  11. #ifndef _RMSDVICE_
  12. #define _RMSDVICE_
  13. #include "resource.h" // resource symbols
  14. #include "RmsCElmt.h" // CRmsChangerElement
  15. /*++
  16. Class Name:
  17. CRmsDevice
  18. Class Description:
  19. A CRmsDevice represents a physical device connected to a SCSI bus.
  20. --*/
  21. class CRmsDevice :
  22. public CComDualImpl<IRmsDevice, &IID_IRmsDevice, &LIBID_RMSLib>,
  23. public CRmsChangerElement // inherits CRmsComObject
  24. {
  25. public:
  26. CRmsDevice();
  27. // CRmsDevice
  28. public:
  29. HRESULT GetSizeMax( ULARGE_INTEGER* pSize );
  30. HRESULT Load( IStream* pStream );
  31. HRESULT Save( IStream* pStream, BOOL clearDirty );
  32. HRESULT CompareTo( IUnknown* pCollectable, SHORT* pResult);
  33. HRESULT Test( USHORT *pPassed, USHORT *pFailed );
  34. // IRmsDevice
  35. public:
  36. STDMETHOD( GetDeviceName )( BSTR *pName );
  37. STDMETHOD( SetDeviceName )( BSTR name );
  38. STDMETHOD( GetDeviceInfo )( UCHAR *pId, SHORT *pSize );
  39. STDMETHOD( SetDeviceInfo )( UCHAR *pId, SHORT size );
  40. STDMETHOD( GetDeviceType )( LONG *pType );
  41. STDMETHOD( SetDeviceType )( LONG type );
  42. //STDMETHOD( GetVendorId )( BSTR *pVendorId);
  43. //STDMETHOD( GetProductId )( BSTR *pProductId);
  44. //STDMETHOD( GetFirmwareLevel )( BSTR *pFirmwareLevel);
  45. //STDMETHOD( GetSerialNumber )( UCHAR *pNo, SHORT *pSize );
  46. STDMETHOD( GetDeviceAddress )( BYTE *pPort, BYTE *pBus, BYTE *pId, BYTE *pLun );
  47. STDMETHOD( SetDeviceAddress )( BYTE port, BYTE bus, BYTE id, BYTE lun );
  48. protected:
  49. enum { // Class specific constants:
  50. //
  51. Version = 1, // Class version, this should be
  52. // incremented each time the
  53. // the class definition changes.
  54. MaxInfo = 36 // Max size of the device identifier.
  55. }; //
  56. CWsbBstrPtr m_deviceName; // The name used to create a handle to
  57. // the device.
  58. RmsDevice m_deviceType; // The device type that best describes
  59. // the device. Some devices are multi-
  60. // function.
  61. SHORT m_sizeofDeviceInfo; // The size of valid data in the
  62. // device information buffer.
  63. UCHAR m_deviceInfo[MaxInfo]; // An array of bytes which can uniquely
  64. // identify the device. Usually
  65. // this information is returned
  66. // directly by the device and
  67. // represents SCSI inquiry information.
  68. // CWsbBstrPtr m_SerialNumber; // The serial number obtained directly
  69. // // from the device.
  70. BYTE m_port; // Adapter port number.
  71. BYTE m_bus; // The path/bus id; the bus number on
  72. // the port.
  73. BYTE m_targetId; // Target ID.
  74. BYTE m_lun; // Logical unit number.
  75. };
  76. #endif // _RMSDVICE_