xref: /aosp_15_r20/external/libcups/scheduler/statbuf.h (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Worker /*
2*5e7646d2SAndroid Build Coastguard Worker  * Status buffer definitions for the CUPS scheduler.
3*5e7646d2SAndroid Build Coastguard Worker  *
4*5e7646d2SAndroid Build Coastguard Worker  * Copyright 2007-2010 by Apple Inc.
5*5e7646d2SAndroid Build Coastguard Worker  * Copyright 1997-2005 by Easy Software Products, all rights reserved.
6*5e7646d2SAndroid Build Coastguard Worker  *
7*5e7646d2SAndroid Build Coastguard Worker  * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
8*5e7646d2SAndroid Build Coastguard Worker  */
9*5e7646d2SAndroid Build Coastguard Worker 
10*5e7646d2SAndroid Build Coastguard Worker 
11*5e7646d2SAndroid Build Coastguard Worker /*
12*5e7646d2SAndroid Build Coastguard Worker  * Constants...
13*5e7646d2SAndroid Build Coastguard Worker  */
14*5e7646d2SAndroid Build Coastguard Worker 
15*5e7646d2SAndroid Build Coastguard Worker #define CUPSD_SB_BUFFER_SIZE	2048	/* Bytes for job status buffer */
16*5e7646d2SAndroid Build Coastguard Worker 
17*5e7646d2SAndroid Build Coastguard Worker 
18*5e7646d2SAndroid Build Coastguard Worker /*
19*5e7646d2SAndroid Build Coastguard Worker  * Types and structures...
20*5e7646d2SAndroid Build Coastguard Worker  */
21*5e7646d2SAndroid Build Coastguard Worker 
22*5e7646d2SAndroid Build Coastguard Worker typedef struct				/**** Status buffer */
23*5e7646d2SAndroid Build Coastguard Worker {
24*5e7646d2SAndroid Build Coastguard Worker   int	fd;				/* File descriptor to read from */
25*5e7646d2SAndroid Build Coastguard Worker   char	prefix[64];			/* Prefix for log messages */
26*5e7646d2SAndroid Build Coastguard Worker   int	bufused;			/* How much is used in buffer */
27*5e7646d2SAndroid Build Coastguard Worker   char	buffer[CUPSD_SB_BUFFER_SIZE];	/* Buffer */
28*5e7646d2SAndroid Build Coastguard Worker } cupsd_statbuf_t;
29*5e7646d2SAndroid Build Coastguard Worker 
30*5e7646d2SAndroid Build Coastguard Worker 
31*5e7646d2SAndroid Build Coastguard Worker /*
32*5e7646d2SAndroid Build Coastguard Worker  * Prototypes...
33*5e7646d2SAndroid Build Coastguard Worker  */
34*5e7646d2SAndroid Build Coastguard Worker 
35*5e7646d2SAndroid Build Coastguard Worker extern void		cupsdStatBufDelete(cupsd_statbuf_t *sb);
36*5e7646d2SAndroid Build Coastguard Worker extern cupsd_statbuf_t	*cupsdStatBufNew(int fd, const char *prefix, ...);
37*5e7646d2SAndroid Build Coastguard Worker extern char		*cupsdStatBufUpdate(cupsd_statbuf_t *sb, int *loglevel,
38*5e7646d2SAndroid Build Coastguard Worker 			                    char *line, int linelen);
39