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