Now using the NT CD interface.
[wine] / dlls / quartz / sysclock.h
1 #ifndef WINE_DSHOW_SYSCLOCK_H
2 #define WINE_DSHOW_SYSCLOCK_H
3
4 /*
5                 implements CLSID_SystemClock.
6
7         - At least, the following interfaces should be implemented:
8
9         IUnknown
10                 + IReferenceClock
11
12 */
13
14 #include "iunk.h"
15
16 typedef struct SC_IReferenceClockImpl
17 {
18         ICOM_VFIELD(IReferenceClock);
19 } SC_IReferenceClockImpl;
20
21
22 /* implementation limit */
23 #define WINE_QUARTZ_SYSCLOCK_TIMER_MAX  64
24
25 typedef struct QUARTZ_TimerEntry
26 {
27         DWORD                   dwAdvCookie;
28         BOOL                    fPeriodic;
29         HANDLE                  hEvent;
30         REFERENCE_TIME  rtStart;
31         REFERENCE_TIME  rtInterval;
32 } QUARTZ_TimerEntry;
33
34 typedef struct CSystemClock
35 {
36         QUARTZ_IUnkImpl unk;
37         SC_IReferenceClockImpl  refclk;
38
39         /* IReferenceClock fields. */
40         CRITICAL_SECTION        m_csClock;
41         DWORD   m_dwTimeLast;
42         REFERENCE_TIME  m_rtLast;
43         HANDLE  m_hThreadTimer;
44         HANDLE  m_hEventInit;
45         DWORD   m_idThreadTimer;
46
47         DWORD                   m_dwAdvCookieNext;
48         QUARTZ_TimerEntry       m_timerEntries[WINE_QUARTZ_SYSCLOCK_TIMER_MAX];
49 } CSystemClock;
50
51 #define CSystemClock_THIS(iface,member)         CSystemClock*   This = ((CSystemClock*)(((char*)iface)-offsetof(CSystemClock,member)))
52
53 HRESULT QUARTZ_CreateSystemClock(IUnknown* punkOuter,void** ppobj);
54
55 HRESULT CSystemClock_InitIReferenceClock( CSystemClock* psc );
56 void CSystemClock_UninitIReferenceClock( CSystemClock* psc );
57
58
59 #endif  /* WINE_DSHOW_SYSCLOCK_H */