]>
git.ipfire.org Git - thirdparty/cups.git/blob - cups/ppd-private.h
f7ade94072df0e124a7f71c6be5871d2349c6f42
4 * Private PPD definitions for CUPS.
6 * Copyright 2007-2010 by Apple Inc.
7 * Copyright 1997-2007 by Easy Software Products, all rights reserved.
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/".
15 * PostScript is a trademark of Adobe Systems, Inc.
17 * This code and any derivative of it may be used and distributed
18 * freely under the terms of the GNU General Public License when
19 * used with GNU Ghostscript or its derivatives. Use of the code
20 * (or any derivative of it) with software other than GNU
21 * GhostScript (or its derivatives) is governed by the CUPS license
24 * This file is subject to the Apple OS-Developed Software exception.
27 #ifndef _CUPS_PPD_PRIVATE_H_
28 # define _CUPS_PPD_PRIVATE_H_
31 * Include necessary headers...
34 # include <cups/ppd.h>
35 # include "pwg-private.h"
44 # endif /* __cplusplus */
51 typedef struct _ppd_cups_uiconst_s
/**** Constraint from cupsUIConstraints ****/
53 ppd_option_t
*option
; /* Constrained option */
54 ppd_choice_t
*choice
; /* Constrained choice or @code NULL@ */
55 int installable
; /* Installable option? */
56 } _ppd_cups_uiconst_t
;
58 typedef struct _ppd_cups_uiconsts_s
/**** cupsUIConstraints ****/
60 char resolver
[PPD_MAX_NAME
]; /* Resolver name */
61 int installable
, /* Constrained against any installable options? */
62 num_constraints
; /* Number of constraints */
63 _ppd_cups_uiconst_t
*constraints
; /* Constraints */
64 } _ppd_cups_uiconsts_t
;
71 extern void _ppdFreeLanguages(cups_array_t
*languages
);
72 extern cups_encoding_t
_ppdGetEncoding(const char *name
);
73 extern cups_array_t
*_ppdGetLanguages(ppd_file_t
*ppd
);
74 extern unsigned _ppdHashName(const char *name
);
75 extern ppd_attr_t
*_ppdLocalizedAttr(ppd_file_t
*ppd
, const char *keyword
,
76 const char *spec
, const char *ll_CC
);
77 extern char *_ppdNormalizeMakeAndModel(const char *make_and_model
,
80 extern int _ppdParseOptions(const char *s
, int num_options
,
81 cups_option_t
**options
);
82 extern _pwg_t
*_pwgCreateWithPPD(ppd_file_t
*ppd
);
83 extern const char *_pwgGetInputSlot(_pwg_t
*pwg
, ipp_t
*job
,
85 extern const char *_pwgGetMediaType(_pwg_t
*pwg
, ipp_t
*job
,
87 extern const char *_pwgGetPageSize(_pwg_t
*pwg
, ipp_t
*job
,
88 const char *keyword
, int *exact
);
89 extern _pwg_size_t
*_pwgGetSize(_pwg_t
*pwg
, const char *page_size
);
90 extern const char *_pwgGetSource(_pwg_t
*pwg
, const char *input_slot
);
91 extern const char *_pwgGetType(_pwg_t
*pwg
, const char *media_type
);
92 extern const char *_pwgInputSlotForSource(const char *media_source
,
93 char *name
, size_t namesize
);
94 extern _pwg_media_t
*_pwgMediaForPPD(const char *ppd
);
95 extern const char *_pwgMediaTypeForType(const char *media_source
,
96 char *name
, size_t namesize
);
97 extern const char *_pwgPageSizeForMedia(_pwg_media_t
*media
,
98 char *name
, size_t namesize
);
107 # endif /* __cplusplus */
108 #endif /* !_CUPS_PPD_PRIVATE_H_ */