]>
git.ipfire.org Git - thirdparty/cups.git/blob - examples/ppdx.h
2 * Header for PPD data encoding example code.
4 * Copyright 2012 by Apple Inc.
6 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
14 * Include necessary headers...
17 # include <cups/ppd.h>
26 # endif /* __cplusplus */
30 * Maximum amount of data to encode/decode...
33 # define PPDX_MAX_STATUS 1024 /* Limit on log messages in 10.6 */
34 # define PPDX_MAX_DATA 16777216/* 16MiB */
38 * 'ppdxReadData()' - Read encoded data from a ppd_file_t *.
40 * Reads chunked data in the PPD file "ppd" using the prefix "name". Returns
41 * an allocated pointer to the data (which is nul-terminated for convenience)
42 * along with the length of the data in the variable pointed to by "datasize",
43 * which can be NULL to indicate the caller doesn't need the length.
45 * Returns NULL if no data is present in the PPD with the prefix.
48 extern void *ppdxReadData(ppd_file_t
*ppd
, const char *name
,
53 * 'ppdxWriteData()' - Writes encoded data to stderr using PPD: messages.
55 * Writes chunked data to the PPD file using PPD: messages sent to stderr for
56 * cupsd. "name" must be a valid PPD keyword string whose length is less than
57 * 37 characters to allow for chunk numbering. "data" provides a pointer to the
58 * data to be written, and "datasize" provides the length.
61 extern void ppdxWriteData(const char *name
, const void *data
,
67 # endif /* __cplusplus */