Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a000ae5 authored by Chris Manton's avatar Chris Manton
Browse files

Add tBTA_DM_SRVCS::ToString

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Iddfc929dddd16d3287ba945789d4bb24ea8beac8
parent 80ab8036
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -26,8 +26,10 @@

#include <base/strings/stringprintf.h>
#include <memory>
#include <string>
#include "bt_target.h"
#include "bta/sys/bta_sys.h"
#include "main/shim/dumpsys.h"

#include "bta/include/bta_gatt_api.h"

@@ -224,6 +226,13 @@ typedef struct {
  tBTA_SYS_CONN_STATUS state;
  bool new_request;

  std::string ToString() const {
    return base::StringPrintf(
        "peer:%s sys_name:%s app_id:%hhu state:%s new:request:%s",
        PRIVATE_ADDRESS(peer_bdaddr), BtaIdSysText(id).c_str(), app_id,
        bta_sys_conn_status_text(state).c_str(), logbool(new_request).c_str());
  }

} tBTA_DM_SRVCS;

#ifndef BTA_DM_NUM_CONN_SRVS