#pragma once #include #include #include "sigc++/signal.h" class BluetoothService { public: BluetoothService(); sigc::signal powerStateChangedSignal; sigc::signal isDiscoveringChangedSignal; bool getPowerState(); void setPowerState(bool state); bool getIsDiscovering(); void setIsDiscovering(bool state); 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); };