125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann/* 225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * Private definitions for CUPS. 325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * 4985548d9a7de8cde72ea0b5a81f6f0854d049454Philip P. Moltmann * Copyright 2007-2017 by Apple Inc. 525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * Copyright 1997-2007 by Easy Software Products, all rights reserved. 625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * 725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * These coded instructions, statements, and computer programs are the 825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * property of Apple Inc. and are protected by Federal copyright 925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * law. Distribution and use rights are outlined in the file "LICENSE.txt" 1025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * which should have been included with this file. If this file is 112447373f182dbfeb47fb86c0f5a6ac5773c65ac2Philip P. Moltmann * missing or damaged, see the license at "http://www.cups.org/". 1225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * 1325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * This file is subject to the Apple OS-Developed Software exception. 1425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann */ 1525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 1625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann#ifndef _CUPS_CUPS_PRIVATE_H_ 1725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# define _CUPS_CUPS_PRIVATE_H_ 1825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 1925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann/* 2025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * Include necessary headers... 2125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann */ 2225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 2325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include "string-private.h" 2425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include "debug-private.h" 2525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include "array-private.h" 2625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include "ipp-private.h" 2725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include "http-private.h" 2825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include "language-private.h" 2925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include "pwg-private.h" 3025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include "thread-private.h" 3125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include <cups/cups.h> 3225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef __APPLE__ 3325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include <sys/cdefs.h> 3425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# include <CoreFoundation/CoreFoundation.h> 3525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* __APPLE__ */ 3625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 3725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 3825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann/* 3925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * C++ magic... 4025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann */ 4125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 4225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef __cplusplus 4325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern "C" { 4425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* __cplusplus */ 4525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 4625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 4725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann/* 4825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * Types... 4925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann */ 5025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 5125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmanntypedef struct _cups_buffer_s /**** Read/write buffer ****/ 5225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann{ 5325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann struct _cups_buffer_s *next; /* Next buffer in list */ 5425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann size_t size; /* Size of buffer */ 5525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char used, /* Is this buffer used? */ 5625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann d[1]; /* Data buffer */ 5725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann} _cups_buffer_t; 5825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 5925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmanntypedef struct _cups_globals_s /**** CUPS global state data ****/ 6025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann{ 6125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Multiple places... */ 6225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann const char *cups_datadir, /* CUPS_DATADIR environment var */ 6325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *cups_serverbin,/* CUPS_SERVERBIN environment var */ 6425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *cups_serverroot, 6525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* CUPS_SERVERROOT environment var */ 6625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *cups_statedir, /* CUPS_STATEDIR environment var */ 6725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *localedir; /* LOCALDIR environment var */ 6825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 6925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* adminutil.c */ 7025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann time_t cupsd_update; /* Last time we got or set cupsd.conf */ 7125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char cupsd_hostname[HTTP_MAX_HOST]; 7225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Hostname for connection */ 7325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int cupsd_num_settings; 7425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Number of server settings */ 7525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_option_t *cupsd_settings;/* Server settings */ 7625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 7725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* auth.c */ 7825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef HAVE_GSSAPI 7925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char gss_service_name[32]; 8025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Kerberos service name */ 8125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* HAVE_GSSAPI */ 8225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 8325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* backend.c */ 8425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char resolved_uri[1024]; 8525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Buffer for cupsBackendDeviceURI */ 8625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 8725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* debug.c */ 8825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef DEBUG 8925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int thread_id; /* Friendly thread ID */ 9025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* DEBUG */ 9125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 9225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* file.c */ 9325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_file_t *stdio_files[3];/* stdin, stdout, stderr */ 9425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 9525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* http.c */ 9625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char http_date[256]; /* Date+time buffer */ 9725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 9825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* http-addr.c */ 9925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann unsigned ip_addr; /* Packed IPv4 address */ 10025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char *ip_ptrs[2]; /* Pointer to packed address */ 10125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann struct hostent hostent; /* Host entry for IP address */ 10225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef HAVE_GETADDRINFO 10325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char hostname[1024]; /* Hostname */ 10425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* HAVE_GETADDRINFO */ 10525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int need_res_init; /* Need to reinitialize resolver? */ 10625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 10725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* ipp.c */ 108985548d9a7de8cde72ea0b5a81f6f0854d049454Philip P. Moltmann ipp_uchar_t ipp_date[11]; /* RFC-2579 date/time data */ 10925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann _cups_buffer_t *cups_buffers; /* Buffer list */ 11025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 11125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* ipp-support.c */ 11225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int ipp_port; /* IPP port number */ 11325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char ipp_unknown[255]; 11425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Unknown error statuses */ 11525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 11625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* language.c */ 11725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_lang_t *lang_default; /* Default language */ 11825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef __APPLE__ 11925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char language[32]; /* Cached language */ 12025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* __APPLE__ */ 12125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 12225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* pwg-media.c */ 12325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_array_t *leg_size_lut, /* Lookup table for legacy names */ 12425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *ppd_size_lut, /* Lookup table for PPD names */ 12525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *pwg_size_lut; /* Lookup table for PWG names */ 12625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann pwg_media_t pwg_media; /* PWG media data for custom size */ 1272447373f182dbfeb47fb86c0f5a6ac5773c65ac2Philip P. Moltmann char pwg_name[65], /* PWG media name for custom size */ 1282447373f182dbfeb47fb86c0f5a6ac5773c65ac2Philip P. Moltmann ppd_name[41]; /* PPD media name for custom size */ 12925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 13025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* request.c */ 13125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann http_t *http; /* Current server connection */ 13225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann ipp_status_t last_error; /* Last IPP error */ 13325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char *last_status_message; 13425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Last IPP status-message */ 13525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 13625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* snmp.c */ 13725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char snmp_community[255]; 13825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Default SNMP community name */ 13925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int snmp_debug; /* Log SNMP IO to stderr? */ 14025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 14125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* tempfile.c */ 14225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char tempfile[1024]; /* cupsTempFd/File buffer */ 14325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 14425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* usersys.c */ 14525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann http_encryption_t encryption; /* Encryption setting */ 14625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char user[65], /* User name */ 14725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann user_agent[256],/* User-Agent string */ 14825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann server[256], /* Server address */ 14925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann servername[256],/* Server hostname */ 15025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann password[128]; /* Password for default callback */ 15125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_password_cb2_t password_cb; /* Password callback */ 15225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann void *password_data; /* Password user data */ 15325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann http_tls_credentials_t tls_credentials; 15425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Default client credentials */ 15525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_client_cert_cb_t client_cert_cb; /* Client certificate callback */ 15625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann void *client_cert_data; 15725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Client certificate user data */ 15825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_server_cert_cb_t server_cert_cb; /* Server certificate callback */ 15925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann void *server_cert_data; 16025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Server certificate user data */ 16125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int server_version, /* Server IPP version */ 16225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann trust_first, /* Trust on first use? */ 16325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann any_root, /* Allow any (e.g., self-signed) root */ 16425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann expired_certs, /* Allow expired certs */ 16525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann validate_certs; /* Validate certificates */ 16625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 16725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* util.c */ 16825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char def_printer[256]; 16925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann /* Default printer */ 17025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann} _cups_globals_t; 17125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 17225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmanntypedef struct _cups_media_db_s /* Media database */ 17325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann{ 17425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char *color, /* Media color, if any */ 17525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *key, /* Media key, if any */ 17625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *info, /* Media human-readable name, if any */ 17725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *size_name, /* Media PWG size name, if provided */ 17825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *source, /* Media source, if any */ 17925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann *type; /* Media type, if any */ 18025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int width, /* Width in hundredths of millimeters */ 18125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann length, /* Length in hundredths of 18225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * millimeters */ 18325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann bottom, /* Bottom margin in hundredths of 18425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * millimeters */ 18525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann left, /* Left margin in hundredths of 18625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * millimeters */ 18725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann right, /* Right margin in hundredths of 18825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * millimeters */ 18925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann top; /* Top margin in hundredths of 19025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * millimeters */ 19125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann} _cups_media_db_t; 19225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 19325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmanntypedef struct _cups_dconstres_s /* Constraint/resolver */ 19425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann{ 19525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char *name; /* Name of resolver */ 19625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann ipp_t *collection; /* Collection containing attrs */ 19725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann} _cups_dconstres_t; 19825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 19925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannstruct _cups_dinfo_s /* Destination capability and status 20025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * information */ 20125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann{ 20225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int version; /* IPP version */ 20325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann const char *uri; /* Printer URI */ 20425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann char *resource; /* Resource path */ 20525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann ipp_t *attrs; /* Printer attributes */ 20625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int num_defaults; /* Number of default options */ 20725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_option_t *defaults; /* Default options */ 20825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_array_t *constraints; /* Job constraints */ 20925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_array_t *resolvers; /* Job resolvers */ 21025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_array_t *localizations; /* Localization information */ 21125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_array_t *media_db; /* Media database */ 21225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann _cups_media_db_t min_size, /* Minimum size */ 21325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann max_size; /* Maximum size */ 21425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann unsigned cached_flags; /* Flags used for cached media */ 21525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_array_t *cached_db; /* Cache of media from last index/default */ 21625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann time_t ready_time; /* When xxx-ready attributes were last queried */ 21725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann ipp_t *ready_attrs; /* xxx-ready attributes */ 21825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_array_t *ready_db; /* media[-col]-ready media database */ 21925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann}; 22025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 22125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 22225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann/* 22325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * Prototypes... 22425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann */ 22525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 22625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef __APPLE__ 22725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern CFStringRef _cupsAppleCopyDefaultPaperID(void); 22825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern CFStringRef _cupsAppleCopyDefaultPrinter(void); 22925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern int _cupsAppleGetUseLastPrinter(void); 23025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern void _cupsAppleSetDefaultPaperID(CFStringRef name); 23125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern void _cupsAppleSetDefaultPrinter(CFStringRef name); 23225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern void _cupsAppleSetUseLastPrinter(int uselast); 23325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* __APPLE__ */ 23425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 23525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern char *_cupsBufferGet(size_t size); 23625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern void _cupsBufferRelease(char *b); 23725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 23825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern http_t *_cupsConnect(void); 23925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern char *_cupsCreateDest(const char *name, const char *info, const char *device_id, const char *device_uri, char *uri, size_t urisize); 24025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern int _cupsGet1284Values(const char *device_id, 24125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_option_t **values); 24225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern const char *_cupsGetDestResource(cups_dest_t *dest, char *resource, 24325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann size_t resourcesize); 24425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern int _cupsGetDests(http_t *http, ipp_op_t op, 24525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann const char *name, cups_dest_t **dests, 24625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann cups_ptype_t type, cups_ptype_t mask); 24725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern const char *_cupsGetPassword(const char *prompt); 24825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern void _cupsGlobalLock(void); 24925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern _cups_globals_t *_cupsGlobals(void); 25025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern void _cupsGlobalUnlock(void); 25125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef HAVE_GSSAPI 25225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern const char *_cupsGSSServiceName(void); 25325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* HAVE_GSSAPI */ 25425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern int _cupsNextDelay(int current, int *previous); 25525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern void _cupsSetDefaults(void); 25625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern void _cupsSetError(ipp_status_t status, const char *message, 25725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann int localize); 25825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern void _cupsSetHTTPError(http_status_t status); 25925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef HAVE_GSSAPI 26025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern int _cupsSetNegotiateAuthString(http_t *http, 26125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann const char *method, 26225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann const char *resource); 26325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* HAVE_GSSAPI */ 26425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmannextern char *_cupsUserDefault(char *name, size_t namesize); 26525aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 26625aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 26725aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann/* 26825aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann * C++ magic... 26925aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann */ 27025aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann 27125aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# ifdef __cplusplus 27225aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann} 27325aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann# endif /* __cplusplus */ 27425aee82d491492e1fa3b005e5880e684dc081ffbPhilip P. Moltmann#endif /* !_CUPS_CUPS_PRIVATE_H_ */ 275