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

Commit 7022b320 authored by Myles Watson's avatar Myles Watson Committed by Automerger Merge Worker
Browse files

Merge changes Iff110614,I733840c1 into main am: a25efa37

parents 8db7eee8 a25efa37
Loading
Loading
Loading
Loading
+34 −35
Original line number Diff line number Diff line
@@ -146,47 +146,46 @@ inline tBTA_HH_STATUS to_bta_hh_status(uint32_t status) {

inline std::string bta_hh_status_text(const tBTA_HH_STATUS& status) {
  switch (status) {
    CASE_RETURN_TEXT(BTA_HH_OK);
    CASE_RETURN_TEXT(BTA_HH_HS_HID_NOT_READY);
    CASE_RETURN_TEXT(BTA_HH_HS_INVALID_RPT_ID);
    CASE_RETURN_TEXT(BTA_HH_HS_TRANS_NOT_SPT);
    CASE_RETURN_TEXT(BTA_HH_HS_INVALID_PARAM);
    CASE_RETURN_TEXT(BTA_HH_HS_ERROR);
    CASE_RETURN_TEXT(BTA_HH_ERR);
    CASE_RETURN_TEXT(BTA_HH_ERR_SDP);
    CASE_RETURN_TEXT(BTA_HH_ERR_PROTO);
    CASE_RETURN_TEXT(BTA_HH_ERR_DB_FULL);
    CASE_RETURN_TEXT(BTA_HH_ERR_TOD_UNSPT);
    CASE_RETURN_TEXT(BTA_HH_ERR_NO_RES);
    CASE_RETURN_TEXT(BTA_HH_ERR_AUTH_FAILED);
    CASE_RETURN_TEXT(BTA_HH_ERR_HDL);
    CASE_RETURN_TEXT(BTA_HH_ERR_SEC);
    default:
      return base::StringPrintf("UNKNOWN[%hhu]", status);
    CASE_RETURN_STRING(BTA_HH_OK);
    CASE_RETURN_STRING(BTA_HH_HS_HID_NOT_READY);
    CASE_RETURN_STRING(BTA_HH_HS_INVALID_RPT_ID);
    CASE_RETURN_STRING(BTA_HH_HS_TRANS_NOT_SPT);
    CASE_RETURN_STRING(BTA_HH_HS_INVALID_PARAM);
    CASE_RETURN_STRING(BTA_HH_HS_ERROR);
    CASE_RETURN_STRING(BTA_HH_ERR);
    CASE_RETURN_STRING(BTA_HH_ERR_SDP);
    CASE_RETURN_STRING(BTA_HH_ERR_PROTO);
    CASE_RETURN_STRING(BTA_HH_ERR_DB_FULL);
    CASE_RETURN_STRING(BTA_HH_ERR_TOD_UNSPT);
    CASE_RETURN_STRING(BTA_HH_ERR_NO_RES);
    CASE_RETURN_STRING(BTA_HH_ERR_AUTH_FAILED);
    CASE_RETURN_STRING(BTA_HH_ERR_HDL);
    CASE_RETURN_STRING(BTA_HH_ERR_SEC);
    CASE_RETURN_STRING(BTA_HH_HS_SERVICE_CHANGED);
  }
  RETURN_UNKNOWN_TYPE_STRING(tBTA_HH_STATUS, status);
}

inline std::string bta_hh_event_text(uint16_t event) {
  switch (event) {
    CASE_RETURN_TEXT(BTA_HH_EMPTY_EVT);
    CASE_RETURN_TEXT(BTA_HH_ENABLE_EVT);
    CASE_RETURN_TEXT(BTA_HH_DISABLE_EVT);
    CASE_RETURN_TEXT(BTA_HH_OPEN_EVT);
    CASE_RETURN_TEXT(BTA_HH_CLOSE_EVT);
    CASE_RETURN_TEXT(BTA_HH_GET_DSCP_EVT);
    CASE_RETURN_TEXT(BTA_HH_GET_PROTO_EVT);
    CASE_RETURN_TEXT(BTA_HH_GET_RPT_EVT);
    CASE_RETURN_TEXT(BTA_HH_GET_IDLE_EVT);
    CASE_RETURN_TEXT(BTA_HH_SET_PROTO_EVT);
    CASE_RETURN_TEXT(BTA_HH_SET_RPT_EVT);
    CASE_RETURN_TEXT(BTA_HH_SET_IDLE_EVT);
    CASE_RETURN_TEXT(BTA_HH_VC_UNPLUG_EVT);
    CASE_RETURN_TEXT(BTA_HH_ADD_DEV_EVT);
    CASE_RETURN_TEXT(BTA_HH_RMV_DEV_EVT);
    CASE_RETURN_TEXT(BTA_HH_API_ERR_EVT);
    default:
      return base::StringPrintf("UNKNOWN[%hu]", event);
    CASE_RETURN_STRING(BTA_HH_EMPTY_EVT);
    CASE_RETURN_STRING(BTA_HH_ENABLE_EVT);
    CASE_RETURN_STRING(BTA_HH_DISABLE_EVT);
    CASE_RETURN_STRING(BTA_HH_OPEN_EVT);
    CASE_RETURN_STRING(BTA_HH_CLOSE_EVT);
    CASE_RETURN_STRING(BTA_HH_GET_DSCP_EVT);
    CASE_RETURN_STRING(BTA_HH_GET_PROTO_EVT);
    CASE_RETURN_STRING(BTA_HH_GET_RPT_EVT);
    CASE_RETURN_STRING(BTA_HH_GET_IDLE_EVT);
    CASE_RETURN_STRING(BTA_HH_SET_PROTO_EVT);
    CASE_RETURN_STRING(BTA_HH_SET_RPT_EVT);
    CASE_RETURN_STRING(BTA_HH_SET_IDLE_EVT);
    CASE_RETURN_STRING(BTA_HH_VC_UNPLUG_EVT);
    CASE_RETURN_STRING(BTA_HH_ADD_DEV_EVT);
    CASE_RETURN_STRING(BTA_HH_RMV_DEV_EVT);
    CASE_RETURN_STRING(BTA_HH_API_ERR_EVT);
  }
  RETURN_UNKNOWN_TYPE_STRING(bta_hh_event, event);
}

typedef uint16_t tBTA_HH_ATTR_MASK;
+15 −15
Original line number Diff line number Diff line
@@ -42,21 +42,21 @@
 *  Functions
 ******************************************************************************/

const char* dump_bt_status(bt_status_t status);
const char* dump_dm_search_event(uint16_t event);
const char* dump_dm_event(uint16_t event);
const char* dump_hf_event(uint16_t event);
const char* dump_hf_client_event(uint16_t event);
const char* dump_hd_event(uint16_t event);
const char* dump_property_type(bt_property_type_t type);
const char* dump_adapter_scan_mode(bt_scan_mode_t mode);
const char* dump_thread_evt(bt_cb_thread_evt evt);
const char* dump_av_conn_state(uint16_t event);
const char* dump_av_audio_state(uint16_t event);
const char* dump_rc_opcode(uint8_t opcode);
const char* dump_rc_event(uint8_t event);
const char* dump_rc_notification_event_id(uint8_t event_id);
const char* dump_rc_pdu(uint8_t pdu);
std::string dump_bt_status(bt_status_t status);
std::string dump_dm_search_event(uint16_t event);
std::string dump_dm_event(uint16_t event);
std::string dump_hf_event(uint16_t event);
std::string dump_hf_client_event(uint16_t event);
std::string dump_hd_event(uint16_t event);
std::string dump_property_type(bt_property_type_t type);
std::string dump_adapter_scan_mode(bt_scan_mode_t mode);
std::string dump_thread_evt(bt_cb_thread_evt evt);
std::string dump_av_conn_state(uint16_t event);
std::string dump_av_audio_state(uint16_t event);
std::string dump_rc_opcode(uint8_t opcode);
std::string dump_rc_event(uint8_t event);
std::string dump_rc_notification_event_id(uint8_t event_id);
std::string dump_rc_pdu(uint8_t pdu);

uint32_t devclass2uint(const DEV_CLASS dev_class);
DEV_CLASS uint2devclass(uint32_t dev);
Loading