All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH 4/8] dbus: l_dbus_name_acquire public API and driver declarations
Date: Thu, 24 Mar 2016 22:03:59 -0500	[thread overview]
Message-ID: <56F4AA9F.2040600@gmail.com> (raw)
In-Reply-To: <1458785229-23266-4-git-send-email-andrew.zaborowski@intel.com>

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

Hi Andrew,

On 03/23/2016 09:07 PM, Andrew Zaborowski wrote:
> ---
>   ell/dbus.c | 33 +++++++++++++++++++++++++++++++++
>   ell/dbus.h |  8 ++++++++
>   2 files changed, 41 insertions(+)

<snip>

>
> +
> +/**
> + * l_dbus_name_acquire:
> + * @dbus: D-Bus connection
> + * @name: Well-known bus name to be acquired
> + * @allow_replacement: Whether to allow another peer's name request to
> + *                     take the name ownership away from this connection
> + * @replace_existing: Whether to allow D-Bus to take the name's ownership
> + *                    away from another peer in case the name is already
> + *                    owned and allows replacement.  Ignored if name is
> + *                    currently free.
> + * @queue: Whether to allow the name request to be queued by D-Bus in
> + *         case it cannot be acquired now, rather than to return a failure.
> + * @callback: Callback to receive the request result when done.
> + *
> + * Acquire a well-known bus name (service name) on the bus.
> + *
> + * Returns: a non-zero request serial that can be passed to l_dbus_cancel
> + *          while waiting for the callback, or zero on failure.

Yet kdbus version returns some hard-coded number that can't be used by 
l_dbus_cancel.  I don't like this API asymmetry.  Can't we just return 
void and let the callback parameters tell the application what happened?

Regards,
-Denis

  reply	other threads:[~2016-03-25  3:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  2:07 [PATCH 1/8] dbus: Rewrite service/disconnect watch APIs on top of filter API Andrew Zaborowski
2016-03-24  2:07 ` [PATCH 2/8] unit: Remove dbus watch tests using old API Andrew Zaborowski
2016-03-24  2:07 ` [PATCH 3/8] dbus: Remove now unused filter logic Andrew Zaborowski
2016-03-24  2:07 ` [PATCH 4/8] dbus: l_dbus_name_acquire public API and driver declarations Andrew Zaborowski
2016-03-25  3:03   ` Denis Kenzior [this message]
2016-03-26  0:15     ` Andrzej Zaborowski
2016-03-24  2:07 ` [PATCH 5/8] dbus: kdbus driver->name_acquire implementation Andrew Zaborowski
2016-03-24  2:07 ` [PATCH 6/8] dbus: Classic " Andrew Zaborowski
2016-03-24  2:07 ` [PATCH 7/8] unit: Use l_dbus_name_acquire to acquire well-known name Andrew Zaborowski
2016-03-24  2:07 ` [PATCH 8/8] examples: " Andrew Zaborowski
2016-03-25  2:55 ` [PATCH 1/8] dbus: Rewrite service/disconnect watch APIs on top of filter API Denis Kenzior
2016-03-26  0:06   ` Andrzej Zaborowski
2016-03-26  3:01     ` Denis Kenzior
2016-03-26 15:50       ` Andrzej Zaborowski
2016-03-26 22:18         ` Denis Kenzior
2016-03-28 14:30           ` Andrzej Zaborowski

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=56F4AA9F.2040600@gmail.com \
    --to=denkenz@gmail.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.