From: Johan Hedberg <johan.hedberg@gmail.com>
To: Claudio Takahasi <claudio.takahasi@openbossa.org>
Cc: "João Paulo Rechi Vita" <jprvita@openbossa.org>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ v7 2/9] mgmt: Add LE scanning callback
Date: Mon, 1 Oct 2012 11:36:30 +0300 [thread overview]
Message-ID: <20121001083630.GA22036@x220> (raw)
In-Reply-To: <CAKT1EBdhhqsEU9_zxcAHArtpwzzOo2hmwDmz91SrYNQeiEdEJw@mail.gmail.com>
Hi Claudio,
On Fri, Sep 28, 2012, Claudio Takahasi wrote:
> On Thu, Sep 27, 2012 at 4:43 AM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> > On Tue, Sep 25, 2012, João Paulo Rechi Vita wrote:
> >> +int mgmt_start_scanning(int index)
> >
> > Firstly I don't think the name is good since BR/EDR also has the concept
> > of scanning (page scan & inquiry scan). Secondly, maybe it'd be simpler
> > to reuse mgmt_start_discovery and simply add a new parameter which
> > provides the value for info->discov_type?
>
> My suggestions are:
> 1. rename to mgmt_start_le_scanning
> 2. add a new parameter to mgmt_start_discovery: gboolean le_only
> 3. add a new parameter to mgmt_start_discovery: informing the adapter
> operation mode(BREDR/LE/BREDR_LE)
>
> Option 3 will require to expose controller info/settings to adapter.c.
> It is necessary to know the controller features to send the right
> discover type. btd_adapter_start function could be extended to receive
> the supported features or a parameter specifying the operation mode.
> IMO, using this approach we are duplicating information.
>
> Which approach do you prefer?
I'd go with 1 for now. Booleans in places where it's not utterly clear
from the calling code what it means shouldn't be used (even enums are
better), i.e. if you don't know the implementation details of the
function there'd be no way for an outsider to know what exactly the
"TRUE" in mgmt_start_discovery(TRUE) means.
Johan
next prev parent reply other threads:[~2012-10-01 8:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-25 17:37 [PATCH BlueZ v7 1/9] core: Mutually exclude concurrent connections João Paulo Rechi Vita
2012-09-25 17:37 ` [PATCH BlueZ v7 2/9] mgmt: Add LE scanning callback João Paulo Rechi Vita
2012-09-27 7:43 ` Johan Hedberg
2012-09-28 14:27 ` Claudio Takahasi
2012-10-01 8:36 ` Johan Hedberg [this message]
2012-09-25 17:38 ` [PATCH BlueZ v7 3/9] core: Replace interleaved by LE scanning João Paulo Rechi Vita
2012-09-25 17:38 ` [PATCH BlueZ v7 4/9] core: Start LE scanning when a device requests João Paulo Rechi Vita
2012-09-25 17:38 ` [PATCH BlueZ v7 5/9] core: Queue discovery if scanning is active João Paulo Rechi Vita
2012-09-27 3:16 ` Vinicius Costa Gomes
2012-09-27 20:34 ` Joao Paulo Rechi Vita
2012-09-25 17:38 ` [PATCH BlueZ v7 6/9] core: Disable unnecessary auto connections João Paulo Rechi Vita
2012-09-25 17:38 ` [PATCH BlueZ v7 7/9] core: Re-connect for ECONNRESET or ECONNABORTED João Paulo Rechi Vita
2012-09-27 7:41 ` Johan Hedberg
2012-09-27 18:20 ` Claudio Takahasi
2012-09-25 17:38 ` [PATCH BlueZ v7 8/9] mgmt: Add address type to bonding debug message João Paulo Rechi Vita
2012-09-25 17:38 ` [PATCH BlueZ v7 9/9] core: Suspend scanning before connect on pairing João Paulo Rechi Vita
2012-09-27 7:42 ` [PATCH BlueZ v7 1/9] core: Mutually exclude concurrent connections Johan Hedberg
2012-09-27 20:31 ` Joao Paulo Rechi Vita
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=20121001083630.GA22036@x220 \
--to=johan.hedberg@gmail.com \
--cc=claudio.takahasi@openbossa.org \
--cc=jprvita@openbossa.org \
--cc=linux-bluetooth@vger.kernel.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 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).