From: Michael Sweet Date: Thu, 8 Jun 2017 23:59:02 +0000 (-0400) Subject: Save work on documentation. X-Git-Tag: v2.2.4~42 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=commitdiff_plain;h=98d88c8d4796d2adc7b0afeb99ae8f34eae42e63 Save work on documentation. --- diff --git a/cups/Makefile b/cups/Makefile index 28584bc41..962bee636 100644 --- a/cups/Makefile +++ b/cups/Makefile @@ -574,10 +574,8 @@ apihelp: $(RM) cupspm.xml mxmldoc --section "Programming" --body cupspm.md \ cupspm.xml \ - auth.c cups.h dest*.c encode.c \ - http.h http*.c ipp.h ipp*.c language.[ch] \ - notify.c options.c \ - tls-darwin.c usersys.c util.c \ + auth.c cups.h dest*.c encode.c http.h http*.c ipp.h ipp*.c \ + options.c tls-darwin.c usersys.c util.c \ --coverimage cupspm.png \ --epub ../doc/help/cupspm.epub mxmldoc --section "Programming" --body cupspm.md \ diff --git a/cups/dest-job.c b/cups/dest-job.c index 9fc0bdb9a..f12b1dc58 100644 --- a/cups/dest-job.c +++ b/cups/dest-job.c @@ -25,13 +25,13 @@ * The "job_id" is the number returned by cupsCreateDestJob. * * Returns @code IPP_STATUS_OK@ on success and - * @code IPP_STATUS_ERRPR_NOT_AUTHORIZED@ or + * @code IPP_STATUS_ERROR_NOT_AUTHORIZED@ or * @code IPP_STATUS_ERROR_FORBIDDEN@ on failure. * * @since CUPS 1.6/macOS 10.8@ */ -ipp_status_t +ipp_status_t /* O - Status of cancel operation */ cupsCancelDestJob(http_t *http, /* I - Connection to destination */ cups_dest_t *dest, /* I - Destination */ int job_id) /* I - Job ID */ diff --git a/cups/dest-options.c b/cups/dest-options.c index 2832055a4..4a3a03ab0 100644 --- a/cups/dest-options.c +++ b/cups/dest-options.c @@ -833,6 +833,8 @@ cupsFindDestSupported( /* * 'cupsFreeDestInfo()' - Free destination information obtained using * @link cupsCopyDestInfo@. + * + * @since CUPS 1.6/macOS 10.8@ */ void diff --git a/cups/dest.c b/cups/dest.c index 674d8d2da..0be2bbeb5 100644 --- a/cups/dest.c +++ b/cups/dest.c @@ -570,18 +570,19 @@ _cupsAppleSetUseLastPrinter( /* - * 'cupsConnectDest()' - Connect to the server for a destination. + * 'cupsConnectDest()' - Open a conection to the destination. * - * Connect to the destination, returning a new http_t connection object and - * optionally the resource path to use for the destination. These calls will - * block until a connection is made, the timeout expires, the integer pointed - * to by "cancel" is non-zero, or the callback function (or block) returns 0, - * The caller is responsible for calling httpClose() on the returned object. + * Connect to the destination, returning a new @code http_t@ connection object + * and optionally the resource path to use for the destination. These calls + * will block until a connection is made, the timeout expires, the integer + * pointed to by "cancel" is non-zero, or the callback function (or block) + * returns 0. The caller is responsible for calling @link httpClose@ on the + * returned connection. * * @since CUPS 1.6/macOS 10.8@ */ -http_t * /* O - Connection to server or @code NULL@ */ +http_t * /* O - Connection to destination or @code NULL@ */ cupsConnectDest( cups_dest_t *dest, /* I - Destination */ unsigned flags, /* I - Connection flags */ @@ -746,18 +747,18 @@ cupsConnectDest( #ifdef __BLOCKS__ /* - * 'cupsConnectDestBlock()' - Connect to the server for a destination. + * 'cupsConnectDestBlock()' - Open a connection to the destination. * - * Connect to the destination, returning a new http_t connection object and - * optionally the resource path to use for the destination. These calls will - * block until a connection is made, the timeout expires, the integer pointed - * to by "cancel" is non-zero, or the callback function (or block) returns 0, - * The caller is responsible for calling httpClose() on the returned object. + * Connect to the destination, returning a new @code http_t@ connection object + * and optionally the resource path to use for the destination. These calls + * will block until a connection is made, the timeout expires, the integer + * pointed to by "cancel" is non-zero, or the block returns 0. The caller is + * responsible for calling @link httpClose@ on the returned connection. * * @since CUPS 1.6/macOS 10.8@ @exclude all@ */ -http_t * /* O - Connection to server or @code NULL@ */ +http_t * /* O - Connection to destination or @code NULL@ */ cupsConnectDestBlock( cups_dest_t *dest, /* I - Destination */ unsigned flags, /* I - Connection flags */ @@ -1414,7 +1415,7 @@ cupsFreeDests(int num_dests, /* I - Number of destinations */ /* * 'cupsGetDest()' - Get the named destination from the list. * - * Use the @link cupsGetDests@ or @link cupsGetDests2@ functions to get a + * Use the @link cupsEnumDests@ or @link cupsGetDests2@ functions to get a * list of supported destinations for the current user. */ @@ -1943,12 +1944,18 @@ _cupsGetDests(http_t *http, /* I - Connection to server or * 'cupsGetDests()' - Get the list of destinations from the default server. * * Starting with CUPS 1.2, the returned list of destinations include the - * printer-info, printer-is-accepting-jobs, printer-is-shared, - * printer-make-and-model, printer-state, printer-state-change-time, - * printer-state-reasons, and printer-type attributes as options. CUPS 1.4 - * adds the marker-change-time, marker-colors, marker-high-levels, - * marker-levels, marker-low-levels, marker-message, marker-names, - * marker-types, and printer-commands attributes as well. + * "printer-info", "printer-is-accepting-jobs", "printer-is-shared", + * "printer-make-and-model", "printer-state", "printer-state-change-time", + * "printer-state-reasons", "printer-type", and "printer-uri-supported" + * attributes as options. + * + * CUPS 1.4 adds the "marker-change-time", "marker-colors", + * "marker-high-levels", "marker-levels", "marker-low-levels", "marker-message", + * "marker-names", "marker-types", and "printer-commands" attributes as options. + * + * CUPS 2.2 adds accessible IPP printers to the list of destinations that can + * be used. The "printer-uri-supported" option will be present for those IPP + * printers that have been recently used. * * Use the @link cupsFreeDests@ function to free the destination list and * the @link cupsGetDest@ function to find a particular destination. @@ -1967,17 +1974,23 @@ cupsGetDests(cups_dest_t **dests) /* O - Destinations */ * 'cupsGetDests2()' - Get the list of destinations from the specified server. * * Starting with CUPS 1.2, the returned list of destinations include the - * printer-info, printer-is-accepting-jobs, printer-is-shared, - * printer-make-and-model, printer-state, printer-state-change-time, - * printer-state-reasons, and printer-type attributes as options. CUPS 1.4 - * adds the marker-change-time, marker-colors, marker-high-levels, - * marker-levels, marker-low-levels, marker-message, marker-names, - * marker-types, and printer-commands attributes as well. + * "printer-info", "printer-is-accepting-jobs", "printer-is-shared", + * "printer-make-and-model", "printer-state", "printer-state-change-time", + * "printer-state-reasons", "printer-type", and "printer-uri-supported" + * attributes as options. + * + * CUPS 1.4 adds the "marker-change-time", "marker-colors", + * "marker-high-levels", "marker-levels", "marker-low-levels", "marker-message", + * "marker-names", "marker-types", and "printer-commands" attributes as options. + * + * CUPS 2.2 adds accessible IPP printers to the list of destinations that can + * be used. The "printer-uri-supported" option will be present for those IPP + * printers that have been recently used. * * Use the @link cupsFreeDests@ function to free the destination list and * the @link cupsGetDest@ function to find a particular destination. * - * @since CUPS 1.1.21/macOS 10.4@ @exclude all@ + * @since CUPS 1.1.21/macOS 10.4@ */ int /* O - Number of destinations */ @@ -2143,10 +2156,10 @@ cupsGetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_ * 'cupsGetNamedDest()' - Get options for the named destination. * * This function is optimized for retrieving a single destination and should - * be used instead of @link cupsGetDests@ and @link cupsGetDest@ when you either - * know the name of the destination or want to print to the default destination. - * If @code NULL@ is returned, the destination does not exist or there is no - * default destination. + * be used instead of @link cupsGetDests2@ and @link cupsGetDest@ when you + * either know the name of the destination or want to print to the default + * destination. If @code NULL@ is returned, the destination does not exist or + * there is no default destination. * * If "http" is @code CUPS_HTTP_DEFAULT@, the connection to the default print * server will be used. @@ -2383,6 +2396,8 @@ cupsSetDefaultDest( * * This function saves the destinations to /etc/cups/lpoptions when run * as root and ~/.cups/lpoptions when run as a normal user. + * + * @exclude all@ */ void diff --git a/cups/encode.c b/cups/encode.c index cf9ea8e88..94695d083 100644 --- a/cups/encode.c +++ b/cups/encode.c @@ -329,10 +329,8 @@ static int compare_ipp_options(_ipp_option_t *a, _ipp_option_t *b); * 'cupsEncodeOptions()' - Encode printer options into IPP attributes. * * This function adds operation, job, and then subscription attributes, - * in that order. Use the cupsEncodeOptions2() function to add attributes + * in that order. Use the @link cupsEncodeOptions2@ function to add attributes * for a single group. - * - * @exclude all@ */ void @@ -356,7 +354,7 @@ cupsEncodeOptions(ipp_t *ipp, /* I - Request to add to */ * 'cupsEncodeOptions2()' - Encode printer options into IPP attributes for a group. * * This function only adds attributes for a single group. Call this - * function multiple times for each group, or use cupsEncodeOptions() + * function multiple times for each group, or use @link cupsEncodeOptions@ * to add the standard groups. * * @since CUPS 1.2/macOS 10.5@ diff --git a/cups/http-addr.c b/cups/http-addr.c index 12d13a697..61c86384b 100644 --- a/cups/http-addr.c +++ b/cups/http-addr.c @@ -58,9 +58,9 @@ httpAddrAny(const http_addr_t *addr) /* I - Address to check */ * 'httpAddrClose()' - Close a socket created by @link httpAddrConnect@ or * @link httpAddrListen@. * - * Pass @code NULL@ for sockets created with @link httpAddrConnect@ and the - * listen address for sockets created with @link httpAddrListen@. This will - * ensure that domain sockets are removed when closed. + * Pass @code NULL@ for sockets created with @link httpAddrConnect2@ and the + * listen address for sockets created with @link httpAddrListen@. This function + * ensures that domain sockets are removed when closed. * * @since CUPS 2.0/OS 10.10@ */ @@ -648,6 +648,10 @@ httpAddrString(const http_addr_t *addr, /* I - Address to convert */ /* * 'httpGetAddress()' - Get the address of the connected peer of a connection. * + * For connections created with @link httpConnect2@, the address is for the + * server. For connections created with @link httpAccept@, the address is for + * the client. + * * Returns @code NULL@ if the socket is currently unconnected. * * @since CUPS 2.0/OS 10.10@ @@ -667,7 +671,7 @@ httpGetAddress(http_t *http) /* I - HTTP connection */ * 'httpGetHostByName()' - Lookup a hostname or IPv4 address, and return * address records for the specified name. * - * @deprecated@ + * @deprecated@ @exclude all@ */ struct hostent * /* O - Host entry */ diff --git a/cups/http-support.c b/cups/http-support.c index 3ab461e14..76dbb7dbf 100644 --- a/cups/http-support.c +++ b/cups/http-support.c @@ -566,6 +566,10 @@ httpDecode64(char *out, /* I - String to write to */ /* * 'httpDecode64_2()' - Base64-decode a string. * + * The caller must initialize "outlen" to the maximum size of the decoded + * string before calling @code httpDecode64_2@. On return "outlen" contains the + * decoded length of the string. + * * @since CUPS 1.1.21/macOS 10.4@ */ @@ -690,7 +694,7 @@ httpEncode64(char *out, /* I - String to write to */ char * /* O - Encoded string */ httpEncode64_2(char *out, /* I - String to write to */ - int outlen, /* I - Size of output string */ + int outlen, /* I - Maximum size of output string */ const char *in, /* I - String to read from */ int inlen) /* I - Size of input string */ { @@ -782,7 +786,7 @@ httpEncode64_2(char *out, /* I - String to write to */ */ const char * /* O - Date/time string */ -httpGetDateString(time_t t) /* I - UNIX time */ +httpGetDateString(time_t t) /* I - Time in seconds */ { _cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */ @@ -798,7 +802,7 @@ httpGetDateString(time_t t) /* I - UNIX time */ */ const char * /* O - Date/time string */ -httpGetDateString2(time_t t, /* I - UNIX time */ +httpGetDateString2(time_t t, /* I - Time in seconds */ char *s, /* I - String buffer */ int slen) /* I - Size of string buffer */ { @@ -819,7 +823,7 @@ httpGetDateString2(time_t t, /* I - UNIX time */ * 'httpGetDateTime()' - Get a time value from a formatted date/time string. */ -time_t /* O - UNIX time */ +time_t /* O - Time in seconds */ httpGetDateTime(const char *s) /* I - Date/time string */ { int i; /* Looping var */ @@ -1419,7 +1423,7 @@ _httpStatus(cups_lang_t *lang, /* I - Language */ * 'httpStatus()' - Return a short string describing a HTTP status code. * * The returned string is localized to the current POSIX locale and is based - * on the status strings defined in RFC 2616. + * on the status strings defined in RFC 7231. */ const char * /* O - Localized status string */ diff --git a/cups/http.c b/cups/http.c index 15004b624..61b88c9db 100644 --- a/cups/http.c +++ b/cups/http.c @@ -439,7 +439,7 @@ http_t * /* O - New HTTP connection */ httpConnect2( const char *host, /* I - Host to connect to */ int port, /* I - Port number */ - http_addrlist_t *addrlist, /* I - List of addresses or NULL to lookup */ + http_addrlist_t *addrlist, /* I - List of addresses or @code NULL@ to lookup */ int family, /* I - Address family to use or @code AF_UNSPEC@ for any */ http_encryption_t encryption, /* I - Type of encryption to use */ int blocking, /* I - 1 for blocking connection, 0 for non-blocking */ @@ -609,7 +609,7 @@ httpFieldValue(const char *name) /* I - String name */ /* - * 'httpFlush()' - Flush data from a HTTP connection. + * 'httpFlush()' - Flush data read from a HTTP connection. */ void @@ -679,7 +679,7 @@ httpFlush(http_t *http) /* I - HTTP connection */ /* - * 'httpFlushWrite()' - Flush data in write buffer. + * 'httpFlushWrite()' - Flush data written to a HTTP connection. * * @since CUPS 1.2/macOS 10.5@ */ @@ -751,7 +751,7 @@ httpGet(http_t *http, /* I - HTTP connection */ /* * 'httpGetActivity()' - Get the most recent activity for a connection. * - * The return value is the UNIX time of the last read or write. + * The return value is the time in seconds of the last read or write. * * @since CUPS 2.0/OS 10.10@ */ @@ -766,10 +766,10 @@ httpGetActivity(http_t *http) /* I - HTTP connection */ /* * 'httpGetAuthString()' - Get the current authorization string. * - * The authorization string is set by cupsDoAuthentication() and - * httpSetAuthString(). Use httpGetAuthString() to retrieve the - * string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION - * value. + * The authorization string is set by @link cupsDoAuthentication@ and + * @link httpSetAuthString@. Use @link httpGetAuthString@ to retrieve the + * string to use with @link httpSetField@ for the + * @code HTTP_FIELD_AUTHORIZATION@ value. * * @since CUPS 1.3/macOS 10.5@ */ @@ -891,7 +891,7 @@ httpGetContentEncoding(http_t *http) /* I - HTTP connection */ * @since CUPS 1.1.19/macOS 10.3@ */ -const char * /* O - Cookie data or NULL */ +const char * /* O - Cookie data or @code NULL@ */ httpGetCookie(http_t *http) /* I - HTTP connection */ { return (http ? http->cookie : NULL); @@ -1150,7 +1150,7 @@ httpGetRemaining(http_t *http) /* I - HTTP connection */ * 'httpGets()' - Get a line of text from a HTTP connection. */ -char * /* O - Line or NULL */ +char * /* O - Line or @code NULL@ */ httpGets(char *line, /* I - Line to read into */ int length, /* I - Max length of buffer */ http_t *http) /* I - HTTP connection */ @@ -1349,7 +1349,7 @@ httpGetStatus(http_t *http) /* I - HTTP connection */ * @deprecated@ @exclude all@ */ -char * /* O - Value or NULL */ +char * /* O - Value or @code NULL@ */ httpGetSubField(http_t *http, /* I - HTTP connection */ http_field_t field, /* I - Field index */ const char *name, /* I - Name of sub-field */ @@ -1365,7 +1365,7 @@ httpGetSubField(http_t *http, /* I - HTTP connection */ * @since CUPS 1.2/macOS 10.5@ */ -char * /* O - Value or NULL */ +char * /* O - Value or @code NULL@ */ httpGetSubField2(http_t *http, /* I - HTTP connection */ http_field_t field, /* I - Field index */ const char *name, /* I - Name of sub-field */ @@ -1616,7 +1616,7 @@ httpOptions(http_t *http, /* I - HTTP connection */ * * This function copies available data from the given HTTP connection, reading * a buffer as needed. The data is still available for reading using - * @link httpRead@ or @link httpRead2@. + * @link httpRead2@. * * For non-blocking connections the usual timeouts apply. * @@ -2467,9 +2467,10 @@ httpReconnect2(http_t *http, /* I - HTTP connection */ * 'httpSetAuthString()' - Set the current authorization string. * * This function just stores a copy of the current authorization string in - * the HTTP connection object. You must still call httpSetField() to set - * HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(), - * httpHead(), httpOptions(), httpPost, or httpPut(). + * the HTTP connection object. You must still call @link httpSetField@ to set + * @code HTTP_FIELD_AUTHORIZATION@ prior to issuing a HTTP request using + * @link httpGet@, @link httpHead@, @link httpOptions@, @link httpPost@, or + * @link httpPut@. * * @since CUPS 1.3/macOS 10.5@ */ @@ -2820,7 +2821,7 @@ httpSetTimeout( http_t *http, /* I - HTTP connection */ double timeout, /* I - Number of seconds for timeout, must be greater than 0 */ - http_timeout_cb_t cb, /* I - Callback function or NULL */ + http_timeout_cb_t cb, /* I - Callback function or @code NULL@ */ void *user_data) /* I - User data pointer */ { if (!http || timeout <= 0.0) @@ -2864,6 +2865,8 @@ httpShutdown(http_t *http) /* I - HTTP connection */ /* * 'httpTrace()' - Send an TRACE request to the server. + * + * @exclude all@ */ int /* O - Status of call (0 = success) */ @@ -3898,7 +3901,7 @@ static http_t * /* O - HTTP connection */ http_create( const char *host, /* I - Hostname */ int port, /* I - Port number */ - http_addrlist_t *addrlist, /* I - Address list or NULL */ + http_addrlist_t *addrlist, /* I - Address list or @code NULL@ */ int family, /* I - Address family or AF_UNSPEC */ http_encryption_t encryption, /* I - Encryption to use */ int blocking, /* I - 1 for blocking mode */ diff --git a/cups/options.c b/cups/options.c index 901c75df3..9aa20f895 100644 --- a/cups/options.c +++ b/cups/options.c @@ -1,7 +1,7 @@ /* * Option routines for CUPS. * - * Copyright 2007-2014 by Apple Inc. + * Copyright 2007-2017 by Apple Inc. * Copyright 1997-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -35,7 +35,7 @@ static int cups_find_option(const char *name, int num_options, * New option arrays can be initialized simply by passing 0 for the * "num_options" parameter. * - * @since CUPS 2.2.4@ + * @since CUPS 2.2.4/macOS 10.13@ */ int /* O - Number of options */ @@ -185,7 +185,7 @@ cupsFreeOptions( * INT_MIN is returned when the option does not exist, is not an integer, or * exceeds the range of values for the "int" type. * - * @since 2.2.4@ + * @since CUPS 2.2.4/macOS 10.13@ */ int /* O - Option value or @code INT_MIN@ */ diff --git a/cups/usersys.c b/cups/usersys.c index b4fa81f78..88cccfa23 100644 --- a/cups/usersys.c +++ b/cups/usersys.c @@ -147,7 +147,7 @@ cupsGetPassword(const char *prompt) /* I - Prompt string */ /* - * 'cupsGetPassword2()' - Get a password from the user using the advanced + * 'cupsGetPassword2()' - Get a password from the user using the current * password callback. * * Uses the current password callback function. Returns @code NULL@ if the @@ -155,8 +155,8 @@ cupsGetPassword(const char *prompt) /* I - Prompt string */ * * Note: The current password callback function is tracked separately for each * thread in a program. Multi-threaded programs that override the setting via - * the @link cupsSetPasswordCB@ or @link cupsSetPasswordCB2@ functions need to - * do so in each thread for the same function to be used. + * the @link cupsSetPasswordCB2@ function need to do so in each thread for the + * same function to be used. * * @since CUPS 1.4/macOS 10.6@ */ diff --git a/doc/help/api-admin.html b/doc/help/api-admin.html index 2d2d96a71..c3f6838fc 100644 --- a/doc/help/api-admin.html +++ b/doc/help/api-admin.html @@ -508,70 +508,54 @@ show_devices(void)

 DEPRECATED cupsAdminCreateWindowsPPD

Create the Windows PPD file for a printer.

-char *cupsAdminCreateWindowsPPD (
-    http_t *http,
-    const char *dest,
-    char *buffer,
-    int bufsize
-);

+char *cupsAdminCreateWindowsPPD(http_t *http, const char *dest, char *buffer, int bufsize);

Parameters

-
-
http
-
Connection to server or CUPS_HTTP_DEFAULT
-
dest
-
Printer or class
-
buffer
-
Filename buffer
-
bufsize
-
Size of filename buffer
-
+ + + + + + + + + +
httpConnection to server or CUPS_HTTP_DEFAULT
destPrinter or class
bufferFilename buffer
bufsizeSize of filename buffer

Return Value

PPD file or NULL

 DEPRECATED cupsAdminExportSamba

Export a printer to Samba.

-int cupsAdminExportSamba (
-    const char *dest,
-    const char *ppd,
-    const char *samba_server,
-    const char *samba_user,
-    const char *samba_password,
-    FILE *logfile
-);

+int cupsAdminExportSamba(const char *dest, const char *ppd, const char *samba_server, const char *samba_user, const char *samba_password, FILE *logfile);

Parameters

-
-
dest
-
Destination to export
-
ppd
-
PPD file
-
samba_server
-
Samba server
-
samba_user
-
Samba username
-
samba_password
-
Samba password
-
logfile
-
Log file, if any
-
+ + + + + + + + + + + + + +
destDestination to export
ppdPPD file
samba_serverSamba server
samba_userSamba username
samba_passwordSamba password
logfileLog file, if any

Return Value

1 on success, 0 on failure

 CUPS 1.3/macOS 10.5 cupsAdminGetServerSettings

Get settings from the server.

-int cupsAdminGetServerSettings (
-    http_t *http,
-    int *num_settings,
-    cups_option_t **settings
-);

+int cupsAdminGetServerSettings(http_t *http, int *num_settings, cups_option_t **settings);

Parameters

-
-
http
-
Connection to server or CUPS_HTTP_DEFAULT
-
num_settings
-
Number of settings
-
settings
-
Settings
-
+ + + + + + + +
httpConnection to server or CUPS_HTTP_DEFAULT
num_settingsNumber of settings
settingsSettings

Return Value

1 on success, 0 on failure

Discussion

@@ -582,48 +566,37 @@ you are done with them.

 CUPS 1.3/macOS 10.5 cupsAdminSetServerSettings

Set settings on the server.

-int cupsAdminSetServerSettings (
-    http_t *http,
-    int num_settings,
-    cups_option_t *settings
-);

+int cupsAdminSetServerSettings(http_t *http, int num_settings, cups_option_t *settings);

Parameters

-
-
http
-
Connection to server or CUPS_HTTP_DEFAULT
-
num_settings
-
Number of settings
-
settings
-
Settings
-
+ + + + + + + +
httpConnection to server or CUPS_HTTP_DEFAULT
num_settingsNumber of settings
settingsSettings

Return Value

1 on success, 0 on failure

 CUPS 1.4/macOS 10.6 cupsGetDevices

Get available printer devices.

-ipp_status_t cupsGetDevices (
-    http_t *http,
-    int timeout,
-    const char *include_schemes,
-    const char *exclude_schemes,
-    cups_device_cb_t callback,
-    void *user_data
-);

+ipp_status_t cupsGetDevices(http_t *http, int timeout, const char *include_schemes, const char *exclude_schemes, cups_device_cb_t callback, void *user_data);

Parameters

-
-
http
-
Connection to server or CUPS_HTTP_DEFAULT
-
timeout
-
Timeout in seconds or CUPS_TIMEOUT_DEFAULT
-
include_schemes
-
Comma-separated URI schemes to include or CUPS_INCLUDE_ALL
-
exclude_schemes
-
Comma-separated URI schemes to exclude or CUPS_EXCLUDE_NONE
-
callback
-
Callback function
-
user_data
-
User data pointer
-
+ + + + + + + + + + + + + +
httpConnection to server or CUPS_HTTP_DEFAULT
timeoutTimeout in seconds or CUPS_TIMEOUT_DEFAULT
include_schemesComma-separated URI schemes to include or CUPS_INCLUDE_ALL
exclude_schemesComma-separated URI schemes to exclude or CUPS_EXCLUDE_NONE
callbackCallback function
user_dataUser data pointer

Return Value

Request status - IPP_OK on success.

Discussion

diff --git a/doc/help/api-filter.html b/doc/help/api-filter.html index 7614f6961..94fec4955 100644 --- a/doc/help/api-filter.html +++ b/doc/help/api-filter.html @@ -1320,20 +1320,16 @@ void *my_data;

 CUPS 1.2/macOS 10.5 cupsBackChannelRead

Read data from the backchannel.

-ssize_t cupsBackChannelRead (
-    char *buffer,
-    size_t bytes,
-    double timeout
-);

+ssize_t cupsBackChannelRead(char *buffer, size_t bytes, double timeout);

Parameters

-
-
buffer
-
Buffer to read into
-
bytes
-
Bytes to read
-
timeout
-
Timeout in seconds, typically 0.0 to poll
-
+ + + + + + + +
bufferBuffer to read into
bytesBytes to read
timeoutTimeout in seconds, typically 0.0 to poll

Return Value

Bytes read or -1 on error

Discussion

@@ -1345,20 +1341,16 @@ return immediately if there is no data, -1.0 to wait for data indefinitely.

 CUPS 1.2/macOS 10.5 cupsBackChannelWrite

Write data to the backchannel.

-ssize_t cupsBackChannelWrite (
-    const char *buffer,
-    size_t bytes,
-    double timeout
-);

+ssize_t cupsBackChannelWrite(const char *buffer, size_t bytes, double timeout);

Parameters

-
-
buffer
-
Buffer to write
-
bytes
-
Bytes to write
-
timeout
-
Timeout in seconds, typically 1.0
-
+ + + + + + + +
bufferBuffer to write
bytesBytes to write
timeoutTimeout in seconds, typically 1.0

Return Value

Bytes written or -1 on error

Discussion

@@ -1371,14 +1363,12 @@ indefinitely.

 CUPS 1.2/macOS 10.5 cupsBackendDeviceURI

Get the device URI for a backend.

-const char *cupsBackendDeviceURI (
-    char **argv
-);

+const char *cupsBackendDeviceURI(char **argv);

Parameters

-
-
argv
-
Command-line arguments
-
+ + + +
argvCommand-line arguments

Return Value

Device URI or NULL

Discussion

@@ -1388,34 +1378,26 @@ variable or the device URI passed in argv[0], whichever is found first.

-

cupsBackendReport

-

PPD attribute

+

 CUPS 1.4/macOS 10.6 cupsBackendReport

+

Write a device line from a backend.

-void cupsBackendReport (
-    const char *device_scheme,
-    const char *device_uri,
-    const char *device_make_and_model,
-    const char *device_info,
-    const char *device_id,
-    const char *device_location
-);

+void cupsBackendReport(const char *device_scheme, const char *device_uri, const char *device_make_and_model, const char *device_info, const char *device_id, const char *device_location);

Parameters

-
-
device_scheme
-
device-scheme string
-
device_uri
-
device-uri string
-
device_make_and_model
-
device-make-and-model string or NULL
-
device_info
-
device-info string or NULL
-
device_id
-
device-id string or NULL
-
device_location
-
device-location string or NULL
-
-

Return Value

-

Write a device line from a backend.

+ + + + + + + + + + + + + +
device_schemedevice-scheme string
device_uridevice-uri string
device_make_and_modeldevice-make-and-model string or NULL
device_infodevice-info string or NULL
device_iddevice-id string or NULL
device_locationdevice-location string or NULL
+

Discussion

This function writes a single device line to stdout for a backend. It handles quoting of special characters in the device-make-and-model, device-info, device-id, and device-location strings. @@ -1424,23 +1406,18 @@ device-info, device-id, and device-location strings.

 CUPS 1.3/macOS 10.5 cupsSideChannelDoRequest

Send a side-channel command to a backend and wait for a response.

-cups_sc_status_t cupsSideChannelDoRequest (
-    cups_sc_command_t command,
-    char *data,
-    int *datalen,
-    double timeout
-);

+cups_sc_status_t cupsSideChannelDoRequest(cups_sc_command_t command, char *data, int *datalen, double timeout);

Parameters

-
-
command
-
Command to send
-
data
-
Response data buffer pointer
-
datalen
-
Size of data buffer on entry, number of bytes in buffer on return
-
timeout
-
Timeout in seconds
-
+ + + + + + + + + +
commandCommand to send
dataResponse data buffer pointer
datalenSize of data buffer on entry, number of bytes in buffer on return
timeoutTimeout in seconds

Return Value

Status of command

Discussion

@@ -1458,26 +1435,20 @@ update the value to contain the number of data bytes in the buffer.

 CUPS 1.3/macOS 10.5 cupsSideChannelRead

Read a side-channel message.

-int cupsSideChannelRead (
-    cups_sc_command_t *command,
-    cups_sc_status_t *status,
-    char *data,
-    int *datalen,
-    double timeout
-);

+int cupsSideChannelRead(cups_sc_command_t *command, cups_sc_status_t *status, char *data, int *datalen, double timeout);

Parameters

-
-
command
-
Command code
-
status
-
Status code
-
data
-
Data buffer pointer
-
datalen
-
Size of data buffer on entry, number of bytes in buffer on return
-
timeout
-
Timeout in seconds
-
+ + + + + + + + + + + +
commandCommand code
statusStatus code
dataData buffer pointer
datalenSize of data buffer on entry, number of bytes in buffer on return
timeoutTimeout in seconds

Return Value

0 on success, -1 on error

Discussion

@@ -1494,23 +1465,18 @@ update the value to contain the number of data bytes in the buffer.

 CUPS 1.4/macOS 10.6 cupsSideChannelSNMPGet

Query a SNMP OID's value.

-cups_sc_status_t cupsSideChannelSNMPGet (
-    const char *oid,
-    char *data,
-    int *datalen,
-    double timeout
-);

+cups_sc_status_t cupsSideChannelSNMPGet(const char *oid, char *data, int *datalen, double timeout);

Parameters

-
-
oid
-
OID to query
-
data
-
Buffer for OID value
-
datalen
-
Size of OID buffer on entry, size of value on return
-
timeout
-
Timeout in seconds
-
+ + + + + + + + + +
oidOID to query
dataBuffer for OID value
datalenSize of OID buffer on entry, size of value on return
timeoutTimeout in seconds

Return Value

Query status

Discussion

@@ -1535,23 +1501,18 @@ the printer does not respond to the SNMP query.

 CUPS 1.4/macOS 10.6 cupsSideChannelSNMPWalk

Query multiple SNMP OID values.

-cups_sc_status_t cupsSideChannelSNMPWalk (
-    const char *oid,
-    double timeout,
-    cups_sc_walk_func_t cb,
-    void *context
-);

+cups_sc_status_t cupsSideChannelSNMPWalk(const char *oid, double timeout, cups_sc_walk_func_t cb, void *context);

Parameters

-
-
oid
-
First numeric OID to query
-
timeout
-
Timeout for each query in seconds
-
cb
-
Function to call with each value
-
context
-
Application-defined pointer to send to callback
-
+ + + + + + + + + +
oidFirst numeric OID to query
timeoutTimeout for each query in seconds
cbFunction to call with each value
contextApplication-defined pointer to send to callback

Return Value

Status of first query of CUPS_SC_STATUS_OK on success

Discussion

@@ -1581,26 +1542,20 @@ the printer does not respond to the first SNMP query.

 CUPS 1.3/macOS 10.5 cupsSideChannelWrite

Write a side-channel message.

-int cupsSideChannelWrite (
-    cups_sc_command_t command,
-    cups_sc_status_t status,
-    const char *data,
-    int datalen,
-    double timeout
-);

+int cupsSideChannelWrite(cups_sc_command_t command, cups_sc_status_t status, const char *data, int datalen, double timeout);

Parameters

-
-
command
-
Command code
-
status
-
Status code
-
data
-
Data buffer pointer
-
datalen
-
Number of bytes of data
-
timeout
-
Timeout in seconds
-
+ + + + + + + + + + + +
commandCommand code
statusStatus code
dataData buffer pointer
datalenNumber of bytes of data
timeoutTimeout in seconds

Return Value

0 on success, -1 on error

Discussion

@@ -1648,105 +1603,69 @@ typedef void (*cups_sc_walk_func_t)(const char *oid, const char *data, int datal

cups_backend_e

Backend exit codes

Constants

-
-
CUPS_BACKEND_AUTH_REQUIRED
-
Job failed, authentication required
-
CUPS_BACKEND_CANCEL
-
Job failed, cancel job
-
CUPS_BACKEND_FAILED
-
Job failed, use error-policy
-
CUPS_BACKEND_HOLD
-
Job failed, hold job
-
CUPS_BACKEND_OK
-
Job completed successfully
-
CUPS_BACKEND_RETRY
-
Job failed, retry this job later
-
CUPS_BACKEND_RETRY_CURRENT
-
Job failed, retry this job immediately
-
CUPS_BACKEND_STOP
-
Job failed, stop queue
-
+ + + + + + + + + +
CUPS_BACKEND_AUTH_REQUIRED Job failed, authentication required
CUPS_BACKEND_CANCEL Job failed, cancel job
CUPS_BACKEND_FAILED Job failed, use error-policy
CUPS_BACKEND_HOLD Job failed, hold job
CUPS_BACKEND_OK Job completed successfully
CUPS_BACKEND_RETRY Job failed, retry this job later
CUPS_BACKEND_RETRY_CURRENT Job failed, retry this job immediately
CUPS_BACKEND_STOP Job failed, stop queue

cups_sc_bidi_e

Bidirectional capability values

Constants

-
-
CUPS_SC_BIDI_NOT_SUPPORTED
-
Bidirectional I/O is not supported
-
CUPS_SC_BIDI_SUPPORTED
-
Bidirectional I/O is supported
-
+ + + +
CUPS_SC_BIDI_NOT_SUPPORTED Bidirectional I/O is not supported
CUPS_SC_BIDI_SUPPORTED Bidirectional I/O is supported

cups_sc_command_e

Request command codes

Constants

-
-
CUPS_SC_CMD_DRAIN_OUTPUT
-
Drain all pending output
-
CUPS_SC_CMD_GET_BIDI
-
Return bidirectional capabilities
-
CUPS_SC_CMD_GET_CONNECTED  CUPS 1.5/macOS 10.7 
-
Return whether the backend is "connected" to the printer
-
CUPS_SC_CMD_GET_DEVICE_ID
-
Return the IEEE-1284 device ID
-
CUPS_SC_CMD_GET_STATE
-
Return the device state
-
CUPS_SC_CMD_SNMP_GET  CUPS 1.4/macOS 10.6 
-
Query an SNMP OID
-
CUPS_SC_CMD_SNMP_GET_NEXT  CUPS 1.4/macOS 10.6 
-
Query the next SNMP OID
-
CUPS_SC_CMD_SOFT_RESET
-
Do a soft reset
-
+ + + + + + + + + +
CUPS_SC_CMD_DRAIN_OUTPUT Drain all pending output
CUPS_SC_CMD_GET_BIDI Return bidirectional capabilities
CUPS_SC_CMD_GET_CONNECTED  CUPS 1.5/macOS 10.7  Return whether the backend is "connected" to the printer
CUPS_SC_CMD_GET_DEVICE_ID Return the IEEE-1284 device ID
CUPS_SC_CMD_GET_STATE Return the device state
CUPS_SC_CMD_SNMP_GET  CUPS 1.4/macOS 10.6  Query an SNMP OID
CUPS_SC_CMD_SNMP_GET_NEXT  CUPS 1.4/macOS 10.6  Query the next SNMP OID
CUPS_SC_CMD_SOFT_RESET Do a soft reset

cups_sc_connected_e

Connectivity values

Constants

-
-
CUPS_SC_CONNECTED
-
Backend is "connected" to printer
-
CUPS_SC_NOT_CONNECTED
-
Backend is not "connected" to printer
-
+ + + +
CUPS_SC_CONNECTED Backend is "connected" to printer
CUPS_SC_NOT_CONNECTED Backend is not "connected" to printer

cups_sc_state_e

Printer state bits

Constants

-
-
CUPS_SC_STATE_BUSY
-
Device is busy
-
CUPS_SC_STATE_ERROR
-
Other error condition
-
CUPS_SC_STATE_MARKER_EMPTY
-
Toner/ink out condition
-
CUPS_SC_STATE_MARKER_LOW
-
Toner/ink low condition
-
CUPS_SC_STATE_MEDIA_EMPTY
-
Paper out condition
-
CUPS_SC_STATE_MEDIA_LOW
-
Paper low condition
-
CUPS_SC_STATE_OFFLINE
-
Device is offline
-
CUPS_SC_STATE_ONLINE
-
Device is online
-
+ + + + + + + + + +
CUPS_SC_STATE_BUSY Device is busy
CUPS_SC_STATE_ERROR Other error condition
CUPS_SC_STATE_MARKER_EMPTY Toner/ink out condition
CUPS_SC_STATE_MARKER_LOW Toner/ink low condition
CUPS_SC_STATE_MEDIA_EMPTY Paper out condition
CUPS_SC_STATE_MEDIA_LOW Paper low condition
CUPS_SC_STATE_OFFLINE Device is offline
CUPS_SC_STATE_ONLINE Device is online

cups_sc_status_e

Response status codes

Constants

-
-
CUPS_SC_STATUS_BAD_MESSAGE
-
The command/response message was invalid
-
CUPS_SC_STATUS_IO_ERROR
-
An I/O error occurred
-
CUPS_SC_STATUS_NONE
-
No status
-
CUPS_SC_STATUS_NOT_IMPLEMENTED
-
Command not implemented
-
CUPS_SC_STATUS_NO_RESPONSE
-
The device did not respond
-
CUPS_SC_STATUS_OK
-
Operation succeeded
-
CUPS_SC_STATUS_TIMEOUT
-
The backend did not respond
-
CUPS_SC_STATUS_TOO_BIG
-
Response too big
-
+ + + + + + + + + +
CUPS_SC_STATUS_BAD_MESSAGE The command/response message was invalid
CUPS_SC_STATUS_IO_ERROR An I/O error occurred
CUPS_SC_STATUS_NONE No status
CUPS_SC_STATUS_NOT_IMPLEMENTED Command not implemented
CUPS_SC_STATUS_NO_RESPONSE The device did not respond
CUPS_SC_STATUS_OK Operation succeeded
CUPS_SC_STATUS_TIMEOUT The backend did not respond
CUPS_SC_STATUS_TOO_BIG Response too big
diff --git a/doc/help/api-ppd.html b/doc/help/api-ppd.html index b3181369e..7e60ec4b6 100644 --- a/doc/help/api-ppd.html +++ b/doc/help/api-ppd.html @@ -710,23 +710,18 @@ for (attr = ppdFindAttr(ppd, "Product", NULL);

 CUPS 1.4/macOS 10.6 cupsGetConflicts

Get a list of conflicting options in a marked PPD.

-int cupsGetConflicts (
-    ppd_file_t *ppd,
-    const char *option,
-    const char *choice,
-    cups_option_t **options
-);

+int cupsGetConflicts(ppd_file_t *ppd, const char *option, const char *choice, cups_option_t **options);

Parameters

-
-
ppd
-
PPD file
-
option
-
Option to test
-
choice
-
Choice to test
-
options
-
Conflicting options
-
+ + + + + + + + + +
ppdPPD file
optionOption to test
choiceChoice to test
optionsConflicting options

Return Value

Number of conflicting options

Discussion

@@ -743,14 +738,12 @@ the conflicting options. The returned option array must be freed using

cupsGetPPD

Get the PPD file for a printer on the default server.

-const char *cupsGetPPD (
-    const char *name
-);

+const char *cupsGetPPD(const char *name);

Parameters

-
-
name
-
Destination name
-
+ + + +
nameDestination name

Return Value

Filename for PPD file

Discussion

@@ -763,17 +756,14 @@ file that is created and must unlink the returned filename.

 CUPS 1.1.21/macOS 10.4 cupsGetPPD2

Get the PPD file for a printer from the specified server.

-const char *cupsGetPPD2 (
-    http_t *http,
-    const char *name
-);

+const char *cupsGetPPD2(http_t *http, const char *name);

Parameters

-
-
http
-
Connection to server or CUPS_HTTP_DEFAULT
-
name
-
Destination name
-
+ + + + + +
httpConnection to server or CUPS_HTTP_DEFAULT
nameDestination name

Return Value

Filename for PPD file

Discussion

@@ -789,26 +779,20 @@ file that is created and must unlink the returned filename.

Get the PPD file for a printer on the specified server if it has changed.

-http_status_t cupsGetPPD3 (
-    http_t *http,
-    const char *name,
-    time_t *modtime,
-    char *buffer,
-    size_t bufsize
-);

+http_status_t cupsGetPPD3(http_t *http, const char *name, time_t *modtime, char *buffer, size_t bufsize);

Parameters

-
-
http
-
HTTP connection or CUPS_HTTP_DEFAULT
-
name
-
Destination name
-
modtime
-
Modification time
-
buffer
-
Filename buffer
-
bufsize
-
Size of filename buffer
-
+ + + + + + + + + + + +
httpHTTP connection or CUPS_HTTP_DEFAULT
nameDestination name
modtimeModification time
bufferFilename buffer
bufsizeSize of filename buffer

Return Value

HTTP status

Discussion

@@ -832,17 +816,14 @@ in the class.

 CUPS 1.3/macOS 10.5 cupsGetServerPPD

Get an available PPD file from the server.

-char *cupsGetServerPPD (
-    http_t *http,
-    const char *name
-);

+char *cupsGetServerPPD(http_t *http, const char *name);

Parameters

-
-
http
-
Connection to server or CUPS_HTTP_DEFAULT
-
name
-
Name of PPD file ("ppd-name")
-
+ + + + + +
httpConnection to server or CUPS_HTTP_DEFAULT
nameName of PPD file ("ppd-name")

Return Value

Name of PPD file or NULL on error

Discussion

@@ -859,20 +840,16 @@ or cupsGetServerPPD.

cupsMarkOptions

Mark command-line options in a PPD file.

-int cupsMarkOptions (
-    ppd_file_t *ppd,
-    int num_options,
-    cups_option_t *options
-);

+int cupsMarkOptions(ppd_file_t *ppd, int num_options, cups_option_t *options);

Parameters

-
-
ppd
-
PPD file
-
num_options
-
Number of options
-
options
-
Options
-
+ + + + + + + +
ppdPPD file
num_optionsNumber of options
optionsOptions

Return Value

1 if conflicts exist, 0 otherwise

Discussion

@@ -883,26 +860,20 @@ corresponding PPD options and choices.

 CUPS 1.4/macOS 10.6 cupsResolveConflicts

Resolve conflicts in a marked PPD.

-int cupsResolveConflicts (
-    ppd_file_t *ppd,
-    const char *option,
-    const char *choice,
-    int *num_options,
-    cups_option_t **options
-);

+int cupsResolveConflicts(ppd_file_t *ppd, const char *option, const char *choice, int *num_options, cups_option_t **options);

Parameters

-
-
ppd
-
PPD file
-
option
-
Newly selected option or NULL for none
-
choice
-
Newly selected choice or NULL for none
-
num_options
-
Number of additional selected options
-
options
-
Additional selected options
-
+ + + + + + + + + + + +
ppdPPD file
optionNewly selected option or NULL for none
choiceNewly selected choice or NULL for none
num_optionsNumber of additional selected options
optionsAdditional selected options

Return Value

1 on success, 0 on failure

Discussion

@@ -942,20 +913,16 @@ until a non-conflicting option choice is found.

Collect all marked options that reside in the specified section.

-int ppdCollect (
-    ppd_file_t *ppd,
-    ppd_section_t section,
-    ppd_choice_t ***choices
-);

+int ppdCollect(ppd_file_t *ppd, ppd_section_t section, ppd_choice_t ***choices);

Parameters

-
-
ppd
-
PPD file data
-
section
-
Section to collect
-
choices
-
Pointers to choices
-
+ + + + + + + +
ppdPPD file data
sectionSection to collect
choicesPointers to choices

Return Value

Number of options marked

Discussion

@@ -965,23 +932,18 @@ finished with it.

Collect all marked options that reside in the specified section and minimum order.

-int ppdCollect2 (
-    ppd_file_t *ppd,
-    ppd_section_t section,
-    float min_order,
-    ppd_choice_t ***choices
-);

+int ppdCollect2(ppd_file_t *ppd, ppd_section_t section, float min_order, ppd_choice_t ***choices);

Parameters

-
-
ppd
-
PPD file data
-
section
-
Section to collect
-
min_order
-
Minimum OrderDependency value
-
choices
-
Pointers to choices
-
+ + + + + + + + + +
ppdPPD file data
sectionSection to collect
min_orderMinimum OrderDependency value
choicesPointers to choices

Return Value

Number of options marked

Discussion

@@ -993,14 +955,12 @@ finished with it.

Check to see if there are any conflicts among the marked option choices.

-int ppdConflicts (
-    ppd_file_t *ppd
-);

+int ppdConflicts(ppd_file_t *ppd);

Parameters

-
-
ppd
-
PPD to check
-
+ + + +
ppdPPD to check

Return Value

Number of conflicts found

Discussion

@@ -1008,45 +968,35 @@ int ppdConflicts (

ppdEmit

Emit code for marked options to a file.

-int ppdEmit (
-    ppd_file_t *ppd,
-    FILE *fp,
-    ppd_section_t section
-);

+int ppdEmit(ppd_file_t *ppd, FILE *fp, ppd_section_t section);

Parameters

-
-
ppd
-
PPD file record
-
fp
-
File to write to
-
section
-
Section to write
-
+ + + + + + + +
ppdPPD file record
fpFile to write to
sectionSection to write

Return Value

0 on success, -1 on failure

 CUPS 1.2/macOS 10.5 ppdEmitAfterOrder

Emit a subset of the code for marked options to a file.

-int ppdEmitAfterOrder (
-    ppd_file_t *ppd,
-    FILE *fp,
-    ppd_section_t section,
-    int limit,
-    float min_order
-);

+int ppdEmitAfterOrder(ppd_file_t *ppd, FILE *fp, ppd_section_t section, int limit, float min_order);

Parameters

-
-
ppd
-
PPD file record
-
fp
-
File to write to
-
section
-
Section to write
-
limit
-
Non-zero to use min_order
-
min_order
-
Lowest OrderDependency
-
+ + + + + + + + + + + +
ppdPPD file record
fpFile to write to
sectionSection to write
limitNon-zero to use min_order
min_orderLowest OrderDependency

Return Value

0 on success, -1 on failure

Discussion

@@ -1059,80 +1009,63 @@ When "limit" is zero, this function is identical to ppdEmit().

ppdEmitFd

Emit code for marked options to a file.

-int ppdEmitFd (
-    ppd_file_t *ppd,
-    int fd,
-    ppd_section_t section
-);

+int ppdEmitFd(ppd_file_t *ppd, int fd, ppd_section_t section);

Parameters

-
-
ppd
-
PPD file record
-
fd
-
File to write to
-
section
-
Section to write
-
+ + + + + + + +
ppdPPD file record
fdFile to write to
sectionSection to write

Return Value

0 on success, -1 on failure

ppdEmitJCL

Emit code for JCL options to a file.

-int ppdEmitJCL (
-    ppd_file_t *ppd,
-    FILE *fp,
-    int job_id,
-    const char *user,
-    const char *title
-);

+int ppdEmitJCL(ppd_file_t *ppd, FILE *fp, int job_id, const char *user, const char *title);

Parameters

-
-
ppd
-
PPD file record
-
fp
-
File to write to
-
job_id
-
Job ID
-
user
-
Username
-
title
-
Title
-
+ + + + + + + + + + + +
ppdPPD file record
fpFile to write to
job_idJob ID
userUsername
titleTitle

Return Value

0 on success, -1 on failure

 CUPS 1.2/macOS 10.5 ppdEmitJCLEnd

Emit JCLEnd code to a file.

-int ppdEmitJCLEnd (
-    ppd_file_t *ppd,
-    FILE *fp
-);

+int ppdEmitJCLEnd(ppd_file_t *ppd, FILE *fp);

Parameters

-
-
ppd
-
PPD file record
-
fp
-
File to write to
-
+ + + + + +
ppdPPD file record
fpFile to write to

Return Value

0 on success, -1 on failure

 CUPS 1.2/macOS 10.5 ppdEmitString

Get a string containing the code for marked options.

-char *ppdEmitString (
-    ppd_file_t *ppd,
-    ppd_section_t section,
-    float min_order
-);

+char *ppdEmitString(ppd_file_t *ppd, ppd_section_t section, float min_order);

Parameters

-
-
ppd
-
PPD file record
-
section
-
Section to write
-
min_order
-
Lowest OrderDependency
-
+ + + + + + + +
ppdPPD file record
sectionSection to write
min_orderLowest OrderDependency

Return Value

String containing option code or NULL if there is no option code

Discussion

@@ -1148,145 +1081,118 @@ The return string is allocated on the heap and should be freed using

 CUPS 1.1.19/macOS 10.3 ppdFindAttr

Find the first matching attribute.

-ppd_attr_t *ppdFindAttr (
-    ppd_file_t *ppd,
-    const char *name,
-    const char *spec
-);

+ppd_attr_t *ppdFindAttr(ppd_file_t *ppd, const char *name, const char *spec);

Parameters

-
-
ppd
-
PPD file data
-
name
-
Attribute name
-
spec
-
Specifier string or NULL
-
+ + + + + + + +
ppdPPD file data
nameAttribute name
specSpecifier string or NULL

Return Value

Attribute or NULL if not found

ppdFindChoice

Return a pointer to an option choice.

-ppd_choice_t *ppdFindChoice (
-    ppd_option_t *o,
-    const char *choice
-);

+ppd_choice_t *ppdFindChoice(ppd_option_t *o, const char *choice);

Parameters

-
-
o
-
Pointer to option
-
choice
-
Name of choice
-
+ + + + + +
oPointer to option
choiceName of choice

Return Value

Choice pointer or NULL

 CUPS 1.2/macOS 10.5 ppdFindCustomOption

Find a custom option.

-ppd_coption_t *ppdFindCustomOption (
-    ppd_file_t *ppd,
-    const char *keyword
-);

+ppd_coption_t *ppdFindCustomOption(ppd_file_t *ppd, const char *keyword);

Parameters

-
-
ppd
-
PPD file
-
keyword
-
Custom option name
-
+ + + + + +
ppdPPD file
keywordCustom option name

Return Value

Custom option or NULL

 CUPS 1.2/macOS 10.5 ppdFindCustomParam

Find a parameter for a custom option.

-ppd_cparam_t *ppdFindCustomParam (
-    ppd_coption_t *opt,
-    const char *name
-);

+ppd_cparam_t *ppdFindCustomParam(ppd_coption_t *opt, const char *name);

Parameters

-
-
opt
-
Custom option
-
name
-
Parameter name
-
+ + + + + +
optCustom option
nameParameter name

Return Value

Custom parameter or NULL

ppdFindMarkedChoice

Return the marked choice for the specified option.

-ppd_choice_t *ppdFindMarkedChoice (
-    ppd_file_t *ppd,
-    const char *option
-);

+ppd_choice_t *ppdFindMarkedChoice(ppd_file_t *ppd, const char *option);

Parameters

-
-
ppd
-
PPD file
-
option
-
Keyword/option name
-
+ + + + + +
ppdPPD file
optionKeyword/option name

Return Value

Pointer to choice or NULL

 CUPS 1.1.19/macOS 10.3 ppdFindNextAttr

Find the next matching attribute.

-ppd_attr_t *ppdFindNextAttr (
-    ppd_file_t *ppd,
-    const char *name,
-    const char *spec
-);

+ppd_attr_t *ppdFindNextAttr(ppd_file_t *ppd, const char *name, const char *spec);

Parameters

-
-
ppd
-
PPD file data
-
name
-
Attribute name
-
spec
-
Specifier string or NULL
-
+ + + + + + + +
ppdPPD file data
nameAttribute name
specSpecifier string or NULL

Return Value

Attribute or NULL if not found

ppdFindOption

Return a pointer to the specified option.

-ppd_option_t *ppdFindOption (
-    ppd_file_t *ppd,
-    const char *option
-);

+ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *option);

Parameters

-
-
ppd
-
PPD file data
-
option
-
Option/Keyword name
-
+ + + + + +
ppdPPD file data
optionOption/Keyword name

Return Value

Pointer to option or NULL

 CUPS 1.2/macOS 10.5 ppdFirstCustomParam

Return the first parameter for a custom option.

-ppd_cparam_t *ppdFirstCustomParam (
-    ppd_coption_t *opt
-);

+ppd_cparam_t *ppdFirstCustomParam(ppd_coption_t *opt);

Parameters

-
-
opt
-
Custom option
-
+ + + +
optCustom option

Return Value

Custom parameter or NULL

 CUPS 1.2/macOS 10.5 ppdFirstOption

Return the first option in the PPD file.

-ppd_option_t *ppdFirstOption (
-    ppd_file_t *ppd
-);

+ppd_option_t *ppdFirstOption(ppd_file_t *ppd);

Parameters

-
-
ppd
-
PPD file
-
+ + + +
ppdPPD file

Return Value

First option or NULL

Discussion

@@ -1297,20 +1203,16 @@ The return string is allocated on the heap and should be freed using

Test whether an option choice conflicts with an installable option.

-int ppdInstallableConflict (
-    ppd_file_t *ppd,
-    const char *option,
-    const char *choice
-);

+int ppdInstallableConflict(ppd_file_t *ppd, const char *option, const char *choice);

Parameters

-
-
ppd
-
PPD file
-
option
-
Option
-
choice
-
Choice
-
+ + + + + + + +
ppdPPD file
optionOption
choiceChoice

Return Value

1 if conflicting, 0 if not conflicting

Discussion

@@ -1321,33 +1223,27 @@ on constraints against options in the "InstallableOptions" group.

ppdIsMarked

Check to see if an option is marked.

-int ppdIsMarked (
-    ppd_file_t *ppd,
-    const char *option,
-    const char *choice
-);

+int ppdIsMarked(ppd_file_t *ppd, const char *option, const char *choice);

Parameters

-
-
ppd
-
PPD file data
-
option
-
Option/Keyword name
-
choice
-
Choice name
-
+ + + + + + + +
ppdPPD file data
optionOption/Keyword name
choiceChoice name

Return Value

Non-zero if option is marked

 CUPS 1.2/macOS 10.5 ppdLocalize

Localize the PPD file to the current locale.

-int ppdLocalize (
-    ppd_file_t *ppd
-);

+int ppdLocalize(ppd_file_t *ppd);

Parameters

-
-
ppd
-
PPD file
-
+ + + +
ppdPPD file

Return Value

0 on success, -1 on error

Discussion

@@ -1359,20 +1255,16 @@ localized string uses the UTF-8 character encoding.

ppdLocalizeAttr

Localize an attribute.

-ppd_attr_t *ppdLocalizeAttr (
-    ppd_file_t *ppd,
-    const char *keyword,
-    const char *spec
-);

+ppd_attr_t *ppdLocalizeAttr(ppd_file_t *ppd, const char *keyword, const char *spec);

Parameters

-
-
ppd
-
PPD file
-
keyword
-
Main keyword
-
spec
-
Option keyword or NULL for none
-
+ + + + + + + +
ppdPPD file
keywordMain keyword
specOption keyword or NULL for none

Return Value

Localized attribute or NULL if none exists

Discussion

@@ -1383,26 +1275,20 @@ attribute exists for the current locale, the unlocalized version is returned.

Get the localized version of a cupsIPPReason attribute.

-const char *ppdLocalizeIPPReason (
-    ppd_file_t *ppd,
-    const char *reason,
-    const char *scheme,
-    char *buffer,
-    size_t bufsize
-);

+const char *ppdLocalizeIPPReason(ppd_file_t *ppd, const char *reason, const char *scheme, char *buffer, size_t bufsize);

Parameters

-
-
ppd
-
PPD file
-
reason
-
IPP reason keyword to look up
-
scheme
-
URI scheme or NULL for text
-
buffer
-
Value buffer
-
bufsize
-
Size of value buffer
-
+ + + + + + + + + + + +
ppdPPD file
reasonIPP reason keyword to look up
schemeURI scheme or NULL for text
bufferValue buffer
bufsizeSize of value buffer

Return Value

Value or NULL if not found

Discussion

@@ -1418,17 +1304,14 @@ If no value of the requested scheme can be found, NULL is returned.

Get the localized version of a marker-names attribute value.

-const char *ppdLocalizeMarkerName (
-    ppd_file_t *ppd,
-    const char *name
-);

+const char *ppdLocalizeMarkerName(ppd_file_t *ppd, const char *name);

Parameters

-
-
ppd
-
PPD file
-
name
-
Marker name to look up
-
+ + + + + +
ppdPPD file
nameMarker name to look up

Return Value

Value or NULL if not found

Discussion

@@ -1438,62 +1321,50 @@ name can be found, NULL is returned.

ppdMarkDefaults

-

Choice pointer

+

Mark all default options in the PPD file.

-void ppdMarkDefaults (
-    ppd_file_t *ppd
-);

+void ppdMarkDefaults(ppd_file_t *ppd);

Parameters

-
-
ppd
-
PPD file record
-
-

Return Value

-

Mark all default options in the PPD file.

+ + + +
ppdPPD file record

ppdMarkOption

Mark an option in a PPD file and return the number of conflicts.

-int ppdMarkOption (
-    ppd_file_t *ppd,
-    const char *option,
-    const char *choice
-);

+int ppdMarkOption(ppd_file_t *ppd, const char *option, const char *choice);

Parameters

-
-
ppd
-
PPD file record
-
option
-
Keyword
-
choice
-
Option name
-
+ + + + + + + +
ppdPPD file record
optionKeyword
choiceOption name

Return Value

Number of conflicts

 CUPS 1.2/macOS 10.5 ppdNextCustomParam

Return the next parameter for a custom option.

-ppd_cparam_t *ppdNextCustomParam (
-    ppd_coption_t *opt
-);

+ppd_cparam_t *ppdNextCustomParam(ppd_coption_t *opt);

Parameters

-
-
opt
-
Custom option
-
+ + + +
optCustom option

Return Value

Custom parameter or NULL

 CUPS 1.2/macOS 10.5 ppdNextOption

Return the next option in the PPD file.

-ppd_option_t *ppdNextOption (
-    ppd_file_t *ppd
-);

+ppd_option_t *ppdNextOption(ppd_file_t *ppd);

Parameters

-
-
ppd
-
PPD file
-
+ + + +
ppdPPD file

Return Value

Next option or NULL

Discussion

@@ -1503,52 +1374,42 @@ int ppdMarkOption (

ppdPageLength

Get the page length for the given size.

-float ppdPageLength (
-    ppd_file_t *ppd,
-    const char *name
-);

+float ppdPageLength(ppd_file_t *ppd, const char *name);

Parameters

-
-
ppd
-
PPD file
-
name
-
Size name
-
+ + + + + +
ppdPPD file
nameSize name

Return Value

Length of page in points or 0.0

ppdPageSize

Get the page size record for the named size.

-ppd_size_t *ppdPageSize (
-    ppd_file_t *ppd,
-    const char *name
-);

+ppd_size_t *ppdPageSize(ppd_file_t *ppd, const char *name);

Parameters

-
-
ppd
-
PPD file record
-
name
-
Size name
-
+ + + + + +
ppdPPD file record
nameSize name

Return Value

Size record for page or NULL

 CUPS 1.4/macOS 10.6 ppdPageSizeLimits

Return the custom page size limits.

-int ppdPageSizeLimits (
-    ppd_file_t *ppd,
-    ppd_size_t *minimum,
-    ppd_size_t *maximum
-);

+int ppdPageSizeLimits(ppd_file_t *ppd, ppd_size_t *minimum, ppd_size_t *maximum);

Parameters

-
-
ppd
-
PPD file record
-
minimum
-
Minimum custom size
-
maximum
-
Maximum custom size
-
+ + + + + + + +
ppdPPD file record
minimumMinimum custom size
maximumMaximum custom size

Return Value

1 if custom sizes are supported, 0 otherwise

Discussion

@@ -1562,17 +1423,14 @@ If the specified PPD file does not support custom page sizes, both

ppdPageWidth

Get the page width for the given size.

-float ppdPageWidth (
-    ppd_file_t *ppd,
-    const char *name
-);

+float ppdPageWidth(ppd_file_t *ppd, const char *name);

Parameters

-
-
ppd
-
PPD file record
-
name
-
Size name
-
+ + + + + +
ppdPPD file record
nameSize name

Return Value

Width of page in points or 0.0

Data Types

@@ -1681,16 +1539,16 @@ typedef enum ppd_ui_e ppd_ui_t;     char *value;
};

Members

-
-
name[PPD_MAX_NAME]
-
Name of attribute (cupsXYZ)
-
spec[PPD_MAX_NAME]
-
Specifier string, if any
-
text[PPD_MAX_TEXT]
-
Human-readable text, if any
-
value
-
Value string
-
+ + + + + + + + + +
name[PPD_MAX_NAME] Name of attribute (cupsXYZ)
spec[PPD_MAX_NAME] Specifier string, if any
text[PPD_MAX_TEXT] Human-readable text, if any
value Value string

ppd_choice_s

Option choices

struct ppd_choice_s {
@@ -1701,18 +1559,18 @@ typedef enum ppd_ui_e ppd_ui_t;     char text[PPD_MAX_TEXT];
};

Members

-
-
choice[PPD_MAX_NAME]
-
Computer-readable option name
-
code
-
Code to send for this option
-
marked
-
0 if not selected, 1 otherwise
-
option
-
Pointer to parent option structure
-
text[PPD_MAX_TEXT]
-
Human-readable option name
-
+ + + + + + + + + + + +
choice[PPD_MAX_NAME] Computer-readable option name
code Code to send for this option
marked 0 if not selected, 1 otherwise
option Pointer to parent option structure
text[PPD_MAX_TEXT] Human-readable option name

ppd_const_s

Constraints

struct ppd_const_s {
@@ -1722,16 +1580,16 @@ typedef enum ppd_ui_e ppd_ui_t;     char option2[PPD_MAX_NAME];
};

Members

-
-
choice1[PPD_MAX_NAME]
-
First option/choice (blank for all)
-
choice2[PPD_MAX_NAME]
-
Second option/choice (blank for all)
-
option1[PPD_MAX_NAME]
-
First keyword
-
option2[PPD_MAX_NAME]
-
Second keyword
-
+ + + + + + + + + +
choice1[PPD_MAX_NAME] First option/choice (blank for all)
choice2[PPD_MAX_NAME] Second option/choice (blank for all)
option1[PPD_MAX_NAME] First keyword
option2[PPD_MAX_NAME] Second keyword

 CUPS 1.2/macOS 10.5 ppd_coption_s

Custom Option

struct ppd_coption_s {
@@ -1741,16 +1599,16 @@ typedef enum ppd_ui_e ppd_ui_t;     cups_array_t *params;
};

Members

-
-
keyword[PPD_MAX_NAME]
-
Name of option that is being extended...
-
marked
-
Extended option is marked
-
option
-
Option that is being extended...
-
params
-
Parameters
-
+ + + + + + + + + +
keyword[PPD_MAX_NAME] Name of option that is being extended...
marked Extended option is marked
option Option that is being extended...
params Parameters

 CUPS 1.2/macOS 10.5 ppd_cparam_s

Custom Parameter

struct ppd_cparam_s {
@@ -1762,20 +1620,20 @@ typedef enum ppd_ui_e ppd_ui_t;     ppd_cptype_t type;
};

Members

-
-
current
-
Current value
-
maximum
-
Maximum value
-
name[PPD_MAX_NAME]
-
Parameter name
-
order
-
Order (0 to N)
-
text[PPD_MAX_TEXT]
-
Human-readable text
-
type
-
Parameter type
-
+ + + + + + + + + + + + + +
current Current value
maximum Maximum value
name[PPD_MAX_NAME] Parameter name
order Order (0 to N)
text[PPD_MAX_TEXT] Human-readable text
type Parameter type

ppd_emul_s

Emulators

struct ppd_emul_s {
@@ -1784,14 +1642,14 @@ typedef enum ppd_ui_e ppd_ui_t;     char *stop;
};

Members

-
-
name[PPD_MAX_NAME]
-
Emulator name
-
start
-
Code to switch to this emulation
-
stop
-
Code to stop this emulation
-
+ + + + + + + +
name[PPD_MAX_NAME] Emulator name
start Code to switch to this emulation
stop Code to stop this emulation

ppd_file_s

PPD File

struct ppd_file_s {
@@ -1839,92 +1697,92 @@ typedef enum ppd_ui_e ppd_ui_t;     int variable_sizes;
};

Members

-
-
accurate_screens
-
1 = supports accurate screens, 0 = not
-
color_device
-
1 = color device, 0 = grayscale
-
colorspace
-
Default colorspace
-
consts
-
UI/Non-UI constraints
-
contone_only
-
1 = continuous tone only, 0 = not
-
custom_margins[4]
-
Margins around page
-
custom_max[2]
-
Maximum variable page size
-
custom_min[2]
-
Minimum variable page size
-
emulations
-
Emulations and the code to invoke them
-
filters
-
Filter strings...
-
flip_duplex  DEPRECATED 
-
1 = Flip page for back sides
-
fonts
-
Pre-loaded fonts
-
groups
-
UI groups
-
jcl_begin
-
Start JCL commands
-
jcl_end
-
End JCL commands
-
jcl_ps
-
Enter PostScript interpreter
-
landscape
-
-90 or 90
-
lang_encoding
-
Language encoding
-
lang_version
-
Language version (English, Spanish, etc.)
-
language_level
-
Language level of device
-
manual_copies
-
1 = Copies done manually, 0 = hardware
-
manufacturer
-
Manufacturer name
-
model_number
-
Device-specific model number
-
modelname
-
Model name (general)
-
nickname
-
Nickname (specific)
-
num_consts
-
Number of UI/Non-UI constraints
-
num_emulations
-
Number of emulations supported
-
num_filters
-
Number of filters
-
num_fonts
-
Number of pre-loaded fonts
-
num_groups
-
Number of UI groups
-
num_profiles  DEPRECATED 
-
Number of sRGB color profiles
-
num_sizes
-
Number of page sizes
-
patches
-
Patch commands to be sent to printer
-
pcfilename  CUPS 1.1.19/macOS 10.3 
-
PCFileName string
-
product
-
Product name (from PS RIP/interpreter)
-
profiles  DEPRECATED 
-
sRGB color profiles
-
protocols  CUPS 1.1.19/macOS 10.3 
-
Protocols (BCP, TBCP) string
-
shortnickname
-
Short version of nickname
-
sizes
-
Page sizes
-
throughput
-
Pages per minute
-
ttrasterizer
-
Truetype rasterizer
-
variable_sizes
-
1 = supports variable sizes, 0 = doesn't
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
accurate_screens 1 = supports accurate screens, 0 = not
color_device 1 = color device, 0 = grayscale
colorspace Default colorspace
consts UI/Non-UI constraints
contone_only 1 = continuous tone only, 0 = not
custom_margins[4] Margins around page
custom_max[2] Maximum variable page size
custom_min[2] Minimum variable page size
emulations Emulations and the code to invoke them
filters Filter strings...
flip_duplex  DEPRECATED 1 = Flip page for back sides
fonts Pre-loaded fonts
groups UI groups
jcl_begin Start JCL commands
jcl_end End JCL commands
jcl_ps Enter PostScript interpreter
landscape -90 or 90
lang_encoding Language encoding
lang_version Language version (English, Spanish, etc.)
language_level Language level of device
manual_copies 1 = Copies done manually, 0 = hardware
manufacturer Manufacturer name
model_number Device-specific model number
modelname Model name (general)
nickname Nickname (specific)
num_consts Number of UI/Non-UI constraints
num_emulations Number of emulations supported
num_filters Number of filters
num_fonts Number of pre-loaded fonts
num_groups Number of UI groups
num_profiles  DEPRECATED Number of sRGB color profiles
num_sizes Number of page sizes
patches Patch commands to be sent to printer
pcfilename  CUPS 1.1.19/macOS 10.3 PCFileName string
product Product name (from PS RIP/interpreter)
profiles  DEPRECATED sRGB color profiles
protocols  CUPS 1.1.19/macOS 10.3 Protocols (BCP, TBCP) string
shortnickname Short version of nickname
sizes Page sizes
throughput Pages per minute
ttrasterizer Truetype rasterizer
variable_sizes 1 = supports variable sizes, 0 = doesn't

ppd_group_s

Groups

struct ppd_group_s {
@@ -1936,20 +1794,20 @@ typedef enum ppd_ui_e ppd_ui_t;     struct ppd_group_s *subgroups;
};

Members

-
-
PPD_MAX_NAME]
-
Human-readable group name
-
name[PPD_MAX_NAME]  CUPS 1.1.18/macOS 10.3 
-
Group name
-
num_options
-
Number of options
-
num_subgroups
-
Number of sub-groups
-
options
-
Options
-
subgroups
-
Sub-groups (max depth = 1)
-
+ + + + + + + + + + + + + +
PPD_MAX_NAME] Human-readable group name
name[PPD_MAX_NAME]  CUPS 1.1.18/macOS 10.3 Group name
num_options Number of options
num_subgroups Number of sub-groups
options Options
subgroups Sub-groups (max depth = 1)

ppd_option_s

Options

struct ppd_option_s {
@@ -1964,26 +1822,26 @@ typedef enum ppd_ui_e ppd_ui_t;     ppd_ui_t ui;
};

Members

-
-
choices
-
Option choices
-
conflicted
-
0 if no conflicts exist, 1 otherwise
-
defchoice[PPD_MAX_NAME]
-
Default option choice
-
keyword[PPD_MAX_NAME]
-
Option keyword name ("PageSize", etc.)
-
num_choices
-
Number of option choices
-
order
-
Order number
-
section
-
Section for command
-
text[PPD_MAX_TEXT]
-
Human-readable text
-
ui
-
Type of UI option
-
+ + + + + + + + + + + + + + + + + + + +
choices Option choices
conflicted 0 if no conflicts exist, 1 otherwise
defchoice[PPD_MAX_NAME] Default option choice
keyword[PPD_MAX_NAME] Option keyword name ("PageSize", etc.)
num_choices Number of option choices
order Order number
section Section for command
text[PPD_MAX_TEXT] Human-readable text
ui Type of UI option

ppd_profile_s

sRGB Color Profiles

struct ppd_profile_s {
@@ -1994,18 +1852,18 @@ typedef enum ppd_ui_e ppd_ui_t;     char resolution[PPD_MAX_NAME];
};

Members

-
-
density
-
Ink density to use
-
gamma
-
Gamma correction to use
-
matrix[3][3]
-
Transform matrix
-
media_type[PPD_MAX_NAME]
-
Media type or "-"
-
resolution[PPD_MAX_NAME]
-
Resolution or "-"
-
+ + + + + + + + + + + +
density Ink density to use
gamma Gamma correction to use
matrix[3][3] Transform matrix
media_type[PPD_MAX_NAME] Media type or "-"
resolution[PPD_MAX_NAME] Resolution or "-"

ppd_size_s

Page Sizes

struct ppd_size_s {
@@ -2019,24 +1877,24 @@ typedef enum ppd_ui_e ppd_ui_t;     float width;
};

Members

-
-
bottom
-
Bottom printable margin in points
-
left
-
Left printable margin in points
-
length
-
Length of media in points
-
marked
-
Page size selected?
-
name[PPD_MAX_NAME]
-
Media size option
-
right
-
Right printable margin in points
-
top
-
Top printable margin in points
-
width
-
Width of media in points
-
+ + + + + + + + + + + + + + + + + +
bottom Bottom printable margin in points
left Left printable margin in points
length Length of media in points
marked Page size selected?
name[PPD_MAX_NAME] Media size option
right Right printable margin in points
top Top printable margin in points
width Width of media in points

Unions

 CUPS 1.2/macOS 10.5 ppd_cplimit_u

Custom Parameter Limit

@@ -2051,24 +1909,24 @@ typedef enum ppd_ui_e ppd_ui_t;     int custom_string;
};

Members

-
-
custom_curve
-
Gamma value
-
custom_int
-
Integer value
-
custom_invcurve
-
Gamma value
-
custom_passcode
-
Passcode length
-
custom_password
-
Password length
-
custom_points
-
Measurement value
-
custom_real
-
Real value
-
custom_string
-
String length
-
+ + + + + + + + + + + + + + + + + +
custom_curve Gamma value
custom_int Integer value
custom_invcurve Gamma value
custom_passcode Passcode length
custom_password Password length
custom_points Measurement value
custom_real Real value
custom_string String length

 CUPS 1.2/macOS 10.5 ppd_cpvalue_u

Custom Parameter Value

union ppd_cpvalue_u {
@@ -2082,132 +1940,91 @@ typedef enum ppd_ui_e ppd_ui_t;     char *custom_string;
};

Members

-
-
custom_curve
-
Gamma value
-
custom_int
-
Integer value
-
custom_invcurve
-
Gamma value
-
custom_passcode
-
Passcode value
-
custom_password
-
Password value
-
custom_points
-
Measurement value
-
custom_real
-
Real value
-
custom_string
-
String value
-
+ + + + + + + + + + + + + + + + + +
custom_curve Gamma value
custom_int Integer value
custom_invcurve Gamma value
custom_passcode Passcode value
custom_password Password value
custom_points Measurement value
custom_real Real value
custom_string String value

Constants

 CUPS 1.1.19/macOS 10.3 ppd_conform_e

Conformance Levels

Constants

-
-
PPD_CONFORM_RELAXED
-
Relax whitespace and control char
-
PPD_CONFORM_STRICT
-
Require strict conformance
-
+ + + +
PPD_CONFORM_RELAXED Relax whitespace and control char
PPD_CONFORM_STRICT Require strict conformance

ppd_cs_e

Colorspaces

Constants

-
-
PPD_CS_CMY
-
CMY colorspace
-
PPD_CS_CMYK
-
CMYK colorspace
-
PPD_CS_GRAY
-
Grayscale colorspace
-
PPD_CS_N
-
DeviceN colorspace
-
PPD_CS_RGB
-
RGB colorspace
-
PPD_CS_RGBK
-
RGBK (K = gray) colorspace
-
+ + + + + + + +
PPD_CS_CMY CMY colorspace
PPD_CS_CMYK CMYK colorspace
PPD_CS_GRAY Grayscale colorspace
PPD_CS_N DeviceN colorspace
PPD_CS_RGB RGB colorspace
PPD_CS_RGBK RGBK (K = gray) colorspace

ppd_section_e

Order dependency sections

Constants

-
-
PPD_ORDER_ANY
-
Option code can be anywhere in the file
-
PPD_ORDER_DOCUMENT
-
... must be in the DocumentSetup section
-
PPD_ORDER_EXIT
-
... must be sent prior to the document
-
PPD_ORDER_JCL
-
... must be sent as a JCL command
-
PPD_ORDER_PAGE
-
... must be in the PageSetup section
-
PPD_ORDER_PROLOG
-
... must be in the Prolog section
-
+ + + + + + + +
PPD_ORDER_ANY Option code can be anywhere in the file
PPD_ORDER_DOCUMENT ... must be in the DocumentSetup section
PPD_ORDER_EXIT ... must be sent prior to the document
PPD_ORDER_JCL ... must be sent as a JCL command
PPD_ORDER_PAGE ... must be in the PageSetup section
PPD_ORDER_PROLOG ... must be in the Prolog section

 CUPS 1.1.19/macOS 10.3 ppd_status_e

Status Codes

Constants

-
-
PPD_ALLOC_ERROR
-
Memory allocation error
-
PPD_BAD_CUSTOM_PARAM
-
Bad custom parameter
-
PPD_BAD_OPEN_GROUP
-
Bad OpenGroup
-
PPD_BAD_OPEN_UI
-
Bad OpenUI/JCLOpenUI
-
PPD_BAD_ORDER_DEPENDENCY
-
Bad OrderDependency
-
PPD_BAD_UI_CONSTRAINTS
-
Bad UIConstraints
-
PPD_BAD_VALUE
-
Bad value string
-
PPD_FILE_OPEN_ERROR
-
Unable to open PPD file
-
PPD_ILLEGAL_CHARACTER
-
Illegal control character
-
PPD_ILLEGAL_MAIN_KEYWORD
-
Illegal main keyword string
-
PPD_ILLEGAL_OPTION_KEYWORD
-
Illegal option keyword string
-
PPD_ILLEGAL_TRANSLATION
-
Illegal translation string
-
PPD_ILLEGAL_WHITESPACE
-
Illegal whitespace character
-
PPD_INTERNAL_ERROR
-
Internal error
-
PPD_LINE_TOO_LONG
-
Line longer than 255 chars
-
PPD_MISSING_ASTERISK
-
Missing asterisk in column 0
-
PPD_MISSING_CLOSE_GROUP
-
Missing CloseGroup
-
PPD_MISSING_OPTION_KEYWORD
-
Missing option keyword
-
PPD_MISSING_PPDADOBE4
-
Missing PPD-Adobe-4.x header
-
PPD_MISSING_VALUE
-
Missing value string
-
PPD_NESTED_OPEN_GROUP
-
OpenGroup without a CloseGroup first
-
PPD_NESTED_OPEN_UI
-
OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
-
PPD_NULL_FILE
-
NULL PPD file pointer
-
PPD_OK
-
OK
-
+ + + + + + + + + + + + + + + + + + + + + + + + + +
PPD_ALLOC_ERROR Memory allocation error
PPD_BAD_CUSTOM_PARAM Bad custom parameter
PPD_BAD_OPEN_GROUP Bad OpenGroup
PPD_BAD_OPEN_UI Bad OpenUI/JCLOpenUI
PPD_BAD_ORDER_DEPENDENCY Bad OrderDependency
PPD_BAD_UI_CONSTRAINTS Bad UIConstraints
PPD_BAD_VALUE Bad value string
PPD_FILE_OPEN_ERROR Unable to open PPD file
PPD_ILLEGAL_CHARACTER Illegal control character
PPD_ILLEGAL_MAIN_KEYWORD Illegal main keyword string
PPD_ILLEGAL_OPTION_KEYWORD Illegal option keyword string
PPD_ILLEGAL_TRANSLATION Illegal translation string
PPD_ILLEGAL_WHITESPACE Illegal whitespace character
PPD_INTERNAL_ERROR Internal error
PPD_LINE_TOO_LONG Line longer than 255 chars
PPD_MISSING_ASTERISK Missing asterisk in column 0
PPD_MISSING_CLOSE_GROUP Missing CloseGroup
PPD_MISSING_OPTION_KEYWORD Missing option keyword
PPD_MISSING_PPDADOBE4 Missing PPD-Adobe-4.x header
PPD_MISSING_VALUE Missing value string
PPD_NESTED_OPEN_GROUP OpenGroup without a CloseGroup first
PPD_NESTED_OPEN_UI OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first
PPD_NULL_FILE NULL PPD file pointer
PPD_OK OK

ppd_ui_e

UI Types

Constants

-
-
PPD_UI_BOOLEAN
-
True or False option
-
PPD_UI_PICKMANY
-
Pick zero or more from a list
-
PPD_UI_PICKONE
-
Pick one from a list
-
+ + + + +
PPD_UI_BOOLEAN True or False option
PPD_UI_PICKMANY Pick zero or more from a list
PPD_UI_PICKONE Pick one from a list
diff --git a/doc/help/api-raster.html b/doc/help/api-raster.html index f3d7253f0..39b91dab3 100644 --- a/doc/help/api-raster.html +++ b/doc/help/api-raster.html @@ -605,49 +605,38 @@ the memory used to read the raster file:

Functions

cupsRasterClose

-

+

Close a raster stream.

-void cupsRasterClose (
-    cups_raster_t *r
-);

+void cupsRasterClose(cups_raster_t *r);

Parameters

-
-
r
-
Stream to close
-
-

Return Value

-

Close a raster stream.

+ + + +
rStream to close
+

Discussion

The file descriptor associated with the raster stream must be closed separately as needed.

 CUPS 2.2/macOS 10.12 cupsRasterInitPWGHeader

Initialize a page header for PWG Raster output.

-int cupsRasterInitPWGHeader (
-    cups_page_header2_t *h,
-    pwg_media_t *media,
-    const char *type,
-    int xdpi,
-    int ydpi,
-    const char *sides,
-    const char *sheet_back
-);

+int cupsRasterInitPWGHeader(cups_page_header2_t *h, pwg_media_t *media, const char *type, int xdpi, int ydpi, const char *sides, const char *sheet_back);

Parameters

-
-
h
-
Page header
-
media
-
PWG media information
-
type
-
PWG raster type string
-
xdpi
-
Cross-feed direction (horizontal) resolution
-
ydpi
-
Feed direction (vertical) resolution
-
sides
-
IPP "sides" option value
-
sheet_back
-
Transform for back side or NULL for none
-
+ + + + + + + + + + + + + + + +
hPage header
mediaPWG media information
typePWG raster type string
xdpiCross-feed direction (horizontal) resolution
ydpiFeed direction (vertical) resolution
sidesIPP "sides" option value
sheet_backTransform for back side or NULL for none

Return Value

1 on success, 0 on failure

Discussion

@@ -666,26 +655,20 @@ to apply for the back side of a page. Pass NULL for the front side

 CUPS 1.2/macOS 10.5 cupsRasterInterpretPPD

Interpret PPD commands to create a page header.

-int cupsRasterInterpretPPD (
-    cups_page_header2_t *h,
-    ppd_file_t *ppd,
-    int num_options,
-    cups_option_t *options,
-    cups_interpret_cb_t func
-);

+int cupsRasterInterpretPPD(cups_page_header2_t *h, ppd_file_t *ppd, int num_options, cups_option_t *options, cups_interpret_cb_t func);

Parameters

-
-
h
-
Page header to create
-
ppd
-
PPD file
-
num_options
-
Number of options
-
options
-
Options
-
func
-
Optional page header callback (NULL for none)
-
+ + + + + + + + + + + +
hPage header to create
ppdPPD file
num_optionsNumber of options
optionsOptions
funcOptional page header callback (NULL for none)

Return Value

0 on success, -1 on failure

Discussion

@@ -717,20 +700,17 @@ are supported.

cupsRasterOpen

Open a raster stream using a file descriptor.

-cups_raster_t *cupsRasterOpen (
-    int fd,
-    cups_mode_t mode
-);

+cups_raster_t *cupsRasterOpen(int fd, cups_mode_t mode);

Parameters

-
-
fd
-
File descriptor
-
mode
-
Mode - CUPS_RASTER_READ, + + + + + +
fdFile descriptor
modeMode - CUPS_RASTER_READ, CUPS_RASTER_WRITE, CUPS_RASTER_WRITE_COMPRESSED, -or CUPS_RASTER_WRITE_PWG - +or CUPS_RASTER_WRITE_PWG

Return Value

New stream

Discussion

@@ -746,23 +726,19 @@ be used - compressed and PWG output is generally 25-50% smaller but adds a

cupsRasterOpenIO

Open a raster stream using a callback function.

-cups_raster_t *cupsRasterOpenIO (
-    cups_raster_iocb_t iocb,
-    void *ctx,
-    cups_mode_t mode
-);

+cups_raster_t *cupsRasterOpenIO(cups_raster_iocb_t iocb, void *ctx, cups_mode_t mode);

Parameters

-
-
iocb
-
Read/write callback
-
ctx
-
Context pointer for callback
-
mode
-
Mode - CUPS_RASTER_READ, + + + + + + + +
iocbRead/write callback
ctxContext pointer for callback
modeMode - CUPS_RASTER_READ, CUPS_RASTER_WRITE, CUPS_RASTER_WRITE_COMPRESSED, -or CUPS_RASTER_WRITE_PWG - +or CUPS_RASTER_WRITE_PWG

Return Value

New stream

Discussion

@@ -777,17 +753,14 @@ be used - compressed and PWG output is generally 25-50% smaller but adds a

Read a raster page header and store it in a version 1 page header structure.

-unsigned cupsRasterReadHeader (
-    cups_raster_t *r,
-    cups_page_header_t *h
-);

+unsigned cupsRasterReadHeader(cups_raster_t *r, cups_page_header_t *h);

Parameters

-
-
r
-
Raster stream
-
h
-
Pointer to header data
-
+ + + + + +
rRaster stream
hPointer to header data

Return Value

1 on success, 0 on failure/end-of-file

Discussion

@@ -802,36 +775,29 @@ page headers and copying only the version 1 data into the provided buffer.

Read a raster page header and store it in a version 2 page header structure.

-unsigned cupsRasterReadHeader2 (
-    cups_raster_t *r,
-    cups_page_header2_t *h
-);

+unsigned cupsRasterReadHeader2(cups_raster_t *r, cups_page_header2_t *h);

Parameters

-
-
r
-
Raster stream
-
h
-
Pointer to header data
-
+ + + + + +
rRaster stream
hPointer to header data

Return Value

1 on success, 0 on failure/end-of-file

cupsRasterReadPixels

Read raster pixels.

-unsigned cupsRasterReadPixels (
-    cups_raster_t *r,
-    unsigned char *p,
-    unsigned len
-);

+unsigned cupsRasterReadPixels(cups_raster_t *r, unsigned char *p, unsigned len);

Parameters

-
-
r
-
Raster stream
-
p
-
Pointer to pixel buffer
-
len
-
Number of bytes to read
-
+ + + + + + + +
rRaster stream
pPointer to pixel buffer
lenNumber of bytes to read

Return Value

Number of bytes read

Discussion

@@ -842,17 +808,14 @@ the line buffer and as the number of bytes to read.

Write a raster page header from a version 1 page header structure.

-unsigned cupsRasterWriteHeader (
-    cups_raster_t *r,
-    cups_page_header_t *h
-);

+unsigned cupsRasterWriteHeader(cups_raster_t *r, cups_page_header_t *h);

Parameters

-
-
r
-
Raster stream
-
h
-
Raster page header
-
+ + + + + +
rRaster stream
hRaster page header

Return Value

1 on success, 0 on failure

Discussion

@@ -863,17 +826,14 @@ unsigned cupsRasterWriteHeader (

Write a raster page header from a version 2 page header structure.

-unsigned cupsRasterWriteHeader2 (
-    cups_raster_t *r,
-    cups_page_header2_t *h
-);

+unsigned cupsRasterWriteHeader2(cups_raster_t *r, cups_page_header2_t *h);

Parameters

-
-
r
-
Raster stream
-
h
-
Raster page header
-
+ + + + + +
rRaster stream
hRaster page header

Return Value

1 on success, 0 on failure

Discussion

@@ -883,20 +843,16 @@ unsigned cupsRasterWriteHeader2 (

cupsRasterWritePixels

Write raster pixels.

-unsigned cupsRasterWritePixels (
-    cups_raster_t *r,
-    unsigned char *p,
-    unsigned len
-);

+unsigned cupsRasterWritePixels(cups_raster_t *r, unsigned char *p, unsigned len);

Parameters

-
-
r
-
Raster stream
-
p
-
Bytes to write
-
len
-
Number of bytes to write
-
+ + + + + + + +
rRaster stream
pBytes to write
lenNumber of bytes to write

Return Value

Number of bytes written

Discussion

@@ -1029,109 +985,109 @@ typedef struct _cups_raster_s cups_raster_t;     unsigned cupsWidth;
};

Members

-
-
AdvanceDistance
-
AdvanceDistance value in points
-
AdvanceMedia
-
AdvanceMedia value (cups_adv_t)
-
Collate
-
Collated copies value
-
CutMedia
-
CutMedia value (cups_cut_t)
-
Duplex
-
Duplexed (double-sided) value
-
HWResolution[2]
-
Resolution in dots-per-inch
-
ImagingBoundingBox[4]
-
Pixel region that is painted (points, left, bottom, right, top)
-
InsertSheet
-
InsertSheet value
-
Jog
-
Jog value (cups_jog_t)
-
LeadingEdge
-
LeadingEdge value (cups_edge_t)
-
ManualFeed
-
ManualFeed value
-
Margins[2]
-
Lower-lefthand margins in points
-
MediaClass[64]
-
MediaClass string
-
MediaColor[64]
-
MediaColor string
-
MediaPosition
-
MediaPosition value
-
MediaType[64]
-
MediaType string
-
MediaWeight
-
MediaWeight value in grams/m^2
-
MirrorPrint
-
MirrorPrint value
-
NegativePrint
-
NegativePrint value
-
NumCopies
-
Number of copies to produce
-
Orientation
-
Orientation value (cups_orient_t)
-
OutputFaceUp
-
OutputFaceUp value
-
OutputType[64]
-
OutputType string
-
PageSize[2]
-
Width and length of page in points
-
Separations
-
Separations value
-
TraySwitch
-
TraySwitch value
-
Tumble
-
Tumble value
-
cupsBitsPerColor
-
Number of bits for each color
-
cupsBitsPerPixel
-
Number of bits for each pixel
-
cupsBorderlessScalingFactor  CUPS 1.2/macOS 10.5 
-
Scaling that was applied to page data
-
cupsBytesPerLine
-
Number of bytes per line
-
cupsColorOrder
-
Order of colors
-
cupsColorSpace
-
True colorspace
-
cupsCompression
-
Device compression to use
-
cupsHeight
-
Height of page image in pixels
-
cupsImagingBBox[4]  CUPS 1.2/macOS 10.5 
-
Floating point ImagingBoundingBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AdvanceDistance AdvanceDistance value in points
AdvanceMedia AdvanceMedia value (cups_adv_t)
Collate Collated copies value
CutMedia CutMedia value (cups_cut_t)
Duplex Duplexed (double-sided) value
HWResolution[2] Resolution in dots-per-inch
ImagingBoundingBox[4] Pixel region that is painted (points, left, bottom, right, top)
InsertSheet InsertSheet value
Jog Jog value (cups_jog_t)
LeadingEdge LeadingEdge value (cups_edge_t)
ManualFeed ManualFeed value
Margins[2] Lower-lefthand margins in points
MediaClass[64] MediaClass string
MediaColor[64] MediaColor string
MediaPosition MediaPosition value
MediaType[64] MediaType string
MediaWeight MediaWeight value in grams/m^2
MirrorPrint MirrorPrint value
NegativePrint NegativePrint value
NumCopies Number of copies to produce
Orientation Orientation value (cups_orient_t)
OutputFaceUp OutputFaceUp value
OutputType[64] OutputType string
PageSize[2] Width and length of page in points
Separations Separations value
TraySwitch TraySwitch value
Tumble Tumble value
cupsBitsPerColor Number of bits for each color
cupsBitsPerPixel Number of bits for each pixel
cupsBorderlessScalingFactor  CUPS 1.2/macOS 10.5 Scaling that was applied to page data
cupsBytesPerLine Number of bytes per line
cupsColorOrder Order of colors
cupsColorSpace True colorspace
cupsCompression Device compression to use
cupsHeight Height of page image in pixels
cupsImagingBBox[4]  CUPS 1.2/macOS 10.5 Floating point ImagingBoundingBox (scaling factor not applied, left, -bottom, right, top) -
cupsInteger[16]  CUPS 1.2/macOS 10.5 
-
User-defined integer values
-
cupsMarkerType[64]  CUPS 1.2/macOS 10.5 
-
Ink/toner type
-
cupsMediaType
-
Media type code
-
cupsNumColors  CUPS 1.2/macOS 10.5 
-
Number of color compoents
-
cupsPageSizeName[64]  CUPS 1.2/macOS 10.5 
-
PageSize name
-
cupsPageSize[2]  CUPS 1.2/macOS 10.5 
-
Floating point PageSize (scaling * -factor not applied)
-
cupsReal[16]  CUPS 1.2/macOS 10.5 
-
User-defined floating-point values
-
cupsRenderingIntent[64]  CUPS 1.2/macOS 10.5 
-
Color rendering intent
-
cupsRowCount
-
Rows per band
-
cupsRowFeed
-
Feed between bands
-
cupsRowStep
-
Spacing between lines
-
cupsString[16][64]  CUPS 1.2/macOS 10.5 
-
User-defined string values
-
cupsWidth
-
Width of page image in pixels
- +bottom, right, top)
cupsInteger[16]  CUPS 1.2/macOS 10.5 User-defined integer values
cupsMarkerType[64]  CUPS 1.2/macOS 10.5 Ink/toner type
cupsMediaType Media type code
cupsNumColors  CUPS 1.2/macOS 10.5 Number of color compoents
cupsPageSizeName[64]  CUPS 1.2/macOS 10.5 PageSize name
cupsPageSize[2]  CUPS 1.2/macOS 10.5 Floating point PageSize (scaling * +factor not applied)
cupsReal[16]  CUPS 1.2/macOS 10.5 User-defined floating-point values
cupsRenderingIntent[64]  CUPS 1.2/macOS 10.5 Color rendering intent
cupsRowCount Rows per band
cupsRowFeed Feed between bands
cupsRowStep Spacing between lines
cupsString[16][64]  CUPS 1.2/macOS 10.5 User-defined string values
cupsWidth Width of page image in pixels

 DEPRECATED cups_page_header_s

Version 1 page header

struct cups_page_header_s {
@@ -1176,296 +1132,214 @@ factor not applied)

    unsigned cupsWidth;
};

Members

-
-
AdvanceDistance
-
AdvanceDistance value in points
-
AdvanceMedia
-
AdvanceMedia value (cups_adv_t)
-
Collate
-
Collated copies value
-
CutMedia
-
CutMedia value (cups_cut_t)
-
Duplex
-
Duplexed (double-sided) value
-
HWResolution[2]
-
Resolution in dots-per-inch
-
ImagingBoundingBox[4]
-
Pixel region that is painted (points, left, bottom, right, top)
-
InsertSheet
-
InsertSheet value
-
Jog
-
Jog value (cups_jog_t)
-
LeadingEdge
-
LeadingEdge value (cups_edge_t)
-
ManualFeed
-
ManualFeed value
-
Margins[2]
-
Lower-lefthand margins in points
-
MediaClass[64]
-
MediaClass string
-
MediaColor[64]
-
MediaColor string
-
MediaPosition
-
MediaPosition value
-
MediaType[64]
-
MediaType string
-
MediaWeight
-
MediaWeight value in grams/m^2
-
MirrorPrint
-
MirrorPrint value
-
NegativePrint
-
NegativePrint value
-
NumCopies
-
Number of copies to produce
-
Orientation
-
Orientation value (cups_orient_t)
-
OutputFaceUp
-
OutputFaceUp value
-
OutputType[64]
-
OutputType string
-
PageSize[2]
-
Width and length of page in points
-
Separations
-
Separations value
-
TraySwitch
-
TraySwitch value
-
Tumble
-
Tumble value
-
cupsBitsPerColor
-
Number of bits for each color
-
cupsBitsPerPixel
-
Number of bits for each pixel
-
cupsBytesPerLine
-
Number of bytes per line
-
cupsColorOrder
-
Order of colors
-
cupsColorSpace
-
True colorspace
-
cupsCompression
-
Device compression to use
-
cupsHeight
-
Height of page image in pixels
-
cupsMediaType
-
Media type code
-
cupsRowCount
-
Rows per band
-
cupsRowFeed
-
Feed between bands
-
cupsRowStep
-
Spacing between lines
-
cupsWidth
-
Width of page image in pixels
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AdvanceDistance AdvanceDistance value in points
AdvanceMedia AdvanceMedia value (cups_adv_t)
Collate Collated copies value
CutMedia CutMedia value (cups_cut_t)
Duplex Duplexed (double-sided) value
HWResolution[2] Resolution in dots-per-inch
ImagingBoundingBox[4] Pixel region that is painted (points, left, bottom, right, top)
InsertSheet InsertSheet value
Jog Jog value (cups_jog_t)
LeadingEdge LeadingEdge value (cups_edge_t)
ManualFeed ManualFeed value
Margins[2] Lower-lefthand margins in points
MediaClass[64] MediaClass string
MediaColor[64] MediaColor string
MediaPosition MediaPosition value
MediaType[64] MediaType string
MediaWeight MediaWeight value in grams/m^2
MirrorPrint MirrorPrint value
NegativePrint NegativePrint value
NumCopies Number of copies to produce
Orientation Orientation value (cups_orient_t)
OutputFaceUp OutputFaceUp value
OutputType[64] OutputType string
PageSize[2] Width and length of page in points
Separations Separations value
TraySwitch TraySwitch value
Tumble Tumble value
cupsBitsPerColor Number of bits for each color
cupsBitsPerPixel Number of bits for each pixel
cupsBytesPerLine Number of bytes per line
cupsColorOrder Order of colors
cupsColorSpace True colorspace
cupsCompression Device compression to use
cupsHeight Height of page image in pixels
cupsMediaType Media type code
cupsRowCount Rows per band
cupsRowFeed Feed between bands
cupsRowStep Spacing between lines
cupsWidth Width of page image in pixels

Constants

cups_adv_e

AdvanceMedia attribute values

Constants

-
-
CUPS_ADVANCE_FILE
-
Advance the roll after this file
-
CUPS_ADVANCE_JOB
-
Advance the roll after this job
-
CUPS_ADVANCE_NONE
-
Never advance the roll
-
CUPS_ADVANCE_PAGE
-
Advance the roll after this page
-
CUPS_ADVANCE_SET
-
Advance the roll after this set
-
+ + + + + + +
CUPS_ADVANCE_FILE Advance the roll after this file
CUPS_ADVANCE_JOB Advance the roll after this job
CUPS_ADVANCE_NONE Never advance the roll
CUPS_ADVANCE_PAGE Advance the roll after this page
CUPS_ADVANCE_SET Advance the roll after this set

cups_bool_e

Boolean type

Constants

-
-
CUPS_FALSE
-
Logical false
-
CUPS_TRUE
-
Logical true
-
+ + + +
CUPS_FALSE Logical false
CUPS_TRUE Logical true

cups_cspace_e

cupsColorSpace attribute values

Constants

-
-
CUPS_CSPACE_ADOBERGB  CUPS 1.4.5 
-
Red, green, blue (Adobe RGB)
-
CUPS_CSPACE_CIELab  CUPS 1.1.19/macOS 10.3 
-
CIE Lab
-
CUPS_CSPACE_CIEXYZ  CUPS 1.1.19/macOS 10.3 
-
CIE XYZ
-
CUPS_CSPACE_CMY
-
Cyan, magenta, yellow (DeviceCMY)
-
CUPS_CSPACE_CMYK
-
Cyan, magenta, yellow, black (DeviceCMYK)
-
CUPS_CSPACE_DEVICE1  CUPS 1.4.5 
-
DeviceN, 1 color
-
CUPS_CSPACE_DEVICE2  CUPS 1.4.5 
-
DeviceN, 2 colors
-
CUPS_CSPACE_DEVICE3  CUPS 1.4.5 
-
DeviceN, 3 colors
-
CUPS_CSPACE_DEVICE4  CUPS 1.4.5 
-
DeviceN, 4 colors
-
CUPS_CSPACE_DEVICE5  CUPS 1.4.5 
-
DeviceN, 5 colors
-
CUPS_CSPACE_DEVICE6  CUPS 1.4.5 
-
DeviceN, 6 colors
-
CUPS_CSPACE_DEVICE7  CUPS 1.4.5 
-
DeviceN, 7 colors
-
CUPS_CSPACE_DEVICE8  CUPS 1.4.5 
-
DeviceN, 8 colors
-
CUPS_CSPACE_DEVICE9  CUPS 1.4.5 
-
DeviceN, 9 colors
-
CUPS_CSPACE_DEVICEA  CUPS 1.4.5 
-
DeviceN, 10 colors
-
CUPS_CSPACE_DEVICEB  CUPS 1.4.5 
-
DeviceN, 11 colors
-
CUPS_CSPACE_DEVICEC  CUPS 1.4.5 
-
DeviceN, 12 colors
-
CUPS_CSPACE_DEVICED  CUPS 1.4.5 
-
DeviceN, 13 colors
-
CUPS_CSPACE_DEVICEE  CUPS 1.4.5 
-
DeviceN, 14 colors
-
CUPS_CSPACE_DEVICEF  CUPS 1.4.5 
-
DeviceN, 15 colors
-
CUPS_CSPACE_GMCK  DEPRECATED 
-
Gold, magenta, yellow, black
-
CUPS_CSPACE_GMCS  DEPRECATED 
-
Gold, magenta, yellow, silver
-
CUPS_CSPACE_GOLD  DEPRECATED 
-
Gold foil
-
CUPS_CSPACE_ICC1  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 1 color
-
CUPS_CSPACE_ICC2  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 2 colors
-
CUPS_CSPACE_ICC3  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 3 colors
-
CUPS_CSPACE_ICC4  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 4 colors
-
CUPS_CSPACE_ICC5  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 5 colors
-
CUPS_CSPACE_ICC6  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 6 colors
-
CUPS_CSPACE_ICC7  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 7 colors
-
CUPS_CSPACE_ICC8  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 8 colors
-
CUPS_CSPACE_ICC9  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 9 colors
-
CUPS_CSPACE_ICCA  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 10 colors
-
CUPS_CSPACE_ICCB  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 11 colors
-
CUPS_CSPACE_ICCC  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 12 colors
-
CUPS_CSPACE_ICCD  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 13 colors
-
CUPS_CSPACE_ICCE  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 14 colors
-
CUPS_CSPACE_ICCF  CUPS 1.1.19/macOS 10.3 
-
ICC-based, 15 colors
-
CUPS_CSPACE_K
-
Black (DeviceK)
-
CUPS_CSPACE_KCMY  DEPRECATED 
-
Black, cyan, magenta, yellow
-
CUPS_CSPACE_KCMYcm  DEPRECATED 
-
Black, cyan, magenta, yellow, light-cyan, light-magenta
-
CUPS_CSPACE_RGB
-
Red, green, blue (DeviceRGB, sRGB by default)
-
CUPS_CSPACE_RGBA
-
Red, green, blue, alpha (DeviceRGB, sRGB by default)
-
CUPS_CSPACE_RGBW  CUPS 1.2/macOS 10.5 
-
Red, green, blue, white (DeviceRGB, sRGB by default)
-
CUPS_CSPACE_SILVER  DEPRECATED 
-
Silver foil
-
CUPS_CSPACE_SRGB  CUPS 1.4.5 
-
Red, green, blue (sRGB)
-
CUPS_CSPACE_SW  CUPS 1.4.5 
-
Luminance (gamma 2.2)
-
CUPS_CSPACE_W
-
Luminance (DeviceGray, gamma 2.2 by default)
-
CUPS_CSPACE_WHITE  DEPRECATED 
-
White ink (as black)
-
CUPS_CSPACE_YMC  DEPRECATED 
-
Yellow, magenta, cyan
-
CUPS_CSPACE_YMCK  DEPRECATED 
-
Yellow, magenta, cyan, black
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CUPS_CSPACE_ADOBERGB  CUPS 1.4.5  Red, green, blue (Adobe RGB)
CUPS_CSPACE_CIELab  CUPS 1.1.19/macOS 10.3  CIE Lab
CUPS_CSPACE_CIEXYZ  CUPS 1.1.19/macOS 10.3  CIE XYZ
CUPS_CSPACE_CMY Cyan, magenta, yellow (DeviceCMY)
CUPS_CSPACE_CMYK Cyan, magenta, yellow, black (DeviceCMYK)
CUPS_CSPACE_DEVICE1  CUPS 1.4.5  DeviceN, 1 color
CUPS_CSPACE_DEVICE2  CUPS 1.4.5  DeviceN, 2 colors
CUPS_CSPACE_DEVICE3  CUPS 1.4.5  DeviceN, 3 colors
CUPS_CSPACE_DEVICE4  CUPS 1.4.5  DeviceN, 4 colors
CUPS_CSPACE_DEVICE5  CUPS 1.4.5  DeviceN, 5 colors
CUPS_CSPACE_DEVICE6  CUPS 1.4.5  DeviceN, 6 colors
CUPS_CSPACE_DEVICE7  CUPS 1.4.5  DeviceN, 7 colors
CUPS_CSPACE_DEVICE8  CUPS 1.4.5  DeviceN, 8 colors
CUPS_CSPACE_DEVICE9  CUPS 1.4.5  DeviceN, 9 colors
CUPS_CSPACE_DEVICEA  CUPS 1.4.5  DeviceN, 10 colors
CUPS_CSPACE_DEVICEB  CUPS 1.4.5  DeviceN, 11 colors
CUPS_CSPACE_DEVICEC  CUPS 1.4.5  DeviceN, 12 colors
CUPS_CSPACE_DEVICED  CUPS 1.4.5  DeviceN, 13 colors
CUPS_CSPACE_DEVICEE  CUPS 1.4.5  DeviceN, 14 colors
CUPS_CSPACE_DEVICEF  CUPS 1.4.5  DeviceN, 15 colors
CUPS_CSPACE_GMCK  DEPRECATED  Gold, magenta, yellow, black
CUPS_CSPACE_GMCS  DEPRECATED  Gold, magenta, yellow, silver
CUPS_CSPACE_GOLD  DEPRECATED  Gold foil
CUPS_CSPACE_ICC1  CUPS 1.1.19/macOS 10.3  ICC-based, 1 color
CUPS_CSPACE_ICC2  CUPS 1.1.19/macOS 10.3  ICC-based, 2 colors
CUPS_CSPACE_ICC3  CUPS 1.1.19/macOS 10.3  ICC-based, 3 colors
CUPS_CSPACE_ICC4  CUPS 1.1.19/macOS 10.3  ICC-based, 4 colors
CUPS_CSPACE_ICC5  CUPS 1.1.19/macOS 10.3  ICC-based, 5 colors
CUPS_CSPACE_ICC6  CUPS 1.1.19/macOS 10.3  ICC-based, 6 colors
CUPS_CSPACE_ICC7  CUPS 1.1.19/macOS 10.3  ICC-based, 7 colors
CUPS_CSPACE_ICC8  CUPS 1.1.19/macOS 10.3  ICC-based, 8 colors
CUPS_CSPACE_ICC9  CUPS 1.1.19/macOS 10.3  ICC-based, 9 colors
CUPS_CSPACE_ICCA  CUPS 1.1.19/macOS 10.3  ICC-based, 10 colors
CUPS_CSPACE_ICCB  CUPS 1.1.19/macOS 10.3  ICC-based, 11 colors
CUPS_CSPACE_ICCC  CUPS 1.1.19/macOS 10.3  ICC-based, 12 colors
CUPS_CSPACE_ICCD  CUPS 1.1.19/macOS 10.3  ICC-based, 13 colors
CUPS_CSPACE_ICCE  CUPS 1.1.19/macOS 10.3  ICC-based, 14 colors
CUPS_CSPACE_ICCF  CUPS 1.1.19/macOS 10.3  ICC-based, 15 colors
CUPS_CSPACE_K Black (DeviceK)
CUPS_CSPACE_KCMY  DEPRECATED  Black, cyan, magenta, yellow
CUPS_CSPACE_KCMYcm  DEPRECATED  Black, cyan, magenta, yellow, light-cyan, light-magenta
CUPS_CSPACE_RGB Red, green, blue (DeviceRGB, sRGB by default)
CUPS_CSPACE_RGBA Red, green, blue, alpha (DeviceRGB, sRGB by default)
CUPS_CSPACE_RGBW  CUPS 1.2/macOS 10.5  Red, green, blue, white (DeviceRGB, sRGB by default)
CUPS_CSPACE_SILVER  DEPRECATED  Silver foil
CUPS_CSPACE_SRGB  CUPS 1.4.5  Red, green, blue (sRGB)
CUPS_CSPACE_SW  CUPS 1.4.5  Luminance (gamma 2.2)
CUPS_CSPACE_W Luminance (DeviceGray, gamma 2.2 by default)
CUPS_CSPACE_WHITE  DEPRECATED  White ink (as black)
CUPS_CSPACE_YMC  DEPRECATED  Yellow, magenta, cyan
CUPS_CSPACE_YMCK  DEPRECATED  Yellow, magenta, cyan, black

cups_cut_e

CutMedia attribute values

Constants

-
-
CUPS_CUT_FILE
-
Cut the roll after this file
-
CUPS_CUT_JOB
-
Cut the roll after this job
-
CUPS_CUT_NONE
-
Never cut the roll
-
CUPS_CUT_PAGE
-
Cut the roll after this page
-
CUPS_CUT_SET
-
Cut the roll after this set
-
+ + + + + + +
CUPS_CUT_FILE Cut the roll after this file
CUPS_CUT_JOB Cut the roll after this job
CUPS_CUT_NONE Never cut the roll
CUPS_CUT_PAGE Cut the roll after this page
CUPS_CUT_SET Cut the roll after this set

cups_edge_e

LeadingEdge attribute values

Constants

-
-
CUPS_EDGE_BOTTOM
-
Leading edge is the bottom of the page
-
CUPS_EDGE_LEFT
-
Leading edge is the left of the page
-
CUPS_EDGE_RIGHT
-
Leading edge is the right of the page
-
CUPS_EDGE_TOP
-
Leading edge is the top of the page
-
+ + + + + +
CUPS_EDGE_BOTTOM Leading edge is the bottom of the page
CUPS_EDGE_LEFT Leading edge is the left of the page
CUPS_EDGE_RIGHT Leading edge is the right of the page
CUPS_EDGE_TOP Leading edge is the top of the page

cups_jog_e

Jog attribute values

Constants

-
-
CUPS_JOG_FILE
-
Move pages after this file
-
CUPS_JOG_JOB
-
Move pages after this job
-
CUPS_JOG_NONE
-
Never move pages
-
CUPS_JOG_SET
-
Move pages after this set
-
+ + + + + +
CUPS_JOG_FILE Move pages after this file
CUPS_JOG_JOB Move pages after this job
CUPS_JOG_NONE Never move pages
CUPS_JOG_SET Move pages after this set

cups_mode_e

cupsRasterOpen modes

Constants

-
-
CUPS_RASTER_READ
-
Open stream for reading
-
CUPS_RASTER_WRITE
-
Open stream for writing
-
CUPS_RASTER_WRITE_COMPRESSED  CUPS 1.3/macOS 10.5 
-
Open stream for compressed writing
-
CUPS_RASTER_WRITE_PWG  CUPS 1.5/macOS 10.7 
-
Open stream for compressed writing in PWG Raster mode
-
+ + + + + +
CUPS_RASTER_READ Open stream for reading
CUPS_RASTER_WRITE Open stream for writing
CUPS_RASTER_WRITE_COMPRESSED  CUPS 1.3/macOS 10.5  Open stream for compressed writing
CUPS_RASTER_WRITE_PWG  CUPS 1.5/macOS 10.7  Open stream for compressed writing in PWG Raster mode

cups_order_e

cupsColorOrder attribute values

Constants

-
-
CUPS_ORDER_BANDED
-
CCC MMM YYY KKK ...
-
CUPS_ORDER_CHUNKED
-
CMYK CMYK CMYK ...
-
CUPS_ORDER_PLANAR
-
CCC ... MMM ... YYY ... KKK ...
-
+ + + + +
CUPS_ORDER_BANDED CCC MMM YYY KKK ...
CUPS_ORDER_CHUNKED CMYK CMYK CMYK ...
CUPS_ORDER_PLANAR CCC ... MMM ... YYY ... KKK ...

cups_orient_e

Orientation attribute values

Constants

-
-
CUPS_ORIENT_0
-
Don't rotate the page
-
CUPS_ORIENT_180
-
Turn the page upside down
-
CUPS_ORIENT_270
-
Rotate the page clockwise
-
CUPS_ORIENT_90
-
Rotate the page counter-clockwise
-
+ + + + + +
CUPS_ORIENT_0 Don't rotate the page
CUPS_ORIENT_180 Turn the page upside down
CUPS_ORIENT_270 Rotate the page clockwise
CUPS_ORIENT_90 Rotate the page counter-clockwise
diff --git a/doc/help/cupspm.epub b/doc/help/cupspm.epub index 51f7600fc..6a35cb7e1 100644 Binary files a/doc/help/cupspm.epub and b/doc/help/cupspm.epub differ diff --git a/doc/help/cupspm.html b/doc/help/cupspm.html index 17aeb9ad4..45610d1bf 100644 --- a/doc/help/cupspm.html +++ b/doc/help/cupspm.html @@ -124,8 +124,10 @@ span.info { white-space: nowrap; } h3 span.info, h4 span.info { + border-top-left-radius: 10px; + border-top-right-radius: 10px; float: right; - font-size: 100%; + padding: 3px 6px; } ul.code, ul.contents, ul.subcontents { list-style-type: none; @@ -141,15 +143,24 @@ ul.contents > li { ul.contents li ul.code, ul.contents li ul.subcontents { padding-left: 2em; } -div.body dl { - margin-top: 0; +table.list { + border-collapse: collapse; + width: 100%; } -div.body dt { - font-style: italic; - margin-top: 0; +table.list tr:nth-child(even) { + background: rgba(127,127,127,0.1);]n} +table.list th { + border-right: 2px solid gray; + font-family: monospace; + padding: 5px 10px 5px 2px; + text-align: right; + vertical-align: top; } -div.body dd { - margin-bottom: 0.5em; +table.list td { + padding: 5px 2px 5px 10px; + text-align: left; + vertical-align: top; + width: 80%; } h1.title { } @@ -211,22 +222,16 @@ h3.title {
  • cupsGetDestMediaCount
  • cupsGetDestMediaDefault
  • cupsGetDestWithURI
  • +
  • cupsGetDests2
  • cupsGetIntegerOption
  • cupsGetJobs2
  • cupsGetNamedDest
  • cupsGetOption
  • cupsGetPassword2
  • -
  • cupsLangDefault
  • -
  • cupsLangEncoding
  • -
  • cupsLangFlush
  • -
  • cupsLangFree
  • -
  • cupsLangGet
  • cupsLocalizeDestMedia
  • cupsLocalizeDestOption
  • cupsLocalizeDestValue
  • cupsMakeServerCredentials
  • -
  • cupsNotifySubject
  • -
  • cupsNotifyText
  • cupsParseOptions
  • cupsRemoveDest
  • cupsRemoveOption
  • @@ -234,10 +239,8 @@ h3.title {
  • cupsSetClientCertCB
  • cupsSetCredentials
  • cupsSetDefaultDest
  • -
  • cupsSetDests
  • cupsSetDests2
  • cupsSetEncryption
  • -
  • cupsSetPasswordCB
  • cupsSetPasswordCB2
  • cupsSetServer
  • cupsSetServerCertCB
  • @@ -326,8 +329,6 @@ h3.title {
  • httpReconnect2
  • httpResolveHostname
  • httpSaveCredentials
  • -
  • httpSeparate
  • -
  • httpSeparate2
  • httpSeparateURI
  • httpSetAuthString
  • httpSetCookie
  • @@ -445,7 +446,6 @@ h3.title {
  • cups_dest_t
  • cups_dinfo_t
  • cups_job_t
  • -
  • cups_lang_t
  • cups_option_t
  • cups_password_cb2_t
  • cups_ptype_t
  • @@ -471,12 +471,10 @@ h3.title {
  • ipp_res_t
  • ipp_state_t
  • ipp_t
  • -
  • ipp_uchar_t
  • Structures
  • @@ -997,23 +995,18 @@ fclose(fp);

    cupsAddDest

    Add a destination to the list of destinations.

    -int cupsAddDest (
    -    const char *name,
    -    const char *instance,
    -    int num_dests,
    -    cups_dest_t **dests
    -);

    -

    Parameters

    -
    -
    name
    -
    Destination name
    -
    instance
    -
    Instance name or NULL for none/primary
    -
    num_dests
    -
    Number of destinations
    -
    dests
    -
    Destinations
    -
    +int cupsAddDest(const char *name, const char *instance, int num_dests, cups_dest_t **dests);

    +

    Parameters

    + + + + + + + + + +
    nameDestination name
    instanceInstance name or NULL for none/primary
    num_destsNumber of destinations
    destsDestinations

    Return Value

    New number of destinations

    Discussion

    @@ -1027,26 +1020,21 @@ a copy of that destination's options.

    Use the cupsSaveDests function to save the updated list of destinations to the user's lpoptions file.

    -

     CUPS 2.2.4 cupsAddIntegerOption

    +

     CUPS 2.2.4/macOS 10.13 cupsAddIntegerOption

    Add an integer option to an option array.

    -int cupsAddIntegerOption (
    -    const char *name,
    -    int value,
    -    int num_options,
    -    cups_option_t **options
    -);

    -

    Parameters

    -
    -
    name
    -
    Name of option
    -
    value
    -
    Value of option
    -
    num_options
    -
    Number of options
    -
    options
    -
    Pointer to options
    -
    +int cupsAddIntegerOption(const char *name, int value, int num_options, cups_option_t **options);

    +

    Parameters

    + + + + + + + + + +
    nameName of option
    valueValue of option
    num_optionsNumber of options
    optionsPointer to options

    Return Value

    Number of options

    Discussion

    @@ -1057,51 +1045,43 @@ int cupsAddIntegerOption (

    cupsAddOption

    Add an option to an option array.

    -int cupsAddOption (
    -    const char *name,
    -    const char *value,
    -    int num_options,
    -    cups_option_t **options
    -);

    -

    Parameters

    -
    -
    name
    -
    Name of option
    -
    value
    -
    Value of option
    -
    num_options
    -
    Number of options
    -
    options
    -
    Pointer to options
    -
    +int cupsAddOption(const char *name, const char *value, int num_options, cups_option_t **options);

    +

    Parameters

    + + + + + + + + + +
    nameName of option
    valueValue of option
    num_optionsNumber of options
    optionsPointer to options

    Return Value

    Number of options

    Discussion

    New option arrays can be initialized simply by passing 0 for the "num_options" parameter.

    -

    cupsCancelDestJob

    -

    Include necessary headers...

    -

    -ipp_status_t cupsCancelDestJob (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    int job_id
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    job_id
    -
    Job ID
    -
    -

    Return Value

    +

     CUPS 1.6/macOS 10.8 cupsCancelDestJob

    Cancel a job on a destination.

    +

    +ipp_status_t cupsCancelDestJob(http_t *http, cups_dest_t *dest, int job_id);

    +

    Parameters

    + + + + + + + +
    httpConnection to destination
    destDestination
    job_idJob ID
    +

    Return Value

    +

    Status of cancel operation

    +

    Discussion

    The "job_id" is the number returned by cupsCreateDestJob.

    Returns IPP_STATUS_OK on success and -IPP_STATUS_ERRPR_NOT_AUTHORIZED or +IPP_STATUS_ERROR_NOT_AUTHORIZED or IPP_STATUS_ERROR_FORBIDDEN on failure.

    @@ -1109,26 +1089,20 @@ Returns IPP_STATUS_OK on success and

    Check that the option and value are supported by the destination.

    -int cupsCheckDestSupported (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    const char *option,
    -    const char *value
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    option
    -
    Option
    -
    value
    -
    Value
    -
    +int cupsCheckDestSupported(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *option, const char *value);

    +

    Parameters

    + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    optionOption
    valueValue

    Return Value

    1 if supported, 0 otherwise

    Discussion

    @@ -1138,23 +1112,18 @@ int cupsCheckDestSupported (

     CUPS 1.6/macOS 10.8 cupsCloseDestJob

    Close a job and start printing.

    -ipp_status_t cupsCloseDestJob (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *info,
    -    int job_id
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    info
    -
    Destination information
    -
    job_id
    -
    Job ID
    -
    +ipp_status_t cupsCloseDestJob(http_t *http, cups_dest_t *dest, cups_dinfo_t *info, int job_id);

    +

    Parameters

    + + + + + + + + + +
    httpConnection to destination
    destDestination
    infoDestination information
    job_idJob ID

    Return Value

    IPP status code

    Discussion

    @@ -1164,64 +1133,52 @@ on success.

     CUPS 1.6/macOS 10.8 cupsConnectDest

    -

    Connect to the server for a destination.

    -

    -http_t *cupsConnectDest (
    -    cups_dest_t *dest,
    -    unsigned flags,
    -    int msec,
    -    int *cancel,
    -    char *resource,
    -    size_t resourcesize,
    -    cups_dest_cb_t cb,
    -    void *user_data
    -);

    -

    Parameters

    -
    -
    dest
    -
    Destination
    -
    flags
    -
    Connection flags
    -
    msec
    -
    Timeout in milliseconds
    -
    cancel
    -
    Pointer to "cancel" variable
    -
    resource
    -
    Resource buffer
    -
    resourcesize
    -
    Size of resource buffer
    -
    cb
    -
    Callback function
    -
    user_data
    -
    User data pointer
    -
    -

    Return Value

    -

    Connection to server or NULL

    -

    Discussion

    -

    Connect to the destination, returning a new http_t connection object and -optionally the resource path to use for the destination. These calls will -block until a connection is made, the timeout expires, the integer pointed -to by "cancel" is non-zero, or the callback function (or block) returns 0, -The caller is responsible for calling httpClose() on the returned object. +

    Open a conection to the destination.

    +

    +http_t *cupsConnectDest(cups_dest_t *dest, unsigned flags, int msec, int *cancel, char *resource, size_t resourcesize, cups_dest_cb_t cb, void *user_data);

    +

    Parameters

    + + + + + + + + + + + + + + + + + +
    destDestination
    flagsConnection flags
    msecTimeout in milliseconds
    cancelPointer to "cancel" variable
    resourceResource buffer
    resourcesizeSize of resource buffer
    cbCallback function
    user_dataUser data pointer
    +

    Return Value

    +

    Connection to destination or NULL

    +

    Discussion

    +

    Connect to the destination, returning a new http_t connection object +and optionally the resource path to use for the destination. These calls +will block until a connection is made, the timeout expires, the integer +pointed to by "cancel" is non-zero, or the callback function (or block) +returns 0. The caller is responsible for calling httpClose on the +returned connection.

     CUPS 1.6/macOS 10.8 cupsCopyDest

    Copy a destination.

    -int cupsCopyDest (
    -    cups_dest_t *dest,
    -    int num_dests,
    -    cups_dest_t **dests
    -);

    -

    Parameters

    -
    -
    dest
    -
    Destination to copy
    -
    num_dests
    -
    Number of destinations
    -
    dests
    -
    Destination array
    -
    +int cupsCopyDest(cups_dest_t *dest, int num_dests, cups_dest_t **dests);

    +

    Parameters

    + + + + + + + +
    destDestination to copy
    num_destsNumber of destinations
    destsDestination array

    Return Value

    New number of destinations

    Discussion

    @@ -1234,44 +1191,32 @@ for calling cupsFreeDests() on the returned object(s).

    Get conflicts and resolutions for a new option/value pair.

    -int cupsCopyDestConflicts (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    int num_options,
    -    cups_option_t *options,
    -    const char *new_option,
    -    const char *new_value,
    -    int *num_conflicts,
    -    cups_option_t **conflicts,
    -    int *num_resolved,
    -    cups_option_t **resolved
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    num_options
    -
    Number of current options
    -
    options
    -
    Current options
    -
    new_option
    -
    New option
    -
    new_value
    -
    New value
    -
    num_conflicts
    -
    Number of conflicting options
    -
    conflicts
    -
    Conflicting options
    -
    num_resolved
    -
    Number of options to resolve
    -
    resolved
    -
    Resolved options
    -
    +int cupsCopyDestConflicts(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, int num_options, cups_option_t *options, const char *new_option, const char *new_value, int *num_conflicts, cups_option_t **conflicts, int *num_resolved, cups_option_t **resolved);

    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    num_optionsNumber of current options
    optionsCurrent options
    new_optionNew option
    new_valueNew value
    num_conflictsNumber of conflicting options
    conflictsConflicting options
    num_resolvedNumber of options to resolve
    resolvedResolved options

    Return Value

    1 if there is a conflict, 0 if none, -1 on error

    Discussion

    @@ -1295,17 +1240,14 @@ to 0 and NULL, respectively, then the conflict cannot be resolved.

    Get the supported values/capabilities for the destination.

    -cups_dinfo_t *cupsCopyDestInfo (
    -    http_t *http,
    -    cups_dest_t *dest
    -);

    +cups_dinfo_t *cupsCopyDestInfo(http_t *http, cups_dest_t *dest);

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    + + + + + +
    httpConnection to destination
    destDestination

    Return Value

    Destination information

    Discussion

    @@ -1316,32 +1258,24 @@ value. NULL is returned on error.

     CUPS 1.6/macOS 10.8 cupsCreateDestJob

    Create a job on a destination.

    -ipp_status_t cupsCreateDestJob (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *info,
    -    int *job_id,
    -    const char *title,
    -    int num_options,
    -    cups_option_t *options
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    info
    -
    Destination information
    -
    job_id
    -
    Job ID or 0 on error
    -
    title
    -
    Job name
    -
    num_options
    -
    Number of job options
    -
    options
    -
    Job options
    -
    +ipp_status_t cupsCreateDestJob(http_t *http, cups_dest_t *dest, cups_dinfo_t *info, int *job_id, const char *title, int num_options, cups_option_t *options);

    +

    Parameters

    + + + + + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    infoDestination information
    job_idJob ID or 0 on error
    titleJob name
    num_optionsNumber of job options
    optionsJob options

    Return Value

    IPP status code

    Discussion

    @@ -1352,20 +1286,16 @@ in the variable pointed to by "job_id".

     CUPS 1.1.20/macOS 10.4 cupsDoAuthentication

    Authenticate a request.

    -int cupsDoAuthentication (
    -    http_t *http,
    -    const char *method,
    -    const char *resource
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to server or CUPS_HTTP_DEFAULT
    -
    method
    -
    Request method ("GET", "POST", "PUT")
    -
    resource
    -
    Resource path
    -
    +int cupsDoAuthentication(http_t *http, const char *method, const char *resource);

    +

    Parameters

    + + + + + + + +
    httpConnection to server or CUPS_HTTP_DEFAULT
    methodRequest method ("GET", "POST", "PUT")
    resourceResource path

    Return Value

    0 on success, -1 on error

    Discussion

    @@ -1374,60 +1304,47 @@ status, prior to resubmitting your request.

    cupsEncodeOptions

    -

    -

    -void cupsEncodeOptions (
    -    ipp_t *ipp,
    -    int num_options,
    -    cups_option_t *options
    -);

    -

    Parameters

    -
    -
    ipp
    -
    Request to add to
    -
    num_options
    -
    Number of options
    -
    options
    -
    Options
    -
    -

    Return Value

    Encode printer options into IPP attributes.

    +

    +void cupsEncodeOptions(ipp_t *ipp, int num_options, cups_option_t *options);

    +

    Parameters

    + + + + + + + +
    ippRequest to add to
    num_optionsNumber of options
    optionsOptions
    +

    Discussion

    This function adds operation, job, and then subscription attributes, -in that order. Use the cupsEncodeOptions2() function to add attributes -for a single group. - -

    -

    cupsEncodeOptions2

    -

    Add the options in the proper groups & order...

    -

    -void cupsEncodeOptions2 (
    -    ipp_t *ipp,
    -    int num_options,
    -    cups_option_t *options,
    -    ipp_tag_t group_tag
    -);

    -

    Parameters

    -
    -
    ipp
    -
    Request to add to
    -
    num_options
    -
    Number of options
    -
    options
    -
    Options
    -
    group_tag
    -
    Group to encode
    -
    -

    Return Value

    +in that order. Use the cupsEncodeOptions2 function to add attributes +for a single group.

    +

     CUPS 1.2/macOS 10.5 cupsEncodeOptions2

    Encode printer options into IPP attributes for a group.

    +

    +void cupsEncodeOptions2(ipp_t *ipp, int num_options, cups_option_t *options, ipp_tag_t group_tag);

    +

    Parameters

    + + + + + + + + + +
    ippRequest to add to
    num_optionsNumber of options
    optionsOptions
    group_tagGroup to encode
    +

    Discussion

    This function only adds attributes for a single group. Call this -function multiple times for each group, or use cupsEncodeOptions() +function multiple times for each group, or use cupsEncodeOptions to add the standard groups.

    cupsEncryption

    Get the current encryption settings.

    -http_encryption_t cupsEncryption (void);

    +http_encryption_t cupsEncryption(void);

    Return Value

    Encryption settings

    Discussion

    @@ -1443,32 +1360,24 @@ setting to be used.

     CUPS 1.6/macOS 10.8 cupsEnumDests

    Enumerate available destinations with a callback function.

    -int cupsEnumDests (
    -    unsigned flags,
    -    int msec,
    -    int *cancel,
    -    cups_ptype_t type,
    -    cups_ptype_t mask,
    -    cups_dest_cb_t cb,
    -    void *user_data
    -);

    -

    Parameters

    -
    -
    flags
    -
    Enumeration flags
    -
    msec
    -
    Timeout in milliseconds, -1 for indefinite
    -
    cancel
    -
    Pointer to "cancel" variable
    -
    type
    -
    Printer type bits
    -
    mask
    -
    Mask for printer type bits
    -
    cb
    -
    Callback function
    -
    user_data
    -
    User data
    -
    +int cupsEnumDests(unsigned flags, int msec, int *cancel, cups_ptype_t type, cups_ptype_t mask, cups_dest_cb_t cb, void *user_data);

    +

    Parameters

    + + + + + + + + + + + + + + + +
    flagsEnumeration flags
    msecTimeout in milliseconds, -1 for indefinite
    cancelPointer to "cancel" variable
    typePrinter type bits
    maskMask for printer type bits
    cbCallback function
    user_dataUser data

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -1492,23 +1401,18 @@ destinations - it is up to the caller to suppress any duplicate destinations.

     CUPS 1.7/macOS 10.9 cupsFindDestDefault

    Find the default value(s) for the given option.

    -ipp_attribute_t *cupsFindDestDefault (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    const char *option
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    option
    -
    Option/attribute name
    -
    +ipp_attribute_t *cupsFindDestDefault(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *option);

    +

    Parameters

    + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    optionOption/attribute name

    Return Value

    Default attribute or NULL for none

    Discussion

    @@ -1522,23 +1426,18 @@ functions to inspect the default value(s) as needed.

     CUPS 1.7/macOS 10.9 cupsFindDestReady

    Find the default value(s) for the given option.

    -ipp_attribute_t *cupsFindDestReady (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    const char *option
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    option
    -
    Option/attribute name
    -
    +ipp_attribute_t *cupsFindDestReady(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *option);

    +

    Parameters

    + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    optionOption/attribute name

    Return Value

    Default attribute or NULL for none

    Discussion

    @@ -1552,23 +1451,18 @@ functions to inspect the default value(s) as needed.

     CUPS 1.7/macOS 10.9 cupsFindDestSupported

    Find the default value(s) for the given option.

    -ipp_attribute_t *cupsFindDestSupported (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    const char *option
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    option
    -
    Option/attribute name
    -
    +ipp_attribute_t *cupsFindDestSupported(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *option);

    +

    Parameters

    + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    optionOption/attribute name

    Return Value

    Default attribute or NULL for none

    Discussion

    @@ -1582,140 +1476,105 @@ functions to inspect the default value(s) as needed.

     CUPS 1.6/macOS 10.8 cupsFinishDestDocument

    Finish the current document.

    -ipp_status_t cupsFinishDestDocument (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *info
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    info
    -
    Destination information
    -
    +ipp_status_t cupsFinishDestDocument(http_t *http, cups_dest_t *dest, cups_dinfo_t *info);

    +

    Parameters

    + + + + + + + +
    httpConnection to destination
    destDestination
    infoDestination information

    Return Value

    Status of document submission

    Discussion

    Returns IPP_STATUS_OK or IPP_STATUS_OK_SUBST on success.

    -

    cupsFreeDestInfo

    -

    Find and return the attribute...

    -

    -void cupsFreeDestInfo (
    -    cups_dinfo_t *dinfo
    -);

    -

    Parameters

    -
    -
    dinfo
    -
    Destination information
    -
    -

    Return Value

    +

     CUPS 1.6/macOS 10.8 cupsFreeDestInfo

    Free destination information obtained using cupsCopyDestInfo.

    -

    cupsFreeDests

    -

    Block

    -void cupsFreeDests (
    -    int num_dests,
    -    cups_dest_t *dests
    -);

    +void cupsFreeDestInfo(cups_dinfo_t *dinfo);

    Parameters

    -
    -
    num_dests
    -
    Number of destinations
    -
    dests
    -
    Destinations
    -
    -

    Return Value

    + + + +
    dinfoDestination information
    +

    cupsFreeDests

    Free the memory used by the list of destinations.

    -

    cupsFreeJobs

    -

    Printer resource

    -void cupsFreeJobs (
    -    int num_jobs,
    -    cups_job_t *jobs
    -);

    +void cupsFreeDests(int num_dests, cups_dest_t *dests);

    Parameters

    -
    -
    num_jobs
    -
    Number of jobs
    -
    jobs
    -
    Jobs
    -
    -

    Return Value

    + + + + + +
    num_destsNumber of destinations
    destsDestinations
    +

    cupsFreeJobs

    Free memory used by job data.

    -

    cupsFreeOptions

    -

    Match found; free the old value...

    -void cupsFreeOptions (
    -    int num_options,
    -    cups_option_t *options
    -);

    +void cupsFreeJobs(int num_jobs, cups_job_t *jobs);

    Parameters

    -
    -
    num_options
    -
    Number of options
    -
    options
    -
    Pointer to options
    -
    -

    Return Value

    + + + + + +
    num_jobsNumber of jobs
    jobsJobs
    +

    cupsFreeOptions

    Free all memory used by options.

    +

    +void cupsFreeOptions(int num_options, cups_option_t *options);

    +

    Parameters

    + + + + + +
    num_optionsNumber of options
    optionsPointer to options

    cupsGetDest

    Get the named destination from the list.

    -cups_dest_t *cupsGetDest (
    -    const char *name,
    -    const char *instance,
    -    int num_dests,
    -    cups_dest_t *dests
    -);

    -

    Parameters

    -
    -
    name
    -
    Destination name or NULL for the default destination
    -
    instance
    -
    Instance name or NULL
    -
    num_dests
    -
    Number of destinations
    -
    dests
    -
    Destinations
    -
    +cups_dest_t *cupsGetDest(const char *name, const char *instance, int num_dests, cups_dest_t *dests);

    +

    Parameters

    + + + + + + + + + +
    nameDestination name or NULL for the default destination
    instanceInstance name or NULL
    num_destsNumber of destinations
    destsDestinations

    Return Value

    Destination pointer or NULL

    Discussion

    -

    Use the cupsGetDests or cupsGetDests2 functions to get a +

    Use the cupsEnumDests or cupsGetDests2 functions to get a list of supported destinations for the current user.

     CUPS 1.7/macOS 10.9 cupsGetDestMediaByIndex

    Get a media name, dimension, and margins for a specific size.

    -int cupsGetDestMediaByIndex (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    int n,
    -    unsigned flags,
    -    cups_size_t *size
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    n
    -
    Media size number (0-based)
    -
    flags
    -
    Media flags
    -
    size
    -
    Media size information
    -
    +int cupsGetDestMediaByIndex(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, int n, unsigned flags, cups_size_t *size);

    +

    Parameters

    + + + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    nMedia size number (0-based)
    flagsMedia flags
    sizeMedia size information

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -1727,29 +1586,22 @@ borderless size supported by the printer.

     CUPS 1.6/macOS 10.8 cupsGetDestMediaByName

    Get media names, dimensions, and margins.

    -int cupsGetDestMediaByName (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    const char *media,
    -    unsigned flags,
    -    cups_size_t *size
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    media
    -
    Media name
    -
    flags
    -
    Media matching flags
    -
    size
    -
    Media size information
    -
    +int cupsGetDestMediaByName(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *media, unsigned flags, cups_size_t *size);

    +

    Parameters

    + + + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    mediaMedia name
    flagsMedia matching flags
    sizeMedia size information

    Return Value

    1 on match, 0 on failure

    Discussion

    @@ -1771,34 +1623,26 @@ Returns 1 when there is a match and 0 if there is not a match.

     CUPS 1.6/macOS 10.8 cupsGetDestMediaBySize

    Get media names, dimensions, and margins.

    -int cupsGetDestMediaBySize (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    int width,
    -    int length,
    -    unsigned flags,
    -    cups_size_t *size
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    width
    -
    Media width in hundredths of -of millimeters
    -
    length
    -
    Media length in hundredths of -of millimeters
    -
    flags
    -
    Media matching flags
    -
    size
    -
    Media size information
    -
    +int cupsGetDestMediaBySize(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, int width, int length, unsigned flags, cups_size_t *size);

    +

    Parameters

    + + + + + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    widthMedia width in hundredths of +of millimeters
    lengthMedia length in hundredths of +of millimeters
    flagsMedia matching flags
    sizeMedia size information

    Return Value

    1 on match, 0 on failure

    Discussion

    @@ -1821,23 +1665,18 @@ Returns 1 when there is a match and 0 if there is not a match.

    Get the number of sizes supported by a destination.

    -int cupsGetDestMediaCount (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    unsigned flags
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    flags
    -
    Media flags
    -
    +int cupsGetDestMediaCount(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, unsigned flags);

    +

    Parameters

    + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    flagsMedia flags

    Return Value

    Number of sizes

    Discussion

    @@ -1849,26 +1688,20 @@ the number of borderless sizes.

     CUPS 1.7/macOS 10.9 cupsGetDestMediaDefault

    Get the default size for a destination.

    -int cupsGetDestMediaDefault (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    unsigned flags,
    -    cups_size_t *size
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    flags
    -
    Media flags
    -
    size
    -
    Media size information
    -
    +int cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, unsigned flags, cups_size_t *size);

    +

    Parameters

    + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    flagsMedia flags
    sizeMedia size information

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -1880,17 +1713,14 @@ borderless size, typically US Letter or A4, but sometimes 4x6 photo media.

     CUPS 2.0/macOS 10.10 cupsGetDestWithURI

    Get a destination associated with a URI.

    -cups_dest_t *cupsGetDestWithURI (
    -    const char *name,
    -    const char *uri
    -);

    +cups_dest_t *cupsGetDestWithURI(const char *name, const char *uri);

    Parameters

    -
    -
    name
    -
    Desired printer name or NULL
    -
    uri
    -
    URI for the printer
    -
    + + + + + +
    nameDesired printer name or NULL
    uriURI for the printer

    Return Value

    Destination or NULL

    Discussion

    @@ -1900,23 +1730,51 @@ created using the URI.
    "uri" is the "ipp" or "ipps" URI for the printer.

    -

     2.2.4 cupsGetIntegerOption

    +

     CUPS 1.1.21/macOS 10.4 cupsGetDests2

    +

    Get the list of destinations from the specified server.

    +

    +int cupsGetDests2(http_t *http, cups_dest_t **dests);

    +

    Parameters

    + + + + + +
    httpConnection to server or CUPS_HTTP_DEFAULT
    destsDestinations
    +

    Return Value

    +

    Number of destinations

    +

    Discussion

    +

    Starting with CUPS 1.2, the returned list of destinations include the +"printer-info", "printer-is-accepting-jobs", "printer-is-shared", +"printer-make-and-model", "printer-state", "printer-state-change-time", +"printer-state-reasons", "printer-type", and "printer-uri-supported" +attributes as options.
    +
    +CUPS 1.4 adds the "marker-change-time", "marker-colors", +"marker-high-levels", "marker-levels", "marker-low-levels", "marker-message", +"marker-names", "marker-types", and "printer-commands" attributes as options.
    +
    +CUPS 2.2 adds accessible IPP printers to the list of destinations that can +be used. The "printer-uri-supported" option will be present for those IPP +printers that have been recently used.
    +
    +Use the cupsFreeDests function to free the destination list and +the cupsGetDest function to find a particular destination. + +

    +

     CUPS 2.2.4/macOS 10.13 cupsGetIntegerOption

    Get an integer option value.

    -int cupsGetIntegerOption (
    -    const char *name,
    -    int num_options,
    -    cups_option_t *options
    -);

    -

    Parameters

    -
    -
    name
    -
    Name of option
    -
    num_options
    -
    Number of options
    -
    options
    -
    Options
    -
    +int cupsGetIntegerOption(const char *name, int num_options, cups_option_t *options);

    +

    Parameters

    + + + + + + + +
    nameName of option
    num_optionsNumber of options
    optionsOptions

    Return Value

    Option value or INT_MIN

    Discussion

    @@ -1927,26 +1785,20 @@ exceeds the range of values for the "int" type.

     CUPS 1.1.21/macOS 10.4 cupsGetJobs2

    Get the jobs from the specified server.

    -int cupsGetJobs2 (
    -    http_t *http,
    -    cups_job_t **jobs,
    -    const char *name,
    -    int myjobs,
    -    int whichjobs
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to server or CUPS_HTTP_DEFAULT
    -
    jobs
    -
    Job data
    -
    name
    -
    NULL = all destinations, otherwise show jobs for named destination
    -
    myjobs
    -
    0 = all users, 1 = mine
    -
    whichjobs
    -
    CUPS_WHICHJOBS_ALL, CUPS_WHICHJOBS_ACTIVE, or CUPS_WHICHJOBS_COMPLETED
    -
    +int cupsGetJobs2(http_t *http, cups_job_t **jobs, const char *name, int myjobs, int whichjobs);

    +

    Parameters

    + + + + + + + + + + + +
    httpConnection to server or CUPS_HTTP_DEFAULT
    jobsJob data
    nameNULL = all destinations, otherwise show jobs for named destination
    myjobs0 = all users, 1 = mine
    whichjobsCUPS_WHICHJOBS_ALL, CUPS_WHICHJOBS_ACTIVE, or CUPS_WHICHJOBS_COMPLETED

    Return Value

    Number of jobs

    Discussion

    @@ -1959,28 +1811,24 @@ jobs that are stopped, canceled, aborted, or completed.

     CUPS 1.4/macOS 10.6 cupsGetNamedDest

    Get options for the named destination.

    -cups_dest_t *cupsGetNamedDest (
    -    http_t *http,
    -    const char *name,
    -    const char *instance
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to server or CUPS_HTTP_DEFAULT
    -
    name
    -
    Destination name or NULL for the default destination
    -
    instance
    -
    Instance name or NULL
    -
    +cups_dest_t *cupsGetNamedDest(http_t *http, const char *name, const char *instance);

    +

    Parameters

    + + + + + + + +
    httpConnection to server or CUPS_HTTP_DEFAULT
    nameDestination name or NULL for the default destination
    instanceInstance name or NULL

    Return Value

    Destination or NULL

    Discussion

    This function is optimized for retrieving a single destination and should -be used instead of cupsGetDests and cupsGetDest when you either -know the name of the destination or want to print to the default destination. -If NULL is returned, the destination does not exist or there is no -default destination.
    +be used instead of cupsGetDests2 and cupsGetDest when you +either know the name of the destination or want to print to the default +destination. If NULL is returned, the destination does not exist or +there is no default destination.

    If "http" is CUPS_HTTP_DEFAULT, the connection to the default print server will be used.
    @@ -1995,43 +1843,34 @@ The returned destination must be freed using cups

    cupsGetOption

    Get an option value.

    -const char *cupsGetOption (
    -    const char *name,
    -    int num_options,
    -    cups_option_t *options
    -);

    -

    Parameters

    -
    -
    name
    -
    Name of option
    -
    num_options
    -
    Number of options
    -
    options
    -
    Options
    -
    +const char *cupsGetOption(const char *name, int num_options, cups_option_t *options);

    +

    Parameters

    + + + + + + + +
    nameName of option
    num_optionsNumber of options
    optionsOptions

    Return Value

    Option value or NULL

     CUPS 1.4/macOS 10.6 cupsGetPassword2

    -

    Get a password from the user using the advanced +

    Get a password from the user using the current password callback.

    -const char *cupsGetPassword2 (
    -    const char *prompt,
    -    http_t *http,
    -    const char *method,
    -    const char *resource
    -);

    -

    Parameters

    -
    -
    prompt
    -
    Prompt string
    -
    http
    -
    Connection to server or CUPS_HTTP_DEFAULT
    -
    method
    -
    Request method ("GET", "POST", "PUT")
    -
    resource
    -
    Resource path
    -
    +const char *cupsGetPassword2(const char *prompt, http_t *http, const char *method, const char *resource);

    +

    Parameters

    + + + + + + + + + +
    promptPrompt string
    httpConnection to server or CUPS_HTTP_DEFAULT
    methodRequest method ("GET", "POST", "PUT")
    resourceResource path

    Return Value

    Password

    Discussion

    @@ -2040,87 +1879,28 @@ user does not provide a password.

    Note: The current password callback function is tracked separately for each thread in a program. Multi-threaded programs that override the setting via -the cupsSetPasswordCB or cupsSetPasswordCB2 functions need to -do so in each thread for the same function to be used. +the cupsSetPasswordCB2 function need to do so in each thread for the +same function to be used.

    -

    cupsLangDefault

    -

    Return the default language.

    -

    -cups_lang_t *cupsLangDefault (void);

    -

    Return Value

    -

    Language data

    -

    cupsLangEncoding

    -

    Return the character encoding (us-ascii, etc.) -for the given language.

    -

    -const char *cupsLangEncoding (
    -    cups_lang_t *lang
    -);

    -

    Parameters

    -
    -
    lang
    -
    Language data
    -
    -

    Return Value

    -

    Character encoding

    -

    cupsLangFlush

    -

    Language data

    -

    -void cupsLangFlush (void);

    -

    Return Value

    -

    Flush all language data out of the cache.

    -

    cupsLangFree

    -

    Then free the language structure itself...

    -

    -void cupsLangFree (
    -    cups_lang_t *lang
    -);

    -

    Parameters

    -
    -
    lang
    -
    Language to free
    -
    -

    Return Value

    -

    Free language data.

    -

    This does not actually free anything; use cupsLangFlush for that.

    -

    cupsLangGet

    -

    Get a language.

    -

    -cups_lang_t *cupsLangGet (
    -    const char *language
    -);

    -

    Parameters

    -
    -
    language
    -
    Language or locale
    -
    -

    Return Value

    -

    Language data

     CUPS 2.0/macOS 10.10 cupsLocalizeDestMedia

    Get the localized string for a destination media size.

    -const char *cupsLocalizeDestMedia (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    unsigned flags,
    -    cups_size_t *size
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    flags
    -
    Media flags
    -
    size
    -
    Media size
    -
    +const char *cupsLocalizeDestMedia(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, unsigned flags, cups_size_t *size);

    +

    Parameters

    + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    flagsMedia flags
    sizeMedia size

    Return Value

    Localized string

    Discussion

    @@ -2132,23 +1912,18 @@ invalid if the destination information is deleted.

    Get the localized string for a destination option.

    -const char *cupsLocalizeDestOption (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    const char *option
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    option
    -
    Option to localize
    -
    +const char *cupsLocalizeDestOption(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *option);

    +

    Parameters

    + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    optionOption to localize

    Return Value

    Localized string

    Discussion

    @@ -2160,26 +1935,20 @@ invalid if the destination information is deleted.

    Get the localized string for a destination option+value pair.

    -const char *cupsLocalizeDestValue (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *dinfo,
    -    const char *option,
    -    const char *value
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    dinfo
    -
    Destination information
    -
    option
    -
    Option to localize
    -
    value
    -
    Value to localize
    -
    +const char *cupsLocalizeDestValue(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *option, const char *value);

    +

    Parameters

    + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    dinfoDestination information
    optionOption to localize
    valueValue to localize

    Return Value

    Localized string

    Discussion

    @@ -2190,85 +1959,35 @@ invalid if the destination information is deleted.

     CUPS 2.0/OS 10.10 cupsMakeServerCredentials

    Make a self-signed certificate and private key pair.

    -int cupsMakeServerCredentials (
    -    const char *path,
    -    const char *common_name,
    -    int num_alt_names,
    -    const char **alt_names,
    -    time_t expiration_date
    -);

    -

    Parameters

    -
    -
    path
    -
    Keychain path or NULL for default
    -
    common_name
    -
    Common name
    -
    num_alt_names
    -
    Number of subject alternate names
    -
    alt_names
    -
    Subject Alternate Names
    -
    expiration_date
    -
    Expiration date
    -
    +int cupsMakeServerCredentials(const char *path, const char *common_name, int num_alt_names, const char **alt_names, time_t expiration_date);

    +

    Parameters

    + + + + + + + + + + + +
    pathKeychain path or NULL for default
    common_nameCommon name
    num_alt_namesNumber of subject alternate names
    alt_namesSubject Alternate Names
    expiration_dateExpiration date

    Return Value

    1 on success, 0 on failure

    -

     CUPS 1.2/macOS 10.5 cupsNotifySubject

    -

    Return the subject for the given notification message.

    -

    -char *cupsNotifySubject (
    -    cups_lang_t *lang,
    -    ipp_t *event
    -);

    -

    Parameters

    -
    -
    lang
    -
    Language data
    -
    event
    -
    Event data
    -
    -

    Return Value

    -

    Subject string or NULL

    -

    Discussion

    -

    The returned string must be freed by the caller using free. - -

    -

     CUPS 1.2/macOS 10.5 cupsNotifyText

    -

    Return the text for the given notification message.

    -

    -char *cupsNotifyText (
    -    cups_lang_t *lang,
    -    ipp_t *event
    -);

    -

    Parameters

    -
    -
    lang
    -
    Language data
    -
    event
    -
    Event data
    -
    -

    Return Value

    -

    Message text or NULL

    -

    Discussion

    -

    The returned string must be freed by the caller using free. - -

    cupsParseOptions

    Parse options from a command-line argument.

    -int cupsParseOptions (
    -    const char *arg,
    -    int num_options,
    -    cups_option_t **options
    -);

    -

    Parameters

    -
    -
    arg
    -
    Argument to parse
    -
    num_options
    -
    Number of options
    -
    options
    -
    Options found
    -
    +int cupsParseOptions(const char *arg, int num_options, cups_option_t **options);

    +

    Parameters

    + + + + + + + +
    argArgument to parse
    num_optionsNumber of options
    optionsOptions found

    Return Value

    Number of options found

    Discussion

    @@ -2280,23 +1999,18 @@ collection attributes.

     CUPS 1.3/macOS 10.5 cupsRemoveDest

    Remove a destination from the destination list.

    -int cupsRemoveDest (
    -    const char *name,
    -    const char *instance,
    -    int num_dests,
    -    cups_dest_t **dests
    -);

    -

    Parameters

    -
    -
    name
    -
    Destination name
    -
    instance
    -
    Instance name or NULL
    -
    num_dests
    -
    Number of destinations
    -
    dests
    -
    Destinations
    -
    +int cupsRemoveDest(const char *name, const char *instance, int num_dests, cups_dest_t **dests);

    +

    Parameters

    + + + + + + + + + +
    nameDestination name
    instanceInstance name or NULL
    num_destsNumber of destinations
    destsDestinations

    Return Value

    New number of destinations

    Discussion

    @@ -2309,26 +2023,22 @@ options for the user.

     CUPS 1.2/macOS 10.5 cupsRemoveOption

    Remove an option from an option array.

    -int cupsRemoveOption (
    -    const char *name,
    -    int num_options,
    -    cups_option_t **options
    -);

    -

    Parameters

    -
    -
    name
    -
    Option name
    -
    num_options
    -
    Current number of options
    -
    options
    -
    Options
    -
    +int cupsRemoveOption(const char *name, int num_options, cups_option_t **options);

    +

    Parameters

    + + + + + + + +
    nameOption name
    num_optionsCurrent number of options
    optionsOptions

    Return Value

    New number of options

    cupsServer

    Return the hostname/address of the current server.

    -const char *cupsServer (void);

    +const char *cupsServer(void);

    Return Value

    Server name

    Discussion

    @@ -2344,22 +2054,18 @@ Note: The current server is tracked separately for each thread in a program. Multi-threaded programs that override the server via the cupsSetServer function need to do so in each thread for the same server to be used.

    -

    cupsSetClientCertCB

    -

    Pointer to library globals

    +

     CUPS 1.5/macOS 10.7 cupsSetClientCertCB

    +

    Set the client certificate callback.

    -void cupsSetClientCertCB (
    -    cups_client_cert_cb_t cb,
    -    void *user_data
    -);

    +void cupsSetClientCertCB(cups_client_cert_cb_t cb, void *user_data);

    Parameters

    -
    -
    cb
    -
    Callback function
    -
    user_data
    -
    User data pointer
    -
    -

    Return Value

    -

    Set the client certificate callback.

    + + + + + +
    cbCallback function
    user_dataUser data pointer
    +

    Discussion

    Pass NULL to restore the default callback.

    Note: The current certificate callback is tracked separately for each thread @@ -2371,14 +2077,12 @@ so in each thread for the same callback to be used.

    Set the default credentials to be used for SSL/TLS connections.

    -int cupsSetCredentials (
    -    cups_array_t *credentials
    -);

    +int cupsSetCredentials(cups_array_t *credentials);

    Parameters

    -
    -
    credentials
    -
    Array of credentials
    -
    + + + +
    credentialsArray of credentials

    Return Value

    Status of call (0 = success)

    Discussion

    @@ -2387,65 +2091,34 @@ program. Multi-threaded programs that override the setting need to do so in each thread for the same setting to be used.

    -

    cupsSetDefaultDest

    -

    Remove the destination from the array...

    -

    -void cupsSetDefaultDest (
    -    const char *name,
    -    const char *instance,
    -    int num_dests,
    -    cups_dest_t *dests
    -);

    -

    Parameters

    -
    -
    name
    -
    Destination name
    -
    instance
    -
    Instance name or NULL
    -
    num_dests
    -
    Number of destinations
    -
    dests
    -
    Destinations
    -
    -

    Return Value

    +

     CUPS 1.3/macOS 10.5 cupsSetDefaultDest

    Set the default destination.

    -

    -

    cupsSetDests

    -

    Loop through the array and set the "is_default" flag for the matching -destination...

    -

    -void cupsSetDests (
    -    int num_dests,
    -    cups_dest_t *dests
    -);

    -

    Parameters

    -
    -
    num_dests
    -
    Number of destinations
    -
    dests
    -
    Destinations
    -
    -

    Return Value

    -

    Save the list of destinations for the default server.

    -

    This function saves the destinations to /etc/cups/lpoptions when run -as root and ~/.cups/lpoptions when run as a normal user.

    +

    +void cupsSetDefaultDest(const char *name, const char *instance, int num_dests, cups_dest_t *dests);

    +

    Parameters

    + + + + + + + + + +
    nameDestination name
    instanceInstance name or NULL
    num_destsNumber of destinations
    destsDestinations

     CUPS 1.1.21/macOS 10.4 cupsSetDests2

    Save the list of destinations for the specified server.

    -int cupsSetDests2 (
    -    http_t *http,
    -    int num_dests,
    -    cups_dest_t *dests
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to server or CUPS_HTTP_DEFAULT
    -
    num_dests
    -
    Number of destinations
    -
    dests
    -
    Destinations
    -
    +int cupsSetDests2(http_t *http, int num_dests, cups_dest_t *dests);

    +

    Parameters

    + + + + + + + +
    httpConnection to server or CUPS_HTTP_DEFAULT
    num_destsNumber of destinations
    destsDestinations

    Return Value

    0 on success, -1 on error

    Discussion

    @@ -2454,18 +2127,15 @@ as root and ~/.cups/lpoptions when run as a normal user.

    cupsSetEncryption

    -

    Pointer to library globals

    +

    Set the encryption preference.

    -void cupsSetEncryption (
    -    http_encryption_t e
    -);

    +void cupsSetEncryption(http_encryption_t e);

    Parameters

    -
    -
    e
    -
    New encryption preference
    -
    -

    Return Value

    -

    Set the encryption preference.

    + + + +
    eNew encryption preference
    +

    Discussion

    The default encryption setting comes from the CUPS_ENCRYPTION environment variable, then the ~/.cups/client.conf file, and finally the /etc/cups/client.conf file. If not set, the default is @@ -2474,45 +2144,18 @@ environment variable, then the ~/.cups/client.conf file, and finally the Note: The current encryption setting is tracked separately for each thread in a program. Multi-threaded programs that override the setting need to do so in each thread for the same setting to be used.

    -

    cupsSetPasswordCB

    -

    Pointer to library globals

    -

    -void cupsSetPasswordCB (
    -    cups_password_cb_t cb
    -);

    -

    Parameters

    -
    -
    cb
    -
    Callback function
    -
    -

    Return Value

    -

    Set the password callback for CUPS.

    -

    Pass NULL to restore the default (console) password callback, which -reads the password from the console. Programs should call either this -function or cupsSetPasswordCB2, as only one callback can be registered -by a program per thread.
    -
    -Note: The current password callback is tracked separately for each thread -in a program. Multi-threaded programs that override the callback need to do -so in each thread for the same callback to be used. - -

    -

    cupsSetPasswordCB2

    -

    Pointer to library globals

    +

     CUPS 1.4/macOS 10.6 cupsSetPasswordCB2

    +

    Set the advanced password callback for CUPS.

    -void cupsSetPasswordCB2 (
    -    cups_password_cb2_t cb,
    -    void *user_data
    -);

    +void cupsSetPasswordCB2(cups_password_cb2_t cb, void *user_data);

    Parameters

    -
    -
    cb
    -
    Callback function
    -
    user_data
    -
    User data pointer
    -
    -

    Return Value

    -

    Set the advanced password callback for CUPS.

    + + + + + +
    cbCallback function
    user_dataUser data pointer
    +

    Discussion

    Pass NULL to restore the default (console) password callback, which reads the password from the console. Programs should call either this function or cupsSetPasswordCB2, as only one callback can be registered @@ -2524,18 +2167,15 @@ so in each thread for the same callback to be used.

    cupsSetServer

    -

    Pointer to library globals

    +

    Set the default server name and port.

    -void cupsSetServer (
    -    const char *server
    -);

    +void cupsSetServer(const char *server);

    Parameters

    -
    -
    server
    -
    Server name
    -
    -

    Return Value

    -

    Set the default server name and port.

    + + + +
    serverServer name
    +

    Discussion

    The "server" string can be a fully-qualified hostname, a numeric IPv4 or IPv6 address, or a domain socket pathname. Hostnames and numeric IP addresses can be optionally followed by a colon and port number to override @@ -2545,22 +2185,18 @@ default server name and port.
    Note: The current server is tracked separately for each thread in a program. Multi-threaded programs that override the server need to do so in each thread for the same server to be used.

    -

    cupsSetServerCertCB

    -

    Pointer to library globals

    +

     CUPS 1.5/macOS 10.7 cupsSetServerCertCB

    +

    Set the server certificate callback.

    -void cupsSetServerCertCB (
    -    cups_server_cert_cb_t cb,
    -    void *user_data
    -);

    +void cupsSetServerCertCB(cups_server_cert_cb_t cb, void *user_data);

    Parameters

    -
    -
    cb
    -
    Callback function
    -
    user_data
    -
    User data pointer
    -
    -

    Return Value

    -

    Set the server certificate callback.

    + + + + + +
    cbCallback function
    user_dataUser data pointer
    +

    Discussion

    Pass NULL to restore the default callback.

    Note: The current credentials callback is tracked separately for each thread @@ -2571,20 +2207,16 @@ so in each thread for the same callback to be used.

     CUPS 2.0/macOS 10.10 cupsSetServerCredentials

    Set the default server credentials.

    -int cupsSetServerCredentials (
    -    const char *path,
    -    const char *common_name,
    -    int auto_create
    -);

    -

    Parameters

    -
    -
    path
    -
    Keychain path or NULL for default
    -
    common_name
    -
    Default common name for server
    -
    auto_create
    -
    1 = automatically create self-signed certificates
    -
    +int cupsSetServerCredentials(const char *path, const char *common_name, int auto_create);

    +

    Parameters

    + + + + + + + +
    pathKeychain path or NULL for default
    common_nameDefault common name for server
    auto_create1 = automatically create self-signed certificates

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -2593,36 +2225,30 @@ This function is threadsafe.

    cupsSetUser

    -

    Pointer to library globals

    +

    Set the default user name.

    -void cupsSetUser (
    -    const char *user
    -);

    +void cupsSetUser(const char *user);

    Parameters

    -
    -
    user
    -
    User name
    -
    -

    Return Value

    -

    Set the default user name.

    + + + +
    userUser name
    +

    Discussion

    Pass NULL to restore the default user name.

    Note: The current user name is tracked separately for each thread in a program. Multi-threaded programs that override the user name need to do so in each thread for the same user name to be used.

    -

    cupsSetUserAgent

    -

    Pointer to library globals

    +

     CUPS 1.7/macOS 10.9 cupsSetUserAgent

    +

    Set the default HTTP User-Agent string.

    -void cupsSetUserAgent (
    -    const char *user_agent
    -);

    +void cupsSetUserAgent(const char *user_agent);

    Parameters

    -
    -
    user_agent
    -
    User-Agent string or NULL
    -
    -

    Return Value

    -

    Set the default HTTP User-Agent string.

    + + + +
    user_agentUser-Agent string or NULL
    +

    Discussion

    Setting the string to NULL forces the default value containing the CUPS version, IPP version, and operating system version and architecture. @@ -2630,38 +2256,28 @@ version, IPP version, and operating system version and architecture.

     CUPS 1.6/macOS 10.8 cupsStartDestDocument

    Start a new document.

    -http_status_t cupsStartDestDocument (
    -    http_t *http,
    -    cups_dest_t *dest,
    -    cups_dinfo_t *info,
    -    int job_id,
    -    const char *docname,
    -    const char *format,
    -    int num_options,
    -    cups_option_t *options,
    -    int last_document
    -);

    -

    Parameters

    -
    -
    http
    -
    Connection to destination
    -
    dest
    -
    Destination
    -
    info
    -
    Destination information
    -
    job_id
    -
    Job ID
    -
    docname
    -
    Document name
    -
    format
    -
    Document format
    -
    num_options
    -
    Number of document options
    -
    options
    -
    Document options
    -
    last_document
    -
    1 if this is the last document
    -
    +http_status_t cupsStartDestDocument(http_t *http, cups_dest_t *dest, cups_dinfo_t *info, int job_id, const char *docname, const char *format, int num_options, cups_option_t *options, int last_document);

    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    httpConnection to destination
    destDestination
    infoDestination information
    job_idJob ID
    docnameDocument name
    formatDocument format
    num_optionsNumber of document options
    optionsDocument options
    last_document1 if this is the last document

    Return Value

    Status of document creation

    Discussion

    @@ -2676,7 +2292,7 @@ if this is the last document to be submitted in the job. Returns

    cupsUser

    Return the current user's name.

    -const char *cupsUser (void);

    +const char *cupsUser(void);

    Return Value

    User name

    Discussion

    @@ -2687,44 +2303,37 @@ name to be used.

     CUPS 1.7/macOS 10.9 cupsUserAgent

    Return the default HTTP User-Agent string.

    -const char *cupsUserAgent (void);

    +const char *cupsUserAgent(void);

    Return Value

    User-Agent string

     CUPS 1.7/macOS 10.9 httpAcceptConnection

    Accept a new HTTP client connection from the specified listening socket.

    -http_t *httpAcceptConnection (
    -    int fd,
    -    int blocking
    -);

    +http_t *httpAcceptConnection(int fd, int blocking);

    Parameters

    -
    -
    fd
    -
    Listen socket file descriptor
    -
    blocking
    -
    1 if the connection should be -blocking, 0 otherwise
    -
    + + + + + +
    fdListen socket file descriptor
    blocking1 if the connection should be +blocking, 0 otherwise

    Return Value

    HTTP connection or NULL

     CUPS 1.5/macOS 10.7 httpAddCredential

    Allocates and adds a single credential to an array.

    -int httpAddCredential (
    -    cups_array_t *credentials,
    -    const void *data,
    -    size_t datalen
    -);

    -

    Parameters

    -
    -
    credentials
    -
    Credentials array
    -
    data
    -
    PEM-encoded X.509 data
    -
    datalen
    -
    Length of data
    -
    +int httpAddCredential(cups_array_t *credentials, const void *data, size_t datalen);

    +

    Parameters

    + + + + + + + +
    credentialsCredentials array
    dataPEM-encoded X.509 data
    datalenLength of data

    Return Value

    0 on success, -1 on error

    Discussion

    @@ -2734,264 +2343,212 @@ int httpAddCredential (

     CUPS 1.2/macOS 10.5 httpAddrAny

    Check for the "any" address.

    -int httpAddrAny (
    -    const http_addr_t *addr
    -);

    +int httpAddrAny(const http_addr_t *addr);

    Parameters

    -
    -
    addr
    -
    Address to check
    -
    + + + +
    addrAddress to check

    Return Value

    1 if "any", 0 otherwise

     CUPS 2.0/OS 10.10 httpAddrClose

    Close a socket created by httpAddrConnect or httpAddrListen.

    -int httpAddrClose (
    -    http_addr_t *addr,
    -    int fd
    -);

    +int httpAddrClose(http_addr_t *addr, int fd);

    Parameters

    -
    -
    addr
    -
    Listen address or NULL
    -
    fd
    -
    Socket file descriptor
    -
    + + + + + +
    addrListen address or NULL
    fdSocket file descriptor

    Return Value

    0 on success, -1 on failure

    Discussion

    -

    Pass NULL for sockets created with httpAddrConnect and the -listen address for sockets created with httpAddrListen. This will -ensure that domain sockets are removed when closed. +

    Pass NULL for sockets created with httpAddrConnect2 and the +listen address for sockets created with httpAddrListen. This function +ensures that domain sockets are removed when closed.

     CUPS 1.7/macOS 10.9 httpAddrConnect2

    Connect to any of the addresses in the list with a timeout and optional cancel.

    -http_addrlist_t *httpAddrConnect2 (
    -    http_addrlist_t *addrlist,
    -    int *sock,
    -    int msec,
    -    int *cancel
    -);

    -

    Parameters

    -
    -
    addrlist
    -
    List of potential addresses
    -
    sock
    -
    Socket
    -
    msec
    -
    Timeout in milliseconds
    -
    cancel
    -
    Pointer to "cancel" variable
    -
    +http_addrlist_t *httpAddrConnect2(http_addrlist_t *addrlist, int *sock, int msec, int *cancel);

    +

    Parameters

    + + + + + + + + + +
    addrlistList of potential addresses
    sockSocket
    msecTimeout in milliseconds
    cancelPointer to "cancel" variable

    Return Value

    Connected address or NULL on failure

     CUPS 1.7/macOS 10.9 httpAddrCopyList

    Copy an address list.

    -http_addrlist_t *httpAddrCopyList (
    -    http_addrlist_t *src
    -);

    +http_addrlist_t *httpAddrCopyList(http_addrlist_t *src);

    Parameters

    -
    -
    src
    -
    Source address list
    -
    + + + +
    srcSource address list

    Return Value

    New address list or NULL on error

     CUPS 1.2/macOS 10.5 httpAddrEqual

    Compare two addresses.

    -int httpAddrEqual (
    -    const http_addr_t *addr1,
    -    const http_addr_t *addr2
    -);

    +int httpAddrEqual(const http_addr_t *addr1, const http_addr_t *addr2);

    Parameters

    -
    -
    addr1
    -
    First address
    -
    addr2
    -
    Second address
    -
    + + + + + +
    addr1First address
    addr2Second address

    Return Value

    1 if equal, 0 if not

    httpAddrFamily

    Get the address family of an address.

    -int httpAddrFamily (
    -    http_addr_t *addr
    -);

    +int httpAddrFamily(http_addr_t *addr);

    Parameters

    -
    -
    addr
    -
    Address
    -
    + + + +
    addrAddress

    Return Value

    Address family

    -

    httpAddrFreeList

    -

    Current list entry

    +

     CUPS 1.2/macOS 10.5 httpAddrFreeList

    +

    Free an address list.

    -void httpAddrFreeList (
    -    http_addrlist_t *addrlist
    -);

    +void httpAddrFreeList(http_addrlist_t *addrlist);

    Parameters

    -
    -
    addrlist
    -
    Address list to free
    -
    -

    Return Value

    -

    Free an address list.

    -

    + + + +
    addrlistAddress list to free

     CUPS 1.2/macOS 10.5 httpAddrGetList

    Get a list of addresses for a hostname.

    -http_addrlist_t *httpAddrGetList (
    -    const char *hostname,
    -    int family,
    -    const char *service
    -);

    -

    Parameters

    -
    -
    hostname
    -
    Hostname, IP address, or NULL for passive listen address
    -
    family
    -
    Address family or AF_UNSPEC
    -
    service
    -
    Service name or port number
    -
    +http_addrlist_t *httpAddrGetList(const char *hostname, int family, const char *service);

    +

    Parameters

    + + + + + + + +
    hostnameHostname, IP address, or NULL for passive listen address
    familyAddress family or AF_UNSPEC
    serviceService name or port number

    Return Value

    List of addresses or NULL

     CUPS 1.2/macOS 10.5 httpAddrLength

    Return the length of the address in bytes.

    -int httpAddrLength (
    -    const http_addr_t *addr
    -);

    +int httpAddrLength(const http_addr_t *addr);

    Parameters

    -
    -
    addr
    -
    Address
    -
    + + + +
    addrAddress

    Return Value

    Length in bytes

     CUPS 1.7/macOS 10.9 httpAddrListen

    Create a listening socket bound to the specified address and port.

    -int httpAddrListen (
    -    http_addr_t *addr,
    -    int port
    -);

    +int httpAddrListen(http_addr_t *addr, int port);

    Parameters

    -
    -
    addr
    -
    Address to bind to
    -
    port
    -
    Port number to bind to
    -
    + + + + + +
    addrAddress to bind to
    portPort number to bind to

    Return Value

    Socket or -1 on error

     CUPS 1.2/macOS 10.5 httpAddrLocalhost

    Check for the local loopback address.

    -int httpAddrLocalhost (
    -    const http_addr_t *addr
    -);

    +int httpAddrLocalhost(const http_addr_t *addr);

    Parameters

    -
    -
    addr
    -
    Address to check
    -
    + + + +
    addrAddress to check

    Return Value

    1 if local host, 0 otherwise

     CUPS 1.2/macOS 10.5 httpAddrLookup

    Lookup the hostname associated with the address.

    -char *httpAddrLookup (
    -    const http_addr_t *addr,
    -    char *name,
    -    int namelen
    -);

    -

    Parameters

    -
    -
    addr
    -
    Address to lookup
    -
    name
    -
    Host name buffer
    -
    namelen
    -
    Size of name buffer
    -
    +char *httpAddrLookup(const http_addr_t *addr, char *name, int namelen);

    +

    Parameters

    + + + + + + + +
    addrAddress to lookup
    nameHost name buffer
    namelenSize of name buffer

    Return Value

    Host name

     CUPS 1.7/macOS 10.9 httpAddrPort

    Get the port number associated with an address.

    -int httpAddrPort (
    -    http_addr_t *addr
    -);

    +int httpAddrPort(http_addr_t *addr);

    Parameters

    -
    -
    addr
    -
    Address
    -
    + + + +
    addrAddress

    Return Value

    Port number

     CUPS 1.2/macOS 10.5 httpAddrString

    Convert an address to a numeric string.

    -char *httpAddrString (
    -    const http_addr_t *addr,
    -    char *s,
    -    int slen
    -);

    -

    Parameters

    -
    -
    addr
    -
    Address to convert
    -
    s
    -
    String buffer
    -
    slen
    -
    Length of string
    -
    +char *httpAddrString(const http_addr_t *addr, char *s, int slen);

    +

    Parameters

    + + + + + + + +
    addrAddress to convert
    sString buffer
    slenLength of string

    Return Value

    Numeric address string

     CUPS 1.2/macOS 10.5 httpAssembleURI

    Assemble a uniform resource identifier from its components.

    -http_uri_status_t httpAssembleURI (
    -    http_uri_coding_t encoding,
    -    char *uri,
    -    int urilen,
    -    const char *scheme,
    -    const char *username,
    -    const char *host,
    -    int port,
    -    const char *resource
    -);

    -

    Parameters

    -
    -
    encoding
    -
    Encoding flags
    -
    uri
    -
    URI buffer
    -
    urilen
    -
    Size of URI buffer
    -
    scheme
    -
    Scheme name
    -
    username
    -
    Username
    -
    host
    -
    Hostname or address
    -
    port
    -
    Port number
    -
    resource
    -
    Resource
    -
    +http_uri_status_t httpAssembleURI(http_uri_coding_t encoding, char *uri, int urilen, const char *scheme, const char *username, const char *host, int port, const char *resource);

    +

    Parameters

    + + + + + + + + + + + + + + + + + +
    encodingEncoding flags
    uriURI buffer
    urilenSize of URI buffer
    schemeScheme name
    usernameUsername
    hostHostname or address
    portPort number
    resourceResource

    Return Value

    URI status

    Discussion

    @@ -3005,38 +2562,28 @@ URI string.

    Assemble a uniform resource identifier from its components with a formatted resource.

    -http_uri_status_t httpAssembleURIf (
    -    http_uri_coding_t encoding,
    -    char *uri,
    -    int urilen,
    -    const char *scheme,
    -    const char *username,
    -    const char *host,
    -    int port,
    -    const char *resourcef,
    -    ...
    -);

    -

    Parameters

    -
    -
    encoding
    -
    Encoding flags
    -
    uri
    -
    URI buffer
    -
    urilen
    -
    Size of URI buffer
    -
    scheme
    -
    Scheme name
    -
    username
    -
    Username
    -
    host
    -
    Hostname or address
    -
    port
    -
    Port number
    -
    resourcef
    -
    Printf-style resource
    -
    ...
    -
    Additional arguments as needed
    -
    +http_uri_status_t httpAssembleURIf(http_uri_coding_t encoding, char *uri, int urilen, const char *scheme, const char *username, const char *host, int port, const char *resourcef, ...);

    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    encodingEncoding flags
    uriURI buffer
    urilenSize of URI buffer
    schemeScheme name
    usernameUsername
    hostHostname or address
    portPort number
    resourcefPrintf-style resource
    ...Additional arguments as needed

    Return Value

    URI status

    Discussion

    @@ -3050,29 +2597,22 @@ you need to create a URI string.

     CUPS 1.7/macOS 10.9 httpAssembleUUID

    Assemble a name-based UUID URN conforming to RFC 4122.

    -char *httpAssembleUUID (
    -    const char *server,
    -    int port,
    -    const char *name,
    -    int number,
    -    char *buffer,
    -    size_t bufsize
    -);

    -

    Parameters

    -
    -
    server
    -
    Server name
    -
    port
    -
    Port number
    -
    name
    -
    Object name or NULL
    -
    number
    -
    Object number or 0
    -
    buffer
    -
    String buffer
    -
    bufsize
    -
    Size of buffer
    -
    +char *httpAssembleUUID(const char *server, int port, const char *name, int number, char *buffer, size_t bufsize);

    +

    Parameters

    + + + + + + + + + + + + + +
    serverServer name
    portPort number
    nameObject name or NULL
    numberObject number or 0
    bufferString buffer
    bufsizeSize of buffer

    Return Value

    UUID string

    Discussion

    @@ -3084,371 +2624,296 @@ The buffer needs to be at least 46 bytes in size.

    httpBlocking

    -

    Credential data

    +

    Set blocking/non-blocking behavior on a connection.

    -void httpBlocking (
    -    http_t *http,
    -    int b
    -);

    +void httpBlocking(http_t *http, int b);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    b
    -
    1 = blocking, 0 = non-blocking
    -
    -

    Return Value

    -

    Set blocking/non-blocking behavior on a connection.

    + + + + + +
    httpHTTP connection
    b1 = blocking, 0 = non-blocking

    httpCheck

    Check to see if there is a pending response from the server.

    -int httpCheck (
    -    http_t *http
    -);

    +int httpCheck(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    0 = no data, 1 = data available

    -

    httpClearCookie

    -

    HTTP connection

    +

     CUPS 1.1.19/macOS 10.3 httpClearCookie

    +

    Clear the cookie value(s).

    -void httpClearCookie (
    -    http_t *http
    -);

    +void httpClearCookie(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    -

    Return Value

    -

    Clear the cookie value(s).

    -

    + + + +
    httpHTTP connection

    httpClearFields

    -

    HTTP connection

    +

    Clear HTTP request fields.

    -void httpClearFields (
    -    http_t *http
    -);

    +void httpClearFields(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    -

    Return Value

    -

    Clear HTTP request fields.

    + + + +
    httpHTTP connection

    httpClose

    -

    HTTP connection

    +

    Close an HTTP connection.

    -void httpClose (
    -    http_t *http
    -);

    +void httpClose(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    -

    Return Value

    -

    Close an HTTP connection.

    + + + +
    httpHTTP connection

     CUPS 2.0/OS 10.10 httpCompareCredentials

    Compare two sets of X.509 credentials.

    -int httpCompareCredentials (
    -    cups_array_t *cred1,
    -    cups_array_t *cred2
    -);

    +int httpCompareCredentials(cups_array_t *cred1, cups_array_t *cred2);

    Parameters

    -
    -
    cred1
    -
    First set of X.509 credentials
    -
    cred2
    -
    Second set of X.509 credentials
    -
    + + + + + +
    cred1First set of X.509 credentials
    cred2Second set of X.509 credentials

    Return Value

    1 if they match, 0 if they do not

     CUPS 1.7/macOS 10.9 httpConnect2

    Connect to a HTTP server.

    -http_t *httpConnect2 (
    -    const char *host,
    -    int port,
    -    http_addrlist_t *addrlist,
    -    int family,
    -    http_encryption_t encryption,
    -    int blocking,
    -    int msec,
    -    int *cancel
    -);

    -

    Parameters

    -
    -
    host
    -
    Host to connect to
    -
    port
    -
    Port number
    -
    addrlist
    -
    List of addresses or NULL to lookup
    -
    family
    -
    Address family to use or AF_UNSPEC for any
    -
    encryption
    -
    Type of encryption to use
    -
    blocking
    -
    1 for blocking connection, 0 for non-blocking
    -
    msec
    -
    Connection timeout in milliseconds, 0 means don't connect
    -
    cancel
    -
    Pointer to "cancel" variable
    -
    +http_t *httpConnect2(const char *host, int port, http_addrlist_t *addrlist, int family, http_encryption_t encryption, int blocking, int msec, int *cancel);

    +

    Parameters

    + + + + + + + + + + + + + + + + + +
    hostHost to connect to
    portPort number
    addrlistList of addresses or NULL to lookup
    familyAddress family to use or AF_UNSPEC for any
    encryptionType of encryption to use
    blocking1 for blocking connection, 0 for non-blocking
    msecConnection timeout in milliseconds, 0 means don't connect
    cancelPointer to "cancel" variable

    Return Value

    New HTTP connection

     CUPS 1.5/macOS 10.7 httpCopyCredentials

    Copy the credentials associated with the peer in an encrypted connection.

    -int httpCopyCredentials (
    -    http_t *http,
    -    cups_array_t **credentials
    -);

    +int httpCopyCredentials(http_t *http, cups_array_t **credentials);

    Parameters

    -
    -
    http
    -
    Connection to server
    -
    credentials
    -
    Array of credentials
    -
    + + + + + +
    httpConnection to server
    credentialsArray of credentials

    Return Value

    Status of call (0 = success)

     CUPS 2.0/macOS 10.10 httpCredentialsAreValidForName

    Return whether the credentials are valid for the given name.

    -int httpCredentialsAreValidForName (
    -    cups_array_t *credentials,
    -    const char *common_name
    -);

    +int httpCredentialsAreValidForName(cups_array_t *credentials, const char *common_name);

    Parameters

    -
    -
    credentials
    -
    Credentials
    -
    common_name
    -
    Name to check
    -
    + + + + + +
    credentialsCredentials
    common_nameName to check

    Return Value

    1 if valid, 0 otherwise

     CUPS 2.0/macOS 10.10 httpCredentialsGetExpiration

    Return the expiration date of the credentials.

    -time_t httpCredentialsGetExpiration (
    -    cups_array_t *credentials
    -);

    +time_t httpCredentialsGetExpiration(cups_array_t *credentials);

    Parameters

    -
    -
    credentials
    -
    Credentials
    -
    + + + +
    credentialsCredentials

    Return Value

    Expiration date of credentials

     CUPS 2.0/macOS 10.10 httpCredentialsGetTrust

    Return the trust of credentials.

    -http_trust_t httpCredentialsGetTrust (
    -    cups_array_t *credentials,
    -    const char *common_name
    -);

    +http_trust_t httpCredentialsGetTrust(cups_array_t *credentials, const char *common_name);

    Parameters

    -
    -
    credentials
    -
    Credentials
    -
    common_name
    -
    Common name for trust lookup
    -
    + + + + + +
    credentialsCredentials
    common_nameCommon name for trust lookup

    Return Value

    Level of trust

     CUPS 2.0/macOS 10.10 httpCredentialsString

    Return a string representing the credentials.

    -size_t httpCredentialsString (
    -    cups_array_t *credentials,
    -    char *buffer,
    -    size_t bufsize
    -);

    -

    Parameters

    -
    -
    credentials
    -
    Credentials
    -
    buffer
    -
    Buffer or NULL
    -
    bufsize
    -
    Size of buffer
    -
    +size_t httpCredentialsString(cups_array_t *credentials, char *buffer, size_t bufsize);

    +

    Parameters

    + + + + + + + +
    credentialsCredentials
    bufferBuffer or NULL
    bufsizeSize of buffer

    Return Value

    Total size of credentials string

     CUPS 1.1.21/macOS 10.4 httpDecode64_2

    Base64-decode a string.

    -char *httpDecode64_2 (
    -    char *out,
    -    int *outlen,
    -    const char *in
    -);

    -

    Parameters

    -
    -
    out
    -
    String to write to
    -
    outlen
    -
    Size of output string
    -
    in
    -
    String to read from
    -
    +char *httpDecode64_2(char *out, int *outlen, const char *in);

    +

    Parameters

    + + + + + + + +
    outString to write to
    outlenSize of output string
    inString to read from

    Return Value

    Decoded string

    +

    Discussion

    +

    The caller must initialize "outlen" to the maximum size of the decoded +string before calling @httpDecode64_2@. On return "outlen" contains the +decoded length of the string. + +

    httpDelete

    Send a DELETE request to the server.

    -int httpDelete (
    -    http_t *http,
    -    const char *uri
    -);

    +int httpDelete(http_t *http, const char *uri);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    uri
    -
    URI to delete
    -
    + + + + + +
    httpHTTP connection
    uriURI to delete

    Return Value

    Status of call (0 = success)

     CUPS 1.1.21/macOS 10.4 httpEncode64_2

    Base64-encode a string.

    -char *httpEncode64_2 (
    -    char *out,
    -    int outlen,
    -    const char *in,
    -    int inlen
    -);

    -

    Parameters

    -
    -
    out
    -
    String to write to
    -
    outlen
    -
    Size of output string
    -
    in
    -
    String to read from
    -
    inlen
    -
    Size of input string
    -
    +char *httpEncode64_2(char *out, int outlen, const char *in, int inlen);

    +

    Parameters

    + + + + + + + + + +
    outString to write to
    outlenMaximum size of output string
    inString to read from
    inlenSize of input string

    Return Value

    Encoded string

    httpEncryption

    Set the required encryption on the link.

    -int httpEncryption (
    -    http_t *http,
    -    http_encryption_t e
    -);

    +int httpEncryption(http_t *http, http_encryption_t e);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    e
    -
    New encryption preference
    -
    + + + + + +
    httpHTTP connection
    eNew encryption preference

    Return Value

    -1 on error, 0 on success

    httpError

    Get the last error on a connection.

    -int httpError (
    -    http_t *http
    -);

    +int httpError(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Error code (errno) value

    httpFieldValue

    Return the HTTP field enumeration value for a field name.

    -http_field_t httpFieldValue (
    -    const char *name
    -);

    +http_field_t httpFieldValue(const char *name);

    Parameters

    -
    -
    name
    -
    String name
    -
    + + + +
    nameString name

    Return Value

    Field index

    httpFlush

    -

    Looping var

    +

    Flush data from a HTTP connection.

    -void httpFlush (
    -    http_t *http
    -);

    +void httpFlush(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    -

    Return Value

    -

    Flush data from a HTTP connection.

    + + + +
    httpHTTP connection

     CUPS 1.2/macOS 10.5 httpFlushWrite

    Flush data in write buffer.

    -int httpFlushWrite (
    -    http_t *http
    -);

    +int httpFlushWrite(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Bytes written or -1 on error

    httpFreeCredentials

    -

    Bytes written

    +

    Free an array of credentials.

    -void httpFreeCredentials (
    -    cups_array_t *credentials
    -);

    +void httpFreeCredentials(cups_array_t *credentials);

    Parameters

    -
    -
    credentials
    -
    Array of credentials
    -
    -

    Return Value

    -

    Free an array of credentials.

    + + + +
    credentialsArray of credentials

    httpGet

    Send a GET request to the server.

    -int httpGet (
    -    http_t *http,
    -    const char *uri
    -);

    +int httpGet(http_t *http, const char *uri);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    uri
    -
    URI to get
    -
    + + + + + +
    httpHTTP connection
    uriURI to get

    Return Value

    Status of call (0 = success)

     CUPS 2.0/OS 10.10 httpGetActivity

    Get the most recent activity for a connection.

    -time_t httpGetActivity (
    -    http_t *http
    -);

    +time_t httpGetActivity(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Time of last read or write

    Discussion

    @@ -3458,14 +2923,12 @@ time_t httpGetActivity (

     CUPS 2.0/OS 10.10 httpGetAddress

    Get the address of the connected peer of a connection.

    -http_addr_t *httpGetAddress (
    -    http_t *http
    -);

    +http_addr_t *httpGetAddress(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Connected address or NULL

    Discussion

    @@ -3475,14 +2938,12 @@ time_t httpGetActivity (

     CUPS 1.3/macOS 10.5 httpGetAuthString

    Get the current authorization string.

    -char *httpGetAuthString (
    -    http_t *http
    -);

    +char *httpGetAuthString(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Authorization string

    Discussion

    @@ -3495,28 +2956,24 @@ value.

     CUPS 1.2/macOS 10.5 httpGetBlocking

    Get the blocking/non-block state of a connection.

    -int httpGetBlocking (
    -    http_t *http
    -);

    +int httpGetBlocking(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    1 if blocking, 0 if non-blocking

     CUPS 1.7/macOS 10.9 httpGetContentEncoding

    Get a common content encoding, if any, between the client and server.

    -const char *httpGetContentEncoding (
    -    http_t *http
    -);

    +const char *httpGetContentEncoding(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Content-Coding value or NULL for the identity @@ -3531,59 +2988,49 @@ or in the response (for servers) in order to compress the content stream.

     CUPS 1.1.19/macOS 10.3 httpGetCookie

    Get any cookie data from the response.

    -const char *httpGetCookie (
    -    http_t *http
    -);

    +const char *httpGetCookie(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Cookie data or NULL

     CUPS 1.2/macOS 10.5 httpGetDateString2

    Get a formatted date/time string from a time value.

    -const char *httpGetDateString2 (
    -    time_t t,
    -    char *s,
    -    int slen
    -);

    -

    Parameters

    -
    -
    t
    -
    UNIX time
    -
    s
    -
    String buffer
    -
    slen
    -
    Size of string buffer
    -
    +const char *httpGetDateString2(time_t t, char *s, int slen);

    +

    Parameters

    + + + + + + + +
    tUNIX time
    sString buffer
    slenSize of string buffer

    Return Value

    Date/time string

    httpGetDateTime

    Get a time value from a formatted date/time string.

    -time_t httpGetDateTime (
    -    const char *s
    -);

    +time_t httpGetDateTime(const char *s);

    Parameters

    -
    -
    s
    -
    Date/time string
    -
    + + + +
    sDate/time string

    Return Value

    UNIX time

     CUPS 2.0/OS 10.10 httpGetEncryption

    Get the current encryption mode of a connection.

    -http_encryption_t httpGetEncryption (
    -    http_t *http
    -);

    +http_encryption_t httpGetEncryption(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Current encryption mode

    Discussion

    @@ -3595,14 +3042,12 @@ been established.

     CUPS 1.7/macOS 10.9 httpGetExpect

    Get the value of the Expect header, if any.

    -http_status_t httpGetExpect (
    -    http_t *http
    -);

    +http_status_t httpGetExpect(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Expect: status, if any

    Discussion

    @@ -3613,63 +3058,52 @@ returns the expected HTTP status code, typically HTTP_STATUS_CONTINUE CUPS 1.2/macOS 10.5 httpGetFd

    Get the file descriptor associated with a connection.

    -int httpGetFd (
    -    http_t *http
    -);

    +int httpGetFd(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    File descriptor or -1 if none

    httpGetField

    Get a field value from a request/response.

    -const char *httpGetField (
    -    http_t *http,
    -    http_field_t field
    -);

    +const char *httpGetField(http_t *http, http_field_t field);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    field
    -
    Field to get
    -
    + + + + + +
    httpHTTP connection
    fieldField to get

    Return Value

    Field value

     DEPRECATED httpGetHostByName

    Lookup a hostname or IPv4 address, and return address records for the specified name.

    -struct hostent *httpGetHostByName (
    -    const char *name
    -);

    +struct hostent *httpGetHostByName(const char *name);

    Parameters

    -
    -
    name
    -
    Hostname or IP address
    -
    + + + +
    nameHostname or IP address

    Return Value

    Host entry

     CUPS 1.2/macOS 10.5 httpGetHostname

    Get the FQDN for the connection or local system.

    -const char *httpGetHostname (
    -    http_t *http,
    -    char *s,
    -    int slen
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection or NULL
    -
    s
    -
    String buffer for name
    -
    slen
    -
    Size of buffer
    -
    +const char *httpGetHostname(http_t *http, char *s, int slen);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection or NULL
    sString buffer for name
    slenSize of buffer

    Return Value

    FQDN for connection or system

    Discussion

    @@ -3683,28 +3117,24 @@ and gethostbyname() to get the local hostname with domain.

     CUPS 2.0/OS 10.10 httpGetKeepAlive

    Get the current Keep-Alive state of the connection.

    -http_keepalive_t httpGetKeepAlive (
    -    http_t *http
    -);

    +http_keepalive_t httpGetKeepAlive(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Keep-Alive state

     CUPS 1.2/macOS 10.5 httpGetLength2

    Get the amount of data remaining from the content-length or transfer-encoding fields.

    -off_t httpGetLength2 (
    -    http_t *http
    -);

    +off_t httpGetLength2(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Content length

    Discussion

    @@ -3715,41 +3145,35 @@ content larger than 2^31 - 1.

     CUPS 2.0/OS 10.10 httpGetPending

    Get the number of bytes that are buffered for writing.

    -size_t httpGetPending (
    -    http_t *http
    -);

    +size_t httpGetPending(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Number of bytes buffered

     CUPS 2.0/OS 10.10 httpGetReady

    Get the number of bytes that can be read without blocking.

    -size_t httpGetReady (
    -    http_t *http
    -);

    +size_t httpGetReady(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Number of bytes available

     CUPS 2.0/OS 10.10 httpGetRemaining

    Get the number of remaining bytes in the message body or current chunk.

    -size_t httpGetRemaining (
    -    http_t *http
    -);

    +size_t httpGetRemaining(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Remaining bytes

    Discussion

    @@ -3760,120 +3184,97 @@ message body is chunked or fixed-length.

    httpGetState

    Get the current state of the HTTP request.

    -http_state_t httpGetState (
    -    http_t *http
    -);

    +http_state_t httpGetState(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    HTTP state

     CUPS 1.2/macOS 10.5 httpGetStatus

    Get the status of the last HTTP request.

    -http_status_t httpGetStatus (
    -    http_t *http
    -);

    +http_status_t httpGetStatus(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    HTTP status

     CUPS 1.2/macOS 10.5 httpGetSubField2

    Get a sub-field value.

    -char *httpGetSubField2 (
    -    http_t *http,
    -    http_field_t field,
    -    const char *name,
    -    char *value,
    -    int valuelen
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    field
    -
    Field index
    -
    name
    -
    Name of sub-field
    -
    value
    -
    Value string
    -
    valuelen
    -
    Size of value buffer
    -
    +char *httpGetSubField2(http_t *http, http_field_t field, const char *name, char *value, int valuelen);

    +

    Parameters

    + + + + + + + + + + + +
    httpHTTP connection
    fieldField index
    nameName of sub-field
    valueValue string
    valuelenSize of value buffer

    Return Value

    Value or NULL

    httpGetVersion

    Get the HTTP version at the other end.

    -http_version_t httpGetVersion (
    -    http_t *http
    -);

    +http_version_t httpGetVersion(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    Version number

    httpGets

    Get a line of text from a HTTP connection.

    -char *httpGets (
    -    char *line,
    -    int length,
    -    http_t *http
    -);

    -

    Parameters

    -
    -
    line
    -
    Line to read into
    -
    length
    -
    Max length of buffer
    -
    http
    -
    HTTP connection
    -
    +char *httpGets(char *line, int length, http_t *http);

    +

    Parameters

    + + + + + + + +
    lineLine to read into
    lengthMax length of buffer
    httpHTTP connection

    Return Value

    Line or NULL

    httpHead

    Send a HEAD request to the server.

    -int httpHead (
    -    http_t *http,
    -    const char *uri
    -);

    +int httpHead(http_t *http, const char *uri);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    uri
    -
    URI for head
    -
    + + + + + +
    httpHTTP connection
    uriURI for head

    Return Value

    Status of call (0 = success)

    httpInitialize

    -

    URI for head

    -

    -void httpInitialize (void);

    -

    Return Value

    Initialize the HTTP interface library and set the default HTTP proxy (if any).

    +

    +void httpInitialize(void);

     CUPS 2.0/OS 10.10 httpIsChunked

    Report whether a message body is chunked.

    -int httpIsChunked (
    -    http_t *http
    -);

    +int httpIsChunked(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    1 if chunked, 0 if not

    Discussion

    @@ -3884,14 +3285,12 @@ variable-length chunks.

     CUPS 2.0/OS 10.10 httpIsEncrypted

    Report whether a connection is encrypted.

    -int httpIsEncrypted (
    -    http_t *http
    -);

    +int httpIsEncrypted(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    1 if encrypted, 0 if not

    Discussion

    @@ -3901,55 +3300,44 @@ int httpIsEncrypted (

     CUPS 2.0/OS 10.10 httpLoadCredentials

    Load X.509 credentials from a keychain file.

    -int httpLoadCredentials (
    -    const char *path,
    -    cups_array_t **credentials,
    -    const char *common_name
    -);

    -

    Parameters

    -
    -
    path
    -
    Keychain path or NULL for default
    -
    credentials
    -
    Credentials
    -
    common_name
    -
    Common name for credentials
    -
    +int httpLoadCredentials(const char *path, cups_array_t **credentials, const char *common_name);

    +

    Parameters

    + + + + + + + +
    pathKeychain path or NULL for default
    credentialsCredentials
    common_nameCommon name for credentials

    Return Value

    0 on success, -1 on error

    httpOptions

    Send an OPTIONS request to the server.

    -int httpOptions (
    -    http_t *http,
    -    const char *uri
    -);

    +int httpOptions(http_t *http, const char *uri);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    uri
    -
    URI for options
    -
    + + + + + +
    httpHTTP connection
    uriURI for options

    Return Value

    Status of call (0 = success)

     CUPS 1.7/macOS 10.9 httpPeek

    Peek at data from a HTTP connection.

    -ssize_t httpPeek (
    -    http_t *http,
    -    char *buffer,
    -    size_t length
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    buffer
    -
    Buffer for data
    -
    length
    -
    Maximum number of bytes
    -
    +ssize_t httpPeek(http_t *http, char *buffer, size_t length);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection
    bufferBuffer for data
    lengthMaximum number of bytes

    Return Value

    Number of bytes copied

    Discussion

    @@ -3963,475 +3351,303 @@ For non-blocking connections the usual timeouts apply.

    httpPost

    Send a POST request to the server.

    -int httpPost (
    -    http_t *http,
    -    const char *uri
    -);

    +int httpPost(http_t *http, const char *uri);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    uri
    -
    URI for post
    -
    + + + + + +
    httpHTTP connection
    uriURI for post

    Return Value

    Status of call (0 = success)

    httpPut

    Send a PUT request to the server.

    -int httpPut (
    -    http_t *http,
    -    const char *uri
    -);

    +int httpPut(http_t *http, const char *uri);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    uri
    -
    URI to put
    -
    + + + + + +
    httpHTTP connection
    uriURI to put

    Return Value

    Status of call (0 = success)

     CUPS 1.2/macOS 10.5 httpRead2

    Read data from a HTTP connection.

    -ssize_t httpRead2 (
    -    http_t *http,
    -    char *buffer,
    -    size_t length
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    buffer
    -
    Buffer for data
    -
    length
    -
    Maximum number of bytes
    -
    +ssize_t httpRead2(http_t *http, char *buffer, size_t length);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection
    bufferBuffer for data
    lengthMaximum number of bytes

    Return Value

    Number of bytes read

     CUPS 1.7/macOS 10.9 httpReadRequest

    Read a HTTP request from a connection.

    -http_state_t httpReadRequest (
    -    http_t *http,
    -    char *uri,
    -    size_t urilen
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    uri
    -
    URI buffer
    -
    urilen
    -
    Size of URI buffer
    -
    +http_state_t httpReadRequest(http_t *http, char *uri, size_t urilen);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection
    uriURI buffer
    urilenSize of URI buffer

    Return Value

    New state of connection

    httpReconnect2

    Reconnect to a HTTP server with timeout and optional cancel.

    -int httpReconnect2 (
    -    http_t *http,
    -    int msec,
    -    int *cancel
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    msec
    -
    Timeout in milliseconds
    -
    cancel
    -
    Pointer to "cancel" variable
    -
    +int httpReconnect2(http_t *http, int msec, int *cancel);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection
    msecTimeout in milliseconds
    cancelPointer to "cancel" variable

    Return Value

    0 on success, non-zero on failure

     CUPS 2.0/OS 10.10 httpResolveHostname

    Resolve the hostname of the HTTP connection address.

    -const char *httpResolveHostname (
    -    http_t *http,
    -    char *buffer,
    -    size_t bufsize
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    buffer
    -
    Hostname buffer
    -
    bufsize
    -
    Size of buffer
    -
    +const char *httpResolveHostname(http_t *http, char *buffer, size_t bufsize);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection
    bufferHostname buffer
    bufsizeSize of buffer

    Return Value

    Resolved hostname or NULL

     CUPS 2.0/OS 10.10 httpSaveCredentials

    Save X.509 credentials to a keychain file.

    -int httpSaveCredentials (
    -    const char *path,
    -    cups_array_t *credentials,
    -    const char *common_name
    -);

    -

    Parameters

    -
    -
    path
    -
    Keychain path or NULL for default
    -
    credentials
    -
    Credentials
    -
    common_name
    -
    Common name for credentials
    -
    +int httpSaveCredentials(const char *path, cups_array_t *credentials, const char *common_name);

    +

    Parameters

    + + + + + + + +
    pathKeychain path or NULL for default
    credentialsCredentials
    common_nameCommon name for credentials

    Return Value

    -1 on error, 0 on success

    -

    httpSeparate

    -

    + 400 year days

    -

    -void httpSeparate (
    -    const char *uri,
    -    char *scheme,
    -    char *username,
    -    char *host,
    -    int *port,
    -    char *resource
    -);

    -

    Parameters

    -
    -
    uri
    -
    Universal Resource Identifier
    -
    scheme
    -
    Scheme [32] (http, https, etc.)
    -
    username
    -
    Username [1024]
    -
    host
    -
    Hostname [1024]
    -
    port
    -
    Port number to use
    -
    resource
    -
    Resource/filename [1024]
    -
    -

    Return Value

    -

    Separate a Universal Resource Identifier into its -components.

    -

    This function is deprecated; use the httpSeparateURI() function instead. - -

    -

    httpSeparate2

    -

    Resource/filename [1024]

    -

    -void httpSeparate2 (
    -    const char *uri,
    -    char *scheme,
    -    int schemelen,
    -    char *username,
    -    int usernamelen,
    -    char *host,
    -    int hostlen,
    -    int *port,
    -    char *resource,
    -    int resourcelen
    -);

    -

    Parameters

    -
    -
    uri
    -
    Universal Resource Identifier
    -
    scheme
    -
    Scheme (http, https, etc.)
    -
    schemelen
    -
    Size of scheme buffer
    -
    username
    -
    Username
    -
    usernamelen
    -
    Size of username buffer
    -
    host
    -
    Hostname
    -
    hostlen
    -
    Size of hostname buffer
    -
    port
    -
    Port number to use
    -
    resource
    -
    Resource/filename
    -
    resourcelen
    -
    Size of resource buffer
    -
    -

    Return Value

    -

    Separate a Universal Resource Identifier into its -components.

    -

    This function is deprecated; use the httpSeparateURI() function instead. - - -

     CUPS 1.2/macOS 10.5 httpSeparateURI

    Separate a Universal Resource Identifier into its components.

    -http_uri_status_t httpSeparateURI (
    -    http_uri_coding_t decoding,
    -    const char *uri,
    -    char *scheme,
    -    int schemelen,
    -    char *username,
    -    int usernamelen,
    -    char *host,
    -    int hostlen,
    -    int *port,
    -    char *resource,
    -    int resourcelen
    -);

    -

    Parameters

    -
    -
    decoding
    -
    Decoding flags
    -
    uri
    -
    Universal Resource Identifier
    -
    scheme
    -
    Scheme (http, https, etc.)
    -
    schemelen
    -
    Size of scheme buffer
    -
    username
    -
    Username
    -
    usernamelen
    -
    Size of username buffer
    -
    host
    -
    Hostname
    -
    hostlen
    -
    Size of hostname buffer
    -
    port
    -
    Port number to use
    -
    resource
    -
    Resource/filename
    -
    resourcelen
    -
    Size of resource buffer
    -
    +http_uri_status_t httpSeparateURI(http_uri_coding_t decoding, const char *uri, char *scheme, int schemelen, char *username, int usernamelen, char *host, int hostlen, int *port, char *resource, int resourcelen);

    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    decodingDecoding flags
    uriUniversal Resource Identifier
    schemeScheme (http, https, etc.)
    schemelenSize of scheme buffer
    usernameUsername
    usernamelenSize of username buffer
    hostHostname
    hostlenSize of hostname buffer
    portPort number to use
    resourceResource/filename
    resourcelenSize of resource buffer

    Return Value

    Result of separation

    -

    httpSetAuthString

    -

    Always do encryption via SSL.

    -

    -void httpSetAuthString (
    -    http_t *http,
    -    const char *scheme,
    -    const char *data
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    scheme
    -
    Auth scheme (NULL to clear it)
    -
    data
    -
    Auth data (NULL for none)
    -
    -

    Return Value

    +

     CUPS 1.3/macOS 10.5 httpSetAuthString

    Set the current authorization string.

    +

    +void httpSetAuthString(http_t *http, const char *scheme, const char *data);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection
    schemeAuth scheme (NULL to clear it)
    dataAuth data (NULL for none)
    +

    Discussion

    This function just stores a copy of the current authorization string in the HTTP connection object. You must still call httpSetField() to set HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(), httpHead(), httpOptions(), httpPost, or httpPut().

    -

    httpSetCookie

    -

    Array of credentials

    +

     CUPS 1.1.19/macOS 10.3 httpSetCookie

    +

    Set the cookie value(s).

    -void httpSetCookie (
    -    http_t *http,
    -    const char *cookie
    -);

    +void httpSetCookie(http_t *http, const char *cookie);

    Parameters

    -
    -
    http
    -
    Connection
    -
    cookie
    -
    Cookie string
    -
    -

    Return Value

    -

    Set the cookie value(s).

    -

    + + + + + +
    httpConnection
    cookieCookie string

     CUPS 1.5/macOS 10.7 httpSetCredentials

    Set the credentials associated with an encrypted connection.

    -int httpSetCredentials (
    -    http_t *http,
    -    cups_array_t *credentials
    -);

    +int httpSetCredentials(http_t *http, cups_array_t *credentials);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    credentials
    -
    Array of credentials
    -
    + + + + + +
    httpHTTP connection
    credentialsArray of credentials

    Return Value

    Status of call (0 = success)

    -

    httpSetDefaultField

    -

    Cookie string

    -

    -void httpSetDefaultField (
    -    http_t *http,
    -    http_field_t field,
    -    const char *value
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    field
    -
    Field index
    -
    value
    -
    Value
    -
    -

    Return Value

    +

     CUPS 1.7/macOS 10.9 httpSetDefaultField

    Set the default value of an HTTP header.

    +

    +void httpSetDefaultField(http_t *http, http_field_t field, const char *value);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection
    fieldField index
    valueValue
    +

    Discussion

    Currently only HTTP_FIELD_ACCEPT_ENCODING, HTTP_FIELD_SERVER, and HTTP_FIELD_USER_AGENT can be set.

    -

    httpSetExpect

    -

    Value

    +

     CUPS 1.2/macOS 10.5 httpSetExpect

    +

    Set the Expect: header in a request.

    -void httpSetExpect (
    -    http_t *http,
    -    http_status_t expect
    -);

    +void httpSetExpect(http_t *http, http_status_t expect);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    expect
    -
    HTTP status to expect -(HTTP_STATUS_CONTINUE)
    -
    -

    Return Value

    -

    Set the Expect: header in a request.

    + + + + + +
    httpHTTP connection
    expectHTTP status to expect +(HTTP_STATUS_CONTINUE)
    +

    Discussion

    Currently only HTTP_STATUS_CONTINUE is supported for the "expect" argument.

    httpSetField

    -

    HTTP status to expect -(HTTP_STATUS_CONTINUE)

    -

    -void httpSetField (
    -    http_t *http,
    -    http_field_t field,
    -    const char *value
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    field
    -
    Field index
    -
    value
    -
    Value
    -
    -

    Return Value

    Set the value of an HTTP header.

    -

    httpSetKeepAlive

    -

    Check for a trailing dot on the hostname...

    -void httpSetKeepAlive (
    -    http_t *http,
    -    http_keepalive_t keep_alive
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    keep_alive
    -
    New Keep-Alive value
    -
    -

    Return Value

    +void httpSetField(http_t *http, http_field_t field, const char *value);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection
    fieldField index
    valueValue
    +

     CUPS 2.0/OS 10.10 httpSetKeepAlive

    Set the current Keep-Alive state of a connection.

    -

    -

    httpSetLength

    -

    New Keep-Alive value

    -

    -void httpSetLength (
    -    http_t *http,
    -    size_t length
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    length
    -
    Length (0 for chunked)
    -
    -

    Return Value

    +

    +void httpSetKeepAlive(http_t *http, http_keepalive_t keep_alive);

    +

    Parameters

    + + + + + +
    httpHTTP connection
    keep_aliveNew Keep-Alive value
    +

     CUPS 1.2/macOS 10.5 httpSetLength

    Set the content-length and content-encoding.

    -

    -

    httpSetTimeout

    -

    Length (0 for chunked)

    -

    -void httpSetTimeout (
    -    http_t *http,
    -    double timeout,
    -    http_timeout_cb_t cb,
    -    void *user_data
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    timeout
    -
    Number of seconds for timeout, -must be greater than 0
    -
    cb
    -
    Callback function or NULL
    -
    user_data
    -
    User data pointer
    -
    -

    Return Value

    +

    +void httpSetLength(http_t *http, size_t length);

    +

    Parameters

    + + + + + +
    httpHTTP connection
    lengthLength (0 for chunked)
    +

     CUPS 1.5/macOS 10.7 httpSetTimeout

    Set read/write timeouts and an optional callback.

    +

    +void httpSetTimeout(http_t *http, double timeout, http_timeout_cb_t cb, void *user_data);

    +

    Parameters

    + + + + + + + + + +
    httpHTTP connection
    timeoutNumber of seconds for timeout, +must be greater than 0
    cbCallback function or NULL
    user_dataUser data pointer
    +

    Discussion

    The optional timeout callback receives both the HTTP connection and a user data pointer and must return 1 to continue or 0 to error (time) out.

    -

    httpShutdown

    -

    User data pointer

    +

     CUPS 2.0/OS 10.10 httpShutdown

    +

    Shutdown one side of an HTTP connection.

    -void httpShutdown (
    -    http_t *http
    -);

    +void httpShutdown(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    -

    Return Value

    -

    Shutdown one side of an HTTP connection.

    -

    + + + +
    httpHTTP connection

     CUPS 2.0/OS 10.10 httpStateString

    Return the string describing a HTTP state value.

    -const char *httpStateString (
    -    http_state_t state
    -);

    +const char *httpStateString(http_state_t state);

    Parameters

    -
    -
    state
    -
    HTTP state value
    -
    + + + +
    stateHTTP state value

    Return Value

    State string

    httpStatus

    Return a short string describing a HTTP status code.

    -const char *httpStatus (
    -    http_status_t status
    -);

    +const char *httpStatus(http_status_t status);

    Parameters

    -
    -
    status
    -
    HTTP status code
    -
    + + + +
    statusHTTP status code

    Return Value

    Localized status string

    Discussion

    @@ -4440,116 +3656,94 @@ on the status strings defined in RFC 2616.

    httpTrace

    Send an TRACE request to the server.

    -int httpTrace (
    -    http_t *http,
    -    const char *uri
    -);

    +int httpTrace(http_t *http, const char *uri);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    uri
    -
    URI for trace
    -
    + + + + + +
    httpHTTP connection
    uriURI for trace

    Return Value

    Status of call (0 = success)

     CUPS 2.0/OS 10.10 httpURIStatusString

    Return a string describing a URI status code.

    -const char *httpURIStatusString (
    -    http_uri_status_t status
    -);

    +const char *httpURIStatusString(http_uri_status_t status);

    Parameters

    -
    -
    status
    -
    URI status code
    -
    + + + +
    statusURI status code

    Return Value

    Localized status string

    httpUpdate

    Update the current HTTP state for incoming data.

    -http_status_t httpUpdate (
    -    http_t *http
    -);

    +http_status_t httpUpdate(http_t *http);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    + + + +
    httpHTTP connection

    Return Value

    HTTP status

     CUPS 1.1.19/macOS 10.3 httpWait

    Wait for data available on a connection.

    -int httpWait (
    -    http_t *http,
    -    int msec
    -);

    +int httpWait(http_t *http, int msec);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    msec
    -
    Milliseconds to wait
    -
    + + + + + +
    httpHTTP connection
    msecMilliseconds to wait

    Return Value

    1 if data is available, 0 otherwise

     CUPS 1.2/macOS 10.5 httpWrite2

    Write data to a HTTP connection.

    -ssize_t httpWrite2 (
    -    http_t *http,
    -    const char *buffer,
    -    size_t length
    -);

    -

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    buffer
    -
    Buffer for data
    -
    length
    -
    Number of bytes to write
    -
    +ssize_t httpWrite2(http_t *http, const char *buffer, size_t length);

    +

    Parameters

    + + + + + + + +
    httpHTTP connection
    bufferBuffer for data
    lengthNumber of bytes to write

    Return Value

    Number of bytes written

     CUPS 1.7/macOS 10.9 httpWriteResponse

    Write a HTTP response to a client connection.

    -int httpWriteResponse (
    -    http_t *http,
    -    http_status_t status
    -);

    +int httpWriteResponse(http_t *http, http_status_t status);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    status
    -
    Status code
    -
    + + + + + +
    httpHTTP connection
    statusStatus code

    Return Value

    0 on success, -1 on error

    ippAddBoolean

    Add a boolean attribute to an IPP message.

    -ipp_attribute_t *ippAddBoolean (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    char value
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    value
    -
    Value of attribute
    -
    +ipp_attribute_t *ippAddBoolean(ipp_t *ipp, ipp_tag_t group, const char *name, char value);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    valueValue of attribute

    Return Value

    New attribute

    Discussion

    @@ -4564,26 +3758,20 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

    ippAddBooleans

    Add an array of boolean values.

    -ipp_attribute_t *ippAddBooleans (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    int num_values,
    -    const char *values
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    num_values
    -
    Number of values
    -
    values
    -
    Values
    -
    +ipp_attribute_t *ippAddBooleans(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, const char *values);

    +

    Parameters

    + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    num_valuesNumber of values
    valuesValues

    Return Value

    New attribute

    Discussion

    @@ -4598,23 +3786,18 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

     CUPS 1.1.19/macOS 10.3 ippAddCollection

    Add a collection value.

    -ipp_attribute_t *ippAddCollection (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    ipp_t *value
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    value
    -
    Value
    -
    +ipp_attribute_t *ippAddCollection(ipp_t *ipp, ipp_tag_t group, const char *name, ipp_t *value);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    valueValue

    Return Value

    New attribute

    Discussion

    @@ -4631,26 +3814,20 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

     CUPS 1.1.19/macOS 10.3 ippAddCollections

    Add an array of collection values.

    -ipp_attribute_t *ippAddCollections (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    int num_values,
    -    const ipp_t **values
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    num_values
    -
    Number of values
    -
    values
    -
    Values
    -
    +ipp_attribute_t *ippAddCollections(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, const ipp_t **values);

    +

    Parameters

    + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    num_valuesNumber of values
    valuesValues

    Return Value

    New attribute

    Discussion

    @@ -4667,23 +3844,18 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

    ippAddDate

    Add a date attribute to an IPP message.

    -ipp_attribute_t *ippAddDate (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    const ipp_uchar_t *value
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    value
    -
    Value
    -
    +ipp_attribute_t *ippAddDate(ipp_t *ipp, ipp_tag_t group, const char *name, const ipp_uchar_t *value);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    valueValue

    Return Value

    New attribute

    Discussion

    @@ -4698,26 +3870,20 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

    ippAddInteger

    Add a integer attribute to an IPP message.

    -ipp_attribute_t *ippAddInteger (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    ipp_tag_t value_tag,
    -    const char *name,
    -    int value
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    value_tag
    -
    Type of attribute
    -
    name
    -
    Name of attribute
    -
    value
    -
    Value of attribute
    -
    +ipp_attribute_t *ippAddInteger(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, int value);

    +

    Parameters

    + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    value_tagType of attribute
    nameName of attribute
    valueValue of attribute

    Return Value

    New attribute

    Discussion

    @@ -4735,29 +3901,22 @@ Supported values include enum (IPP_TAG_ENUM) and integer

    ippAddIntegers

    Add an array of integer values.

    -ipp_attribute_t *ippAddIntegers (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    ipp_tag_t value_tag,
    -    const char *name,
    -    int num_values,
    -    const int *values
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    value_tag
    -
    Type of attribute
    -
    name
    -
    Name of attribute
    -
    num_values
    -
    Number of values
    -
    values
    -
    Values
    -
    +ipp_attribute_t *ippAddIntegers(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, int num_values, const int *values);

    +

    Parameters

    + + + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    value_tagType of attribute
    nameName of attribute
    num_valuesNumber of values
    valuesValues

    Return Value

    New attribute

    Discussion

    @@ -4775,26 +3934,20 @@ Supported values include enum (IPP_TAG_ENUM) and integer

     CUPS 1.2/macOS 10.5 ippAddOctetString

    Add an octetString value to an IPP message.

    -ipp_attribute_t *ippAddOctetString (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    const void *data,
    -    int datalen
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    data
    -
    octetString data
    -
    datalen
    -
    Length of data in bytes
    -
    +ipp_attribute_t *ippAddOctetString(ipp_t *ipp, ipp_tag_t group, const char *name, const void *data, int datalen);

    +

    Parameters

    + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    dataoctetString data
    datalenLength of data in bytes

    Return Value

    New attribute

    Discussion

    @@ -4811,23 +3964,18 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

     CUPS 1.6/macOS 10.8 ippAddOutOfBand

    Add an out-of-band value to an IPP message.

    -ipp_attribute_t *ippAddOutOfBand (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    ipp_tag_t value_tag,
    -    const char *name
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    value_tag
    -
    Type of attribute
    -
    name
    -
    Name of attribute
    -
    +ipp_attribute_t *ippAddOutOfBand(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    groupIPP group
    value_tagType of attribute
    nameName of attribute

    Return Value

    New attribute

    Discussion

    @@ -4850,26 +3998,20 @@ admin-define (IPP_TAG_ADMINDEFINE).

    ippAddRange

    Add a range of values to an IPP message.

    -ipp_attribute_t *ippAddRange (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    int lower,
    -    int upper
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    lower
    -
    Lower value
    -
    upper
    -
    Upper value
    -
    +ipp_attribute_t *ippAddRange(ipp_t *ipp, ipp_tag_t group, const char *name, int lower, int upper);

    +

    Parameters

    + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    lowerLower value
    upperUpper value

    Return Value

    New attribute

    Discussion

    @@ -4886,29 +4028,22 @@ The lower parameter must be less than or equal to the upperippAddRanges

    Add ranges of values to an IPP message.

    -ipp_attribute_t *ippAddRanges (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    int num_values,
    -    const int *lower,
    -    const int *upper
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    num_values
    -
    Number of values
    -
    lower
    -
    Lower values
    -
    upper
    -
    Upper values
    -
    +ipp_attribute_t *ippAddRanges(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, const int *lower, const int *upper);

    +

    Parameters

    + + + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    num_valuesNumber of values
    lowerLower values
    upperUpper values

    Return Value

    New attribute

    Discussion

    @@ -4923,29 +4058,22 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

    ippAddResolution

    Add a resolution value to an IPP message.

    -ipp_attribute_t *ippAddResolution (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    ipp_res_t units,
    -    int xres,
    -    int yres
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    units
    -
    Units for resolution
    -
    xres
    -
    X resolution
    -
    yres
    -
    Y resolution
    -
    +ipp_attribute_t *ippAddResolution(ipp_t *ipp, ipp_tag_t group, const char *name, ipp_res_t units, int xres, int yres);

    +

    Parameters

    + + + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    unitsUnits for resolution
    xresX resolution
    yresY resolution

    Return Value

    New attribute

    Discussion

    @@ -4960,32 +4088,24 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

    ippAddResolutions

    Add resolution values to an IPP message.

    -ipp_attribute_t *ippAddResolutions (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    const char *name,
    -    int num_values,
    -    ipp_res_t units,
    -    const int *xres,
    -    const int *yres
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    name
    -
    Name of attribute
    -
    num_values
    -
    Number of values
    -
    units
    -
    Units for resolution
    -
    xres
    -
    X resolutions
    -
    yres
    -
    Y resolutions
    -
    +ipp_attribute_t *ippAddResolutions(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, ipp_res_t units, const int *xres, const int *yres);

    +

    Parameters

    + + + + + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    nameName of attribute
    num_valuesNumber of values
    unitsUnits for resolution
    xresX resolutions
    yresY resolutions

    Return Value

    New attribute

    Discussion

    @@ -5000,14 +4120,12 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

    ippAddSeparator

    Add a group separator to an IPP message.

    -ipp_attribute_t *ippAddSeparator (
    -    ipp_t *ipp
    -);

    +ipp_attribute_t *ippAddSeparator(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    + + + +
    ippIPP message

    Return Value

    New attribute

    Discussion

    @@ -5016,29 +4134,22 @@ the ippNew, ip

    ippAddString

    Add a language-encoded string to an IPP message.

    -ipp_attribute_t *ippAddString (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    ipp_tag_t value_tag,
    -    const char *name,
    -    const char *language,
    -    const char *value
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    value_tag
    -
    Type of attribute
    -
    name
    -
    Name of attribute
    -
    language
    -
    Language code
    -
    value
    -
    Value
    -
    +ipp_attribute_t *ippAddString(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, const char *language, const char *value);

    +

    Parameters

    + + + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    value_tagType of attribute
    nameName of attribute
    languageLanguage code
    valueValue

    Return Value

    New attribute

    Discussion

    @@ -5063,32 +4174,24 @@ textWithLanguage string values and must be NULL for all other strin

     CUPS 1.7/macOS 10.9 ippAddStringf

    Add a formatted string to an IPP message.

    -ipp_attribute_t *ippAddStringf (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    ipp_tag_t value_tag,
    -    const char *name,
    -    const char *language,
    -    const char *format,
    -    ...
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    value_tag
    -
    Type of attribute
    -
    name
    -
    Name of attribute
    -
    language
    -
    Language code (NULL for default)
    -
    format
    -
    Printf-style format string
    -
    ...
    -
    Additional arguments as needed
    -
    +ipp_attribute_t *ippAddStringf(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, const char *language, const char *format, ...);

    +

    Parameters

    + + + + + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    value_tagType of attribute
    nameName of attribute
    languageLanguage code (NULL for default)
    formatPrintf-style format string
    ...Additional arguments as needed

    Return Value

    New attribute

    Discussion

    @@ -5122,32 +4225,24 @@ the corresponding value type.

     CUPS 1.7/macOS 10.9 ippAddStringfv

    Add a formatted string to an IPP message.

    -ipp_attribute_t *ippAddStringfv (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    ipp_tag_t value_tag,
    -    const char *name,
    -    const char *language,
    -    const char *format,
    -    va_list ap
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    value_tag
    -
    Type of attribute
    -
    name
    -
    Name of attribute
    -
    language
    -
    Language code (NULL for default)
    -
    format
    -
    Printf-style format string
    -
    ap
    -
    Additional arguments
    -
    +ipp_attribute_t *ippAddStringfv(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, const char *language, const char *format, va_list ap);

    +

    Parameters

    + + + + + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    value_tagType of attribute
    nameName of attribute
    languageLanguage code (NULL for default)
    formatPrintf-style format string
    apAdditional arguments

    Return Value

    New attribute

    Discussion

    @@ -5181,32 +4276,24 @@ maximum length of the corresponding value type.

    ippAddStrings

    Add language-encoded strings to an IPP message.

    -ipp_attribute_t *ippAddStrings (
    -    ipp_t *ipp,
    -    ipp_tag_t group,
    -    ipp_tag_t value_tag,
    -    const char *name,
    -    int num_values,
    -    const char *language,
    -    const char *const *values
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    group
    -
    IPP group
    -
    value_tag
    -
    Type of attribute
    -
    name
    -
    Name of attribute
    -
    num_values
    -
    Number of values
    -
    language
    -
    Language code (NULL for default)
    -
    values
    -
    Values
    -
    +ipp_attribute_t *ippAddStrings(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, int num_values, const char *language, const char *const *values);

    +

    Parameters

    + + + + + + + + + + + + + + + +
    ippIPP message
    groupIPP group
    value_tagType of attribute
    nameName of attribute
    num_valuesNumber of values
    languageLanguage code (NULL for default)
    valuesValues

    Return Value

    New attribute

    Discussion

    @@ -5231,20 +4318,16 @@ textWithLanguage string values and must be NULL for all other strin

     CUPS 1.6/macOS 10.8 ippAttributeString

    Convert the attribute's value to a string.

    -size_t ippAttributeString (
    -    ipp_attribute_t *attr,
    -    char *buffer,
    -    size_t bufsize
    -);

    -

    Parameters

    -
    -
    attr
    -
    Attribute
    -
    buffer
    -
    String buffer or NULL
    -
    bufsize
    -
    Size of string buffer
    -
    +size_t ippAttributeString(ipp_attribute_t *attr, char *buffer, size_t bufsize);

    +

    Parameters

    + + + + + + + +
    attrAttribute
    bufferString buffer or NULL
    bufsizeSize of string buffer

    Return Value

    Number of bytes less nul

    Discussion

    @@ -5257,17 +4340,14 @@ just like (v)snprintf.

    Determine whether an attribute contains the specified value or is within the list of ranges.

    -int ippContainsInteger (
    -    ipp_attribute_t *attr,
    -    int value
    -);

    +int ippContainsInteger(ipp_attribute_t *attr, int value);

    Parameters

    -
    -
    attr
    -
    Attribute
    -
    value
    -
    Integer/enum value
    -
    + + + + + +
    attrAttribute
    valueInteger/enum value

    Return Value

    1 on a match, 0 on no match

    Discussion

    @@ -5280,17 +4360,14 @@ the attribute.

    Determine whether an attribute contains the specified string value.

    -int ippContainsString (
    -    ipp_attribute_t *attr,
    -    const char *value
    -);

    +int ippContainsString(ipp_attribute_t *attr, const char *value);

    Parameters

    -
    -
    attr
    -
    Attribute
    -
    value
    -
    String value
    -
    + + + + + +
    attrAttribute
    valueString value

    Return Value

    1 on a match, 0 on no match

    Discussion

    @@ -5301,20 +4378,16 @@ language, mimeMediaType, name, text, URI, or URI scheme value.

     CUPS 1.6/macOS 10.8 ippCopyAttribute

    Copy an attribute.

    -ipp_attribute_t *ippCopyAttribute (
    -    ipp_t *dst,
    -    ipp_attribute_t *srcattr,
    -    int quickcopy
    -);

    -

    Parameters

    -
    -
    dst
    -
    Destination IPP message
    -
    srcattr
    -
    Attribute to copy
    -
    quickcopy
    -
    1 for a referenced copy, 0 for normal
    -
    +ipp_attribute_t *ippCopyAttribute(ipp_t *dst, ipp_attribute_t *srcattr, int quickcopy);

    +

    Parameters

    + + + + + + + +
    dstDestination IPP message
    srcattrAttribute to copy
    quickcopy1 for a referenced copy, 0 for normal

    Return Value

    New attribute

    Discussion

    @@ -5327,26 +4400,20 @@ not be freed for the life of the destination.

     CUPS 1.6/macOS 10.8 ippCopyAttributes

    Copy attributes from one IPP message to another.

    -int ippCopyAttributes (
    -    ipp_t *dst,
    -    ipp_t *src,
    -    int quickcopy,
    -    ipp_copycb_t cb,
    -    void *context
    -);

    -

    Parameters

    -
    -
    dst
    -
    Destination IPP message
    -
    src
    -
    Source IPP message
    -
    quickcopy
    -
    1 for a referenced copy, 0 for normal
    -
    cb
    -
    Copy callback or NULL for none
    -
    context
    -
    Context pointer
    -
    +int ippCopyAttributes(ipp_t *dst, ipp_t *src, int quickcopy, ipp_copycb_t cb, void *context);

    +

    Parameters

    + + + + + + + + + + + +
    dstDestination IPP message
    srcSource IPP message
    quickcopy1 for a referenced copy, 0 for normal
    cbCopy callback or NULL for none
    contextContext pointer

    Return Value

    1 on success, 0 on error

    Discussion

    @@ -5365,14 +4432,12 @@ itself.

    Create a CUPS array of attribute names from the given requested-attributes attribute.

    -cups_array_t *ippCreateRequestedArray (
    -    ipp_t *request
    -);

    +cups_array_t *ippCreateRequestedArray(ipp_t *request);

    Parameters

    -
    -
    request
    -
    IPP request
    -
    + + + +
    requestIPP request

    Return Value

    CUPS array or NULL if all

    Discussion

    @@ -5394,79 +4459,49 @@ using the cupsArrayDelete function.

    Convert from RFC 1903 Date/Time format to UNIX time in seconds.

    -time_t ippDateToTime (
    -    const ipp_uchar_t *date
    -);

    +time_t ippDateToTime(const ipp_uchar_t *date);

    Parameters

    -
    -
    date
    -
    RFC 1903 date info
    -
    + + + +
    dateRFC 1903 date info

    Return Value

    UNIX time value

    ippDelete

    -

    RFC-1903 date/time format is:

    +

    Delete an IPP message.

    -void ippDelete (
    -    ipp_t *ipp
    -);

    +void ippDelete(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    -

    Return Value

    -

    Delete an IPP message.

    -

    Discussion

    -

    Byte(s) Description -------- ----------- -0-1 Year (0 to 65535) -2 Month (1 to 12) -3 Day (1 to 31) -4 Hours (0 to 23) -5 Minutes (0 to 59) -6 Seconds (0 to 60, 60 = "leap second") -7 Deciseconds (0 to 9) -8 +/- UTC -9 UTC hours (0 to 11) -10 UTC minutes (0 to 59)

    -

    ippDeleteAttribute

    -

    Next attribute

    -

    -void ippDeleteAttribute (
    -    ipp_t *ipp,
    -    ipp_attribute_t *attr
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    Attribute to delete
    -
    -

    Return Value

    + + + +
    ippIPP message
    +

     CUPS 1.1.19/macOS 10.3 ippDeleteAttribute

    Delete a single attribute in an IPP message.

    -

    +

    +void ippDeleteAttribute(ipp_t *ipp, ipp_attribute_t *attr);

    +

    Parameters

    + + + + + +
    ippIPP message
    attrAttribute to delete

     CUPS 1.6/macOS 10.8 ippDeleteValues

    Delete values in an attribute.

    -int ippDeleteValues (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    int count
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    Attribute
    -
    element
    -
    Index of first value to delete (0-based)
    -
    count
    -
    Number of values to delete
    -
    +int ippDeleteValues(ipp_t *ipp, ipp_attribute_t **attr, int element, int count);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    attrAttribute
    elementIndex of first value to delete (0-based)
    countNumber of values to delete

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -5481,78 +4516,64 @@ Deleting all values in an attribute deletes the attribute.

    ippEnumString

    Return a string corresponding to the enum value.

    -const char *ippEnumString (
    -    const char *attrname,
    -    int enumvalue
    -);

    +const char *ippEnumString(const char *attrname, int enumvalue);

    Parameters

    -
    -
    attrname
    -
    Attribute name
    -
    enumvalue
    -
    Enum value
    -
    + + + + + +
    attrnameAttribute name
    enumvalueEnum value

    Return Value

    Enum string

    ippEnumValue

    Return the value associated with a given enum string.

    -int ippEnumValue (
    -    const char *attrname,
    -    const char *enumstring
    -);

    +int ippEnumValue(const char *attrname, const char *enumstring);

    Parameters

    -
    -
    attrname
    -
    Attribute name
    -
    enumstring
    -
    Enum string
    -
    + + + + + +
    attrnameAttribute name
    enumstringEnum string

    Return Value

    Enum value or -1 if unknown

    ippErrorString

    Return a name for the given status code.

    -const char *ippErrorString (
    -    ipp_status_t error
    -);

    +const char *ippErrorString(ipp_status_t error);

    Parameters

    -
    -
    error
    -
    Error status
    -
    + + + +
    errorError status

    Return Value

    Text string

     CUPS 1.2/macOS 10.5 ippErrorValue

    Return a status code for the given name.

    -ipp_status_t ippErrorValue (
    -    const char *name
    -);

    +ipp_status_t ippErrorValue(const char *name);

    Parameters

    -
    -
    name
    -
    Name
    -
    + + + +
    nameName

    Return Value

    IPP status code

    ippFindAttribute

    Find a named attribute in a request.

    -ipp_attribute_t *ippFindAttribute (
    -    ipp_t *ipp,
    -    const char *name,
    -    ipp_tag_t type
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    name
    -
    Name of attribute
    -
    type
    -
    Type of attribute
    -
    +ipp_attribute_t *ippFindAttribute(ipp_t *ipp, const char *name, ipp_tag_t type);

    +

    Parameters

    + + + + + + + +
    ippIPP message
    nameName of attribute
    typeType of attribute

    Return Value

    Matching attribute

    Discussion

    @@ -5562,20 +4583,16 @@ of attribute and member names separated by slashes, for example

    ippFindNextAttribute

    Find the next named attribute in a request.

    -ipp_attribute_t *ippFindNextAttribute (
    -    ipp_t *ipp,
    -    const char *name,
    -    ipp_tag_t type
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    name
    -
    Name of attribute
    -
    type
    -
    Type of attribute
    -
    +ipp_attribute_t *ippFindNextAttribute(ipp_t *ipp, const char *name, ipp_tag_t type);

    +

    Parameters

    + + + + + + + +
    ippIPP message
    nameName of attribute
    typeType of attribute

    Return Value

    Matching attribute

    Discussion

    @@ -5585,30 +4602,25 @@ of attribute and member names separated by slashes, for example

     CUPS 1.6/macOS 10.8 ippFirstAttribute

    Return the first attribute in the message.

    -ipp_attribute_t *ippFirstAttribute (
    -    ipp_t *ipp
    -);

    +ipp_attribute_t *ippFirstAttribute(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    + + + +
    ippIPP message

    Return Value

    First attribute or NULL if none

     CUPS 1.6/macOS 10.8 ippGetBoolean

    Get a boolean value for an attribute.

    -int ippGetBoolean (
    -    ipp_attribute_t *attr,
    -    int element
    -);

    +int ippGetBoolean(ipp_attribute_t *attr, int element);

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    + + + + + +
    attrIPP attribute
    elementValue number (0-based)

    Return Value

    Boolean value or 0 on error

    Discussion

    @@ -5619,17 +4631,14 @@ int ippGetBoolean (

     CUPS 1.6/macOS 10.8 ippGetCollection

    Get a collection value for an attribute.

    -ipp_t *ippGetCollection (
    -    ipp_attribute_t *attr,
    -    int element
    -);

    +ipp_t *ippGetCollection(ipp_attribute_t *attr, int element);

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    + + + + + +
    attrIPP attribute
    elementValue number (0-based)

    Return Value

    Collection value or NULL on error

    Discussion

    @@ -5640,30 +4649,25 @@ int ippGetBoolean (

     CUPS 1.6/macOS 10.8 ippGetCount

    Get the number of values in an attribute.

    -int ippGetCount (
    -    ipp_attribute_t *attr
    -);

    +int ippGetCount(ipp_attribute_t *attr);

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    + + + +
    attrIPP attribute

    Return Value

    Number of values or 0 on error

     CUPS 1.6/macOS 10.8 ippGetDate

    Get a date value for an attribute.

    -const ipp_uchar_t *ippGetDate (
    -    ipp_attribute_t *attr,
    -    int element
    -);

    +const ipp_uchar_t *ippGetDate(ipp_attribute_t *attr, int element);

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    + + + + + +
    attrIPP attribute
    elementValue number (0-based)

    Return Value

    Date value or NULL

    Discussion

    @@ -5674,30 +4678,25 @@ const ipp_uchar_t *ippGetDate (

     CUPS 1.6/macOS 10.8 ippGetGroupTag

    Get the group associated with an attribute.

    -ipp_tag_t ippGetGroupTag (
    -    ipp_attribute_t *attr
    -);

    +ipp_tag_t ippGetGroupTag(ipp_attribute_t *attr);

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    + + + +
    attrIPP attribute

    Return Value

    Group tag or IPP_TAG_ZERO on error

     CUPS 1.6/macOS 10.8 ippGetInteger

    Get the integer/enum value for an attribute.

    -int ippGetInteger (
    -    ipp_attribute_t *attr,
    -    int element
    -);

    +int ippGetInteger(ipp_attribute_t *attr, int element);

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    + + + + + +
    attrIPP attribute
    elementValue number (0-based)

    Return Value

    Value or 0 on error

    Discussion

    @@ -5708,33 +4707,27 @@ int ippGetInteger (

     CUPS 1.6/macOS 10.8 ippGetName

    Get the attribute name.

    -const char *ippGetName (
    -    ipp_attribute_t *attr
    -);

    +const char *ippGetName(ipp_attribute_t *attr);

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    + + + +
    attrIPP attribute

    Return Value

    Attribute name or NULL for separators

     CUPS 1.7/macOS 10.9 ippGetOctetString

    Get an octetString value from an IPP attribute.

    -void *ippGetOctetString (
    -    ipp_attribute_t *attr,
    -    int element,
    -    int *datalen
    -);

    -

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    datalen
    -
    Length of octetString data
    -
    +void *ippGetOctetString(ipp_attribute_t *attr, int element, int *datalen);

    +

    Parameters

    + + + + + + + +
    attrIPP attribute
    elementValue number (0-based)
    datalenLength of octetString data

    Return Value

    Pointer to octetString data

    Discussion

    @@ -5745,33 +4738,27 @@ void *ippGetOctetString (

     CUPS 1.6/macOS 10.8 ippGetOperation

    Get the operation ID in an IPP message.

    -ipp_op_t ippGetOperation (
    -    ipp_t *ipp
    -);

    +ipp_op_t ippGetOperation(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP request message
    -
    + + + +
    ippIPP request message

    Return Value

    Operation ID or 0 on error

     CUPS 1.6/macOS 10.8 ippGetRange

    Get a rangeOfInteger value from an attribute.

    -int ippGetRange (
    -    ipp_attribute_t *attr,
    -    int element,
    -    int *uppervalue
    -);

    -

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    uppervalue
    -
    Upper value of range
    -
    +int ippGetRange(ipp_attribute_t *attr, int element, int *uppervalue);

    +

    Parameters

    + + + + + + + +
    attrIPP attribute
    elementValue number (0-based)
    uppervalueUpper value of range

    Return Value

    Lower value of range or 0

    Discussion

    @@ -5782,36 +4769,29 @@ int ippGetRange (

     CUPS 1.6/macOS 10.8 ippGetRequestId

    Get the request ID from an IPP message.

    -int ippGetRequestId (
    -    ipp_t *ipp
    -);

    +int ippGetRequestId(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    + + + +
    ippIPP message

    Return Value

    Request ID or 0 on error

     CUPS 1.6/macOS 10.8 ippGetResolution

    Get a resolution value for an attribute.

    -int ippGetResolution (
    -    ipp_attribute_t *attr,
    -    int element,
    -    int *yres,
    -    ipp_res_t *units
    -);

    -

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    yres
    -
    Vertical/feed resolution
    -
    units
    -
    Units for resolution
    -
    +int ippGetResolution(ipp_attribute_t *attr, int element, int *yres, ipp_res_t *units);

    +

    Parameters

    + + + + + + + + + +
    attrIPP attribute
    elementValue number (0-based)
    yresVertical/feed resolution
    unitsUnits for resolution

    Return Value

    Horizontal/cross feed resolution or 0

    Discussion

    @@ -5822,46 +4802,38 @@ int ippGetResolution (

     CUPS 1.6/macOS 10.8 ippGetState

    Get the IPP message state.

    -ipp_state_t ippGetState (
    -    ipp_t *ipp
    -);

    +ipp_state_t ippGetState(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    + + + +
    ippIPP message

    Return Value

    IPP message state value

     CUPS 1.6/macOS 10.8 ippGetStatusCode

    Get the status code from an IPP response or event message.

    -ipp_status_t ippGetStatusCode (
    -    ipp_t *ipp
    -);

    +ipp_status_t ippGetStatusCode(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP response or event message
    -
    + + + +
    ippIPP response or event message

    Return Value

    Status code in IPP message

    ippGetString

    -

    Return the value...

    -

    -const char *ippGetString (
    -    ipp_attribute_t *attr,
    -    int element,
    -    const char **language
    -);

    -

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    language
    -
    Language code (NULL for don't care)
    -
    +

    +

    +const char *ippGetString(ipp_attribute_t *attr, int element, const char **language);

    +

    Parameters

    + + + + + + + +
    attrIPP attribute
    elementValue number (0-based)
    languageLanguage code (NULL for don't care)

    Return Value

    Get the string and optionally the language code for an attribute.

    The element parameter specifies which value to get from 0 to @@ -5871,62 +4843,53 @@ const char *ippGetString (

     CUPS 1.6/macOS 10.8 ippGetValueTag

    Get the value tag for an attribute.

    -ipp_tag_t ippGetValueTag (
    -    ipp_attribute_t *attr
    -);

    +ipp_tag_t ippGetValueTag(ipp_attribute_t *attr);

    Parameters

    -
    -
    attr
    -
    IPP attribute
    -
    + + + +
    attrIPP attribute

    Return Value

    Value tag or IPP_TAG_ZERO on error

     CUPS 1.6/macOS 10.8 ippGetVersion

    Get the major and minor version number from an IPP message.

    -int ippGetVersion (
    -    ipp_t *ipp,
    -    int *minor
    -);

    +int ippGetVersion(ipp_t *ipp, int *minor);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    minor
    -
    Minor version number or NULL
    -
    + + + + + +
    ippIPP message
    minorMinor version number or NULL

    Return Value

    Major version number or 0 on error

    ippLength

    Compute the length of an IPP message.

    -size_t ippLength (
    -    ipp_t *ipp
    -);

    +size_t ippLength(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    + + + +
    ippIPP message

    Return Value

    Size of IPP message

    ippNew

    Allocate a new IPP message.

    -ipp_t *ippNew (void);

    +ipp_t *ippNew(void);

    Return Value

    New IPP message

     CUPS 1.2/macOS 10.5 ippNewRequest

    Allocate a new IPP request message.

    -ipp_t *ippNewRequest (
    -    ipp_op_t op
    -);

    +ipp_t *ippNewRequest(ipp_op_t op);

    Parameters

    -
    -
    op
    -
    Operation code
    -
    + + + +
    opOperation code

    Return Value

    IPP request message

    Discussion

    @@ -5938,14 +4901,12 @@ attributes-natural-language value is derived from the current locale.

     CUPS 1.7/macOS 10.9 ippNewResponse

    Allocate a new IPP response message.

    -ipp_t *ippNewResponse (
    -    ipp_t *request
    -);

    +ipp_t *ippNewResponse(ipp_t *request);

    Parameters

    -
    -
    request
    -
    IPP request message
    -
    + + + +
    requestIPP request message

    Return Value

    IPP response message

    Discussion

    @@ -5960,125 +4921,102 @@ respectively.

     CUPS 1.6/macOS 10.8 ippNextAttribute

    Return the next attribute in the message.

    -ipp_attribute_t *ippNextAttribute (
    -    ipp_t *ipp
    -);

    +ipp_attribute_t *ippNextAttribute(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    + + + +
    ippIPP message

    Return Value

    Next attribute or NULL if none

     CUPS 1.2/macOS 10.5 ippOpString

    Return a name for the given operation id.

    -const char *ippOpString (
    -    ipp_op_t op
    -);

    +const char *ippOpString(ipp_op_t op);

    Parameters

    -
    -
    op
    -
    Operation ID
    -
    + + + +
    opOperation ID

    Return Value

    Name

     CUPS 1.2/macOS 10.5 ippOpValue

    Return an operation id for the given name.

    -ipp_op_t ippOpValue (
    -    const char *name
    -);

    +ipp_op_t ippOpValue(const char *name);

    Parameters

    -
    -
    name
    -
    Textual name
    -
    + + + +
    nameTextual name

    Return Value

    Operation ID

    ippPort

    Return the default IPP port number.

    -int ippPort (void);

    +int ippPort(void);

    Return Value

    Port number

    ippRead

    Read data for an IPP message from a HTTP connection.

    -ipp_state_t ippRead (
    -    http_t *http,
    -    ipp_t *ipp
    -);

    +ipp_state_t ippRead(http_t *http, ipp_t *ipp);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    ipp
    -
    IPP data
    -
    + + + + + +
    httpHTTP connection
    ippIPP data

    Return Value

    Current state

     CUPS 1.1.19/macOS 10.3 ippReadFile

    Read data for an IPP message from a file.

    -ipp_state_t ippReadFile (
    -    int fd,
    -    ipp_t *ipp
    -);

    +ipp_state_t ippReadFile(int fd, ipp_t *ipp);

    Parameters

    -
    -
    fd
    -
    HTTP data
    -
    ipp
    -
    IPP data
    -
    + + + + + +
    fdHTTP data
    ippIPP data

    Return Value

    Current state

     CUPS 1.2/macOS 10.5 ippReadIO

    Read data for an IPP message.

    -ipp_state_t ippReadIO (
    -    void *src,
    -    ipp_iocb_t cb,
    -    int blocking,
    -    ipp_t *parent,
    -    ipp_t *ipp
    -);

    -

    Parameters

    -
    -
    src
    -
    Data source
    -
    cb
    -
    Read callback function
    -
    blocking
    -
    Use blocking IO?
    -
    parent
    -
    Parent request, if any
    -
    ipp
    -
    IPP data
    -
    +ipp_state_t ippReadIO(void *src, ipp_iocb_t cb, int blocking, ipp_t *parent, ipp_t *ipp);

    +

    Parameters

    + + + + + + + + + + + +
    srcData source
    cbRead callback function
    blockingUse blocking IO?
    parentParent request, if any
    ippIPP data

    Return Value

    Current state

     CUPS 1.6/macOS 10.8 ippSetBoolean

    Set a boolean value in an attribute.

    -int ippSetBoolean (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    int boolvalue
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    boolvalue
    -
    Boolean value
    -
    +int ippSetBoolean(ipp_t *ipp, ipp_attribute_t **attr, int element, int boolvalue);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    boolvalueBoolean value

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6094,23 +5032,18 @@ The element parameter specifies which value to set from 0 to

     CUPS 1.6/macOS 10.8 ippSetCollection

    Set a collection value in an attribute.

    -int ippSetCollection (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    ipp_t *colvalue
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    colvalue
    -
    Collection value
    -
    +int ippSetCollection(ipp_t *ipp, ipp_attribute_t **attr, int element, ipp_t *colvalue);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    colvalueCollection value

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6126,23 +5059,18 @@ The element parameter specifies which value to set from 0 to

     CUPS 1.6/macOS 10.8 ippSetDate

    Set a date value in an attribute.

    -int ippSetDate (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    const ipp_uchar_t *datevalue
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    datevalue
    -
    Date value
    -
    +int ippSetDate(ipp_t *ipp, ipp_attribute_t **attr, int element, const ipp_uchar_t *datevalue);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    datevalueDate value

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6158,20 +5086,16 @@ The element parameter specifies which value to set from 0 to

     CUPS 1.6/macOS 10.8 ippSetGroupTag

    Set the group tag of an attribute.

    -int ippSetGroupTag (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    ipp_tag_t group_tag
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    Attribute
    -
    group_tag
    -
    Group tag
    -
    +int ippSetGroupTag(ipp_t *ipp, ipp_attribute_t **attr, ipp_tag_t group_tag);

    +

    Parameters

    + + + + + + + +
    ippIPP message
    attrAttribute
    group_tagGroup tag

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6190,23 +5114,18 @@ event notification (IPP_TAG_EVENT_NOTIFICATION), operation

     CUPS 1.6/macOS 10.8 ippSetInteger

    Set an integer or enum value in an attribute.

    -int ippSetInteger (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    int intvalue
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    intvalue
    -
    Integer/enum value
    -
    +int ippSetInteger(ipp_t *ipp, ipp_attribute_t **attr, int element, int intvalue);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    intvalueInteger/enum value

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6222,20 +5141,16 @@ The element parameter specifies which value to set from 0 to

     CUPS 1.6/macOS 10.8 ippSetName

    Set the name of an attribute.

    -int ippSetName (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    const char *name
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    name
    -
    Attribute name
    -
    +int ippSetName(ipp_t *ipp, ipp_attribute_t **attr, const char *name);

    +

    Parameters

    + + + + + + + +
    ippIPP message
    attrIPP attribute
    nameAttribute name

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6248,26 +5163,20 @@ The attr parameter may be modified as a result of setting the value

     CUPS 1.7/macOS 10.9 ippSetOctetString

    Set an octetString value in an IPP attribute.

    -int ippSetOctetString (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    const void *data,
    -    int datalen
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    data
    -
    Pointer to octetString data
    -
    datalen
    -
    Length of octetString data
    -
    +int ippSetOctetString(ipp_t *ipp, ipp_attribute_t **attr, int element, const void *data, int datalen);

    +

    Parameters

    + + + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    dataPointer to octetString data
    datalenLength of octetString data

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6283,17 +5192,14 @@ The element parameter specifies which value to set from 0 to

     CUPS 1.6/macOS 10.8 ippSetOperation

    Set the operation ID in an IPP request message.

    -int ippSetOperation (
    -    ipp_t *ipp,
    -    ipp_op_t op
    -);

    +int ippSetOperation(ipp_t *ipp, ipp_op_t op);

    Parameters

    -
    -
    ipp
    -
    IPP request message
    -
    op
    -
    Operation ID
    -
    + + + + + +
    ippIPP request message
    opOperation ID

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6302,41 +5208,31 @@ the ippNew, ip

    ippSetPort

    -

    Pointer to library globals

    +

    Set the default port number.

    -void ippSetPort (
    -    int p
    -);

    +void ippSetPort(int p);

    Parameters

    -
    -
    p
    -
    Port number to use
    -
    -

    Return Value

    -

    Set the default port number.

    + + + +
    pPort number to use

     CUPS 1.6/macOS 10.8 ippSetRange

    Set a rangeOfInteger value in an attribute.

    -int ippSetRange (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    int lowervalue,
    -    int uppervalue
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    lowervalue
    -
    Lower bound for range
    -
    uppervalue
    -
    Upper bound for range
    -
    +int ippSetRange(ipp_t *ipp, ipp_attribute_t **attr, int element, int lowervalue, int uppervalue);

    +

    Parameters

    + + + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    lowervalueLower bound for range
    uppervalueUpper bound for range

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6352,17 +5248,14 @@ The element parameter specifies which value to set from 0 to

     CUPS 1.6/macOS 10.8 ippSetRequestId

    Set the request ID in an IPP message.

    -int ippSetRequestId (
    -    ipp_t *ipp,
    -    int request_id
    -);

    +int ippSetRequestId(ipp_t *ipp, int request_id);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    request_id
    -
    Request ID
    -
    + + + + + +
    ippIPP message
    request_idRequest ID

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6375,29 +5268,22 @@ The request_id parameter must be greater than 0.

     CUPS 1.6/macOS 10.8 ippSetResolution

    Set a resolution value in an attribute.

    -int ippSetResolution (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    ipp_res_t unitsvalue,
    -    int xresvalue,
    -    int yresvalue
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    unitsvalue
    -
    Resolution units
    -
    xresvalue
    -
    Horizontal/cross feed resolution
    -
    yresvalue
    -
    Vertical/feed resolution
    -
    +int ippSetResolution(ipp_t *ipp, ipp_attribute_t **attr, int element, ipp_res_t unitsvalue, int xresvalue, int yresvalue);

    +

    Parameters

    + + + + + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    unitsvalueResolution units
    xresvalueHorizontal/cross feed resolution
    yresvalueVertical/feed resolution

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6413,33 +5299,27 @@ The element parameter specifies which value to set from 0 to

     CUPS 1.6/macOS 10.8 ippSetState

    Set the current state of the IPP message.

    -int ippSetState (
    -    ipp_t *ipp,
    -    ipp_state_t state
    -);

    +int ippSetState(ipp_t *ipp, ipp_state_t state);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    state
    -
    IPP state value
    -
    + + + + + +
    ippIPP message
    stateIPP state value

    Return Value

    1 on success, 0 on failure

     CUPS 1.6/macOS 10.8 ippSetStatusCode

    Set the status code in an IPP response or event message.

    -int ippSetStatusCode (
    -    ipp_t *ipp,
    -    ipp_status_t status
    -);

    +int ippSetStatusCode(ipp_t *ipp, ipp_status_t status);

    Parameters

    -
    -
    ipp
    -
    IPP response or event message
    -
    status
    -
    Status code
    -
    + + + + + +
    ippIPP response or event message
    statusStatus code

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6450,23 +5330,18 @@ the ippNew, ip

     CUPS 1.6/macOS 10.8 ippSetString

    Set a string value in an attribute.

    -int ippSetString (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    const char *strvalue
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    strvalue
    -
    String value
    -
    +int ippSetString(ipp_t *ipp, ipp_attribute_t **attr, int element, const char *strvalue);

    +

    Parameters

    + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    strvalueString value

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6482,26 +5357,20 @@ The element parameter specifies which value to set from 0 to

     CUPS 1.7/macOS 10.9 ippSetStringf

    Set a formatted string value of an attribute.

    -int ippSetStringf (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    const char *format,
    -    ...
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    format
    -
    Printf-style format string
    -
    ...
    -
    Additional arguments as needed
    -
    +int ippSetStringf(ipp_t *ipp, ipp_attribute_t **attr, int element, const char *format, ...);

    +

    Parameters

    + + + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    formatPrintf-style format string
    ...Additional arguments as needed

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6522,26 +5391,20 @@ the corresponding value type.

     CUPS 1.7/macOS 10.9 ippSetStringfv

    Set a formatted string value of an attribute.

    -int ippSetStringfv (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    int element,
    -    const char *format,
    -    va_list ap
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    element
    -
    Value number (0-based)
    -
    format
    -
    Printf-style format string
    -
    ap
    -
    Pointer to additional arguments
    -
    +int ippSetStringfv(ipp_t *ipp, ipp_attribute_t **attr, int element, const char *format, va_list ap);

    +

    Parameters

    + + + + + + + + + + + +
    ippIPP message
    attrIPP attribute
    elementValue number (0-based)
    formatPrintf-style format string
    apPointer to additional arguments

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6562,20 +5425,16 @@ the corresponding value type.

     CUPS 1.6/macOS 10.8 ippSetValueTag

    Set the value tag of an attribute.

    -int ippSetValueTag (
    -    ipp_t *ipp,
    -    ipp_attribute_t **attr,
    -    ipp_tag_t value_tag
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    attr
    -
    IPP attribute
    -
    value_tag
    -
    Value tag
    -
    +int ippSetValueTag(ipp_t *ipp, ipp_attribute_t **attr, ipp_tag_t value_tag);

    +

    Parameters

    + + + + + + + +
    ippIPP message
    attrIPP attribute
    value_tagValue tag

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6600,20 +5459,16 @@ code for the current locale.

     CUPS 1.6/macOS 10.8 ippSetVersion

    Set the version number in an IPP message.

    -int ippSetVersion (
    -    ipp_t *ipp,
    -    int major,
    -    int minor
    -);

    -

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    major
    -
    Major version number (major.minor)
    -
    minor
    -
    Minor version number (major.minor)
    -
    +int ippSetVersion(ipp_t *ipp, int major, int minor);

    +

    Parameters

    + + + + + + + +
    ippIPP message
    majorMajor version number (major.minor)
    minorMinor version number (major.minor)

    Return Value

    1 on success, 0 on failure

    Discussion

    @@ -6626,27 +5481,23 @@ The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2.

     CUPS 2.0/OS 10.10 ippStateString

    Return the name corresponding to a state value.

    -const char *ippStateString (
    -    ipp_state_t state
    -);

    +const char *ippStateString(ipp_state_t state);

    Parameters

    -
    -
    state
    -
    State value
    -
    + + + +
    stateState value

    Return Value

    State name

     CUPS 1.4/macOS 10.6 ippTagString

    Return the tag name corresponding to a tag value.

    -const char *ippTagString (
    -    ipp_tag_t tag
    -);

    +const char *ippTagString(ipp_tag_t tag);

    Parameters

    -
    -
    tag
    -
    Tag value
    -
    + + + +
    tagTag value

    Return Value

    Tag name

    Discussion

    @@ -6656,14 +5507,12 @@ const char *ippTagString (

     CUPS 1.4/macOS 10.6 ippTagValue

    Return the tag value corresponding to a tag name.

    -ipp_tag_t ippTagValue (
    -    const char *name
    -);

    +ipp_tag_t ippTagValue(const char *name);

    Parameters

    -
    -
    name
    -
    Tag name
    -
    + + + +
    nameTag name

    Return Value

    Tag value

    Discussion

    @@ -6673,27 +5522,23 @@ ipp_tag_t ippTagValue (

    ippTimeToDate

    Convert from UNIX time to RFC 1903 format.

    -const ipp_uchar_t *ippTimeToDate (
    -    time_t t
    -);

    +const ipp_uchar_t *ippTimeToDate(time_t t);

    Parameters

    -
    -
    t
    -
    UNIX time value
    -
    + + + +
    tUNIX time value

    Return Value

    RFC-1903 date/time data

     CUPS 1.7/macOS 10.9 ippValidateAttribute

    Validate the contents of an attribute.

    -int ippValidateAttribute (
    -    ipp_attribute_t *attr
    -);

    +int ippValidateAttribute(ipp_attribute_t *attr);

    Parameters

    -
    -
    attr
    -
    Attribute
    -
    + + + +
    attrAttribute

    Return Value

    1 if valid, 0 otherwise

    Discussion

    @@ -6705,14 +5550,12 @@ failure, cupsLastErrorString() is set to a human-readable message.

     CUPS 1.7/macOS 10.9 ippValidateAttributes

    Validate all attributes in an IPP message.

    -int ippValidateAttributes (
    -    ipp_t *ipp
    -);

    +int ippValidateAttributes(ipp_t *ipp);

    Parameters

    -
    -
    ipp
    -
    IPP message
    -
    + + + +
    ippIPP message

    Return Value

    1 if valid, 0 otherwise

    Discussion

    @@ -6724,58 +5567,46 @@ to a human-readable message on failure.

    ippWrite

    Write data for an IPP message to a HTTP connection.

    -ipp_state_t ippWrite (
    -    http_t *http,
    -    ipp_t *ipp
    -);

    +ipp_state_t ippWrite(http_t *http, ipp_t *ipp);

    Parameters

    -
    -
    http
    -
    HTTP connection
    -
    ipp
    -
    IPP data
    -
    + + + + + +
    httpHTTP connection
    ippIPP data

    Return Value

    Current state

     CUPS 1.1.19/macOS 10.3 ippWriteFile

    Write data for an IPP message to a file.

    -ipp_state_t ippWriteFile (
    -    int fd,
    -    ipp_t *ipp
    -);

    +ipp_state_t ippWriteFile(int fd, ipp_t *ipp);

    Parameters

    -
    -
    fd
    -
    HTTP data
    -
    ipp
    -
    IPP data
    -
    + + + + + +
    fdHTTP data
    ippIPP data

    Return Value

    Current state

     CUPS 1.2/macOS 10.5 ippWriteIO

    Write data for an IPP message.

    -ipp_state_t ippWriteIO (
    -    void *dst,
    -    ipp_iocb_t cb,
    -    int blocking,
    -    ipp_t *parent,
    -    ipp_t *ipp
    -);

    -

    Parameters

    -
    -
    dst
    -
    Destination
    -
    cb
    -
    Write callback function
    -
    blocking
    -
    Use blocking IO?
    -
    parent
    -
    Parent IPP message
    -
    ipp
    -
    IPP data
    -
    +ipp_state_t ippWriteIO(void *dst, ipp_iocb_t cb, int blocking, ipp_t *parent, ipp_t *ipp);

    +

    Parameters

    + + + + + + + + + + + +
    dstDestination
    cbWrite callback function
    blockingUse blocking IO?
    parentParent IPP message
    ippIPP data

    Return Value

    Current state

    Data Types

    @@ -6806,11 +5637,6 @@ typedef struct _cups_dinfo_s cups_dinfo_t;

    Job

    typedef struct cups_job_s cups_job_t; -

    -

    cups_lang_t

    -

    Language Cache Structure

    -

    -typedef struct cups_lang_s cups_lang_t;

    cups_option_t

    Printer Options

    @@ -6913,7 +5739,7 @@ typedef int(*)(void *context, ipp_t *dst,  CUPS 1.2/macOS 10.5 ipp_iocb_t

    IPP IO Callback Function

    -typedef ssize_t(*)(void *context, ipp_uchar_t *buffer, size_t bytes) ipp_iocb_t; +typedef ssize_t(*)(void *context, ipp_uchar_t *buffer, size_t bytes) ipp_iocb_t;

    ipp_orient_t

    Orientation values

    @@ -6944,11 +5770,6 @@ typedef enum ipp_state_e ipp_state_t;

    IPP request/response data

    typedef struct _ipp_s ipp_t; -

    -

    ipp_uchar_t

    -

    Unsigned 8-bit integer/character

    -

    -typedef unsigned char ipp_uchar_t;

    Structures

    cups_dest_s

    @@ -6960,16 +5781,16 @@ typedef unsigned char ipp_uchar_t;     cups_option_t *options;
    };

    Members

    -
    -
    instance
    -
    Local instance name or NULL
    -
    is_default
    -
    Is this printer the default?
    -
    num_options
    -
    Number of options
    -
    options
    -
    Options
    -
    + + + + + + + + + +
    instance Local instance name or NULL
    is_default Is this printer the default?
    num_options Number of options
    options Options

    cups_job_s

    Job

    struct cups_job_s {
    @@ -6986,49 +5807,30 @@ typedef unsigned char ipp_uchar_t;     char *user;
    };

    Members

    -
    -
    completed_time
    -
    Time the job was completed
    -
    creation_time
    -
    Time the job was created
    -
    dest
    -
    Printer or class name
    -
    format
    -
    Document format
    -
    id
    -
    The job ID
    -
    priority
    -
    Priority (1-100)
    -
    processing_time
    -
    Time the job was processed
    -
    size
    -
    Size in kilobytes
    -
    state
    -
    Job state
    -
    title
    -
    Title/job name
    -
    user
    -
    User that submitted the job
    -
    -

    cups_lang_s

    -

    Language Cache Structure

    -

    struct cups_lang_s {
    -    cups_encoding_t encoding;
    -    char language[16];
    -    struct cups_lang_s *next;
    -    int used;
    -};

    -

    Members

    -
    -
    encoding
    -
    Text encoding
    -
    language[16]
    -
    Language/locale name
    -
    next
    -
    Next language in cache
    -
    used
    -
    Number of times this entry has been used.
    -
    + + + + + + + + + + + + + + + + + + + + + + + +
    completed_time Time the job was completed
    creation_time Time the job was created
    dest Printer or class name
    format Document format
    id The job ID
    priority Priority (1-100)
    processing_time Time the job was processed
    size Size in kilobytes
    state Job state
    title Title/job name
    user User that submitted the job

    cups_option_s

    Printer Options

    struct cups_option_s {
    @@ -7036,12 +5838,12 @@ typedef unsigned char ipp_uchar_t;     char *value;
    };

    Members

    -
    -
    name
    -
    Name of option
    -
    value
    -
    Value of option
    -
    + + + + + +
    name Name of option
    value Value of option

     CUPS 1.6/macOS 10.8 cups_size_s

    Media Size

    struct cups_size_s {
    @@ -7049,899 +5851,509 @@ typedef unsigned char ipp_uchar_t;     int width, length, bottom, left, right, top;
    };

    Members

    -
    -
    media[128]
    -
    Media name to use
    -
    top
    -
    Top margin in hundredths of -millimeters
    -
    + + + + + +
    media[128] Media name to use
    top Top margin in hundredths of +millimeters

    Constants

    cups_ptype_e

    Printer type/capability bit constants

    Constants

    -
    -
    CUPS_PRINTER_AUTHENTICATED  CUPS 1.2/macOS 10.5 
    -
    Printer requires authentication -
    -
    CUPS_PRINTER_BIND
    -
    Can bind output
    -
    CUPS_PRINTER_BW
    -
    Can do B&W printing
    -
    CUPS_PRINTER_CLASS
    -
    Printer class
    -
    CUPS_PRINTER_COLLATE
    -
    Can quickly collate copies
    -
    CUPS_PRINTER_COLOR
    -
    Can do color printing
    -
    CUPS_PRINTER_COMMANDS  CUPS 1.2/macOS 10.5 
    -
    Printer supports maintenance commands -
    -
    CUPS_PRINTER_COPIES
    -
    Can do copies in hardware
    -
    CUPS_PRINTER_COVER
    -
    Can cover output
    -
    CUPS_PRINTER_DEFAULT
    -
    Default printer on network
    -
    CUPS_PRINTER_DISCOVERED  CUPS 1.2/macOS 10.5 
    -
    Printer was discovered
    -
    CUPS_PRINTER_DUPLEX
    -
    Can do two-sided printing
    -
    CUPS_PRINTER_FAX
    -
    Fax queue
    -
    CUPS_PRINTER_LARGE
    -
    Can print on D/E/A1/A0-size media
    -
    CUPS_PRINTER_LOCAL
    -
    Local printer or class
    -
    CUPS_PRINTER_MEDIUM
    -
    Can print on Tabloid/B/C/A3/A2-size media
    -
    CUPS_PRINTER_NOT_SHARED  CUPS 1.2/macOS 10.5 
    -
    Printer is not shared -
    -
    CUPS_PRINTER_PUNCH
    -
    Can punch output
    -
    CUPS_PRINTER_REJECTING
    -
    Printer is rejecting jobs
    -
    CUPS_PRINTER_REMOTE
    -
    Remote printer or class
    -
    CUPS_PRINTER_SMALL
    -
    Can print on Letter/Legal/A4-size media
    -
    CUPS_PRINTER_SORT
    -
    Can sort output
    -
    CUPS_PRINTER_STAPLE
    -
    Can staple output
    -
    CUPS_PRINTER_VARIABLE
    -
    Can print on rolls and custom-size media
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    CUPS_PRINTER_AUTHENTICATED  CUPS 1.2/macOS 10.5  Printer requires authentication +
    CUPS_PRINTER_BIND Can bind output
    CUPS_PRINTER_BW Can do B&W printing
    CUPS_PRINTER_CLASS Printer class
    CUPS_PRINTER_COLLATE Can quickly collate copies
    CUPS_PRINTER_COLOR Can do color printing
    CUPS_PRINTER_COMMANDS  CUPS 1.2/macOS 10.5  Printer supports maintenance commands +
    CUPS_PRINTER_COPIES Can do copies in hardware
    CUPS_PRINTER_COVER Can cover output
    CUPS_PRINTER_DEFAULT Default printer on network
    CUPS_PRINTER_DISCOVERED  CUPS 1.2/macOS 10.5  Printer was discovered
    CUPS_PRINTER_DUPLEX Can do two-sided printing
    CUPS_PRINTER_FAX Fax queue
    CUPS_PRINTER_LARGE Can print on D/E/A1/A0-size media
    CUPS_PRINTER_LOCAL Local printer or class
    CUPS_PRINTER_MEDIUM Can print on Tabloid/B/C/A3/A2-size media
    CUPS_PRINTER_NOT_SHARED  CUPS 1.2/macOS 10.5  Printer is not shared +
    CUPS_PRINTER_PUNCH Can punch output
    CUPS_PRINTER_REJECTING Printer is rejecting jobs
    CUPS_PRINTER_REMOTE Remote printer or class
    CUPS_PRINTER_SMALL Can print on Letter/Legal/A4-size media
    CUPS_PRINTER_SORT Can sort output
    CUPS_PRINTER_STAPLE Can staple output
    CUPS_PRINTER_VARIABLE Can print on rolls and custom-size media

    http_encoding_e

    HTTP transfer encoding values

    Constants

    -
    -
    HTTP_ENCODING_CHUNKED
    -
    Data is chunked
    -
    HTTP_ENCODING_FIELDS
    -
    Sending HTTP fields
    -
    HTTP_ENCODING_LENGTH
    -
    Data is sent with Content-Length
    -
    + + + + +
    HTTP_ENCODING_CHUNKED Data is chunked
    HTTP_ENCODING_FIELDS Sending HTTP fields
    HTTP_ENCODING_LENGTH Data is sent with Content-Length

    http_encryption_e

    HTTP encryption values

    Constants

    -
    -
    HTTP_ENCRYPTION_ALWAYS
    -
    Always encrypt (SSL)
    -
    HTTP_ENCRYPTION_IF_REQUESTED
    -
    Encrypt if requested (TLS upgrade)
    -
    HTTP_ENCRYPTION_NEVER
    -
    Never encrypt
    -
    HTTP_ENCRYPTION_REQUIRED
    -
    Encryption is required (TLS upgrade)
    -
    + + + + + +
    HTTP_ENCRYPTION_ALWAYS Always encrypt (SSL)
    HTTP_ENCRYPTION_IF_REQUESTED Encrypt if requested (TLS upgrade)
    HTTP_ENCRYPTION_NEVER Never encrypt
    HTTP_ENCRYPTION_REQUIRED Encryption is required (TLS upgrade)

    http_field_e

    HTTP field names

    Constants

    -
    -
    HTTP_FIELD_ACCEPT_ENCODING  CUPS 1.7/macOS 10.9 
    -
    Accepting-Encoding field
    -
    HTTP_FIELD_ACCEPT_LANGUAGE
    -
    Accept-Language field
    -
    HTTP_FIELD_ACCEPT_RANGES
    -
    Accept-Ranges field
    -
    HTTP_FIELD_ALLOW  CUPS 1.7/macOS 10.9 
    -
    Allow field
    -
    HTTP_FIELD_AUTHORIZATION
    -
    Authorization field
    -
    HTTP_FIELD_CONNECTION
    -
    Connection field
    -
    HTTP_FIELD_CONTENT_ENCODING
    -
    Content-Encoding field
    -
    HTTP_FIELD_CONTENT_LANGUAGE
    -
    Content-Language field
    -
    HTTP_FIELD_CONTENT_LENGTH
    -
    Content-Length field
    -
    HTTP_FIELD_CONTENT_LOCATION
    -
    Content-Location field
    -
    HTTP_FIELD_CONTENT_MD5
    -
    Content-MD5 field
    -
    HTTP_FIELD_CONTENT_RANGE
    -
    Content-Range field
    -
    HTTP_FIELD_CONTENT_TYPE
    -
    Content-Type field
    -
    HTTP_FIELD_CONTENT_VERSION
    -
    Content-Version field
    -
    HTTP_FIELD_DATE
    -
    Date field
    -
    HTTP_FIELD_HOST
    -
    Host field
    -
    HTTP_FIELD_IF_MODIFIED_SINCE
    -
    If-Modified-Since field
    -
    HTTP_FIELD_IF_UNMODIFIED_SINCE
    -
    If-Unmodified-Since field
    -
    HTTP_FIELD_KEEP_ALIVE
    -
    Keep-Alive field
    -
    HTTP_FIELD_LAST_MODIFIED
    -
    Last-Modified field
    -
    HTTP_FIELD_LINK
    -
    Link field
    -
    HTTP_FIELD_LOCATION
    -
    Location field
    -
    HTTP_FIELD_MAX
    -
    Maximum field index
    -
    HTTP_FIELD_RANGE
    -
    Range field
    -
    HTTP_FIELD_REFERER
    -
    Referer field
    -
    HTTP_FIELD_RETRY_AFTER
    -
    Retry-After field
    -
    HTTP_FIELD_SERVER  CUPS 1.7/macOS 10.9 
    -
    Server field
    -
    HTTP_FIELD_TRANSFER_ENCODING
    -
    Transfer-Encoding field
    -
    HTTP_FIELD_UNKNOWN
    -
    Unknown field
    -
    HTTP_FIELD_UPGRADE
    -
    Upgrade field
    -
    HTTP_FIELD_USER_AGENT
    -
    User-Agent field
    -
    HTTP_FIELD_WWW_AUTHENTICATE
    -
    WWW-Authenticate field
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    HTTP_FIELD_ACCEPT_ENCODING  CUPS 1.7/macOS 10.9  Accepting-Encoding field
    HTTP_FIELD_ACCEPT_LANGUAGE Accept-Language field
    HTTP_FIELD_ACCEPT_RANGES Accept-Ranges field
    HTTP_FIELD_ALLOW  CUPS 1.7/macOS 10.9  Allow field
    HTTP_FIELD_AUTHORIZATION Authorization field
    HTTP_FIELD_CONNECTION Connection field
    HTTP_FIELD_CONTENT_ENCODING Content-Encoding field
    HTTP_FIELD_CONTENT_LANGUAGE Content-Language field
    HTTP_FIELD_CONTENT_LENGTH Content-Length field
    HTTP_FIELD_CONTENT_LOCATION Content-Location field
    HTTP_FIELD_CONTENT_MD5 Content-MD5 field
    HTTP_FIELD_CONTENT_RANGE Content-Range field
    HTTP_FIELD_CONTENT_TYPE Content-Type field
    HTTP_FIELD_CONTENT_VERSION Content-Version field
    HTTP_FIELD_DATE Date field
    HTTP_FIELD_HOST Host field
    HTTP_FIELD_IF_MODIFIED_SINCE If-Modified-Since field
    HTTP_FIELD_IF_UNMODIFIED_SINCE If-Unmodified-Since field
    HTTP_FIELD_KEEP_ALIVE Keep-Alive field
    HTTP_FIELD_LAST_MODIFIED Last-Modified field
    HTTP_FIELD_LINK Link field
    HTTP_FIELD_LOCATION Location field
    HTTP_FIELD_MAX Maximum field index
    HTTP_FIELD_RANGE Range field
    HTTP_FIELD_REFERER Referer field
    HTTP_FIELD_RETRY_AFTER Retry-After field
    HTTP_FIELD_SERVER  CUPS 1.7/macOS 10.9  Server field
    HTTP_FIELD_TRANSFER_ENCODING Transfer-Encoding field
    HTTP_FIELD_UNKNOWN Unknown field
    HTTP_FIELD_UPGRADE Upgrade field
    HTTP_FIELD_USER_AGENT User-Agent field
    HTTP_FIELD_WWW_AUTHENTICATE WWW-Authenticate field

    http_keepalive_e

    HTTP keep-alive values

    Constants

    -
    -
    HTTP_KEEPALIVE_OFF
    -
    No keep alive support
    -
    HTTP_KEEPALIVE_ON
    -
    Use keep alive
    -
    + + + +
    HTTP_KEEPALIVE_OFF No keep alive support
    HTTP_KEEPALIVE_ON Use keep alive

    http_state_e

    HTTP state values; states are server-oriented...

    Constants

    -
    -
    HTTP_STATE_CONNECT
    -
    CONNECT command, waiting for blank line
    -
    HTTP_STATE_DELETE
    -
    DELETE command, waiting for blank line
    -
    HTTP_STATE_ERROR
    -
    Error on socket
    -
    HTTP_STATE_GET
    -
    GET command, waiting for blank line
    -
    HTTP_STATE_GET_SEND
    -
    GET command, sending data
    -
    HTTP_STATE_HEAD
    -
    HEAD command, waiting for blank line
    -
    HTTP_STATE_OPTIONS
    -
    OPTIONS command, waiting for blank line
    -
    HTTP_STATE_POST
    -
    POST command, waiting for blank line
    -
    HTTP_STATE_POST_RECV
    -
    POST command, receiving data
    -
    HTTP_STATE_POST_SEND
    -
    POST command, sending data
    -
    HTTP_STATE_PUT
    -
    PUT command, waiting for blank line
    -
    HTTP_STATE_PUT_RECV
    -
    PUT command, receiving data
    -
    HTTP_STATE_STATUS
    -
    Command complete, sending status
    -
    HTTP_STATE_TRACE
    -
    TRACE command, waiting for blank line
    -
    HTTP_STATE_UNKNOWN_METHOD  CUPS 1.7/macOS 10.9 
    -
    Unknown request method, waiting for blank line
    -
    HTTP_STATE_UNKNOWN_VERSION  CUPS 1.7/macOS 10.9 
    -
    Unknown request method, waiting for blank line
    -
    HTTP_STATE_WAITING
    -
    Waiting for command
    -
    + + + + + + + + + + + + + + + + + + +
    HTTP_STATE_CONNECT CONNECT command, waiting for blank line
    HTTP_STATE_DELETE DELETE command, waiting for blank line
    HTTP_STATE_ERROR Error on socket
    HTTP_STATE_GET GET command, waiting for blank line
    HTTP_STATE_GET_SEND GET command, sending data
    HTTP_STATE_HEAD HEAD command, waiting for blank line
    HTTP_STATE_OPTIONS OPTIONS command, waiting for blank line
    HTTP_STATE_POST POST command, waiting for blank line
    HTTP_STATE_POST_RECV POST command, receiving data
    HTTP_STATE_POST_SEND POST command, sending data
    HTTP_STATE_PUT PUT command, waiting for blank line
    HTTP_STATE_PUT_RECV PUT command, receiving data
    HTTP_STATE_STATUS Command complete, sending status
    HTTP_STATE_TRACE TRACE command, waiting for blank line
    HTTP_STATE_UNKNOWN_METHOD  CUPS 1.7/macOS 10.9  Unknown request method, waiting for blank line
    HTTP_STATE_UNKNOWN_VERSION  CUPS 1.7/macOS 10.9  Unknown request method, waiting for blank line
    HTTP_STATE_WAITING Waiting for command

    http_status_e

    HTTP status codes

    Constants

    -
    -
    HTTP_STATUS_ACCEPTED
    -
    DELETE command was successful
    -
    HTTP_STATUS_BAD_GATEWAY
    -
    Bad gateway
    -
    HTTP_STATUS_BAD_REQUEST
    -
    Bad request
    -
    HTTP_STATUS_CONFLICT
    -
    Request is self-conflicting
    -
    HTTP_STATUS_CONTINUE
    -
    Everything OK, keep going...
    -
    HTTP_STATUS_CREATED
    -
    PUT command was successful
    -
    HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED  CUPS 1.4 
    -
    User canceled authorization
    -
    HTTP_STATUS_CUPS_PKI_ERROR  CUPS 1.5/macOS 10.7 
    -
    Error negotiating a secure connection
    -
    HTTP_STATUS_ERROR
    -
    An error response from httpXxxx()
    -
    HTTP_STATUS_EXPECTATION_FAILED
    -
    The expectation given in an Expect header field was not met
    -
    HTTP_STATUS_FORBIDDEN
    -
    Forbidden to access this URI
    -
    HTTP_STATUS_GATEWAY_TIMEOUT
    -
    Gateway connection timed out
    -
    HTTP_STATUS_GONE
    -
    Server has gone away
    -
    HTTP_STATUS_LENGTH_REQUIRED
    -
    A content length or encoding is required
    -
    HTTP_STATUS_METHOD_NOT_ALLOWED
    -
    Method is not allowed
    -
    HTTP_STATUS_MOVED_PERMANENTLY
    -
    Document has moved permanently
    -
    HTTP_STATUS_MOVED_TEMPORARILY
    -
    Document has moved temporarily
    -
    HTTP_STATUS_MULTIPLE_CHOICES
    -
    Multiple files match request
    -
    HTTP_STATUS_NONE  CUPS 1.7/macOS 10.9 
    -
    No Expect value
    -
    HTTP_STATUS_NOT_ACCEPTABLE
    -
    Not Acceptable
    -
    HTTP_STATUS_NOT_AUTHORITATIVE
    -
    Information isn't authoritative
    -
    HTTP_STATUS_NOT_FOUND
    -
    URI was not found
    -
    HTTP_STATUS_NOT_IMPLEMENTED
    -
    Feature not implemented
    -
    HTTP_STATUS_NOT_MODIFIED
    -
    File not modified
    -
    HTTP_STATUS_NOT_SUPPORTED
    -
    HTTP version not supported
    -
    HTTP_STATUS_NO_CONTENT
    -
    Successful command, no new data
    -
    HTTP_STATUS_OK
    -
    OPTIONS/GET/HEAD/POST/TRACE command was successful
    -
    HTTP_STATUS_PARTIAL_CONTENT
    -
    Only a partial file was received/sent
    -
    HTTP_STATUS_PAYMENT_REQUIRED
    -
    Payment required
    -
    HTTP_STATUS_PRECONDITION
    -
    Precondition failed
    -
    HTTP_STATUS_PROXY_AUTHENTICATION
    -
    Proxy Authentication is Required
    -
    HTTP_STATUS_REQUESTED_RANGE
    -
    The requested range is not satisfiable
    -
    HTTP_STATUS_REQUEST_TIMEOUT
    -
    Request timed out
    -
    HTTP_STATUS_REQUEST_TOO_LARGE
    -
    Request entity too large
    -
    HTTP_STATUS_RESET_CONTENT
    -
    Content was reset/recreated
    -
    HTTP_STATUS_SEE_OTHER
    -
    See this other link...
    -
    HTTP_STATUS_SERVER_ERROR
    -
    Internal server error
    -
    HTTP_STATUS_SERVICE_UNAVAILABLE
    -
    Service is unavailable
    -
    HTTP_STATUS_SWITCHING_PROTOCOLS
    -
    HTTP upgrade to TLS/SSL
    -
    HTTP_STATUS_UNAUTHORIZED
    -
    Unauthorized to access host
    -
    HTTP_STATUS_UNSUPPORTED_MEDIATYPE
    -
    The requested media type is unsupported
    -
    HTTP_STATUS_UPGRADE_REQUIRED
    -
    Upgrade to SSL/TLS required
    -
    HTTP_STATUS_URI_TOO_LONG
    -
    URI too long
    -
    HTTP_STATUS_USE_PROXY
    -
    Must use a proxy to access this URI
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    HTTP_STATUS_ACCEPTED DELETE command was successful
    HTTP_STATUS_BAD_GATEWAY Bad gateway
    HTTP_STATUS_BAD_REQUEST Bad request
    HTTP_STATUS_CONFLICT Request is self-conflicting
    HTTP_STATUS_CONTINUE Everything OK, keep going...
    HTTP_STATUS_CREATED PUT command was successful
    HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED  CUPS 1.4  User canceled authorization
    HTTP_STATUS_CUPS_PKI_ERROR  CUPS 1.5/macOS 10.7  Error negotiating a secure connection
    HTTP_STATUS_ERROR An error response from httpXxxx()
    HTTP_STATUS_EXPECTATION_FAILED The expectation given in an Expect header field was not met
    HTTP_STATUS_FORBIDDEN Forbidden to access this URI
    HTTP_STATUS_GATEWAY_TIMEOUT Gateway connection timed out
    HTTP_STATUS_GONE Server has gone away
    HTTP_STATUS_LENGTH_REQUIRED A content length or encoding is required
    HTTP_STATUS_METHOD_NOT_ALLOWED Method is not allowed
    HTTP_STATUS_MOVED_PERMANENTLY Document has moved permanently
    HTTP_STATUS_MOVED_TEMPORARILY Document has moved temporarily
    HTTP_STATUS_MULTIPLE_CHOICES Multiple files match request
    HTTP_STATUS_NONE  CUPS 1.7/macOS 10.9  No Expect value
    HTTP_STATUS_NOT_ACCEPTABLE Not Acceptable
    HTTP_STATUS_NOT_AUTHORITATIVE Information isn't authoritative
    HTTP_STATUS_NOT_FOUND URI was not found
    HTTP_STATUS_NOT_IMPLEMENTED Feature not implemented
    HTTP_STATUS_NOT_MODIFIED File not modified
    HTTP_STATUS_NOT_SUPPORTED HTTP version not supported
    HTTP_STATUS_NO_CONTENT Successful command, no new data
    HTTP_STATUS_OK OPTIONS/GET/HEAD/POST/TRACE command was successful
    HTTP_STATUS_PARTIAL_CONTENT Only a partial file was received/sent
    HTTP_STATUS_PAYMENT_REQUIRED Payment required
    HTTP_STATUS_PRECONDITION Precondition failed
    HTTP_STATUS_PROXY_AUTHENTICATION Proxy Authentication is Required
    HTTP_STATUS_REQUESTED_RANGE The requested range is not satisfiable
    HTTP_STATUS_REQUEST_TIMEOUT Request timed out
    HTTP_STATUS_REQUEST_TOO_LARGE Request entity too large
    HTTP_STATUS_RESET_CONTENT Content was reset/recreated
    HTTP_STATUS_SEE_OTHER See this other link...
    HTTP_STATUS_SERVER_ERROR Internal server error
    HTTP_STATUS_SERVICE_UNAVAILABLE Service is unavailable
    HTTP_STATUS_SWITCHING_PROTOCOLS HTTP upgrade to TLS/SSL
    HTTP_STATUS_UNAUTHORIZED Unauthorized to access host
    HTTP_STATUS_UNSUPPORTED_MEDIATYPE The requested media type is unsupported
    HTTP_STATUS_UPGRADE_REQUIRED Upgrade to SSL/TLS required
    HTTP_STATUS_URI_TOO_LONG URI too long
    HTTP_STATUS_USE_PROXY Must use a proxy to access this URI

     CUPS 2.0/OS 10.10 http_trust_e

    Level of trust for credentials

    Constants

    -
    -
    HTTP_TRUST_CHANGED
    -
    Credentials have changed
    -
    HTTP_TRUST_EXPIRED
    -
    Credentials are expired
    -
    HTTP_TRUST_INVALID
    -
    Credentials are invalid
    -
    HTTP_TRUST_OK
    -
    Credentials are OK/trusted
    -
    HTTP_TRUST_RENEWED
    -
    Credentials have been renewed
    -
    HTTP_TRUST_UNKNOWN
    -
    Credentials are unknown/new
    -
    + + + + + + + +
    HTTP_TRUST_CHANGED Credentials have changed
    HTTP_TRUST_EXPIRED Credentials are expired
    HTTP_TRUST_INVALID Credentials are invalid
    HTTP_TRUST_OK Credentials are OK/trusted
    HTTP_TRUST_RENEWED Credentials have been renewed
    HTTP_TRUST_UNKNOWN Credentials are unknown/new

    http_uri_coding_e

    URI en/decode flags

    Constants

    -
    -
    HTTP_URI_CODING_ALL
    -
    En/decode everything
    -
    HTTP_URI_CODING_HOSTNAME
    -
    En/decode the hostname portion
    -
    HTTP_URI_CODING_MOST
    -
    En/decode all but the query
    -
    HTTP_URI_CODING_NONE
    -
    Don't en/decode anything
    -
    HTTP_URI_CODING_QUERY
    -
    En/decode the query portion
    -
    HTTP_URI_CODING_RESOURCE
    -
    En/decode the resource portion
    -
    HTTP_URI_CODING_RFC6874
    -
    Use RFC 6874 address format
    -
    HTTP_URI_CODING_USERNAME
    -
    En/decode the username portion
    -
    + + + + + + + + + +
    HTTP_URI_CODING_ALL En/decode everything
    HTTP_URI_CODING_HOSTNAME En/decode the hostname portion
    HTTP_URI_CODING_MOST En/decode all but the query
    HTTP_URI_CODING_NONE Don't en/decode anything
    HTTP_URI_CODING_QUERY En/decode the query portion
    HTTP_URI_CODING_RESOURCE En/decode the resource portion
    HTTP_URI_CODING_RFC6874 Use RFC 6874 address format
    HTTP_URI_CODING_USERNAME En/decode the username portion

     CUPS 1.2 http_uri_status_e

    URI separation status

    Constants

    -
    -
    HTTP_URI_STATUS_BAD_ARGUMENTS
    -
    Bad arguments to function (error)
    -
    HTTP_URI_STATUS_BAD_HOSTNAME
    -
    Bad hostname in URI (error)
    -
    HTTP_URI_STATUS_BAD_PORT
    -
    Bad port number in URI (error)
    -
    HTTP_URI_STATUS_BAD_RESOURCE
    -
    Bad resource in URI (error)
    -
    HTTP_URI_STATUS_BAD_SCHEME
    -
    Bad scheme in URI (error)
    -
    HTTP_URI_STATUS_BAD_URI
    -
    Bad/empty URI (error)
    -
    HTTP_URI_STATUS_BAD_USERNAME
    -
    Bad username in URI (error)
    -
    HTTP_URI_STATUS_MISSING_RESOURCE
    -
    Missing resource in URI (warning)
    -
    HTTP_URI_STATUS_MISSING_SCHEME
    -
    Missing scheme in URI (warning)
    -
    HTTP_URI_STATUS_OK
    -
    URI decoded OK
    -
    HTTP_URI_STATUS_OVERFLOW
    -
    URI buffer for httpAssembleURI is too small
    -
    HTTP_URI_STATUS_UNKNOWN_SCHEME
    -
    Unknown scheme in URI (warning)
    -
    + + + + + + + + + + + + + +
    HTTP_URI_STATUS_BAD_ARGUMENTS Bad arguments to function (error)
    HTTP_URI_STATUS_BAD_HOSTNAME Bad hostname in URI (error)
    HTTP_URI_STATUS_BAD_PORT Bad port number in URI (error)
    HTTP_URI_STATUS_BAD_RESOURCE Bad resource in URI (error)
    HTTP_URI_STATUS_BAD_SCHEME Bad scheme in URI (error)
    HTTP_URI_STATUS_BAD_URI Bad/empty URI (error)
    HTTP_URI_STATUS_BAD_USERNAME Bad username in URI (error)
    HTTP_URI_STATUS_MISSING_RESOURCE Missing resource in URI (warning)
    HTTP_URI_STATUS_MISSING_SCHEME Missing scheme in URI (warning)
    HTTP_URI_STATUS_OK URI decoded OK
    HTTP_URI_STATUS_OVERFLOW URI buffer for httpAssembleURI is too small
    HTTP_URI_STATUS_UNKNOWN_SCHEME Unknown scheme in URI (warning)

    ipp_finishings_e

    Finishings values

    Constants

    -
    -
    IPP_FINISHINGS_BALE
    -
    Bale (any type)
    -
    IPP_FINISHINGS_BIND
    -
    Bind
    -
    IPP_FINISHINGS_BIND_BOTTOM
    -
    Bind on bottom
    -
    IPP_FINISHINGS_BIND_LEFT
    -
    Bind on left
    -
    IPP_FINISHINGS_BIND_RIGHT
    -
    Bind on right
    -
    IPP_FINISHINGS_BIND_TOP
    -
    Bind on top
    -
    IPP_FINISHINGS_BOOKLET_MAKER
    -
    Fold to make booklet
    -
    IPP_FINISHINGS_COAT
    -
    Apply protective liquid or powder coating
    -
    IPP_FINISHINGS_COVER
    -
    Add cover
    -
    IPP_FINISHINGS_EDGE_STITCH
    -
    Stitch along any side
    -
    IPP_FINISHINGS_EDGE_STITCH_BOTTOM
    -
    Stitch along bottom edge
    -
    IPP_FINISHINGS_EDGE_STITCH_LEFT
    -
    Stitch along left side
    -
    IPP_FINISHINGS_EDGE_STITCH_RIGHT
    -
    Stitch along right side
    -
    IPP_FINISHINGS_EDGE_STITCH_TOP
    -
    Stitch along top edge
    -
    IPP_FINISHINGS_FOLD
    -
    Fold (any type)
    -
    IPP_FINISHINGS_FOLD_ACCORDIAN
    -
    Accordian-fold the paper vertically into four sections
    -
    IPP_FINISHINGS_FOLD_DOUBLE_GATE
    -
    Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically
    -
    IPP_FINISHINGS_FOLD_ENGINEERING_Z
    -
    Fold the paper vertically into two small sections and one larger, forming an elongated Z
    -
    IPP_FINISHINGS_FOLD_GATE
    -
    Fold the top and bottom quarters of the paper towards the midline
    -
    IPP_FINISHINGS_FOLD_HALF
    -
    Fold the paper in half vertically
    -
    IPP_FINISHINGS_FOLD_HALF_Z
    -
    Fold the paper in half horizontally, then Z-fold the paper vertically
    -
    IPP_FINISHINGS_FOLD_LEFT_GATE
    -
    Fold the top quarter of the paper towards the midline
    -
    IPP_FINISHINGS_FOLD_LETTER
    -
    Fold the paper into three sections vertically; sometimes also known as a C fold
    -
    IPP_FINISHINGS_FOLD_PARALLEL
    -
    Fold the paper in half vertically two times, yielding four sections
    -
    IPP_FINISHINGS_FOLD_POSTER
    -
    Fold the paper in half horizontally and vertically; sometimes also called a cross fold
    -
    IPP_FINISHINGS_FOLD_RIGHT_GATE
    -
    Fold the bottom quarter of the paper towards the midline
    -
    IPP_FINISHINGS_FOLD_Z
    -
    Fold the paper vertically into three sections, forming a Z
    -
    IPP_FINISHINGS_JOG_OFFSET
    -
    Offset for binding (any type)
    -
    IPP_FINISHINGS_LAMINATE
    -
    Apply protective (solid) material
    -
    IPP_FINISHINGS_NONE
    -
    No finishing
    -
    IPP_FINISHINGS_PUNCH
    -
    Punch (any location/count)
    -
    IPP_FINISHINGS_PUNCH_BOTTOM_LEFT
    -
    Punch 1 hole bottom left
    -
    IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT
    -
    Punch 1 hole bottom right
    -
    IPP_FINISHINGS_PUNCH_DUAL_BOTTOM
    -
    Punch 2 holes bottom edge
    -
    IPP_FINISHINGS_PUNCH_DUAL_LEFT
    -
    Punch 2 holes left side
    -
    IPP_FINISHINGS_PUNCH_DUAL_RIGHT
    -
    Punch 2 holes right side
    -
    IPP_FINISHINGS_PUNCH_DUAL_TOP
    -
    Punch 2 holes top edge
    -
    IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM
    -
    Pucnh multiple holes bottom edge
    -
    IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT
    -
    Pucnh multiple holes left side
    -
    IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT
    -
    Pucnh multiple holes right side
    -
    IPP_FINISHINGS_PUNCH_MULTIPLE_TOP
    -
    Pucnh multiple holes top edge
    -
    IPP_FINISHINGS_PUNCH_QUAD_BOTTOM
    -
    Punch 4 holes bottom edge
    -
    IPP_FINISHINGS_PUNCH_QUAD_LEFT
    -
    Punch 4 holes left side
    -
    IPP_FINISHINGS_PUNCH_QUAD_RIGHT
    -
    Punch 4 holes right side
    -
    IPP_FINISHINGS_PUNCH_QUAD_TOP
    -
    Punch 4 holes top edge
    -
    IPP_FINISHINGS_PUNCH_TOP_LEFT
    -
    Punch 1 hole top left
    -
    IPP_FINISHINGS_PUNCH_TOP_RIGHT
    -
    Punch 1 hole top right
    -
    IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM
    -
    Punch 3 holes bottom edge
    -
    IPP_FINISHINGS_PUNCH_TRIPLE_LEFT
    -
    Punch 3 holes left side
    -
    IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT
    -
    Punch 3 holes right side
    -
    IPP_FINISHINGS_PUNCH_TRIPLE_TOP
    -
    Punch 3 holes top edge
    -
    IPP_FINISHINGS_SADDLE_STITCH
    -
    Staple interior
    -
    IPP_FINISHINGS_STAPLE
    -
    Staple (any location/method)
    -
    IPP_FINISHINGS_STAPLE_BOTTOM_LEFT
    -
    Staple bottom left corner
    -
    IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT
    -
    Staple bottom right corner
    -
    IPP_FINISHINGS_STAPLE_DUAL_BOTTOM
    -
    Two staples on bottom
    -
    IPP_FINISHINGS_STAPLE_DUAL_LEFT
    -
    Two staples on left
    -
    IPP_FINISHINGS_STAPLE_DUAL_RIGHT
    -
    Two staples on right
    -
    IPP_FINISHINGS_STAPLE_DUAL_TOP
    -
    Two staples on top
    -
    IPP_FINISHINGS_STAPLE_TOP_LEFT
    -
    Staple top left corner
    -
    IPP_FINISHINGS_STAPLE_TOP_RIGHT
    -
    Staple top right corner
    -
    IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM
    -
    Three staples on bottom
    -
    IPP_FINISHINGS_STAPLE_TRIPLE_LEFT
    -
    Three staples on left
    -
    IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT
    -
    Three staples on right
    -
    IPP_FINISHINGS_STAPLE_TRIPLE_TOP
    -
    Three staples on top
    -
    IPP_FINISHINGS_TRIM
    -
    Trim (any type)
    -
    IPP_FINISHINGS_TRIM_AFTER_COPIES
    -
    Trim output after each copy
    -
    IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS
    -
    Trim output after each document
    -
    IPP_FINISHINGS_TRIM_AFTER_JOB
    -
    Trim output after job
    -
    IPP_FINISHINGS_TRIM_AFTER_PAGES
    -
    Trim output after each page
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    IPP_FINISHINGS_BALE Bale (any type)
    IPP_FINISHINGS_BIND Bind
    IPP_FINISHINGS_BIND_BOTTOM Bind on bottom
    IPP_FINISHINGS_BIND_LEFT Bind on left
    IPP_FINISHINGS_BIND_RIGHT Bind on right
    IPP_FINISHINGS_BIND_TOP Bind on top
    IPP_FINISHINGS_BOOKLET_MAKER Fold to make booklet
    IPP_FINISHINGS_COAT Apply protective liquid or powder coating
    IPP_FINISHINGS_COVER Add cover
    IPP_FINISHINGS_EDGE_STITCH Stitch along any side
    IPP_FINISHINGS_EDGE_STITCH_BOTTOM Stitch along bottom edge
    IPP_FINISHINGS_EDGE_STITCH_LEFT Stitch along left side
    IPP_FINISHINGS_EDGE_STITCH_RIGHT Stitch along right side
    IPP_FINISHINGS_EDGE_STITCH_TOP Stitch along top edge
    IPP_FINISHINGS_FOLD Fold (any type)
    IPP_FINISHINGS_FOLD_ACCORDIAN Accordian-fold the paper vertically into four sections
    IPP_FINISHINGS_FOLD_DOUBLE_GATE Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically
    IPP_FINISHINGS_FOLD_ENGINEERING_Z Fold the paper vertically into two small sections and one larger, forming an elongated Z
    IPP_FINISHINGS_FOLD_GATE Fold the top and bottom quarters of the paper towards the midline
    IPP_FINISHINGS_FOLD_HALF Fold the paper in half vertically
    IPP_FINISHINGS_FOLD_HALF_Z Fold the paper in half horizontally, then Z-fold the paper vertically
    IPP_FINISHINGS_FOLD_LEFT_GATE Fold the top quarter of the paper towards the midline
    IPP_FINISHINGS_FOLD_LETTER Fold the paper into three sections vertically; sometimes also known as a C fold
    IPP_FINISHINGS_FOLD_PARALLEL Fold the paper in half vertically two times, yielding four sections
    IPP_FINISHINGS_FOLD_POSTER Fold the paper in half horizontally and vertically; sometimes also called a cross fold
    IPP_FINISHINGS_FOLD_RIGHT_GATE Fold the bottom quarter of the paper towards the midline
    IPP_FINISHINGS_FOLD_Z Fold the paper vertically into three sections, forming a Z
    IPP_FINISHINGS_JOG_OFFSET Offset for binding (any type)
    IPP_FINISHINGS_LAMINATE Apply protective (solid) material
    IPP_FINISHINGS_NONE No finishing
    IPP_FINISHINGS_PUNCH Punch (any location/count)
    IPP_FINISHINGS_PUNCH_BOTTOM_LEFT Punch 1 hole bottom left
    IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT Punch 1 hole bottom right
    IPP_FINISHINGS_PUNCH_DUAL_BOTTOM Punch 2 holes bottom edge
    IPP_FINISHINGS_PUNCH_DUAL_LEFT Punch 2 holes left side
    IPP_FINISHINGS_PUNCH_DUAL_RIGHT Punch 2 holes right side
    IPP_FINISHINGS_PUNCH_DUAL_TOP Punch 2 holes top edge
    IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM Pucnh multiple holes bottom edge
    IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT Pucnh multiple holes left side
    IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT Pucnh multiple holes right side
    IPP_FINISHINGS_PUNCH_MULTIPLE_TOP Pucnh multiple holes top edge
    IPP_FINISHINGS_PUNCH_QUAD_BOTTOM Punch 4 holes bottom edge
    IPP_FINISHINGS_PUNCH_QUAD_LEFT Punch 4 holes left side
    IPP_FINISHINGS_PUNCH_QUAD_RIGHT Punch 4 holes right side
    IPP_FINISHINGS_PUNCH_QUAD_TOP Punch 4 holes top edge
    IPP_FINISHINGS_PUNCH_TOP_LEFT Punch 1 hole top left
    IPP_FINISHINGS_PUNCH_TOP_RIGHT Punch 1 hole top right
    IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM Punch 3 holes bottom edge
    IPP_FINISHINGS_PUNCH_TRIPLE_LEFT Punch 3 holes left side
    IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT Punch 3 holes right side
    IPP_FINISHINGS_PUNCH_TRIPLE_TOP Punch 3 holes top edge
    IPP_FINISHINGS_SADDLE_STITCH Staple interior
    IPP_FINISHINGS_STAPLE Staple (any location/method)
    IPP_FINISHINGS_STAPLE_BOTTOM_LEFT Staple bottom left corner
    IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT Staple bottom right corner
    IPP_FINISHINGS_STAPLE_DUAL_BOTTOM Two staples on bottom
    IPP_FINISHINGS_STAPLE_DUAL_LEFT Two staples on left
    IPP_FINISHINGS_STAPLE_DUAL_RIGHT Two staples on right
    IPP_FINISHINGS_STAPLE_DUAL_TOP Two staples on top
    IPP_FINISHINGS_STAPLE_TOP_LEFT Staple top left corner
    IPP_FINISHINGS_STAPLE_TOP_RIGHT Staple top right corner
    IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM Three staples on bottom
    IPP_FINISHINGS_STAPLE_TRIPLE_LEFT Three staples on left
    IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT Three staples on right
    IPP_FINISHINGS_STAPLE_TRIPLE_TOP Three staples on top
    IPP_FINISHINGS_TRIM Trim (any type)
    IPP_FINISHINGS_TRIM_AFTER_COPIES Trim output after each copy
    IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS Trim output after each document
    IPP_FINISHINGS_TRIM_AFTER_JOB Trim output after job
    IPP_FINISHINGS_TRIM_AFTER_PAGES Trim output after each page

    ipp_jstate_e

    Job states

    Constants

    -
    -
    IPP_JSTATE_ABORTED
    -
    Job has aborted due to error
    -
    IPP_JSTATE_CANCELED
    -
    Job has been canceled
    -
    IPP_JSTATE_COMPLETED
    -
    Job has completed successfully
    -
    IPP_JSTATE_HELD
    -
    Job is held for printing
    -
    IPP_JSTATE_PENDING
    -
    Job is waiting to be printed
    -
    IPP_JSTATE_PROCESSING
    -
    Job is currently printing
    -
    IPP_JSTATE_STOPPED
    -
    Job has been stopped
    -
    + + + + + + + + +
    IPP_JSTATE_ABORTED Job has aborted due to error
    IPP_JSTATE_CANCELED Job has been canceled
    IPP_JSTATE_COMPLETED Job has completed successfully
    IPP_JSTATE_HELD Job is held for printing
    IPP_JSTATE_PENDING Job is waiting to be printed
    IPP_JSTATE_PROCESSING Job is currently printing
    IPP_JSTATE_STOPPED Job has been stopped

    ipp_op_e

    IPP operations

    Constants

    -
    -
    IPP_OP_CANCEL_CURRENT_JOB
    -
    Cancel-Current-Job: Cancel the current job
    -
    IPP_OP_CANCEL_JOB
    -
    Cancel-Job: Cancel a job
    -
    IPP_OP_CANCEL_JOBS
    -
    Cancel-Jobs: Cancel all jobs (administrative)
    -
    IPP_OP_CANCEL_MY_JOBS
    -
    Cancel-My-Jobs: Cancel a user's jobs
    -
    IPP_OP_CANCEL_SUBSCRIPTION  CUPS 1.2/macOS 10.5 
    -
    Cancel-Subscription: Cancel a subscription
    -
    IPP_OP_CLOSE_JOB
    -
    Close-Job: Close a job and start printing
    -
    IPP_OP_CREATE_JOB
    -
    Create-Job: Create an empty print job
    -
    IPP_OP_CREATE_JOB_SUBSCRIPTIONS  CUPS 1.2/macOS 10.5 
    -
    Create-Job-Subscriptions: Create one of more job subscriptions
    -
    IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS  CUPS 1.2/macOS 10.5 
    -
    Create-Printer-Subscriptions: Create one or more printer subscriptions
    -
    IPP_OP_CUPS_ADD_MODIFY_CLASS
    -
    CUPS-Add-Modify-Class: Add or modify a class
    -
    IPP_OP_CUPS_ADD_MODIFY_PRINTER
    -
    CUPS-Add-Modify-Printer: Add or modify a printer
    -
    IPP_OP_CUPS_AUTHENTICATE_JOB  CUPS 1.2/macOS 10.5 
    -
    CUPS-Authenticate-Job: Authenticate a job
    -
    IPP_OP_CUPS_CREATE_LOCAL_PRINTER  CUPS 2.2 
    -
    CUPS-Create-Local-Printer: Create a local (temporary) printer
    -
    IPP_OP_CUPS_DELETE_CLASS
    -
    CUPS-Delete-Class: Delete a class
    -
    IPP_OP_CUPS_DELETE_PRINTER
    -
    CUPS-Delete-Printer: Delete a printer
    -
    IPP_OP_CUPS_GET_DEFAULT
    -
    CUPS-Get-Default: Get the default printer
    -
    IPP_OP_CUPS_GET_DEVICES  DEPRECATED 
    -
    CUPS-Get-Devices: Get a list of supported devices
    -
    IPP_OP_CUPS_GET_DOCUMENT  CUPS 1.4/macOS 10.6 
    -
    CUPS-Get-Document: Get a document file
    -
    IPP_OP_CUPS_GET_PPD  DEPRECATED 
    -
    CUPS-Get-PPD: Get a PPD file
    -
    IPP_OP_CUPS_GET_PPDS  DEPRECATED 
    -
    CUPS-Get-PPDs: Get a list of supported drivers
    -
    IPP_OP_CUPS_GET_PRINTERS
    -
    CUPS-Get-Printers: Get a list of printers and/or classes
    -
    IPP_OP_CUPS_INVALID
    -
    Invalid operation name for ippOpValue
    -
    IPP_OP_CUPS_MOVE_JOB
    -
    CUPS-Move-Job: Move a job to a different printer
    -
    IPP_OP_CUPS_SET_DEFAULT
    -
    CUPS-Set-Default: Set the default printer
    -
    IPP_OP_DISABLE_PRINTER
    -
    Disable-Printer: Reject new jobs for a printer
    -
    IPP_OP_ENABLE_PRINTER
    -
    Enable-Printer: Accept new jobs for a printer
    -
    IPP_OP_GET_JOBS
    -
    Get-Jobs: Get a list of jobs
    -
    IPP_OP_GET_JOB_ATTRIBUTES
    -
    Get-Job-Attribute: Get information about a job
    -
    IPP_OP_GET_NOTIFICATIONS  CUPS 1.2/macOS 10.5 
    -
    Get-Notifications: Get notification events
    -
    IPP_OP_GET_PRINTER_ATTRIBUTES
    -
    Get-Printer-Attributes: Get information about a printer
    -
    IPP_OP_GET_PRINTER_SUPPORTED_VALUES
    -
    Get-Printer-Supported-Values: Get supported values
    -
    IPP_OP_GET_SUBSCRIPTIONS  CUPS 1.2/macOS 10.5 
    -
    Get-Subscriptions: Get list of subscriptions
    -
    IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES  CUPS 1.2/macOS 10.5 
    -
    Get-Subscription-Attributes: Get subscription information
    -
    IPP_OP_HOLD_JOB
    -
    Hold-Job: Hold a job for printing
    -
    IPP_OP_HOLD_NEW_JOBS
    -
    Hold-New-Jobs: Hold new jobs
    -
    IPP_OP_IDENTIFY_PRINTER
    -
    Identify-Printer: Make the printer beep, flash, or display a message for identification
    -
    IPP_OP_PAUSE_PRINTER
    -
    Pause-Printer: Stop a printer
    -
    IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB
    -
    Pause-Printer-After-Current-Job: Stop printer after the current job
    -
    IPP_OP_PRINT_JOB
    -
    Print-Job: Print a single file
    -
    IPP_OP_PROMOTE_JOB
    -
    Promote-Job: Promote a job to print sooner
    -
    IPP_OP_RELEASE_HELD_NEW_JOBS
    -
    Release-Held-New-Jobs: Release new jobs that were previously held
    -
    IPP_OP_RELEASE_JOB
    -
    Release-Job: Release a job for printing
    -
    IPP_OP_RENEW_SUBSCRIPTION  CUPS 1.2/macOS 10.5 
    -
    Renew-Subscription: Renew a printer subscription
    -
    IPP_OP_RESTART_JOB  DEPRECATED 
    -
    Restart-Job: Reprint a job
    -
    IPP_OP_RESUME_JOB
    -
    Resume-Job: Resume the current job
    -
    IPP_OP_RESUME_PRINTER
    -
    Resume-Printer: Start a printer
    -
    IPP_OP_SCHEDULE_JOB_AFTER
    -
    Schedule-Job-After: Schedule a job to print after another
    -
    IPP_OP_SEND_DOCUMENT
    -
    Send-Document: Add a file to a job
    -
    IPP_OP_SET_JOB_ATTRIBUTES
    -
    Set-Job-Attributes: Set job values
    -
    IPP_OP_SET_PRINTER_ATTRIBUTES
    -
    Set-Printer-Attributes: Set printer values
    -
    IPP_OP_SUSPEND_CURRENT_JOB
    -
    Suspend-Current-Job: Suspend the current job
    -
    IPP_OP_VALIDATE_JOB
    -
    Validate-Job: Validate job values prior to submission
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    IPP_OP_CANCEL_CURRENT_JOB Cancel-Current-Job: Cancel the current job
    IPP_OP_CANCEL_JOB Cancel-Job: Cancel a job
    IPP_OP_CANCEL_JOBS Cancel-Jobs: Cancel all jobs (administrative)
    IPP_OP_CANCEL_MY_JOBS Cancel-My-Jobs: Cancel a user's jobs
    IPP_OP_CANCEL_SUBSCRIPTION  CUPS 1.2/macOS 10.5  Cancel-Subscription: Cancel a subscription
    IPP_OP_CLOSE_JOB Close-Job: Close a job and start printing
    IPP_OP_CREATE_JOB Create-Job: Create an empty print job
    IPP_OP_CREATE_JOB_SUBSCRIPTIONS  CUPS 1.2/macOS 10.5  Create-Job-Subscriptions: Create one of more job subscriptions
    IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS  CUPS 1.2/macOS 10.5  Create-Printer-Subscriptions: Create one or more printer subscriptions
    IPP_OP_CUPS_ADD_MODIFY_CLASS CUPS-Add-Modify-Class: Add or modify a class
    IPP_OP_CUPS_ADD_MODIFY_PRINTER CUPS-Add-Modify-Printer: Add or modify a printer
    IPP_OP_CUPS_AUTHENTICATE_JOB  CUPS 1.2/macOS 10.5  CUPS-Authenticate-Job: Authenticate a job
    IPP_OP_CUPS_CREATE_LOCAL_PRINTER  CUPS 2.2  CUPS-Create-Local-Printer: Create a local (temporary) printer
    IPP_OP_CUPS_DELETE_CLASS CUPS-Delete-Class: Delete a class
    IPP_OP_CUPS_DELETE_PRINTER CUPS-Delete-Printer: Delete a printer
    IPP_OP_CUPS_GET_DEFAULT CUPS-Get-Default: Get the default printer
    IPP_OP_CUPS_GET_DEVICES  DEPRECATED  CUPS-Get-Devices: Get a list of supported devices
    IPP_OP_CUPS_GET_DOCUMENT  CUPS 1.4/macOS 10.6  CUPS-Get-Document: Get a document file
    IPP_OP_CUPS_GET_PPD  DEPRECATED  CUPS-Get-PPD: Get a PPD file
    IPP_OP_CUPS_GET_PPDS  DEPRECATED  CUPS-Get-PPDs: Get a list of supported drivers
    IPP_OP_CUPS_GET_PRINTERS CUPS-Get-Printers: Get a list of printers and/or classes
    IPP_OP_CUPS_INVALID Invalid operation name for ippOpValue
    IPP_OP_CUPS_MOVE_JOB CUPS-Move-Job: Move a job to a different printer
    IPP_OP_CUPS_SET_DEFAULT CUPS-Set-Default: Set the default printer
    IPP_OP_DISABLE_PRINTER Disable-Printer: Reject new jobs for a printer
    IPP_OP_ENABLE_PRINTER Enable-Printer: Accept new jobs for a printer
    IPP_OP_GET_JOBS Get-Jobs: Get a list of jobs
    IPP_OP_GET_JOB_ATTRIBUTES Get-Job-Attribute: Get information about a job
    IPP_OP_GET_NOTIFICATIONS  CUPS 1.2/macOS 10.5  Get-Notifications: Get notification events
    IPP_OP_GET_PRINTER_ATTRIBUTES Get-Printer-Attributes: Get information about a printer
    IPP_OP_GET_PRINTER_SUPPORTED_VALUES Get-Printer-Supported-Values: Get supported values
    IPP_OP_GET_SUBSCRIPTIONS  CUPS 1.2/macOS 10.5  Get-Subscriptions: Get list of subscriptions
    IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES  CUPS 1.2/macOS 10.5  Get-Subscription-Attributes: Get subscription information
    IPP_OP_HOLD_JOB Hold-Job: Hold a job for printing
    IPP_OP_HOLD_NEW_JOBS Hold-New-Jobs: Hold new jobs
    IPP_OP_IDENTIFY_PRINTER Identify-Printer: Make the printer beep, flash, or display a message for identification
    IPP_OP_PAUSE_PRINTER Pause-Printer: Stop a printer
    IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB Pause-Printer-After-Current-Job: Stop printer after the current job
    IPP_OP_PRINT_JOB Print-Job: Print a single file
    IPP_OP_PROMOTE_JOB Promote-Job: Promote a job to print sooner
    IPP_OP_RELEASE_HELD_NEW_JOBS Release-Held-New-Jobs: Release new jobs that were previously held
    IPP_OP_RELEASE_JOB Release-Job: Release a job for printing
    IPP_OP_RENEW_SUBSCRIPTION  CUPS 1.2/macOS 10.5  Renew-Subscription: Renew a printer subscription
    IPP_OP_RESTART_JOB  DEPRECATED  Restart-Job: Reprint a job
    IPP_OP_RESUME_JOB Resume-Job: Resume the current job
    IPP_OP_RESUME_PRINTER Resume-Printer: Start a printer
    IPP_OP_SCHEDULE_JOB_AFTER Schedule-Job-After: Schedule a job to print after another
    IPP_OP_SEND_DOCUMENT Send-Document: Add a file to a job
    IPP_OP_SET_JOB_ATTRIBUTES Set-Job-Attributes: Set job values
    IPP_OP_SET_PRINTER_ATTRIBUTES Set-Printer-Attributes: Set printer values
    IPP_OP_SUSPEND_CURRENT_JOB Suspend-Current-Job: Suspend the current job
    IPP_OP_VALIDATE_JOB Validate-Job: Validate job values prior to submission

    ipp_orient_e

    Orientation values

    Constants

    -
    -
    IPP_ORIENT_LANDSCAPE
    -
    90 degrees counter-clockwise
    -
    IPP_ORIENT_NONE
    -
    No rotation
    -
    IPP_ORIENT_PORTRAIT
    -
    No rotation
    -
    IPP_ORIENT_REVERSE_LANDSCAPE
    -
    90 degrees clockwise
    -
    IPP_ORIENT_REVERSE_PORTRAIT
    -
    180 degrees
    -
    + + + + + + +
    IPP_ORIENT_LANDSCAPE 90 degrees counter-clockwise
    IPP_ORIENT_NONE No rotation
    IPP_ORIENT_PORTRAIT No rotation
    IPP_ORIENT_REVERSE_LANDSCAPE 90 degrees clockwise
    IPP_ORIENT_REVERSE_PORTRAIT 180 degrees

    ipp_pstate_e

    Printer states

    Constants

    -
    -
    IPP_PSTATE_IDLE
    -
    Printer is idle
    -
    IPP_PSTATE_PROCESSING
    -
    Printer is working
    -
    IPP_PSTATE_STOPPED
    -
    Printer is stopped
    -
    + + + + +
    IPP_PSTATE_IDLE Printer is idle
    IPP_PSTATE_PROCESSING Printer is working
    IPP_PSTATE_STOPPED Printer is stopped

    ipp_quality_e

    Qualities

    Constants

    -
    -
    IPP_QUALITY_DRAFT
    -
    Draft quality
    -
    IPP_QUALITY_HIGH
    -
    High quality
    -
    IPP_QUALITY_NORMAL
    -
    Normal quality
    -
    + + + + +
    IPP_QUALITY_DRAFT Draft quality
    IPP_QUALITY_HIGH High quality
    IPP_QUALITY_NORMAL Normal quality

    ipp_res_e

    Resolution units

    Constants

    -
    -
    IPP_RES_PER_CM
    -
    Pixels per centimeter
    -
    IPP_RES_PER_INCH
    -
    Pixels per inch
    -
    + + + +
    IPP_RES_PER_CM Pixels per centimeter
    IPP_RES_PER_INCH Pixels per inch

    ipp_state_e

    IPP states

    Constants

    -
    -
    IPP_STATE_ATTRIBUTE
    -
    One or more attributes need to be sent/received
    -
    IPP_STATE_DATA
    -
    IPP request data needs to be sent/received
    -
    IPP_STATE_ERROR
    -
    An error occurred
    -
    IPP_STATE_HEADER
    -
    The request header needs to be sent/received
    -
    IPP_STATE_IDLE
    -
    Nothing is happening/request completed
    -
    + + + + + + +
    IPP_STATE_ATTRIBUTE One or more attributes need to be sent/received
    IPP_STATE_DATA IPP request data needs to be sent/received
    IPP_STATE_ERROR An error occurred
    IPP_STATE_HEADER The request header needs to be sent/received
    IPP_STATE_IDLE Nothing is happening/request completed

    ipp_status_e

    IPP status codes

    Constants

    -
    -
    IPP_STATUS_CUPS_INVALID
    -
    Invalid status name for ippErrorValue
    -
    IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED
    -
    client-error-account-authorization-failed
    -
    IPP_STATUS_ERROR_ACCOUNT_CLOSED
    -
    client-error-account-closed
    -
    IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED
    -
    client-error-account-info-needed
    -
    IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED
    -
    client-error-account-limit-reached
    -
    IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE
    -
    client-error-attributes-not-settable
    -
    IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES
    -
    client-error-attributes-or-values-not-supported
    -
    IPP_STATUS_ERROR_BAD_REQUEST
    -
    client-error-bad-request
    -
    IPP_STATUS_ERROR_BUSY
    -
    server-error-busy
    -
    IPP_STATUS_ERROR_CHARSET
    -
    client-error-charset-not-supported
    -
    IPP_STATUS_ERROR_COMPRESSION_ERROR
    -
    client-error-compression-error
    -
    IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED
    -
    client-error-compression-not-supported
    -
    IPP_STATUS_ERROR_CONFLICTING
    -
    client-error-conflicting-attributes
    -
    IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED  DEPRECATED 
    -
    cups-error-account-authorization-failed
    -
    IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED
    -
    cups-error-account-closed @deprecate@
    -
    IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED  DEPRECATED 
    -
    cups-error-account-info-needed
    -
    IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED  DEPRECATED 
    -
    cups-error-account-limit-reached
    -
    IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED  CUPS 1.5/macOS 10.7 
    -
    cups-authentication-canceled - Authentication canceled by user
    -
    IPP_STATUS_ERROR_CUPS_PKI  CUPS 1.5/macOS 10.7 
    -
    cups-pki-error - Error negotiating a secure connection
    -
    IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED  CUPS 1.5/macOS 10.7 
    -
    cups-upgrade-required - TLS upgrade required
    -
    IPP_STATUS_ERROR_DEVICE
    -
    server-error-device-error
    -
    IPP_STATUS_ERROR_DOCUMENT_ACCESS
    -
    client-error-document-access-error
    -
    IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR
    -
    client-error-document-format-error
    -
    IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED
    -
    client-error-document-format-not-supported
    -
    IPP_STATUS_ERROR_DOCUMENT_PASSWORD
    -
    client-error-document-password-error
    -
    IPP_STATUS_ERROR_DOCUMENT_PERMISSION
    -
    client-error-document-permission-error
    -
    IPP_STATUS_ERROR_DOCUMENT_SECURITY
    -
    client-error-document-security-error
    -
    IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE
    -
    client-error-document-unprintable-error
    -
    IPP_STATUS_ERROR_FORBIDDEN
    -
    client-error-forbidden
    -
    IPP_STATUS_ERROR_GONE
    -
    client-error-gone
    -
    IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS
    -
    client-error-ignored-all-subscriptions
    -
    IPP_STATUS_ERROR_INTERNAL
    -
    server-error-internal-error
    -
    IPP_STATUS_ERROR_JOB_CANCELED
    -
    server-error-job-canceled
    -
    IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED
    -
    server-error-multiple-document-jobs-not-supported
    -
    IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS
    -
    server-error-not-accepting-jobs
    -
    IPP_STATUS_ERROR_NOT_AUTHENTICATED
    -
    client-error-not-authenticated
    -
    IPP_STATUS_ERROR_NOT_AUTHORIZED
    -
    client-error-not-authorized
    -
    IPP_STATUS_ERROR_NOT_FETCHABLE
    -
    client-error-not-fetchable
    -
    IPP_STATUS_ERROR_NOT_FOUND
    -
    client-error-not-found
    -
    IPP_STATUS_ERROR_NOT_POSSIBLE
    -
    client-error-not-possible
    -
    IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED
    -
    server-error-operation-not-supported
    -
    IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED
    -
    server-error-printer-is-deactivated
    -
    IPP_STATUS_ERROR_REQUEST_ENTITY
    -
    client-error-request-entity-too-large
    -
    IPP_STATUS_ERROR_REQUEST_VALUE
    -
    client-error-request-value-too-long
    -
    IPP_STATUS_ERROR_SERVICE_UNAVAILABLE
    -
    server-error-service-unavailable
    -
    IPP_STATUS_ERROR_TEMPORARY
    -
    server-error-temporary-error
    -
    IPP_STATUS_ERROR_TIMEOUT
    -
    client-error-timeout
    -
    IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS
    -
    server-error-too-many-documents
    -
    IPP_STATUS_ERROR_TOO_MANY_JOBS
    -
    server-error-too-many-jobs
    -
    IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS
    -
    client-error-too-many-subscriptions
    -
    IPP_STATUS_ERROR_URI_SCHEME
    -
    client-error-uri-scheme-not-supported
    -
    IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED
    -
    server-error-version-not-supported
    -
    IPP_STATUS_OK
    -
    successful-ok
    -
    IPP_STATUS_OK_CONFLICTING
    -
    successful-ok-conflicting-attributes
    -
    IPP_STATUS_OK_EVENTS_COMPLETE
    -
    successful-ok-events-complete
    -
    IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED
    -
    successful-ok-ignored-or-substituted-attributes
    -
    IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS
    -
    successful-ok-ignored-subscriptions
    -
    IPP_STATUS_OK_TOO_MANY_EVENTS
    -
    successful-ok-too-many-events
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    IPP_STATUS_CUPS_INVALID Invalid status name for ippErrorValue
    IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED client-error-account-authorization-failed
    IPP_STATUS_ERROR_ACCOUNT_CLOSED client-error-account-closed
    IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED client-error-account-info-needed
    IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED client-error-account-limit-reached
    IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE client-error-attributes-not-settable
    IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES client-error-attributes-or-values-not-supported
    IPP_STATUS_ERROR_BAD_REQUEST client-error-bad-request
    IPP_STATUS_ERROR_BUSY server-error-busy
    IPP_STATUS_ERROR_CHARSET client-error-charset-not-supported
    IPP_STATUS_ERROR_COMPRESSION_ERROR client-error-compression-error
    IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED client-error-compression-not-supported
    IPP_STATUS_ERROR_CONFLICTING client-error-conflicting-attributes
    IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED  DEPRECATED  cups-error-account-authorization-failed
    IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED cups-error-account-closed @deprecate@
    IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED  DEPRECATED  cups-error-account-info-needed
    IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED  DEPRECATED  cups-error-account-limit-reached
    IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED  CUPS 1.5/macOS 10.7  cups-authentication-canceled - Authentication canceled by user
    IPP_STATUS_ERROR_CUPS_PKI  CUPS 1.5/macOS 10.7  cups-pki-error - Error negotiating a secure connection
    IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED  CUPS 1.5/macOS 10.7  cups-upgrade-required - TLS upgrade required
    IPP_STATUS_ERROR_DEVICE server-error-device-error
    IPP_STATUS_ERROR_DOCUMENT_ACCESS client-error-document-access-error
    IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR client-error-document-format-error
    IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED client-error-document-format-not-supported
    IPP_STATUS_ERROR_DOCUMENT_PASSWORD client-error-document-password-error
    IPP_STATUS_ERROR_DOCUMENT_PERMISSION client-error-document-permission-error
    IPP_STATUS_ERROR_DOCUMENT_SECURITY client-error-document-security-error
    IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE client-error-document-unprintable-error
    IPP_STATUS_ERROR_FORBIDDEN client-error-forbidden
    IPP_STATUS_ERROR_GONE client-error-gone
    IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS client-error-ignored-all-subscriptions
    IPP_STATUS_ERROR_INTERNAL server-error-internal-error
    IPP_STATUS_ERROR_JOB_CANCELED server-error-job-canceled
    IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED server-error-multiple-document-jobs-not-supported
    IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS server-error-not-accepting-jobs
    IPP_STATUS_ERROR_NOT_AUTHENTICATED client-error-not-authenticated
    IPP_STATUS_ERROR_NOT_AUTHORIZED client-error-not-authorized
    IPP_STATUS_ERROR_NOT_FETCHABLE client-error-not-fetchable
    IPP_STATUS_ERROR_NOT_FOUND client-error-not-found
    IPP_STATUS_ERROR_NOT_POSSIBLE client-error-not-possible
    IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED server-error-operation-not-supported
    IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED server-error-printer-is-deactivated
    IPP_STATUS_ERROR_REQUEST_ENTITY client-error-request-entity-too-large
    IPP_STATUS_ERROR_REQUEST_VALUE client-error-request-value-too-long
    IPP_STATUS_ERROR_SERVICE_UNAVAILABLE server-error-service-unavailable
    IPP_STATUS_ERROR_TEMPORARY server-error-temporary-error
    IPP_STATUS_ERROR_TIMEOUT client-error-timeout
    IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS server-error-too-many-documents
    IPP_STATUS_ERROR_TOO_MANY_JOBS server-error-too-many-jobs
    IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS client-error-too-many-subscriptions
    IPP_STATUS_ERROR_URI_SCHEME client-error-uri-scheme-not-supported
    IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED server-error-version-not-supported
    IPP_STATUS_OK successful-ok
    IPP_STATUS_OK_CONFLICTING successful-ok-conflicting-attributes
    IPP_STATUS_OK_EVENTS_COMPLETE successful-ok-events-complete
    IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED successful-ok-ignored-or-substituted-attributes
    IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS successful-ok-ignored-subscriptions
    IPP_STATUS_OK_TOO_MANY_EVENTS successful-ok-too-many-events

    ipp_tag_e

    Format tags for attributes

    Constants

    -
    -
    IPP_TAG_ADMINDEFINE
    -
    Admin-defined value
    -
    IPP_TAG_BOOLEAN
    -
    Boolean value
    -
    IPP_TAG_CHARSET
    -
    Character set value
    -
    IPP_TAG_CUPS_INVALID
    -
    Invalid tag name for ippTagValue
    -
    IPP_TAG_DATE
    -
    Date/time value
    -
    IPP_TAG_DEFAULT
    -
    Default value
    -
    IPP_TAG_DELETEATTR
    -
    Delete-attribute value
    -
    IPP_TAG_END
    -
    End-of-attributes
    -
    IPP_TAG_ENUM
    -
    Enumeration value
    -
    IPP_TAG_EVENT_NOTIFICATION
    -
    Event group
    -
    IPP_TAG_INTEGER
    -
    Integer value
    -
    IPP_TAG_JOB
    -
    Job group
    -
    IPP_TAG_KEYWORD
    -
    Keyword value
    -
    IPP_TAG_LANGUAGE
    -
    Language value
    -
    IPP_TAG_MIMETYPE
    -
    MIME media type value
    -
    IPP_TAG_NAME
    -
    Name value
    -
    IPP_TAG_NAMELANG
    -
    Name-with-language value
    -
    IPP_TAG_NOTSETTABLE
    -
    Not-settable value
    -
    IPP_TAG_NOVALUE
    -
    No-value value
    -
    IPP_TAG_OPERATION
    -
    Operation group
    -
    IPP_TAG_PRINTER
    -
    Printer group
    -
    IPP_TAG_RANGE
    -
    Range value
    -
    IPP_TAG_RESOLUTION
    -
    Resolution value
    -
    IPP_TAG_STRING
    -
    Octet string value
    -
    IPP_TAG_SUBSCRIPTION
    -
    Subscription group
    -
    IPP_TAG_TEXT
    -
    Text value
    -
    IPP_TAG_TEXTLANG
    -
    Text-with-language value
    -
    IPP_TAG_UNKNOWN
    -
    Unknown value
    -
    IPP_TAG_UNSUPPORTED_GROUP
    -
    Unsupported attributes group
    -
    IPP_TAG_UNSUPPORTED_VALUE
    -
    Unsupported value
    -
    IPP_TAG_URI
    -
    URI value
    -
    IPP_TAG_URISCHEME
    -
    URI scheme value
    -
    IPP_TAG_ZERO
    -
    Zero tag - used for separators
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    IPP_TAG_ADMINDEFINE Admin-defined value
    IPP_TAG_BOOLEAN Boolean value
    IPP_TAG_CHARSET Character set value
    IPP_TAG_CUPS_INVALID Invalid tag name for ippTagValue
    IPP_TAG_DATE Date/time value
    IPP_TAG_DEFAULT Default value
    IPP_TAG_DELETEATTR Delete-attribute value
    IPP_TAG_END End-of-attributes
    IPP_TAG_ENUM Enumeration value
    IPP_TAG_EVENT_NOTIFICATION Event group
    IPP_TAG_INTEGER Integer value
    IPP_TAG_JOB Job group
    IPP_TAG_KEYWORD Keyword value
    IPP_TAG_LANGUAGE Language value
    IPP_TAG_MIMETYPE MIME media type value
    IPP_TAG_NAME Name value
    IPP_TAG_NAMELANG Name-with-language value
    IPP_TAG_NOTSETTABLE Not-settable value
    IPP_TAG_NOVALUE No-value value
    IPP_TAG_OPERATION Operation group
    IPP_TAG_PRINTER Printer group
    IPP_TAG_RANGE Range value
    IPP_TAG_RESOLUTION Resolution value
    IPP_TAG_STRING Octet string value
    IPP_TAG_SUBSCRIPTION Subscription group
    IPP_TAG_TEXT Text value
    IPP_TAG_TEXTLANG Text-with-language value
    IPP_TAG_UNKNOWN Unknown value
    IPP_TAG_UNSUPPORTED_GROUP Unsupported attributes group
    IPP_TAG_UNSUPPORTED_VALUE Unsupported value
    IPP_TAG_URI URI value
    IPP_TAG_URISCHEME URI scheme value
    IPP_TAG_ZERO Zero tag - used for separators