6b8e7480e5420702686228d748d542486948f7c0
[reactos.git] / 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 #define JOB_NAME_LENGTH 9
22
23 NTSYSAPI
24 ULONG
25 NTAPI
26 RtlRandomEx(
27 PULONG Seed);
28
29 typedef struct _JOB
30 {
31 LIST_ENTRY JobEntry;
32
33 LIST_ENTRY StartEntry;
34 ULARGE_INTEGER StartTime;
35 WCHAR Name[JOB_NAME_LENGTH];
36
37 DWORD JobId;
38 DWORD_PTR JobTime;
39 DWORD DaysOfMonth;
40 UCHAR DaysOfWeek;
41 UCHAR Flags;
42 WCHAR Command[1];
43 } JOB, *PJOB;
44
45
46 extern DWORD dwNextJobId;
47 extern DWORD dwJobCount;
48
49 extern LIST_ENTRY JobListHead;
50 extern RTL_RESOURCE JobListLock;
51
52 extern LIST_ENTRY StartListHead;
53 extern RTL_RESOURCE StartListLock;
54
55
56 /* job.c */
57
58 LONG
59 SaveJob(
60 PJOB pJob);
61
62 LONG
63 DeleteJob(
64 PJOB pJob);
65
66 LONG
67 LoadJobs(VOID);
68
69 VOID
70 CalculateNextStartTime(
71 _In_ PJOB pJob);
72
73 VOID
74 InsertJobIntoStartList(
75 _In_ PLIST_ENTRY StartListHead,
76 _In_ PJOB pJob);
77
78 VOID
79 DumpStartList(
80 _In_ PLIST_ENTRY StartListHead);
81
82
83 /* rpcserver.c */
84
85 DWORD
86 WINAPI
87 RpcThreadRoutine(
88 LPVOID lpParameter);
89
90 #endif /* _SCHEDSVC_PCH_ */