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.

118 lines
3.2 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved
  3. Module Name:
  4. RmsIPort.h
  5. Abstract:
  6. Declaration of the CRmsIEPort class
  7. Author:
  8. Brian Dodd [brian] 15-Nov-1996
  9. Revision History:
  10. --*/
  11. #ifndef _RMSIPORT_
  12. #define _RMSIPORT_
  13. #include "resource.h" // resource symbols
  14. #include "RmsObjct.h" // CRmsComObject
  15. #include "RmsCElmt.h" // CRmsChangerElement
  16. /*++
  17. Class Name:
  18. CRmsIPort
  19. Class Description:
  20. A CRmsIPort represents an element in a library through which media are
  21. imported and/or exported.
  22. --*/
  23. class CRmsIEPort :
  24. public CComDualImpl<IRmsIEPort, &IID_IRmsIEPort, &LIBID_RMSLib>,
  25. public CRmsChangerElement,
  26. public CWsbObject, // inherits CComObjectRoot
  27. public CComCoClass<CRmsIEPort,&CLSID_CRmsIEPort>
  28. {
  29. public:
  30. CRmsIEPort() {}
  31. BEGIN_COM_MAP(CRmsIEPort)
  32. COM_INTERFACE_ENTRY2(IDispatch, IRmsIEPort)
  33. COM_INTERFACE_ENTRY(IRmsIEPort)
  34. COM_INTERFACE_ENTRY(IRmsComObject)
  35. COM_INTERFACE_ENTRY(IRmsChangerElement)
  36. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  37. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  38. COM_INTERFACE_ENTRY(IPersistStream)
  39. COM_INTERFACE_ENTRY(IWsbCollectable)
  40. // COM_INTERFACE_ENTRY(IWsbPersistable)
  41. COM_INTERFACE_ENTRY(IWsbTestable)
  42. END_COM_MAP()
  43. DECLARE_REGISTRY_RESOURCEID(IDR_RmsIEPort)
  44. // CComObjectRoot
  45. public:
  46. STDMETHOD(FinalConstruct)(void);
  47. // IPersist
  48. public:
  49. STDMETHOD(GetClassID)(CLSID *pClsid);
  50. // IPersistStream
  51. public:
  52. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  53. STDMETHOD(Load)(IStream* pStream);
  54. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  55. // IWsbCollectable
  56. public:
  57. STDMETHOD(CompareTo)(IUnknown* pCollectable, SHORT* pResult);
  58. WSB_FROM_CWSBOBJECT;
  59. // IWsbTestable
  60. public:
  61. STDMETHOD(Test)(USHORT *pPassed, USHORT *pFailed);
  62. // IRmsIEPort
  63. public:
  64. STDMETHOD(GetDescription)(BSTR *pDesc);
  65. STDMETHOD(SetDescription)(BSTR desc);
  66. STDMETHOD(SetIsImport)(BOOL flag);
  67. STDMETHOD(IsImport)(void);
  68. STDMETHOD(SetIsExport)(BOOL flag);
  69. STDMETHOD(IsExport)(void);
  70. STDMETHOD(GetWaitTime)(LONG *pTime);
  71. STDMETHOD(SetWaitTime)(LONG time);
  72. private:
  73. enum { // Class specific constants:
  74. //
  75. Version = 1, // Class version, this should be
  76. // incremented each time the
  77. // the class definition changes.
  78. }; //
  79. CWsbBstrPtr m_description; // This is the description used to
  80. // identify the port to an operator.
  81. BOOL m_isImport; // If TRUE, the portal can be used for importing media.
  82. BOOL m_isExport; // If TRUE, the portal can be used for exporting media.
  83. LONG m_waitTime; // Elapsed milliseconds to wait before
  84. // timming out an import/export request.
  85. };
  86. #endif // _RMSIPORT_