This is a simple getter to get current Class Of Device of adapter. --- src/adapter.c | 5 +++++ src/adapter.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index 8c94574..0871a37 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2259,6 +2259,11 @@ void btd_adapter_read_class(struct btd_adapter *adapter, uint8_t *major, *minor = cls[0]; } +uint32_t btd_adapter_get_class(struct btd_adapter *adapter) +{ + return adapter->dev_class; +} + const char *btd_adapter_get_name(struct btd_adapter *adapter) { return adapter->name; diff --git a/src/adapter.h b/src/adapter.h index 0d5857c..f41ca55 100644 --- a/src/adapter.h +++ b/src/adapter.h @@ -86,6 +86,8 @@ void btd_adapter_get_mode(struct btd_adapter *adapter, uint8_t *mode, void btd_adapter_read_class(struct btd_adapter *adapter, uint8_t *major, uint8_t *minor); + +uint32_t btd_adapter_get_class(struct btd_adapter *adapter); const char *btd_adapter_get_name(struct btd_adapter *adapter); struct btd_device *adapter_get_device(struct btd_adapter *adapter, const char *address); -- 1.7.9.5 -- 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