adminutil.h   adminutil.h 
/* /*
* "$Id: adminutil.h 10586 2012-08-29 21:03:10Z mike $" * "$Id: adminutil.h 10585 2012-08-29 21:03:04Z mike $"
* *
* Administration utility API definitions for CUPS. * Administration utility API definitions for CUPS.
* *
* Copyright 2007-2012 by Apple Inc. * Copyright 2007-2012 by Apple Inc.
* Copyright 2001-2007 by Easy Software Products. * Copyright 2001-2007 by Easy Software Products.
* *
* These coded instructions, statements, and computer programs are the * These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright * property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.tx t" * law. Distribution and use rights are outlined in the file "LICENSE.tx t"
* which should have been included with this file. If this file is * which should have been included with this file. If this file is
skipping to change at line 76 skipping to change at line 76
cups_option_t *settings) cups_option_t *settings)
_CUPS_API_1_3; _CUPS_API_1_3;
# ifdef __cplusplus # ifdef __cplusplus
} }
# endif /* __cplusplus */ # endif /* __cplusplus */
#endif /* !_CUPS_ADMINUTIL_H_ */ #endif /* !_CUPS_ADMINUTIL_H_ */
/* /*
* End of "$Id: adminutil.h 10586 2012-08-29 21:03:10Z mike $". * End of "$Id: adminutil.h 10585 2012-08-29 21:03:04Z mike $".
*/ */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 cups.h   cups.h 
/* /*
* "$Id: cups.h 10688 2012-11-09 03:24:57Z mike $" * "$Id: cups.h 10909 2013-03-14 18:45:49Z mike $"
* *
* API definitions for CUPS. * API definitions for CUPS.
* *
* Copyright 2007-2012 by Apple Inc. * Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products. * Copyright 1997-2007 by Easy Software Products.
* *
* These coded instructions, statements, and computer programs are the * These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright * property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.tx t" * law. Distribution and use rights are outlined in the file "LICENSE.tx t"
* which should have been included with this file. If this file is * which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/". * file is missing or damaged, see the license at "http://www.cups.org/".
* *
* This file is subject to the Apple OS-Developed Software exception. * This file is subject to the Apple OS-Developed Software exception.
*/ */
skipping to change at line 40 skipping to change at line 40
typedef off_t ssize_t; /* @private@ */ typedef off_t ssize_t; /* @private@ */
# endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */ # endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */
# ifdef __BLOCKS__ # ifdef __BLOCKS__
# include <dispatch/dispatch.h> # include <dispatch/dispatch.h>
# endif /* __BLOCKS__ */ # endif /* __BLOCKS__ */
# include "file.h" # include "file.h"
# include "ipp.h" # include "ipp.h"
# include "language.h" # include "language.h"
# include "pwg.h"
/* /*
* C++ magic... * C++ magic...
*/ */
# ifdef __cplusplus # ifdef __cplusplus
extern "C" { extern "C" {
# endif /* __cplusplus */ # endif /* __cplusplus */
/* /*
* Constants... * Constants...
*/ */
# define CUPS_VERSION 1.0602 # define CUPS_VERSION 1.0700
# define CUPS_VERSION_MAJOR 1 # define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 6 # define CUPS_VERSION_MINOR 7
# define CUPS_VERSION_PATCH 2 # define CUPS_VERSION_PATCH 0
# define CUPS_BC_FD 3 # define CUPS_BC_FD 3
/* Back-channel file descriptor for /* Back-channel file descriptor for
* select/poll */ * select/poll */
# define CUPS_DATE_ANY (time_t)-1 # define CUPS_DATE_ANY (time_t)-1
# define CUPS_EXCLUDE_NONE (const char *)0 # define CUPS_EXCLUDE_NONE (const char *)0
# define CUPS_FORMAT_AUTO "application/octet-stream" # define CUPS_FORMAT_AUTO "application/octet-stream"
# define CUPS_FORMAT_COMMAND "application/vnd.cups-command" # define CUPS_FORMAT_COMMAND "application/vnd.cups-command"
# define CUPS_FORMAT_JPEG "image/jpeg" # define CUPS_FORMAT_JPEG "image/jpeg"
# define CUPS_FORMAT_PDF "application/pdf" # define CUPS_FORMAT_PDF "application/pdf"
skipping to change at line 352 skipping to change at line 353
*/ */
extern int cupsCancelJob(const char *name, int job_id); extern int cupsCancelJob(const char *name, int job_id);
extern ipp_t *cupsDoFileRequest(http_t *http, ipp_t *request, extern ipp_t *cupsDoFileRequest(http_t *http, ipp_t *request,
const char *resource, const char *resource,
const char *filename); const char *filename);
extern ipp_t *cupsDoRequest(http_t *http, ipp_t *request, extern ipp_t *cupsDoRequest(http_t *http, ipp_t *request,
const char *resource); const char *resource);
extern http_encryption_t cupsEncryption(void); extern http_encryption_t cupsEncryption(void);
extern void cupsFreeJobs(int num_jobs, cups_job_t *jobs); extern void cupsFreeJobs(int num_jobs, cups_job_t *jobs);
extern int cupsGetClasses(char ***classes) _CUPS_DEPRECATED; extern int cupsGetClasses(char ***classes) _CUPS_DEPRECATED_MSG ("Use cupsGetDests instead.");
extern const char *cupsGetDefault(void); extern const char *cupsGetDefault(void);
extern int cupsGetJobs(cups_job_t **jobs, const char *name, extern int cupsGetJobs(cups_job_t **jobs, const char *name,
int myjobs, int whichjobs); int myjobs, int whichjobs);
extern const char *cupsGetPPD(const char *name); extern const char *cupsGetPPD(const char *name);
extern int cupsGetPrinters(char ***printers) _CUPS_DEPRECATED; extern int cupsGetPrinters(char ***printers) _CUPS_DEPRECATED_M SG("Use cupsGetDests instead.");
extern ipp_status_t cupsLastError(void); extern ipp_status_t cupsLastError(void);
extern int cupsPrintFile(const char *name, const char *filename , extern int cupsPrintFile(const char *name, const char *filename ,
const char *title, int num_options, const char *title, int num_options,
cups_option_t *options); cups_option_t *options);
extern int cupsPrintFiles(const char *name, int num_files, extern int cupsPrintFiles(const char *name, int num_files,
const char **files, const char *title , const char **files, const char *title ,
int num_options, cups_option_t *optio ns); int num_options, cups_option_t *optio ns);
extern char *cupsTempFile(char *filename, int len) _CUPS_DEPRECA TED; extern char *cupsTempFile(char *filename, int len) _CUPS_DEPRECA TED_MSG("Use cupsTempFd or cupsTempFile2 instead.");
extern int cupsTempFd(char *filename, int len); extern int cupsTempFd(char *filename, int len);
extern int cupsAddDest(const char *name, const char *instance, extern int cupsAddDest(const char *name, const char *instance,
int num_dests, cups_dest_t **dests); int num_dests, cups_dest_t **dests);
extern void cupsFreeDests(int num_dests, cups_dest_t *dests); extern void cupsFreeDests(int num_dests, cups_dest_t *dests);
extern cups_dest_t *cupsGetDest(const char *name, const char *instance, extern cups_dest_t *cupsGetDest(const char *name, const char *instance,
int num_dests, cups_dest_t *dests); int num_dests, cups_dest_t *dests);
extern int cupsGetDests(cups_dest_t **dests); extern int cupsGetDests(cups_dest_t **dests);
extern void cupsSetDests(int num_dests, cups_dest_t *dests); extern void cupsSetDests(int num_dests, cups_dest_t *dests);
skipping to change at line 589 skipping to change at line 590
const char *value) const char *value)
_CUPS_API_1_6; _CUPS_API_1_6;
extern http_status_t cupsStartDestDocument(http_t *http, cups_dest_t *des t, extern http_status_t cupsStartDestDocument(http_t *http, cups_dest_t *des t,
cups_dinfo_t *info, int job_id , cups_dinfo_t *info, int job_id ,
const char *docname, const char *docname,
const char *format, const char *format,
int num_options, int num_options,
cups_option_t *options, cups_option_t *options,
int last_document) _CUPS_API_1 _6; int last_document) _CUPS_API_1 _6;
/* New in CUPS 1.7 */
extern ipp_attribute_t *cupsFindDestDefault(http_t *http, cups_dest_t *dest
,
cups_dinfo_t *dinfo,
const char *option) _CUPS_API_1
_7;
extern ipp_attribute_t *cupsFindDestReady(http_t *http, cups_dest_t *dest,
cups_dinfo_t *dinfo,
const char *option) _CUPS_API_1_7
;
extern ipp_attribute_t *cupsFindDestSupported(http_t *http, cups_dest_t *de
st,
cups_dinfo_t *dinfo,
const char *option)
_CUPS_API_1_7;
extern int cupsGetDestMediaByIndex(http_t *http, cups_dest_t *d
est,
cups_dinfo_t *dinfo, int n,
unsigned flags,
cups_size_t *size)
_CUPS_API_1_7;
extern int cupsGetDestMediaCount(http_t *http, cups_dest_t *des
t,
cups_dinfo_t *dinfo,
unsigned flags) _CUPS_API_1_7;
extern int cupsGetDestMediaDefault(http_t *http, cups_dest_t *d
est,
cups_dinfo_t *dinfo,
unsigned flags,
cups_size_t *size)
_CUPS_API_1_7;
extern void cupsSetUserAgent(const char *user_agent) _CUPS_API_1
_7;
extern const char *cupsUserAgent(void) _CUPS_API_1_7;
# ifdef __cplusplus # ifdef __cplusplus
} }
# endif /* __cplusplus */ # endif /* __cplusplus */
#endif /* !_CUPS_CUPS_H_ */ #endif /* !_CUPS_CUPS_H_ */
/* /*
* End of "$Id: cups.h 10688 2012-11-09 03:24:57Z mike $". * End of "$Id: cups.h 10909 2013-03-14 18:45:49Z mike $".
*/ */
 End of changes. 10 change blocks. 
9 lines changed or deleted 45 lines changed or added


 http.h   http.h 
