Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Antonio Ospite <ospite@studenti.unina.it>
Cc: linux-bluetooth@vger.kernel.org, Bastien Nocera <hadess@hadess.net>
Subject: Re: [PATCH BlueZ 1/2] adapter: add a btd_adapter_get_default_address() call
Date: Tue, 26 Feb 2013 13:51:22 +0200	[thread overview]
Message-ID: <20130226115122.GA2750@x220> (raw)
In-Reply-To: <1361699686-12341-2-git-send-email-ospite@studenti.unina.it>

Hi Antonio,

On Sun, Feb 24, 2013, Antonio Ospite wrote:
> Add a new btd_* call to get the default adapter address as a string.
> 
> This is meant to be used, for instance, by _external_ plugins which want
> to know the default adapter address for some reason (e.g. to send it to
> a device for some custom pairing scheme like in the case of Playstation
> peripherals).
> 
> External plugins can only use symbols marked as "global" in
> src/bluetooth.ver, this patch avoids making global these symbols:
> 
>   adapter_get_address
>   bt_malloc
>   ba2str
> ---
>  src/adapter.h |    1 +
>  src/adapter.c |   17 +++++++++++++++++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/src/adapter.h b/src/adapter.h
> index 8d23a64..cb6d0d6 100644
> --- a/src/adapter.h
> +++ b/src/adapter.h
> @@ -38,6 +38,7 @@
>  struct btd_adapter;
>  
>  struct btd_adapter *btd_adapter_get_default(void);
> +char *btd_adapter_get_default_address(void);
>  bool btd_adapter_is_default(struct btd_adapter *adapter);
>  uint16_t btd_adapter_get_index(struct btd_adapter *adapter);

Please fix adapter_get_address to have a btd_ prefix instead. There's no
reason why that should be hidden from plugins.

As for the libbluetooth symbols, I don't get what the issue is. Those
should always be available to any binary that links with libbluetooth.
If they don't work then I think we need to fix something in the way the
plugins and/or bluetoothd are built.

Johan

  reply	other threads:[~2013-02-26 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-24  9:54 [PATCH BlueZ 0/2] Some more prerequisites for the playstation-peripheral plugin Antonio Ospite
2013-02-24  9:54 ` [PATCH BlueZ 1/2] adapter: add a btd_adapter_get_default_address() call Antonio Ospite
2013-02-26 11:51   ` Johan Hedberg [this message]
2013-02-24  9:54 ` [PATCH BlueZ 2/2] adapter: add a btd_create_stored_device() call Antonio Ospite
2013-02-26 11:53   ` Johan Hedberg

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=20130226115122.GA2750@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=ospite@studenti.unina.it \
    /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