1 /*** 2 This file is part of cups-filters. 3 4 This file is free software; you can redistribute it and/or modify it 5 under the terms of the GNU Lesser General Public License as 6 published by the Free Software Foundation; either version 2.1 of the 7 License, or (at your option) any later version. 8 9 This file is distributed in the hope that it will be useful, but WITHOUT 10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 12 Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with avahi; if not, write to the Free Software 16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 17 USA. 18 ***/ 19 20 #ifndef _CUPS_FILTERS_IPP_H_ 21 # define _CUPS_FILTERS_IPP_H_ 22 23 # ifdef __cplusplus 24 extern "C" { 25 # endif /* __cplusplus */ 26 27 #ifdef HAVE_CONFIG_H 28 #include <config.h> 29 #endif 30 31 #include <ctype.h> 32 #include <stdlib.h> 33 #include <cups/cups.h> 34 #include <cups/backend.h> 35 36 #if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) 37 #define HAVE_CUPS_1_6 1 38 #endif 39 40 #define LOGSIZE 4 * 65536 41 #define MAX_OUTPUT_LEN 8192 42 #define MAX_URI_LEN 2048 43 44 extern char get_printer_attributes_log[LOGSIZE]; 45 46 char *resolve_uri(const char *raw_uri); 47 char *ippfind_based_uri_converter(const char *uri ,int is_fax); 48 #ifdef HAVE_CUPS_1_6 49 /* Enum of possible driverless options */ 50 enum driverless_support_modes { 51 DRVLESS_CHECKERR, /* Unable to get get-printer-attributes response*/ 52 FULL_DRVLESS, /* Standard IPP Everywhere support, works with 'everywhere' model */ 53 DRVLESS_IPP11, /* Driverless support via IPP 1.1 request */ 54 DRVLESS_INCOMPLETEIPP /* Driverless support without media-col-database attribute */ 55 }; 56 57 int check_driverless_support(const char* uri); 58 ipp_t *get_printer_attributes(const char* raw_uri, 59 const char* const pattrs[], 60 int pattrs_size, 61 const char* const req_attrs[], 62 int req_attrs_size, 63 int debug); 64 ipp_t *get_printer_attributes2(http_t *http_printer, 65 const char* raw_uri, 66 const char* const pattrs[], 67 int pattrs_size, 68 const char* const req_attrs[], 69 int req_attrs_size, 70 int debug); 71 ipp_t *get_printer_attributes3(http_t *http_printer, 72 const char* raw_uri, 73 const char* const pattrs[], 74 int pattrs_size, 75 const char* const req_attrs[], 76 int req_attrs_size, 77 int debug, 78 int* driverless_support); 79 ipp_t *get_printer_attributes4(const char* raw_uri, 80 const char* const pattrs[], 81 int pattrs_size, 82 const char* const req_attrs[], 83 int req_attrs_size, 84 int debug, 85 int isFax); 86 ipp_t *get_printer_attributes5(http_t *http_printer, 87 const char* raw_uri, 88 const char* const pattrs[], 89 int pattrs_size, 90 const char* const req_attrs[], 91 int req_attrs_size, 92 int debug, 93 int* driverless_support, 94 int resolve_uri_type); 95 96 97 #endif /* HAVE_CUPS_1_6 */ 98 99 # ifdef __cplusplus 100 } 101 # endif /* __cplusplus */ 102 103 #endif /* !_CUPS_FILTERS_IPP_H_ */ 104