xref: /reactos/sdk/include/reactos/idl/atsvc.idl (revision f04935d8)
1/*
2 * Scheduler Service interface definition
3 */
4
5#include <ms-dtyp.idl>
6
7typedef [handle] const wchar_t *ATSVC_HANDLE;
8
9typedef struct _AT_ENUM
10{
11    DWORD JobId;
12    DWORD_PTR JobTime;
13    DWORD DaysOfMonth;
14    unsigned char DaysOfWeek;
15    unsigned char Flags;
16    [string] wchar_t *Command;
17} AT_ENUM, *PAT_ENUM, *LPAT_ENUM;
18
19typedef struct _AT_INFO
20{
21    DWORD_PTR JobTime;
22    DWORD DaysOfMonth;
23    unsigned char DaysOfWeek;
24    unsigned char Flags;
25    [string] wchar_t *Command;
26} AT_INFO, *PAT_INFO, *LPAT_INFO;
27
28typedef struct _AT_ENUM_CONTAINER
29{
30    DWORD EntriesRead;
31    [size_is( EntriesRead)] LPAT_ENUM Buffer;
32} AT_ENUM_CONTAINER, *PAT_ENUM_CONTAINER, *LPAT_ENUM_CONTAINER;
33
34cpp_quote("#define JOB_RUN_PERIODICALLY  1")
35cpp_quote("#define JOB_EXEC_ERROR        2")
36cpp_quote("#define JOB_RUNS_TODAY        4")
37cpp_quote("#define JOB_ADD_CURRENT_DATE  8")
38cpp_quote("#define JOB_NONINTERACTIVE   16")
39cpp_quote("#define JOB_INPUT_FLAGS      (JOB_RUN_PERIODICALLY|JOB_ADD_CURRENT_DATE|JOB_NONINTERACTIVE)")
40cpp_quote("#define JOB_OUTPUT_FLAGS     (JOB_RUN_PERIODICALLY|JOB_EXEC_ERROR|JOB_RUNS_TODAY|JOB_NONINTERACTIVE)")
41
42[
43    uuid(1FF70682-0A51-30E8-076D-740BE8CEE98B),
44    version(1.0),
45#ifdef __midl
46    ms_union,
47#endif
48    pointer_default(unique),
49    endpoint("ncacn_np:[\\pipe\\atsvc]")
50#ifndef __midl
51    ,explicit_handle
52#endif
53]
54interface atsvc
55{
56    /* Function 0 */
57    NET_API_STATUS
58    __stdcall
59    NetrJobAdd(
60        [in, string, unique] ATSVC_HANDLE ServerName,
61        [in] LPAT_INFO pAtInfo,
62        [out] LPDWORD pJobId);
63
64    /* Function 1 */
65    NET_API_STATUS
66    __stdcall
67    NetrJobDel(
68        [in, string, unique] ATSVC_HANDLE ServerName,
69        [in] DWORD MinJobId,
70        [in] DWORD MaxJobId);
71
72    /* Function 2 */
73    NET_API_STATUS
74    __stdcall
75    NetrJobEnum(
76        [in, string, unique] ATSVC_HANDLE ServerName,
77        [in,out] LPAT_ENUM_CONTAINER pEnumContainer,
78        [in] DWORD PreferedMaximumLength,
79        [out] LPDWORD pTotalEntries,
80        [in, out, unique] LPDWORD pResumeHandle);
81
82    /* Function 3 */
83    NET_API_STATUS
84    __stdcall
85    NetrJobGetInfo(
86        [in, string, unique] ATSVC_HANDLE ServerName,
87        [in] DWORD JobId,
88        [out] LPAT_INFO *ppAtInfo);
89}
90