]>
Commit | Line | Data |
---|---|---|
a603edef MS |
1 | /* |
2 | * "$Id$" | |
3 | * | |
f8b3a85b | 4 | * Private PPD definitions for CUPS. |
a603edef | 5 | * |
f8b3a85b | 6 | * Copyright 2007-2010 by Apple Inc. |
a603edef MS |
7 | * Copyright 1997-2007 by Easy Software Products, all rights reserved. |
8 | * | |
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/". | |
14 | * | |
15 | * PostScript is a trademark of Adobe Systems, Inc. | |
16 | * | |
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 | |
22 | * agreement. | |
23 | * | |
24 | * This file is subject to the Apple OS-Developed Software exception. | |
25 | */ | |
26 | ||
27 | #ifndef _CUPS_PPD_PRIVATE_H_ | |
28 | # define _CUPS_PPD_PRIVATE_H_ | |
29 | ||
30 | /* | |
31 | * Include necessary headers... | |
32 | */ | |
33 | ||
aaf19ab0 MS |
34 | # include <cups/ppd.h> |
35 | # include "pwg-private.h" | |
a603edef MS |
36 | |
37 | ||
38 | /* | |
39 | * C++ magic... | |
40 | */ | |
41 | ||
42 | # ifdef __cplusplus | |
43 | extern "C" { | |
44 | # endif /* __cplusplus */ | |
45 | ||
46 | ||
66ab9486 MS |
47 | /* |
48 | * Structures... | |
49 | */ | |
50 | ||
51 | typedef struct _ppd_cups_uiconst_s /**** Constraint from cupsUIConstraints ****/ | |
52 | { | |
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; | |
57 | ||
58 | typedef struct _ppd_cups_uiconsts_s /**** cupsUIConstraints ****/ | |
59 | { | |
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; | |
65 | ||
66 | ||
67 | /* | |
68 | * Prototypes... | |
69 | */ | |
70 | ||
a603edef | 71 | extern void _ppdFreeLanguages(cups_array_t *languages); |
5eb9da71 | 72 | extern cups_encoding_t _ppdGetEncoding(const char *name); |
a603edef MS |
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); | |
5eb9da71 MS |
77 | extern char *_ppdNormalizeMakeAndModel(const char *make_and_model, |
78 | char *buffer, | |
79 | size_t bufsize); | |
66ab9486 MS |
80 | extern int _ppdParseOptions(const char *s, int num_options, |
81 | cups_option_t **options); | |
aaf19ab0 MS |
82 | extern _pwg_t *_pwgCreateWithPPD(ppd_file_t *ppd); |
83 | extern const char *_pwgGetInputSlot(_pwg_t *pwg, ipp_t *job, | |
84 | const char *keyword); | |
85 | extern const char *_pwgGetMediaType(_pwg_t *pwg, ipp_t *job, | |
86 | const char *keyword); | |
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); | |
a603edef MS |
99 | |
100 | ||
101 | /* | |
102 | * C++ magic... | |
103 | */ | |
104 | ||
105 | # ifdef __cplusplus | |
106 | } | |
107 | # endif /* __cplusplus */ | |
108 | #endif /* !_CUPS_PPD_PRIVATE_H_ */ | |
109 | ||
110 | /* | |
111 | * End of "$Id$". | |
112 | */ |