From 2349b5ad66f812ceacb6a03943f7e47e569ac21f Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Sun, 16 Apr 2023 11:42:32 +1000 Subject: [PATCH] Added optional path prefix (with :) to the METHOD argument of :invoke. Note on the marshalling encoding of the GetManagedObjects signature. --- lsp-dbus/lsp-dbus.lsp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lsp-dbus/lsp-dbus.lsp b/lsp-dbus/lsp-dbus.lsp index 98aa027..895f53d 100644 --- a/lsp-dbus/lsp-dbus.lsp +++ b/lsp-dbus/lsp-dbus.lsp @@ -119,13 +119,13 @@ ;; until a reply is given, but any such signals are stocked up as ;; pending for later processing on demand. (define (invoke METHOD ARGS (FLAGS 0)) - (when (regex "((.+)\\.)?([^(]+)\\((.*)\\)$" METHOD 0) - (let ((INTERFACE $2) (MEMBER $3) (SIGNATURE $4)) + (when (regex "((.+):)?((.+)\\.)?([^(]+)\\((.*)\\)$" METHOD 0) + (let ((PATH $2) (INTERFACE $4) (MEMBER $5) (SIGNATURE $6)) ;;(println (list 'invoke (bus-name) INTERFACE MEMBER SIGNATURE)) (if (message 'METHOD_CALL FLAGS (list nil ; (if SELF-NAME (list 'SENDER SELF-NAME)) (list 'DESTINATION (bus-name)) - (list 'PATH (%path)) + (list 'PATH (if (empty? PATH) (%path) PATH)) (if (empty? INTERFACE) nil (list 'INTERFACE INTERFACE)) (list 'MEMBER MEMBER) @@ -192,7 +192,8 @@ ;; DICT_ENTRY>> ;; objpath_interfaces_and_properties); -;;;; +;;org.freedesktop.DBus.ObjectManager.GetManagedObjects():a(oa(sa(sv))) +; ;;org.freedesktop.DBus.Hello():s ;;org.freedesktop.DBus.RequestName(su):u ;;org.freedesktop.DBus.ReleaseName(s):u @@ -224,4 +225,7 @@ ;;org.freedesktop.DBus.StartServiceByName(?) ;;org.freedesktop.DBus.NameOwnerChanged(?) +;; org.freedesktop.DBus.Introspectable.Introspect():s (xml data) +;; https://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format + "lsp-dbus.lsp" -- 2.39.2