From: Ralph Ronnquist Date: Sun, 16 Apr 2023 01:42:32 +0000 (+1000) Subject: Added optional path prefix (with :) to the METHOD argument of :invoke. X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=2349b5ad66f812ceacb6a03943f7e47e569ac21f;p=rrq%2Flsp-utils.git Added optional path prefix (with :) to the METHOD argument of :invoke. Note on the marshalling encoding of the GetManagedObjects signature. --- 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"