[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/09: services: cups: Add BrowseDNSSDSubTypes directive.
From: |
guix-commits |
Subject: |
06/09: services: cups: Add BrowseDNSSDSubTypes directive. |
Date: |
Thu, 29 Aug 2019 23:36:31 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit ee0de9945438cce41ef20e37144f41a8d40cd1ab
Author: Tobias Geerinckx-Rice <address@hidden>
Date: Thu Aug 29 23:02:10 2019 +0200
services: cups: Add BrowseDNSSDSubTypes directive.
* gnu/services/cups.scm (comma-separated-string-list?)
(serialize-comma-separated-string-list): New variables.
(cups-configuration)[browse-dns-sd-sub-types]: New field.
* doc/guix.texi (Printing Services): Document it.
---
doc/guix.texi | 8 ++++++++
gnu/services/cups.scm | 13 +++++++++++++
2 files changed, 21 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 1998ad0..ed74034 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14248,6 +14248,14 @@ longer required for quotas.
Defaults to @samp{#f}.
@end deftypevr
+@deftypevr {@code{cups-configuration} parameter} comma-separated-string-list
browse-dns-sd-sub-types
+Specifies a list of DNS-SD sub-types to advertise for each shared printer.
+For example, @samp{"_cups" "_print"} will tell network clients that both
+CUPS sharing and IPP Everywhere are supported.
+
+Defaults to @samp{"_cups"}.
+@end deftypevr
+
@deftypevr {@code{cups-configuration} parameter} browse-local-protocols
browse-local-protocols
Specifies which protocols to use for local printer sharing.
diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm
index e77c43b..ace7889 100644
--- a/gnu/services/cups.scm
+++ b/gnu/services/cups.scm
@@ -83,6 +83,14 @@
(define (serialize-multiline-string-list field-name val)
(for-each (lambda (str) (serialize-field field-name str)) val))
+(define (comma-separated-string-list? val)
+ (and (list? val)
+ (and-map (lambda (x)
+ (and (string? x) (not (string-index x #\,))))
+ val)))
+(define (serialize-comma-separated-string-list field-name val)
+ (serialize-field field-name (string-join val ",")))
+
(define (space-separated-string-list? val)
(and (list? val)
(and-map (lambda (x)
@@ -489,6 +497,11 @@ requests.")
(boolean #f)
"Specifies whether to purge job history data automatically when it is no
longer required for quotas.")
+ (browse-dns-sd-sub-types
+ (comma-separated-string-list (list "_cups"))
+ "Specifies a list of DNS-SD sub-types to advertise for each shared printer.
+For example, @samp{\"_cups\" \"_print\"} will tell network clients that both
+CUPS sharing and IPP Everywhere are supported.")
(browse-local-protocols
(browse-local-protocols 'dnssd)
"Specifies which protocols to use for local printer sharing.")
- branch master updated (02c6127 -> 43412ab), guix-commits, 2019/08/29
- 01/09: gnu: eolie: Update to 0.9.63., guix-commits, 2019/08/29
- 04/09: gnu: python-pybtex: Update to 0.22.2., guix-commits, 2019/08/29
- 05/09: gnu: emacs: Update to 26.3., guix-commits, 2019/08/29
- 02/09: gnu: conky: Update to 1.11.5., guix-commits, 2019/08/29
- 03/09: gnu: libhandy: Update to 0.0.11., guix-commits, 2019/08/29
- 06/09: services: cups: Add BrowseDNSSDSubTypes directive.,
guix-commits <=
- 09/09: gnu: aqbanking: Update to 5.8.1., guix-commits, 2019/08/29
- 07/09: services: cups: Move SET-ENV to FILES-CONFIGURATION., guix-commits, 2019/08/29
- 08/09: gnu: gwenhywfar: Update to 4.20.2., guix-commits, 2019/08/29