1/* 2 * "$Id: statbuf.h 11093 2013-07-03 20:48:42Z msweet $" 3 * 4 * Status buffer definitions for the CUPS scheduler. 5 * 6 * Copyright 2007-2010 by Apple Inc. 7 * Copyright 1997-2005 by Easy Software Products, all rights reserved. 8 * 9 * These coded instructions, statements, and computer programs are the 10 * property of Apple Inc. and are protected by Federal copyright 11 * law. Distribution and use rights are outlined in the file "LICENSE.txt" 12 * which should have been included with this file. If this file is 13 * file is missing or damaged, see the license at "http://www.cups.org/". 14 */ 15 16 17/* 18 * Constants... 19 */ 20 21#define CUPSD_SB_BUFFER_SIZE 2048 /* Bytes for job status buffer */ 22 23 24/* 25 * Types and structures... 26 */ 27 28typedef struct /**** Status buffer */ 29{ 30 int fd; /* File descriptor to read from */ 31 char prefix[64]; /* Prefix for log messages */ 32 int bufused; /* How much is used in buffer */ 33 char buffer[CUPSD_SB_BUFFER_SIZE]; /* Buffer */ 34} cupsd_statbuf_t; 35 36 37/* 38 * Prototypes... 39 */ 40 41extern void cupsdStatBufDelete(cupsd_statbuf_t *sb); 42extern cupsd_statbuf_t *cupsdStatBufNew(int fd, const char *prefix, ...); 43extern char *cupsdStatBufUpdate(cupsd_statbuf_t *sb, int *loglevel, 44 char *line, int linelen); 45 46 47/* 48 * End of "$Id: statbuf.h 11093 2013-07-03 20:48:42Z msweet $". 49 */ 50