po: Update Lithuanian translation.
[wine.git] / include / mstask.idl
blob703ae01c2743b997ca5a0a34b2e7d03872d6cb01
1 /*
2 * Task Scheduler Service interface
4 * Copyright (C) 2008 Google (Roy Shea)
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.
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.
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
22 import "oaidl.idl";
23 import "oleidl.idl";
25 #ifndef __WIDL__
26 #define threading(model)
27 #define progid(str)
28 #define vi_progid(str)
29 #endif
31 cpp_quote("#define TASK_SUNDAY 0x1")
32 cpp_quote("#define TASK_MONDAY 0x2")
33 cpp_quote("#define TASK_TUESDAY 0x4")
34 cpp_quote("#define TASK_WEDNESDAY 0x8")
35 cpp_quote("#define TASK_THURSDAY 0x10")
36 cpp_quote("#define TASK_FRIDAY 0x20")
37 cpp_quote("#define TASK_SATURDAY 0x40")
39 cpp_quote("#define TASK_FIRST_WEEK 1")
40 cpp_quote("#define TASK_SECOND_WEEK 2")
41 cpp_quote("#define TASK_THIRD_WEEK 3")
42 cpp_quote("#define TASK_FOURTH_WEEK 4")
43 cpp_quote("#define TASK_LAST_WEEK 5")
45 cpp_quote("#define TASK_JANUARY 0x1")
46 cpp_quote("#define TASK_FEBRUARY 0x2")
47 cpp_quote("#define TASK_MARCH 0x4")
48 cpp_quote("#define TASK_APRIL 0x8")
49 cpp_quote("#define TASK_MAY 0x10")
50 cpp_quote("#define TASK_JUNE 0x20")
51 cpp_quote("#define TASK_JULY 0x40")
52 cpp_quote("#define TASK_AUGUST 0x80")
53 cpp_quote("#define TASK_SEPTEMBER 0x100")
54 cpp_quote("#define TASK_OCTOBER 0x200")
55 cpp_quote("#define TASK_NOVEMBER 0x400")
56 cpp_quote("#define TASK_DECEMBER 0x800")
58 cpp_quote("#define TASK_FLAG_INTERACTIVE 0x0001")
59 cpp_quote("#define TASK_FLAG_DELETE_WHEN_DONE 0x0002")
60 cpp_quote("#define TASK_FLAG_DISABLED 0x0004")
61 cpp_quote("#define TASK_FLAG_START_ONLY_IF_IDLE 0x0010")
62 cpp_quote("#define TASK_FLAG_KILL_ON_IDLE_END 0x0020")
63 cpp_quote("#define TASK_FLAG_DONT_START_IF_ON_BATTERIES 0x0040")
64 cpp_quote("#define TASK_FLAG_KILL_IF_GOING_ON_BATTERIES 0x0080")
65 cpp_quote("#define TASK_FLAG_RUN_ONLY_IF_DOCKED 0x0100")
66 cpp_quote("#define TASK_FLAG_HIDDEN 0x0200")
67 cpp_quote("#define TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET 0x0400")
68 cpp_quote("#define TASK_FLAG_RESTART_ON_IDLE_RESUME 0x0800")
69 cpp_quote("#define TASK_FLAG_SYSTEM_REQUIRED 0x1000")
70 cpp_quote("#define TASK_FLAG_RUN_ONLY_IF_LOGGED_ON 0x2000")
72 cpp_quote("#define TASK_TRIGGER_FLAG_HAS_END_DATE 0x1")
73 cpp_quote("#define TASK_TRIGGER_FLAG_KILL_AT_DURATION_END 0x2")
74 cpp_quote("#define TASK_TRIGGER_FLAG_DISABLED 0x4")
77 local,
78 object,
79 uuid(148BD528-A2AB-11CE-B11F-00AA00530503),
80 pointer_default(unique)
82 interface IEnumWorkItems : IUnknown
84 HRESULT Next(
85 [in] ULONG celt,
86 [out] LPWSTR **rgpwszNames,
87 [out] ULONG *pceltFetched);
89 HRESULT Skip(
90 [in] ULONG celt);
92 HRESULT Reset();
94 HRESULT Clone(
95 [out] IEnumWorkItems **ppEnumWorkItems);
98 cpp_quote("#ifndef _HPROPSHEETPAGE_DEFINED")
99 typedef struct _PSP *HPROPSHEETPAGE;
100 cpp_quote("#define _HPROPSHEETPAGE_DEFINED")
101 cpp_quote("#endif")
104 local,
105 object,
106 uuid(4086658a-cbbb-11cf-b604-00c04fd8d565),
107 pointer_default(unique)
109 interface IProvideTaskPage : IUnknown
111 typedef enum _TASKPAGE {
112 TASKPAGE_TASK = 0,
113 TASKPAGE_SCHEDULE = 1,
114 TASKPAGE_SETTINGS = 2
115 } TASKPAGE;
117 HRESULT GetPage(
118 [in] TASKPAGE tpType,
119 [in] BOOL fPersistChanges,
120 [out] HPROPSHEETPAGE *phPage);
124 local,
125 object,
126 uuid(148BD52B-A2AB-11CE-B11F-00AA00530503),
127 pointer_default(unique)
129 interface ITaskTrigger : IUnknown
131 typedef enum _TASK_TRIGGER_TYPE {
132 TASK_TIME_TRIGGER_ONCE = 0,
133 TASK_TIME_TRIGGER_DAILY = 1,
134 TASK_TIME_TRIGGER_WEEKLY = 2,
135 TASK_TIME_TRIGGER_MONTHLYDATE = 3,
136 TASK_TIME_TRIGGER_MONTHLYDOW = 4,
137 TASK_EVENT_TRIGGER_ON_IDLE = 5,
138 TASK_EVENT_TRIGGER_AT_SYSTEMSTART = 6,
139 TASK_EVENT_TRIGGER_AT_LOGON = 7
140 } TASK_TRIGGER_TYPE, *PTASK_TRIGGER_TYPE;
142 typedef struct _DAILY {
143 WORD DaysInterval;
144 } DAILY;
146 typedef struct _WEEKLY {
147 WORD WeeksInterval;
148 WORD rgfDaysOfTheWeek;
149 } WEEKLY;
151 typedef struct _MONTHLYDATE {
152 DWORD rgfDays;
153 WORD rgfMonths;
154 } MONTHLYDATE;
156 typedef struct _MONTHLYDOW {
157 WORD wWhichWeek;
158 WORD rgfDaysOfTheWeek;
159 WORD rgfMonths;
160 } MONTHLYDOW;
162 typedef union _TRIGGER_TYPE_UNION {
163 DAILY Daily;
164 WEEKLY Weekly;
165 MONTHLYDATE MonthlyDate;
166 MONTHLYDOW MonthlyDOW;
167 } TRIGGER_TYPE_UNION;
169 typedef struct _TASK_TRIGGER {
170 WORD cbTriggerSize;
171 WORD Reserved1;
172 WORD wBeginYear;
173 WORD wBeginMonth;
174 WORD wBeginDay;
175 WORD wEndYear;
176 WORD wEndMonth;
177 WORD wEndDay;
178 WORD wStartHour;
179 WORD wStartMinute;
180 DWORD MinutesDuration;
181 DWORD MinutesInterval;
182 DWORD rgFlags;
183 TASK_TRIGGER_TYPE TriggerType;
184 TRIGGER_TYPE_UNION Type;
185 WORD Reserved2;
186 WORD wRandomMinutesInterval;
187 } TASK_TRIGGER, *PTASK_TRIGGER;
189 HRESULT SetTrigger(
190 [in] const PTASK_TRIGGER pTrigger);
192 HRESULT GetTrigger(
193 [out] PTASK_TRIGGER pTrigger);
195 HRESULT GetTriggerString(
196 [out] LPWSTR *ppwszTrigger);
200 local,
201 object,
202 uuid(a6b952f0-a4b1-11d0-997d-00aa006887ec),
203 pointer_default(unique)
205 interface IScheduledWorkItem : IUnknown
207 HRESULT CreateTrigger(
208 [out] WORD *piNewTrigger,
209 [out] ITaskTrigger **ppTrigger);
211 HRESULT DeleteTrigger(
212 [in] WORD iTrigger);
214 HRESULT GetTriggerCount(
215 [out] WORD *plCount);
217 HRESULT GetTrigger(
218 [in] WORD iTrigger,
219 [out] ITaskTrigger **ppTrigger);
221 HRESULT GetTriggerString(
222 [in] WORD iTrigger,
223 [out] LPWSTR *ppwszTrigger);
225 HRESULT GetRunTimes(
226 [in] const LPSYSTEMTIME pstBegin,
227 [in] const LPSYSTEMTIME pstEnd,
228 [in, out] WORD *pCount,
229 [out] LPSYSTEMTIME *rgstTaskTimes);
231 HRESULT GetNextRunTime(
232 [out] SYSTEMTIME *pstNextRun);
234 HRESULT SetIdleWait(
235 [in] WORD wIdleMinutes,
236 [in] WORD wDeadlineMinutes);
238 HRESULT GetIdleWait(
239 [out] WORD *pwIdleMinutes,
240 [out] WORD *pwDeadlineMinutes);
242 HRESULT Run();
244 HRESULT Terminate();
246 HRESULT EditWorkItem(
247 [in] HWND hParent,
248 [in] DWORD dwReserved);
250 HRESULT GetMostRecentRunTime(
251 [out] SYSTEMTIME *pstLastRun);
253 HRESULT GetStatus(
254 [out] HRESULT *phrStatus);
256 HRESULT GetExitCode(
257 [out] DWORD *pdwExitCode);
259 HRESULT SetComment(
260 [in] LPCWSTR pwszComment);
262 HRESULT GetComment(
263 [out] LPWSTR *ppwszComment);
265 HRESULT SetCreator(
266 LPCWSTR pwszCreator);
268 HRESULT GetCreator(
269 [out] LPWSTR *ppwszCreator);
271 HRESULT SetWorkItemData(
272 [in] WORD cBytes,
273 [in] BYTE rgbData[]);
275 HRESULT GetWorkItemData(
276 [out] WORD *pcBytes,
277 [out] BYTE **ppBytes);
279 HRESULT SetErrorRetryCount(
280 WORD wRetryCount);
282 HRESULT GetErrorRetryCount(
283 [out] WORD *pwRetryCount);
285 HRESULT SetErrorRetryInterval(
286 WORD wRetryInterval);
288 HRESULT GetErrorRetryInterval(
289 [out] WORD *pwRetryInterval);
291 HRESULT SetFlags(
292 DWORD dwFlags);
294 HRESULT GetFlags(
295 [out] DWORD *pdwFlags);
297 HRESULT SetAccountInformation(
298 [in] LPCWSTR pwszAccountName,
299 [in] LPCWSTR pwszPassword);
301 HRESULT GetAccountInformation(
302 [out] LPWSTR *ppwszAccountName);
306 local,
307 object,
308 uuid(148BD524-A2AB-11CE-B11F-00AA00530503),
309 pointer_default(unique)
311 interface ITask : IScheduledWorkItem
313 HRESULT SetApplicationName(
314 [in] LPCWSTR pwszApplicationName);
316 HRESULT GetApplicationName(
317 [out] LPWSTR *ppwszApplicationName);
319 HRESULT SetParameters(
320 [in] LPCWSTR pwszParameters);
322 HRESULT GetParameters(
323 [out] LPWSTR *ppwszParameters);
325 HRESULT SetWorkingDirectory(
326 [in] LPCWSTR pwszWorkingDirectory);
328 HRESULT GetWorkingDirectory(
329 [in] LPWSTR *ppwszWorkingDirectory);
331 HRESULT SetPriority(
332 [in] DWORD dwPriority);
334 HRESULT GetPriority(
335 [out] DWORD *pdwPriority);
337 HRESULT SetTaskFlags(
338 [in] DWORD dwFlags);
340 HRESULT GetTaskFlags(
341 [out] DWORD *pdwFlags);
343 HRESULT SetMaxRunTime(
344 [in] DWORD dwMaxRunTime);
346 HRESULT GetMaxRunTime(
347 [out] DWORD *pdwMaxRunTime);
351 local,
352 object,
353 uuid(148BD527-A2AB-11CE-B11F-00AA00530503),
354 pointer_default(unique)
356 interface ITaskScheduler : IUnknown
358 HRESULT SetTargetComputer(
359 [in] LPCWSTR pwszComputer);
361 HRESULT GetTargetComputer(
362 [out] LPWSTR *ppwszComputer);
364 HRESULT Enum(
365 [out] IEnumWorkItems **ppEnumTasks);
367 HRESULT Activate(
368 [in] LPCWSTR pwszName,
369 [in] REFIID riid,
370 [out] IUnknown **ppunk);
372 HRESULT Delete(
373 [in] LPCWSTR pwszName);
375 HRESULT NewWorkItem(
376 [in] LPCWSTR pwszTaskName,
377 [in] REFCLSID rclsid,
378 [in] REFIID riid,
379 [out] IUnknown **ppunk);
381 HRESULT AddWorkItem(
382 [in] LPCWSTR pwszTaskName,
383 [in] IScheduledWorkItem *pWorkItem);
385 HRESULT IsOfType(
386 [in] LPCWSTR pwszName,
387 [in] REFIID riid);
391 threading(both),
392 uuid(148BD52A-A2AB-11CE-B11F-00AA00530503)
394 coclass CTaskScheduler
396 [default] interface ITaskScheduler;
401 threading(both),
402 uuid(148BD520-A2AB-11CE-B11F-00AA00530503)
404 coclass CTask
406 [default] interface ITask;