Lines Matching refs:pkt

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()
105 RejectBuilder::MakeBuilder(pkt->GetCommandPdu(), in VendorPacketHandler()
130 << __func__ << ": Unhandled Response: pdu=" << pkt->GetCommandPdu(); in VendorPacketHandler()
136 switch (pkt->GetCommandPdu()) { in VendorPacketHandler()
139 Packet::Specialize<GetCapabilitiesRequest>(pkt)); in VendorPacketHandler()
144 Packet::Specialize<RegisterNotificationRequest>(pkt)); in VendorPacketHandler()
148 … auto get_element_attributes_request_pkt = Packet::Specialize<GetElementAttributesRequest>(pkt); in VendorPacketHandler()
152 auto response = RejectBuilder::MakeBuilder(pkt->GetCommandPdu(), Status::INVALID_PARAMETER); in VendorPacketHandler()
166 HandlePlayItem(label, Packet::Specialize<PlayItemRequest>(pkt)); in VendorPacketHandler()
174 auto set_addressed_player_request = Packet::Specialize<SetAddressedPlayerRequest>(pkt); in VendorPacketHandler()
178 auto response = RejectBuilder::MakeBuilder(pkt->GetCommandPdu(), Status::INVALID_PARAMETER); in VendorPacketHandler()
188 DEVICE_LOG(ERROR) << "Unhandled Vendor Packet: " << pkt->ToString(); in VendorPacketHandler()
190 (CommandPdu)pkt->GetCommandPdu(), Status::INVALID_COMMAND); in VendorPacketHandler()
197 uint8_t label, const std::shared_ptr<GetCapabilitiesRequest>& pkt) { in HandleGetCapabilities() argument
199 << ": capability=" << pkt->GetCapabilityRequested(); in HandleGetCapabilities()
201 if (!pkt->IsValid()) { in HandleGetCapabilities()
203 auto response = RejectBuilder::MakeBuilder(pkt->GetCommandPdu(), Status::INVALID_PARAMETER); in HandleGetCapabilities()
208 switch (pkt->GetCapabilityRequested()) { in HandleGetCapabilities()
235 << pkt->GetCapabilityRequested(); in HandleGetCapabilities()
244 uint8_t label, const std::shared_ptr<RegisterNotificationRequest>& pkt) { in HandleNotification() argument
245 if (!pkt->IsValid()) { in HandleNotification()
247 auto response = RejectBuilder::MakeBuilder(pkt->GetCommandPdu(), in HandleNotification()
253 DEVICE_VLOG(4) << __func__ << ": event=" << pkt->GetEventRegistered(); in HandleNotification()
255 switch (pkt->GetEventRegistered()) { in HandleNotification()
269 play_pos_interval_ = pkt->GetInterval(); in HandleNotification()
312 << pkt->GetEventRegistered(); in HandleNotification()
314 (CommandPdu)pkt->GetCommandPdu(), Status::INVALID_PARAMETER); in HandleNotification()
349 uint8_t label, const std::shared_ptr<RegisterNotificationResponse>& pkt) { in HandleVolumeChanged() argument
350 DEVICE_VLOG(1) << __func__ << ": interim=" << pkt->IsInterim(); in HandleVolumeChanged()
354 if (pkt->GetCType() == CType::REJECTED) { in HandleVolumeChanged()
363 if (!pkt->IsInterim()) { in HandleVolumeChanged()
371 volume_ = pkt->GetVolume(); in HandleVolumeChanged()
387 volume_ = pkt->GetVolume(); in HandleVolumeChanged()
588 uint8_t label, std::shared_ptr<GetElementAttributesRequest> pkt, in GetElementAttributesResponse() argument
592 auto get_element_attributes_pkt = pkt; in GetElementAttributesResponse()
615 void Device::MessageReceived(uint8_t label, std::shared_ptr<Packet> pkt) { in MessageReceived() argument
616 if (!pkt->IsValid()) { in MessageReceived()
623 DEVICE_VLOG(4) << __func__ << ": opcode=" << pkt->GetOpcode(); in MessageReceived()
625 switch (pkt->GetOpcode()) { in MessageReceived()
633 auto pass_through_packet = Packet::Specialize<PassThroughPacket>(pkt); in MessageReceived()
681 auto vendor_pkt = Packet::Specialize<VendorPacket>(pkt); in MessageReceived()
688 std::shared_ptr<PlayItemRequest> pkt) { in HandlePlayItem() argument
689 DEVICE_VLOG(2) << __func__ << ": scope=" << pkt->GetScope() in HandlePlayItem()
690 << " uid=" << pkt->GetUid(); in HandlePlayItem()
692 if (!pkt->IsValid()) { in HandlePlayItem()
694 auto response = RejectBuilder::MakeBuilder(pkt->GetCommandPdu(), Status::INVALID_PARAMETER); in HandlePlayItem()
700 switch (pkt->GetScope()) { in HandlePlayItem()
702 media_id = now_playing_ids_.get_media_id(pkt->GetUid()); in HandlePlayItem()
705 media_id = vfs_ids_.get_media_id(pkt->GetUid()); in HandlePlayItem()
720 pkt->GetScope() == Scope::NOW_PLAYING, media_id); in HandlePlayItem()
727 uint8_t label, std::shared_ptr<SetAddressedPlayerRequest> pkt, in HandleSetAddressedPlayer() argument
729 DEVICE_VLOG(2) << __func__ << ": PlayerId=" << pkt->GetPlayerId(); in HandleSetAddressedPlayer()
731 if (curr_player != pkt->GetPlayerId()) { in HandleSetAddressedPlayer()
745 std::shared_ptr<BrowsePacket> pkt) { in BrowseMessageReceived() argument
746 if (!pkt->IsValid()) { in BrowseMessageReceived()
753 DEVICE_VLOG(1) << __func__ << ": pdu=" << pkt->GetPdu(); in BrowseMessageReceived()
755 switch (pkt->GetPdu()) { in BrowseMessageReceived()
758 Packet::Specialize<SetBrowsedPlayerRequest>(pkt)); in BrowseMessageReceived()
762 Packet::Specialize<GetFolderItemsRequest>(pkt)); in BrowseMessageReceived()
765 HandleChangePath(label, Packet::Specialize<ChangePathRequest>(pkt)); in BrowseMessageReceived()
769 label, Packet::Specialize<GetItemAttributesRequest>(pkt)); in BrowseMessageReceived()
773 label, Packet::Specialize<GetTotalNumberOfItemsRequest>(pkt)); in BrowseMessageReceived()
776 DEVICE_LOG(WARNING) << __func__ << ": " << pkt->GetPdu(); in BrowseMessageReceived()
785 std::shared_ptr<GetFolderItemsRequest> pkt) { in HandleGetFolderItems() argument
786 if (!pkt->IsValid()) { in HandleGetFolderItems()
795 DEVICE_VLOG(2) << __func__ << ": scope=" << pkt->GetScope(); in HandleGetFolderItems()
797 switch (pkt->GetScope()) { in HandleGetFolderItems()
801 weak_ptr_factory_.GetWeakPtr(), label, pkt)); in HandleGetFolderItems()
807 weak_ptr_factory_.GetWeakPtr(), label, pkt)); in HandleGetFolderItems()
812 weak_ptr_factory_.GetWeakPtr(), label, pkt)); in HandleGetFolderItems()
815 DEVICE_LOG(ERROR) << __func__ << ": " << pkt->GetScope(); in HandleGetFolderItems()
823 uint8_t label, std::shared_ptr<GetTotalNumberOfItemsRequest> pkt) { in HandleGetTotalNumberOfItems() argument
824 if (!pkt->IsValid()) { in HandleGetTotalNumberOfItems()
831 DEVICE_VLOG(2) << __func__ << ": scope=" << pkt->GetScope(); in HandleGetTotalNumberOfItems()
833 switch (pkt->GetScope()) { in HandleGetTotalNumberOfItems()
852 DEVICE_LOG(ERROR) << __func__ << ": " << pkt->GetScope(); in HandleGetTotalNumberOfItems()
885 std::shared_ptr<ChangePathRequest> pkt) { in HandleChangePath() argument
886 if (!pkt->IsValid()) { in HandleChangePath()
893 DEVICE_VLOG(2) << __func__ << ": direction=" << pkt->GetDirection() in HandleChangePath()
894 << " uid=" << loghex(pkt->GetUid()); in HandleChangePath()
896 if (pkt->GetDirection() == Direction::DOWN && in HandleChangePath()
897 vfs_ids_.get_media_id(pkt->GetUid()) == "") { in HandleChangePath()
899 << ": No item found for UID=" << pkt->GetUid(); in HandleChangePath()
906 if (pkt->GetDirection() == Direction::DOWN) { in HandleChangePath()
907 current_path_.push(vfs_ids_.get_media_id(pkt->GetUid())); in HandleChangePath()
928 label, pkt)); in HandleChangePath()
932 std::shared_ptr<ChangePathRequest> pkt, in ChangePathResponse() argument
942 uint8_t label, std::shared_ptr<GetItemAttributesRequest> pkt) { in HandleGetItemAttributes() argument
943 if (!pkt->IsValid()) { in HandleGetItemAttributes()
950 DEVICE_VLOG(2) << __func__ << ": scope=" << pkt->GetScope() in HandleGetItemAttributes()
951 << " uid=" << loghex(pkt->GetUid()) in HandleGetItemAttributes()
952 << " uid counter=" << loghex(pkt->GetUidCounter()); in HandleGetItemAttributes()
953 if (pkt->GetUidCounter() != 0x0000) { // For database unaware player, use 0 in HandleGetItemAttributes()
961 switch (pkt->GetScope()) { in HandleGetItemAttributes()
965 weak_ptr_factory_.GetWeakPtr(), label, pkt)); in HandleGetItemAttributes()
975 weak_ptr_factory_.GetWeakPtr(), label, pkt)); in HandleGetItemAttributes()
984 uint8_t label, std::shared_ptr<GetItemAttributesRequest> pkt, in GetItemAttributesNowPlayingResponse() argument
986 DEVICE_VLOG(2) << __func__ << ": uid=" << loghex(pkt->GetUid()); in GetItemAttributesNowPlayingResponse()
990 auto media_id = now_playing_ids_.get_media_id(pkt->GetUid()); in GetItemAttributesNowPlayingResponse()
1011 auto attributes_requested = pkt->GetAttributesRequested(); in GetItemAttributesNowPlayingResponse()
1030 uint8_t label, std::shared_ptr<GetItemAttributesRequest> pkt, in GetItemAttributesVFSResponse() argument
1032 DEVICE_VLOG(2) << __func__ << ": uid=" << loghex(pkt->GetUid()); in GetItemAttributesVFSResponse()
1034 auto media_id = vfs_ids_.get_media_id(pkt->GetUid()); in GetItemAttributesVFSResponse()
1056 auto attributes_requested = pkt->GetAttributesRequested(); in GetItemAttributesVFSResponse()
1090 uint8_t label, std::shared_ptr<GetFolderItemsRequest> pkt, in GetMediaPlayerListResponse() argument
1116 for (size_t i = pkt->GetStartItem(); in GetMediaPlayerListResponse()
1117 i <= pkt->GetEndItem() && i < players.size(); i++) { in GetMediaPlayerListResponse()
1139 std::shared_ptr<GetFolderItemsRequest> pkt, in GetVFSListResponse() argument
1141 DEVICE_VLOG(2) << __func__ << ": start_item=" << pkt->GetStartItem() in GetVFSListResponse()
1142 << " end_item=" << pkt->GetEndItem(); in GetVFSListResponse()
1163 for (auto i = pkt->GetStartItem(); i <= pkt->GetEndItem() && i < items.size(); in GetVFSListResponse()
1180 if (pkt->GetNumAttributes() == 0x00) { // All attributes requested in GetVFSListResponse()
1184 filter_attributes_requested(song, pkt->GetAttributesRequested()); in GetVFSListResponse()
1197 uint8_t label, std::shared_ptr<GetFolderItemsRequest> pkt, in GetNowPlayingListResponse() argument
1208 for (size_t i = pkt->GetStartItem(); in GetNowPlayingListResponse()
1209 i <= pkt->GetEndItem() && i < song_list.size(); i++) { in GetNowPlayingListResponse()
1216 if (pkt->GetNumAttributes() == 0x00) { in GetNowPlayingListResponse()
1220 filter_attributes_requested(song, pkt->GetAttributesRequested()); in GetNowPlayingListResponse()
1232 uint8_t label, std::shared_ptr<SetBrowsedPlayerRequest> pkt) { in HandleSetBrowsedPlayer() argument
1233 if (!pkt->IsValid()) { in HandleSetBrowsedPlayer()
1240 DEVICE_VLOG(2) << __func__ << ": player_id=" << pkt->GetPlayerId(); in HandleSetBrowsedPlayer()
1242 pkt->GetPlayerId(), in HandleSetBrowsedPlayer()
1244 weak_ptr_factory_.GetWeakPtr(), label, pkt)); in HandleSetBrowsedPlayer()
1248 uint8_t label, std::shared_ptr<SetBrowsedPlayerRequest> pkt, bool success, in SetBrowsedPlayerResponse() argument
1260 curr_browsed_player_id_ = pkt->GetPlayerId(); in SetBrowsedPlayerResponse()