--- src/adapter.c | 8 ++++++++ src/adapter.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index 9ddd2fc..cd104a1 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2764,6 +2764,14 @@ bool btd_adapter_get_pairable(struct btd_adapter *adapter) return false; } +bool btd_adapter_get_powered(struct btd_adapter *adapter) +{ + if (adapter->current_settings & MGMT_SETTING_POWERED) + return true; + + return false; +} + uint32_t btd_adapter_get_class(struct btd_adapter *adapter) { return adapter->dev_class; diff --git a/src/adapter.h b/src/adapter.h index 2787631..2610479 100644 --- a/src/adapter.h +++ b/src/adapter.h @@ -86,6 +86,7 @@ struct btd_adapter *adapter_get_default(void); void adapter_foreach(adapter_cb func, gpointer user_data); bool btd_adapter_get_pairable(struct btd_adapter *adapter); +bool btd_adapter_get_powered(struct btd_adapter *adapter); uint32_t btd_adapter_get_class(struct btd_adapter *adapter); const char *btd_adapter_get_name(struct btd_adapter *adapter); -- 1.8.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html