[SCHEDSVC]
[reactos.git] / reactos / base / services / schedsvc / precomp.h
1 #ifndef _SCHEDSVC_PCH_
2 #define _SCHEDSVC_PCH_
3
4 #define WIN32_NO_STATUS
5 #define _INC_WINDOWS
6 #define COM_NO_WINDOWS_H
7 #include <limits.h>
8 #include <stdarg.h>
9 #include <stdio.h>
10 #include <windef.h>
11 #include <winbase.h>
12 #include <winreg.h>
13 #include <winsvc.h>
14
15 #include <ndk/rtlfuncs.h>
16
17 #include <atsvc_s.h>
18
19 #include <wine/debug.h>
20
21 NTSYSAPI
22 ULONG
23 NTAPI
24 RtlRandomEx(
25 PULONG Seed);
26
27 typedef struct _JOB
28 {
29 LIST_ENTRY JobEntry;
30
31 LIST_ENTRY StartEntry;
32 ULARGE_INTEGER StartTime;
33 WCHAR Name[9];
34
35 DWORD JobId;
36 DWORD_PTR JobTime;
37 DWORD DaysOfMonth;
38 UCHAR DaysOfWeek;
39 UCHAR Flags;
40 WCHAR Command[1];
41 } JOB, *PJOB;
42
43
44 extern DWORD dwNextJobId;
45 extern DWORD dwJobCount;
46
47 extern LIST_ENTRY JobListHead;
48 extern RTL_RESOURCE JobListLock;
49
50 extern LIST_ENTRY StartListHead;
51 extern RTL_RESOURCE StartListLock;
52
53
54 /* job.c */
55
56 LONG
57 SaveJob(
58 PJOB pJob);
59
60 LONG
61 DeleteJob(
62 PJOB pJob);
63
64 LONG
65 LoadJobs(VOID);
66
67 VOID
68 CalculateNextStartTime(
69 _In_ PJOB pJob);
70
71 VOID
72 InsertJobIntoStartList(
73 _In_ PLIST_ENTRY StartListHead,
74 _In_ PJOB pJob);
75
76 VOID
77 DumpStartList(
78 _In_ PLIST_ENTRY StartListHead);
79
80
81 /* rpcserver.c */
82
83 DWORD
84 WINAPI
85 RpcThreadRoutine(
86 LPVOID lpParameter);
87
88 #endif /* _SCHEDSVC_PCH_ */