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.

114 lines
2.9 KiB

  1. #ifndef _HSMSESST_
  2. #define _HSMSESST_
  3. /*++
  4. 1998 Seagate Software, Inc. All rights reserved.
  5. Module Name:
  6. hsmsesst.h
  7. Abstract:
  8. This class is the session totals component, which keeps track of totals for a session
  9. on a per action basis.
  10. Author:
  11. Chuck Bardeen [cbardeen] 14-Feb-1997
  12. Revision History:
  13. --*/
  14. #include "resource.h" // main symbols
  15. #include "wsb.h"
  16. #include "job.h"
  17. /*++
  18. Class Name:
  19. CHsmSessionTotals
  20. This class is the session totals component, which keeps track of totals for a session
  21. on a per action basis.
  22. Class Description:
  23. --*/
  24. class CHsmSessionTotals :
  25. public CWsbObject,
  26. public IHsmSessionTotals,
  27. public IHsmSessionTotalsPriv,
  28. public CComCoClass<CHsmSessionTotals,&CLSID_CHsmSessionTotals>
  29. {
  30. public:
  31. CHsmSessionTotals() {}
  32. BEGIN_COM_MAP(CHsmSessionTotals)
  33. COM_INTERFACE_ENTRY(IHsmSessionTotals)
  34. COM_INTERFACE_ENTRY(IHsmSessionTotalsPriv)
  35. COM_INTERFACE_ENTRY(IWsbCollectable)
  36. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  37. COM_INTERFACE_ENTRY(IPersistStream)
  38. COM_INTERFACE_ENTRY(IWsbTestable)
  39. END_COM_MAP()
  40. DECLARE_REGISTRY_RESOURCEID(IDR_CHsmSessionTotals)
  41. // CComObjectRoot
  42. public:
  43. STDMETHOD(FinalConstruct)(void);
  44. void FinalRelease(void);
  45. // IPersist
  46. public:
  47. STDMETHOD(GetClassID)(LPCLSID pClsid);
  48. // IPersistStream
  49. public:
  50. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  51. STDMETHOD(Load)(IStream* pStream);
  52. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  53. // IWsbCollectable
  54. public:
  55. STDMETHOD(CompareTo)(IUnknown* pUnknown, SHORT* pResult);
  56. // IWsbTestable
  57. public:
  58. STDMETHOD(Test)(USHORT *passed, USHORT* failed);
  59. // IHsmSessionTotals
  60. public:
  61. STDMETHOD(Clone)(IHsmSessionTotals** ppSessionTotals);
  62. STDMETHOD(CompareToAction)(HSM_JOB_ACTION action, SHORT* pResult);
  63. STDMETHOD(CompareToISessionTotals)(IHsmSessionTotals* pTotal, SHORT* pResult);
  64. STDMETHOD(CopyTo)(IHsmSessionTotals* pSessionTotals);
  65. STDMETHOD(GetAction)(HSM_JOB_ACTION* pAction);
  66. STDMETHOD(GetName)(OLECHAR** pName, ULONG bufferSize);
  67. STDMETHOD(GetStats)(LONGLONG* pItems, LONGLONG* pSize, LONGLONG* pSkippedItems, LONGLONG* pSkippedSize, LONGLONG* errorItems, LONGLONG* errorSize);
  68. // IHsmSessionTotalsPriv
  69. STDMETHOD(AddItem)(IFsaScanItem* pItem, HRESULT hrItem);
  70. STDMETHOD(Clone)(IHsmSessionTotalsPriv** ppSessionTotalsPriv);
  71. STDMETHOD(CopyTo)(IHsmSessionTotalsPriv* pSessionTotalsPriv);
  72. STDMETHOD(SetAction)(HSM_JOB_ACTION pAction);
  73. STDMETHOD(SetStats)(LONGLONG items, LONGLONG size, LONGLONG skippedItems, LONGLONG skippedSize, LONGLONG errorItems, LONGLONG errorSize);
  74. protected:
  75. HSM_JOB_ACTION m_action;
  76. LONGLONG m_items;
  77. LONGLONG m_size;
  78. LONGLONG m_skippedItems;
  79. LONGLONG m_skippedSize;
  80. LONGLONG m_errorItems;
  81. LONGLONG m_errorSize;
  82. };
  83. #endif // _HSMSESST_