;;; dbus-properties-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. ;; ;; `dbus-property-handler' provides an org.freedesktop.DBus.Properties ;; interface to respond to requests for registered properties. But, ;; unlike methods and signals, properties are not stored per interface ;; per object. They are merely stored per interface. ;; ;; So the current implementation cannot support properties on the same ;; interface with a different object path. ;;; Code: (require 'dbus) (defun main () (interactive) (setq dbus-debug t) (setq debug-on-error t) (sit-for 1) (dbus-register-property :session "org.gnu.Emacs" "/node0" "org.bluez.GattService1" "Device" :readwrite "-node0-") (sit-for 1) (dbus-call-method :session "com.example.SampleService" "/SomeObject" "com.example.SampleInterface" "HelloWorld" "xxx")) (provide 'dbus-properties-test) ;;; dbus-properties-test.el ends here