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