;;; register-property-test.el --- Test program for complex :dict-entry. -*- lexical-binding: t; -*- ;; Copyright (C) 2020 Hugh Daschbach ;; Author: Hugh Daschbach ;; Keywords: tools ;; This program 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. ;; This program 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 this program. If not, see . ;;; Commentary: ;; This program demonstrates an error in handling D-Bus properties ;; interface. ;; ;;; Code: (require 'dbus) (dbus-register-service :system "org.gnu.Emacs") (defun main () (interactive) (setq dbus-debug t) (setq debug-on-error t) ;; Boolean (dbus-register-property :system "org.gnu.Emacs" "/org/gnu/Emacs/hci0/dev_45_6d_61_63_73_01/service0002/characteristic0003" "org.bluez.GattCharacteristic1" "Discoverable-untyped" :read nil t) (dbus-register-property :system "org.gnu.Emacs" "/org/gnu/Emacs/hci0/dev_45_6d_61_63_73_01/service0002/characteristic0003" "org.bluez.GattCharacteristic1" "Discoverable-typed" :read :boolean nil t) (sit-for 1) (start-process "gmo" "*GMO*" "dbus-send" "--system" "--print-reply" "--type=method_call" "--system" "--dest=org.gnu.Emacs" "/" "org.freedesktop.DBus.ObjectManager.GetManagedObjects") (switch-to-buffer "*scratch*") (insert "(pp (dbus-get-all-managed-objects :system \"org.gnu.Emacs\" \"/\"))\n") (sit-for 1) (split-window-right) (switch-to-buffer "*GMO*") (goto-char (point-min))) (provide 'register-property-test) ;;; register-property-test.el ends here