• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef __PRINTER_CAPABILITIES_TYPES_H__
19 #define __PRINTER_CAPABILITIES_TYPES_H__
20 
21 #define MAX_SIZES_SUPPORTED 50
22 #define MAX_MEDIA_TRAYS_SUPPORTED 10
23 #define MAX_MEDIA_TYPES_SUPPORTED 20
24 #define MAX_RESOLUTIONS_SUPPORTED 10
25 #define MAX_QUALITY_SUPPORTED 3
26 #define MAX_URI_LENGTH 1024
27 #define MAX_STRING 256
28 #define MAX_UUID 46
29 
30 #include "wprint_df_types.h"
31 
32 /*
33  * Printer Capabilities structure.
34  */
35 typedef struct {
36     unsigned char duplex;
37     unsigned char borderless;
38     unsigned char canPrintPDF;
39     unsigned char canPrintPCLm;
40     unsigned char canPrintPWG;
41     char make[MAX_STRING];
42     char name[MAX_STRING];
43     char uuid[MAX_UUID];
44     char location[MAX_STRING];
45     unsigned char canRotateDuplexBackPage;
46     unsigned char color;
47     int supportedQuality[MAX_QUALITY_SUPPORTED];
48     unsigned int numSupportedQuality;
49     unsigned char faceDownTray;
50     media_size_t supportedMediaSizes[MAX_SIZES_SUPPORTED];
51     unsigned int numSupportedMediaSizes;
52 
53     // IPP major version (0 = not supported)
54     int ippVersionMajor;
55 
56     int ippVersionMinor;
57 
58     // ePCL over IPP supported version
59     int ePclIppVersion;
60 
61     int stripHeight;
62     unsigned long long supportedInputMimeTypes;
63     media_tray_t supportedMediaTrays[MAX_MEDIA_TRAYS_SUPPORTED];
64     unsigned int numSupportedMediaTrays;
65     media_type_t supportedMediaTypes[MAX_MEDIA_TYPES_SUPPORTED];
66     unsigned int numSupportedMediaTypes;
67     unsigned char isSupported;
68     unsigned char canCopy;
69     unsigned char isMediaSizeNameSupported;
70     unsigned int printerTopMargin;
71     unsigned int printerBottomMargin;
72     unsigned int printerLeftMargin;
73     unsigned int printerRightMargin;
74     unsigned char inkjet;
75     int supportedResolutions[MAX_RESOLUTIONS_SUPPORTED];
76     unsigned int numSupportedResolutions;
77     char printerUri[MAX_URI_LENGTH + 1];
78     char httpResource[MAX_URI_LENGTH + 1];
79     char mediaDefault[MAX_STRING];
80     unsigned char docSourceAppName;
81     unsigned char docSourceAppVersion;
82     unsigned char docSourceOsName;
83     unsigned char docSourceOsVersion;
84 } printer_capabilities_t;
85 
86 #endif // __PRINTER_CAPABILITIES_TYPES_H__