Blame scheduler/sysman.h

Packit 2fc92b
/*
Packit 2fc92b
 * System management definitions for the CUPS scheduler.
Packit 2fc92b
 *
Packit 2fc92b
 * Copyright 2007-2017 by Apple Inc.
Packit 2fc92b
 * Copyright 2006 by Easy Software Products.
Packit 2fc92b
 *
Packit 2fc92b
 * These coded instructions, statements, and computer programs are the
Packit 2fc92b
 * property of Apple Inc. and are protected by Federal copyright
Packit 2fc92b
 * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
Packit 2fc92b
 * which should have been included with this file.  If this file is
Packit 2fc92b
 * missing or damaged, see the license at "http://www.cups.org/".
Packit 2fc92b
 */
Packit 2fc92b
Packit 2fc92b
/*
Packit 2fc92b
 * Constants...
Packit 2fc92b
 */
Packit 2fc92b
Packit 2fc92b
#define CUPSD_DIRTY_NONE	0	/* Nothing is dirty */
Packit 2fc92b
#define CUPSD_DIRTY_PRINTERS	1	/* printers.conf is dirty */
Packit 2fc92b
#define CUPSD_DIRTY_CLASSES	2	/* classes.conf is dirty */
Packit 2fc92b
#define CUPSD_DIRTY_PRINTCAP	4	/* printcap is dirty */
Packit 2fc92b
#define CUPSD_DIRTY_JOBS	8	/* jobs.cache or "c" file(s) are dirty */
Packit 2fc92b
#define CUPSD_DIRTY_SUBSCRIPTIONS 16	/* subscriptions.conf is dirty */
Packit 2fc92b
Packit 2fc92b
Packit 2fc92b
/*
Packit 2fc92b
 * Globals...
Packit 2fc92b
 */
Packit 2fc92b
Packit 2fc92b
VAR int			DirtyFiles	VALUE(CUPSD_DIRTY_NONE),
Packit 2fc92b
					/* What files are dirty? */
Packit 2fc92b
			DirtyCleanInterval VALUE(DEFAULT_KEEPALIVE);
Packit 2fc92b
					/* How often do we write dirty files? */
Packit 2fc92b
VAR time_t		DirtyCleanTime	VALUE(0);
Packit 2fc92b
					/* When to clean dirty files next */
Packit 2fc92b
VAR int			ACPower		VALUE(-1),
Packit 2fc92b
					/* Is the system on AC power? */
Packit 2fc92b
			Sleeping	VALUE(0);
Packit 2fc92b
					/* Non-zero if machine is entering or *
Packit 2fc92b
					 * in a sleep state...                */
Packit 2fc92b
VAR time_t		SleepJobs	VALUE(0);
Packit 2fc92b
					/* Time when all jobs must be         *
Packit 2fc92b
					 * canceled for system sleep.         */
Packit 2fc92b
#ifdef __APPLE__
Packit 2fc92b
VAR int			SysEventPipes[2] VALUE2(-1,-1);
Packit 2fc92b
					/* System event notification pipes */
Packit 2fc92b
#endif	/* __APPLE__ */
Packit 2fc92b
Packit 2fc92b
Packit 2fc92b
/*
Packit 2fc92b
 * Prototypes...
Packit 2fc92b
 */
Packit 2fc92b
Packit 2fc92b
extern void	cupsdAllowSleep(void);
Packit 2fc92b
extern void	cupsdCleanDirty(void);
Packit 2fc92b
extern void	cupsdMarkDirty(int what);
Packit 2fc92b
extern void	cupsdSetBusyState(int working);
Packit 2fc92b
extern void	cupsdStartSystemMonitor(void);
Packit 2fc92b
extern void	cupsdStopSystemMonitor(void);