bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43252: 27.1; DBus properties lack type hints or overrides


From: Michael Albinus
Subject: bug#43252: 27.1; DBus properties lack type hints or overrides
Date: Wed, 09 Sep 2020 15:25:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hugh Daschbach <hugh@ccss.com> writes:

Hi Hugh,

> The attached script generates two boolean properties, then issues a
> GetManagedObjects method call.  The two properties are not returned,
> though they are in the registered objects table.

Thanks for the heads up. There was still a small thinko in
dbus-managed-objects-handler which I haven't noticed, because in my
tests I have registered both methods and properties in parallel. I've
pushed a fix to master, including extension of dbus-tests.el (which
shall prevent this problem to reappear silently).

> The script also drops an elisp ‘dbus-get-all-managed-objects’ request
> in
> the *scratch* buffer.  If I execute that, I get a similar failure to
> #43251.  That may not be surprising.

Sure. I haven't worked on this yet.

> I’m working an a more comprehensive test that registers the variety of
> types I need to support.  I’ll post that when I have something worth
> looking at.  I’d like to present that in a form compatible with
> dbus-test.el rather than throw more one off scripts at you.  So give
> me
> a bit.

That would be great! I'll happily add your tests to
dbus-tests.el. However, this would be a contribution to Emacs. For
contributions exceeding ~15 lines, every contributor shall sign the
legal papers from the FSF. Would you be willing to do?

> I think the mechanism you implemented works well for simple types. Is
> there a mechanism to specify the signature for an empty compound type?
> I need arrays and dictionaries of various types.

Until now, the implementation allows only basic D-Bus types for
properties. Nobody has asked for more so far :-)

I could extend this for complex types. Since this will require internal
changes of data structures, it might take some days.

An empty array could be specified by the element's signature, like
(:array :signature "{sv}"). See the D-Bus manual via
(info "(dbus) Type Conversion")

> For something like a byte array, I expect I’ll need to interleave the
> :byte type between each value in the array.  Correct?

Yes.

> Thanks,
> Hugh

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]