!113 sync castRemoteDevice

Merge pull request !113 from 孙权/master
This commit is contained in:
openharmony_ci 2024-11-22 10:36:47 +00:00 committed by Gitee
commit ab72f0e0af
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 11 additions and 7 deletions

View File

@ -60,8 +60,9 @@ struct CastInnerRemoteDevice {
CapabilityType capability{ CapabilityType::CAST_PLUS };
uint32_t dlnaDeviceId{ static_cast<uint32_t>(INVALID_ID) };
std::vector<std::string> drmCapabilities;
std::string dlnaDeviceModelNameStr;
std::string dlnaDeviceManufacturerStr;
std::string modelName;
std::string manufacturerName;
bool isTrushed;
bool operator==(const CastInnerRemoteDevice &rhs) const
{

View File

@ -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<CastRemoteDevice> 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<size_t>(device->sessionKeyLength));

View File

@ -370,8 +370,9 @@ struct EXPORT CastRemoteDevice {
int sessionId{ INVALID_ID };
std::vector<std::string> drmCapabilities;
uint32_t mediumTypes{ 0 };
std::string dlnaDeviceModelNameStr;
std::string dlnaDeviceManufacturerStr;
std::string modelName;
std::string manufacturerName;
bool isTrushed;
};
enum class EXPORT CastMode {