]> git.ipfire.org Git - thirdparty/cups.git/blame - scheduler/sysman.h
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / scheduler / sysman.h
CommitLineData
09ec0018 1/*
1deb86fd 2 * System management definitions for the CUPS scheduler.
09ec0018 3 *
e4e37194 4 * Copyright 2007-2017 by Apple Inc.
1deb86fd 5 * Copyright 2006 by Easy Software Products.
09ec0018 6 *
e3101897 7 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
09ec0018 8 */
9
3dfe78b3
MS
10/*
11 * Constants...
12 */
13
14#define CUPSD_DIRTY_NONE 0 /* Nothing is dirty */
15#define CUPSD_DIRTY_PRINTERS 1 /* printers.conf is dirty */
16#define CUPSD_DIRTY_CLASSES 2 /* classes.conf is dirty */
a2326b5b
MS
17#define CUPSD_DIRTY_PRINTCAP 4 /* printcap is dirty */
18#define CUPSD_DIRTY_JOBS 8 /* jobs.cache or "c" file(s) are dirty */
19#define CUPSD_DIRTY_SUBSCRIPTIONS 16 /* subscriptions.conf is dirty */
20
3dfe78b3 21
09ec0018 22/*
23 * Globals...
24 */
25
3dfe78b3
MS
26VAR int DirtyFiles VALUE(CUPSD_DIRTY_NONE),
27 /* What files are dirty? */
49d87452 28 DirtyCleanInterval VALUE(DEFAULT_KEEPALIVE);
3dfe78b3
MS
29 /* How often do we write dirty files? */
30VAR time_t DirtyCleanTime VALUE(0);
31 /* When to clean dirty files next */
1deb86fd
MS
32VAR int ACPower VALUE(-1),
33 /* Is the system on AC power? */
34 Sleeping VALUE(0);
09ec0018 35 /* Non-zero if machine is entering or *
36 * in a sleep state... */
e6013cfa
MS
37VAR time_t SleepJobs VALUE(0);
38 /* Time when all jobs must be *
39 * canceled for system sleep. */
09ec0018 40#ifdef __APPLE__
41VAR int SysEventPipes[2] VALUE2(-1,-1);
42 /* System event notification pipes */
43#endif /* __APPLE__ */
44
45
46/*
47 * Prototypes...
48 */
49
e6013cfa 50extern void cupsdAllowSleep(void);
3dfe78b3
MS
51extern void cupsdCleanDirty(void);
52extern void cupsdMarkDirty(int what);
e4e37194 53extern void cupsdSetBusyState(int working);
09ec0018 54extern void cupsdStartSystemMonitor(void);
55extern void cupsdStopSystemMonitor(void);