ReactOS  0.4.14-dev-583-g2a1ba2c
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 
22 import "oaidl.idl";
23 import "oleidl.idl";
24 
25 #ifndef __WIDL__
26 #define threading(model)
27 #define progid(str)
28 #define vi_progid(str)
29 #endif
30 
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")
38 
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")
44 
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")
57 
58 cpp_quote("#define TASK_TRIGGER_FLAG_HAS_END_DATE 0x1")
59 cpp_quote("#define TASK_TRIGGER_FLAG_KILL_AT_DURATION_END 0x2")
60 cpp_quote("#define TASK_TRIGGER_FLAG_DISABLED 0x4")
61 
62 #ifdef _MSC_VER
63 cpp_quote("DEFINE_GUID(CLSID_CTaskScheduler, 0x148bd52a, 0xa2ab, 0x11ce, 0xb1,0x1f, 0x00,0xaa,0x00,0x53,0x05,0x03);")
64 cpp_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),
72 ]
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 
89 cpp_quote("#ifndef _HPROPSHEETPAGE_DEFINED")
90 typedef struct _PSP *HPROPSHEETPAGE;
91 cpp_quote("#define _HPROPSHEETPAGE_DEFINED")
92 cpp_quote("#endif")
93 
94 [
95  local,
96  object,
97  uuid(4086658a-cbbb-11cf-b604-00c04fd8d565),
99 ]
101 {
102  typedef enum _TASKPAGE {
106  } TASKPAGE;
107 
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),
119 ]
121 {
122  typedef enum _TASK_TRIGGER_TYPE {
132 
133  typedef struct _DAILY {
135  } DAILY;
136 
137  typedef struct _WEEKLY {
140  } WEEKLY;
141 
142  typedef struct _MONTHLYDATE {
145  } MONTHLYDATE;
146 
147  typedef struct _MONTHLYDOW {
151  } MONTHLYDOW;
152 
153  typedef union _TRIGGER_TYPE_UNION {
159 
160  typedef struct _TASK_TRIGGER {
179 
181  [in] const PTASK_TRIGGER pTrigger);
182 
184  [out] PTASK_TRIGGER pTrigger);
185 
187  [out] LPWSTR *ppwszTrigger);
188 }
189 
190 [
191  local,
192  object,
193  uuid(a6b952f0-a4b1-11d0-997d-00aa006887ec),
195 ]
197 {
199  [out] WORD *piNewTrigger,
200  [out] ITaskTrigger **ppTrigger);
201 
203  [in] WORD iTrigger);
204 
206  [out] WORD *plCount);
207 
209  [in] WORD iTrigger,
210  [out] ITaskTrigger **ppTrigger);
211 
213  [in] WORD iTrigger,
214  [out] LPWSTR *ppwszTrigger);
215 
217  [in] const LPSYSTEMTIME pstBegin,
218  [in] const LPSYSTEMTIME pstEnd,
219  [in, out] WORD *pCount,
220  [out] LPSYSTEMTIME *rgstTaskTimes);
221 
223  [out] SYSTEMTIME *pstNextRun);
224 
226  [in] WORD wIdleMinutes,
227  [in] WORD wDeadlineMinutes);
228 
230  [out] WORD *pwIdleMinutes,
231  [out] WORD *pwDeadlineMinutes);
232 
233  HRESULT Run();
234 
235  HRESULT Terminate();
236 
238  [in] HWND hParent,
239  [in] DWORD dwReserved);
240 
242  [out] SYSTEMTIME *pstLastRun);
243 
245  [out] HRESULT *phrStatus);
246 
248  [out] DWORD *pdwExitCode);
249 
251  [in] LPCWSTR pwszComment);
252 
254  [out] LPWSTR *ppwszComment);
255 
257  LPCWSTR pwszCreator);
258 
260  [out] LPWSTR *ppwszCreator);
261 
263  [in] WORD cBytes,
264  [in] BYTE rgbData[]);
265 
267  [out] WORD *pcBytes,
268  [out] BYTE **ppBytes);
269 
271  WORD wRetryCount);
272 
274  [out] WORD *pwRetryCount);
275 
277  WORD wRetryInterval);
278 
280  [out] WORD *pwRetryInterval);
281 
283  DWORD dwFlags);
284 
286  [out] DWORD *pdwFlags);
287 
289  [in] LPCWSTR pwszAccountName,
290  [in] LPCWSTR pwszPassword);
291 
293  [out] LPWSTR *ppwszAccountName);
294 }
295 
296 [
297  local,
298  object,
299  uuid(148BD524-A2AB-11CE-B11F-00AA00530503),
301 ]
303 {
305  [in] LPCWSTR pwszApplicationName);
306 
308  [out] LPWSTR *ppwszApplicationName);
309 
311  [in] LPCWSTR pwszParameters);
312 
314  [out] LPWSTR *ppwszParameters);
315 
317  [in] LPCWSTR pwszWorkingDirectory);
318 
320  [in] LPWSTR *ppwszWorkingDirectory);
321 
323  [in] DWORD dwPriority);
324 
326  [out] DWORD *pdwPriority);
327 
329  [in] DWORD dwFlags);
330 
332  [out] DWORD *pdwFlags);
333 
335  [in] DWORD dwMaxRunTime);
336 
338  [out] DWORD *pdwMaxRunTime);
339 }
340 
341 [
342  local,
343  object,
344  uuid(148BD527-A2AB-11CE-B11F-00AA00530503),
346 ]
348 {
350  [in] LPCWSTR pwszComputer);
351 
353  [out] LPWSTR *ppwszComputer);
354 
355  HRESULT Enum(
356  [out] IEnumWorkItems **ppEnumTasks);
357 
359  [in] LPCWSTR pwszName,
360  [in] REFIID riid,
361  [out] IUnknown **ppunk);
362 
363  HRESULT Delete(
364  [in] LPCWSTR pwszName);
365 
367  [in] LPCWSTR pwszTaskName,
368  [in] REFCLSID rclsid,
369  [in] REFIID riid,
370  [out] IUnknown **ppunk);
371 
373  [in] LPCWSTR pwszTaskName,
374  [in] IScheduledWorkItem *pWorkItem);
375 
377  [in] LPCWSTR pwszName,
378  [in] REFIID riid);
379 }
380 
381 [
382  threading(both),
383  uuid(148BD52A-A2AB-11CE-B11F-00AA00530503)
384 ]
386 {
387  [default] interface ITaskScheduler;
388 };
389 
390 
391 [
392  threading(both),
393  uuid(148BD520-A2AB-11CE-B11F-00AA00530503)
394 ]
395 coclass CTask
396 {
397  [default] interface ITask;
398 };
TASK_TRIGGER_TYPE TriggerType
Definition: mstask.idl:174
HRESULT SetFlags(DWORD dwFlags)
#define REFIID
Definition: guiddef.h:118
HRESULT SetTaskFlags([in] DWORD dwFlags)
HRESULT GetFlags([out] DWORD *pdwFlags)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HRESULT GetTriggerString([in] WORD iTrigger, [out] LPWSTR *ppwszTrigger)
struct ITaskTrigger::_TASK_TRIGGER * PTASK_TRIGGER
REFIID riid
Definition: precomp.h:44
#define REFCLSID
Definition: guiddef.h:117
HRESULT GetTriggerCount([out] WORD *plCount)
HRESULT GetErrorRetryCount([out] WORD *pwRetryCount)
struct ITaskTrigger::_MONTHLYDOW MONTHLYDOW
enum ITaskTrigger::_TASK_TRIGGER_TYPE * PTASK_TRIGGER_TYPE
coclass AMMultiMediaStream cpp_quote("DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);") cpp_quote("DEFINE_GUID(CLSID_AMAudioStream
HRESULT AddWorkItem([in] LPCWSTR pwszTaskName, [in] IScheduledWorkItem *pWorkItem)
HRESULT SetErrorRetryInterval(WORD wRetryInterval)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
unsigned int BOOL
Definition: ntddk_ex.h:94
HRESULT GetPage([in] TASKPAGE tpType, [in] BOOL fPersistChanges, [out] HPROPSHEETPAGE *phPage)
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
HRESULT GetTrigger([in] WORD iTrigger, [out] ITaskTrigger **ppTrigger)
HRESULT GetTrigger([out] PTASK_TRIGGER pTrigger)
HRESULT GetRunTimes([in] const LPSYSTEMTIME pstBegin, [in] const LPSYSTEMTIME pstEnd, [in, out] WORD *pCount, [out] LPSYSTEMTIME *rgstTaskTimes)
HRESULT GetMaxRunTime([out] DWORD *pdwMaxRunTime)
HRESULT CreateTrigger([out] WORD *piNewTrigger, [out] ITaskTrigger **ppTrigger)
HRESULT GetTargetComputer([out] LPWSTR *ppwszComputer)
HRESULT GetIdleWait([out] WORD *pwIdleMinutes, [out] WORD *pwDeadlineMinutes)
HRESULT Enum([out] IEnumWorkItems **ppEnumTasks)
HRESULT SetErrorRetryCount(WORD wRetryCount)
HRESULT SetPriority([in] DWORD dwPriority)
HRESULT Next([in] ULONG celt, [out] LPWSTR **rgpwszNames, [out] ULONG *pceltFetched)
HRESULT SetTargetComputer([in] LPCWSTR pwszComputer)
HRESULT GetTriggerString([out] LPWSTR *ppwszTrigger)
HRESULT SetApplicationName([in] LPCWSTR pwszApplicationName)
HRESULT SetTrigger([in] const PTASK_TRIGGER pTrigger)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
HRESULT SetWorkingDirectory([in] LPCWSTR pwszWorkingDirectory)
#define d
Definition: ke_i.h:81
LONG HRESULT
Definition: typedefs.h:77
struct ITaskTrigger::_TASK_TRIGGER TASK_TRIGGER
HRESULT IsOfType([in] LPCWSTR pwszName, [in] REFIID riid)
HRESULT EditWorkItem([in] HWND hParent, [in] DWORD dwReserved)
unsigned short WORD
Definition: ntddk_ex.h:93
static FILE * out
Definition: regtests2xml.c:44
unsigned long DWORD
Definition: ntddk_ex.h:95
#define threading(model)
Definition: mstask.idl:26
HRESULT GetNextRunTime([out] SYSTEMTIME *pstNextRun)
HRESULT GetExitCode([out] DWORD *pdwExitCode)
HRESULT GetErrorRetryInterval([out] WORD *pwRetryInterval)
HRESULT SetMaxRunTime([in] DWORD dwMaxRunTime)
enum IProvideTaskPage::_TASKPAGE TASKPAGE
HRESULT SetCreator(LPCWSTR pwszCreator)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
const DOCKBAR PVOID HWND hParent
Definition: tooldock.h:22
HRESULT SetComment([in] LPCWSTR pwszComment)
unsigned char BYTE
Definition: mem.h:68
struct ITaskTrigger::_MONTHLYDATE MONTHLYDATE
HRESULT GetWorkingDirectory([in] LPWSTR *ppwszWorkingDirectory)
struct ITaskTrigger::_WEEKLY WEEKLY
HRESULT Delete([in] LPCWSTR pwszName)
#define local
Definition: zutil.h:30
HRESULT GetMostRecentRunTime([out] SYSTEMTIME *pstLastRun)
struct ITaskTrigger::_DAILY DAILY
GLuint in
Definition: glext.h:9616
HRESULT NewWorkItem([in] LPCWSTR pwszTaskName, [in] REFCLSID rclsid, [in] REFIID riid, [out] IUnknown **ppunk)
static unsigned char pointer_default
Definition: parser.tab.c:114
HRESULT SetIdleWait([in] WORD wIdleMinutes, [in] WORD wDeadlineMinutes)
HRESULT Clone([out] IEnumWorkItems **ppEnumWorkItems)
HRESULT GetStatus([out] HRESULT *phrStatus)
HRESULT GetWorkItemData([out] WORD *pcBytes, [out] BYTE **ppBytes)
HRESULT SetParameters([in] LPCWSTR pwszParameters)
enum ITaskTrigger::_TASK_TRIGGER_TYPE TASK_TRIGGER_TYPE
HRESULT Activate([in] LPCWSTR pwszName, [in] REFIID riid, [out] IUnknown **ppunk)
HRESULT DeleteTrigger([in] WORD iTrigger)
HRESULT GetParameters([out] LPWSTR *ppwszParameters)
HRESULT Reset()
HRESULT Skip([in] ULONG celt)
HRESULT SetWorkItemData([in] WORD cBytes, [in] BYTE rgbData[])
unsigned int ULONG
Definition: retypes.h:1
union ITaskTrigger::_TRIGGER_TYPE_UNION TRIGGER_TYPE_UNION
TRIGGER_TYPE_UNION Type
Definition: mstask.idl:175
HRESULT GetTaskFlags([out] DWORD *pdwFlags)
HRESULT GetCreator([out] LPWSTR *ppwszCreator)
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
HRESULT GetApplicationName([out] LPWSTR *ppwszApplicationName)
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HRESULT GetAccountInformation([out] LPWSTR *ppwszAccountName)
HRESULT GetPriority([out] DWORD *pdwPriority)
void * object
Definition: jmemsys.h:48
HRESULT GetComment([out] LPWSTR *ppwszComment)
HRESULT SetAccountInformation([in] LPCWSTR pwszAccountName, [in] LPCWSTR pwszPassword)