[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
17/23: services: desktop: Deprecate 'geoclue-service' procedure.
From: |
guix-commits |
Subject: |
17/23: services: desktop: Deprecate 'geoclue-service' procedure. |
Date: |
Fri, 3 Mar 2023 12:07:26 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit ae0975332c60818793c6c63a3646c982d686bf49
Author: Bruno Victal <mirai@makinata.eu>
AuthorDate: Sat Feb 25 18:58:06 2023 +0000
services: desktop: Deprecate 'geoclue-service' procedure.
* doc/guix.texi (Desktop Services): Replace 'geoclue-service' with
'geoclue-service-type'.
* gnu/services/desktop.scm (<geoclue-configuration>): Set default values
based on the values from the now deprecated geoclue-service procedure.
(geoclue-service): Deprecate procedure.
(desktop-services-for-system): Use geoclue-service-type.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
doc/guix.texi | 26 ++++++++++-----------
gnu/services/desktop.scm | 61 ++++++++++++++++++++++++++++--------------------
2 files changed, 48 insertions(+), 39 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 659f451933..74238cc150 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -23633,20 +23633,18 @@ IceCat and Epiphany both query the user before
allowing a web page to
know the user's location.
@end defvar
-@deffn {Scheme Procedure} geoclue-service [#:colord @var{colord}] @
- [#:whitelist '()] @
- [#:wifi-geolocation-url
"https://location.services.mozilla.com/v1/geolocate?key=geoclue"] @
- [#:submit-data? #f]
- [#:wifi-submission-url
"https://location.services.mozilla.com/v1/submit?key=geoclue"] @
- [#:submission-nick "geoclue"] @
- [#:applications %standard-geoclue-applications]
-Return a service that runs the GeoClue location service. This service
-provides a D-Bus interface to allow applications to request access to a
-user's physical location, and optionally to add information to online
-location databases. See
-@uref{https://wiki.freedesktop.org/www/Software/GeoClue/, the GeoClue
-web site} for more information.
-@end deffn
+@defvar geoclue-service-type
+Type for the service that runs the
+@url{https://wiki.freedesktop.org/www/Software/GeoClue/, GeoClue}
+location service. This service provides a D-Bus interface to allow
+applications to request access to a user's physical location, and
+optionally to add information to online location databases.
+
+The value for this service is a @code{<geoclue-configuration>} object.
+@end defvar
+
+@c TODO: Document <geoclue-configuration>, preferably by refactoring this to
use
+@c define-configuration and generating documentation from it.
@deffn {Scheme Procedure} bluetooth-service [#:bluez @var{bluez}] @
[@w{#:auto-enable? #f}]
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 99a3628606..073e0132e1 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -106,7 +106,7 @@
geoclue-configuration
geoclue-configuration?
%standard-geoclue-applications
- geoclue-service
+ geoclue-service ; deprecated
geoclue-service-type
bluetooth-service-type
@@ -318,19 +318,6 @@ used by GNOME.")
;;; GeoClue D-Bus service.
;;;
-;; TODO: Export.
-(define-record-type* <geoclue-configuration>
- geoclue-configuration make-geoclue-configuration
- geoclue-configuration?
- (geoclue geoclue-configuration-geoclue
- (default geoclue))
- (whitelist geoclue-configuration-whitelist)
- (wifi-geolocation-url geoclue-configuration-wifi-geolocation-url)
- (submit-data? geoclue-configuration-submit-data?)
- (wifi-submission-url geoclue-configuration-wifi-submission-url)
- (submission-nick geoclue-configuration-submission-nick)
- (applications geoclue-configuration-applications))
-
(define* (geoclue-application name #:key (allowed? #t) system? (users '()))
"Configure default GeoClue access permissions for an application. NAME is
the Desktop ID of the application, without the .desktop part. If ALLOWED? is
@@ -350,6 +337,28 @@ users are allowed."
(geoclue-application "epiphany" #:system? #f)
(geoclue-application "firefox" #:system? #f)))
+;; TODO: Use define-configuration and export accessors.
+(define-record-type* <geoclue-configuration>
+ geoclue-configuration make-geoclue-configuration
+ geoclue-configuration?
+ (geoclue geoclue-configuration-geoclue
+ (default geoclue))
+ (whitelist geoclue-configuration-whitelist
+ (default '()))
+ (wifi-geolocation-url
+ geoclue-configuration-wifi-geolocation-url
+ ;; Mozilla geolocation service:
+ (default "https://location.services.mozilla.com/v1/geolocate?key=geoclue"))
+ (submit-data? geoclue-configuration-submit-data?
+ (default #f))
+ (wifi-submission-url
+ geoclue-configuration-wifi-submission-url
+ (default "https://location.services.mozilla.com/v1/submit?key=geoclue"))
+ (submission-nick geoclue-configuration-submission-nick
+ (default "geoclue"))
+ (applications geoclue-configuration-applications
+ (default %standard-geoclue-applications)))
+
(define* (geoclue-configuration-file config)
"Return a geoclue configuration file."
(plain-file "geoclue.conf"
@@ -397,16 +406,18 @@ This service provides a D-Bus interface to allow
applications to request
access to a user's physical location, and optionally to add information to
online location databases.")))
-(define* (geoclue-service #:key (geoclue geoclue)
- (whitelist '())
- (wifi-geolocation-url
- ;; Mozilla geolocation service:
-
"https://location.services.mozilla.com/v1/geolocate?key=geoclue")
- (submit-data? #f)
- (wifi-submission-url
-
"https://location.services.mozilla.com/v1/submit?key=geoclue")
- (submission-nick "geoclue")
- (applications %standard-geoclue-applications))
+(define-deprecated
+ (geoclue-service #:key (geoclue geoclue)
+ (whitelist '())
+ (wifi-geolocation-url
+ ;; Mozilla geolocation service:
+
"https://location.services.mozilla.com/v1/geolocate?key=geoclue")
+ (submit-data? #f)
+ (wifi-submission-url
+
"https://location.services.mozilla.com/v1/submit?key=geoclue")
+ (submission-nick "geoclue")
+ (applications %standard-geoclue-applications))
+ geoclue-service-type
"Return a service that runs the @command{geoclue} location service. This
service provides a D-Bus interface to allow applications to request access to
a user's physical location, and optionally to add information to online
@@ -1865,7 +1876,7 @@ applications needing access to be root.")
(service accountsservice-service-type)
(service cups-pk-helper-service-type)
(service colord-service-type)
- (geoclue-service)
+ (service geoclue-service-type)
(service polkit-service-type)
(service elogind-service-type)
(dbus-service)
- 16/23: services: desktop: Deprecate 'udisks-service' procedure., (continued)
- 16/23: services: desktop: Deprecate 'udisks-service' procedure., guix-commits, 2023/03/03
- 19/23: services: mail: Deprecate 'dovecot-service' procedure., guix-commits, 2023/03/03
- 20/23: services: vpn: Deprecate 'openvpn-client-service' & 'openvpn-server-service' procedures., guix-commits, 2023/03/03
- 21/23: services: lirc: Deprecate 'lirc-service' procedure., guix-commits, 2023/03/03
- 23/23: services: dbus: Deprecate 'dbus-service' procedure., guix-commits, 2023/03/03
- 22/23: services: spice: Deprecate 'spice-vdagent-service' procedure., guix-commits, 2023/03/03
- 12/23: services: desktop: Deprecate 'elogind-service' procedure., guix-commits, 2023/03/03
- 18/23: services: desktop: Deprecate 'bluetooth-service' procedure., guix-commits, 2023/03/03
- 07/23: services: base: Deprecate 'syslog-service' procedure., guix-commits, 2023/03/03
- 14/23: services: desktop: Deprecate 'accountsservice-service' procedure., guix-commits, 2023/03/03
- 17/23: services: desktop: Deprecate 'geoclue-service' procedure.,
guix-commits <=