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.

76 lines
1.4 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1996 - 2000
  3. Module Name:
  4. rswriter.h
  5. Abstract:
  6. This module defines the CRssJetWriter class.
  7. Author:
  8. Ran Kalach (rankala) 4/4/00
  9. --*/
  10. #ifndef _RSWRITER_
  11. #define _RSWRITER_
  12. #include <jetwriter.h>
  13. #include <rsevents.h>
  14. /*++
  15. Class Name:
  16. CRssJetWriter
  17. Class Description:
  18. This class is HSM implementation to the Jet-Writer base class, which synchronize
  19. a jet user application with snapshots mechanizm
  20. --*/
  21. #define WRITER_EVENTS_NUM (SYNC_STATE_EVENTS_NUM+1)
  22. #define INTERNAL_EVENT_INDEX 0
  23. #define INTERNAL_WAIT_TIMEOUT (10*1000) // 10 seconds
  24. class CRssJetWriter : public CVssJetWriter
  25. {
  26. // Constructors
  27. public:
  28. CRssJetWriter();
  29. // Destructor
  30. public:
  31. virtual ~CRssJetWriter();
  32. // Public methods
  33. public:
  34. HRESULT Init();
  35. HRESULT Terminate();
  36. // CVssJetWriter overloading
  37. virtual bool STDMETHODCALLTYPE OnFreezeBegin();
  38. virtual bool STDMETHODCALLTYPE OnThawEnd(IN bool fJetThawSucceeded);
  39. virtual void STDMETHODCALLTYPE OnAbortEnd();
  40. // Private methods
  41. protected:
  42. HRESULT InternalEnd(void);
  43. // Member Data
  44. protected:
  45. HRESULT m_hrInit;
  46. HANDLE m_syncHandles[WRITER_EVENTS_NUM];
  47. BOOL m_bTerminating;
  48. };
  49. #endif // _RSWRITER_