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