Re: [PATCH 1/2] android/bluetooth: Add function for getting bonded device list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Grzegorz,

On Monday 12 of May 2014 16:38:12 Grzegorz Kolodziejczyk wrote:
> This will be used by GATT HAL.
> ---
>  android/bluetooth.c | 8 ++++++++
>  android/bluetooth.h | 1 +
>  2 files changed, 9 insertions(+)
> 
> diff --git a/android/bluetooth.c b/android/bluetooth.c
> index be7b47c..ecdbeac 100644
> --- a/android/bluetooth.c
> +++ b/android/bluetooth.c
> @@ -1218,6 +1218,14 @@ const char *bt_get_adapter_name(void)
>  	return adapter.name;
>  }
>  
> +bool bt_device_is_bonded(const bdaddr_t *bdaddr)
> +{
> +	if (g_slist_find_custom(bonded_devices, bdaddr, device_match))
> +		return true;
> +
> +	return false;
> +}
> +
>  static bool rssi_above_threshold(int old, int new)
>  {
>  	/* only 8 dBm or more */
> diff --git a/android/bluetooth.h b/android/bluetooth.h
> index dddbf20..3eef7a4 100644
> --- a/android/bluetooth.h
> +++ b/android/bluetooth.h
> @@ -49,3 +49,4 @@ bool bt_le_set_advertising(bool advertising, bt_le_set_advertising_done cb,
>  
>  uint8_t bt_get_device_android_type(const bdaddr_t *addr);
>  const char *bt_get_adapter_name(void);
> +bool bt_device_is_bonded(const bdaddr_t *bdaddr);
> 

Both patches applied, thanks.

-- 
Best regards, 
Szymon Janc
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux