]>
git.ipfire.org Git - thirdparty/cups.git/blob - examples/ppdx.h
4 * Header for PPD data encoding example code.
6 * Copyright 2012 by Apple Inc.
8 * These coded instructions, statements, and computer programs are the
9 * property of Apple Inc. and are protected by Federal copyright
10 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
11 * which should have been included with this file. If this file is
12 * file is missing or damaged, see the license at "http://www.cups.org/".
14 * This file is subject to the Apple OS-Developed Software exception.
23 * Include necessary headers...
26 # include <cups/ppd.h>
35 # endif /* __cplusplus */
39 * Maximum amount of data to encode/decode...
42 # define PPDX_MAX_STATUS 1024 /* Limit on log messages in 10.6 */
43 # define PPDX_MAX_DATA 16777216/* 16MiB */
47 * 'ppdxReadData()' - Read encoded data from a ppd_file_t *.
49 * Reads chunked data in the PPD file "ppd" using the prefix "name". Returns
50 * an allocated pointer to the data (which is nul-terminated for convenience)
51 * along with the length of the data in the variable pointed to by "datasize",
52 * which can be NULL to indicate the caller doesn't need the length.
54 * Returns NULL if no data is present in the PPD with the prefix.
57 extern void *ppdxReadData(ppd_file_t
*ppd
, const char *name
,
62 * 'ppdxWriteData()' - Writes encoded data to stderr using PPD: messages.
64 * Writes chunked data to the PPD file using PPD: messages sent to stderr for
65 * cupsd. "name" must be a valid PPD keyword string whose length is less than
66 * 37 characters to allow for chunk numbering. "data" provides a pointer to the
67 * data to be written, and "datasize" provides the length.
70 extern void ppdxWriteData(const char *name
, const void *data
,
76 # endif /* __cplusplus */