;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021, 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . ;;; Commentary: ;;; ;;; This module contains procedures to interact with D-Bus via the 'dbus-send' ;;; command line utility. Before using any public procedure ;;; ;;; Code: (define-module (gnu build dbus-service) #:use-module (ice-9 match) #:use-module (
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2024-01-21 23:57:37 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2024-01-22 00:20:55 +0100
commit1c17b444c67fd2a89a5ebebb22f7de7279180a71 (patch)
tree546fffc47618554ca0d09f126f76e74af4e2cee7 /gnu/installer/newt/welcome.scm
parent396d84071fc8b3cb317f85457d3ae51c094953de (diff)
downloadguix-1c17b444c67fd2a89a5ebebb22f7de7279180a71.tar.gz
guix-1c17b444c67fd2a89a5ebebb22f7de7279180a71.zip
gnu: emacs-org-re-reveal: Update to 3.25.1.
* gnu/packages/emacs-xyz.scm (emacs-org-re-reveal): Update to 3.25.1. Change-Id: I79a195184b5d2ad842e4738862086c0b595b967c
Diffstat (limited to 'gnu/installer/newt/welcome.scm')
0 files changed, 0 insertions, 0 deletions
signature type from ARGUMENT." ;; XXX: avoid ..1 when using vectors due to a bug (?) in (ice-9 match). (match argument ((? boolean?) "b") ((? string?) "s") (#((? string?) (? string?) ...) "as") (#(((? string?) . (? string?)) ((? string?) . (? string?)) ...) "a{ss}") (_ (error 'dbus "no rule to infer type from argument" argument)))) (define* (call-dbus-method method #:key (path "/org/freedesktop/DBus") (destination "org.freedesktop.DBus") (interface "org.freedesktop.DBus") (connection (%current-dbus-connection)) arguments timeout) "Call the D-Bus method specified by METHOD, PATH, DESTINATION and INTERFACE. The currently active D-Bus CONNECTION is used unless explicitly provided. Method arguments may be provided via ARGUMENTS sent as the message body. TIMEOUT limit the maximum time to allow for the reply. Return the body of the reply." (let ((message (make-d-bus-message MESSAGE_TYPE_METHOD_CALL 0 #f '() `#(,(header-PATH path) ,(header-DESTINATION destination) ,(header-INTERFACE interface) ,(header-MEMBER method) ,@(if arguments (list (header-SIGNATURE (string-join (map argument->signature-type arguments) ""))) '())) arguments))) (send-dbus message #:connection connection #:timeout timeout))) ;;; ;;; Higher-level, D-Bus procedures. ;;; (define (dbus-available-services) "Return the list of available (acquired) D-Bus services." (let ((names (vector->list (call-dbus-method "ListNames")))) ;; Remove entries such as ":1.7". (remove (cut string-prefix? ":" <>) names))) (define (dbus-service-available? service) "Predicate to check for the D-Bus SERVICE availability." (member service (dbus-available-services))) ;; Local Variables: ;; eval: (put 'with-retries 'scheme-indent-function 2) ;; End: