From 3ffc2a09a40e02738b170f6d8d7029d83f7d6a7f Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 21 Dec 2021 13:14:24 +0100 Subject: [PATCH] goep_client: add goep_client_version_20_or_higher --- CHANGELOG.md | 3 +++ src/classic/goep_client.c | 6 ++++++ src/classic/goep_client.h | 8 +++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a651aa02..a32ec1623 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Release v1.5.1 +### Added +- GOEP Client: add goep_client_version_20_or_higher + ### Fixed - pbap_client: support disconnect while operation is ongoing - L2CAP: limit remote MTU by local tx configuration in ERTM diff --git a/src/classic/goep_client.c b/src/classic/goep_client.c index e853b905c..8c7d17945 100644 --- a/src/classic/goep_client.c +++ b/src/classic/goep_client.c @@ -406,6 +406,12 @@ uint32_t goep_client_get_pbap_supported_features(uint16_t goep_cid){ return context->pbap_supported_features; } +bool goep_client_version_20_or_higher(uint16_t goep_cid){ + UNUSED(goep_cid); + goep_client_t * context = goep_client; + return context->l2cap_psm != 0; +} + uint8_t goep_client_disconnect(uint16_t goep_cid){ UNUSED(goep_cid); goep_client_t * context = goep_client; diff --git a/src/classic/goep_client.h b/src/classic/goep_client.h index 9294d1893..91929f61f 100644 --- a/src/classic/goep_client.h +++ b/src/classic/goep_client.h @@ -97,10 +97,16 @@ void goep_client_request_can_send_now(uint16_t goep_cid); uint8_t goep_client_get_request_opcode(uint16_t goep_cid); /** - * brief Get PBAP Supported Features found in SDP record during connect + * @brief Get PBAP Supported Features found in SDP record during connect */ uint32_t goep_client_get_pbap_supported_features(uint16_t goep_cid); +/** + * @brief Check if GOEP 2.0 or higher features can be used + * @return true if GOEP Version 2.0 or higher + */ +bool goep_client_version_20_or_higher(uint16_t goep_cid); + /** * @brief Set Connection ID used for newly created requests * @param goep_cid