All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
To: ell@lists.01.org
Subject: Re: [RFC/PATCH 00/21] Add support for the org.freedesktop.DBus.Properties interface
Date: Mon, 17 Nov 2014 12:34:32 +0200	[thread overview]
Message-ID: <5469CF38.9000106@linux.intel.com> (raw)
In-Reply-To: <5464D099.3010901@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]

Hi Denis,

>> There is already a dbus service API in ell. I wanted to keep it, 
>> wrapping the
>> gdbus-like API within the existing functions. However that has proven 
>> to be
>> impossible unless I would modify the existing API. Thus my 
>> conclusion: if I
>> have to break the existing API, let's do it all. So I finnally got 
>> rid of the
>> existing API.
>
> I find table/macro based approach unreadable and that is why I did not 
> use the gdbus approach in ell.  I'm actually quite happy with the 
> current API, it fits in with ell's design philosophy much better.  If 
> someone wants to re-use the API from gdbus I'm good with that, but 
> please don't throw stuff out in the process.
>
> Right now we are only focused on iwd, and this is our opportunity to 
> try new things.  I wouldn't rush to try and replicate old ways of 
> doing things.

I am fine with trying new things as long as we identify problems to get 
fixed in the old way of doing things.
Readability is pretty subjective, I did not consider it. (I am ok with 
the table/macro approach)
The good part with tables over function calls is that it does all at once.
Technically also, it uses less memory, does way less function calls, 
probably less context switches etc...
That's also why I kept most of underlying implementation, since it 
technically brings some nice stuff.

The other motivation was of course moving from gdbus to ell in existing 
projects could be much harder if the API is that different.

>> - When it's required to send an empty reply, it would be good to have 
>> a helper
>>    function I think, which wraps l_dbus_message_new_method_return() +
>>    l_dbus_message_set_arguments + l_dbus_send together (see patch 15 in
>>    function l_dbus_pending_property_success).
>>
>
> We probably need a simple wrapper for l_dbus_message_new_method_return 
> that takes varargs.  Similar to l_dbus_message_new_error().  The send 
> step should probably not be combined in the ell API directly.

Better approach yes, will prepare a patch for it.

Tomasz

  reply	other threads:[~2014-11-17 10:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 10:36 [RFC/PATCH 00/21] Add support for the org.freedesktop.DBus.Properties interface Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 01/21] dbus: Add a utility function to check an message iter signature Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 02/21] dbus: Add a private getter for the unique dbus tree in dbus struct Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 03/21] dbus: All interface related code is found in dbus-service.c Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 04/21] dbus: Refactor the interface API so it uses constants methods array Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 05/21] unit: Apply the DBus interface methods API change to the tests Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 06/21] examples: Apply the DBus interface methods API change Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 07/21] dbus: Refactor the interface API so it uses constant signals array Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 08/21] unit: Apply the DBus interface signals API change to the tests Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 09/21] examples: Apply the DBus interface signals API change Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 10/21] dbus: Refactor the interface API so it uses constant properties array Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 11/21] unit: Apply the DBus interface properties API change to the tests Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 12/21] examples: Apply the DBus interface properties API change Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 13/21] dbus: Add support for org.freedesktop.DBus.Properties.Get method Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 14/21] dbus: Add support for org.freedesktop.DBus.Properties.GetAll method Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 15/21] dbus: Add support for org.freedesktop.DBus.Properties.Set method Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 16/21] dbus: Add support for checking if a property exists Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 17/21] unit: Apply the changes related to interface property API Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 18/21] examples: " Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 19/21] dbus: Add org.freedesktop.DBus.Properties.PropertiesChanged signal Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 20/21] unit: Add a test for the org.freedesktop.DBus.Properties interface Tomasz Bursztyka
2014-11-13 10:36 ` [PATCH 21/21] git: Ignoring the org.freedesktop.DBus.Properties interface test binary Tomasz Bursztyka
2014-11-13 15:39 ` [RFC/PATCH 00/21] Add support for the org.freedesktop.DBus.Properties interface Denis Kenzior
2014-11-17 10:34   ` Tomasz Bursztyka [this message]
2014-11-17 16:24     ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5469CF38.9000106@linux.intel.com \
    --to=tomasz.bursztyka@linux.intel.com \
    --cc=ell@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.