Loading system/main/shim/helpers.h +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include "hci/address_with_type.h" #include "gd/packet/raw_builder.h" #include "stack/include/bt_types.h" namespace bluetooth { Loading Loading @@ -64,4 +65,14 @@ inline hci::AddressWithType ToAddressWithType(const RawAddress& legacy_address, return hci::AddressWithType{address, type}; } inline std::unique_ptr<bluetooth::packet::RawBuilder> MakeUniquePacket( const uint8_t* data, size_t len) { bluetooth::packet::RawBuilder builder; std::vector<uint8_t> bytes(data, data + len); auto payload = std::make_unique<bluetooth::packet::RawBuilder>(); payload->AddOctets(bytes); return payload; } } // namespace bluetooth system/main/shim/l2c_api.cc +0 −9 Original line number Diff line number Diff line Loading @@ -379,15 +379,6 @@ bool bluetooth::shim::L2CA_ConnectFixedChnl(uint16_t cid, return bluetooth::shim::L2CA_ConnectFixedChnl(cid, rem_bda); } static std::unique_ptr<bluetooth::packet::RawBuilder> MakeUniquePacket( const uint8_t* data, size_t len) { bluetooth::packet::RawBuilder builder; std::vector<uint8_t> bytes(data, data + len); auto payload = std::make_unique<bluetooth::packet::RawBuilder>(); payload->AddOctets(bytes); return payload; } uint16_t bluetooth::shim::L2CA_SendFixedChnlData(uint16_t cid, const RawAddress& rem_bda, BT_HDR* p_buf) { Loading Loading
system/main/shim/helpers.h +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include "hci/address_with_type.h" #include "gd/packet/raw_builder.h" #include "stack/include/bt_types.h" namespace bluetooth { Loading Loading @@ -64,4 +65,14 @@ inline hci::AddressWithType ToAddressWithType(const RawAddress& legacy_address, return hci::AddressWithType{address, type}; } inline std::unique_ptr<bluetooth::packet::RawBuilder> MakeUniquePacket( const uint8_t* data, size_t len) { bluetooth::packet::RawBuilder builder; std::vector<uint8_t> bytes(data, data + len); auto payload = std::make_unique<bluetooth::packet::RawBuilder>(); payload->AddOctets(bytes); return payload; } } // namespace bluetooth
system/main/shim/l2c_api.cc +0 −9 Original line number Diff line number Diff line Loading @@ -379,15 +379,6 @@ bool bluetooth::shim::L2CA_ConnectFixedChnl(uint16_t cid, return bluetooth::shim::L2CA_ConnectFixedChnl(cid, rem_bda); } static std::unique_ptr<bluetooth::packet::RawBuilder> MakeUniquePacket( const uint8_t* data, size_t len) { bluetooth::packet::RawBuilder builder; std::vector<uint8_t> bytes(data, data + len); auto payload = std::make_unique<bluetooth::packet::RawBuilder>(); payload->AddOctets(bytes); return payload; } uint16_t bluetooth::shim::L2CA_SendFixedChnlData(uint16_t cid, const RawAddress& rem_bda, BT_HDR* p_buf) { Loading