/system/bt/packet/avrcp/ |
D | get_folder_items.cc | 72 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 73 ReserveSpace(pkt, size()); in Serialize() 75 BrowsePacketBuilder::PushHeader(pkt, size() - BrowsePacket::kMinSize()); in Serialize() 82 AddPayloadOctets1(pkt, (uint8_t)status_); // Status in Serialize() 85 AddPayloadOctets2(pkt, base::ByteSwap(uid_counter_)); in Serialize() 87 AddPayloadOctets2(pkt, base::ByteSwap(num_items)); in Serialize() 90 PushMediaListItem(pkt, item); in Serialize() 124 const std::shared_ptr<::bluetooth::Packet>& pkt, in PushMediaListItem() argument 128 PushMediaPlayerItem(pkt, item.player_); in PushMediaListItem() 131 PushFolderItem(pkt, item.folder_); in PushMediaListItem() [all …]
|
D | vendor_packet.cc | 42 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 43 ReserveSpace(pkt, size()); in Serialize() 46 PacketBuilder::PushHeader(pkt); in Serialize() 51 PushHeader(pkt, payload_->size()); in Serialize() 54 return payload_->Serialize(pkt); in Serialize() 58 const std::shared_ptr<::bluetooth::Packet>& pkt, in PushHeader() argument 60 PushCompanyId(pkt, BLUETOOTH_COMPANY_ID); in PushHeader() 61 AddPayloadOctets1(pkt, static_cast<uint8_t>(pdu_)); in PushHeader() 62 AddPayloadOctets1(pkt, static_cast<uint8_t>(packet_type_)); in PushHeader() 63 AddPayloadOctets2(pkt, base::ByteSwap(parameter_length)); in PushHeader() [all …]
|
D | avrcp_packet.cc | 43 bool PacketBuilder::Serialize(const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 44 ReserveSpace(pkt, size()); in Serialize() 47 PushHeader(pkt); in Serialize() 50 return payload_->Serialize(pkt); in Serialize() 54 const std::shared_ptr<::bluetooth::Packet>& pkt) { in PushHeader() argument 55 AddPayloadOctets1(pkt, static_cast<uint8_t>(c_type_)); in PushHeader() 56 AddPayloadOctets1(pkt, (subunit_type_ << 3) | subunit_id_); in PushHeader() 57 AddPayloadOctets1(pkt, static_cast<uint8_t>(opcode_)); in PushHeader() 61 const std::shared_ptr<::bluetooth::Packet>& pkt, uint32_t company_id) { in PushCompanyId() argument 65 AddPayloadOctets1(pkt, company_id & 0xFF); in PushCompanyId() [all …]
|
D | get_play_status_packet.cc | 42 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 43 ReserveSpace(pkt, size()); in Serialize() 46 PacketBuilder::PushHeader(pkt); in Serialize() 50 VendorPacketBuilder::PushHeader(pkt, parameter_count); in Serialize() 52 AddPayloadOctets4(pkt, base::ByteSwap(song_length_)); in Serialize() 53 AddPayloadOctets4(pkt, base::ByteSwap(song_position_)); in Serialize() 54 AddPayloadOctets1(pkt, play_status_); in Serialize()
|
D | capabilities_packet.cc | 35 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 36 ReserveSpace(pkt, size()); in Serialize() 39 PacketBuilder::PushHeader(pkt); in Serialize() 42 VendorPacketBuilder::PushHeader(pkt, 1); in Serialize() 45 return AddPayloadOctets1(pkt, static_cast<uint8_t>(capability_)); in Serialize() 128 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 129 ReserveSpace(pkt, size()); in Serialize() 132 PacketBuilder::PushHeader(pkt); in Serialize() 136 VendorPacketBuilder::PushHeader(pkt, parameter_count); in Serialize() 139 AddPayloadOctets1(pkt, static_cast<uint8_t>(capability_)); in Serialize() [all …]
|
D | set_browsed_player.cc | 57 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 58 ReserveSpace(pkt, size()); in Serialize() 60 BrowsePacketBuilder::PushHeader(pkt, size() - BrowsePacket::kMinSize()); in Serialize() 62 AddPayloadOctets1(pkt, (uint8_t)status_); in Serialize() 65 AddPayloadOctets2(pkt, base::ByteSwap(uid_counter_)); in Serialize() 66 AddPayloadOctets4(pkt, base::ByteSwap(num_items_in_folder_)); in Serialize() 67 AddPayloadOctets2(pkt, base::ByteSwap((uint16_t)0x006a)); // UTF-8 in Serialize() 68 AddPayloadOctets1(pkt, folder_depth_); in Serialize() 73 AddPayloadOctets2(pkt, base::ByteSwap(folder_name_len)); in Serialize() 75 AddPayloadOctets1(pkt, *it); in Serialize()
|
D | change_path.cc | 41 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 42 ReserveSpace(pkt, size()); in Serialize() 44 BrowsePacketBuilder::PushHeader(pkt, size() - BrowsePacket::kMinSize()); in Serialize() 46 AddPayloadOctets1(pkt, (uint8_t)status_); in Serialize() 49 AddPayloadOctets4(pkt, base::ByteSwap(num_items_in_folder_)); in Serialize() 100 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 101 ReserveSpace(pkt, size()); in Serialize() 103 BrowsePacketBuilder::PushHeader(pkt, size() - BrowsePacket::kMinSize()); in Serialize() 105 AddPayloadOctets2(pkt, base::ByteSwap(uid_counter_)); in Serialize() 106 AddPayloadOctets1(pkt, static_cast<uint8_t>(direction_)); in Serialize() [all …]
|
D | avrcp_browse_packet.cc | 39 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 40 ReserveSpace(pkt, size()); in Serialize() 42 PushHeader(pkt, payload_->size()); in Serialize() 44 return payload_->Serialize(pkt); in Serialize() 48 const std::shared_ptr<::bluetooth::Packet>& pkt, uint16_t length) { in PushHeader() argument 49 AddPayloadOctets1(pkt, (uint8_t)pdu_); in PushHeader() 50 AddPayloadOctets2(pkt, base::ByteSwap(length)); in PushHeader() 54 std::shared_ptr<::bluetooth::Packet> pkt) { in Parse() argument 55 return std::shared_ptr<BrowsePacket>(new BrowsePacket(pkt)); in Parse()
|
D | avrcp_reject_packet.cc | 32 bool RejectBuilder::Serialize(const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 33 ReserveSpace(pkt, size()); in Serialize() 36 PacketBuilder::PushHeader(pkt); in Serialize() 39 VendorPacketBuilder::PushHeader(pkt, 1); in Serialize() 41 AddPayloadOctets1(pkt, static_cast<uint8_t>(reason_)); in Serialize()
|
D | register_notification_packet.cc | 181 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 182 ReserveSpace(pkt, size()); in Serialize() 184 PacketBuilder::PushHeader(pkt); in Serialize() 186 VendorPacketBuilder::PushHeader(pkt, size() - VendorPacket::kMinSize()); in Serialize() 188 AddPayloadOctets1(pkt, static_cast<uint8_t>(event_)); in Serialize() 192 AddPayloadOctets1(pkt, playback_status); in Serialize() 196 AddPayloadOctets8(pkt, base::ByteSwap(data_)); in Serialize() 201 AddPayloadOctets4(pkt, base::ByteSwap(playback_pos)); in Serialize() 213 AddPayloadOctets2(pkt, base::ByteSwap(player_id)); in Serialize() 214 AddPayloadOctets2(pkt, base::ByteSwap(uid_counter)); in Serialize() [all …]
|
D | get_total_number_of_items.cc | 44 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 45 ReserveSpace(pkt, size()); in Serialize() 47 BrowsePacketBuilder::PushHeader(pkt, size() - BrowsePacket::kMinSize()); in Serialize() 49 AddPayloadOctets1(pkt, (uint8_t)status_); in Serialize() 52 AddPayloadOctets2(pkt, base::ByteSwap(uid_counter_)); in Serialize() 53 AddPayloadOctets4(pkt, base::ByteSwap(num_items_in_folder_)); in Serialize()
|
D | general_reject_packet.cc | 34 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 35 ReserveSpace(pkt, size()); in Serialize() 37 BrowsePacketBuilder::PushHeader(pkt, size() - BrowsePacket::kMinSize()); in Serialize() 39 AddPayloadOctets1(pkt, static_cast<uint8_t>(reason_)); in Serialize()
|
D | get_item_attributes.cc | 64 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 65 ReserveSpace(pkt, size()); in Serialize() 67 BrowsePacketBuilder::PushHeader(pkt, size() - BrowsePacket::kMinSize()); in Serialize() 69 AddPayloadOctets1(pkt, (uint8_t)status_); in Serialize() 72 AddPayloadOctets1(pkt, entries_.size()); in Serialize() 74 AddPayloadOctets4(pkt, base::ByteSwap((uint32_t)entry.attribute())); in Serialize() 76 AddPayloadOctets2(pkt, base::ByteSwap(character_set)); in Serialize() 78 AddPayloadOctets2(pkt, base::ByteSwap(value_length)); in Serialize() 80 AddPayloadOctets1(pkt, byte); in Serialize()
|
D | pass_through_packet.cc | 35 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 36 ReserveSpace(pkt, size()); in Serialize() 38 PacketBuilder::PushHeader(pkt); in Serialize() 42 AddPayloadOctets1(pkt, byte); in Serialize() 44 AddPayloadOctets1(pkt, 0x00); in Serialize()
|
D | set_absolute_volume.cc | 35 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 36 ReserveSpace(pkt, size()); in Serialize() 38 PacketBuilder::PushHeader(pkt); in Serialize() 40 VendorPacketBuilder::PushHeader(pkt, size() - VendorPacket::kMinSize()); in Serialize() 42 AddPayloadOctets1(pkt, volume_); in Serialize()
|
D | set_addressed_player.cc | 37 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 38 ReserveSpace(pkt, size()); in Serialize() 40 PacketBuilder::PushHeader(pkt); in Serialize() 42 VendorPacketBuilder::PushHeader(pkt, size() - VendorPacket::kMinSize()); in Serialize() 44 AddPayloadOctets1(pkt, (uint8_t)status_); in Serialize()
|
D | play_item.cc | 37 const std::shared_ptr<::bluetooth::Packet>& pkt) { in Serialize() argument 38 ReserveSpace(pkt, size()); in Serialize() 40 PacketBuilder::PushHeader(pkt); in Serialize() 42 VendorPacketBuilder::PushHeader(pkt, size() - VendorPacket::kMinSize()); in Serialize() 44 AddPayloadOctets1(pkt, (uint8_t)status_); in Serialize()
|
D | get_folder_items.h | 36 const std::shared_ptr<::bluetooth::Packet>& pkt) override; 59 void PushMediaListItem(const std::shared_ptr<::bluetooth::Packet>& pkt, 61 void PushMediaPlayerItem(const std::shared_ptr<::bluetooth::Packet>& pkt, 63 void PushMediaElementItem(const std::shared_ptr<::bluetooth::Packet>& pkt, 65 void PushFolderItem(const std::shared_ptr<::bluetooth::Packet>& pkt, 110 const std::shared_ptr<::bluetooth::Packet>& pkt) override;
|
/system/bt/packet/base/ |
D | packet_builder.h | 28 virtual bool Serialize(const std::shared_ptr<Packet>& pkt) = 0; 34 void ReserveSpace(const std::shared_ptr<Packet>& pkt, size_t size); 35 bool AddPayloadOctets1(const std::shared_ptr<Packet>& pkt, uint8_t value) { in AddPayloadOctets1() argument 36 return AddPayloadOctets(pkt, 1, value); in AddPayloadOctets1() 38 bool AddPayloadOctets2(const std::shared_ptr<Packet>& pkt, uint16_t value) { in AddPayloadOctets2() argument 39 return AddPayloadOctets(pkt, 2, value); in AddPayloadOctets2() 41 bool AddPayloadOctets3(const std::shared_ptr<Packet>& pkt, uint32_t value) { in AddPayloadOctets3() argument 42 return AddPayloadOctets(pkt, 3, value); in AddPayloadOctets3() 44 bool AddPayloadOctets4(const std::shared_ptr<Packet>& pkt, uint32_t value) { in AddPayloadOctets4() argument 45 return AddPayloadOctets(pkt, 4, value); in AddPayloadOctets4() [all …]
|
D | packet.h | 41 Packet(std::shared_ptr<const Packet> pkt, size_t start, size_t end) in Packet() argument 42 : packet_start_index_(start), packet_end_index_(end), data_(pkt->data_){}; in Packet() 43 Packet(std::shared_ptr<const Packet> pkt) : data_(pkt->data_) { in Packet() argument 44 auto indices = pkt->GetPayloadIndecies(); in Packet() 71 static std::shared_ptr<T> Specialize(const std::shared_ptr<U>& pkt) { in Specialize() argument 79 new T(pkt, pkt->packet_start_index_, pkt->packet_end_index_)); in Specialize()
|
D | packet_builder.cc | 25 void PacketBuilder::ReserveSpace(const std::shared_ptr<Packet>& pkt, in ReserveSpace() argument 27 pkt->data_->reserve(size); in ReserveSpace() 30 bool PacketBuilder::AddPayloadOctets(const std::shared_ptr<Packet>& pkt, in AddPayloadOctets() argument 35 pkt->data_->push_back(value & 0xff); in AddPayloadOctets() 36 pkt->packet_end_index_++; in AddPayloadOctets()
|
/system/bt/profile/avrcp/ |
D | device.cc | 79 std::shared_ptr<VendorPacket> pkt) { in VendorPacketHandler() argument 81 DEVICE_VLOG(3) << __func__ << ": pdu=" << pkt->GetCommandPdu(); in VendorPacketHandler() 83 if (!pkt->IsValid()) { in VendorPacketHandler() 91 if (pkt->GetCType() == CType::NOT_IMPLEMENTED) { in VendorPacketHandler() 95 if (pkt->GetCType() >= CType::ACCEPTED) { in VendorPacketHandler() 96 switch (pkt->GetCommandPdu()) { in VendorPacketHandler() 100 Packet::Specialize<RegisterNotificationResponse>(pkt); in VendorPacketHandler() 117 << __func__ << ": Unhandled Response: pdu=" << pkt->GetCommandPdu(); in VendorPacketHandler() 123 switch (pkt->GetCommandPdu()) { in VendorPacketHandler() 126 Packet::Specialize<GetCapabilitiesRequest>(pkt)); in VendorPacketHandler() [all …]
|
D | device.h | 133 void MessageReceived(uint8_t label, std::shared_ptr<Packet> pkt); 134 void BrowseMessageReceived(uint8_t label, std::shared_ptr<BrowsePacket> pkt); 135 void VendorPacketHandler(uint8_t label, std::shared_ptr<VendorPacket> pkt); 148 uint8_t label, const std::shared_ptr<GetCapabilitiesRequest>& pkt); 152 uint8_t label, const std::shared_ptr<RegisterNotificationRequest>& pkt); 178 uint8_t label, std::shared_ptr<GetElementAttributesRequest> pkt, 195 uint8_t label, std::shared_ptr<GetFolderItemsRequest> pkt, 198 std::shared_ptr<GetFolderItemsRequest> pkt, 201 uint8_t label, std::shared_ptr<GetFolderItemsRequest> pkt, 206 uint8_t label, std::shared_ptr<GetTotalNumberOfItemsRequest> pkt); [all …]
|
/system/bt/packet/tests/ |
D | packet_test_helper.h | 51 auto pkt = std::shared_ptr<TestPacketType<PacketType>>( in Make() local 53 pkt->packet_start_index_ = start; in Make() 54 pkt->packet_end_index_ = end; in Make() 55 pkt->data_ = std::make_shared<std::vector<uint8_t>>(std::move(payload)); in Make() 56 return pkt; in Make()
|
/system/bt/stack/avdt/ |
D | avdt_defs.h | 155 #define AVDT_MSG_PRS_HDR(p, lbl, pkt, msg) \ argument 158 (pkt) = (*(p) >> 2) & 0x03; \ 180 #define AVDT_MSG_PRS_PKT_TYPE(p, pkt) \ argument 182 (pkt) = (*(p) >> 2) & 0x03; \ 206 #define AVDT_MSG_BLD_HDR(p, lbl, pkt, msg) \ argument 208 *(p)++ = (uint8_t)((lbl) << 4) | ((pkt) << 2) | (msg); \
|