summaryrefslogtreecommitdiff
path: root/src/adapter.h
diff options
context:
space:
mode:
authorAbhishek Pandit-Subedi <abhishekpandit@chromium.org>2020-07-06 13:25:15 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-07-07 10:46:45 -0700
commiteaeb0d619592c1fa050de597a02db7961f907fe6 (patch)
tree75496b449ec2c948a4966ac74dc184e5514b5963 /src/adapter.h
parent08d9f2ee6203215a5328c21aa5ec40d8fc674e45 (diff)
downloadbluez-eaeb0d619592c1fa050de597a02db7961f907fe6.tar.gz
device: Support marking a device with wake allowed
If a device is allowed to wake the host system from suspend, it should be marked as wake allowed. We add support for a new property that is sent to the kernel via set device flags mgmt op. We also add the dbus endpoint to allow the wake allowed setting to be controlled. In order for wake allowed to be set, the profile must also support wake. This setting isn't exposed to the user but must be set by profiles that intend to support wake from suspend. If a device is connecting for the first time, it will be marked WakeAllowed if the profile supports it. On subsequent reloads of bluez, the stored setting "WakeAllowed" will be used to override any other setting.
Diffstat (limited to 'src/adapter.h')
-rw-r--r--src/adapter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/adapter.h b/src/adapter.h
index d0a5253bd..f8ac20261 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -213,6 +213,8 @@ int adapter_connect_list_add(struct btd_adapter *adapter,
struct btd_device *device);
void adapter_connect_list_remove(struct btd_adapter *adapter,
struct btd_device *device);
+void adapter_set_device_wakeable(struct btd_adapter *adapter,
+ struct btd_device *dev, bool wakeable);
void adapter_auto_connect_add(struct btd_adapter *adapter,
struct btd_device *device);
void adapter_auto_connect_remove(struct btd_adapter *adapter,
@@ -231,4 +233,3 @@ void btd_adapter_for_each_device(struct btd_adapter *adapter,
void *data);
bool btd_le_connect_before_pairing(void);
-