diff --git a/frameworks/test/moduletest/mock/blob.cpp b/frameworks/test/moduletest/mock/blob.cpp index 540888d0f6f0bddd56e2f06b1af89b6658802a38..9acb0f99ddf2a48f540001de8bea5a3bd729e4fb 100644 --- a/frameworks/test/moduletest/mock/blob.cpp +++ b/frameworks/test/moduletest/mock/blob.cpp @@ -157,20 +157,6 @@ bool Blob::StartsWith(const Blob &blob) const return true; } -bool Blob::Marshalling(Parcel &parcel) const -{ - return parcel.WriteUInt8Vector(this->blob_); -} - -Blob *Blob::Unmarshalling(Parcel &parcel) -{ - std::vector blobData; - if (!parcel.ReadUInt8Vector(&blobData)) { - return nullptr; - } - return new Blob(blobData); -} - /* write blob size and data to memory buffer. return error when bufferLeftSize not enough. */ bool Blob::WriteToBuffer(uint8_t *&cursorPtr, int &bufferLeftSize) const { diff --git a/services/ans/test/unittest/mock/blob.cpp b/services/ans/test/unittest/mock/blob.cpp index 540888d0f6f0bddd56e2f06b1af89b6658802a38..9acb0f99ddf2a48f540001de8bea5a3bd729e4fb 100644 --- a/services/ans/test/unittest/mock/blob.cpp +++ b/services/ans/test/unittest/mock/blob.cpp @@ -157,20 +157,6 @@ bool Blob::StartsWith(const Blob &blob) const return true; } -bool Blob::Marshalling(Parcel &parcel) const -{ - return parcel.WriteUInt8Vector(this->blob_); -} - -Blob *Blob::Unmarshalling(Parcel &parcel) -{ - std::vector blobData; - if (!parcel.ReadUInt8Vector(&blobData)) { - return nullptr; - } - return new Blob(blobData); -} - /* write blob size and data to memory buffer. return error when bufferLeftSize not enough. */ bool Blob::WriteToBuffer(uint8_t *&cursorPtr, int &bufferLeftSize) const { diff --git a/services/distributed/test/unittest/mock/mock_blob.cpp b/services/distributed/test/unittest/mock/mock_blob.cpp index d55add0bd2799e9014613be509014c0b60be6dae..490a6675829d9bd1909c0bc3d3f3abef52de68b1 100644 --- a/services/distributed/test/unittest/mock/mock_blob.cpp +++ b/services/distributed/test/unittest/mock/mock_blob.cpp @@ -90,18 +90,5 @@ std::string Blob::ToString() const return str; } -bool Blob::Marshalling(Parcel &parcel) const -{ - return parcel.WriteUInt8Vector(this->blob_); -} - -Blob *Blob::Unmarshalling(Parcel &parcel) -{ - std::vector blobData; - if (!parcel.ReadUInt8Vector(&blobData)) { - return nullptr; - } - return new Blob(blobData); -} } // namespace DistributedKv } // namespace OHOS \ No newline at end of file diff --git a/services/test/moduletest/mock/blob.cpp b/services/test/moduletest/mock/blob.cpp index 540888d0f6f0bddd56e2f06b1af89b6658802a38..9acb0f99ddf2a48f540001de8bea5a3bd729e4fb 100644 --- a/services/test/moduletest/mock/blob.cpp +++ b/services/test/moduletest/mock/blob.cpp @@ -157,20 +157,6 @@ bool Blob::StartsWith(const Blob &blob) const return true; } -bool Blob::Marshalling(Parcel &parcel) const -{ - return parcel.WriteUInt8Vector(this->blob_); -} - -Blob *Blob::Unmarshalling(Parcel &parcel) -{ - std::vector blobData; - if (!parcel.ReadUInt8Vector(&blobData)) { - return nullptr; - } - return new Blob(blobData); -} - /* write blob size and data to memory buffer. return error when bufferLeftSize not enough. */ bool Blob::WriteToBuffer(uint8_t *&cursorPtr, int &bufferLeftSize) const {