/*
* Private definitions for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
int need_res_init; /* Need to reinitialize resolver? */
/* ipp.c */
- ipp_uchar_t ipp_date[11]; /* RFC-1903 date/time data */
+ ipp_uchar_t ipp_date[11]; /* RFC-2579 date/time data */
_cups_buffer_t *cups_buffers; /* Buffer list */
/* ipp-support.c */
}
fclose(fp);
+
+
+# Sending IPP Requests
+
+## Connecting to the Scheduler or Printer
+
+cupsDestConnect and httpConnect2
+
+httpGetTrust, etc.
+
+
+## Creating an IPP Request
+
+## Sending the IPP Request
+
+## Getting the IPP Response
+
+## Authentication
/*
* Internet Printing Protocol support functions for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
/*
* 'ippTagString()' - Return the tag name corresponding to a tag value.
*
- * The returned names are defined in RFC 2911 and 3382.
+ * The returned names are defined in RFC 8011 and the IANA IPP Registry.
*
* @since CUPS 1.4/macOS 10.6@
*/
/*
* 'ippTagValue()' - Return the tag value corresponding to a tag name.
*
- * The tag names are defined in RFC 2911 and 3382.
+ * The tag names are defined in RFC 8011 and the IANA IPP Registry.
*
* @since CUPS 1.4/macOS 10.6@
*/
/*
- * 'ippAddDate()' - Add a date attribute to an IPP message.
+ * 'ippAddDate()' - Add a dateTime attribute to an IPP message.
*
* The @code ipp@ parameter refers to an IPP message previously created using
* the @link ippNew@, @link ippNewRequest@, or @link ippNewResponse@ functions.
* specified string value.
*
* Returns non-zero when the attribute contains a matching charset, keyword,
- * language, mimeMediaType, name, text, URI, or URI scheme value.
+ * naturalLanguage, mimeMediaType, name, text, uri, or uriScheme value.
*
* @since CUPS 1.7/macOS 10.9@
*/
/*
- * 'ippDateToTime()' - Convert from RFC 1903 Date/Time format to UNIX time
- * in seconds.
+ * 'ippDateToTime()' - Convert from RFC 2579 Date/Time format to time in
+ * seconds.
*/
time_t /* O - UNIX time value */
-ippDateToTime(const ipp_uchar_t *date) /* I - RFC 1903 date info */
+ippDateToTime(const ipp_uchar_t *date) /* I - RFC 2579 date info */
{
struct tm unixdate; /* UNIX date/time info */
time_t t; /* Computed time */
memset(&unixdate, 0, sizeof(unixdate));
/*
- * RFC-1903 date/time format is:
+ * RFC-2579 date/time format is:
*
* Byte(s) Description
* ------- -----------
* 'ippGetBoolean()' - Get a boolean value for an attribute.
*
* The @code element@ parameter specifies which value to get from 0 to
- * @link ippGetCount(attr)@ - 1.
+ * @code ippGetCount(attr)@ - 1.
*
* @since CUPS 1.6/macOS 10.8@
*/
* 'ippGetCollection()' - Get a collection value for an attribute.
*
* The @code element@ parameter specifies which value to get from 0 to
- * @link ippGetCount(attr)@ - 1.
+ * @code ippGetCount(attr)@ - 1.
*
* @since CUPS 1.6/macOS 10.8@
*/
/*
- * 'ippGetDate()' - Get a date value for an attribute.
+ * 'ippGetDate()' - Get a dateTime value for an attribute.
*
* The @code element@ parameter specifies which value to get from 0 to
- * @link ippGetCount(attr)@ - 1.
+ * @code ippGetCount(attr)@ - 1.
*
* @since CUPS 1.6/macOS 10.8@
*/
-const ipp_uchar_t * /* O - Date value or @code NULL@ */
+const ipp_uchar_t * /* O - dateTime value or @code NULL@ */
ippGetDate(ipp_attribute_t *attr, /* I - IPP attribute */
int element) /* I - Value number (0-based) */
{
* 'ippGetInteger()' - Get the integer/enum value for an attribute.
*
* The @code element@ parameter specifies which value to get from 0 to
- * @link ippGetCount(attr)@ - 1.
+ * @code ippGetCount(attr)@ - 1.
*
* @since CUPS 1.6/macOS 10.8@
*/
* 'ippGetOctetString()' - Get an octetString value from an IPP attribute.
*
* The @code element@ parameter specifies which value to get from 0 to
- * @link ippGetCount(attr)@ - 1.
+ * @code ippGetCount(attr)@ - 1.
*
* @since CUPS 1.7/macOS 10.9@
*/
* 'ippGetRange()' - Get a rangeOfInteger value from an attribute.
*
* The @code element@ parameter specifies which value to get from 0 to
- * @link ippGetCount(attr)@ - 1.
+ * @code ippGetCount(attr)@ - 1.
*
* @since CUPS 1.6/macOS 10.8@
*/
* 'ippGetResolution()' - Get a resolution value for an attribute.
*
* The @code element@ parameter specifies which value to get from 0 to
- * @link ippGetCount(attr)@ - 1.
+ * @code ippGetCount(attr)@ - 1.
*
* @since CUPS 1.6/macOS 10.8@
*/
* 'ippGetString()' - Get the string and optionally the language code for an attribute.
*
* The @code element@ parameter specifies which value to get from 0 to
- * @link ippGetCount(attr)@ - 1.
+ * @code ippGetCount(attr)@ - 1.
*
* @since CUPS 1.6/macOS 10.8@
*/
int /* O - Major version number or 0 on error */
ippGetVersion(ipp_t *ipp, /* I - IPP message */
- int *minor) /* O - Minor version number or @code NULL@ */
+ int *minor) /* O - Minor version number or @code NULL@ for don't care */
{
/*
* Range check input...
/*
* 'ippNewRequest()' - Allocate a new IPP request message.
*
- * The new request message is initialized with the attributes-charset and
- * attributes-natural-language attributes added. The
- * attributes-natural-language value is derived from the current locale.
+ * The new request message is initialized with the "attributes-charset" and
+ * "attributes-natural-language" attributes added. The
+ * "attributes-natural-language" value is derived from the current locale.
*
* @since CUPS 1.2/macOS 10.5@
*/
/*
* 'ippNewResponse()' - Allocate a new IPP response message.
*
- * The new response message is initialized with the same version-number,
- * request-id, attributes-charset, and attributes-natural-language as the
- * provided request message. If the attributes-charset or
- * attributes-natural-language attributes are missing from the request,
- * "utf-8" and a value derived from the current locale are substituted,
+ * The new response message is initialized with the same "version-number",
+ * "request-id", "attributes-charset", and "attributes-natural-language" as the
+ * provided request message. If the "attributes-charset" or
+ * "attributes-natural-language" attributes are missing from the request,
+ * 'utf-8' and a value derived from the current locale are substituted,
* respectively.
*
* @since CUPS 1.7/macOS 10.9@
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* @since CUPS 1.6/macOS 10.8@
*/
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* @since CUPS 1.6/macOS 10.8@
*/
/*
- * 'ippSetDate()' - Set a date value in an attribute.
+ * 'ippSetDate()' - Set a dateTime value in an attribute.
*
* The @code ipp@ parameter refers to an IPP message previously created using
* the @link ippNew@, @link ippNewRequest@, or @link ippNewResponse@ functions.
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* @since CUPS 1.6/macOS 10.8@
*/
ippSetDate(ipp_t *ipp, /* I - IPP message */
ipp_attribute_t **attr, /* IO - IPP attribute */
int element, /* I - Value number (0-based) */
- const ipp_uchar_t *datevalue)/* I - Date value */
+ const ipp_uchar_t *datevalue)/* I - dateTime value */
{
_ipp_value_t *value; /* Current value */
ipp_tag_t group_tag) /* I - Group tag */
{
/*
- * Range check input - group tag must be 0x01 to 0x0F, per RFC 2911...
+ * Range check input - group tag must be 0x01 to 0x0F, per RFC 8011...
*/
if (!ipp || !attr || !*attr ||
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* @since CUPS 1.6/macOS 10.8@
*/
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* @since CUPS 1.7/macOS 10.9@
*/
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* @since CUPS 1.6/macOS 10.8@
*/
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* @since CUPS 1.6/macOS 10.8@
*/
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* @since CUPS 1.6/macOS 10.8@
*/
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* The @code format@ parameter uses formatting characters compatible with the
* printf family of standard functions. Additional arguments follow it as
* The @code attr@ parameter may be modified as a result of setting the value.
*
* The @code element@ parameter specifies which value to set from 0 to
- * @link ippGetCount(attr)@.
+ * @code ippGetCount(attr)@.
*
* The @code format@ parameter uses formatting characters compatible with the
* printf family of standard functions. Additional arguments follow it as
/*
- * 'ippTimeToDate()' - Convert from UNIX time to RFC 1903 format.
+ * 'ippTimeToDate()' - Convert from time in seconds to RFC 2579 format.
*/
-const ipp_uchar_t * /* O - RFC-1903 date/time data */
-ippTimeToDate(time_t t) /* I - UNIX time value */
+const ipp_uchar_t * /* O - RFC-2579 date/time data */
+ippTimeToDate(time_t t) /* I - Time in seconds */
{
struct tm *unixdate; /* UNIX unixdate/time info */
ipp_uchar_t *date = _cupsGlobals()->ipp_date;
- /* RFC-1903 date/time data */
+ /* RFC-2579 date/time data */
/*
- * RFC-1903 date/time format is:
+ * RFC-2579 date/time format is:
*
* Byte(s) Description
* ------- -----------
*
* This function validates the contents of an attribute based on the name and
* value tag. 1 is returned if the attribute is valid, 0 otherwise. On
- * failure, cupsLastErrorString() is set to a human-readable message.
+ * failure, @link cupsLastErrorString@ is set to a human-readable message.
*
* @since CUPS 1.7/macOS 10.9@
*/
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad attribute name - invalid character "
- "(RFC 2911 section 4.1.3)."), attr->name);
+ "(RFC 8011 section 5.1.4)."), attr->name);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad attribute name - bad length %d "
- "(RFC 2911 section 4.1.3)."), attr->name,
+ "(RFC 8011 section 5.1.4)."), attr->name,
(int)(ptr - attr->name));
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad boolen value %d "
- "(RFC 2911 section 4.1.11)."), attr->name,
+ "(RFC 8011 section 5.1.21)."), attr->name,
attr->values[i].boolean);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad enum value %d - out of range "
- "(RFC 2911 section 4.1.4)."), attr->name,
+ "(RFC 8011 section 5.1.5)."), attr->name,
attr->values[i].integer);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad octetString value - bad length %d "
- "(RFC 2911 section 4.1.10)."), attr->name,
+ "(RFC 8011 section 5.1.20)."), attr->name,
attr->values[i].unknown.length);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad dateTime month %u "
- "(RFC 2911 section 4.1.14)."), attr->name, date[2]);
+ "(RFC 8011 section 5.1.15)."), attr->name, date[2]);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad dateTime day %u "
- "(RFC 2911 section 4.1.14)."), attr->name, date[3]);
+ "(RFC 8011 section 5.1.15)."), attr->name, date[3]);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad dateTime hours %u "
- "(RFC 2911 section 4.1.14)."), attr->name, date[4]);
+ "(RFC 8011 section 5.1.15)."), attr->name, date[4]);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad dateTime minutes %u "
- "(RFC 2911 section 4.1.14)."), attr->name, date[5]);
+ "(RFC 8011 section 5.1.15)."), attr->name, date[5]);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad dateTime seconds %u "
- "(RFC 2911 section 4.1.14)."), attr->name, date[6]);
+ "(RFC 8011 section 5.1.15)."), attr->name, date[6]);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad dateTime deciseconds %u "
- "(RFC 2911 section 4.1.14)."), attr->name, date[7]);
+ "(RFC 8011 section 5.1.15)."), attr->name, date[7]);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad dateTime UTC sign '%c' "
- "(RFC 2911 section 4.1.14)."), attr->name, date[8]);
+ "(RFC 8011 section 5.1.15)."), attr->name, date[8]);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad dateTime UTC hours %u "
- "(RFC 2911 section 4.1.14)."), attr->name, date[9]);
+ "(RFC 8011 section 5.1.15)."), attr->name, date[9]);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad dateTime UTC minutes %u "
- "(RFC 2911 section 4.1.14)."), attr->name, date[10]);
+ "(RFC 8011 section 5.1.15)."), attr->name, date[10]);
return (0);
}
}
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad resolution value %dx%d%s - cross "
"feed resolution must be positive "
- "(RFC 2911 section 4.1.15)."), attr->name,
+ "(RFC 8011 section 5.1.16)."), attr->name,
attr->values[i].resolution.xres,
attr->values[i].resolution.yres,
attr->values[i].resolution.units ==
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad resolution value %dx%d%s - feed "
"resolution must be positive "
- "(RFC 2911 section 4.1.15)."), attr->name,
+ "(RFC 8011 section 5.1.16)."), attr->name,
attr->values[i].resolution.xres,
attr->values[i].resolution.yres,
attr->values[i].resolution.units ==
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad resolution value %dx%d%s - bad "
- "units value (RFC 2911 section 4.1.15)."),
+ "units value (RFC 8011 section 5.1.16)."),
attr->name, attr->values[i].resolution.xres,
attr->values[i].resolution.yres,
attr->values[i].resolution.units ==
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad rangeOfInteger value %d-%d - lower "
- "greater than upper (RFC 2911 section 4.1.13)."),
+ "greater than upper (RFC 8011 section 5.1.14)."),
attr->name, attr->values[i].range.lower,
attr->values[i].range.upper);
return (0);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad text value \"%s\" - bad UTF-8 "
- "sequence (RFC 2911 section 4.1.1)."), attr->name,
+ "sequence (RFC 8011 section 5.1.2)."), attr->name,
attr->values[i].string.text);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad text value \"%s\" - bad length %d "
- "(RFC 2911 section 4.1.1)."), attr->name,
+ "(RFC 8011 section 5.1.2)."), attr->name,
attr->values[i].string.text,
(int)(ptr - attr->values[i].string.text));
return (0);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad name value \"%s\" - bad UTF-8 "
- "sequence (RFC 2911 section 4.1.2)."), attr->name,
+ "sequence (RFC 8011 section 5.1.3)."), attr->name,
attr->values[i].string.text);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad name value \"%s\" - bad length %d "
- "(RFC 2911 section 4.1.2)."), attr->name,
+ "(RFC 8011 section 5.1.3)."), attr->name,
attr->values[i].string.text,
(int)(ptr - attr->values[i].string.text));
return (0);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad keyword value \"%s\" - invalid "
- "character (RFC 2911 section 4.1.3)."),
+ "character (RFC 8011 section 5.1.4)."),
attr->name, attr->values[i].string.text);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad keyword value \"%s\" - bad "
- "length %d (RFC 2911 section 4.1.3)."),
+ "length %d (RFC 8011 section 5.1.4)."),
attr->name, attr->values[i].string.text,
(int)(ptr - attr->values[i].string.text));
return (0);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad URI value \"%s\" - %s "
- "(RFC 2911 section 4.1.5)."), attr->name,
+ "(RFC 8011 section 5.1.6)."), attr->name,
attr->values[i].string.text,
uri_status_strings[uri_status -
HTTP_URI_STATUS_OVERFLOW]);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad URI value \"%s\" - bad length %d "
- "(RFC 2911 section 4.1.5)."), attr->name,
+ "(RFC 8011 section 5.1.6)."), attr->name,
attr->values[i].string.text,
(int)strlen(attr->values[i].string.text));
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad uriScheme value \"%s\" - bad "
- "characters (RFC 2911 section 4.1.6)."),
+ "characters (RFC 8011 section 5.1.7)."),
attr->name, attr->values[i].string.text);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad uriScheme value \"%s\" - bad "
- "length %d (RFC 2911 section 4.1.6)."),
+ "length %d (RFC 8011 section 5.1.7)."),
attr->name, attr->values[i].string.text,
(int)(ptr - attr->values[i].string.text));
return (0);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad charset value \"%s\" - bad "
- "characters (RFC 2911 section 4.1.7)."),
+ "characters (RFC 8011 section 5.1.8)."),
attr->name, attr->values[i].string.text);
return (0);
}
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad charset value \"%s\" - bad "
- "length %d (RFC 2911 section 4.1.7)."),
+ "length %d (RFC 8011 section 5.1.8)."),
attr->name, attr->values[i].string.text,
(int)(ptr - attr->values[i].string.text));
return (0);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad naturalLanguage value \"%s\" - bad "
- "characters (RFC 2911 section 4.1.8)."),
+ "characters (RFC 8011 section 5.1.9)."),
attr->name, attr->values[i].string.text);
regfree(&re);
return (0);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad naturalLanguage value \"%s\" - bad "
- "length %d (RFC 2911 section 4.1.8)."),
+ "length %d (RFC 8011 section 5.1.9)."),
attr->name, attr->values[i].string.text,
(int)strlen(attr->values[i].string.text));
regfree(&re);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad mimeMediaType value \"%s\" - bad "
- "characters (RFC 2911 section 4.1.9)."),
+ "characters (RFC 8011 section 5.1.10)."),
attr->name, attr->values[i].string.text);
regfree(&re);
return (0);
{
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST,
_("\"%s\": Bad mimeMediaType value \"%s\" - bad "
- "length %d (RFC 2911 section 4.1.9)."),
+ "length %d (RFC 8011 section 5.1.10)."),
attr->name, attr->values[i].string.text,
(int)strlen(attr->values[i].string.text));
regfree(&re);
* 'ippValidateAttributes()' - Validate all attributes in an IPP message.
*
* This function validates the contents of the IPP message, including each
- * attribute. Like @link ippValidateAttribute@, cupsLastErrorString() is set
- * to a human-readable message on failure.
+ * attribute. Like @link ippValidateAttribute@, @link cupsLastErrorString@ is
+ * set to a human-readable message on failure.
*
* @since CUPS 1.7/macOS 10.9@
*/
IPP_OP_GET_NOTIFICATIONS, /* Get-Notifications: Get notification events @since CUPS 1.2/macOS 10.5@ */
IPP_OP_SEND_NOTIFICATIONS, /* Send-Notifications: Send notification events @private@ */
IPP_OP_GET_RESOURCE_ATTRIBUTES, /* Get-Resource-Attributes: Get resource information @private@ */
- IPP_OP_GET_RESOURCE_DATA, /* Get-Resource-Data: Get resource data @private@ */
+ IPP_OP_GET_RESOURCE_DATA, /* Get-Resource-Data: Get resource data @private@ @deprecated@ */
IPP_OP_GET_RESOURCES, /* Get-Resources: Get list of resources @private@ */
IPP_OP_GET_PRINT_SUPPORT_FILES, /* Get-Printer-Support-Files: Get printer support files @private@ */
IPP_OP_ENABLE_PRINTER, /* Enable-Printer: Accept new jobs for a printer */
# endif /* !_CUPS_NO_DEPRECATED */
} ipp_orient_t;
-typedef enum ipp_pstate_e /**** Printer states ****/
+typedef enum ipp_pstate_e /**** Printer state values ****/
{
IPP_PSTATE_IDLE = 3, /* Printer is idle */
IPP_PSTATE_PROCESSING, /* Printer is working */
# endif /* _CUPS_NO_DEPRECATED */
} ipp_pstate_t;
-typedef enum ipp_quality_e /**** Qualities ****/
+typedef enum ipp_quality_e /**** Print quality values ****/
{
IPP_QUALITY_DRAFT = 3, /* Draft quality */
IPP_QUALITY_NORMAL, /* Normal quality */
IPP_RES_PER_CM /* Pixels per centimeter */
} ipp_res_t;
-typedef enum ipp_state_e /**** IPP states ****/
+typedef enum ipp_state_e /**** ipp_t state values ****/
{
IPP_STATE_ERROR = -1, /* An error occurred */
IPP_STATE_IDLE, /* Nothing is happening/request completed */
# endif /* !_CUPS_NO_DEPRECATED */
} ipp_state_t;
-typedef enum ipp_status_e /**** IPP status codes ****/
+typedef enum ipp_status_e /**** IPP status code values ****/
{
IPP_STATUS_CUPS_INVALID = -1, /* Invalid status name for @link ippErrorValue@ */
IPP_STATUS_OK = 0x0000, /* successful-ok */
# endif /* _CUPS_NO_DEPRECATED */
} ipp_status_t;
-typedef enum ipp_tag_e /**** Format tags for attributes ****/
+typedef enum ipp_tag_e /**** Value and group tag values for attributes ****/
{
IPP_TAG_CUPS_INVALID = -1, /* Invalid tag name for @link ippTagValue@ */
IPP_TAG_ZERO = 0x00, /* Zero tag - used for separators */
/**** New in CUPS 1.2/macOS 10.5 ****/
typedef ssize_t (*ipp_iocb_t)(void *context, ipp_uchar_t *buffer, size_t bytes);
- /**** IPP IO Callback Function @since CUPS 1.2/macOS 10.5@ ****/
+ /**** ippReadIO/ippWriteIO callback function @since CUPS 1.2/macOS 10.5@ ****/
/**** New in CUPS 1.6/macOS 10.8 ****/
typedef int (*ipp_copycb_t)(void *context, ipp_t *dst, ipp_attribute_t *attr);
+ /**** ippCopyAttributes callback function @since CUPS 1.6/macOS 10.8 ****/
/*
} _ipp_value_t;
typedef _ipp_value_t ipp_value_t; /**** Convenience typedef that will be removed @private@ ****/
-struct _ipp_attribute_s /**** Attribute ****/
+struct _ipp_attribute_s /**** IPP attribute ****/
{
ipp_attribute_t *next; /* Next attribute in list */
ipp_tag_t group_tag, /* Job/Printer/Operation group tag */
padding: 5px 2px 5px 10px;
text-align: left;
vertical-align: top;
- width: 80%;
}
h1.title {
}
<li><a href="#httpGetExpect">httpGetExpect</a></li>
<li><a href="#httpGetFd">httpGetFd</a></li>
<li><a href="#httpGetField">httpGetField</a></li>
- <li><a href="#httpGetHostByName">httpGetHostByName</a></li>
<li><a href="#httpGetHostname">httpGetHostname</a></li>
<li><a href="#httpGetKeepAlive">httpGetKeepAlive</a></li>
<li><a href="#httpGetLength2">httpGetLength2</a></li>
<li><a href="#httpShutdown">httpShutdown</a></li>
<li><a href="#httpStateString">httpStateString</a></li>
<li><a href="#httpStatus">httpStatus</a></li>
- <li><a href="#httpTrace">httpTrace</a></li>
<li><a href="#httpURIStatusString">httpURIStatusString</a></li>
<li><a href="#httpUpdate">httpUpdate</a></li>
<li><a href="#httpWait">httpWait</a></li>
<tr><th>port</th>
<td class="description">Port number</td></tr>
<tr><th>addrlist</th>
- <td class="description">List of addresses or NULL to lookup</td></tr>
+ <td class="description">List of addresses or <code>NULL</code> to lookup</td></tr>
<tr><th>family</th>
<td class="description">Address family to use or <code>AF_UNSPEC</code> for any</td></tr>
<tr><th>encryption</th>
<p class="description">Decoded string</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The caller must initialize "outlen" to the maximum size of the decoded
-string before calling @httpDecode64_2@. On return "outlen" contains the
+string before calling <code>httpDecode64_2</code>. On return "outlen" contains the
decoded length of the string.
</p>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Field index</p>
<h3 class="function"><a id="httpFlush">httpFlush</a></h3>
- <p class="description">Flush data from a HTTP connection.</p>
+ <p class="description">Flush data read from a HTTP connection.</p>
<p class="code">
void httpFlush(<a href="#http_t">http_t</a> *http);</p>
<h4 class="parameters">Parameters</h4>
<td class="description">HTTP connection</td></tr>
</tbody></table>
<h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="httpFlushWrite">httpFlushWrite</a></h3>
- <p class="description">Flush data in write buffer.</p>
+ <p class="description">Flush data written to a HTTP connection.</p>
<p class="code">
int httpFlushWrite(<a href="#http_t">http_t</a> *http);</p>
<h4 class="parameters">Parameters</h4>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Time of last read or write</p>
<h4 class="discussion">Discussion</h4>
- <p class="discussion">The return value is the UNIX time of the last read or write.
+ <p class="discussion">The return value is the time in seconds of the last read or write.
</p>
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a id="httpGetAddress">httpGetAddress</a></h3>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Connected address or <code>NULL</code></p>
<h4 class="discussion">Discussion</h4>
- <p class="discussion">Returns <code>NULL</code> if the socket is currently unconnected.
+ <p class="discussion">For connections created with <a href="#httpConnect2"><code>httpConnect2</code></a>, the address is for the
+server. For connections created with <a href="#httpAccept"><code>httpAccept</code></a>, the address is for
+the client.<br>
+<br>
+Returns <code>NULL</code> if the socket is currently unconnected.
</p>
<h3 class="function"><span class="info"> CUPS 1.3/macOS 10.5 </span><a id="httpGetAuthString">httpGetAuthString</a></h3>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Authorization string</p>
<h4 class="discussion">Discussion</h4>
- <p class="discussion">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.
+ <p class="discussion">The authorization string is set by <a href="#cupsDoAuthentication"><code>cupsDoAuthentication</code></a> and
+<a href="#httpSetAuthString"><code>httpSetAuthString</code></a>. Use <a href="#httpGetAuthString"><code>httpGetAuthString</code></a> to retrieve the
+string to use with <a href="#httpSetField"><code>httpSetField</code></a> for the
+<code>HTTP_FIELD_AUTHORIZATION</code> value.
</p>
<h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="httpGetBlocking">httpGetBlocking</a></h3>
<td class="description">HTTP connection</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
- <p class="description">Cookie data or NULL</p>
+ <p class="description">Cookie data or <code>NULL</code></p>
<h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="httpGetDateString2">httpGetDateString2</a></h3>
<p class="description">Get a formatted date/time string from a time value.</p>
<p class="code">
<h4 class="parameters">Parameters</h4>
<table class="list"><tbody>
<tr><th>t</th>
- <td class="description">UNIX time</td></tr>
+ <td class="description">Time in seconds</td></tr>
<tr><th>s</th>
<td class="description">String buffer</td></tr>
<tr><th>slen</th>
<td class="description">Date/time string</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
- <p class="description">UNIX time</p>
+ <p class="description">Time in seconds</p>
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a id="httpGetEncryption">httpGetEncryption</a></h3>
<p class="description">Get the current encryption mode of a connection.</p>
<p class="code">
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Field value</p>
-<h3 class="function"><span class="info"> DEPRECATED </span><a id="httpGetHostByName">httpGetHostByName</a></h3>
- <p class="description">Lookup a hostname or IPv4 address, and return
-address records for the specified name.</p>
-<p class="code">
-struct hostent *httpGetHostByName(const char *name);</p>
-<h4 class="parameters">Parameters</h4>
-<table class="list"><tbody>
-<tr><th>name</th>
- <td class="description">Hostname or IP address</td></tr>
-</tbody></table>
-<h4 class="returnvalue">Return Value</h4>
- <p class="description">Host entry</p>
<h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="httpGetHostname">httpGetHostname</a></h3>
<p class="description">Get the FQDN for the connection or local system.</p>
<p class="code">
<td class="description">Size of value buffer</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
- <p class="description">Value or NULL</p>
+ <p class="description">Value or <code>NULL</code></p>
<h3 class="function"><a id="httpGetVersion">httpGetVersion</a></h3>
<p class="description">Get the HTTP version at the other end.</p>
<p class="code">
<td class="description">HTTP connection</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
- <p class="description">Line or NULL</p>
+ <p class="description">Line or <code>NULL</code></p>
<h3 class="function"><a id="httpHead">httpHead</a></h3>
<p class="description">Send a HEAD request to the server.</p>
<p class="code">
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function copies available data from the given HTTP connection, reading
a buffer as needed. The data is still available for reading using
-<a href="#httpRead"><code>httpRead</code></a> or <a href="#httpRead2"><code>httpRead2</code></a>.<br>
+<a href="#httpRead2"><code>httpRead2</code></a>.<br>
<br>
For non-blocking connections the usual timeouts apply.
</tbody></table>
<h4 class="discussion">Discussion</h4>
<p class="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().
+the HTTP connection object. You must still call <a href="#httpSetField"><code>httpSetField</code></a> to set
+<code>HTTP_FIELD_AUTHORIZATION</code> prior to issuing a HTTP request using
+<a href="#httpGet"><code>httpGet</code></a>, <a href="#httpHead"><code>httpHead</code></a>, <a href="#httpOptions"><code>httpOptions</code></a>, <a href="#httpPost"><code>httpPost</code></a>, or
+<a href="#httpPut"><code>httpPut</code></a>.
</p>
<h3 class="function"><span class="info"> CUPS 1.1.19/macOS 10.3 </span><a id="httpSetCookie">httpSetCookie</a></h3>
<td class="description">Number of seconds for timeout,
must be greater than 0</td></tr>
<tr><th>cb</th>
- <td class="description">Callback function or NULL</td></tr>
+ <td class="description">Callback function or <code>NULL</code></td></tr>
<tr><th>user_data</th>
<td class="description">User data pointer</td></tr>
</tbody></table>
<p class="description">Localized status string</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The returned string is localized to the current POSIX locale and is based
-on the status strings defined in RFC 2616.</p>
-<h3 class="function"><a id="httpTrace">httpTrace</a></h3>
- <p class="description">Send an TRACE request to the server.</p>
-<p class="code">
-int httpTrace(<a href="#http_t">http_t</a> *http, const char *uri);</p>
-<h4 class="parameters">Parameters</h4>
-<table class="list"><tbody>
-<tr><th>http</th>
- <td class="description">HTTP connection</td></tr>
-<tr><th>uri</th>
- <td class="description">URI for trace</td></tr>
-</tbody></table>
-<h4 class="returnvalue">Return Value</h4>
- <p class="description">Status of call (0 = success)</p>
+on the status strings defined in RFC 7231.</p>
<h3 class="function"><span class="info"> CUPS 2.0/OS 10.10 </span><a id="httpURIStatusString">httpURIStatusString</a></h3>
<p class="description">Return a string describing a URI status code.</p>
<p class="code">
</p>
<h3 class="function"><a id="ippAddDate">ippAddDate</a></h3>
- <p class="description">Add a date attribute to an IPP message.</p>
+ <p class="description">Add a dateTime attribute to an IPP message.</p>
<p class="code">
<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddDate(<a href="#ipp_t">ipp_t</a> *ipp, ipp_tag_t group, const char *name, const <a href="#ipp_uchar_t">ipp_uchar_t</a> *value);</p>
<h4 class="parameters">Parameters</h4>
<p class="description">1 on a match, 0 on no match</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">Returns non-zero when the attribute contains a matching charset, keyword,
-language, mimeMediaType, name, text, URI, or URI scheme value.
+naturalLanguage, mimeMediaType, name, text, uri, or uriScheme value.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippCopyAttribute">ippCopyAttribute</a></h3>
</p>
<h3 class="function"><a id="ippDateToTime">ippDateToTime</a></h3>
- <p class="description">Convert from RFC 1903 Date/Time format to UNIX time
-in seconds.</p>
+ <p class="description">Convert from RFC 2579 Date/Time format to time in
+seconds.</p>
<p class="code">
time_t ippDateToTime(const <a href="#ipp_uchar_t">ipp_uchar_t</a> *date);</p>
<h4 class="parameters">Parameters</h4>
<table class="list"><tbody>
<tr><th>date</th>
- <td class="description">RFC 1903 date info</td></tr>
+ <td class="description">RFC 2579 date info</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
<p class="description">UNIX time value</p>
<p class="description">Boolean value or 0 on error</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
+<code>ippGetCount(attr)</code> - 1.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippGetCollection">ippGetCollection</a></h3>
<p class="description">Collection value or <code>NULL</code> on error</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
+<code>ippGetCount(attr)</code> - 1.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippGetCount">ippGetCount</a></h3>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Number of values or 0 on error</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippGetDate">ippGetDate</a></h3>
- <p class="description">Get a date value for an attribute.</p>
+ <p class="description">Get a dateTime value for an attribute.</p>
<p class="code">
const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippGetDate(<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr, int element);</p>
<h4 class="parameters">Parameters</h4>
<td class="description">Value number (0-based)</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
- <p class="description">Date value or <code>NULL</code></p>
+ <p class="description">dateTime value or <code>NULL</code></p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
+<code>ippGetCount(attr)</code> - 1.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippGetGroupTag">ippGetGroupTag</a></h3>
<p class="description">Value or 0 on error</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
+<code>ippGetCount(attr)</code> - 1.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippGetName">ippGetName</a></h3>
<p class="description">Pointer to octetString data</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
+<code>ippGetCount(attr)</code> - 1.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippGetOperation">ippGetOperation</a></h3>
<p class="description">Lower value of range or 0</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
+<code>ippGetCount(attr)</code> - 1.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippGetRequestId">ippGetRequestId</a></h3>
<p class="description">Horizontal/cross feed resolution or 0</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
+<code>ippGetCount(attr)</code> - 1.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippGetState">ippGetState</a></h3>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Get the string and optionally the language code for an attribute.</p>
<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
+<code>ippGetCount(attr)</code> - 1.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippGetValueTag">ippGetValueTag</a></h3>
<tr><th>ipp</th>
<td class="description">IPP message</td></tr>
<tr><th>minor</th>
- <td class="description">Minor version number or <code>NULL</code></td></tr>
+ <td class="description">Minor version number or <code>NULL</code> for don't care</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Major version number or 0 on error</p>
<h4 class="returnvalue">Return Value</h4>
<p class="description">IPP request message</p>
<h4 class="discussion">Discussion</h4>
- <p class="discussion">The new request message is initialized with the attributes-charset and
-attributes-natural-language attributes added. The
-attributes-natural-language value is derived from the current locale.
+ <p class="discussion">The new request message is initialized with the "attributes-charset" and
+"attributes-natural-language" attributes added. The
+"attributes-natural-language" value is derived from the current locale.
</p>
<h3 class="function"><span class="info"> CUPS 1.7/macOS 10.9 </span><a id="ippNewResponse">ippNewResponse</a></h3>
<h4 class="returnvalue">Return Value</h4>
<p class="description">IPP response message</p>
<h4 class="discussion">Discussion</h4>
- <p class="discussion">The new response message is initialized with the same version-number,
-request-id, attributes-charset, and attributes-natural-language as the
-provided request message. If the attributes-charset or
-attributes-natural-language attributes are missing from the request,
-"utf-8" and a value derived from the current locale are substituted,
+ <p class="discussion">The new response message is initialized with the same "version-number",
+"request-id", "attributes-charset", and "attributes-natural-language" as the
+provided request message. If the "attributes-charset" or
+"attributes-natural-language" attributes are missing from the request,
+'utf-8' and a value derived from the current locale are substituted,
respectively.
</p>
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
+<code>ippGetCount(attr)</code>.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippSetCollection">ippSetCollection</a></h3>
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
+<code>ippGetCount(attr)</code>.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippSetDate">ippSetDate</a></h3>
- <p class="description">Set a date value in an attribute.</p>
+ <p class="description">Set a dateTime value in an attribute.</p>
<p class="code">
int ippSetDate(<a href="#ipp_t">ipp_t</a> *ipp, <a href="#ipp_attribute_t">ipp_attribute_t</a> **attr, int element, const <a href="#ipp_uchar_t">ipp_uchar_t</a> *datevalue);</p>
<h4 class="parameters">Parameters</h4>
<tr><th>element</th>
<td class="description">Value number (0-based)</td></tr>
<tr><th>datevalue</th>
- <td class="description">Date value</td></tr>
+ <td class="description">dateTime value</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
<p class="description">1 on success, 0 on failure</p>
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
+<code>ippGetCount(attr)</code>.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippSetGroupTag">ippSetGroupTag</a></h3>
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
+<code>ippGetCount(attr)</code>.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippSetName">ippSetName</a></h3>
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
+<code>ippGetCount(attr)</code>.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippSetOperation">ippSetOperation</a></h3>
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
+<code>ippGetCount(attr)</code>.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippSetRequestId">ippSetRequestId</a></h3>
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
+<code>ippGetCount(attr)</code>.
</p>
<h3 class="function"><span class="info"> CUPS 1.6/macOS 10.8 </span><a id="ippSetState">ippSetState</a></h3>
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
+<code>ippGetCount(attr)</code>.
</p>
<h3 class="function"><span class="info"> CUPS 1.7/macOS 10.9 </span><a id="ippSetStringf">ippSetStringf</a></h3>
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
+<code>ippGetCount(attr)</code>.<br>
<br>
The <code>format</code> parameter uses formatting characters compatible with the
printf family of standard functions. Additional arguments follow it as
The <code>attr</code> parameter may be modified as a result of setting the value.<br>
<br>
The <code>element</code> parameter specifies which value to set from 0 to
-<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
+<code>ippGetCount(attr)</code>.<br>
<br>
The <code>format</code> parameter uses formatting characters compatible with the
printf family of standard functions. Additional arguments follow it as
<h4 class="returnvalue">Return Value</h4>
<p class="description">Tag name</p>
<h4 class="discussion">Discussion</h4>
- <p class="discussion">The returned names are defined in RFC 2911 and 3382.
+ <p class="discussion">The returned names are defined in RFC 8011 and the IANA IPP Registry.
</p>
<h3 class="function"><span class="info"> CUPS 1.4/macOS 10.6 </span><a id="ippTagValue">ippTagValue</a></h3>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Tag value</p>
<h4 class="discussion">Discussion</h4>
- <p class="discussion">The tag names are defined in RFC 2911 and 3382.
+ <p class="discussion">The tag names are defined in RFC 8011 and the IANA IPP Registry.
</p>
<h3 class="function"><a id="ippTimeToDate">ippTimeToDate</a></h3>
- <p class="description">Convert from UNIX time to RFC 1903 format.</p>
+ <p class="description">Convert from time in seconds to RFC 2579 format.</p>
<p class="code">
const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate(time_t t);</p>
<h4 class="parameters">Parameters</h4>
<table class="list"><tbody>
<tr><th>t</th>
- <td class="description">UNIX time value</td></tr>
+ <td class="description">Time in seconds</td></tr>
</tbody></table>
<h4 class="returnvalue">Return Value</h4>
- <p class="description">RFC-1903 date/time data</p>
+ <p class="description">RFC-2579 date/time data</p>
<h3 class="function"><span class="info"> CUPS 1.7/macOS 10.9 </span><a id="ippValidateAttribute">ippValidateAttribute</a></h3>
<p class="description">Validate the contents of an attribute.</p>
<p class="code">
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function validates the contents of an attribute based on the name and
value tag. 1 is returned if the attribute is valid, 0 otherwise. On
-failure, cupsLastErrorString() is set to a human-readable message.
+failure, <a href="#cupsLastErrorString"><code>cupsLastErrorString</code></a> is set to a human-readable message.
</p>
<h3 class="function"><span class="info"> CUPS 1.7/macOS 10.9 </span><a id="ippValidateAttributes">ippValidateAttributes</a></h3>
<p class="description">1 if valid, 0 otherwise</p>
<h4 class="discussion">Discussion</h4>
<p class="discussion">This function validates the contents of the IPP message, including each
-attribute. Like <a href="#ippValidateAttribute"><code>ippValidateAttribute</code></a>, cupsLastErrorString() is set
-to a human-readable message on failure.
+attribute. Like <a href="#ippValidateAttribute"><code>ippValidateAttribute</code></a>, <a href="#cupsLastErrorString"><code>cupsLastErrorString</code></a> is
+set to a human-readable message on failure.
</p>
<h3 class="function"><a id="ippWrite">ippWrite</a></h3>
<p class="code">
typedef struct _ipp_attribute_s ipp_attribute_t;
</p>
- <h3 class="typedef"><a id="ipp_copycb_t">ipp_copycb_t</a></h3>
- <p class="description">The following structures are PRIVATE starting with CUPS 1.6/macOS 10.8.
-Please use the new accessor functions available in CUPS 1.6 and later, as
-these definitions will be moved to a private header file in a future release.</p>
+ <h3 class="typedef"><a id="ipp_copycb_t"><span class="info"> CUPS 1.6/macOS 10.8 </span>ipp_copycb_t</a></h3>
+ <p class="description">ippCopyAttributes callback function </p>
<p class="code">
typedef int(*)(void *context, <a href="#ipp_t">ipp_t</a> *dst, <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr)ipp_copycb_t;
</p>
<h3 class="typedef"><a id="ipp_iocb_t"><span class="info"> CUPS 1.2/macOS 10.5 </span>ipp_iocb_t</a></h3>
- <p class="description">IPP IO Callback Function </p>
+ <p class="description">ippReadIO/ippWriteIO callback function </p>
<p class="code">
typedef ssize_t(*)(void *context, ipp_uchar_t *buffer, size_t bytes) ipp_iocb_t;
</p>
typedef enum <a href="#ipp_orient_e">ipp_orient_e</a> ipp_orient_t;
</p>
<h3 class="typedef"><a id="ipp_pstate_t">ipp_pstate_t</a></h3>
- <p class="description">Printer states</p>
+ <p class="description">Printer state values</p>
<p class="code">
typedef enum <a href="#ipp_pstate_e">ipp_pstate_e</a> ipp_pstate_t;
</p>
<h3 class="typedef"><a id="ipp_quality_t">ipp_quality_t</a></h3>
- <p class="description">Qualities</p>
+ <p class="description">Print quality values</p>
<p class="code">
typedef enum <a href="#ipp_quality_e">ipp_quality_e</a> ipp_quality_t;
</p>
typedef enum <a href="#ipp_res_e">ipp_res_e</a> ipp_res_t;
</p>
<h3 class="typedef"><a id="ipp_state_t">ipp_state_t</a></h3>
- <p class="description">IPP states</p>
+ <p class="description">ipp_t state values</p>
<p class="code">
typedef enum <a href="#ipp_state_e">ipp_state_e</a> ipp_state_t;
</p>
<tr><th>IPP_ORIENT_REVERSE_PORTRAIT </th> <td class="description">180 degrees</td></tr>
</tbody></table>
<h3 class="enumeration"><a id="ipp_pstate_e">ipp_pstate_e</a></h3>
- <p class="description">Printer states</p>
+ <p class="description">Printer state values</p>
<h4 class="constants">Constants</h4>
<table class="list"><tbody>
<tr><th>IPP_PSTATE_IDLE </th> <td class="description">Printer is idle</td></tr>
<tr><th>IPP_PSTATE_STOPPED </th> <td class="description">Printer is stopped</td></tr>
</tbody></table>
<h3 class="enumeration"><a id="ipp_quality_e">ipp_quality_e</a></h3>
- <p class="description">Qualities</p>
+ <p class="description">Print quality values</p>
<h4 class="constants">Constants</h4>
<table class="list"><tbody>
<tr><th>IPP_QUALITY_DRAFT </th> <td class="description">Draft quality</td></tr>
<tr><th>IPP_RES_PER_INCH </th> <td class="description">Pixels per inch</td></tr>
</tbody></table>
<h3 class="enumeration"><a id="ipp_state_e">ipp_state_e</a></h3>
- <p class="description">IPP states</p>
+ <p class="description">ipp_t state values</p>
<h4 class="constants">Constants</h4>
<table class="list"><tbody>
<tr><th>IPP_STATE_ATTRIBUTE </th> <td class="description">One or more attributes need to be sent/received</td></tr>
<tr><th>IPP_STATE_IDLE </th> <td class="description">Nothing is happening/request completed</td></tr>
</tbody></table>
<h3 class="enumeration"><a id="ipp_status_e">ipp_status_e</a></h3>
- <p class="description">IPP status codes</p>
+ <p class="description">IPP status code values</p>
<h4 class="constants">Constants</h4>
<table class="list"><tbody>
<tr><th>IPP_STATUS_CUPS_INVALID </th> <td class="description">Invalid status name for <a href="#ippErrorValue"><code>ippErrorValue</code></a></td></tr>
<tr><th>IPP_STATUS_OK_TOO_MANY_EVENTS </th> <td class="description">successful-ok-too-many-events</td></tr>
</tbody></table>
<h3 class="enumeration"><a id="ipp_tag_e">ipp_tag_e</a></h3>
- <p class="description">Format tags for attributes</p>
+ <p class="description">Value and group tag values for attributes</p>
<h4 class="constants">Constants</h4>
<table class="list"><tbody>
<tr><th>IPP_TAG_ADMINDEFINE </th> <td class="description">Admin-defined value</td></tr>
72220EDE133305BB00FCA411 /* http-addr.c */,
72220EDF133305BB00FCA411 /* http-addrlist.c */,
72220EE1133305BB00FCA411 /* http-support.c */,
- 72220EE5133305BB00FCA411 /* ipp-support.c */,
72220EE6133305BB00FCA411 /* ipp.c */,
+ 72220EE5133305BB00FCA411 /* ipp-support.c */,
72220EE8133305BB00FCA411 /* langprintf.c */,
72220EEA133305BB00FCA411 /* language.c */,
72220EEF133305BB00FCA411 /* md5.c */,