/base/update/updater/services/package/pkg_package/ |
D | packages_info.cpp | 84 PkgManager::StreamPtr outStream = nullptr; in GetOTAVersion() local 91 int32_t ret = manager->CreatePkgStream(outStream, versionList, info->unpackedSize, in GetOTAVersion() 93 if (outStream == nullptr || ret == -1) { in GetOTAVersion() 97 ret = manager->ExtractFile(versionList, outStream); in GetOTAVersion() 100 manager->ClosePkgStream(outStream); in GetOTAVersion() 104 ret = outStream->GetBuffer(data); in GetOTAVersion() 107 manager->ClosePkgStream(outStream); in GetOTAVersion() 112 manager->ClosePkgStream(outStream); in GetOTAVersion() 125 PkgManager::StreamPtr outStream = nullptr; in GetBoardID() local 131 int32_t ret = manager->CreatePkgStream(outStream, boardIdName, info->unpackedSize, in GetBoardID() [all …]
|
D | pkg_lz4file.cpp | 50 PkgStreamPtr outStream = pkgFile_->GetPkgStream(); in Pack() local 55 if (algorithm == nullptr || outStream == nullptr || inStream == nullptr) { in Pack() 65 int32_t ret = algorithm->Pack(inStream, outStream, context); in Pack() 77 int32_t Lz4FileEntry::Unpack(PkgStreamPtr outStream) in Unpack() argument 86 if (outStream == nullptr || inStream == nullptr) { in Unpack() 95 int32_t ret = algorithm->Unpack(inStream, outStream, context); in Unpack() 104 outStream->Flush(fileInfo_.fileInfo.unpackedSize); in Unpack()
|
D | pkg_gzipfile.cpp | 66 PkgStreamPtr outStream = pkgFile_->GetPkgStream(); in EncodeHeader() local 67 PKG_CHECK(outStream != nullptr, return PKG_INVALID_PARAM, in EncodeHeader() 106 int32_t ret = outStream->Write(buffer, offset, startOffset); in EncodeHeader() 115 PkgStreamPtr outStream = pkgFile_->GetPkgStream(); in Pack() local 120 if (algorithm == nullptr || outStream == nullptr || inStream == nullptr) { in Pack() 130 int32_t ret = algorithm->Pack(inStream, outStream, context); in Pack() 146 …ret = outStream->Write(buffer, BLOCK_SIZE, fileInfo_.fileInfo.dataOffset + fileInfo_.fileInfo.pack… in Pack() 157 int32_t GZipFileEntry::Unpack(PkgStreamPtr outStream) in Unpack() argument 167 PKG_CHECK(outStream != nullptr && inStream != nullptr, return PKG_INVALID_PARAM, in Unpack() 174 int32_t ret = algorithm->Unpack(inStream, outStream, context); in Unpack() [all …]
|
D | pkg_upgradefile.cpp | 373 PkgStreamPtr outStream = pkgFile_->GetPkgStream(); in EncodeHeader() local 374 PKG_CHECK(outStream != nullptr && inStream != nullptr, return PKG_INVALID_PARAM, in EncodeHeader() 399 ret = outStream->Write(buffer, sizeof(comp), startOffset); in EncodeHeader() 411 PkgStreamPtr outStream = pkgFile_->GetPkgStream(); in Pack() local 412 if (algorithm == nullptr || outStream == nullptr || inStream == nullptr) { in Pack() 426 int32_t ret = algorithm->Pack(inStream, outStream, context); in Pack() 486 int32_t UpgradeFileEntry::Unpack(PkgStreamPtr outStream) in Unpack() argument 495 if (outStream == nullptr || inStream == nullptr) { in Unpack() 509 ret = algorithm->Unpack(inStream, outStream, context); in Unpack() 516 outStream->Flush(fileInfo_.fileInfo.unpackedSize); in Unpack()
|
D | pkg_zipfile.cpp | 250 PkgStreamPtr outStream = pkgFile_->GetPkgStream(); in Pack() local 253 …PKG_CHECK(algorithm != nullptr && outStream != nullptr && inStream != nullptr, return PKG_INVALID_… in Pack() 277 int32_t ret = algorithm->Pack(inStream, outStream, context); in Pack() 287 ret = outStream->Write(buffer, headerLen, startOffset); in Pack() 292 ret = EncodeDataDescriptor(outStream, in Pack() 554 int32_t ZipFileEntry::Unpack(PkgStreamPtr outStream) in Unpack() argument 563 if (outStream == nullptr || inStream == nullptr) { in Unpack() 572 int32_t ret = algorithm->Unpack(inStream, outStream, context); in Unpack() 579 outStream->Flush(fileInfo_.fileInfo.unpackedSize); in Unpack()
|
/base/update/updater/services/updater_binary/ |
D | update_partitions.cpp | 113 Hpackage::PkgManager::StreamPtr outStream = nullptr; in Execute() local 121 ret = env.GetPkgManager()->CreatePkgStream(outStream, in Execute() 123 …UPDATER_ERROR_CHECK(ret == USCRIPT_SUCCESS && outStream != nullptr, "Error to create output stream… in Execute() 125 ret = env.GetPkgManager()->ExtractFile(filePath, outStream); in Execute() 127 env.GetPkgManager()->ClosePkgStream(outStream); return USCRIPT_ERROR_EXECUTE); in Execute() 131 env.GetPkgManager()->ClosePkgStream(outStream); in Execute() 138 env.GetPkgManager()->ClosePkgStream(outStream); in Execute() 144 env.GetPkgManager()->ClosePkgStream(outStream); in Execute() 149 env.GetPkgManager()->ClosePkgStream(outStream); in Execute() 153 env.GetPkgManager()->ClosePkgStream(outStream); in Execute()
|
D | update_image_block.cpp | 249 Hpackage::PkgManager::StreamPtr outStream = nullptr; in ExtractDiffPackageAndLoad() local 257 int32_t ret = env.GetPkgManager()->CreatePkgStream(outStream, in ExtractDiffPackageAndLoad() 259 if (outStream == nullptr) { in ExtractDiffPackageAndLoad() 264 ret = env.GetPkgManager()->ExtractFile(infos.partitionName, outStream); in ExtractDiffPackageAndLoad() 267 env.GetPkgManager()->ClosePkgStream(outStream); in ExtractDiffPackageAndLoad() 270 env.GetPkgManager()->ClosePkgStream(outStream); in ExtractDiffPackageAndLoad() 287 …Hpackage::PkgManager::StreamPtr &outStream, const std::vector<std::string> &lines, Uscript::UScrip… in DoExecuteUpdateBlock() argument 292 env.GetPkgManager()->ClosePkgStream(outStream); in DoExecuteUpdateBlock() 299 env.GetPkgManager()->ClosePkgStream(outStream); in DoExecuteUpdateBlock() 326 Hpackage::PkgManager::StreamPtr outStream = nullptr; in ExecuteUpdateBlock() local [all …]
|
D | update_processor.cpp | 159 Hpackage::PkgManager::StreamPtr outStream = nullptr; in Execute() local 170 ret = env.GetPkgManager()->CreatePkgStream(outStream, in Execute() 172 …UPDATER_ERROR_CHECK(ret == USCRIPT_SUCCESS && outStream != nullptr, "Error to create output stream… in Execute() 175 ret = env.GetPkgManager()->ExtractFile(partitionName, outStream); in Execute() 177 env.GetPkgManager()->ClosePkgStream(outStream); in Execute() 182 env.GetPkgManager()->ClosePkgStream(outStream); in Execute()
|
D | update_image_patch.cpp | 129 Hpackage::PkgManager::StreamPtr outStream = nullptr; in GetPatchFile() local 131 int32_t ret = env.GetPkgManager()->CreatePkgStream(outStream, in GetPatchFile() 133 if (ret != PKG_SUCCESS || outStream == nullptr) { in GetPatchFile() 138 ret = env.GetPkgManager()->ExtractFile(para.partName, outStream); in GetPatchFile() 139 env.GetPkgManager()->ClosePkgStream(outStream); in GetPatchFile()
|
/base/update/updater/services/package/pkg_algorithm/ |
D | pkg_algo_deflate.h | 37 int32_t Pack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, 41 const PkgStreamPtr outStream, PkgAlgorithmContext &context) override; 45 const PkgStreamPtr outStream, DigestAlgorithm::DigestAlgorithmPtr algorithm); 51 int32_t DeflateData(const PkgStreamPtr outStream,
|
D | pkg_algo_deflate.cpp | 26 int32_t PkgAlgoDeflate::DeflateData(const PkgStreamPtr outStream, z_stream &zstream, int32_t flush, in DeflateData() argument 39 int32_t ret1 = outStream->Write(outBuffer, deflateLen, destOffset); in DeflateData() 55 int32_t PkgAlgoDeflate::Pack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, in Pack() argument 60 …PKG_CHECK(inStream != nullptr && outStream != nullptr, return PKG_INVALID_PARAM, "Param context nu… in Pack() 84 …ret = DeflateData(outStream, zstream, ((remainSize == 0) ? Z_FINISH : Z_NO_FLUSH), outBuffer, dest… in Pack() 97 const PkgStreamPtr outStream, DigestAlgorithm::DigestAlgorithmPtr algorithm) in UnpackCalculate() argument 127 ret = outStream->Write(outBuffer, inflateLen, destOffset); in UnpackCalculate() 149 int32_t PkgAlgoDeflate::Unpack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, in Unpack() argument 157 if (inStream == nullptr || outStream == nullptr) { in Unpack() 162 return UnpackCalculate(context, inStream, outStream, algorithm); in Unpack()
|
D | pkg_algo_lz4.h | 39 int32_t Pack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, 43 const PkgStreamPtr outStream, PkgAlgorithmContext &context) override; 77 const PkgStreamPtr outStream, PkgAlgorithmContext &) override; 79 int32_t Unpack(const PkgStreamPtr inStream, const PkgStreamPtr outStream,
|
D | pkg_algo_lz4.cpp | 60 int32_t PkgAlgorithmBlockLz4::Pack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, in Pack() argument 63 …PKG_CHECK(inStream != nullptr && outStream != nullptr, return PKG_INVALID_PARAM, "Param context nu… in Pack() 81 int32_t ret = outStream->Write(outBuffer, sizeof(LZ4B_MAGIC_NUMBER), destOffset); in Pack() 97 ret = outStream->Write(outBuffer, outSize + LZ4B_REVERSED_LEN, destOffset); in Pack() 110 int32_t PkgAlgorithmBlockLz4::Unpack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, in Unpack() argument 113 …PKG_CHECK(inStream != nullptr && outStream != nullptr, return PKG_INVALID_PARAM, "Param context nu… in Unpack() 151 ret = outStream->Write(outBuffer, decodeSize, destOffset); in Unpack() 197 int32_t PkgAlgorithmLz4::Pack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, in Pack() argument 200 …PKG_CHECK(inStream != nullptr && outStream != nullptr, return PKG_INVALID_PARAM, "Param context nu… in Pack() 220 ret = outStream->Write(outBuffer, dataLen, destOffset); in Pack() [all …]
|
D | pkg_algorithm.cpp | 59 int32_t PkgAlgorithm::Pack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, in Pack() argument 82 ret = outStream->Write(buffer, readLen, destOffset); in Pack() 106 int32_t PkgAlgorithm::Unpack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, in Unpack() argument 128 ret = outStream->Write(buffer, readLen, destOffset); in Unpack()
|
D | pkg_algorithm.h | 71 virtual int32_t Pack(const PkgStreamPtr inStream, const PkgStreamPtr outStream, 73 virtual int32_t Unpack(const PkgStreamPtr inStream, const PkgStreamPtr outStream,
|
/base/update/updater/services/diffpatch/bzip2/ |
D | lz4_adapter.h | 36 …Lz4Adapter(UpdatePatchWriterPtr outStream, size_t offset, const Hpackage::PkgManager::FileInfoPtr … 53 Lz4FrameAdapter(UpdatePatchWriterPtr outStream, size_t offset, in Lz4FrameAdapter() argument 54 … const Hpackage::PkgManager::FileInfoPtr fileInfo) : Lz4Adapter(outStream, offset, fileInfo) {} in Lz4FrameAdapter() 71 Lz4BlockAdapter(UpdatePatchWriterPtr outStream, size_t offset, in Lz4BlockAdapter() argument 72 …const Hpackage::PkgManager::FileInfoPtr fileInfo) : Lz4FrameAdapter(outStream, offset, fileInfo) {} in Lz4BlockAdapter()
|
D | zip_adapter.h | 29 …ZipAdapter(UpdatePatchWriterPtr outStream, size_t offset, const Hpackage::PkgManager::FileInfoPtr …
|
D | zip_adapter.cpp | 24 ZipAdapter::ZipAdapter(UpdatePatchWriterPtr outStream, size_t offset, const PkgManager::FileInfoPtr… in ZipAdapter() argument 25 : DeflateAdapter(), outStream_(outStream), offset_(offset) in ZipAdapter()
|
/base/update/updater/interfaces/kits/packages/ |
D | package.cpp | 228 PkgManager::StreamPtr outStream = nullptr; in ExtraPackageDir() local 229 …manager->CreatePkgStream(outStream, std::string(outPath) + components[i], 0, PkgStream::PkgStreamT… in ExtraPackageDir() 230 if (outStream == nullptr) { in ExtraPackageDir() 235 manager->ExtractFile(components[i], outStream); in ExtraPackageDir() 236 manager->ClosePkgStream(outStream); in ExtraPackageDir() 259 PkgManager::StreamPtr outStream = nullptr; in ExtraPackageFile() local 260 …manager->CreatePkgStream(outStream, std::string(outPath) + file, 0, PkgStream::PkgStreamType_Write… in ExtraPackageFile() 261 if (outStream == nullptr) { in ExtraPackageFile() 266 manager->ExtractFile(file, outStream); in ExtraPackageFile() 268 manager->ClosePkgStream(outStream); in ExtraPackageFile()
|
/base/update/updater/services/ptable_parse/ |
D | ptable_manager.cpp | 278 Hpackage::PkgManager::StreamPtr outStream = nullptr; in GetPtableBufferFromPkg() local 279 (void)pkgManager->CreatePkgStream(outStream, ptableName, info->unpackedSize, in GetPtableBufferFromPkg() 281 if (outStream == nullptr) { in GetPtableBufferFromPkg() 286 if (pkgManager->ExtractFile(ptableName, outStream) != Hpackage::PKG_SUCCESS) { in GetPtableBufferFromPkg() 288 pkgManager->ClosePkgStream(outStream); in GetPtableBufferFromPkg() 294 outStream->GetBuffer(buffer, bufSize); in GetPtableBufferFromPkg() 297 pkgManager->ClosePkgStream(outStream); in GetPtableBufferFromPkg() 300 pkgManager->ClosePkgStream(outStream); in GetPtableBufferFromPkg()
|
/base/update/updater/test/unittest/package/ |
D | pkg_test.h | 109 PkgManager::StreamPtr outStream = nullptr; in ExtractFile() local 111 …manager->CreatePkgStream(outStream, TEST_PATH_TO + components[i], 0, PkgStream::PkgStreamType_Writ… in ExtractFile() 112 EXPECT_NE(nullptr, outStream); in ExtractFile() 113 if (outStream == nullptr) { in ExtractFile() 116 int ret = manager->ExtractFile(components[i], outStream); in ExtractFile() 118 manager->ClosePkgStream(outStream); in ExtractFile()
|
D | pkg_manager_unittest.cpp | 410 …ue_ptr<Hpackage::PkgStream, std::function<void(Hpackage::PkgManager::StreamPtr)>> outStream(stream, in TestDecompressLz4() local 414 PKG_CHECK(outStream != nullptr, close(fd); return -1, "Can not create stream "); in TestDecompressLz4() 422 int32_t ret = pkgManager_->DecompressBuffer(&lz4Info.fileInfo, buffer, outStream.get()); in TestDecompressLz4() 502 …ue_ptr<Hpackage::PkgStream, std::function<void(Hpackage::PkgManager::StreamPtr)>> outStream(stream, in TestDecompressGzip() local 506 PKG_CHECK(outStream != nullptr, close(fd); return -1, "Can not create stream "); in TestDecompressGzip() 517 int32_t ret = pkgManager_->DecompressBuffer(&zipInfo.fileInfo, data, outStream.get()); in TestDecompressGzip() 554 …ue_ptr<Hpackage::PkgStream, std::function<void(Hpackage::PkgManager::StreamPtr)>> outStream(stream, in TestCompressBuffer() local 558 PKG_CHECK(outStream != nullptr, return -1, "Can not create stream "); in TestCompressBuffer() 560 int32_t ret = pkgManager_->CompressBuffer(&info, buffer, outStream.get()); in TestCompressBuffer()
|
/base/update/updater/services/script/script_manager/ |
D | script_managerImpl.cpp | 124 PkgManager::StreamPtr outStream = nullptr; in ExtractAndExecuteScript() local 126 …int32_t ret = manager->CreatePkgStream(outStream, path + "/" + scriptName, 0, PkgStream::PkgStream… in ExtractAndExecuteScript() 128 ret = manager->ExtractFile(scriptName, outStream); in ExtractAndExecuteScript() 131 ret = ScriptInterpreter::ExecuteScript(this, outStream); in ExtractAndExecuteScript() 132 manager->ClosePkgStream(outStream); in ExtractAndExecuteScript()
|
/base/update/updater/services/diffpatch/diff/ |
D | update_diff.cpp | 103 Hpackage::PkgManager::StreamPtr outStream = nullptr; in Extract() local 104 int32_t ret = pkgManager_->CreatePkgStream(outStream, fileName, in Extract() 121 ret = pkgManager_->ExtractFile(fileName, outStream); in Extract() 122 pkgManager_->ClosePkgStream(outStream); in Extract()
|
/base/update/updater/services/ |
D | updater.cpp | 61 PkgManager::StreamPtr outStream = nullptr; in ExtractUpdaterBinary() local 62 int32_t ret = manager->CreatePkgStream(outStream, GetWorkPath() + updaterBinary, in ExtractUpdaterBinary() 69 ret = manager->ExtractFile(updaterBinary, outStream); in ExtractUpdaterBinary() 70 manager->ClosePkgStream(outStream); in ExtractUpdaterBinary()
|