From 053fdb36f320b13aad2644b54e37e2e71ce9adcf Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Sat, 19 Sep 2020 13:55:33 -0700 Subject: [PATCH] Add stack/include/avdt_api::peer_stream_endpoint_text Towards loggable code Bug: 163134718 Tag: #refactor Test: acts -tc BleCocTest Test: ble paired 2 phones Change-Id: Id7a14929d04cc1f63b4482f8a9fa47e79711a045 --- stack/include/avdt_api.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stack/include/avdt_api.h b/stack/include/avdt_api.h index a18a54cfa..b069bf8a8 100644 --- a/stack/include/avdt_api.h +++ b/stack/include/avdt_api.h @@ -78,6 +78,16 @@ #define AVDT_TSEP_SRC 0 /* Source SEP */ #define AVDT_TSEP_SNK 1 /* Sink SEP */ #define AVDT_TSEP_INVALID 3 /* Invalid SEP */ +inline const std::string peer_stream_endpoint_text(int type) { + switch (type) { + case AVDT_TSEP_SRC: + return std::string("Source"); + case AVDT_TSEP_SNK: + return std::string("Sink"); + default: + return std::string("Invalid"); + } +} /* initiator/acceptor role for adaption */ #define AVDT_INT 0 /* initiator */ -- 2.11.0