On Thu Oct 17 03:05:17 2024 +0000, Elizabeth Figura wrote:
Why use a separate entry point for this?
`winebluetooth_init` does the least possible work, `dlopen` the DBus library, initialize DBus function pointers, and create a DBus connection.
`winebluetooth_watcher_init` allocates memory for the watcher, creates an async `GetManagedObjects` call, and will set a filter callback for the connection, and ask DBus to subscribe to a bunch of BlueZ signals in the final code (https://gitlab.winehq.org/vibhavp/wine/-/blob/ba7975632337d4c5cb87896d242e5d...).
While the two could probably be in a single function, I decided to keep them separate, for the sake of clarity.