(Issue #4989)
- The CUPS build system now supports cross-compilation (Issue #4897)
- Added a new CUPS Programming Manual to replace the aging API documentation.
-- Added the cupsAddIntegerOption and cupsGetIntegerOption functions
+- Added the `cupsAddIntegerOption` and `cupsGetIntegerOption` functions
(Issue #4992)
-- The cupsGetDests and cupsCreateJob functions now support Bonjour printers
+- The `cupsGetDests` and `cupsCreateJob` functions now support Bonjour printers
(Issue #4993)
- Added a USB quirk rule for Lexmark E260dn printers (Issue #4994)
-- Fixed a potential buffer overflow in the cupstestppd utility (Issue #4996)
+- Fixed a potential buffer overflow in the `cupstestppd` utility (Issue #4996)
- IPP Everywhere improvements (Issue #4998)
- Fixed the "cancel all jobs" function in the web interface for several
languages (Issue #4999)
haven't yet been added (Issue #5006)
- Fixed a typo in the mime.types file.
- Fixed a bug in the Spanish web interface template (Issue #5016)
-- The cupsEnumDests* and cupsGetDest* functions now report the value of the
+- The `cupsEnumDests*` and `cupsGetDest*` functions now report the value of the
"printer-is-temporary" Printer Status attribute (Issue #5028)
- Added Chinese localization (Issue #5029)
-- The cupsCheckDestSupported function did not support NULL values (Issue #5031)
+- The `cupsCheckDestSupported` function did not support `NULL` values
+ (Issue #5031)
- Fixed some issues in the RPM spec file (Issue #5032)
+- The `cupsConnectDest` function now supports the `CUPS_DEST_FLAGS_DEVICE` flag
+ for explicitly connecting to the device (printer) associated with the
+ destination.
CHANGES IN CUPS V2.2.3
/* A connection is being established */
# define CUPS_DEST_FLAGS_CANCELED 0x40
/* Operation was canceled */
+# define CUPS_DEST_FLAGS_DEVICE 0x80
+ /* For @link cupsConnectDest@: Connect to device */
/* Flags for cupsGetDestMediaByName/Size */
# define CUPS_MEDIA_FLAGS_DEFAULT 0x00
* returns 0. The caller is responsible for calling @link httpClose@ on the
* returned connection.
*
+ * Starting with CUPS 2.2.4, the caller can pass @code CUPS_DEST_FLAGS_DEVICE@
+ * for the "flags" argument to connect directly to the device associated with
+ * the destination. Otherwise, the connection is made to the CUPS scheduler
+ * associated with the destination.
+ *
* @since CUPS 1.6/macOS 10.8@
*/
* Grab the printer URI...
*/
- if ((uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options)) == NULL)
+ if (flags & CUPS_DEST_FLAGS_DEVICE)
+ {
+ if ((uri = cupsGetOption("resolved-device-uri", dest->num_options, dest->options)) == NULL)
+ {
+ if ((uri = cupsGetOption("device-uri", dest->num_options, dest->options)) != NULL)
+ {
+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
+ if (strstr(uri, "._tcp"))
+ uri = cups_dnssd_resolve(dest, uri, msec, cancel, cb, user_data);
+#endif /* HAVE_DNSSD || HAVE_AVAHI */
+ }
+ }
+ }
+ else if ((uri = cupsGetOption("printer-uri-supported", dest->num_options, dest->options)) == NULL)
{
if ((uri = cupsGetOption("resolved-device-uri", dest->num_options, dest->options)) == NULL)
{
* pointed to by "cancel" is non-zero, or the block returns 0. The caller is
* responsible for calling @link httpClose@ on the returned connection.
*
+ * Starting with CUPS 2.2.4, the caller can pass @code CUPS_DEST_FLAGS_DEVICE@
+ * for the "flags" argument to connect directly to the device associated with
+ * the destination. Otherwise, the connection is made to the CUPS scheduler
+ * associated with the destination.
+ *
* @since CUPS 1.6/macOS 10.8@ @exclude all@
*/