weliem / bluez_inc

A C library for Bluez (BLE) that hides all DBus communication. It doesn't get easier than this. This library can also be used in C++.
MIT License
84 stars 19 forks source link

Add user_data to Adapter and Device #32

Closed charlesnicholson closed 5 months ago

charlesnicholson commented 5 months ago

This PR adds a new non-owned user_data field to both Adapter and Device, which allows users to store application context inside of these primitives. Without this, applications need to keep their own external data structures that map Adapter and Device to the application context, for lookup inside of bluez_inc callbacks that only provide Adapter * and/or Device *.

charlesnicholson commented 5 months ago

Addresses https://github.com/weliem/bluez_inc/issues/27