xref: /reactos/sdk/include/psdk/ocmm.idl (revision c2c66aff)
1/*
2 * Copyright 2006 Matthew Kehrer
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19import "oaidl.idl";
20import "ocidl.idl";
21
22cpp_quote("EXTERN_C const GUID NAMEDTIMER_DRAW;")
23
24[
25    object,
26    uuid(3050F361-98B5-11CF-BB82-00AA00BDCE0B),
27    pointer_default(unique)
28]
29interface ITimerSink : IUnknown
30{
31    HRESULT OnTimer([in] VARIANT vtimeAdvise);
32}
33
34
35[
36    object,
37    uuid(3050F360-98B5-11CF-BB82-00AA00BDCE0B),
38    pointer_default(unique)
39]
40interface ITimer : IUnknown
41{
42    HRESULT Advise([in] VARIANT vtimeMin,
43                   [in] VARIANT vtimeMax,
44                   [in] VARIANT vtimeInterval,
45                   [in] DWORD dwFlags,
46                   [in] ITimerSink *pTimerSink,
47                   [out] DWORD *pdwCookie);
48
49    HRESULT Unadvise([in] DWORD dwCookie);
50
51    HRESULT Freeze([in] BOOL fFreeze);
52
53    HRESULT GetTime([out] VARIANT *pvtime);
54}
55
56
57[
58    object,
59    uuid(3050F35F-98B5-11CF-BB82-00AA00BDCE0B),
60    pointer_default(unique)
61]
62interface ITimerService : IUnknown
63{
64    HRESULT CreateTimer([in] ITimer *pReferenceTimer,
65                        [out] ITimer **ppNewTimer);
66
67    HRESULT GetNamedTimer([in] REFGUID rguidName,
68                          [out] ITimer **ppTimer);
69
70    HRESULT SetNamedTimerReference([in] REFGUID rguidName,
71                                   [in] ITimer *pReferenceTimer);
72}
73
74cpp_quote("#define SID_STimerService IID_ITimerService")
75