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.

46 lines
1.4 KiB

  1. // Copyright (c) 1996-1999 Microsoft Corporation
  2. // clock.h
  3. #ifndef __CCLOCK_H__
  4. #define __CCLOCK_H__
  5. class CDSLink;
  6. class CClock : public IReferenceClock
  7. {
  8. public:
  9. /* IUnknown methods */
  10. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj);
  11. STDMETHOD_(ULONG, AddRef)(THIS);
  12. STDMETHOD_(ULONG, Release)(THIS);
  13. /* IReferenceClock methods */
  14. HRESULT STDMETHODCALLTYPE GetTime(
  15. /* [out] */ REFERENCE_TIME __RPC_FAR *pTime);
  16. HRESULT STDMETHODCALLTYPE AdviseTime(
  17. /* [in] */ REFERENCE_TIME baseTime,
  18. /* [in] */ REFERENCE_TIME streamTime,
  19. /* [in] */ HANDLE hEvent,
  20. /* [out] */ DWORD __RPC_FAR *pdwAdviseCookie);
  21. HRESULT STDMETHODCALLTYPE AdvisePeriodic(
  22. /* [in] */ REFERENCE_TIME startTime,
  23. /* [in] */ REFERENCE_TIME periodTime,
  24. /* [in] */ HANDLE hSemaphore,
  25. /* [out] */ DWORD __RPC_FAR *pdwAdviseCookie);
  26. HRESULT STDMETHODCALLTYPE Unadvise(
  27. /* [in] */ DWORD dwAdviseCookie);
  28. CClock();
  29. void Init(CDSLink *pDSLink);
  30. void Stop(); // Call store current time as offset.
  31. void Start(); // Call to reinstate running.
  32. private:
  33. BOOL m_fStopped; // Currently changing configuration.
  34. CDSLink * m_pDSLink; // Pointer to parent DSLink structure.
  35. };
  36. #endif //__CCLOCK_H__