diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2012-01-19 16:53:50 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2012-01-19 16:53:50 +0000 |
commit | dcb445bcf3e9ec2efd56550263052aca70beb08e (patch) | |
tree | 9a0d2260f2bbfdc8a6aa561c138baca1a58f8228 /cups/cups-private.h | |
parent | 9c80ffa289171a48b10cbda2098289ed0c7b96cc (diff) | |
download | cups-dcb445bcf3e9ec2efd56550263052aca70beb08e.tar.gz |
Merge changes from CUPS 1.6svn-r10188, including changes for <rdar://problem/10127258> CUPS 1.6: New printer/printing APIs
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3618 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/cups-private.h')
-rw-r--r-- | cups/cups-private.h | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/cups/cups-private.h b/cups/cups-private.h index 16f81ea0d..e2ae33741 100644 --- a/cups/cups-private.h +++ b/cups/cups-private.h @@ -3,7 +3,7 @@ * * Private definitions for CUPS. * - * Copyright 2007-2011 by Apple Inc. + * Copyright 2007-2012 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -50,6 +50,14 @@ extern "C" { * Types... */ +typedef struct _cups_buffer_s /**** Read/write buffer ****/ +{ + struct _cups_buffer_s *next; /* Next buffer in list */ + size_t size; /* Size of buffer */ + char used, /* Is this buffer used? */ + d[1]; /* Data buffer */ +} _cups_buffer_t; + typedef struct _cups_globals_s /**** CUPS global state data ****/ { /* Multiple places... */ @@ -95,7 +103,7 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/ /* ipp.c */ ipp_uchar_t ipp_date[11]; /* RFC-1903 date/time data */ - _ipp_buffer_t *ipp_buffers; /* Buffer list */ + _cups_buffer_t *cups_buffers; /* Buffer list */ /* ipp-support.c */ int ipp_port; /* IPP port number */ @@ -138,7 +146,8 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/ http_encryption_t encryption; /* Encryption setting */ char user[65], /* User name */ server[256], /* Server address */ - servername[256];/* Server hostname */ + servername[256],/* Server hostname */ + password[128]; /* Password for default callback */ cups_password_cb2_t password_cb; /* Password callback */ void *password_data; /* Password user data */ http_tls_credentials_t tls_credentials; @@ -160,6 +169,40 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/ /* PPD filename */ } _cups_globals_t; +typedef struct _cups_media_db_s /* Media database */ +{ + char *color, /* Media color, if any */ + *key, /* Media key, if any */ + *info, /* Media human-readable name, if any */ + *size_name, /* Media PWG size name, if provided */ + *source, /* Media source, if any */ + *type; /* Media type, if any */ + int width, /* Width in hundredths of millimeters */ + length, /* Length in hundredths of + * millimeters */ + bottom, /* Bottom margin in hundredths of + * millimeters */ + left, /* Left margin in hundredths of + * millimeters */ + right, /* Right margin in hundredths of + * millimeters */ + top; /* Top margin in hundredths of + * millimeters */ +} _cups_media_db_t; + +struct _cups_dinfo_s /* Destination capability and status + * information */ +{ + const char *uri; /* Printer URI */ + char *resource; /* Resource path */ + ipp_t *attrs; /* Printer attributes */ + cups_array_t *constraints; /* Job constraints */ + cups_array_t *localizations; /* Localization information */ + cups_array_t *media_db; /* Media database */ + _cups_media_db_t min_size, /* Minimum size */ + max_size; /* Maximum size */ +}; + /* * Prototypes... @@ -174,11 +217,17 @@ extern void _cupsAppleSetDefaultPrinter(CFStringRef name); extern void _cupsAppleSetUseLastPrinter(int uselast); # endif /* __APPLE__ */ +extern char *_cupsBufferGet(size_t size); +extern void _cupsBufferRelease(char *b); + extern http_t *_cupsConnect(void); extern int _cupsGet1284Values(const char *device_id, cups_option_t **values); +extern const char *_cupsGetDestResource(cups_dest_t *dest, char *resource, + size_t resourcesize); extern int _cupsGetDests(http_t *http, ipp_op_t op, - const char *name, cups_dest_t **dests); + const char *name, cups_dest_t **dests, + cups_ptype_t type, cups_ptype_t mask); extern const char *_cupsGetPassword(const char *prompt); extern void _cupsGlobalLock(void); extern _cups_globals_t *_cupsGlobals(void); |