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