From 96b1627938fb0ff5f852e3d7b4f6255f883c227e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=9D=83?= Date: Fri, 22 Nov 2024 06:32:58 +0000 Subject: [PATCH 1/2] sync CastRemoteDevice info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 孙权 --- interfaces/inner_api/include/cast_engine_common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interfaces/inner_api/include/cast_engine_common.h b/interfaces/inner_api/include/cast_engine_common.h index dfe547f..8dba3b4 100644 --- a/interfaces/inner_api/include/cast_engine_common.h +++ b/interfaces/inner_api/include/cast_engine_common.h @@ -370,8 +370,9 @@ struct EXPORT CastRemoteDevice { int sessionId{ INVALID_ID }; std::vector drmCapabilities; uint32_t mediumTypes{ 0 }; - std::string dlnaDeviceModelNameStr; - std::string dlnaDeviceManufacturerStr; + std::string modelName; + std::string manufacturerName; + bool isTrushed; }; enum class EXPORT CastMode { From 03b32765460edefa98b6096b84ea4f32d49720e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=9D=83?= Date: Fri, 22 Nov 2024 06:32:58 +0000 Subject: [PATCH 2/2] sync CastRemoteDevice info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 孙权 --- common/include/private/cast_service_common.h | 5 +++-- common/src/cast_engine_common_helper.cpp | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/common/include/private/cast_service_common.h b/common/include/private/cast_service_common.h index b674bc8..c0e80a1 100644 --- a/common/include/private/cast_service_common.h +++ b/common/include/private/cast_service_common.h @@ -60,8 +60,9 @@ struct CastInnerRemoteDevice { CapabilityType capability{ CapabilityType::CAST_PLUS }; uint32_t dlnaDeviceId{ static_cast(INVALID_ID) }; std::vector drmCapabilities; - std::string dlnaDeviceModelNameStr; - std::string dlnaDeviceManufacturerStr; + std::string modelName; + std::string manufacturerName; + bool isTrushed; bool operator==(const CastInnerRemoteDevice &rhs) const { diff --git a/common/src/cast_engine_common_helper.cpp b/common/src/cast_engine_common_helper.cpp index e57c950..1ebc113 100644 --- a/common/src/cast_engine_common_helper.cpp +++ b/common/src/cast_engine_common_helper.cpp @@ -147,7 +147,8 @@ bool WriteCastRemoteDevice(Parcel &parcel, const CastRemoteDevice &device) parcel.WriteString(device.networkId) && parcel.WriteString(device.localIpAddress) && parcel.WriteBool(device.isLeagacy) && parcel.WriteInt32(device.sessionId) && parcel.WriteUint32(device.mediumTypes) && parcel.WriteUint32(device.protocolCapabilities) && - parcel.WriteString(device.dlnaDeviceModelNameStr) && parcel.WriteString(device.dlnaDeviceManufacturerStr); + parcel.WriteString(device.modelName) && parcel.WriteString(device.manufacturerName) && + parcel.WriteBool(device.isTrushed); if (device.sessionKeyLength == SESSION_KEY_LENGTH && device.sessionKey) { res = res && parcel.WriteUint32(device.sessionKeyLength); res = res && parcel.WriteBuffer(device.sessionKey, device.sessionKeyLength); @@ -199,8 +200,9 @@ std::unique_ptr ReadCastRemoteDevice(Parcel &parcel) device->sessionId = parcel.ReadInt32(); device->mediumTypes = parcel.ReadUint32(); device->protocolCapabilities = parcel.ReadUint32(); - device->dlnaDeviceModelNameStr = parcel.ReadString(); - device->dlnaDeviceManufacturerStr = parcel.ReadString(); + device->modelName = parcel.ReadString(); + device->manufacturerName = parcel.ReadString(); + device->isTrushed = parcel.ReadBool(); device->sessionKeyLength = parcel.ReadUint32(); if (device->sessionKeyLength == SESSION_KEY_LENGTH) { device->sessionKey = parcel.ReadBuffer(static_cast(device->sessionKeyLength));