Linux bluetooth development
 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 v3 06/15] gdbus: Implement DBus.Properties.Set method
Date: Thu, 06 Sep 2012 13:01:40 -0700	[thread overview]
Message-ID: <1346961700.21200.116.camel@aeonflux> (raw)
In-Reply-To: <1345272662-2850-7-git-send-email-lucas.demarchi@profusion.mobi>

Hi Lucas,

> Contrary to Get() and GetAll(), Set is asynchronous so we pass on the
> DBusMessage so user is able to create the response. It's the only use of
> this parameter.
> ---
>  gdbus/gdbus.h  |  7 +++++++
>  gdbus/object.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>  2 files changed, 64 insertions(+), 2 deletions(-)
> 
> diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
> index b2e78c4..3e4aa16 100644
> --- a/gdbus/gdbus.h
> +++ b/gdbus/gdbus.h
> @@ -31,6 +31,8 @@ extern "C" {
>  #include <dbus/dbus.h>
>  #include <glib.h>
>  
> +typedef enum GDBusPropertySetReturn GDBusPropertySetReturn;
> +
>  typedef enum GDBusMethodFlags GDBusMethodFlags;
>  typedef enum GDBusSignalFlags GDBusSignalFlags;
>  typedef enum GDBusPropertyFlags GDBusPropertyFlags;
> @@ -69,6 +71,10 @@ typedef DBusMessage * (* GDBusMethodFunction) (DBusConnection *connection,
>  typedef gboolean (*GDBusPropertyGetter)(const GDBusPropertyTable *property,
>  					DBusMessageIter *iter, void *data);
>  
> +typedef DBusMessage *(*GDBusPropertySetter)(const GDBusPropertyTable *property,
> +					DBusMessageIter *value,
> +					DBusMessage *msg, void *data);
> +

I am not really happy with this. We just need a unique handle here since
the return value is either success or an error. I rather don't send
messages around for no other reason to create the error.

Inside the authorization code I am using GDBusPendingReply as unique
token. What about using the same approach?

Regards

Marcel



  reply	other threads:[~2012-09-06 20:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-18  6:50 [PATCH BlueZ v3 00/15] gdbus: DBus.Properties + ObjectManager Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 01/15] gdbus: Move typedefs up Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 02/15] gdbus: Define macros to add annotations Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 03/15] gdbus: Add skeleton of DBus.Properties interface Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 04/15] gdbus: Implement DBus.Properties.Get method Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 05/15] gdbus: Implement DBus.Properties.GetAll method Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 06/15] gdbus: Implement DBus.Properties.Set method Lucas De Marchi
2012-09-06 20:01   ` Marcel Holtmann [this message]
2012-09-06 21:31     ` Luiz Augusto von Dentz
2012-09-07  5:49       ` Marcel Holtmann
2012-09-07  8:35         ` Luiz Augusto von Dentz
2012-09-07 20:19           ` Marcel Holtmann
2012-09-10 13:42             ` Luiz Augusto von Dentz
2012-09-12  3:34     ` Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 07/15] gdbus: Add properties into Introspectable interface Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 08/15] gdbus: Add support for org.freedesktop.DBus.ObjectManager interface Lucas De Marchi
2012-08-18 18:25   ` Vinicius Costa Gomes
2012-08-20  7:12     ` Luiz Augusto von Dentz
2012-08-18  6:50 ` [PATCH BlueZ v3 09/15] gdbus: Group interface changes to reduce the amount of signals emitted Lucas De Marchi
2012-08-18 18:28   ` Vinicius Costa Gomes
2012-08-20  7:14     ` Luiz Augusto von Dentz
2012-08-18  6:50 ` [PATCH BlueZ v3 10/15] gdbus: Only export ObjectManager interface on root path Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 11/15] gdbus: Integrates ObjectManager with Properties interface Lucas De Marchi
2012-08-18  6:50 ` [PATCH BlueZ v3 12/15] gdbus: Simplify code for appending properties Lucas De Marchi
2012-08-18  6:51 ` [PATCH BlueZ v3 13/15] gdbus: Implement PropertiesChanged signal Lucas De Marchi
2012-08-18 18:14   ` Vinicius Costa Gomes
2012-08-20 13:38     ` Lucas De Marchi
2012-08-18  6:51 ` [PATCH BlueZ v3 14/15] control: Use DBus.Properties Lucas De Marchi
2012-08-18  6:51 ` [PATCH BlueZ v3 15/15] audio: device: " Lucas De Marchi
2012-08-20  7:56 ` [PATCH BlueZ v3 00/15] gdbus: DBus.Properties + ObjectManager Luiz Augusto von Dentz
2012-08-20 13:51   ` 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=1346961700.21200.116.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