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.

137 lines
4.4 KiB

  1. #ifndef _FSAPOST_
  2. #define _FSAPOST_
  3. /*++
  4. 1998 Seagate Software, Inc. All rights reserved.
  5. Module Name:
  6. FSAPOST.cpp
  7. Abstract:
  8. This class contains represents a post it - a unit of work
  9. that is exchanged between the FSA and the HSM engine.
  10. Author:
  11. Cat Brant [cbrant] 1-Apr-1997
  12. Revision History:
  13. --*/
  14. #include "resource.h" // main symbols
  15. #include "job.h"
  16. #include "fsa.h"
  17. #include "fsaprv.h"
  18. /*++
  19. Class Name:
  20. CFsaScanItem
  21. Class Description:
  22. --*/
  23. class CFsaPostIt :
  24. public CWsbObject,
  25. public IFsaPostIt,
  26. public CComCoClass<CFsaPostIt,&CLSID_CFsaPostIt>
  27. {
  28. public:
  29. CFsaPostIt() {}
  30. BEGIN_COM_MAP(CFsaPostIt)
  31. COM_INTERFACE_ENTRY(IFsaPostIt)
  32. COM_INTERFACE_ENTRY(IPersistStream)
  33. COM_INTERFACE_ENTRY(IWsbCollectable)
  34. COM_INTERFACE_ENTRY(IWsbPersistStream)
  35. COM_INTERFACE_ENTRY(IWsbTestable)
  36. END_COM_MAP()
  37. DECLARE_REGISTRY_RESOURCEID(IDR_FsaPostIt)
  38. // CComObjectRoot
  39. public:
  40. STDMETHOD(FinalConstruct)(void);
  41. void FinalRelease(void);
  42. // IPersist
  43. public:
  44. STDMETHOD(GetClassID)(LPCLSID pClsid);
  45. // IPersistStream
  46. public:
  47. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  48. STDMETHOD(Load)(IStream* pStream);
  49. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  50. // IWsbCollectable
  51. public:
  52. STDMETHOD(CompareTo)(IUnknown* pUnknown, SHORT* pResult);
  53. WSB_FROM_CWSBOBJECT;
  54. // IWsbTestable
  55. STDMETHOD(Test)(USHORT *passed, USHORT* failed);
  56. // IFsaPostItPriv
  57. public:
  58. // IFsaPostIt
  59. public:
  60. STDMETHOD(CompareToIPostIt)(IFsaPostIt* pPostIt, SHORT* pResult);
  61. STDMETHOD(GetFileVersionId)(LONGLONG *pFileVersionId);
  62. STDMETHOD(GetFilterRecall)(IFsaFilterRecall** ppRecall);
  63. STDMETHOD(GetMode)(ULONG *pMode);
  64. STDMETHOD(GetPath)(OLECHAR ** pPath, ULONG bufferSize);
  65. STDMETHOD(GetPlaceholder)(FSA_PLACEHOLDER *pPlaceholder);
  66. STDMETHOD(GetRequestAction)(FSA_REQUEST_ACTION *pRequestAction);
  67. STDMETHOD(GetRequestOffset)(LONGLONG *pRequestOffset);
  68. STDMETHOD(GetRequestSize)(LONGLONG *pRequestSize);
  69. STDMETHOD(GetResult)(HRESULT *pHr);
  70. STDMETHOD(GetResultAction)(FSA_RESULT_ACTION *pResultAction);
  71. STDMETHOD(GetSession)(IHsmSession **pSession);
  72. STDMETHOD(GetStoragePoolId)(GUID *pStoragePoolId);
  73. STDMETHOD(GetUSN)(LONGLONG *pUsn);
  74. STDMETHOD(GetThreadId)(DWORD *threadId);
  75. STDMETHOD(SetFileVersionId)(LONGLONG fileVersionId);
  76. STDMETHOD(SetFilterRecall)(IFsaFilterRecall* pRecall);
  77. STDMETHOD(SetMode)(ULONG mode);
  78. STDMETHOD(SetPath)(OLECHAR * path);
  79. STDMETHOD(SetPlaceholder)(FSA_PLACEHOLDER *pPlaceholder);
  80. STDMETHOD(SetRequestAction)(FSA_REQUEST_ACTION requestAction);
  81. STDMETHOD(SetRequestOffset)(LONGLONG requestOffset);
  82. STDMETHOD(SetRequestSize)(LONGLONG requestSize);
  83. STDMETHOD(SetResult)(HRESULT hr);
  84. STDMETHOD(SetResultAction)(FSA_RESULT_ACTION pResultAction);
  85. STDMETHOD(SetSession)(IHsmSession *pSession);
  86. STDMETHOD(SetStoragePoolId)(GUID storagePoolId);
  87. STDMETHOD(SetUSN)(LONGLONG usn);
  88. STDMETHOD(SetThreadId)(DWORD threadId);
  89. protected:
  90. CComPtr<IFsaFilterRecall> m_pFilterRecall; // FSA filter recall that is tracking this recall
  91. CComPtr<IHsmSession> m_pSession; // HSM session that generated the PostIt
  92. GUID m_storagePoolId; // Storage pool to receive data (manage only)
  93. ULONG m_mode; // File open mode (filter recall only)
  94. FSA_REQUEST_ACTION m_requestAction; // Action for engine to take
  95. FSA_RESULT_ACTION m_resultAction; // Action for FSA to take when engine is done
  96. LONGLONG m_fileVersionId; // Version of the file (manage and recall)
  97. LONGLONG m_requestOffset; // The starting offset of the section to be managed (manage and recall)
  98. LONGLONG m_requestSize; // The length of the section to be managed (manage and recall)
  99. FSA_PLACEHOLDER m_placeholder; // File placeholder information
  100. CWsbStringPtr m_path; // Path of file name from root of resource, callee must free this memory
  101. HRESULT m_hr; // Result of the FSA_REQUEST_ACTION
  102. LONGLONG m_usn; // USN of the file
  103. DWORD m_threadId; // id of thread causing recall
  104. };
  105. #endif // _FSAPOST_