1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  * Copyright (C) 2016 Mopria Alliance, Inc.
4  * Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef PCLM_COMMON_DEFINES
20 #define PCLM_COMMON_DEFINES
21 
22 #include <stdbool.h>
23 #include "wtypes.h"
24 
25 #define PCLM_Ver 0.98
26 
27 typedef enum {
28     RGB,
29     AdobeRGB,
30     GRAY,
31     unknown
32 } colorSpaceEnum;
33 
34 typedef enum {
35     jpeg,
36     zlib,
37     rle
38 } compTypeEnum;
39 
40 typedef enum {
41     simplex,
42     duplex_longEdge,
43     duplex_shortEdge
44 } duplexDispositionEnum;
45 
46 typedef enum {
47     job_open,
48     job_closed,
49     job_errored
50 } jobStateEnum;
51 
52 typedef enum {
53     deviceRGB,
54     adobeRGB,
55     grayScale
56 } colorSpaceDisposition;
57 
58 typedef enum {
59     debugOn,
60     debugOff
61 } debugDisposition;
62 
63 typedef enum {
64     compressRLE,
65     compressDCT,
66     compressFlate,
67     compressDefault,
68     compressNone
69 } compressionDisposition;
70 
71 typedef enum {
72     portraitOrientation,
73     landscapeOrientation
74 } mediaOrientationDisposition;
75 
76 typedef enum {
77     res300,
78     res600,
79     res1200
80 } renderResolution;
81 
82 typedef enum {
83     top_left,
84     bottom_right
85 } pageOriginType;
86 
87 typedef enum {
88     color_content,
89     gray_content,
90     unknown_content
91 } pageCromaticContent;
92 
93 typedef enum {
94     draft,
95     normal,
96     best,
97 } pageOutputQuality;
98 
99 typedef enum {
100     alternate,
101     alternate_roll,
102     auto_select,
103     bottom,
104     center,
105     disc,
106     envelope,
107     hagaki,
108     large_capacity,
109     left,
110     main_tray,
111     main_roll,
112     manual,
113     middle,
114     photo,
115     rear,
116     right,
117     side,
118     top,
119     tray_1,
120     tray_2,
121     tray_3,
122     tray_4,
123     tray_5,
124     tray_N,
125 } jobInputBin;
126 
127 typedef enum {
128     top_output,
129     middle_output,
130     bottom_output,
131     side_output,
132     center_output,
133     rear_output,
134     face_up,
135     face_down,
136     large_capacity_output,
137     stacker_N,
138     mailbox_N,
139     tray_1_output,
140     tray_2_output,
141     tray_3_output,
142     tray_4_output,
143 } jobOutputBin;
144 
145 typedef struct {
146     pageCromaticContent userCromaticMode;
147     pageOutputQuality userPageQuality;
148     mediaOrientationDisposition userOrientation;
149     char userMediaType[256];
150     jobInputBin userInputBin;
151     int userCopies;
152     char userDocumentName[256];
153     jobOutputBin userOutputBin;
154 } PCLmSUserSettingsType;
155 
156 typedef struct {
157     char mediaSizeName[256];
158     char clientLocale[256];
159     float mediaHeight;
160     float mediaWidth;
161     float sourceHeight;
162     float sourceWidth;
163     float mediaWidthOffset;
164     float mediaHeightOffset;
165     pageCromaticContent colorContent; // Did the page contain any "real" color
166     pageOriginType pageOrigin;
167     compressionDisposition compTypeRequested;
168     colorSpaceDisposition srcColorSpaceSpefication;
169     colorSpaceDisposition dstColorSpaceSpefication;
170     int stripHeight;
171     renderResolution destinationResolution;
172 
173     duplexDispositionEnum duplexDisposition;
174     int scaleFactor;
175     bool genExtraPage;
176     bool mirrorBackside;
177     int mediaWidthInPixels;
178     int mediaHeightInPixels;
179     int SourceWidthPixels;
180     int SourceHeightPixels;
181 } PCLmPageSetup;
182 
183 typedef enum {
184     success = 0,
185     genericFailure = -1,
186 } PCLmGenerator_returnType;
187 
188 #endif