ReactOS 0.4.15-dev-8339-g4028de8
mstask.idl
Go to the documentation of this file.
1/*
2 * Task Scheduler Service interface
3 *
4 * Copyright (C) 2008 Google (Roy Shea)
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 *
20 */
21
22import "oaidl.idl";
23import "oleidl.idl";
24
25#ifndef __WIDL__
26#define threading(model)
27#define progid(str)
28#define vi_progid(str)
29#endif
30
31cpp_quote("#define TASK_SUNDAY 0x1")
32cpp_quote("#define TASK_MONDAY 0x2")
33cpp_quote("#define TASK_TUESDAY 0x4")
34cpp_quote("#define TASK_WEDNESDAY 0x8")
35cpp_quote("#define TASK_THURSDAY 0x10")
36cpp_quote("#define TASK_FRIDAY 0x20")
37cpp_quote("#define TASK_SATURDAY 0x40")
38
39cpp_quote("#define TASK_FIRST_WEEK 1")
40cpp_quote("#define TASK_SECOND_WEEK 2")
41cpp_quote("#define TASK_THIRD_WEEK 3")
42cpp_quote("#define TASK_FOURTH_WEEK 4")
43cpp_quote("#define TASK_LAST_WEEK 5")
44
45cpp_quote("#define TASK_JANUARY 0x1")
46cpp_quote("#define TASK_FEBRUARY 0x2")
47cpp_quote("#define TASK_MARCH 0x4")
48cpp_quote("#define TASK_APRIL 0x8")
49cpp_quote("#define TASK_MAY 0x10")
50cpp_quote("#define TASK_JUNE 0x20")
51cpp_quote("#define TASK_JULY 0x40")
52cpp_quote("#define TASK_AUGUST 0x80")
53cpp_quote("#define TASK_SEPTEMBER 0x100")
54cpp_quote("#define TASK_OCTOBER 0x200")
55cpp_quote("#define TASK_NOVEMBER 0x400")
56cpp_quote("#define TASK_DECEMBER 0x800")
57
58cpp_quote("#define TASK_TRIGGER_FLAG_HAS_END_DATE 0x1")
59cpp_quote("#define TASK_TRIGGER_FLAG_KILL_AT_DURATION_END 0x2")
60cpp_quote("#define TASK_TRIGGER_FLAG_DISABLED 0x4")
61
62#ifdef _MSC_VER
63cpp_quote("DEFINE_GUID(CLSID_CTaskScheduler, 0x148bd52a, 0xa2ab, 0x11ce, 0xb1,0x1f, 0x00,0xaa,0x00,0x53,0x05,0x03);")
64cpp_quote("DEFINE_GUID(CLSID_CTask, 0x148bd520, 0xa2ab, 0x11ce, 0xb1,0x1f, 0x00,0xaa,0x00,0x53,0x05,0x03);")
65#endif
66
67[
68 local,
69 object,
70 uuid(148BD528-A2AB-11CE-B11F-00AA00530503),
71 pointer_default(unique)
72]
73interface IEnumWorkItems : IUnknown
74{
75 HRESULT Next(
76 [in] ULONG celt,
77 [out] LPWSTR **rgpwszNames,
78 [out] ULONG *pceltFetched);
79
80 HRESULT Skip(
81 [in] ULONG celt);
82
83 HRESULT Reset();
84
85 HRESULT Clone(
86 [out] IEnumWorkItems **ppEnumWorkItems);
87}
88
89cpp_quote("#ifndef _HPROPSHEETPAGE_DEFINED")
90typedef struct _PSP *HPROPSHEETPAGE;
91cpp_quote("#define _HPROPSHEETPAGE_DEFINED")
92cpp_quote("#endif")
93
94[
95 local,
96 object,
97 uuid(4086658a-cbbb-11cf-b604-00c04fd8d565),
98 pointer_default(unique)
99]
100interface IProvideTaskPage : IUnknown
101{
102 typedef enum _TASKPAGE {
103 TASKPAGE_TASK = 0,
104 TASKPAGE_SCHEDULE = 1,
105 TASKPAGE_SETTINGS = 2
106 } TASKPAGE;
107
108 HRESULT GetPage(
109 [in] TASKPAGE tpType,
110 [in] BOOL fPersistChanges,
111 [out] HPROPSHEETPAGE *phPage);
112}
113
114[
115 local,
116 object,
117 uuid(148BD52B-A2AB-11CE-B11F-00AA00530503),
118 pointer_default(unique)
119]
120interface ITaskTrigger : IUnknown
121{
122 typedef enum _TASK_TRIGGER_TYPE {
123 TASK_TIME_TRIGGER_ONCE = 0,
124 TASK_TIME_TRIGGER_DAILY = 1,
125 TASK_TIME_TRIGGER_WEEKLY = 2,
126 TASK_TIME_TRIGGER_MONTHLYDATE = 3,
127 TASK_TIME_TRIGGER_MONTHLYDOW = 4,
128 TASK_EVENT_TRIGGER_ON_IDLE = 5,
129 TASK_EVENT_TRIGGER_AT_SYSTEMSTART = 6,
130 TASK_EVENT_TRIGGER_AT_LOGON = 7
131 } TASK_TRIGGER_TYPE, *PTASK_TRIGGER_TYPE;
132
133 typedef struct _DAILY {
134 WORD DaysInterval;
135 } DAILY;
136
137 typedef struct _WEEKLY {
138 WORD WeeksInterval;
139 WORD rgfDaysOfTheWeek;
140 } WEEKLY;
141
142 typedef struct _MONTHLYDATE {
143 DWORD rgfDays;
144 WORD rgfMonths;
145 } MONTHLYDATE;
146
147 typedef struct _MONTHLYDOW {
148 WORD wWhichWeek;
149 WORD rgfDaysOfTheWeek;
150 WORD rgfMonths;
151 } MONTHLYDOW;
152
153 typedef union _TRIGGER_TYPE_UNION {
154 DAILY Daily;
155 WEEKLY Weekly;
156 MONTHLYDATE MonthlyDate;
157 MONTHLYDOW MonthlyDOW;
158 } TRIGGER_TYPE_UNION;
159
160 typedef struct _TASK_TRIGGER {
161 WORD cbTriggerSize;
162 WORD Reserved1;
163 WORD wBeginYear;
164 WORD wBeginMonth;
165 WORD wBeginDay;
166 WORD wEndYear;
167 WORD wEndMonth;
168 WORD wEndDay;
169 WORD wStartHour;
170 WORD wStartMinute;
171 DWORD MinutesDuration;
172 DWORD MinutesInterval;
173 DWORD rgFlags;
174 TASK_TRIGGER_TYPE TriggerType;
175 TRIGGER_TYPE_UNION Type;
176 WORD Reserved2;
177 WORD wRandomMinutesInterval;
178 } TASK_TRIGGER, *PTASK_TRIGGER;
179
180 HRESULT SetTrigger(
181 [in] const PTASK_TRIGGER pTrigger);
182
183 HRESULT GetTrigger(
184 [out] PTASK_TRIGGER pTrigger);
185
186 HRESULT GetTriggerString(
187 [out] LPWSTR *ppwszTrigger);
188}
189
190[
191 local,
192 object,
193 uuid(a6b952f0-a4b1-11d0-997d-00aa006887ec),
194 pointer_default(unique)
195]
196interface IScheduledWorkItem : IUnknown
197{
198 HRESULT CreateTrigger(
199 [out] WORD *piNewTrigger,
200 [out] ITaskTrigger **ppTrigger);
201
202 HRESULT DeleteTrigger(
203 [in] WORD iTrigger);
204
205 HRESULT GetTriggerCount(
206 [out] WORD *plCount);
207
208 HRESULT GetTrigger(
209 [in] WORD iTrigger,
210 [out] ITaskTrigger **ppTrigger);
211
212 HRESULT GetTriggerString(
213 [in] WORD iTrigger,
214 [out] LPWSTR *ppwszTrigger);
215
216 HRESULT GetRunTimes(
217 [in] const LPSYSTEMTIME pstBegin,
218 [in] const LPSYSTEMTIME pstEnd,
219 [in, out] WORD *pCount,
220 [out] LPSYSTEMTIME *rgstTaskTimes);
221
222 HRESULT GetNextRunTime(
223 [out] SYSTEMTIME *pstNextRun);
224
225 HRESULT SetIdleWait(
226 [in] WORD wIdleMinutes,
227 [in] WORD wDeadlineMinutes);
228
229 HRESULT GetIdleWait(
230 [out] WORD *pwIdleMinutes,
231 [out] WORD *pwDeadlineMinutes);
232
233 HRESULT Run();
234
235 HRESULT Terminate();
236
237 HRESULT EditWorkItem(
238 [in] HWND hParent,
239 [in] DWORD dwReserved);
240
241 HRESULT GetMostRecentRunTime(
242 [out] SYSTEMTIME *pstLastRun);
243
244 HRESULT GetStatus(
245 [out] HRESULT *phrStatus);
246
247 HRESULT GetExitCode(
248 [out] DWORD *pdwExitCode);
249
250 HRESULT SetComment(
251 [in] LPCWSTR pwszComment);
252
253 HRESULT GetComment(
254 [out] LPWSTR *ppwszComment);
255
256 HRESULT SetCreator(
257 LPCWSTR pwszCreator);
258
259 HRESULT GetCreator(
260 [out] LPWSTR *ppwszCreator);
261
262 HRESULT SetWorkItemData(
263 [in] WORD cBytes,
264 [in] BYTE rgbData[]);
265
266 HRESULT GetWorkItemData(
267 [out] WORD *pcBytes,
268 [out] BYTE **ppBytes);
269
270 HRESULT SetErrorRetryCount(
271 WORD wRetryCount);
272
273 HRESULT GetErrorRetryCount(
274 [out] WORD *pwRetryCount);
275
276 HRESULT SetErrorRetryInterval(
277 WORD wRetryInterval);
278
279 HRESULT GetErrorRetryInterval(
280 [out] WORD *pwRetryInterval);
281
282 HRESULT SetFlags(
283 DWORD dwFlags);
284
285 HRESULT GetFlags(
286 [out] DWORD *pdwFlags);
287
288 HRESULT SetAccountInformation(
289 [in] LPCWSTR pwszAccountName,
290 [in] LPCWSTR pwszPassword);
291
292 HRESULT GetAccountInformation(
293 [out] LPWSTR *ppwszAccountName);
294}
295
296[
297 local,
298 object,
299 uuid(148BD524-A2AB-11CE-B11F-00AA00530503),
300 pointer_default(unique)
301]
302interface ITask : IScheduledWorkItem
303{
304 HRESULT SetApplicationName(
305 [in] LPCWSTR pwszApplicationName);
306
307 HRESULT GetApplicationName(
308 [out] LPWSTR *ppwszApplicationName);
309
310 HRESULT SetParameters(
311 [in] LPCWSTR pwszParameters);
312
313 HRESULT GetParameters(
314 [out] LPWSTR *ppwszParameters);
315
316 HRESULT SetWorkingDirectory(
317 [in] LPCWSTR pwszWorkingDirectory);
318
319 HRESULT GetWorkingDirectory(
320 [in] LPWSTR *ppwszWorkingDirectory);
321
322 HRESULT SetPriority(
323 [in] DWORD dwPriority);
324
325 HRESULT GetPriority(
326 [out] DWORD *pdwPriority);
327
328 HRESULT SetTaskFlags(
329 [in] DWORD dwFlags);
330
331 HRESULT GetTaskFlags(
332 [out] DWORD *pdwFlags);
333
334 HRESULT SetMaxRunTime(
335 [in] DWORD dwMaxRunTime);
336
337 HRESULT GetMaxRunTime(
338 [out] DWORD *pdwMaxRunTime);
339}
340
341[
342 local,
343 object,
344 uuid(148BD527-A2AB-11CE-B11F-00AA00530503),
345 pointer_default(unique)
346]
347interface ITaskScheduler : IUnknown
348{
349 HRESULT SetTargetComputer(
350 [in] LPCWSTR pwszComputer);
351
352 HRESULT GetTargetComputer(
353 [out] LPWSTR *ppwszComputer);
354
355 HRESULT Enum(
356 [out] IEnumWorkItems **ppEnumTasks);
357
358 HRESULT Activate(
359 [in] LPCWSTR pwszName,
360 [in] REFIID riid,
361 [out] IUnknown **ppunk);
362
363 HRESULT Delete(
364 [in] LPCWSTR pwszName);
365
366 HRESULT NewWorkItem(
367 [in] LPCWSTR pwszTaskName,
368 [in] REFCLSID rclsid,
369 [in] REFIID riid,
370 [out] IUnknown **ppunk);
371
372 HRESULT AddWorkItem(
373 [in] LPCWSTR pwszTaskName,
374 [in] IScheduledWorkItem *pWorkItem);
375
376 HRESULT IsOfType(
377 [in] LPCWSTR pwszName,
378 [in] REFIID riid);
379}
380
381[
382 threading(both),
383 uuid(148BD52A-A2AB-11CE-B11F-00AA00530503)
384]
385coclass CTaskScheduler
386{
387 [default] interface ITaskScheduler;
388};
389
390
391[
392 threading(both),
393 uuid(148BD520-A2AB-11CE-B11F-00AA00530503)
394]
395coclass CTask
396{
397 [default] interface ITask;
398};
CD3D10_BUFFER_DESC D3D10_BUFFER_DESC cpp_quote(" ~CD3D10_BUFFER_DESC() {}") operator const D3D10_BUFFER_DESC &() const
Definition: d3d10.idl:491