/* /*
* "$Id: http.h 10424 2012-04-23 17:26:57Z mike $" * "$Id: http.h 10881 2013-02-25 22:12:59Z mike $"
* *
* Hyper-Text Transport Protocol definitions for CUPS. * Hyper-Text Transport Protocol definitions for CUPS.
* *
* Copyright 2007-2012 by Apple Inc. * Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved. * Copyright 1997-2007 by Easy Software Products, all rights reserved.
* *
* These coded instructions, statements, and computer programs are the * These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright * property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.tx t" * law. Distribution and use rights are outlined in the file "LICENSE.tx t"
* which should have been included with this file. If this file is * which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/". * file is missing or damaged, see the license at "http://www.cups.org/".
* *
* This file is subject to the Apple OS-Developed Software exception. * This file is subject to the Apple OS-Developed Software exception.
*/ */
skipping to change at line 39 skipping to change at line 39
# include <sys/types.h> # include <sys/types.h>
# ifdef WIN32 # ifdef WIN32
# ifndef __CUPS_SSIZE_T_DEFINED # ifndef __CUPS_SSIZE_T_DEFINED
# define __CUPS_SSIZE_T_DEFINED # define __CUPS_SSIZE_T_DEFINED
/* Windows does not support the ssize_t type, so map it to off_t... */ /* Windows does not support the ssize_t type, so map it to off_t... */
typedef off_t ssize_t; /* @private@ */ typedef off_t ssize_t; /* @private@ */
# endif /* !__CUPS_SSIZE_T_DEFINED */ # endif /* !__CUPS_SSIZE_T_DEFINED */
# include <winsock2.h> # include <winsock2.h>
# include <ws2tcpip.h> # include <ws2tcpip.h>
# else # else
# ifdef __sgi
# define INET6 /* IRIX IPv6 support... */
# endif /* __sgi */
# include <unistd.h> # include <unistd.h>
# include <sys/time.h> # include <sys/time.h>
# include <sys/socket.h> # include <sys/socket.h>
# include <netdb.h> # include <netdb.h>
# include <netinet/in.h> # include <netinet/in.h>
# include <arpa/inet.h> # include <arpa/inet.h>
# include <netinet/in_systm.h> # include <netinet/in_systm.h>
# include <netinet/ip.h> # include <netinet/ip.h>
# if !defined(__APPLE__) || !defined(TCP_NODELAY) # if !defined(__APPLE__) || !defined(TCP_NODELAY)
# include <netinet/tcp.h> # include <netinet/tcp.h>
skipping to change at line 128 skipping to change at line 125
HTTP_AUTH_BASIC, /* Basic authentication in use */ HTTP_AUTH_BASIC, /* Basic authentication in use */
HTTP_AUTH_MD5, /* Digest authentication in use */ HTTP_AUTH_MD5, /* Digest authentication in use */
HTTP_AUTH_MD5_SESS, /* MD5-session authentication in use */ HTTP_AUTH_MD5_SESS, /* MD5-session authentication in use */
HTTP_AUTH_MD5_INT, /* Digest authentication in use for body */ HTTP_AUTH_MD5_INT, /* Digest authentication in use for body */
HTTP_AUTH_MD5_SESS_INT, /* MD5-session authentication in use for body */ HTTP_AUTH_MD5_SESS_INT, /* MD5-session authentication in use for body */
HTTP_AUTH_NEGOTIATE /* GSSAPI authentication in use @sin ce CUPS 1.3/OS X 10.5@ */ HTTP_AUTH_NEGOTIATE /* GSSAPI authentication in use @sin ce CUPS 1.3/OS X 10.5@ */
} http_auth_t; } http_auth_t;
typedef enum http_encoding_e /**** HTTP transfer encoding values ****/ typedef enum http_encoding_e /**** HTTP transfer encoding values ****/
{ {
HTTP_ENCODE_LENGTH, /* Data is sent with Content-Length HTTP_ENCODING_LENGTH, /* Data is sent with Content
*/ -Length */
HTTP_ENCODE_CHUNKED, /* Data is chunked */ HTTP_ENCODING_CHUNKED, /* Data is chunked */
HTTP_ENCODE_FIELDS /* Sending HTTP fields */ HTTP_ENCODING_FIELDS /* Sending HTTP fields */
# ifndef _CUPS_NO_DEPRECATED
# define HTTP_ENCODE_LENGTH HTTP_ENCODING_LENGTH
# define HTTP_ENCODE_CHUNKED HTTP_ENCODING_CHUNKED
# define HTTP_ENCODE_FIELDS HTTP_ENCODING_FIELDS
# endif /* !_CUPS_NO_DEPRECATED */
} http_encoding_t; } http_encoding_t;
typedef enum http_encryption_e /**** HTTP encryption values ****/ typedef enum http_encryption_e /**** HTTP encryption values ****/
{ {
HTTP_ENCRYPT_IF_REQUESTED, /* Encrypt if requested (TLS upgrade HTTP_ENCRYPTION_IF_REQUESTED, /* Encrypt if requested (TLS
) */ upgrade) */
HTTP_ENCRYPT_NEVER, /* Never encrypt */ HTTP_ENCRYPTION_NEVER, /* Never encrypt */
HTTP_ENCRYPT_REQUIRED, /* Encryption is required (TLS upgra HTTP_ENCRYPTION_REQUIRED, /* Encryption is required (TLS upgra
de) */ de) */
HTTP_ENCRYPT_ALWAYS /* Always encrypt (SSL) */ HTTP_ENCRYPTION_ALWAYS /* Always encrypt (SSL) */
# ifndef _CUPS_NO_DEPRECATED
# define HTTP_ENCRYPT_IF_REQUESTED HTTP_ENCRYPTION_IF_REQUESTED
# define HTTP_ENCRYPT_NEVER HTTP_ENCRYPTION_NEVER
# define HTTP_ENCRYPT_REQUIRED HTTP_ENCRYPTION_REQUIRED
# define HTTP_ENCRYPT_ALWAYS HTTP_ENCRYPTION_ALWAYS
# endif /* !_CUPS_NO_DEPRECATED */
} http_encryption_t; } http_encryption_t;
typedef enum http_field_e /**** HTTP field names ****/ typedef enum http_field_e /**** HTTP field names ****/
{ {
HTTP_FIELD_UNKNOWN = -1, /* Unknown field */ HTTP_FIELD_UNKNOWN = -1, /* Unknown field */
HTTP_FIELD_ACCEPT_LANGUAGE, /* Accept-Language field */ HTTP_FIELD_ACCEPT_LANGUAGE, /* Accept-Language field */
HTTP_FIELD_ACCEPT_RANGES, /* Accept-Ranges field */ HTTP_FIELD_ACCEPT_RANGES, /* Accept-Ranges field */
HTTP_FIELD_AUTHORIZATION, /* Authorization field */ HTTP_FIELD_AUTHORIZATION, /* Authorization field */
HTTP_FIELD_CONNECTION, /* Connection field */ HTTP_FIELD_CONNECTION, /* Connection field */
HTTP_FIELD_CONTENT_ENCODING, /* Content-Encoding field */ HTTP_FIELD_CONTENT_ENCODING, /* Content-Encoding field */
skipping to change at line 171 skipping to change at line 181
HTTP_FIELD_LAST_MODIFIED, /* Last-Modified field */ HTTP_FIELD_LAST_MODIFIED, /* Last-Modified field */
HTTP_FIELD_LINK, /* Link field */ HTTP_FIELD_LINK, /* Link field */
HTTP_FIELD_LOCATION, /* Location field */ HTTP_FIELD_LOCATION, /* Location field */
HTTP_FIELD_RANGE, /* Range field */ HTTP_FIELD_RANGE, /* Range field */
HTTP_FIELD_REFERER, /* Referer field */ HTTP_FIELD_REFERER, /* Referer field */
HTTP_FIELD_RETRY_AFTER, /* Retry-After field */ HTTP_FIELD_RETRY_AFTER, /* Retry-After field */
HTTP_FIELD_TRANSFER_ENCODING, /* Transfer-Encoding field * / HTTP_FIELD_TRANSFER_ENCODING, /* Transfer-Encoding field * /
HTTP_FIELD_UPGRADE, /* Upgrade field */ HTTP_FIELD_UPGRADE, /* Upgrade field */
HTTP_FIELD_USER_AGENT, /* User-Agent field */ HTTP_FIELD_USER_AGENT, /* User-Agent field */
HTTP_FIELD_WWW_AUTHENTICATE, /* WWW-Authenticate field */ HTTP_FIELD_WWW_AUTHENTICATE, /* WWW-Authenticate field */
HTTP_FIELD_ACCEPT_ENCODING, /* Accepting-Encoding field @since C
UPS 1.7@ */
HTTP_FIELD_ALLOW, /* Allow field @since CUPS 1.7@ */
HTTP_FIELD_SERVER, /* Server field @since CUPS 1.7@ */
HTTP_FIELD_MAX /* Maximum field index */ HTTP_FIELD_MAX /* Maximum field index */
} http_field_t; } http_field_t;
typedef enum http_keepalive_e /**** HTTP keep-alive values ****/ typedef enum http_keepalive_e /**** HTTP keep-alive values ****/
{ {
HTTP_KEEPALIVE_OFF = 0, /* No keep alive support */ HTTP_KEEPALIVE_OFF = 0, /* No keep alive support */
HTTP_KEEPALIVE_ON /* Use keep alive */ HTTP_KEEPALIVE_ON /* Use keep alive */
} http_keepalive_t; } http_keepalive_t;
typedef enum http_state_e /**** HTTP state values; states typedef enum http_state_e /**** HTTP state values; states
**** are server-oriented... **** are server-oriented...
****/ ****/
{ {
HTTP_WAITING, /* Waiting for command */ HTTP_STATE_ERROR = -1, /* Error on socket */
HTTP_OPTIONS, /* OPTIONS command, waiting HTTP_STATE_WAITING, /* Waiting for command */
for blank line */ HTTP_STATE_OPTIONS, /* OPTIONS command, waiting for blan
HTTP_GET, /* GET command, waiting for blank li k line */
ne */ HTTP_STATE_GET, /* GET command, waiting for blank li
HTTP_GET_SEND, /* GET command, sending data */ ne */
HTTP_HEAD, /* HEAD command, waiting for blank l HTTP_STATE_GET_SEND, /* GET command, sending data */
ine */ HTTP_STATE_HEAD, /* HEAD command, waiting for blank l
HTTP_POST, /* POST command, waiting for blank l ine */
ine */ HTTP_STATE_POST, /* POST command, waiting for blank l
HTTP_POST_RECV, /* POST command, receiving data */ ine */
HTTP_POST_SEND, /* POST command, sending data */ HTTP_STATE_POST_RECV, /* POST command, receiving d
HTTP_PUT, /* PUT command, waiting for blank li ata */
ne */ HTTP_STATE_POST_SEND, /* POST command, sending dat
HTTP_PUT_RECV, /* PUT command, receiving data */ a */
HTTP_DELETE, /* DELETE command, waiting for blank HTTP_STATE_PUT, /* PUT command, waiting for blank li
line */ ne */
HTTP_TRACE, /* TRACE command, waiting for blank HTTP_STATE_PUT_RECV, /* PUT command, receiving data */
line */ HTTP_STATE_DELETE, /* DELETE command, waiting for blank
HTTP_CLOSE, /* CLOSE command, waiting for blank line */
line */ HTTP_STATE_TRACE, /* TRACE command, waiting for blank
HTTP_STATUS /* Command complete, sending status line */
*/ HTTP_STATE_CONNECT, /* CONNECT command, waiting for blan
k line */
HTTP_STATE_STATUS, /* Command complete, sending status
*/
HTTP_STATE_UNKNOWN_METHOD, /* Unknown request method, waiting f
or blank line @since CUPS 1.7@ */
HTTP_STATE_UNKNOWN_VERSION /* Unknown request method, waiting f
or blank line @since CUPS 1.7@ */
# ifndef _CUPS_NO_DEPRECATED
# define HTTP_WAITING HTTP_STATE_WAITING
# define HTTP_OPTIONS HTTP_STATE_OPTIONS
# define HTTP_GET HTTP_STATE_GET
# define HTTP_GET_SEND HTTP_STATE_GET_SEND
# define HTTP_HEAD HTTP_STATE_HEAD
# define HTTP_POST HTTP_STATE_POST
# define HTTP_POST_RECV HTTP_STATE_POST_RECV
# define HTTP_POST_SEND HTTP_STATE_POST_SEND
# define HTTP_PUT HTTP_STATE_PUT
# define HTTP_PUT_RECV HTTP_STATE_PUT_RECV
# define HTTP_DELETE HTTP_STATE_DELETE
# define HTTP_TRACE HTTP_STATE_TRACE
# define HTTP_CLOSE HTTP_STATE_CONNECT
# define HTTP_STATUS HTTP_STATE_STATUS
# endif /* !_CUPS_NO_DEPRECATED */
} http_state_t; } http_state_t;
typedef enum http_status_e /**** HTTP status codes ****/ typedef enum http_status_e /**** HTTP status codes ****/
{ {
HTTP_ERROR = -1, /* An error response from httpXxxx() HTTP_STATUS_ERROR = -1, /* An error response from httpXxxx()
*/ */
HTTP_STATUS_NONE = 0, /* No Expect value @since CU
PS 1.7@ */
HTTP_CONTINUE = 100, /* Everything OK, keep going... */ HTTP_STATUS_CONTINUE = 100, /* Everything OK, keep going... */
HTTP_SWITCHING_PROTOCOLS, /* HTTP upgrade to TLS/SSL */ HTTP_STATUS_SWITCHING_PROTOCOLS, /* HTTP upgrade to TLS/SSL */
HTTP_OK = 200, /* OPTIONS/GET/HEAD/POST/TRACE comma HTTP_STATUS_OK = 200, /* OPTIONS/GET/HEAD/POST/TRA
nd was successful */ CE command was successful */
HTTP_CREATED, /* PUT command was successfu HTTP_STATUS_CREATED, /* PUT command was successful */
l */ HTTP_STATUS_ACCEPTED, /* DELETE command was succes
HTTP_ACCEPTED, /* DELETE command was successful */ sful */
HTTP_NOT_AUTHORITATIVE, /* Information isn't authoritative * HTTP_STATUS_NOT_AUTHORITATIVE, /* Information isn't authoritative *
/ /
HTTP_NO_CONTENT, /* Successful command, no new data * HTTP_STATUS_NO_CONTENT, /* Successful command, no new data *
/ /
HTTP_RESET_CONTENT, /* Content was reset/recreated */ HTTP_STATUS_RESET_CONTENT, /* Content was reset/recreated */
HTTP_PARTIAL_CONTENT, /* Only a partial file was r HTTP_STATUS_PARTIAL_CONTENT, /* Only a partial file was recieved/
ecieved/sent */ sent */
HTTP_MULTIPLE_CHOICES = 300, /* Multiple files match request */ HTTP_STATUS_MULTIPLE_CHOICES = 300, /* Multiple files match request */
HTTP_MOVED_PERMANENTLY, /* Document has moved permanently */ HTTP_STATUS_MOVED_PERMANENTLY, /* Document has moved permanently */
HTTP_MOVED_TEMPORARILY, /* Document has moved temporarily */ HTTP_STATUS_MOVED_TEMPORARILY, /* Document has moved temporarily */
HTTP_SEE_OTHER, /* See this other link... */ HTTP_STATUS_SEE_OTHER, /* See this other link... */
HTTP_NOT_MODIFIED, /* File not modified */ HTTP_STATUS_NOT_MODIFIED, /* File not modified */
HTTP_USE_PROXY, /* Must use a proxy to access this U HTTP_STATUS_USE_PROXY, /* Must use a proxy to access this U
RI */ RI */
HTTP_BAD_REQUEST = 400, /* Bad request */ HTTP_STATUS_BAD_REQUEST = 400, /* Bad request */
HTTP_UNAUTHORIZED, /* Unauthorized to access host */ HTTP_STATUS_UNAUTHORIZED, /* Unauthorized to access host */
HTTP_PAYMENT_REQUIRED, /* Payment required */ HTTP_STATUS_PAYMENT_REQUIRED, /* Payment required */
HTTP_FORBIDDEN, /* Forbidden to access this URI */ HTTP_STATUS_FORBIDDEN, /* Forbidden to access this URI */
HTTP_NOT_FOUND, /* URI was not found */ HTTP_STATUS_NOT_FOUND, /* URI was not found */
HTTP_METHOD_NOT_ALLOWED, /* Method is not allowed */ HTTP_STATUS_METHOD_NOT_ALLOWED, /* Method is not allowed */
HTTP_NOT_ACCEPTABLE, /* Not Acceptable */ HTTP_STATUS_NOT_ACCEPTABLE, /* Not Acceptable */
HTTP_PROXY_AUTHENTICATION, /* Proxy Authentication is Required HTTP_STATUS_PROXY_AUTHENTICATION, /* Proxy Authentication is Required
*/ */
HTTP_REQUEST_TIMEOUT, /* Request timed out */ HTTP_STATUS_REQUEST_TIMEOUT, /* Request timed out */
HTTP_CONFLICT, /* Request is self-conflicting */ HTTP_STATUS_CONFLICT, /* Request is self-conflicti
HTTP_GONE, /* Server has gone away */ ng */
HTTP_LENGTH_REQUIRED, /* A content length or encod HTTP_STATUS_GONE, /* Server has gone away */
ing is required */ HTTP_STATUS_LENGTH_REQUIRED, /* A content length or encoding is r
HTTP_PRECONDITION, /* Precondition failed */ equired */
HTTP_REQUEST_TOO_LARGE, /* Request entity too large */ HTTP_STATUS_PRECONDITION, /* Precondition failed */
HTTP_URI_TOO_LONG, /* URI too long */ HTTP_STATUS_REQUEST_TOO_LARGE, /* Request entity too large */
HTTP_UNSUPPORTED_MEDIATYPE, /* The requested media type is unsup HTTP_STATUS_URI_TOO_LONG, /* URI too long */
ported */ HTTP_STATUS_UNSUPPORTED_MEDIATYPE, /* The requested media type is unsup
HTTP_REQUESTED_RANGE, /* The requested range is no ported */
t satisfiable */ HTTP_STATUS_REQUESTED_RANGE, /* The requested range is not satisf
HTTP_EXPECTATION_FAILED, /* The expectation given in an Expec iable */
t header field was not met */ HTTP_STATUS_EXPECTATION_FAILED, /* The expectation given in an Expec
HTTP_UPGRADE_REQUIRED = 426, /* Upgrade to SSL/TLS required */ t header field was not met */
HTTP_STATUS_UPGRADE_REQUIRED = 426, /* Upgrade to SSL/TLS required */
HTTP_SERVER_ERROR = 500, /* Internal server error */
HTTP_NOT_IMPLEMENTED, /* Feature not implemented * HTTP_STATUS_SERVER_ERROR = 500, /* Internal server error */
/ HTTP_STATUS_NOT_IMPLEMENTED, /* Feature not implemented */
HTTP_BAD_GATEWAY, /* Bad gateway */ HTTP_STATUS_BAD_GATEWAY, /* Bad gateway */
HTTP_SERVICE_UNAVAILABLE, /* Service is unavailable */ HTTP_STATUS_SERVICE_UNAVAILABLE, /* Service is unavailable */
HTTP_GATEWAY_TIMEOUT, /* Gateway connection timed HTTP_STATUS_GATEWAY_TIMEOUT, /* Gateway connection timed out */
out */ HTTP_STATUS_NOT_SUPPORTED, /* HTTP version not supported */
HTTP_NOT_SUPPORTED, /* HTTP version not supported */
HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED = 1000,
HTTP_AUTHORIZATION_CANCELED = 1000, /* User canceled authorization @sinc /* User canceled authorization @sinc
e CUPS 1.4@ */ e CUPS 1.4@ */
HTTP_PKI_ERROR, /* Error negotiating a secure connec HTTP_STATUS_CUPS_PKI_ERROR, /* Error negotiating a secure connec
tion @since CUPS 1.5/OS X 10.7@ */ tion @since CUPS 1.5/OS X 10.7@ */
HTTP_WEBIF_DISABLED /* Web interface is disabled @privat HTTP_STATUS_CUPS_WEBIF_DISABLED /* Web interface is disabled @privat
e@ */ e@ */
# ifndef _CUPS_NO_DEPRECATED
/* Old names for this enumeration */
# define HTTP_ERROR HTTP_STATUS_ERROR
# define HTTP_CONTINUE HTTP_STATUS_CONTINUE
# define HTTP_SWITCHING_PROTOCOLS HTTP_STATUS_SWITCHING_PROTOCOLS
# define HTTP_OK HTTP_STATUS_OK
# define HTTP_CREATED HTTP_STATUS_CREATED
# define HTTP_ACCEPTED HTTP_STATUS_ACCEPTED
# define HTTP_NOT_AUTHORITATIVE HTTP_STATUS_NOT_AUTHORITATIVE
# define HTTP_NO_CONTENT HTTP_STATUS_NO_CONTENT
# define HTTP_RESET_CONTENT HTTP_STATUS_RESET_CONTENT
# define HTTP_PARTIAL_CONTENT HTTP_STATUS_PARTIAL_CONTENT
# define HTTP_MULTIPLE_CHOICES HTTP_STATUS_MULTIPLE_CHOICES
# define HTTP_MOVED_PERMANENTLY HTTP_STATUS_MOVED_PERMANENTLY
# define HTTP_MOVED_TEMPORARILY HTTP_STATUS_MOVED_TEMPORARILY
# define HTTP_SEE_OTHER HTTP_STATUS_SEE_OTHER
# define HTTP_NOT_MODIFIED HTTP_STATUS_NOT_MODIFIED
# define HTTP_USE_PROXY HTTP_STATUS_USE_PROXY
# define HTTP_BAD_REQUEST HTTP_STATUS_BAD_REQUEST
# define HTTP_UNAUTHORIZED HTTP_STATUS_UNAUTHORIZED
# define HTTP_PAYMENT_REQUIRED HTTP_STATUS_PAYMENT_REQUIRED
# define HTTP_FORBIDDEN HTTP_STATUS_FORBIDDEN
# define HTTP_NOT_FOUND HTTP_STATUS_NOT_FOUND
# define HTTP_METHOD_NOT_ALLOWED HTTP_STATUS_METHOD_NOT_ALLOWED
# define HTTP_NOT_ACCEPTABLE HTTP_STATUS_NOT_ACCEPTABLE
# define HTTP_PROXY_AUTHENTICATION HTTP_STATUS_PROXY_AUTHENTICATION
# define HTTP_REQUEST_TIMEOUT HTTP_STATUS_REQUEST_TIMEOUT
# define HTTP_CONFLICT HTTP_STATUS_CONFLICT
# define HTTP_GONE HTTP_STATUS_GONE
# define HTTP_LENGTH_REQUIRED HTTP_STATUS_LENGTH_REQUIRED
# define HTTP_PRECONDITION HTTP_STATUS_PRECONDITION
# define HTTP_REQUEST_TOO_LARGE HTTP_STATUS_REQUEST_TOO_LARGE
# define HTTP_URI_TOO_LONG HTTP_STATUS_URI_TOO_LONG
# define HTTP_UNSUPPORTED_MEDIATYPE HTTP_STATUS_UNSUPPORTED_MEDIATYPE
# define HTTP_REQUESTED_RANGE HTTP_STATUS_REQUESTED_RANGE
# define HTTP_EXPECTATION_FAILED HTTP_STATUS_EXPECTATION_FAILED
# define HTTP_UPGRADE_REQUIRED HTTP_STATUS_UPGRADE_REQUIRED
# define HTTP_SERVER_ERROR HTTP_STATUS_SERVER_ERROR
# define HTTP_NOT_IMPLEMENTED HTTP_STATUS_NOT_IMPLEMENTED
# define HTTP_BAD_GATEWAY HTTP_STATUS_BAD_GATEWAY
# define HTTP_SERVICE_UNAVAILABLE HTTP_STATUS_SERVICE_UNAVAILABLE
# define HTTP_GATEWAY_TIMEOUT HTTP_STATUS_GATEWAY_TIMEOUT
# define HTTP_NOT_SUPPORTED HTTP_STATUS_NOT_SUPPORTED
# define HTTP_AUTHORIZATION_CANCELED HTTP_STATUS_CUPS_AUTHORIZATI
ON_CANCELED
# define HTTP_PKI_ERROR HTTP_STATUS_CUPS_PKI_ERROR
# define HTTP_WEBIF_DISABLED HTTP_STATUS_CUPS_WEBIF_DISAB
LED
# endif /* !_CUPS_NO_DEPRECATED */
} http_status_t; } http_status_t;
typedef enum http_uri_status_e /**** URI separation status @since C UPS 1.2@ ****/ typedef enum http_uri_status_e /**** URI separation status @since C UPS 1.2@ ****/
{ {
HTTP_URI_OVERFLOW = -8, /* URI buffer for httpAssembleURI is HTTP_URI_STATUS_OVERFLOW = -8, /* URI buffer for httpAssembleURI is
too small */ too small */
HTTP_URI_BAD_ARGUMENTS = -7, /* Bad arguments to function (error) HTTP_URI_STATUS_BAD_ARGUMENTS = -7, /* Bad arguments to function (error)
*/ */
HTTP_URI_BAD_RESOURCE = -6, /* Bad resource in URI (error) */ HTTP_URI_STATUS_BAD_RESOURCE = -6, /* Bad resource in URI (error) */
HTTP_URI_BAD_PORT = -5, /* Bad port number in URI (error) */ HTTP_URI_STATUS_BAD_PORT = -5, /* Bad port number in URI (error) */
HTTP_URI_BAD_HOSTNAME = -4, /* Bad hostname in URI (error) */ HTTP_URI_STATUS_BAD_HOSTNAME = -4, /* Bad hostname in URI (error) */
HTTP_URI_BAD_USERNAME = -3, /* Bad username in URI (error) */ HTTP_URI_STATUS_BAD_USERNAME = -3, /* Bad username in URI (error) */
HTTP_URI_BAD_SCHEME = -2, /* Bad scheme in URI (error) */ HTTP_URI_STATUS_BAD_SCHEME = -2, /* Bad scheme in URI (error) */
HTTP_URI_BAD_URI = -1, /* Bad/empty URI (error) */ HTTP_URI_STATUS_BAD_URI = -1, /* Bad/empty URI (error) */
HTTP_URI_OK = 0, /* URI decoded OK */ HTTP_URI_STATUS_OK = 0, /* URI decoded OK */
HTTP_URI_MISSING_SCHEME, /* Missing scheme in URI (warning) * HTTP_URI_STATUS_MISSING_SCHEME, /* Missing scheme in URI (warning) *
/ /
HTTP_URI_UNKNOWN_SCHEME, /* Unknown scheme in URI (warning) * HTTP_URI_STATUS_UNKNOWN_SCHEME, /* Unknown scheme in URI (warning) *
/ /
HTTP_URI_MISSING_RESOURCE /* Missing resource in URI (warning) HTTP_URI_STATUS_MISSING_RESOURCE /* Missing resource in URI (warning)
*/ */
# ifndef _CUPS_NO_DEPRECATED
# define HTTP_URI_OVERFLOW HTTP_URI_STATUS_OVERFLOW
# define HTTP_URI_BAD_ARGUMENTS HTTP_URI_STATUS_BAD_ARGUMENTS
# define HTTP_URI_BAD_RESOURCE HTTP_URI_STATUS_BAD_RESOURCE
# define HTTP_URI_BAD_PORT HTTP_URI_STATUS_BAD_PORT
# define HTTP_URI_BAD_HOSTNAME HTTP_URI_STATUS_BAD_HOSTNAME
# define HTTP_URI_BAD_USERNAME HTTP_URI_STATUS_BAD_USERNAME
# define HTTP_URI_BAD_SCHEME HTTP_URI_STATUS_BAD_SCHEME
# define HTTP_URI_BAD_URI HTTP_URI_STATUS_BAD_URI
# define HTTP_URI_OK HTTP_URI_STATUS_OK
# define HTTP_URI_MISSING_SCHEME HTTP_URI_STATUS_MISSING_SCHEME
# define HTTP_URI_UNKNOWN_SCHEME HTTP_URI_STATUS_UNKNOWN_SCHEME
# define HTTP_URI_MISSING_RESOURCE HTTP_URI_STATUS_MISSING_RESOURCE
# endif /* !_CUPS_NO_DEPRECATED */
} http_uri_status_t; } http_uri_status_t;
typedef enum http_uri_coding_e /**** URI en/decode flags ****/ typedef enum http_uri_coding_e /**** URI en/decode flags ****/
{ {
HTTP_URI_CODING_NONE = 0, /* Don't en/decode anything */ HTTP_URI_CODING_NONE = 0, /* Don't en/decode anything */
HTTP_URI_CODING_USERNAME = 1, /* En/decode the username po rtion */ HTTP_URI_CODING_USERNAME = 1, /* En/decode the username po rtion */
HTTP_URI_CODING_HOSTNAME = 2, /* En/decode the hostname po rtion */ HTTP_URI_CODING_HOSTNAME = 2, /* En/decode the hostname po rtion */
HTTP_URI_CODING_RESOURCE = 4, /* En/decode the resource po rtion */ HTTP_URI_CODING_RESOURCE = 4, /* En/decode the resource po rtion */
HTTP_URI_CODING_MOST = 7, /* En/decode all but the query */ HTTP_URI_CODING_MOST = 7, /* En/decode all but the query */
HTTP_URI_CODING_QUERY = 8, /* En/decode the query portion */ HTTP_URI_CODING_QUERY = 8, /* En/decode the query portion */
HTTP_URI_CODING_ALL = 15 /* En/decode everything */ HTTP_URI_CODING_ALL = 15 /* En/decode everything */
} http_uri_coding_t; } http_uri_coding_t;
typedef enum http_version_e /**** HTTP version numbers ****/ typedef enum http_version_e /**** HTTP version numbers ****/
{ {
HTTP_0_9 = 9, /* HTTP/0.9 */ HTTP_VERSION_0_9 = 9, /* HTTP/0.9 */
HTTP_1_0 = 100, /* HTTP/1.0 */ HTTP_VERSION_1_0 = 100, /* HTTP/1.0 */
HTTP_1_1 = 101 /* HTTP/1.1 */ HTTP_VERSION_1_1 = 101 /* HTTP/1.1 */
# ifndef _CUPS_NO_DEPRECATED
# define HTTP_0_9 HTTP_VERSION_0_9
# define HTTP_1_0 HTTP_VERSION_1_0
# define HTTP_1_1 HTTP_VERSION_1_1
# endif /* !_CUPS_NO_DEPRECATED */
} http_version_t; } http_version_t;
typedef union _http_addr_u /**** Socket address union, which typedef union _http_addr_u /**** Socket address union, which
**** makes using IPv6 and other **** makes using IPv6 and other
**** address types easier and **** address types easier and
**** more portable. @since CUPS 1.2 /OS X 10.5@ **** more portable. @since CUPS 1.2 /OS X 10.5@
****/ ****/
{ {
struct sockaddr addr; /* Base structure for family value * / struct sockaddr addr; /* Base structure for family value * /
struct sockaddr_in ipv4; /* IPv4 address */ struct sockaddr_in ipv4; /* IPv4 address */
skipping to change at line 334 skipping to change at line 444
/**** HTTP timeout callback @since C UPS 1.5/OS X 10.7@ ****/ /**** HTTP timeout callback @since C UPS 1.5/OS X 10.7@ ****/
/* /*
* Prototypes... * Prototypes...
*/ */
extern void httpBlocking(http_t *http, int b); extern void httpBlocking(http_t *http, int b);
extern int httpCheck(http_t *http); extern int httpCheck(http_t *http);
extern void httpClearFields(http_t *http); extern void httpClearFields(http_t *http);
extern void httpClose(http_t *http); extern void httpClose(http_t *http);
extern http_t *httpConnect(const char *host, int port); extern http_t *httpConnect(const char *host, int port)
_CUPS_DEPRECATED_MSG("Use httpConnect2
instead.");
extern http_t *httpConnectEncrypt(const char *host, int port, extern http_t *httpConnectEncrypt(const char *host, int port,
http_encryption_t encryption); http_encryption_t encryption)
_CUPS_DEPRECATED_MSG("Use httpCo
nnect2 instead.");
extern int httpDelete(http_t *http, const char *uri); extern int httpDelete(http_t *http, const char *uri);
extern int httpEncryption(http_t *http, http_encryption_t e); extern int httpEncryption(http_t *http, http_encryption_t e);
extern int httpError(http_t *http); extern int httpError(http_t *http);
extern void httpFlush(http_t *http); extern void httpFlush(http_t *http);
extern int httpGet(http_t *http, const char *uri); extern int httpGet(http_t *http, const char *uri);
extern char *httpGets(char *line, int length, http_t *http); extern char *httpGets(char *line, int length, http_t *http);
extern const char *httpGetDateString(time_t t); extern const char *httpGetDateString(time_t t);
extern time_t httpGetDateTime(const char *s); extern time_t httpGetDateTime(const char *s);
extern const char *httpGetField(http_t *http, http_field_t field); extern const char *httpGetField(http_t *http, http_field_t field);
extern struct hostent *httpGetHostByName(const char *name); extern struct hostent *httpGetHostByName(const char *name);
extern char *httpGetSubField(http_t *http, http_field_t field, extern char *httpGetSubField(http_t *http, http_field_t field,
const char *name, char *value); const char *name, char *value);
extern int httpHead(http_t *http, const char *uri); extern int httpHead(http_t *http, const char *uri);
extern void httpInitialize(void); extern void httpInitialize(void);
extern int httpOptions(http_t *http, const char *uri); extern int httpOptions(http_t *http, const char *uri);
extern int httpPost(http_t *http, const char *uri); extern int httpPost(http_t *http, const char *uri);
extern int httpPrintf(http_t *http, const char *format, ...) extern int httpPrintf(http_t *http, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3))); __attribute__ ((__format__ (__printf__, 2, 3)));
extern int httpPut(http_t *http, const char *uri); extern int httpPut(http_t *http, const char *uri);
extern int httpRead(http_t *http, char *buffer, int length) _CU extern int httpRead(http_t *http, char *buffer, int length) _CU
PS_DEPRECATED; PS_DEPRECATED_MSG("Use httpRead2 instead.");
extern int httpReconnect(http_t *http); extern int httpReconnect(http_t *http) _CUPS_DEPRECATED_MSG("Us
e httpReconnect2 instead.");
extern void httpSeparate(const char *uri, char *method, extern void httpSeparate(const char *uri, char *method,
char *username, char *host, int *port, char *username, char *host, int *port,
char *resource) _CUPS_DEPRECATED; char *resource) _CUPS_DEPRECATED_MSG("U se httpSeparateURI instead.");
extern void httpSetField(http_t *http, http_field_t field, extern void httpSetField(http_t *http, http_field_t field,
const char *value); const char *value);
extern const char *httpStatus(http_status_t status); extern const char *httpStatus(http_status_t status);
extern int httpTrace(http_t *http, const char *uri); extern int httpTrace(http_t *http, const char *uri);
extern http_status_t httpUpdate(http_t *http); extern http_status_t httpUpdate(http_t *http);
extern int httpWrite(http_t *http, const char *buffer, int leng extern int httpWrite(http_t *http, const char *buffer, int leng
th) _CUPS_DEPRECATED; th) _CUPS_DEPRECATED_MSG("Use httpWrite2 instead.");
extern char *httpEncode64(char *out, const char *in) _CUPS_DEPRE extern char *httpEncode64(char *out, const char *in) _CUPS_DEPRE
CATED; CATED_MSG("Use httpEncode64_2 instead.");
extern char *httpDecode64(char *out, const char *in) _CUPS_DEPRE extern char *httpDecode64(char *out, const char *in) _CUPS_DEPRE
CATED; CATED_MSG("Use httpDecode64_2 instead.");
extern int httpGetLength(http_t *http) _CUPS_DEPRECATED; extern int httpGetLength(http_t *http) _CUPS_DEPRECATED_MSG("Us
e httpGetLength2 instead.");
extern char *httpMD5(const char *, const char *, const char *, extern char *httpMD5(const char *, const char *, const char *,
char [33]); char [33]);
extern char *httpMD5Final(const char *, const char *, const char *, extern char *httpMD5Final(const char *, const char *, const char *,
char [33]); char [33]);
extern char *httpMD5String(const unsigned char *, char [33]); extern char *httpMD5String(const unsigned char *, char [33]);
/**** New in CUPS 1.1.19 ****/ /**** New in CUPS 1.1.19 ****/
extern void httpClearCookie(http_t *http) _CUPS_API_1_1_19; extern void httpClearCookie(http_t *http) _CUPS_API_1_1_19;
extern const char *httpGetCookie(http_t *http) _CUPS_API_1_1_19; extern const char *httpGetCookie(http_t *http) _CUPS_API_1_1_19;
extern void httpSetCookie(http_t *http, const char *cookie) _CUP S_API_1_1_19; extern void httpSetCookie(http_t *http, const char *cookie) _CUP S_API_1_1_19;
extern int httpWait(http_t *http, int msec) _CUPS_API_1_1_19; extern int httpWait(http_t *http, int msec) _CUPS_API_1_1_19;
/**** New in CUPS 1.1.21 ****/ /**** New in CUPS 1.1.21 ****/
extern char *httpDecode64_2(char *out, int *outlen, const char * in) _CUPS_API_1_1_21; extern char *httpDecode64_2(char *out, int *outlen, const char * in) _CUPS_API_1_1_21;
extern char *httpEncode64_2(char *out, int outlen, const char *i n, extern char *httpEncode64_2(char *out, int outlen, const char *i n,
int inlen) _CUPS_API_1_1_21; int inlen) _CUPS_API_1_1_21;
extern void httpSeparate2(const char *uri, extern void httpSeparate2(const char *uri,
char *method, int methodlen, char *method, int methodlen,
char *username, int usernamelen, char *username, int usernamelen,
char *host, int hostlen, int *port, char *host, int hostlen, int *port,
char *resource, int resourcelen) _CUPS _DEPRECATED; char *resource, int resourcelen) _CUPS _DEPRECATED_MSG("Use httpSeparateURI instead.");
/**** New in CUPS 1.2/OS X 10.5 ****/ /**** New in CUPS 1.2/OS X 10.5 ****/
extern int httpAddrAny(const http_addr_t *addr) _CUPS_API_1_2; extern int httpAddrAny(const http_addr_t *addr) _CUPS_API_1_2;
extern http_addrlist_t *httpAddrConnect(http_addrlist_t *addrlist, int *soc k) _CUPS_API_1_2; extern http_addrlist_t *httpAddrConnect(http_addrlist_t *addrlist, int *soc k) _CUPS_API_1_2;
extern int httpAddrEqual(const http_addr_t *addr1, extern int httpAddrEqual(const http_addr_t *addr1,
const http_addr_t *addr2) _CUPS_API_1_ 2; const http_addr_t *addr2) _CUPS_API_1_ 2;
extern void httpAddrFreeList(http_addrlist_t *addrlist) _CUPS_AP I_1_2; extern void httpAddrFreeList(http_addrlist_t *addrlist) _CUPS_AP I_1_2;
extern http_addrlist_t *httpAddrGetList(const char *hostname, int family, extern http_addrlist_t *httpAddrGetList(const char *hostname, int family,
const char *service) _CUPS_API_1_2; const char *service) _CUPS_API_1_2;
extern int httpAddrLength(const http_addr_t *addr) _CUPS_API_1_ 2; extern int httpAddrLength(const http_addr_t *addr) _CUPS_API_1_ 2;
skipping to change at line 468 skipping to change at line 580
/**** New in CUPS 1.6/OS X 10.8 ****/ /**** New in CUPS 1.6/OS X 10.8 ****/
extern http_addrlist_t *httpAddrConnect2(http_addrlist_t *addrlist, int *so ck, extern http_addrlist_t *httpAddrConnect2(http_addrlist_t *addrlist, int *so ck,
int msec, int *cancel) int msec, int *cancel)
_CUPS_API_1_6; _CUPS_API_1_6;
extern http_state_t httpGetState(http_t *http) _CUPS_API_1_6; extern http_state_t httpGetState(http_t *http) _CUPS_API_1_6;
extern http_version_t httpGetVersion(http_t *http) _CUPS_API_1_6; extern http_version_t httpGetVersion(http_t *http) _CUPS_API_1_6;
extern int httpReconnect2(http_t *http, int msec, int *cancel) extern int httpReconnect2(http_t *http, int msec, int *cancel)
_CUPS_API_1_6; _CUPS_API_1_6;
/**** New in CUPS 1.7 ****/
extern http_t *httpAcceptConnection(int fd, int blocking)
_CUPS_API_1_7;
extern http_addrlist_t *httpAddrCopyList(http_addrlist_t *src) _CUPS_API_1_
7;
extern int httpAddrListen(http_addr_t *addr, int port)
_CUPS_API_1_7;
extern int httpAddrPort(http_addr_t *addr) _CUPS_API_1_7;
extern char *httpAssembleUUID(const char *server, int port,
const char *name, int number,
char *buffer, size_t bufsize)
_CUPS_API_1_7;
extern http_t *httpConnect2(const char *host, int port,
http_addrlist_t *addrlist,
int family, http_encryption_t encrypti
on,
int blocking, int msec, int *cancel)
_CUPS_API_1_7;
extern const char *httpGetContentEncoding(http_t *http) _CUPS_API_1_7;
extern http_status_t httpGetExpect(http_t *http) _CUPS_API_1_7;
extern ssize_t httpPeek(http_t *http, char *buffer, size_t length)
_CUPS_API_1_7;
extern http_state_t httpReadRequest(http_t *http, char *resource,
size_t resourcelen) _CUPS_API_1_7;
extern void httpSetDefaultField(http_t *http, http_field_t field
,
const char *value) _CUPS_API_1_7
;
extern http_state_t httpWriteResponse(http_t *http,
http_status_t status) _CUPS_API_1_
7;
/* /*
* C++ magic... * C++ magic...
*/ */
# ifdef __cplusplus # ifdef __cplusplus
} }
# endif /* __cplusplus */ # endif /* __cplusplus */
#endif /* !_CUPS_HTTP_H_ */ #endif /* !_CUPS_HTTP_H_ */
/* /*
* End of "$Id: http.h 10424 2012-04-23 17:26:57Z mike $". * End of "$Id: http.h 10881 2013-02-25 22:12:59Z mike $".
*/ */
 End of changes. 20 change blocks. 
138 lines changed or deleted 293 lines changed or added


 ipp.h   ipp.h 
/* /*
* "$Id: ipp.h 10424 2012-04-23 17:26:57Z mike $" * "$Id: ipp.h 10920 2013-03-20 12:09:48Z mike $"
* *
* Internet Printing Protocol definitions for CUPS. * Internet Printing Protocol definitions for CUPS.
* *
* Copyright 2007-2012 by Apple Inc. * Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products. * Copyright 1997-2006 by Easy Software Products.
* *
* These coded instructions, statements, and computer programs are the * These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright * property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.tx t" * law. Distribution and use rights are outlined in the file "LICENSE.tx t"
* which should have been included with this file. If this file is * which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/". * file is missing or damaged, see the license at "http://www.cups.org/".
* *
* This file is subject to the Apple OS-Developed Software exception. * This file is subject to the Apple OS-Developed Software exception.
*/ */
#ifndef _CUPS_IPP_H_ #ifndef _CUPS_IPP_H_
# define _CUPS_IPP_H_ # define _CUPS_IPP_H_
/* /*
* Include necessary headers... * Include necessary headers...
*/ */
# include "http.h" # include "http.h"
# include <stdarg.h>
/* /*
* C++ magic... * C++ magic...
*/ */
# ifdef __cplusplus # ifdef __cplusplus
extern "C" { extern "C" {
# endif /* __cplusplus */ # endif /* __cplusplus */
/* /*
skipping to change at line 55 skipping to change at line 56
* ippPort() function to allow overrides via the IPP_PORT environment * ippPort() function to allow overrides via the IPP_PORT environment
* variable and services file if needed! * variable and services file if needed!
*/ */
# define IPP_PORT 631 # define IPP_PORT 631
/* /*
* Common limits... * Common limits...
*/ */
# define IPP_MAX_CHARSET 64 /* Maximum length of charset values
w/nul */
# define IPP_MAX_KEYWORD 256 /* Maximum length of keyword values
w/nul */
# define IPP_MAX_LANGUAGE 64 /* Maximum length of naturalLanguage
values w/nul */
# define IPP_MAX_LENGTH 32767 /* Maximum size of any single value */ # define IPP_MAX_LENGTH 32767 /* Maximum size of any single value */
# define IPP_MAX_NAME 256 /* Maximum length of common name val # define IPP_MAX_MIMETYPE 256 /* Maximum length of mimeMediaType v
ues */ alues w/nul */
# define IPP_MAX_NAME 256 /* Maximum length of common name val
ues w/nul */
# define IPP_MAX_OCTETSTRING 1023 /* Maximum length of octetString val
ues w/o nul */
# define IPP_MAX_TEXT 1024 /* Maximum length of text values w/n
ul */
# define IPP_MAX_URI 1024 /* Maximum length of uri values w/nu
l */
# define IPP_MAX_URISCHEME 64 /* Maximum length of uriScheme value
s w/nul */
# define IPP_MAX_VALUES 8 /* Power-of-2 allocation increment * / # define IPP_MAX_VALUES 8 /* Power-of-2 allocation increment * /
/* /*
* Types and structures... * Types and structures...
*/ */
typedef enum ipp_dstate_e /**** Document states ****/ typedef enum ipp_dstate_e /**** Document states ****/
{ {
IPP_DOCUMENT_PENDING = 3, IPP_DOCUMENT_PENDING = 3, /* Document is pending */
IPP_DOCUMENT_PROCESSING = 5, IPP_DOCUMENT_PROCESSING = 5, /* Document is processing */
IPP_DOCUMENT_CANCELED = 7, IPP_DOCUMENT_CANCELED = 7, /* Document is canceled */
IPP_DOCUMENT_ABORTED, IPP_DOCUMENT_ABORTED, /* Document is aborted */
IPP_DOCUMENT_COMPLETED IPP_DOCUMENT_COMPLETED /* Document is completed */
# ifndef _CUPS_NO_DEPRECATED
# define IPP_DOCUMENT_PENDING IPP_DSTATE_PENDING
# define IPP_DOCUMENT_PROCESSING IPP_DSTATE_PROCESSING
# define IPP_DOCUMENT_CANCELED IPP_DSTATE_CANCELED
# define IPP_DOCUMENT_ABORTED IPP_DSTATE_ABORTED
# define IPP_DOCUMENT_COMPLETED IPP_DSTATE_COMPLETED
# endif /* !_CUPS_NO_DEPRECATED */
} ipp_dstate_t; } ipp_dstate_t;
typedef enum ipp_finish_e /**** Finishings ****/ typedef enum ipp_finishings_e /**** Finishings ****/
{ {
IPP_FINISHINGS_NONE = 3, /* No finishing */ IPP_FINISHINGS_NONE = 3, /* No finishing */
IPP_FINISHINGS_STAPLE, /* Staple (any location) */ IPP_FINISHINGS_STAPLE, /* Staple (any location) */
IPP_FINISHINGS_PUNCH, /* Punch (any location/count ) */ IPP_FINISHINGS_PUNCH, /* Punch (any location/count ) */
IPP_FINISHINGS_COVER, /* Add cover */ IPP_FINISHINGS_COVER, /* Add cover */
IPP_FINISHINGS_BIND, /* Bind */ IPP_FINISHINGS_BIND, /* Bind */
IPP_FINISHINGS_SADDLE_STITCH, /* Staple interior */ IPP_FINISHINGS_SADDLE_STITCH, /* Staple interior */
IPP_FINISHINGS_EDGE_STITCH, /* Stitch along any side */ IPP_FINISHINGS_EDGE_STITCH, /* Stitch along any side */
IPP_FINISHINGS_FOLD, /* Fold (any type) */ IPP_FINISHINGS_FOLD, /* Fold (any type) */
IPP_FINISHINGS_TRIM, /* Trim (any type) */ IPP_FINISHINGS_TRIM, /* Trim (any type) */
IPP_FINISHINGS_BALE, /* Bale (any type) */ IPP_FINISHINGS_BALE, /* Bale (any type) */
IPP_FINISHINGS_BOOKLET_MAKER, /* Fold to make booklet */ IPP_FINISHINGS_BOOKLET_MAKER, /* Fold to make booklet */
IPP_FINISHINGS_JOB_OFFSET, /* Offset for binding (any type) */ IPP_FINISHINGS_JOG_OFFSET, /* Offset for binding (any type) */
IPP_FINISHINGS_STAPLE_TOP_LEFT = 20, /* Staple top left corner */ IPP_FINISHINGS_STAPLE_TOP_LEFT = 20, /* Staple top left corner */
IPP_FINISHINGS_STAPLE_BOTTOM_LEFT, /* Staple bottom left corner */ IPP_FINISHINGS_STAPLE_BOTTOM_LEFT, /* Staple bottom left corner */
IPP_FINISHINGS_STAPLE_TOP_RIGHT, /* Staple top right corner */ IPP_FINISHINGS_STAPLE_TOP_RIGHT, /* Staple top right corner */
IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT, /* Staple bottom right corner */ IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT, /* Staple bottom right corner */
IPP_FINISHINGS_EDGE_STITCH_LEFT, /* Stitch along left side */ IPP_FINISHINGS_EDGE_STITCH_LEFT, /* Stitch along left side */
IPP_FINISHINGS_EDGE_STITCH_TOP, /* Stitch along top edge */ IPP_FINISHINGS_EDGE_STITCH_TOP, /* Stitch along top edge */
IPP_FINISHINGS_EDGE_STITCH_RIGHT, /* Stitch along right side */ IPP_FINISHINGS_EDGE_STITCH_RIGHT, /* Stitch along right side */
IPP_FINISHINGS_EDGE_STITCH_BOTTOM, /* Stitch along bottom edge */ IPP_FINISHINGS_EDGE_STITCH_BOTTOM, /* Stitch along bottom edge */
IPP_FINISHINGS_STAPLE_DUAL_LEFT, /* Two staples on left */ IPP_FINISHINGS_STAPLE_DUAL_LEFT, /* Two staples on left */
IPP_FINISHINGS_STAPLE_DUAL_TOP, /* Two staples on top */ IPP_FINISHINGS_STAPLE_DUAL_TOP, /* Two staples on top */
IPP_FINISHINGS_STAPLE_DUAL_RIGHT, /* Two staples on right */ IPP_FINISHINGS_STAPLE_DUAL_RIGHT, /* Two staples on right */
IPP_FINISHINGS_STAPLE_DUAL_BOTTOM, /* Two staples on bottom */ IPP_FINISHINGS_STAPLE_DUAL_BOTTOM, /* Two staples on bottom */
IPP_FINISHINGS_BIND_LEFT = 50, /* Bind on left */ IPP_FINISHINGS_BIND_LEFT = 50, /* Bind on left */
IPP_FINISHINGS_BIND_TOP, /* Bind on top */ IPP_FINISHINGS_BIND_TOP, /* Bind on top */
IPP_FINISHINGS_BIND_RIGHT, /* Bind on right */ IPP_FINISHINGS_BIND_RIGHT, /* Bind on right */
IPP_FINISHINGS_BIND_BOTTOM, /* Bind on bottom */ IPP_FINISHINGS_BIND_BOTTOM, /* Bind on bottom */
IPP_FINISHINGS_TRIM_AFTER_PAGES = 60, /* Trim output after each pa ge */ IPP_FINISHINGS_TRIM_AFTER_PAGES = 60, /* Trim output after each pa ge */
IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS, /* Trim output after each document * / IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS, /* Trim output after each document * /
IPP_FINISHINGS_TRIM_AFTER_COPIES, /* Trim output after each copy */ IPP_FINISHINGS_TRIM_AFTER_COPIES, /* Trim output after each copy */
IPP_FINISHINGS_TRIM_AFTER_JOB /* Trim output after job */ IPP_FINISHINGS_TRIM_AFTER_JOB, /* Trim output after job */
} ipp_finish_t;
/* Proposed extensions for finishings */
IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT = 0x40000046,
/* Punch 1 hole top left */
IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT,/* Punch 1 hole bottom left */
IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT, /* Punch 1 hole top right */
IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT,
/* Punch 1 hole bottom right */
IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT, /* Punch 2 holes left side */
IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP, /* Punch 2 holes top edge */
IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT, /* Punch 2 holes right side
*/
IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM,/* Punch 2 holes bottom edge */
IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT,/* Punch 3 holes left side */
IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP, /* Punch 3 holes top edge */
IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT,
/* Punch 3 holes right side */
IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM,
/* Punch 3 holes bottom edge */
IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT, /* Punch 4 holes left side */
IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP, /* Punch 4 holes top edge */
IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT, /* Punch 4 holes right side
*/
IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM,/* Punch 4 holes bottom edge */
IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN = 0x4000005A,
/* Accordian-fold the paper vertical
ly into four sections */
IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE, /* Fold the top and bottom q
uarters of the paper towards the midline, then fold in half vertically */
IPP_FINISHINGS_CUPS_FOLD_GATE, /* Fold the top and bottom quarters
of the paper towards the midline */
IPP_FINISHINGS_CUPS_FOLD_HALF, /* Fold the paper in half vertically
*/
IPP_FINISHINGS_CUPS_FOLD_HALF_Z, /* Fold the paper in half horizontal
ly, then Z-fold the paper vertically */
IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE, /* Fold the top quarter of the paper
towards the midline */
IPP_FINISHINGS_CUPS_FOLD_LETTER, /* Fold the paper into three section
s vertically; sometimes also known as a C fold*/
IPP_FINISHINGS_CUPS_FOLD_PARALLEL, /* Fold the paper in half vertically
two times, yielding four sections */
IPP_FINISHINGS_CUPS_FOLD_POSTER, /* Fold the paper in half horizontal
ly and vertically; sometimes also called a cross fold */
IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE, /* Fold the bottom quarter of the pa
per towards the midline */
IPP_FINISHINGS_CUPS_FOLD_Z /* Fold the paper vertically into th
ree sections, forming a Z */
} ipp_finishings_t;
# ifndef _CUPS_NO_DEPRECATED
# define IPP_FINISHINGS_JOB_OFFSET IPP_FINISHINGS_JOG_OFFSET
/* Long-time misspelling... */
typedef enum ipp_finishings_e ipp_finish_t;
# endif /* !_CUPS_NO_DEPRECATED */
typedef enum ipp_jcollate_e /**** Job collation types ****/ typedef enum ipp_jcollate_e /**** Job collation types ****/
{ {
IPP_JOB_UNCOLLATED_SHEETS = 3, IPP_JCOLLATE_UNCOLLATED_SHEETS = 3,
IPP_JOB_COLLATED_DOCUMENTS, IPP_JCOLLATE_COLLATED_DOCUMENTS,
IPP_JOB_UNCOLLATED_DOCUMENTS IPP_JCOLLATE_UNCOLLATED_DOCUMENTS
# ifndef _CUPS_NO_DEPRECATED
# define IPP_JOB_UNCOLLATED_SHEETS IPP_JCOLLATE_UNCOLLATED_SHEE
TS
# define IPP_JOB_COLLATED_DOCUMENTS IPP_JCOLLATE_COLLATED_DOCUME
NTS
# define IPP_JOB_UNCOLLATED_DOCUMENTS IPP_JCOLLATE_UNCOLLATED_DOCU
MENTS
# endif /* !_CUPS_NO_DEPRECATED */
} ipp_jcollate_t; } ipp_jcollate_t;
typedef enum ipp_jstate_e /**** Job states ****/ typedef enum ipp_jstate_e /**** Job states ****/
{ {
IPP_JOB_PENDING = 3, /* Job is waiting to be printed */ IPP_JSTATE_PENDING = 3, /* Job is waiting to be printed */
IPP_JOB_HELD, /* Job is held for printing IPP_JSTATE_HELD, /* Job is held for printing */
*/ IPP_JSTATE_PROCESSING, /* Job is currently printing */
IPP_JOB_PROCESSING, /* Job is currently printing */ IPP_JSTATE_STOPPED, /* Job has been stopped */
IPP_JOB_STOPPED, /* Job has been stopped */ IPP_JSTATE_CANCELED, /* Job has been canceled */
IPP_JOB_CANCELED, /* Job has been canceled */ IPP_JSTATE_ABORTED, /* Job has aborted due to error */
IPP_JOB_ABORTED, /* Job has aborted due to error */ IPP_JSTATE_COMPLETED /* Job has completed successfully */
IPP_JOB_COMPLETED /* Job has completed successfully */
# ifndef _CUPS_NO_DEPRECATED
# define IPP_JOB_PENDING IPP_JSTATE_PENDING
# define IPP_JOB_HELD IPP_JSTATE_HELD
# define IPP_JOB_PROCESSING IPP_JSTATE_PROCESSING
# define IPP_JOB_STOPPED IPP_JSTATE_STOPPED
# define IPP_JOB_CANCELED IPP_JSTATE_CANCELED
# define IPP_JOB_ABORTED IPP_JSTATE_ABORTED
# define IPP_JOB_COMPLETED IPP_JSTATE_COMPLETED
/* Legacy name for canceled state */ /* Legacy name for canceled state */
#define IPP_JOB_CANCELLED IPP_JOB_CANCELED # define IPP_JOB_CANCELLED IPP_JSTATE_CANCELED
# endif /* !_CUPS_NO_DEPRECATED */
} ipp_jstate_t; } ipp_jstate_t;
typedef enum ipp_op_e /**** IPP operations ****/ typedef enum ipp_op_e /**** IPP operations ****/
{ {
IPP_OP_CUPS_INVALID = -1, /* Invalid operation name for @link ippOpValue@ */ IPP_OP_CUPS_INVALID = -1, /* Invalid operation name for @link ippOpValue@ */
IPP_PRINT_JOB = 0x0002, /* Print a single file */ IPP_OP_CUPS_NONE = 0, /* No operation @private@ */
IPP_PRINT_URI, /* Print a single URL @private@ */ IPP_OP_PRINT_JOB = 0x0002, /* Print a single file */
IPP_VALIDATE_JOB, /* Validate job options */ IPP_OP_PRINT_URI, /* Print a single URL @private@ */
IPP_CREATE_JOB, /* Create an empty print job */ IPP_OP_VALIDATE_JOB, /* Validate job options */
IPP_SEND_DOCUMENT, /* Add a file to a job */ IPP_OP_CREATE_JOB, /* Create an empty print job */
IPP_SEND_URI, /* Add a URL to a job @priva IPP_OP_SEND_DOCUMENT, /* Add a file to a job */
te@ */ IPP_OP_SEND_URI, /* Add a URL to a job @private@ */
IPP_CANCEL_JOB, /* Cancel a job */ IPP_OP_CANCEL_JOB, /* Cancel a job */
IPP_GET_JOB_ATTRIBUTES, /* Get job attributes */ IPP_OP_GET_JOB_ATTRIBUTES, /* Get job attributes */
IPP_GET_JOBS, /* Get a list of jobs */ IPP_OP_GET_JOBS, /* Get a list of jobs */
IPP_GET_PRINTER_ATTRIBUTES, /* Get printer attributes */ IPP_OP_GET_PRINTER_ATTRIBUTES, /* Get printer attributes */
IPP_HOLD_JOB, /* Hold a job for printing * IPP_OP_HOLD_JOB, /* Hold a job for printing */
/ IPP_OP_RELEASE_JOB, /* Release a job for printing */
IPP_RELEASE_JOB, /* Release a job for printing */ IPP_OP_RESTART_JOB, /* Reprint a job */
IPP_RESTART_JOB, /* Reprint a job */ IPP_OP_PAUSE_PRINTER = 0x0010, /* Stop a printer */
IPP_PAUSE_PRINTER = 0x0010, /* Stop a printer */ IPP_OP_RESUME_PRINTER, /* Start a printer */
IPP_RESUME_PRINTER, /* Start a printer */ IPP_OP_PURGE_JOBS, /* Cancel all jobs */
IPP_PURGE_JOBS, /* Cancel all jobs */ IPP_OP_SET_PRINTER_ATTRIBUTES, /* Set printer attributes @private@
IPP_SET_PRINTER_ATTRIBUTES, /* Set printer attributes @private@ */
*/ IPP_OP_SET_JOB_ATTRIBUTES, /* Set job attributes */
IPP_SET_JOB_ATTRIBUTES, /* Set job attributes */ IPP_OP_GET_PRINTER_SUPPORTED_VALUES, /* Get supported attribute values */
IPP_GET_PRINTER_SUPPORTED_VALUES, /* Get supported attribute values */ IPP_OP_CREATE_PRINTER_SUBSCRIPTION, /* Create a printer subscription @si
IPP_CREATE_PRINTER_SUBSCRIPTION, /* Create a printer subscription @si nce CUPS 1.2/OS X 10.5@ */
nce CUPS 1.2/OS X 10.5@ */ IPP_OP_CREATE_JOB_SUBSCRIPTION, /* Create a job subscription @since
IPP_CREATE_JOB_SUBSCRIPTION, /* Create a job subscription @since CUPS 1.2/OS X 10.5@ */
CUPS 1.2/OS X 10.5@ */ IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES, /* Get subscription attributes @sinc
IPP_GET_SUBSCRIPTION_ATTRIBUTES, /* Get subscription attributes @sinc e CUPS 1.2/OS X 10.5@ */
e CUPS 1.2/OS X 10.5@ */ IPP_OP_GET_SUBSCRIPTIONS, /* Get list of subscriptions @since
IPP_GET_SUBSCRIPTIONS, /* Get list of subscriptions @since CUPS 1.2/OS X 10.5@ */
CUPS 1.2/OS X 10.5@ */ IPP_OP_RENEW_SUBSCRIPTION, /* Renew a printer subscription @sin
IPP_RENEW_SUBSCRIPTION, /* Renew a printer subscription @sin ce CUPS 1.2/OS X 10.5@ */
ce CUPS 1.2/OS X 10.5@ */ IPP_OP_CANCEL_SUBSCRIPTION, /* Cancel a subscription @since CUPS
IPP_CANCEL_SUBSCRIPTION, /* Cancel a subscription @since CUPS 1.2/OS X 10.5@ */
1.2/OS X 10.5@ */ IPP_OP_GET_NOTIFICATIONS, /* Get notification events @since CU
IPP_GET_NOTIFICATIONS, /* Get notification events @since CU PS 1.2/OS X 10.5@ */
PS 1.2/OS X 10.5@ */ IPP_OP_SEND_NOTIFICATIONS, /* Send notification events @private
IPP_SEND_NOTIFICATIONS, /* Send notification events @private @ */
@ */ IPP_OP_GET_RESOURCE_ATTRIBUTES, /* Get resource attributes @private@
IPP_GET_RESOURCE_ATTRIBUTES, /* Get resource attributes @private@ */
*/ IPP_OP_GET_RESOURCE_DATA, /* Get resource data @private@ */
IPP_GET_RESOURCE_DATA, /* Get resource data @private@ */ IPP_OP_GET_RESOURCES, /* Get list of resources @pr
IPP_GET_RESOURCES, /* Get list of resources @private@ * ivate@ */
/ IPP_OP_GET_PRINT_SUPPORT_FILES, /* Get printer support files @privat
IPP_GET_PRINT_SUPPORT_FILES, /* Get printer support files @privat e@ */
e@ */ IPP_OP_ENABLE_PRINTER, /* Start a printer */
IPP_ENABLE_PRINTER, /* Start a printer */ IPP_OP_DISABLE_PRINTER, /* Stop a printer */
IPP_DISABLE_PRINTER, /* Stop a printer */ IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB,
IPP_PAUSE_PRINTER_AFTER_CURRENT_JOB, /* Stop printer after the current jo /* Stop printer after the current jo
b @private@ */ b @private@ */
IPP_HOLD_NEW_JOBS, /* Hold new jobs @private@ */ IPP_OP_HOLD_NEW_JOBS, /* Hold new jobs @private@ *
IPP_RELEASE_HELD_NEW_JOBS, /* Release new jobs @private@ */ /
IPP_DEACTIVATE_PRINTER, /* Stop a printer @private@ */ IPP_OP_RELEASE_HELD_NEW_JOBS, /* Release new jobs @private
IPP_ACTIVATE_PRINTER, /* Start a printer @private@ @ */
*/ IPP_OP_DEACTIVATE_PRINTER, /* Stop a printer @private@ */
IPP_RESTART_PRINTER, /* Restart a printer @private@ */ IPP_OP_ACTIVATE_PRINTER, /* Start a printer @private@ */
IPP_SHUTDOWN_PRINTER, /* Turn a printer off @priva IPP_OP_RESTART_PRINTER, /* Restart a printer @private@ */
te@ */ IPP_OP_SHUTDOWN_PRINTER, /* Turn a printer off @private@ */
IPP_STARTUP_PRINTER, /* Turn a printer on @private@ */ IPP_OP_STARTUP_PRINTER, /* Turn a printer on @private@ */
IPP_REPROCESS_JOB, /* Reprint a job @private@ */ IPP_OP_REPROCESS_JOB, /* Reprint a job @private@ *
IPP_CANCEL_CURRENT_JOB, /* Cancel the current job @private@ /
*/ IPP_OP_CANCEL_CURRENT_JOB, /* Cancel the current job @private@
IPP_SUSPEND_CURRENT_JOB, /* Suspend the current job @private@ */
*/ IPP_OP_SUSPEND_CURRENT_JOB, /* Suspend the current job @private@
IPP_RESUME_JOB, /* Resume the current job @private@ */
*/ IPP_OP_RESUME_JOB, /* Resume the current job @private@
IPP_PROMOTE_JOB, /* Promote a job to print sooner @pr */
ivate@ */ IPP_OP_PROMOTE_JOB, /* Promote a job to print sooner @pr
IPP_SCHEDULE_JOB_AFTER, /* Schedule a job to print after ano ivate@ */
ther @private@ */ IPP_OP_SCHEDULE_JOB_AFTER, /* Schedule a job to print after ano
IPP_CANCEL_DOCUMENT = 0x0033, /* Cancel-Document @private@ ther @private@ */
*/ IPP_OP_CANCEL_DOCUMENT = 0x0033, /* Cancel-Document @private@ */
IPP_GET_DOCUMENT_ATTRIBUTES, /* Get-Document-Attributes @private@ IPP_OP_GET_DOCUMENT_ATTRIBUTES, /* Get-Document-Attributes @private@
*/ */
IPP_GET_DOCUMENTS, /* Get-Documents @private@ */ IPP_OP_GET_DOCUMENTS, /* Get-Documents @private@ *
IPP_DELETE_DOCUMENT, /* Delete-Document @private@ */ /
IPP_SET_DOCUMENT_ATTRIBUTES, /* Set-Document-Attributes @private@ IPP_OP_DELETE_DOCUMENT, /* Delete-Document @private@ */
*/ IPP_OP_SET_DOCUMENT_ATTRIBUTES, /* Set-Document-Attributes @private@
IPP_CANCEL_JOBS, /* Cancel-Jobs */ */
IPP_CANCEL_MY_JOBS, /* Cancel-My-Jobs */ IPP_OP_CANCEL_JOBS, /* Cancel-Jobs */
IPP_RESUBMIT_JOB, /* Resubmit-Job */ IPP_OP_CANCEL_MY_JOBS, /* Cancel-My-Jobs */
IPP_CLOSE_JOB, /* Close-Job */ IPP_OP_RESUBMIT_JOB, /* Resubmit-Job */
IPP_IDENTIFY_PRINTER, /* Identify-Printer (propose IPP_OP_CLOSE_JOB, /* Close-Job */
d IPP JPS3) */ IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer (proposed IPP JP
IPP_VALIDATE_DOCUMENT, /* Validate-Document (proposed IPP J S3) */
PS3) */ IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document (proposed IPP J
IPP_PRIVATE = 0x4000, /* Reserved @private@ */ PS3) */
CUPS_GET_DEFAULT, /* Get the default printer */ IPP_OP_PRIVATE = 0x4000, /* Reserved @private@ */
CUPS_GET_PRINTERS, /* Get a list of printers and/or cla IPP_OP_CUPS_GET_DEFAULT, /* Get the default printer */
sses */ IPP_OP_CUPS_GET_PRINTERS, /* Get a list of printers and/or cla
CUPS_ADD_MODIFY_PRINTER, /* Add or modify a printer */ sses */
CUPS_DELETE_PRINTER, /* Delete a printer */ IPP_OP_CUPS_ADD_MODIFY_PRINTER, /* Add or modify a printer */
CUPS_GET_CLASSES, /* Get a list of classes @deprecated IPP_OP_CUPS_DELETE_PRINTER, /* Delete a printer */
@ */ IPP_OP_CUPS_GET_CLASSES, /* Get a list of classes @deprecated
CUPS_ADD_MODIFY_CLASS, /* Add or modify a class */ @ */
CUPS_DELETE_CLASS, /* Delete a class */ IPP_OP_CUPS_ADD_MODIFY_CLASS, /* Add or modify a class */
CUPS_ACCEPT_JOBS, /* Accept new jobs on a printer */ IPP_OP_CUPS_DELETE_CLASS, /* Delete a class */
CUPS_REJECT_JOBS, /* Reject new jobs on a printer */ IPP_OP_CUPS_ACCEPT_JOBS, /* Accept new jobs on a printer */
CUPS_SET_DEFAULT, /* Set the default printer */ IPP_OP_CUPS_REJECT_JOBS, /* Reject new jobs on a printer */
CUPS_GET_DEVICES, /* Get a list of supported devices * IPP_OP_CUPS_SET_DEFAULT, /* Set the default printer */
/ IPP_OP_CUPS_GET_DEVICES, /* Get a list of supported devices *
CUPS_GET_PPDS, /* Get a list of supported drivers * /
/ IPP_OP_CUPS_GET_PPDS, /* Get a list of supported d
CUPS_MOVE_JOB, /* Move a job to a different printer rivers */
*/ IPP_OP_CUPS_MOVE_JOB, /* Move a job to a different
CUPS_AUTHENTICATE_JOB, /* Authenticate a job @since CUPS 1. printer */
2/OS X 10.5@ */ IPP_OP_CUPS_AUTHENTICATE_JOB, /* Authenticate a job @since
CUPS_GET_PPD, /* Get a PPD file @since CUP CUPS 1.2/OS X 10.5@ */
S 1.3/OS X 10.5@ */ IPP_OP_CUPS_GET_PPD, /* Get a PPD file @since CUPS 1.3/OS
CUPS_GET_DOCUMENT = 0x4027 /* Get a document file @since CUPS 1 X 10.5@ */
.4/OS X 10.6@ */ IPP_OP_CUPS_GET_DOCUMENT = 0x4027 /* Get a document file @since CUPS 1
.4/OS X 10.6@ */
/* Legacy names for the add operations */
#define CUPS_ADD_PRINTER CUPS_ADD_MODIFY_PRINTER # ifndef _CUPS_NO_DEPRECATED
#define CUPS_ADD_CLASS CUPS_ADD_MODIFY_CLASS # define IPP_PRINT_JOB IPP_OP_PRINT_JOB
# define IPP_PRINT_URI IPP_OP_PRINT_URI
# define IPP_VALIDATE_JOB IPP_OP_VALIDATE_JOB
# define IPP_CREATE_JOB IPP_OP_CREATE_JOB
# define IPP_SEND_DOCUMENT IPP_OP_SEND_DOCUMENT
# define IPP_SEND_URI IPP_OP_SEND_URI
# define IPP_CANCEL_JOB IPP_OP_CANCEL_JOB
# define IPP_GET_JOB_ATTRIBUTES IPP_OP_GET_JOB_ATTRIBUTES
# define IPP_GET_JOBS IPP_OP_GET_JOBS
# define IPP_GET_PRINTER_ATTRIBUTES IPP_OP_GET_PRINTER_ATTRIBUTE
S
# define IPP_HOLD_JOB IPP_OP_HOLD_JOB
# define IPP_RELEASE_JOB IPP_OP_RELEASE_JOB
# define IPP_RESTART_JOB IPP_OP_RESTART_JOB
# define IPP_PAUSE_PRINTER IPP_OP_PAUSE_PRINTER
# define IPP_RESUME_PRINTER IPP_OP_RESUME_PRINTER
# define IPP_PURGE_JOBS IPP_OP_PURGE_JOBS
# define IPP_SET_PRINTER_ATTRIBUTES IPP_OP_SET_PRINTER_ATTRIBUTE
S
# define IPP_SET_JOB_ATTRIBUTES IPP_OP_SET_JOB_ATTRIBUTES
# define IPP_GET_PRINTER_SUPPORTED_VALUES IPP_OP_GET_PRINTER_SUPPORTED
_VALUES
# define IPP_CREATE_PRINTER_SUBSCRIPTION IPP_OP_CREATE_PRINTER_SUBSCR
IPTION
# define IPP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SU
BSCRIPTION
# define IPP_GET_SUBSCRIPTION_ATTRIBUTES IPP_OP_GET_SUBSCRIPTION_ATTR
IBUTES
# define IPP_GET_SUBSCRIPTIONS IPP_OP_GET_SUBSCRIPTIONS
# define IPP_RENEW_SUBSCRIPTION IPP_OP_RENEW_SUBSCRIPTION
# define IPP_CANCEL_SUBSCRIPTION IPP_OP_CANCEL_SUBSCRIPTION
# define IPP_GET_NOTIFICATIONS IPP_OP_GET_NOTIFICATIONS
# define IPP_SEND_NOTIFICATIONS IPP_OP_SEND_NOTIFICATIONS
# define IPP_GET_RESOURCE_ATTRIBUTES IPP_OP_GET_RESOURCE_
ATTRIBUTES
# define IPP_GET_RESOURCE_DATA IPP_OP_GET_RESOURCE_DATA
# define IPP_GET_RESOURCES IPP_OP_GET_RESOURCES
# define IPP_GET_PRINT_SUPPORT_FILES IPP_OP_GET_PRINT_SUP
PORT_FILES
# define IPP_ENABLE_PRINTER IPP_OP_ENABLE_PRINTER
# define IPP_DISABLE_PRINTER IPP_OP_DISABLE_PRINT
ER
# define IPP_PAUSE_PRINTER_AFTER_CURRENT_JOB IPP_OP_PAUSE_PRINTER
_AFTER_CURRENT_JOB
# define IPP_HOLD_NEW_JOBS IPP_OP_HOLD_NEW_JOBS
# define IPP_RELEASE_HELD_NEW_JOBS IPP_OP_RELEASE_HELD_NEW_JOBS
# define IPP_DEACTIVATE_PRINTER IPP_OP_DEACTIVATE_PRINTER
# define IPP_ACTIVATE_PRINTER IPP_OP_ACTIVATE_PRINTER
# define IPP_RESTART_PRINTER IPP_OP_RESTART_PRINT
ER
# define IPP_SHUTDOWN_PRINTER IPP_OP_SHUTDOWN_PRINTER
# define IPP_STARTUP_PRINTER IPP_OP_STARTUP_PRINT
ER
# define IPP_REPROCESS_JOB IPP_OP_REPROCESS_JOB
# define IPP_CANCEL_CURRENT_JOB IPP_OP_CANCEL_CURRENT_JOB
# define IPP_SUSPEND_CURRENT_JOB IPP_OP_SUSPEND_CURRENT_JOB
# define IPP_RESUME_JOB IPP_OP_RESUME_JOB
# define IPP_PROMOTE_JOB IPP_OP_PROMOTE_JOB
# define IPP_SCHEDULE_JOB_AFTER IPP_OP_SCHEDULE_JOB_AFTER
# define IPP_CANCEL_DOCUMENT IPP_OP_CANCEL_DOCUME
NT
# define IPP_GET_DOCUMENT_ATTRIBUTES IPP_OP_GET_DOCUMENT_
ATTRIBUTES
# define IPP_GET_DOCUMENTS IPP_OP_GET_DOCUMENTS
# define IPP_DELETE_DOCUMENT IPP_OP_DELETE_DOCUME
NT
# define IPP_SET_DOCUMENT_ATTRIBUTES IPP_OP_SET_DOCUMENT_
ATTRIBUTES
# define IPP_CANCEL_JOBS IPP_OP_CANCEL_JOBS
# define IPP_CANCEL_MY_JOBS IPP_OP_CANCEL_MY_JOBS
# define IPP_RESUBMIT_JOB IPP_OP_RESUBMIT_JOB
# define IPP_CLOSE_JOB IPP_OP_CLOSE_JOB
# define IPP_IDENTIFY_PRINTER IPP_OP_IDENTIFY_PRINTER
# define IPP_VALIDATE_DOCUMENT IPP_OP_VALIDATE_DOCUMENT
# define IPP_PRIVATE IPP_OP_PRIVATE
# define CUPS_GET_DEFAULT IPP_OP_CUPS_GET_DEFAULT
# define CUPS_GET_PRINTERS IPP_OP_CUPS_GET_PRINTERS
# define CUPS_ADD_MODIFY_PRINTER IPP_OP_CUPS_ADD_MODIFY_PRINT
ER
# define CUPS_DELETE_PRINTER IPP_OP_CUPS_DELETE_P
RINTER
# define CUPS_GET_CLASSES IPP_OP_CUPS_GET_CLASSES
# define CUPS_ADD_MODIFY_CLASS IPP_OP_CUPS_ADD_MODIFY_CLASS
# define CUPS_DELETE_CLASS IPP_OP_CUPS_DELETE_CLASS
# define CUPS_ACCEPT_JOBS IPP_OP_CUPS_ACCEPT_JOBS
# define CUPS_REJECT_JOBS IPP_OP_CUPS_REJECT_JOBS
# define CUPS_SET_DEFAULT IPP_OP_CUPS_SET_DEFAULT
# define CUPS_GET_DEVICES IPP_OP_CUPS_GET_DEVICES
# define CUPS_GET_PPDS IPP_OP_CUPS_GET_PPDS
# define CUPS_MOVE_JOB IPP_OP_CUPS_MOVE_JOB
# define CUPS_AUTHENTICATE_JOB IPP_OP_CUPS_AUTHENTICATE_JOB
# define CUPS_GET_PPD IPP_OP_CUPS_GET_PPD
# define CUPS_GET_DOCUMENT IPP_OP_CUPS_GET_DOCUMENT
/* Legacy names */
# define CUPS_ADD_PRINTER IPP_OP_CUPS_ADD_MODIFY_PRINT
ER
# define CUPS_ADD_CLASS IPP_OP_CUPS_ADD_MODIFY_CLASS
# endif /* !_CUPS_NO_DEPRECATED */
} ipp_op_t; } ipp_op_t;
typedef enum ipp_orient_e /**** Orientation values ****/ typedef enum ipp_orient_e /**** Orientation values ****/
{ {
IPP_PORTRAIT = 3, /* No rotation */ IPP_ORIENT_PORTRAIT = 3, /* No rotation */
IPP_LANDSCAPE, /* 90 degrees counter-clockwise */ IPP_ORIENT_LANDSCAPE, /* 90 degrees counter-clockw
IPP_REVERSE_LANDSCAPE, /* 90 degrees clockwise */ ise */
IPP_REVERSE_PORTRAIT /* 180 degrees */ IPP_ORIENT_REVERSE_LANDSCAPE, /* 90 degrees clockwise */
IPP_ORIENT_REVERSE_PORTRAIT /* 180 degrees */
# ifndef _CUPS_NO_DEPRECATED
# define IPP_PORTRAIT IPP_ORIENT_PORTRAIT
# define IPP_LANDSCAPE IPP_ORIENT_LANDSCAPE
# define IPP_REVERSE_LANDSCAPE IPP_ORIENT_REVERSE_LANDSCAPE
# define IPP_REVERSE_PORTRAIT IPP_ORIENT_REVERSE_PORTRAIT
# endif /* !_CUPS_NO_DEPRECATED */
} ipp_orient_t; } ipp_orient_t;
typedef enum ipp_pstate_e /**** Printer states ****/ typedef enum ipp_pstate_e /**** Printer states ****/
{ {
IPP_PRINTER_IDLE = 3, /* Printer is idle */ IPP_PSTATE_IDLE = 3, /* Printer is idle */
IPP_PRINTER_PROCESSING, /* Printer is working */ IPP_PSTATE_PROCESSING, /* Printer is working */
IPP_PRINTER_STOPPED /* Printer is stopped */ IPP_PSTATE_STOPPED /* Printer is stopped */
# ifndef _CUPS_NO_DEPRECATED
# define IPP_PRINTER_IDLE IPP_PSTATE_IDLE
# define IPP_PRINTER_PROCESSING IPP_PSTATE_PROCESSING
# define IPP_PRINTER_STOPPED IPP_PSTATE_STOPPED
# endif /* _CUPS_NO_DEPRECATED */
} ipp_pstate_t; } ipp_pstate_t;
typedef enum ipp_quality_e /**** Qualities ****/ typedef enum ipp_quality_e /**** Qualities ****/
{ {
IPP_QUALITY_DRAFT = 3, /* Draft quality */ IPP_QUALITY_DRAFT = 3, /* Draft quality */
IPP_QUALITY_NORMAL, /* Normal quality */ IPP_QUALITY_NORMAL, /* Normal quality */
IPP_QUALITY_HIGH /* High quality */ IPP_QUALITY_HIGH /* High quality */
} ipp_quality_t; } ipp_quality_t;
typedef enum ipp_res_e /**** Resolution units ****/ typedef enum ipp_res_e /**** Resolution units ****/
{ {
IPP_RES_PER_INCH = 3, /* Pixels per inch */ IPP_RES_PER_INCH = 3, /* Pixels per inch */
IPP_RES_PER_CM /* Pixels per centimeter */ IPP_RES_PER_CM /* Pixels per centimeter */
} ipp_res_t; } ipp_res_t;
typedef enum ipp_state_e /**** IPP states ****/ typedef enum ipp_state_e /**** IPP states ****/
{ {
IPP_ERROR = -1, /* An error occurred */ IPP_STATE_ERROR = -1, /* An error occurred */
IPP_IDLE, /* Nothing is happening/request comp IPP_STATE_IDLE, /* Nothing is happening/request comp
leted */ leted */
IPP_HEADER, /* The request header needs to be se IPP_STATE_HEADER, /* The request header needs to be se
nt/received */ nt/received */
IPP_ATTRIBUTE, /* One or more attributes need to be IPP_STATE_ATTRIBUTE, /* One or more attributes need to be
sent/received */ sent/received */
IPP_DATA /* IPP request data needs to be sent IPP_STATE_DATA /* IPP request data needs to be sent
/received */ /received */
# ifndef _CUPS_NO_DEPRECATED
# define IPP_ERROR IPP_STATE_ERROR
# define IPP_IDLE IPP_STATE_IDLE
# define IPP_HEADER IPP_STATE_HEADER
# define IPP_ATTRIBUTE IPP_STATE_ATTRIBUTE
# define IPP_DATA IPP_STATE_DATA
# endif /* !_CUPS_NO_DEPRECATED */
} ipp_state_t; } ipp_state_t;
typedef enum ipp_status_e /**** IPP status codes ****/ typedef enum ipp_status_e /**** IPP status codes ****/
{ {
IPP_STATUS_CUPS_INVALID = -1, /* Invalid status name for @ link ippErrorValue@ */ IPP_STATUS_CUPS_INVALID = -1, /* Invalid status name for @ link ippErrorValue@ */
IPP_OK = 0x0000, /* successful-ok */ IPP_STATUS_OK = 0x0000, /* successful-ok */
IPP_OK_SUBST, /* successful-ok-ignored-or- IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED, /* successful-ok-ignored-or-
substituted-attributes */ substituted-attributes */
IPP_OK_CONFLICT, /* successful-ok-conflicting-attribu IPP_STATUS_OK_CONFLICTING, /* successful-ok-conflicting-attribu
tes */ tes */
IPP_OK_IGNORED_SUBSCRIPTIONS, /* successful-ok-ignored-sub IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS, /* successful-ok-ignored-subscriptio
scriptions */ ns */
IPP_OK_IGNORED_NOTIFICATIONS, /* successful-ok-ignored-not IPP_STATUS_OK_IGNORED_NOTIFICATIONS, /* successful-ok-ignored-notificatio
ifications @private@ */ ns @private@ */
IPP_OK_TOO_MANY_EVENTS, /* successful-ok-too-many-events */ IPP_STATUS_OK_TOO_MANY_EVENTS, /* successful-ok-too-many-events */
IPP_OK_BUT_CANCEL_SUBSCRIPTION, /* successful-ok-but-cancel-subscrip IPP_STATUS_OK_BUT_CANCEL_SUBSCRIPTION,/* successful-ok-but-cancel-subscri
tion @private@ */ ption @private@ */
IPP_OK_EVENTS_COMPLETE, /* successful-ok-events-complete */ IPP_STATUS_OK_EVENTS_COMPLETE, /* successful-ok-events-complete */
IPP_REDIRECTION_OTHER_SITE = 0x200, /* redirection-other-site @private@ IPP_STATUS_REDIRECTION_OTHER_SITE = 0x0200,
*/ /* redirection-other-site @private@
CUPS_SEE_OTHER = 0x280, /* cups-see-other */ */
IPP_BAD_REQUEST = 0x0400, /* client-error-bad-request */ IPP_STATUS_CUPS_SEE_OTHER = 0x0280, /* cups-see-other */
IPP_FORBIDDEN, /* client-error-forbidden */ IPP_STATUS_ERROR_BAD_REQUEST = 0x0400,/* client-error-bad-request */
IPP_NOT_AUTHENTICATED, /* client-error-not-authenticated */ IPP_STATUS_ERROR_FORBIDDEN, /* client-error-forbidden */
IPP_NOT_AUTHORIZED, /* client-error-not-authorized */ IPP_STATUS_ERROR_NOT_AUTHENTICATED, /* client-error-not-authenticated */
IPP_NOT_POSSIBLE, /* client-error-not-possible */ IPP_STATUS_ERROR_NOT_AUTHORIZED, /* client-error-not-authorized */
IPP_TIMEOUT, /* client-error-timeout */ IPP_STATUS_ERROR_NOT_POSSIBLE, /* client-error-not-possible */
IPP_NOT_FOUND, /* client-error-not-found */ IPP_STATUS_ERROR_TIMEOUT, /* client-error-timeout */
IPP_GONE, /* client-error-gone */ IPP_STATUS_ERROR_NOT_FOUND, /* client-error-not-found */
IPP_REQUEST_ENTITY, /* client-error-request-entity-too-l IPP_STATUS_ERROR_GONE, /* client-error-gone */
arge */ IPP_STATUS_ERROR_REQUEST_ENTITY, /* client-error-request-entity-too-l
IPP_REQUEST_VALUE, /* client-error-request-value-too-lo arge */
ng */ IPP_STATUS_ERROR_REQUEST_VALUE, /* client-error-request-value-too-lo
IPP_DOCUMENT_FORMAT, /* client-error-document-format-not- ng */
supported */ IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED,
IPP_ATTRIBUTES, /* client-error-attributes-or-values /* client-error-document-format-not-
-not-supported */ supported */
IPP_URI_SCHEME, /* client-error-uri-scheme-not-suppo IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES,/* client-error-attributes-or-value
rted */ s-not-supported */
IPP_CHARSET, /* client-error-charset-not-supporte IPP_STATUS_ERROR_URI_SCHEME, /* client-error-uri-scheme-not-suppo
d */ rted */
IPP_CONFLICT, /* client-error-conflicting- IPP_STATUS_ERROR_CHARSET, /* client-error-charset-not-supporte
attributes */ d */
IPP_COMPRESSION_NOT_SUPPORTED, /* client-error-compression-not-supp IPP_STATUS_ERROR_CONFLICTING, /* client-error-conflicting-
orted */ attributes */
IPP_COMPRESSION_ERROR, /* client-error-compression-error */ IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED,
IPP_DOCUMENT_FORMAT_ERROR, /* client-error-document-format-erro /* client-error-compression-not-supp
r */ orted */
IPP_DOCUMENT_ACCESS_ERROR, /* client-error-document-access-erro IPP_STATUS_ERROR_COMPRESSION_ERROR, /* client-error-compression-error */
r */ IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR,
IPP_ATTRIBUTES_NOT_SETTABLE, /* client-error-attributes-not-setta /* client-error-document-format-erro
ble */ r */
IPP_IGNORED_ALL_SUBSCRIPTIONS, /* client-error-ignored-all-subscrip IPP_STATUS_ERROR_DOCUMENT_ACCESS, /* client-error-document-access-erro
tions */ r */
IPP_TOO_MANY_SUBSCRIPTIONS, /* client-error-too-many-subscriptio IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE,
ns */ /* client-error-attributes-not-setta
IPP_IGNORED_ALL_NOTIFICATIONS, /* client-error-ignored-all-notifica ble */
tions @private@ */ IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS,
IPP_PRINT_SUPPORT_FILE_NOT_FOUND, /* client-error-print-support-file-n /* client-error-ignored-all-subscrip
ot-found @private@ */ tions */
IPP_DOCUMENT_PASSWORD_ERROR, /* client-error-document-password-er IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS,
ror */ /* client-error-too-many-subscriptio
IPP_DOCUMENT_PERMISSION_ERROR, /* client-error-document-permission- ns */
error */ IPP_STATUS_ERROR_IGNORED_ALL_NOTIFICATIONS,
IPP_DOCUMENT_SECURITY_ERROR, /* client-error-document-security-er /* client-error-ignored-all-notifica
ror */ tions @private@ */
IPP_DOCUMENT_UNPRINTABLE_ERROR, /* client-error-document-unprintable IPP_STATUS_ERROR_PRINT_SUPPORT_FILE_NOT_FOUND,
-error */ /* client-error-print-support-file-n
ot-found @private@ */
IPP_INTERNAL_ERROR = 0x0500, /* server-error-internal-error */ IPP_STATUS_ERROR_DOCUMENT_PASSWORD, /* client-error-document-password-er
IPP_OPERATION_NOT_SUPPORTED, /* server-error-operation-not-suppor ror */
ted */ IPP_STATUS_ERROR_DOCUMENT_PERMISSION, /* client-error-document-per
IPP_SERVICE_UNAVAILABLE, /* server-error-service-unavailable mission-error */
*/ IPP_STATUS_ERROR_DOCUMENT_SECURITY, /* client-error-document-security-er
IPP_VERSION_NOT_SUPPORTED, /* server-error-version-not-supporte ror */
d */ IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE,/* client-error-document-unprintabl
IPP_DEVICE_ERROR, /* server-error-device-error */ e-error */
IPP_TEMPORARY_ERROR, /* server-error-temporary-error */
IPP_NOT_ACCEPTING, /* server-error-not-accepting-jobs * /* Proposed extensions for paid printing */
/ IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED = 0x049C,
IPP_PRINTER_BUSY, /* server-error-busy */ /* cups-error-account-info-needed @s
IPP_ERROR_JOB_CANCELED, /* server-error-job-canceled */ ince CUPS 1.7@ */
IPP_MULTIPLE_JOBS_NOT_SUPPORTED, /* server-error-multiple-document-jo IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED, /* cups-error-account-closed
bs-not-supported */ @since CUPS 1.7@ */
IPP_PRINTER_IS_DEACTIVATED, /* server-error-printer-is-deactivat IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED,
ed */ /* cups-error-account-limit-reached
IPP_TOO_MANY_JOBS, /* server-error-too-many-jobs */ @since CUPS 1.7@ */
IPP_TOO_MANY_DOCUMENTS, /* server-error-too-many-documents * IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED,
/ /* cups-error-account-authorization-
failed @since CUPS 1.7@ */
IPP_AUTHENTICATION_CANCELED = 0x1000, /* Authentication canceled b
y user @since CUPS 1.5/OS X 10.7@ */ IPP_STATUS_ERROR_INTERNAL = 0x0500, /* server-error-internal-error */
IPP_PKI_ERROR, /* Error negotiating a secure connec IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED,
tion @since CUPS 1.5/OS X 10.7@ */ /* server-error-operation-not-suppor
IPP_UPGRADE_REQUIRED /* TLS upgrade required */ ted */
IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, /* server-error-service-unav
/* Legacy name for canceled status */ ailable */
#define IPP_ERROR_JOB_CANCELLED IPP_ERROR_JOB_CANCELED IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED,
/* server-error-version-not-supporte
d */
IPP_STATUS_ERROR_DEVICE, /* server-error-device-error */
IPP_STATUS_ERROR_TEMPORARY, /* server-error-temporary-error */
IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS, /* server-error-not-accepting-jobs *
/
IPP_STATUS_ERROR_BUSY, /* server-error-busy */
IPP_STATUS_ERROR_JOB_CANCELED, /* server-error-job-canceled */
IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED,
/* server-error-multiple-document-jo
bs-not-supported */
IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED,
/* server-error-printer-is-deactivat
ed */
IPP_STATUS_ERROR_TOO_MANY_JOBS, /* server-error-too-many-jobs */
IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS, /* server-error-too-many-documents *
/
/* These are internal and never sent over the wire... */
IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED = 0x1000,
/* cups-authentication-canceled - Au
thentication canceled by user @since CUPS 1.5/OS X 10.7@ */
IPP_STATUS_ERROR_CUPS_PKI, /* cups-pki-error - Error negotiatin
g a secure connection @since CUPS 1.5/OS X 10.7@ */
IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED/* cups-upgrade-required - TLS upgr
ade required */
# ifndef _CUPS_NO_DEPRECATED
# define IPP_OK IPP_STATUS_OK
# define IPP_OK_SUBST IPP_STATUS_OK_IGNORED_OR_SUB
STITUTED
# define IPP_OK_CONFLICT IPP_STATUS_OK_CONFLICTING
# define IPP_OK_IGNORED_SUBSCRIPTIONS IPP_STATUS_OK_IGNORED_SUBSCR
IPTIONS
# define IPP_OK_IGNORED_NOTIFICATIONS IPP_STATUS_OK_IGNORED_NOTIFI
CATIONS
# define IPP_OK_TOO_MANY_EVENTS IPP_STATUS_OK_TOO_MANY_EVENT
S
# define IPP_OK_BUT_CANCEL_SUBSCRIPTION IPP_STATUS_OK_BUT_CANCEL_SUB
SCRIPTION
# define IPP_OK_EVENTS_COMPLETE IPP_STATUS_OK_EVENTS_COMPLET
E
# define IPP_REDIRECTION_OTHER_SITE IPP_STATUS_REDIRECTION_OTHER
_SITE
# define CUPS_SEE_OTHER IPP_STATUS_CUPS_SEE_OTHER
# define IPP_BAD_REQUEST IPP_STATUS_ERROR_BAD_REQUEST
# define IPP_FORBIDDEN IPP_STATUS_ERROR_FORBIDDEN
# define IPP_NOT_AUTHENTICATED IPP_STATUS_ERROR_NOT_AUTHENT
ICATED
# define IPP_NOT_AUTHORIZED IPP_STATUS_ERROR_NOT_AUTHORI
ZED
# define IPP_NOT_POSSIBLE IPP_STATUS_ERROR_NOT_POSSIBL
E
# define IPP_TIMEOUT IPP_STATUS_ERROR_TIM
EOUT
# define IPP_NOT_FOUND IPP_STATUS_ERROR_NOT_FOUND
# define IPP_GONE IPP_STATUS_ERROR_GONE
# define IPP_REQUEST_ENTITY IPP_STATUS_ERROR_REQUEST_ENT
ITY
# define IPP_REQUEST_VALUE IPP_STATUS_ERROR_REQUEST_VAL
UE
# define IPP_DOCUMENT_FORMAT IPP_STATUS_ERROR_DOC
UMENT_FORMAT_NOT_SUPPORTED
# define IPP_ATTRIBUTES IPP_STATUS_ERROR_ATTRIBUTES_
OR_VALUES
# define IPP_URI_SCHEME IPP_STATUS_ERROR_URI_SCHEME
# define IPP_CHARSET IPP_STATUS_ERROR_CHA
RSET
# define IPP_CONFLICT IPP_STATUS_ERROR_CONFLICTING
# define IPP_COMPRESSION_NOT_SUPPORTED IPP_STATUS_ERROR_COMPRESSION
_NOT_SUPPORTED
# define IPP_COMPRESSION_ERROR IPP_STATUS_ERROR_COMPRESSION
_ERROR
# define IPP_DOCUMENT_FORMAT_ERROR IPP_STATUS_ERROR_DOCUMENT_FO
RMAT_ERROR
# define IPP_DOCUMENT_ACCESS_ERROR IPP_STATUS_ERROR_DOCUMENT_AC
CESS
# define IPP_ATTRIBUTES_NOT_SETTABLE IPP_STATUS_ERROR_ATT
RIBUTES_NOT_SETTABLE
# define IPP_IGNORED_ALL_SUBSCRIPTIONS IPP_STATUS_ERROR_IGNORED_ALL
_SUBSCRIPTIONS
# define IPP_TOO_MANY_SUBSCRIPTIONS IPP_STATUS_ERROR_TOO_MANY_SU
BSCRIPTIONS
# define IPP_IGNORED_ALL_NOTIFICATIONS IPP_STATUS_ERROR_IGNORED_ALL
_NOTIFICATIONS
# define IPP_PRINT_SUPPORT_FILE_NOT_FOUND IPP_STATUS_ERROR_PRINT_SUPPO
RT_FILE_NOT_FOUND
# define IPP_DOCUMENT_PASSWORD_ERROR IPP_STATUS_ERROR_DOC
UMENT_PASSWORD
# define IPP_DOCUMENT_PERMISSION_ERROR IPP_STATUS_ERROR_DOCUMENT_PE
RMISSION
# define IPP_DOCUMENT_SECURITY_ERROR IPP_STATUS_ERROR_DOC
UMENT_SECURITY
# define IPP_DOCUMENT_UNPRINTABLE_ERROR IPP_STATUS_ERROR_DOCUMENT_UN
PRINTABLE
# define IPP_INTERNAL_ERROR IPP_STATUS_ERROR_INTERNAL
# define IPP_OPERATION_NOT_SUPPORTED IPP_STATUS_ERROR_OPE
RATION_NOT_SUPPORTED
# define IPP_SERVICE_UNAVAILABLE IPP_STATUS_ERROR_SERVICE_UNA
VAILABLE
# define IPP_VERSION_NOT_SUPPORTED IPP_STATUS_ERROR_VERSION_NOT
_SUPPORTED
# define IPP_DEVICE_ERROR IPP_STATUS_ERROR_DEVICE
# define IPP_TEMPORARY_ERROR IPP_STATUS_ERROR_TEM
PORARY
# define IPP_NOT_ACCEPTING IPP_STATUS_ERROR_NOT_ACCEPTI
NG_JOBS
# define IPP_PRINTER_BUSY IPP_STATUS_ERROR_BUSY
# define IPP_ERROR_JOB_CANCELED IPP_STATUS_ERROR_JOB_CANCELE
D
# define IPP_MULTIPLE_JOBS_NOT_SUPPORTED IPP_STATUS_ERROR_MULTIPLE_JO
BS_NOT_SUPPORTED
# define IPP_PRINTER_IS_DEACTIVATED IPP_STATUS_ERROR_PRINTER_IS_
DEACTIVATED
# define IPP_TOO_MANY_JOBS IPP_STATUS_ERROR_TOO_MANY_JO
BS
# define IPP_TOO_MANY_DOCUMENTS IPP_STATUS_ERROR_TOO_MANY_DO
CUMENTS
# define IPP_AUTHENTICATION_CANCELED IPP_STATUS_ERROR_CUP
S_AUTHENTICATION_CANCELED
# define IPP_PKI_ERROR IPP_STATUS_ERROR_CUPS_PKI
# define IPP_UPGRADE_REQUIRED IPP_STATUS_ERROR_CUPS_UPGRAD
E_REQUIRED
/* Legacy name for canceled status */
# define IPP_ERROR_JOB_CANCELLED IPP_STATUS_ERROR_JOB_CANCELE
D
# endif /* _CUPS_NO_DEPRECATED */
} ipp_status_t; } ipp_status_t;
typedef enum ipp_tag_e /**** Format tags for attributes *** */ typedef enum ipp_tag_e /**** Format tags for attributes *** */
{ {
IPP_TAG_CUPS_INVALID = -1, /* Invalid tag name for @link ippTag Value@ */ IPP_TAG_CUPS_INVALID = -1, /* Invalid tag name for @link ippTag Value@ */
IPP_TAG_ZERO = 0x00, /* Zero tag - used for separators */ IPP_TAG_ZERO = 0x00, /* Zero tag - used for separators */
IPP_TAG_OPERATION, /* Operation group */ IPP_TAG_OPERATION, /* Operation group */
IPP_TAG_JOB, /* Job group */ IPP_TAG_JOB, /* Job group */
IPP_TAG_END, /* End-of-attributes */ IPP_TAG_END, /* End-of-attributes */
IPP_TAG_PRINTER, /* Printer group */ IPP_TAG_PRINTER, /* Printer group */
skipping to change at line 356 skipping to change at line 608
IPP_TAG_NAME, /* Name value */ IPP_TAG_NAME, /* Name value */
IPP_TAG_RESERVED_STRING, /* Reserved for future string value @private@ */ IPP_TAG_RESERVED_STRING, /* Reserved for future string value @private@ */
IPP_TAG_KEYWORD, /* Keyword value */ IPP_TAG_KEYWORD, /* Keyword value */
IPP_TAG_URI, /* URI value */ IPP_TAG_URI, /* URI value */
IPP_TAG_URISCHEME, /* URI scheme value */ IPP_TAG_URISCHEME, /* URI scheme value */
IPP_TAG_CHARSET, /* Character set value */ IPP_TAG_CHARSET, /* Character set value */
IPP_TAG_LANGUAGE, /* Language value */ IPP_TAG_LANGUAGE, /* Language value */
IPP_TAG_MIMETYPE, /* MIME media type value */ IPP_TAG_MIMETYPE, /* MIME media type value */
IPP_TAG_MEMBERNAME, /* Collection member name value */ IPP_TAG_MEMBERNAME, /* Collection member name value */
IPP_TAG_EXTENSION = 0x7f, /* Extension point for 32-bit tags * / IPP_TAG_EXTENSION = 0x7f, /* Extension point for 32-bit tags * /
IPP_TAG_MASK = 0x7fffffff, /* Mask for copied attribute values @private@ */ IPP_TAG_CUPS_MASK = 0x7fffffff, /* Mask for copied attribute values @private@ */
/* The following expression is used to avoid compiler warnings with +/-0x 80000000 */ /* The following expression is used to avoid compiler warnings with +/-0x 80000000 */
IPP_TAG_COPY = -0x7fffffff-1 /* Bitflag for copied attribute valu IPP_TAG_CUPS_CONST = -0x7fffffff-1 /* Bitflag for copied/const attribut
es @private@ */ e values @private@ */
# ifndef _CUPS_NO_DEPRECATED
# define IPP_TAG_MASK IPP_TAG_CUPS_MASK
# define IPP_TAG_COPY IPP_TAG_CUPS_CONST
# endif /* !_CUPS_NO_DEPRECATED */
} ipp_tag_t; } ipp_tag_t;
typedef unsigned char ipp_uchar_t; /**** Unsigned 8-bit integer/charact er ****/ typedef unsigned char ipp_uchar_t; /**** Unsigned 8-bit integer/charact er ****/
typedef struct _ipp_s ipp_t; /**** IPP request/response data **** / typedef struct _ipp_s ipp_t; /**** IPP request/response data **** /
typedef struct _ipp_attribute_s ipp_attribute_t; typedef struct _ipp_attribute_s ipp_attribute_t;
/**** IPP attribute ****/ /**** IPP attribute ****/
/**** New in CUPS 1.2/OS X 10.5 ****/ /**** New in CUPS 1.2/OS X 10.5 ****/
typedef ssize_t (*ipp_iocb_t)(void *context, ipp_uchar_t *buffer, si ze_t bytes); typedef ssize_t (*ipp_iocb_t)(void *context, ipp_uchar_t *buffer, si ze_t bytes);
/**** IPP IO Callback Function @sinc e CUPS 1.2/OS X 10.5@ ****/ /**** IPP IO Callback Function @sinc e CUPS 1.2/OS X 10.5@ ****/
/**** New in CUPS 1.6/OS X 10.8 ****/ /**** New in CUPS 1.6/OS X 10.8 ****/
typedef int (*ipp_copycb_t)(void *context, ipp_t *dst, ipp_attribute_t *att r); typedef int (*ipp_copycb_t)(void *context, ipp_t *dst, ipp_attribute_t *att r);
/* /*
* The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8. * The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8.
* Please use the new accessor functions available in CUPS 1.6 and later, a s * Please use the new accessor functions available in CUPS 1.6 and later, a s
* these definitions will be moved to a private header file in a future rel ease. * these definitions will be moved to a private header file in a future rel ease.
* *
* Define _IPP_PRIVATE_STRUCTURES to cause the private IPP structures to be * Define _IPP_PRIVATE_STRUCTURES to 1 to cause the private IPP structures to be
* exposed in CUPS 1.6. This happens automatically on OS X when compiling for * exposed in CUPS 1.6. This happens automatically on OS X when compiling for
* a deployment target of 10.7 or earlier. * a deployment target of 10.7 or earlier.
*
* Define _IPP_PRIVATE_STRUCTURES to 0 to prevent the private IPP structure
s
* from being exposed. This is useful when migrating existing code to the
new
* accessors.
*/ */
# if defined(_CUPS_SOURCE) || defined(_CUPS_IPP_PRIVATE_H_) # ifdef _IPP_PRIVATE_STRUCTURES
/* Somebody has overridden the value */
# elif defined(_CUPS_SOURCE) || defined(_CUPS_IPP_PRIVATE_H_)
/* Building CUPS */ /* Building CUPS */
# define _IPP_PRIVATE_STRUCTURES 1 # define _IPP_PRIVATE_STRUCTURES 1
# elif defined(__APPLE__) # elif defined(__APPLE__)
# if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED < M AC_OS_X_VERSION_10_8 # if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED < M AC_OS_X_VERSION_10_8
/* Building for 10.7 and earlier */ /* Building for 10.7 and earlier */
# define _IPP_PRIVATE_STRUCTURES 1 # define _IPP_PRIVATE_STRUCTURES 1
# elif !defined(MAC_OS_X_VERSION_10_8) # elif !defined(MAC_OS_X_VERSION_10_8)
/* Building for 10.7 and earlier */ /* Building for 10.7 and earlier */
# define _IPP_PRIVATE_STRUCTURES 1 # define _IPP_PRIVATE_STRUCTURES 1
# endif /* MAC_OS_X_VERSION_10_8 && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_ OS_X_VERSION_10_8 */ # endif /* MAC_OS_X_VERSION_10_8 && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_ OS_X_VERSION_10_8 */
# else
# define _IPP_PRIVATE_STRUCTURES 0
# endif /* _CUPS_SOURCE || _CUPS_IPP_PRIVATE_H_ */ # endif /* _CUPS_SOURCE || _CUPS_IPP_PRIVATE_H_ */
# ifdef _IPP_PRIVATE_STRUCTURES # if _IPP_PRIVATE_STRUCTURES
typedef union _ipp_request_u /**** Request Header ****/ typedef union _ipp_request_u /**** Request Header ****/
{ {
struct /* Any Header */ struct /* Any Header */
{ {
ipp_uchar_t version[2]; /* Protocol version number * / ipp_uchar_t version[2]; /* Protocol version number * /
int op_status; /* Operation ID or status co de*/ int op_status; /* Operation ID or status co de*/
int request_id; /* Request ID */ int request_id; /* Request ID */
} any; } any;
struct /* Operation Header */ struct /* Operation Header */
skipping to change at line 654 skipping to change at line 919
extern int ippSetStatusCode(ipp_t *ipp, ipp_status_t status) extern int ippSetStatusCode(ipp_t *ipp, ipp_status_t status)
_CUPS_API_1_6; _CUPS_API_1_6;
extern int ippSetString(ipp_t *ipp, ipp_attribute_t **attr, extern int ippSetString(ipp_t *ipp, ipp_attribute_t **attr,
int element, const char *strvalue) int element, const char *strvalue)
_CUPS_API_1_6; _CUPS_API_1_6;
extern int ippSetValueTag(ipp_t *ipp, ipp_attribute_t **attr, extern int ippSetValueTag(ipp_t *ipp, ipp_attribute_t **attr,
ipp_tag_t value_tag) _CUPS_API_1_6; ipp_tag_t value_tag) _CUPS_API_1_6;
extern int ippSetVersion(ipp_t *ipp, int major, int minor) extern int ippSetVersion(ipp_t *ipp, int major, int minor)
_CUPS_API_1_6; _CUPS_API_1_6;
/**** New in CUPS 1.7 ****/
extern ipp_attribute_t *ippAddStringf(ipp_t *ipp, ipp_tag_t group,
ipp_tag_t value_tag, const char *name
,
const char *language, const char *for
mat,
...) _CUPS_API_1_7;
extern ipp_attribute_t *ippAddStringfv(ipp_t *ipp, ipp_tag_t group,
ipp_tag_t value_tag, const char *nam
e,
const char *language,
const char *format, va_list ap)
_CUPS_API_1_7;
extern int ippContainsInteger(ipp_attribute_t *attr, int value)
_CUPS_API_1_7;
extern int ippContainsString(ipp_attribute_t *attr,
const char *value) _CUPS_API_1_7;
extern cups_array_t *ippCreateRequestedArray(ipp_t *request) _CUPS_API_1
_7;
extern void *ippGetOctetString(ipp_attribute_t *attr, int elemen
t,
int *datalen) _CUPS_API_1_7;
extern ipp_t *ippNewResponse(ipp_t *request) _CUPS_API_1_7;
extern int ippSetOctetString(ipp_t *ipp, ipp_attribute_t **attr
,
int element, const void *data,
int datalen) _CUPS_API_1_7;
extern int ippSetStringf(ipp_t *ipp, ipp_attribute_t **attr,
int element, const char *format,
...) _CUPS_API_1_7;
extern int ippSetStringfv(ipp_t *ipp, ipp_attribute_t **attr,
int element, const char *format,
va_list ap) _CUPS_API_1_7;
extern int ippValidateAttribute(ipp_attribute_t *attr)
_CUPS_API_1_7;
extern int ippValidateAttributes(ipp_t *ipp) _CUPS_API_1_7;
/* /*
* C++ magic... * C++ magic...
*/ */
# ifdef __cplusplus # ifdef __cplusplus
} }
# endif /* __cplusplus */ # endif /* __cplusplus */
#endif /* !_CUPS_IPP_H_ */ #endif /* !_CUPS_IPP_H_ */
/* /*
* End of "$Id: ipp.h 10424 2012-04-23 17:26:57Z mike $". * End of "$Id: ipp.h 10920 2013-03-20 12:09:48Z mike $".
*/ */
 End of changes. 26 change blocks. 
256 lines changed or deleted 649 lines changed or added


 raster.h   raster.h 
/* /*
* "$Id: raster.h 10424 2012-04-23 17:26:57Z mike $" * "$Id: raster.h 10693 2012-11-13 15:43:53Z mike $"
* *
* Raster file definitions for CUPS. * Raster file definitions for CUPS.
* *
* Copyright 2007-2012 by Apple Inc. * Copyright 2007-2012 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products. * Copyright 1997-2006 by Easy Software Products.
* *
* This file is part of the CUPS Imaging library. * This file is part of the CUPS Imaging library.
* *
* These coded instructions, statements, and computer programs are the * These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright * property of Apple Inc. and are protected by Federal copyright
skipping to change at line 366 skipping to change at line 366
* "length" on success. * "length" on success.
****/ ****/
/* /*
* Prototypes... * Prototypes...
*/ */
extern void cupsRasterClose(cups_raster_t *r); extern void cupsRasterClose(cups_raster_t *r);
extern cups_raster_t *cupsRasterOpen(int fd, cups_mode_t mode); extern cups_raster_t *cupsRasterOpen(int fd, cups_mode_t mode);
extern unsigned cupsRasterReadHeader(cups_raster_t *r, extern unsigned cupsRasterReadHeader(cups_raster_t *r,
cups_page_header_t *h) _CUPS_DE PRECATED; cups_page_header_t *h) _CUPS_DE PRECATED_MSG("Use cupsRasterReadHeader2 instead.");
extern unsigned cupsRasterReadPixels(cups_raster_t *r, extern unsigned cupsRasterReadPixels(cups_raster_t *r,
unsigned char *p, unsigned len) ; unsigned char *p, unsigned len) ;
extern unsigned cupsRasterWriteHeader(cups_raster_t *r, extern unsigned cupsRasterWriteHeader(cups_raster_t *r,
cups_page_header_t *h) _CUPS_D EPRECATED; cups_page_header_t *h) _CUPS_D EPRECATED_MSG("Use cupsRasterWriteHeader2 instead.");
extern unsigned cupsRasterWritePixels(cups_raster_t *r, extern unsigned cupsRasterWritePixels(cups_raster_t *r,
unsigned char *p, unsigned len ); unsigned char *p, unsigned len );
/**** New in CUPS 1.2 ****/ /**** New in CUPS 1.2 ****/
extern int cupsRasterInterpretPPD(cups_page_header2_t *h, extern int cupsRasterInterpretPPD(cups_page_header2_t *h,
ppd_file_t *ppd, ppd_file_t *ppd,
int num_options, int num_options,
cups_option_t *options, cups_option_t *options,
cups_interpret_cb_t func) _CU PS_API_1_2; cups_interpret_cb_t func) _CU PS_API_1_2;
extern unsigned cupsRasterReadHeader2(cups_raster_t *r, extern unsigned cupsRasterReadHeader2(cups_raster_t *r,
skipping to change at line 399 skipping to change at line 399
extern cups_raster_t *cupsRasterOpenIO(cups_raster_iocb_t iocb, void *ctx , extern cups_raster_t *cupsRasterOpenIO(cups_raster_iocb_t iocb, void *ctx ,
cups_mode_t mode); cups_mode_t mode);
# ifdef __cplusplus # ifdef __cplusplus
} }
# endif /* __cplusplus */ # endif /* __cplusplus */
#endif /* !_CUPS_RASTER_H_ */ #endif /* !_CUPS_RASTER_H_ */
/* /*
* End of "$Id: raster.h 10424 2012-04-23 17:26:57Z mike $". * End of "$Id: raster.h 10693 2012-11-13 15:43:53Z mike $".
*/ */
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 versioning.h   versioning.h 
/* /*
* "$Id: versioning.h 10424 2012-04-23 17:26:57Z mike $" * "$Id: versioning.h 10783 2013-01-08 14:22:22Z mike $"
* *
* API versioning definitions for CUPS. * API versioning definitions for CUPS.
* *
* Copyright 2007-2012 by Apple Inc. * Copyright 2007-2013 by Apple Inc.
* *
* These coded instructions, statements, and computer programs are the * These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright * property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use rights are outlined in the file "LICENSE.tx t" * law. Distribution and use rights are outlined in the file "LICENSE.tx t"
* which should have been included with this file. If this file is * which should have been included with this file. If this file is
* file is missing or damaged, see the license at "http://www.cups.org/". * file is missing or damaged, see the license at "http://www.cups.org/".
* *
* This file is subject to the Apple OS-Developed Software exception. * This file is subject to the Apple OS-Developed Software exception.
*/ */
#ifndef _CUPS_VERSIONING_H_ #ifndef _CUPS_VERSIONING_H_
# define _CUPS_VERSIONING_H_ # define _CUPS_VERSIONING_H_
/* /*
* This header defines several constants - _CUPS_DEPRECATED, * This header defines several constants - _CUPS_DEPRECATED,
* _CUPS_API_1_1, _CUPS_API_1_1_19, _CUPS_API_1_1_20, _CUPS_API_1_1_21, * _CUPS_DEPRECATED_MSG, _CUPS_INTERNAL_MSG, _CUPS_API_1_1, _CUPS_API_1_1_1
* _CUPS_API_1_2, _CUPS_API_1_3, _CUPS_API_1_4, _CUPS_API_1_5, _CUPS_API_1_ 9,
6 - * _CUPS_API_1_1_20, _CUPS_API_1_1_21, _CUPS_API_1_2, _CUPS_API_1_3,
* which add compiler-specific attributes that flag functions that are * _CUPS_API_1_4, _CUPS_API_1_5, _CUPS_API_1_6, and _CUPS_API_1_7 - which a
* deprecated or added in particular releases. dd
* compiler-specific attributes that flag functions that are deprecated, ad
ded
* in particular releases, or internal to CUPS.
* *
* On OS X, the _CUPS_API_* constants are defined based on the values of * On OS X, the _CUPS_API_* constants are defined based on the values of
* the MAC_OS_X_VERSION_MIN_ALLOWED and MAC_OS_X_VERSION_MAX_ALLOWED consta nts * the MAC_OS_X_VERSION_MIN_ALLOWED and MAC_OS_X_VERSION_MAX_ALLOWED consta nts
* provided by the compiler. * provided by the compiler.
*/ */
# if defined(__APPLE__) && !defined(_CUPS_SOURCE) # if defined(__APPLE__) && !defined(_CUPS_SOURCE)
# include <AvailabilityMacros.h> # include <AvailabilityMacros.h>
# ifndef AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER # ifndef AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
# define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER __attribute__((unav ailable)) # define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER __attribute__((unav ailable))
skipping to change at line 52 skipping to change at line 53
# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER */ # endif /* !AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER */
# ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER # ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
# define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER __attribute__((unav ailable)) # define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER __attribute__((unav ailable))
# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER */ # endif /* !AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER */
# ifndef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER # ifndef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
# define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER __attribute__((unav ailable)) # define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER __attribute__((unav ailable))
# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER */ # endif /* !AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER */
# ifndef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER # ifndef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
# define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER __attribute__((unav ailable)) # define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER __attribute__((unav ailable))
# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER */ # endif /* !AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER */
# ifndef AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
# define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER __attribute__((unav
ailable))
# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER */
# define _CUPS_API_1_1_19 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER # define _CUPS_API_1_1_19 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
# define _CUPS_API_1_1_20 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER # define _CUPS_API_1_1_20 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
# define _CUPS_API_1_1_21 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER # define _CUPS_API_1_1_21 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
# define _CUPS_API_1_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER # define _CUPS_API_1_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
# define _CUPS_API_1_3 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER # define _CUPS_API_1_3 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
# define _CUPS_API_1_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER # define _CUPS_API_1_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
# define _CUPS_API_1_5 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER # define _CUPS_API_1_5 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
# define _CUPS_API_1_6 # define _CUPS_API_1_6 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
# define _CUPS_API_1_7 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
# else # else
# define _CUPS_API_1_1_19 # define _CUPS_API_1_1_19
# define _CUPS_API_1_1_20 # define _CUPS_API_1_1_20
# define _CUPS_API_1_1_21 # define _CUPS_API_1_1_21
# define _CUPS_API_1_2 # define _CUPS_API_1_2
# define _CUPS_API_1_3 # define _CUPS_API_1_3
# define _CUPS_API_1_4 # define _CUPS_API_1_4
# define _CUPS_API_1_5 # define _CUPS_API_1_5
# define _CUPS_API_1_6 # define _CUPS_API_1_6
# define _CUPS_API_1_7
# endif /* __APPLE__ && !_CUPS_SOURCE */ # endif /* __APPLE__ && !_CUPS_SOURCE */
/* /*
* With GCC 3.0 and higher, we can mark old APIs "deprecated" so you get * With GCC and Clang we can mark old APIs as "deprecated" or "unavailable"
* a warning at compile-time. with
* messages so you get warnings/errors are compile-time...
*/ */
# if defined(__GNUC__) && __GNUC__ > 2 && !defined(_CUPS_SOURCE) # ifdef __has_extension /* Clang */
# define _CUPS_DEPRECATED __attribute__ ((__deprecated__)) # define _CUPS_HAS_DEPRECATED
# else # if __has_extension(attribute_deprecated_with_message)
# define _CUPS_HAS_DEPRECATED_WITH_MESSAGE
# endif
# if __has_extension(attribute_unavailable_with_message)
# define _CUPS_HAS_UNAVAILABLE_WITH_MESSAGE
# endif
# elif defined(__GNUC__) /* GCC and compatible */
# if __GNUC__ >= 3 /* GCC 3.0 or higher */
# define _CUPS_HAS_DEPRECATED
# endif /* __GNUC__ >= 3 */
# if __GNUC__ >= 5 /* GCC 5.x */
# define _CUPS_HAS_DEPRECATED_WITH_MESSAGE
# elif __GNUC__ == 4 && __GNUC_MINOR__ >= 5
/* GCC 4.5 or higher */
# define _CUPS_HAS_DEPRECATED_WITH_MESSAGE
# endif /* __GNUC__ >= 5 */
# endif /* __has_extension */
# if !defined(_CUPS_HAS_DEPRECATED) || (defined(_CUPS_SOURCE) && !defined(
_CUPS_NO_DEPRECATED))
/*
* Don't mark functions deprecated if the compiler doesn't support it
* or we are building CUPS source that doesn't care.
*/
# define _CUPS_DEPRECATED # define _CUPS_DEPRECATED
# endif /* __GNUC__ && __GNUC__ > 2 && !_CUPS_SOURCE */ # define _CUPS_DEPRECATED_MSG(m)
# define _CUPS_INTERNAL_MSG(m)
# elif defined(_CUPS_HAS_UNAVAILABLE_WITH_MESSAGE) && defined(_CUPS_NO_DEP
RECATED)
/*
* Compiler supports the unsupported attribute, so use it when the code
* wants to exclude the use of deprecated API.
*/
# define _CUPS_DEPRECATED __attribute__ ((unavailable))
# define _CUPS_DEPRECATED_MSG(m) __attribute__ ((unavailable(m)))
# define _CUPS_INTERNAL_MSG(m) __attribute__ ((unavailable(m)))
# else
/*
* Compiler supports the deprecated attribute, so use it.
*/
# define _CUPS_DEPRECATED __attribute__ ((deprecated))
# ifdef _CUPS_HAS_DEPRECATED_WITH_MESSAGE
# define _CUPS_DEPRECATED_MSG(m) __attribute__ ((deprecated(m)))
# else
# define _CUPS_DEPRECATED_MSG(m) __attribute__ ((deprecated))
# endif /* _CUPS_HAS_DEPRECATED_WITH_MESSAGE */
# ifdef _CUPS_SOURCE
# define _CUPS_INTERNAL_MSG(m)
# elif defined(_CUPS_HAS_UNAVAILABLE_WITH_MESSAGE)
# define _CUPS_INTERNAL_MSG(m) __attribute__ ((unavailable(m)))
# elif defined(_CUPS_HAS_DEPRECATED_WITH_MESSAGE)
# define _CUPS_INTERNAL_MSG(m) __attribute__ ((deprecated(m)))
# else
# define _CUPS_INTERNAL_MSG(m) __attribute__ ((deprecated))
# endif /* _CUPS_SOURCE */
# endif /* !_CUPS_HAS_DEPRECATED || (_CUPS_SOURCE && !_CUPS_NO_DEPRECATED)
*/
# ifndef __GNUC__ # ifndef __GNUC__
# define __attribute__(x) # define __attribute__(x)
# endif /* !__GNUC__ */ # endif /* !__GNUC__ */
#endif /* !_CUPS_VERSIONING_H_ */ #endif /* !_CUPS_VERSIONING_H_ */
/* /*
* End of "$Id: versioning.h 10424 2012-04-23 17:26:57Z mike $". * End of "$Id: versioning.h 10783 2013-01-08 14:22:22Z mike $".
*/ */
 End of changes. 10 change blocks. 
15 lines changed or deleted 79 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/