• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * System management definitions for the CUPS scheduler.
3  *
4  * Copyright 2007-2017 by Apple Inc.
5  * Copyright 2006 by Easy Software Products.
6  *
7  * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
8  */
9 
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 */
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 
21 
22 /*
23  * Globals...
24  */
25 
26 VAR int			DirtyFiles	VALUE(CUPSD_DIRTY_NONE),
27 					/* What files are dirty? */
28 			DirtyCleanInterval VALUE(DEFAULT_KEEPALIVE);
29 					/* How often do we write dirty files? */
30 VAR time_t		DirtyCleanTime	VALUE(0);
31 					/* When to clean dirty files next */
32 VAR int			ACPower		VALUE(-1),
33 					/* Is the system on AC power? */
34 			Sleeping	VALUE(0);
35 					/* Non-zero if machine is entering or *
36 					 * in a sleep state...                */
37 VAR time_t		SleepJobs	VALUE(0);
38 					/* Time when all jobs must be         *
39 					 * canceled for system sleep.         */
40 #ifdef __APPLE__
41 VAR int			SysEventPipes[2] VALUE2(-1,-1);
42 					/* System event notification pipes */
43 #endif	/* __APPLE__ */
44 
45 
46 /*
47  * Prototypes...
48  */
49 
50 extern void	cupsdAllowSleep(void);
51 extern void	cupsdCleanDirty(void);
52 extern void	cupsdMarkDirty(int what);
53 extern void	cupsdSetBusyState(int working);
54 extern void	cupsdStartSystemMonitor(void);
55 extern void	cupsdStopSystemMonitor(void);
56