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