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 * Media ready set definition 34 */ 35 typedef struct 36 { 37 unsigned int x_dimension; 38 unsigned int y_dimension; 39 char media_tray_tag[MAX_STRING + 1]; 40 } media_ready_set_t; 41 42 /* 43 * Printer Capabilities structure. 44 */ 45 typedef struct { 46 unsigned char duplex; 47 unsigned char borderless; 48 unsigned char canPrintPDF; 49 unsigned char canPrintPCLm; 50 unsigned char canPrintPWG; 51 char make[MAX_STRING]; 52 char name[MAX_STRING]; 53 char uuid[MAX_UUID]; 54 char location[MAX_STRING]; 55 unsigned char canRotateDuplexBackPage; 56 unsigned char color; 57 int supportedQuality[MAX_QUALITY_SUPPORTED]; 58 unsigned int numSupportedQuality; 59 unsigned char faceDownTray; 60 media_size_t supportedMediaSizes[MAX_SIZES_SUPPORTED]; 61 unsigned int numSupportedMediaSizes; 62 63 // IPP major version (0 = not supported) 64 int ippVersionMajor; 65 66 int ippVersionMinor; 67 68 // ePCL over IPP supported version 69 int ePclIppVersion; 70 71 int stripHeight; 72 unsigned long long supportedInputMimeTypes; 73 media_tray_t supportedMediaTrays[MAX_MEDIA_TRAYS_SUPPORTED]; 74 unsigned int numSupportedMediaTrays; 75 media_type_t supportedMediaTypes[MAX_MEDIA_TYPES_SUPPORTED]; 76 unsigned int numSupportedMediaTypes; 77 unsigned char isSupported; 78 unsigned char canCopy; 79 unsigned char isMediaSizeNameSupported; 80 unsigned int printerTopMargin; 81 unsigned int printerBottomMargin; 82 unsigned int printerLeftMargin; 83 unsigned int printerRightMargin; 84 unsigned char inkjet; 85 int supportedResolutions[MAX_RESOLUTIONS_SUPPORTED]; 86 unsigned int numSupportedResolutions; 87 char printerUri[MAX_URI_LENGTH + 1]; 88 char httpResource[MAX_URI_LENGTH + 1]; 89 char mediaDefault[MAX_STRING]; 90 unsigned char docSourceAppName; 91 unsigned char docSourceAppVersion; 92 unsigned char docSourceOsName; 93 unsigned char docSourceOsVersion; 94 } printer_capabilities_t; 95 96 #endif // __PRINTER_CAPABILITIES_TYPES_H__