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

Commit c810cdfa authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I533a5de5,Ie54164ae,Iaf191d9b into main

* changes:
  system/bta/pan: Enforce -Wmissing-prototype
  system/bta/{ag,ar}: Enforce -Wmissing-prototypes
  system/btif: Enforce -Wmissing-prototypes
parents 1c75e1d3 a0d13ee8
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -37,9 +37,6 @@
#include "os/log.h"
#include "osi/include/allocator.h"

// TODO(b/369381361) Enfore -Wmissing-prototypes
#pragma GCC diagnostic ignored "-Wmissing-prototypes"

using namespace bluetooth;

/*****************************************************************************
@@ -90,7 +87,7 @@ void bta_ag_at_reinit(tBTA_AG_AT_CB* p_cb) {
 * Returns          void
 *
 *****************************************************************************/
void bta_ag_process_at(tBTA_AG_AT_CB* p_cb, char* p_end) {
static void bta_ag_process_at(tBTA_AG_AT_CB* p_cb, char* p_end) {
  uint16_t idx;
  uint8_t arg_type;
  char* p_arg;
+31 −34
Original line number Diff line number Diff line
@@ -36,35 +36,32 @@
/* Event mask for RfCOMM port callback */
#define BTA_AG_PORT_EV_MASK PORT_EV_RXCHAR

// TODO(b/369381361) Enfore -Wmissing-prototypes
#pragma GCC diagnostic ignored "-Wmissing-prototypes"

using namespace bluetooth;

/* each scb has its own rfcomm callbacks */
void bta_ag_port_cback_1(uint32_t code, uint16_t port_handle);
void bta_ag_port_cback_2(uint32_t code, uint16_t port_handle);
void bta_ag_port_cback_3(uint32_t code, uint16_t port_handle);
void bta_ag_port_cback_4(uint32_t code, uint16_t port_handle);
void bta_ag_port_cback_5(uint32_t code, uint16_t port_handle);
void bta_ag_port_cback_6(uint32_t code, uint16_t port_handle);
void bta_ag_mgmt_cback_1(const tPORT_RESULT code, uint16_t port_handle);
void bta_ag_mgmt_cback_2(const tPORT_RESULT code, uint16_t port_handle);
void bta_ag_mgmt_cback_3(const tPORT_RESULT code, uint16_t port_handle);
void bta_ag_mgmt_cback_4(const tPORT_RESULT code, uint16_t port_handle);
void bta_ag_mgmt_cback_5(const tPORT_RESULT code, uint16_t port_handle);
void bta_ag_mgmt_cback_6(const tPORT_RESULT code, uint16_t port_handle);
static void bta_ag_port_cback_1(uint32_t code, uint16_t port_handle);
static void bta_ag_port_cback_2(uint32_t code, uint16_t port_handle);
static void bta_ag_port_cback_3(uint32_t code, uint16_t port_handle);
static void bta_ag_port_cback_4(uint32_t code, uint16_t port_handle);
static void bta_ag_port_cback_5(uint32_t code, uint16_t port_handle);
static void bta_ag_port_cback_6(uint32_t code, uint16_t port_handle);
static void bta_ag_mgmt_cback_1(const tPORT_RESULT code, uint16_t port_handle);
static void bta_ag_mgmt_cback_2(const tPORT_RESULT code, uint16_t port_handle);
static void bta_ag_mgmt_cback_3(const tPORT_RESULT code, uint16_t port_handle);
static void bta_ag_mgmt_cback_4(const tPORT_RESULT code, uint16_t port_handle);
static void bta_ag_mgmt_cback_5(const tPORT_RESULT code, uint16_t port_handle);
static void bta_ag_mgmt_cback_6(const tPORT_RESULT code, uint16_t port_handle);

/* rfcomm callback function tables */
typedef tPORT_CALLBACK* tBTA_AG_PORT_CBACK;
const tBTA_AG_PORT_CBACK bta_ag_port_cback_tbl[] = {bta_ag_port_cback_1, bta_ag_port_cback_2,
                                                    bta_ag_port_cback_3, bta_ag_port_cback_4,
                                                    bta_ag_port_cback_5, bta_ag_port_cback_6};
static const tBTA_AG_PORT_CBACK bta_ag_port_cback_tbl[] = {
        bta_ag_port_cback_1, bta_ag_port_cback_2, bta_ag_port_cback_3,
        bta_ag_port_cback_4, bta_ag_port_cback_5, bta_ag_port_cback_6};

typedef tPORT_MGMT_CALLBACK* tBTA_AG_PORT_MGMT_CBACK;
const tBTA_AG_PORT_MGMT_CBACK bta_ag_mgmt_cback_tbl[] = {bta_ag_mgmt_cback_1, bta_ag_mgmt_cback_2,
                                                         bta_ag_mgmt_cback_3, bta_ag_mgmt_cback_4,
                                                         bta_ag_mgmt_cback_5, bta_ag_mgmt_cback_6};
static const tBTA_AG_PORT_MGMT_CBACK bta_ag_mgmt_cback_tbl[] = {
        bta_ag_mgmt_cback_1, bta_ag_mgmt_cback_2, bta_ag_mgmt_cback_3,
        bta_ag_mgmt_cback_4, bta_ag_mgmt_cback_5, bta_ag_mgmt_cback_6};

/*******************************************************************************
 *
@@ -165,40 +162,40 @@ static void bta_ag_mgmt_cback(const tPORT_RESULT code, uint16_t port_handle, uin
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_mgmt_cback_1(const tPORT_RESULT code, uint16_t port_handle) {
static void bta_ag_mgmt_cback_1(const tPORT_RESULT code, uint16_t port_handle) {
  bta_ag_mgmt_cback(code, port_handle, 1);
}
void bta_ag_mgmt_cback_2(const tPORT_RESULT code, uint16_t port_handle) {
static void bta_ag_mgmt_cback_2(const tPORT_RESULT code, uint16_t port_handle) {
  bta_ag_mgmt_cback(code, port_handle, 2);
}
void bta_ag_mgmt_cback_3(const tPORT_RESULT code, uint16_t port_handle) {
static void bta_ag_mgmt_cback_3(const tPORT_RESULT code, uint16_t port_handle) {
  bta_ag_mgmt_cback(code, port_handle, 3);
}
void bta_ag_mgmt_cback_4(const tPORT_RESULT code, uint16_t port_handle) {
static void bta_ag_mgmt_cback_4(const tPORT_RESULT code, uint16_t port_handle) {
  bta_ag_mgmt_cback(code, port_handle, 4);
}
void bta_ag_mgmt_cback_5(const tPORT_RESULT code, uint16_t port_handle) {
static void bta_ag_mgmt_cback_5(const tPORT_RESULT code, uint16_t port_handle) {
  bta_ag_mgmt_cback(code, port_handle, 5);
}
void bta_ag_mgmt_cback_6(const tPORT_RESULT code, uint16_t port_handle) {
static void bta_ag_mgmt_cback_6(const tPORT_RESULT code, uint16_t port_handle) {
  bta_ag_mgmt_cback(code, port_handle, 6);
}
void bta_ag_port_cback_1(uint32_t code, uint16_t port_handle) {
static void bta_ag_port_cback_1(uint32_t code, uint16_t port_handle) {
  bta_ag_port_cback(code, port_handle, 1);
}
void bta_ag_port_cback_2(uint32_t code, uint16_t port_handle) {
static void bta_ag_port_cback_2(uint32_t code, uint16_t port_handle) {
  bta_ag_port_cback(code, port_handle, 2);
}
void bta_ag_port_cback_3(uint32_t code, uint16_t port_handle) {
static void bta_ag_port_cback_3(uint32_t code, uint16_t port_handle) {
  bta_ag_port_cback(code, port_handle, 3);
}
void bta_ag_port_cback_4(uint32_t code, uint16_t port_handle) {
static void bta_ag_port_cback_4(uint32_t code, uint16_t port_handle) {
  bta_ag_port_cback(code, port_handle, 4);
}
void bta_ag_port_cback_5(uint32_t code, uint16_t port_handle) {
static void bta_ag_port_cback_5(uint32_t code, uint16_t port_handle) {
  bta_ag_port_cback(code, port_handle, 5);
}
void bta_ag_port_cback_6(uint32_t code, uint16_t port_handle) {
static void bta_ag_port_cback_6(uint32_t code, uint16_t port_handle) {
  bta_ag_port_cback(code, port_handle, 6);
}

@@ -212,7 +209,7 @@ void bta_ag_port_cback_6(uint32_t code, uint16_t port_handle) {
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_setup_port(tBTA_AG_SCB* p_scb, uint16_t handle) {
static void bta_ag_setup_port(tBTA_AG_SCB* p_scb, uint16_t handle) {
  int port_callback_index = bta_ag_scb_to_idx(p_scb) - 1;
  log::assert_that(port_callback_index >= 0, "invalid callback index, handle={}, bd_addr={}",
                   handle, ADDRESS_TO_LOGGABLE_STR(p_scb->peer_addr));
+1 −3
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include <cstdint>

#include "bta/ar/bta_ar_int.h"
#include "bta/include/bta_ar_api.h"
#include "bta/sys/bta_sys.h"
#include "profile/avrcp/avrcp_sdp_service.h"
#include "stack/include/avct_api.h"
@@ -37,9 +38,6 @@
#include "stack/include/sdp_api.h"
#include "types/raw_address.h"

// TODO(b/369381361) Enfore -Wmissing-prototypes
#pragma GCC diagnostic ignored "-Wmissing-prototypes"

using namespace bluetooth::legacy::stack::sdp;
using namespace bluetooth::avrcp;
using namespace bluetooth;
+3 −4
Original line number Diff line number Diff line
@@ -21,12 +21,11 @@
 *  This is the interface file for device mananger functions.
 *
 ******************************************************************************/
#ifndef BTA_DM_API_H
#define BTA_DM_API_H

#pragma once

#include "types/raw_address.h"

// Brings connection to active mode
void bta_dm_pm_active(const RawAddress& peer_addr);

#endif /* BTA_DM_API_H */
bool bta_dm_check_if_only_hd_connected(const RawAddress& peer_addr);
+0 −64
Original line number Diff line number Diff line
@@ -33,70 +33,6 @@
/*****************************************************************************
 *  Function Declarations
 ****************************************************************************/
/*******************************************************************************
 *
 * Function         bta_pan_ci_tx_ready
 *
 * Description      This function sends an event to PAN indicating the phone is
 *                  ready for more data and PAN should call
 *                  bta_pan_co_tx_path().
 *                  This function is used when the TX data path is configured
 *                  to use a pull interface.
 *
 *
 * Returns          void
 *
 ******************************************************************************/
void bta_pan_ci_tx_ready(uint16_t handle);

/*******************************************************************************
 *
 * Function         bta_pan_ci_rx_ready
 *
 * Description      This function sends an event to PAN indicating the phone
 *                  has data available to send to PAN and PAN should call
 *                  bta_pan_co_rx_path().  This function is used when the RX
 *                  data path is configured to use a pull interface.
 *
 *
 * Returns          void
 *
 ******************************************************************************/
void bta_pan_ci_rx_ready(uint16_t handle);

/*******************************************************************************
 *
 * Function         bta_pan_ci_tx_flow
 *
 * Description      This function is called to enable or disable data flow on
 *                  the TX path.  The phone should call this function to
 *                  disable data flow when it is congested and cannot handle
 *                  any more data sent by bta_pan_co_tx_write().
 *                  This function is used when the
 *                  TX data path is configured to use a push interface.
 *
 *
 * Returns          void
 *
 ******************************************************************************/
void bta_pan_ci_tx_flow(uint16_t handle, bool enable);

/*******************************************************************************
 *
 * Function         bta_pan_ci_rx_writebuf
 *
 * Description      This function is called to send data to the phone when
 *                  the RX path is configured to use a push interface with
 *                  zero copy.  The function sends an event to PAN containing
 *                  the data buffer. The buffer will be freed by BTA; the
 *                  phone must not free the buffer.
 *
 *
 * Returns          true if flow enabled
 *
 ******************************************************************************/
void bta_pan_ci_rx_writebuf(uint16_t handle, const RawAddress& src, const RawAddress& dst,
                            uint16_t protocol, BT_HDR* p_buf, bool ext);

/*******************************************************************************
 *
Loading