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

Commit 90f55cf9 authored by Chris Manton's avatar Chris Manton
Browse files

Expand stack/include/btm_client_interface

Towards modular code

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

Change-Id: I3e7f8ff3e4d07c90f3c4eceff41777c2091abdca
parent fa84ef11
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -72,7 +72,6 @@ struct btm_client_interface_s btm_client_interface = {
            .BTM_ReadDevInfo = BTM_ReadDevInfo,
            .BTM_ReadRemoteDeviceName = BTM_ReadRemoteDeviceName,
            .BTM_ReadRemoteFeatures = BTM_ReadRemoteFeatures,
            .BTM_SetEncryption = BTM_SetEncryption,
            .BTM_GetMaxPacketSize = BTM_GetMaxPacketSize,
            .BTM_ReadRemoteVersion = BTM_ReadRemoteVersion,
        },
@@ -109,12 +108,17 @@ struct btm_client_interface_s btm_client_interface = {
            .BTM_SecBond = BTM_SecBond,
            .BTM_SecBondCancel = BTM_SecBondCancel,
            .BTM_SecClearSecurityFlags = BTM_SecClearSecurityFlags,
            .BTM_SecClrService = BTM_SecClrService,
            .BTM_SecClrServiceByPsm = BTM_SecClrServiceByPsm,
            .BTM_SecDeleteDevice = BTM_SecDeleteDevice,
            .BTM_SecDeleteRmtNameNotifyCallback =
                BTM_SecDeleteRmtNameNotifyCallback,
            .BTM_SecReadDevName = BTM_SecReadDevName,
            .BTM_SecRegister = BTM_SecRegister,
            .BTM_SetEncryption = BTM_SetEncryption,
            .BTM_IsEncrypted = BTM_IsEncrypted,
            .BTM_SecIsSecurityPending = BTM_SecIsSecurityPending,
            .BTM_IsLinkKeyKnown = BTM_IsLinkKeyKnown,
        },

    .ble =
@@ -128,6 +132,7 @@ struct btm_client_interface_s btm_client_interface = {
            .BTM_BleSetPhy = BTM_BleSetPhy,
            .BTM_BleSetPrefConnParams = BTM_BleSetPrefConnParams,
            .BTM_SetBleDataLength = BTM_SetBleDataLength,
            .BTM_UseLeLink = BTM_UseLeLink,
        },

    .sco =
+15 −6
Original line number Diff line number Diff line
@@ -69,6 +69,10 @@ struct btm_client_interface_s {

  // Acl peer and lifecycle
  struct {
    struct {
      bool (*SupportTransparentSynchronousData)(const RawAddress& bd_addr);
    } features;

    bool (*BTM_IsAclConnectionUp)(const RawAddress& bd_addr,
                                  tBT_TRANSPORT transport);
    bool (*BTM_ReadConnectedTransportAddress)(RawAddress* bd_addr,
@@ -77,11 +81,6 @@ struct btm_client_interface_s {
    tBTM_STATUS (*BTM_ReadRemoteDeviceName)(const RawAddress& bd_addr,
                                            tBTM_CMPL_CB* p_cb,
                                            tBT_TRANSPORT transport);
    tBTM_STATUS (*BTM_SetEncryption)(const RawAddress& bd_addr,
                                     tBT_TRANSPORT transport,
                                     tBTM_SEC_CALLBACK* p_callback,
                                     void* p_ref_data,
                                     tBTM_BLE_SEC_ACT sec_act);
    uint8_t* (*BTM_ReadRemoteFeatures)(const RawAddress&);
    void (*BTM_ReadDevInfo)(const RawAddress& bd_addr,
                            tBT_DEVICE_TYPE* p_dev_type,
@@ -137,6 +136,7 @@ struct btm_client_interface_s {
                                tBT_DEVICE_TYPE dev_type,
                                tBLE_ADDR_TYPE addr_type);
    void (*BTM_SecClearSecurityFlags)(const RawAddress& bd_addr);
    uint8_t (*BTM_SecClrService)(uint8_t service_id);
    uint8_t (*BTM_SecClrServiceByPsm)(uint16_t psm);
    void (*BTM_RemoteOobDataReply)(tBTM_STATUS res, const RawAddress& bd_addr,
                                   const Octet16& c, const Octet16& r);
@@ -145,7 +145,15 @@ struct btm_client_interface_s {
    void (*BTM_ConfirmReqReply)(tBTM_STATUS res, const RawAddress& bd_addr);
    bool (*BTM_SecDeleteRmtNameNotifyCallback)(
        tBTM_RMT_NAME_CALLBACK* p_callback);

    tBTM_STATUS (*BTM_SetEncryption)(const RawAddress& bd_addr,
                                     tBT_TRANSPORT transport,
                                     tBTM_SEC_CALLBACK* p_callback,
                                     void* p_ref_data,
                                     tBTM_BLE_SEC_ACT sec_act);
    bool (*BTM_IsEncrypted)(const RawAddress& bd_addr, tBT_TRANSPORT transport);
    bool (*BTM_SecIsSecurityPending)(const RawAddress& bd_addr);
    bool (*BTM_IsLinkKeyKnown)(const RawAddress& bd_addr,
                               tBT_TRANSPORT transport);
  } security;

  struct {
@@ -170,6 +178,7 @@ struct btm_client_interface_s {
                                     uint16_t max_conn_int,
                                     uint16_t peripheral_latency,
                                     uint16_t supervision_tout);
    bool (*BTM_UseLeLink)(const RawAddress& bd_addr);
  } ble;

  struct {