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.

146 lines
3.8 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. ijetwriter.h
  5. Abstract:
  6. Definition of CVssIJetWriter class
  7. Brian Berkowitz [brianb] 3/17/2000
  8. TBD:
  9. Add comments.
  10. Revision History:
  11. Name Date Comments
  12. brianb 03/17/2000 Created
  13. mikejohn 04/03/2000 Added extra methods for OnIdentify()
  14. mikejohn 05/10/2000 Updated VS_FLUSH_TYPE to VSS_FLUSH_TYPE
  15. mikejohn 09/20/2000 176860: Added calling convention methods where missing
  16. --*/
  17. class CVssJetWriter;
  18. class CVssIJetWriter;
  19. class IVssCreateWriterMetadata;
  20. class IVssWriterComponents;
  21. typedef CVssJetWriter *PVSSJETWRITER;
  22. // actual writer class
  23. class CVssJetWriter
  24. {
  25. // Constructors and destructors
  26. public:
  27. __declspec(dllexport)
  28. STDMETHODCALLTYPE CVssJetWriter() :
  29. m_pWriter(NULL)
  30. {
  31. }
  32. __declspec(dllexport)
  33. virtual STDMETHODCALLTYPE ~CVssJetWriter();
  34. __declspec(dllexport)
  35. HRESULT STDMETHODCALLTYPE Initialize(IN GUID idWriter,
  36. IN LPCWSTR wszWriterName,
  37. IN bool bSystemService,
  38. IN bool bBootableSystemState,
  39. IN LPCWSTR wszFilesToInclude,
  40. IN LPCWSTR wszFilesToExclude);
  41. __declspec(dllexport)
  42. void STDMETHODCALLTYPE Uninitialize();
  43. // callback for identify event
  44. __declspec(dllexport)
  45. virtual bool STDMETHODCALLTYPE OnIdentify(IN IVssCreateWriterMetadata *pMetadata);
  46. // called at Prepare to backup
  47. __declspec(dllexport)
  48. virtual bool STDMETHODCALLTYPE OnPrepareBackupBegin(IN IVssWriterComponents *pIVssWriterComponents);
  49. __declspec(dllexport)
  50. virtual bool STDMETHODCALLTYPE OnPrepareBackupEnd(IN IVssWriterComponents *pIVssWriterComponents,
  51. IN bool fJetPrepareSucceeded);
  52. // called at Prepare for snasphot
  53. __declspec(dllexport)
  54. virtual bool STDMETHODCALLTYPE OnPrepareSnapshotBegin();
  55. __declspec(dllexport)
  56. virtual bool STDMETHODCALLTYPE OnPrepareSnapshotEnd(IN bool fJetPrepareSucceeded);
  57. // called at freeze
  58. __declspec(dllexport)
  59. virtual bool STDMETHODCALLTYPE OnFreezeBegin();
  60. __declspec(dllexport)
  61. virtual bool STDMETHODCALLTYPE OnFreezeEnd(IN bool fJetFreezeSucceeded);
  62. // called at thaw
  63. __declspec(dllexport)
  64. virtual bool STDMETHODCALLTYPE OnThawBegin();
  65. __declspec(dllexport)
  66. virtual bool STDMETHODCALLTYPE OnThawEnd(IN bool fJetThawSucceeded);
  67. // called at OnPostSnapshot
  68. __declspec(dllexport)
  69. virtual bool STDMETHODCALLTYPE OnPostSnapshot(IN IVssWriterComponents *pIVssWriterComponents);
  70. // called when abort occurs
  71. __declspec(dllexport)
  72. virtual void STDMETHODCALLTYPE OnAbortBegin();
  73. __declspec(dllexport)
  74. virtual void STDMETHODCALLTYPE OnAbortEnd();
  75. // callback on backup complete event
  76. __declspec(dllexport)
  77. virtual bool STDMETHODCALLTYPE OnBackupCompleteBegin(IN IVssWriterComponents *pComponent);
  78. __declspec(dllexport)
  79. virtual bool STDMETHODCALLTYPE OnBackupCompleteEnd(IN IVssWriterComponents *pComponent,
  80. IN bool fJetBackupCompleteSucceeded);
  81. // called when restore begins
  82. __declspec(dllexport)
  83. virtual bool STDMETHODCALLTYPE OnPreRestoreBegin(IN IVssWriterComponents *pIVssWriterComponents);
  84. __declspec(dllexport)
  85. virtual bool STDMETHODCALLTYPE OnPreRestoreEnd(IN IVssWriterComponents *pIVssWriterComponents,
  86. IN bool fJetRestoreSucceeded);
  87. // called when restore begins
  88. __declspec(dllexport)
  89. virtual bool STDMETHODCALLTYPE OnPostRestoreBegin(IN IVssWriterComponents *pIVssWriterComponents);
  90. __declspec(dllexport)
  91. virtual bool STDMETHODCALLTYPE OnPostRestoreEnd(IN IVssWriterComponents *pIVssWriterComponents,
  92. IN bool fJetRestoreSucceeded);
  93. private:
  94. // internal writer object
  95. VOID *m_pWriter;
  96. // result of initialization
  97. HRESULT m_hrInitialized;
  98. // internal thread func function
  99. static DWORD InitializeThreadFunc(void *pv);
  100. };