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.

112 lines
2.8 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. fsarcvy.h
  5. Abstract:
  6. Header file for the diaster recovery class.
  7. Author:
  8. Ron White [ronw] 8-Sep-1997
  9. Revision History:
  10. --*/
  11. #ifndef _FSARCVY_
  12. #define _FSARCVY_
  13. #include "resource.h" // main symbols
  14. #include "wsbdb.h"
  15. #include "fsa.h"
  16. #include "fsaprv.h"
  17. #include "fsaprem.h"
  18. // FSA_RECOVERY_FLAG_* - status flags for Recovery records
  19. #define FSA_RECOVERY_FLAG_TRUNCATING 0x00000001
  20. #define FSA_RECOVERY_FLAG_RECALLING 0x00000002
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CFsaRecoveryRec
  23. class CFsaRecoveryRec :
  24. public CWsbDbEntity,
  25. public IFsaRecoveryRec,
  26. public CComCoClass<CFsaRecoveryRec,&CLSID_CFsaRecoveryRec>
  27. {
  28. public:
  29. CFsaRecoveryRec() {}
  30. BEGIN_COM_MAP(CFsaRecoveryRec)
  31. COM_INTERFACE_ENTRY(IFsaRecoveryRec)
  32. COM_INTERFACE_ENTRY2(IWsbDbEntity, CWsbDbEntity)
  33. COM_INTERFACE_ENTRY(IWsbDbEntityPriv)
  34. COM_INTERFACE_ENTRY(IPersistStream)
  35. COM_INTERFACE_ENTRY(IWsbCollectable)
  36. END_COM_MAP()
  37. //DECLARE_NO_REGISTRY()
  38. DECLARE_REGISTRY_RESOURCEID(IDR_FsaRecoveryRec)
  39. // IFsaRecoveryRec
  40. public:
  41. STDMETHOD(FinalConstruct)(void);
  42. STDMETHOD(FinalRelease)(void);
  43. // IPersist
  44. public:
  45. STDMETHOD(GetClassID)(LPCLSID pClsid);
  46. // IPersistStream
  47. public:
  48. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* /*pSize*/) {
  49. return(E_NOTIMPL); }
  50. STDMETHOD(Load)(IStream* pStream);
  51. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  52. // IWsbDbEntity
  53. public:
  54. STDMETHOD(Print)(IStream* pStream);
  55. STDMETHOD(UpdateKey)(IWsbDbKey *pKey);
  56. WSB_FROM_CWSBDBENTITY;
  57. // IWsbTestable
  58. STDMETHOD(Test)(USHORT* /*passed*/, USHORT* /*failed*/) {
  59. return(E_NOTIMPL); }
  60. // IFsaRecoveryRec
  61. public:
  62. STDMETHOD(GetBagId)(GUID* pId);
  63. STDMETHOD(GetBagOffset)(LONGLONG* pOffset);
  64. STDMETHOD(GetFileId)(LONGLONG* pFileId);
  65. STDMETHOD(GetOffsetSize)(LONGLONG *pOffset, LONGLONG* pSize);
  66. STDMETHOD(GetPath)(OLECHAR** ppPath, ULONG bufferSize);
  67. STDMETHOD(GetRecoveryCount)(LONG* pCount);
  68. STDMETHOD(GetStatus)(ULONG* pStatus);
  69. STDMETHOD(SetBagId)(GUID id);
  70. STDMETHOD(SetBagOffset)(LONGLONG offset);
  71. STDMETHOD(SetFileId)(LONGLONG FileId);
  72. STDMETHOD(SetOffsetSize)(LONGLONG Offset, LONGLONG Size);
  73. STDMETHOD(SetPath)(OLECHAR* pPath);
  74. STDMETHOD(SetRecoveryCount)(LONG Count);
  75. STDMETHOD(SetStatus)(ULONG Status);
  76. private:
  77. GUID m_BagId;
  78. LONGLONG m_BagOffset;
  79. LONGLONG m_FileId;
  80. LONGLONG m_Offset;
  81. CWsbStringPtr m_Path;
  82. LONG m_RecoveryCount;
  83. LONGLONG m_Size;
  84. ULONG m_Status; // FSA_RECOVERY_FLAG_* flags
  85. };
  86. #endif // _FSARCVY_