linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 1/5] gdbus: Add skeleton of DBus.Properties interface
Date: Thu, 19 Jul 2012 10:49:41 +0200	[thread overview]
Message-ID: <1342687781.24426.9.camel@aeonflux> (raw)
In-Reply-To: <CAMOw1v4M-grmnaAoDujhRYHWzf_j0t2T4Uo0hOhmzH3Li_pWcg@mail.gmail.com>

Hi Lucas,

> >> This interface is responsible for handling properties of all objects in
> >> a given path. Right now it only registers itself, doing nothing useful.
> >> A conversion to this new layout will be done by subsequent patches.
> >>
> >> org.freedesktop.org.DBus.Properties spec can be found at
> >> http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties
> >> ---
> >>  gdbus/object.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
> >>  1 file changed, 48 insertions(+)
> >>
> >> diff --git a/gdbus/object.c b/gdbus/object.c
> >> index 900e7ab..72f77d4 100644
> >> --- a/gdbus/object.c
> >> +++ b/gdbus/object.c
> >> @@ -491,6 +491,50 @@ static const GDBusMethodTable introspect_methods[] = {
> >>       { }
> >>  };
> >>
> >> +static DBusMessage *properties_get(DBusConnection *connection,
> >> +                                     DBusMessage *message, void *user_data)
> >> +{
> >> +     return NULL;
> >> +}
> >> +
> >> +static DBusMessage *properties_get_all(DBusConnection *connection,
> >> +                                     DBusMessage *message, void *user_data)
> >> +{
> >> +     return NULL;
> >> +}
> >> +
> >> +static DBusMessage *properties_set(DBusConnection *connection,
> >> +                                     DBusMessage *message, void *user_data)
> >> +{
> >> +     return NULL;
> >> +}
> >> +
> >> +static const GDBusMethodTable properties_methods[] = {
> >> +     { GDBUS_METHOD("Get",
> >> +                     GDBUS_ARGS({ "interface_name", "s" },
> >> +                                             { "property_name", "s" }),
> >
> > this should be "interface" and "name". Why are we so verbose here?
> 
> I put the same name as in spec:
> http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties
> 
> >
> >> +                     GDBUS_ARGS({ "value", "v" }),
> >> +                     properties_get) },
> >> +     { GDBUS_METHOD("Set", NULL,
> >> +                     GDBUS_ARGS({ "interface_name", "s" },
> >> +                                     { "property_name", "s" },
> >> +                                     { "value", "v" }),
> >> +                     properties_set) },
> >> +     { GDBUS_METHOD("GetAll",
> >> +                     GDBUS_ARGS({ "interface_name", "s" }),
> >> +                     GDBUS_ARGS({ "props", "a{sv}" }),
> >
> > And this should be "properties". Here you are trying to be super short.
> 
> same here.
> 
> 
> should I change or let as is?

it is inconsistent at least. On one method you use props on the other it
is *_properties. No matter what the specification says, that is just
stupid. And the _name suffix is useless in this context. So yes, please
just change it.

Regards

Marcel
h


  reply	other threads:[~2012-07-19  8:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19  3:20 [PATCH BlueZ 0/5] DBus.Properties Lucas De Marchi
2012-07-19  3:20 ` [PATCH BlueZ 1/5] gdbus: Add skeleton of DBus.Properties interface Lucas De Marchi
2012-07-19  8:03   ` Marcel Holtmann
2012-07-19  8:19     ` Lucas De Marchi
2012-07-19  8:49       ` Marcel Holtmann [this message]
2012-07-19  3:20 ` [PATCH BlueZ 2/5] gdbus: Implement DBus.Properties.Get method Lucas De Marchi
2012-07-19  3:20 ` [PATCH BlueZ 3/5] gdbus: Implement DBus.Properties.GetAll method Lucas De Marchi
2012-07-19  3:20 ` [PATCH BlueZ 4/5] gdbus: Implement DBus.Properties.Set method Lucas De Marchi
2012-07-19  3:20 ` [PATCH BlueZ 5/5] gdbus: Add properties into Introspectable interface Lucas De Marchi

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=1342687781.24426.9.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).