mirror of
https://gitee.com/openharmony/castengine_cast_framework
synced 2024-11-22 22:19:55 +00:00
sync CastRemoteDevice info
Signed-off-by: 孙权 <sunquan25@huawei.com>
This commit is contained in:
parent
96b1627938
commit
03b3276546
@ -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
|
||||
{
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user