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.

124 lines
3.5 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved
  3. Module Name:
  4. RmsReqst.h
  5. Abstract:
  6. Declaration of the CRmsRequest class
  7. Author:
  8. Brian Dodd [brian] 15-Nov-1996
  9. Revision History:
  10. --*/
  11. #ifndef _RMSREQST_
  12. #define _RMSREQST_
  13. #include "resource.h" // resource symbols
  14. #include "RmsObjct.h" // CRmsComObject
  15. /*++
  16. Class Name:
  17. CRmsRequest
  18. Class Description:
  19. A CRmsRequest represents a specific asynchronous job performed by the
  20. Removable Media Service, like mounting cartridges, checking in and out
  21. cartridges, and auditing a library.
  22. --*/
  23. class CRmsRequest :
  24. public CComDualImpl<IRmsRequest, &IID_IRmsRequest, &LIBID_RMSLib>,
  25. public CRmsComObject,
  26. public CWsbObject, // inherits CComObjectRoot
  27. public CComCoClass<CRmsRequest,&CLSID_CRmsRequest>
  28. {
  29. public:
  30. CRmsRequest() {}
  31. BEGIN_COM_MAP(CRmsRequest)
  32. COM_INTERFACE_ENTRY2(IDispatch, IRmsRequest)
  33. COM_INTERFACE_ENTRY(IRmsRequest)
  34. COM_INTERFACE_ENTRY(IRmsComObject)
  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_RmsRequest)
  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. // IRmsRequest
  62. public:
  63. STDMETHOD(GetRequestNo)(LONG *pRequestNo);
  64. STDMETHOD(GetRequestDescription)(BSTR *pDesc);
  65. STDMETHOD(SetRequestDescription)(BSTR desc);
  66. STDMETHOD(SetIsDone)(BOOL flag);
  67. STDMETHOD(IsDone)(void);
  68. STDMETHOD(GetOperation)(BSTR *pOperation);
  69. STDMETHOD(SetOperation)(BSTR operation);
  70. STDMETHOD(GetPercentComplete)( BYTE *pPercent);
  71. STDMETHOD(SetPercentComplete)( BYTE percent);
  72. STDMETHOD(GetStartTimestamp)(DATE *pDate);
  73. STDMETHOD(GetStopTimestamp)(DATE *pDate);
  74. private:
  75. enum { // Class specific constants:
  76. //
  77. Version = 1, // Class version, this should be
  78. // incremented each time the
  79. // the class definition changes.
  80. }; //
  81. LONG m_requestNo; // A request number.
  82. CWsbBstrPtr m_requestDescription; // A textual description of the request.
  83. BOOL m_isDone; // If TRUE, the request has completed.
  84. CWsbBstrPtr m_operation; // An internal description of the in-progress operation.
  85. BYTE m_percentComplete; // A value between 0-100 that indicates
  86. // what portion of the operation is complete.
  87. DATE m_startTimestamp; // The time the request was started.
  88. DATE m_stopTimestamp; // The time the request finished.
  89. };
  90. #endif // _RMSREQST_