Home
last modified time | relevance | path

Searched refs:pkt (Results 1 – 25 of 60) sorted by relevance

123

/system/bt/packet/avrcp/
Dget_folder_items.cc72 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 …]
Dvendor_packet.cc42 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 …]
Davrcp_packet.cc43 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 …]
Dget_play_status_packet.cc42 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()
Dset_browsed_player.cc57 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()
Dcapabilities_packet.cc35 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 …]
Dchange_path.cc41 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 …]
Davrcp_browse_packet.cc39 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()
Davrcp_reject_packet.cc32 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()
Dregister_notification_packet.cc181 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 …]
Dget_total_number_of_items.cc44 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()
Dgeneral_reject_packet.cc34 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()
Dget_item_attributes.cc64 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()
Dpass_through_packet.cc35 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()
Dset_absolute_volume.cc35 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()
Dset_addressed_player.cc37 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()
Dplay_item.cc37 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()
/system/bt/packet/base/
Dpacket_builder.h28 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 …]
Dpacket.h42 Packet(std::shared_ptr<const Packet> pkt, size_t start, size_t end) in Packet() argument
43 : packet_start_index_(start), packet_end_index_(end), data_(pkt->data_){}; in Packet()
44 Packet(std::shared_ptr<const Packet> pkt) : data_(pkt->data_) { in Packet() argument
45 auto indices = pkt->GetPayloadIndecies(); in Packet()
72 static std::shared_ptr<T> Specialize(const std::shared_ptr<U>& pkt) { in Specialize() argument
80 new T(pkt, pkt->packet_start_index_, pkt->packet_end_index_)); in Specialize()
Dpacket_builder.cc25 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/
Ddevice.cc97 std::shared_ptr<VendorPacket> pkt) { in VendorPacketHandler() argument
99 DEVICE_VLOG(3) << __func__ << ": pdu=" << pkt->GetCommandPdu(); in VendorPacketHandler()
101 if (!pkt->IsValid()) { in VendorPacketHandler()
109 if (pkt->GetCType() == CType::NOT_IMPLEMENTED) { in VendorPacketHandler()
113 if (pkt->GetCType() >= CType::ACCEPTED) { in VendorPacketHandler()
114 switch (pkt->GetCommandPdu()) { in VendorPacketHandler()
118 Packet::Specialize<RegisterNotificationResponse>(pkt); in VendorPacketHandler()
123 RejectBuilder::MakeBuilder(pkt->GetCommandPdu(), in VendorPacketHandler()
148 << __func__ << ": Unhandled Response: pdu=" << pkt->GetCommandPdu(); in VendorPacketHandler()
154 switch (pkt->GetCommandPdu()) { in VendorPacketHandler()
[all …]
Ddevice.h143 void MessageReceived(uint8_t label, std::shared_ptr<Packet> pkt);
144 void BrowseMessageReceived(uint8_t label, std::shared_ptr<BrowsePacket> pkt);
145 void VendorPacketHandler(uint8_t label, std::shared_ptr<VendorPacket> pkt);
158 uint8_t label, const std::shared_ptr<GetCapabilitiesRequest>& pkt);
162 uint8_t label, const std::shared_ptr<RegisterNotificationRequest>& pkt);
188 uint8_t label, std::shared_ptr<GetElementAttributesRequest> pkt,
205 uint8_t label, std::shared_ptr<GetFolderItemsRequest> pkt,
208 std::shared_ptr<GetFolderItemsRequest> pkt,
211 uint8_t label, std::shared_ptr<GetFolderItemsRequest> pkt,
216 uint8_t label, std::shared_ptr<GetTotalNumberOfItemsRequest> pkt);
[all …]
/system/bt/gd/hal/
Dhci_hal_host_test.cc186 HciPacket pkt; in make_sample_hci_cmd_pkt() local
187 pkt.assign(2 + 1 + parameter_total_length, 0x01); in make_sample_hci_cmd_pkt()
188 pkt[2] = parameter_total_length; in make_sample_hci_cmd_pkt()
189 return pkt; in make_sample_hci_cmd_pkt()
193 HciPacket pkt; in make_sample_hci_acl_pkt() local
194 pkt.assign(2 + 2 + payload_size, 0x01); in make_sample_hci_acl_pkt()
195 pkt[2] = payload_size; in make_sample_hci_acl_pkt()
196 return pkt; in make_sample_hci_acl_pkt()
200 HciPacket pkt; in make_sample_hci_sco_pkt() local
201 pkt.assign(3 + payload_size, 0x01); in make_sample_hci_sco_pkt()
[all …]
/system/bt/packet/tests/
Dpacket_test_helper.h51 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/
Davdt_defs.h136 #define AVDT_MSG_PRS_HDR(p, lbl, pkt, msg) \ argument
139 (pkt) = (*(p) >> 2) & 0x03; \
161 #define AVDT_MSG_PRS_PKT_TYPE(p, pkt) \ argument
163 (pkt) = (*(p) >> 2) & 0x03; \
187 #define AVDT_MSG_BLD_HDR(p, lbl, pkt, msg) \ argument
189 *(p)++ = (uint8_t)((lbl) << 4) | ((pkt) << 2) | (msg); \

123