#pragma once #include #include #include "sigc++/signal.h" class BluetoothService { public: BluetoothService(); sigc::signal powerStateChangedSignal; sigc::signal isDiscoveringChangedSignal; bool getPowerState(); bool getIsDiscovering(); void togglePowerState(); void toggleIsDiscovering(); private: GDBusProxy *adapter_proxy = nullptr; bool powerState = false; bool isDiscovering = false; void onPropertyChanged(GDBusProxy *proxy, GVariant *changed_properties, const gchar *const *invalidated_properties, gpointer user_data); static void onPropertyChangedStatic(GDBusProxy *proxy, GVariant *changed_properties, const gchar *const *invalidated_properties, gpointer user_data); };