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

Commit 5b8ac80f authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Break out stack::rfcomm::PORT_MGMT_CALLBACK am: 7da33e97

parents bb90268f 7da33e97
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -58,7 +58,8 @@ 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};

const tBTA_AG_PORT_CBACK bta_ag_mgmt_cback_tbl[] = {
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};

+3 −1
Original line number Diff line number Diff line
@@ -187,6 +187,8 @@ template <>
struct formatter<tPORT_RESULT> : enum_formatter<tPORT_RESULT> {};
}  // namespace fmt

typedef void(tPORT_MGMT_CALLBACK)(uint32_t code, uint16_t port_handle);

/*****************************************************************************
 *  External Function Declarations
 ****************************************************************************/
@@ -225,7 +227,7 @@ struct formatter<tPORT_RESULT> : enum_formatter<tPORT_RESULT> {};
[[nodiscard]] int RFCOMM_CreateConnectionWithSecurity(
    uint16_t uuid, uint8_t scn, bool is_server, uint16_t mtu,
    const RawAddress& bd_addr, uint16_t* p_handle,
    tPORT_CALLBACK* p_mgmt_callback, uint16_t sec_mask);
    tPORT_MGMT_CALLBACK* p_mgmt_callback, uint16_t sec_mask);

/*******************************************************************************
 *
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ int RFCOMM_CreateConnectionWithSecurity(uint16_t uuid, uint8_t scn,
                                        bool is_server, uint16_t mtu,
                                        const RawAddress& bd_addr,
                                        uint16_t* p_handle,
                                        tPORT_CALLBACK* p_mgmt_callback,
                                        tPORT_MGMT_CALLBACK* p_mgmt_callback,
                                        uint16_t sec_mask) {
  *p_handle = 0;

+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ typedef struct {

  uint32_t ev_mask;           /* Event mask for the callback */
  tPORT_CALLBACK* p_callback; /* Pointer to users callback function */
  tPORT_CALLBACK*
  tPORT_MGMT_CALLBACK*
      p_mgmt_callback; /* Callback function to receive connection up/down */
  tPORT_DATA_CALLBACK*
      p_data_callback; /* Callback function to receive data indications */
+2 −2
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ RawAddress GetTestAddress(int index) {
class StackRfcommTest : public Test {
 public:
  void StartServerPort(uint16_t uuid, uint8_t scn, uint16_t mtu,
                       tPORT_CALLBACK* management_callback,
                       tPORT_MGMT_CALLBACK* management_callback,
                       tPORT_CALLBACK* event_callback,
                       uint16_t* server_handle) {
    log::verbose("Step 1");
@@ -266,7 +266,7 @@ class StackRfcommTest : public Test {

  void StartClientPort(const RawAddress& peer_bd_addr, uint16_t uuid,
                       uint8_t scn, uint16_t mtu,
                       tPORT_CALLBACK* management_callback,
                       tPORT_MGMT_CALLBACK* management_callback,
                       tPORT_CALLBACK* event_callback, uint16_t lcid,
                       uint16_t acl_handle, uint16_t* client_handle,
                       bool is_first_connection) {
Loading