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.

57 lines
1.9 KiB

  1. //---------------------------------------------------------------------------
  2. // Notifier.h : CVDNotifier header file
  3. //
  4. // Copyright (c) 1996 Microsoft Corporation, All Rights Reserved
  5. // Developed by Sheridan Software Systems, Inc.
  6. //---------------------------------------------------------------------------
  7. #ifndef __CVDNOTIFIER__
  8. #define __CVDNOTIFIER__
  9. class CVDNotifier : public IUnknown
  10. {
  11. protected:
  12. // Construction/Destruction
  13. CVDNotifier();
  14. virtual ~CVDNotifier();
  15. protected:
  16. // Data members
  17. DWORD m_dwRefCount; // reference count
  18. CVDNotifier * m_pParent; // pointer to CVDNotifier derived parent
  19. CPtrArray m_Children; // pointer array of CVDNotifier derived children
  20. public:
  21. //=--------------------------------------------------------------------------=
  22. // IUnknown methods implemented
  23. //
  24. STDMETHOD(QueryInterface)(REFIID riid, void **ppvObjOut);
  25. STDMETHOD_(ULONG, AddRef)(void);
  26. STDMETHOD_(ULONG, Release)(void);
  27. HRESULT JoinFamily (CVDNotifier* pParent);
  28. HRESULT LeaveFamily();
  29. CVDNotifier* GetParent () const { return m_pParent; }
  30. virtual HRESULT NotifyBefore(DWORD, ULONG, CURSOR_DBNOTIFYREASON[]);
  31. virtual HRESULT NotifyAfter (DWORD, ULONG, CURSOR_DBNOTIFYREASON[]);
  32. virtual HRESULT NotifyFail (DWORD, ULONG, CURSOR_DBNOTIFYREASON[]);
  33. protected:
  34. // helper functions
  35. HRESULT AddChild (CVDNotifier* pChild);
  36. HRESULT DeleteChild(CVDNotifier* pChild);
  37. virtual HRESULT NotifyOKToDo (DWORD, ULONG, CURSOR_DBNOTIFYREASON[]);
  38. virtual HRESULT NotifySyncBefore(DWORD, ULONG, CURSOR_DBNOTIFYREASON[]);
  39. virtual HRESULT NotifyAboutToDo (DWORD, ULONG, CURSOR_DBNOTIFYREASON[]);
  40. virtual HRESULT NotifySyncAfter (DWORD, ULONG, CURSOR_DBNOTIFYREASON[]);
  41. virtual HRESULT NotifyDidEvent (DWORD, ULONG, CURSOR_DBNOTIFYREASON[]);
  42. virtual HRESULT NotifyCancel (DWORD, ULONG, CURSOR_DBNOTIFYREASON[]);
  43. };
  44. #endif //__CVDNOTIFIER__