summaryrefslogtreecommitdiff
path: root/luals-stubs/bluetooth.lua
blob: dced90da18047952079896f2935fc2e3f7c7b1d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- SPDX-FileCopyrightText: 2023 jacqueline <me@jacqueline.id.au>
--
-- SPDX-License-Identifier: GPL-3.0-only

--- @meta

--- The 'bluetooth' module contains Properties and functions for interacting
--- with the device's Bluetooth capabilities.
--- @class bluetooth
--- @field enabled Property Whether or not the Bluetooth stack is currently enabled. This property is writeable, and can be used to enable or disable Bluetooth.
--- @field connected Property Whether or not there is an active connection to another Bluetooth device.
--- @field connecting Property Whether or not we are currently connecting to the paired device.
--- @field discovering Property Whether or not we are actively scanning for new devices.
--- @field paired_device Property The device that is currently paired. The bluetooth stack will automatically connect to this device if possible.
--- @field discovered_devices Property Devices nearby that have been discovered.
--- @field known_devices Property Devices that have previously been paired.
local bluetooth = {}

--- Enables Bluetooth, this is the same as bluetooth.enabled:set(true)
function bluetooth.enable() end

--- Disables Bluetooth, this is the same as bluetooth.enabled:set(false)
function bluetooth.disable() end

return bluetooth