summaryrefslogtreecommitdiff
path: root/src/bt.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-10-19 20:59:07 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-10-20 09:15:50 +0200
commit99527bdf3a12433936d2ab74c78284f59aaaaeed (patch)
tree026bb1b48d65c21910166329aacc594fd84ebf28 /src/bt.hh
parentc0e24cc461cb60cde2791cd89d59a1ff1be0f6b2 (diff)
bt & main: Add more properties for adapter
Allow controller to be set in discoverable state.
Diffstat (limited to 'src/bt.hh')
-rw-r--r--src/bt.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bt.hh b/src/bt.hh
index 53d3919..588a328 100644
--- a/src/bt.hh
+++ b/src/bt.hh
@@ -38,14 +38,30 @@ class Adapter {
virtual bool discoverable() const = 0;
[[nodiscard]]
+ virtual uint32_t discoverable_timeout_seconds() const = 0;
+
+ [[nodiscard]]
virtual bool pairable() const = 0;
[[nodiscard]]
+ virtual uint32_t pairable_timeout_seconds() const = 0;
+
+ [[nodiscard]]
virtual bool pairing() const = 0;
[[nodiscard]]
+ virtual bool powered() const = 0;
+
+ [[nodiscard]]
+ virtual bool connectable() const = 0;
+
+ [[nodiscard]]
virtual std::vector<Device*> devices() const = 0;
+ virtual void set_discoverable(bool discoverable) = 0;
+ virtual void set_discoverable_timeout_seconds(uint32_t timeout) = 0;
+ virtual void set_pairable_timeout_seconds(uint32_t timeout) = 0;
+
protected:
Adapter() = default;
Adapter(Adapter const&) = delete;