Home
last modified time | relevance | path

Searched refs:writer (Results 1 – 25 of 28) sorted by relevance

12

/base/update/updater/test/unittest/applypatch_test/
Dapplypatch_unittest.cpp74 std::unique_ptr<DataWriter> writer = DataWriter::CreateDataWriter(mode, filePath); variable
75 EXPECT_NE(writer, nullptr);
76 bool ret = writer->Write(addr, 0, nullptr);
80 ret = writer->Write(addr, 0, nullptr);
83 ret = writer->Write(buf, BUFFER_LEN, nullptr);
92 ret = writer->Write(buf, BUFFER_LEN, nullptr);
104 DataWriter::ReleaseDataWriter(writer);
110 std::unique_ptr<DataWriter> writer = nullptr; variable
113 EXPECT_EQ(writer, nullptr);
116 writer = DataWriter::CreateDataWriter(mode, "", DataWriter::GetUpdaterEnv());
[all …]
Dimagepatch_unittest.h82 std::unique_ptr<FileWriter> writer = std::make_unique<FileWriter>(fd, targetBlk); in RunImageApplyPatch() local
86 bool ret = writer->Write(data.buffer, size, nullptr); in RunImageApplyPatch()
/base/update/updater/services/diffpatch/patch/
Dimage_patch.h29 explicit ImagePatch(UpdatePatchWriterPtr writer) : writer_(writer) {} in ImagePatch() argument
51 explicit RowImagePatch(UpdatePatchWriterPtr writer) : ImagePatch(writer) {} in RowImagePatch() argument
59 explicit NormalImagePatch(UpdatePatchWriterPtr writer) : ImagePatch(writer) {} in NormalImagePatch() argument
67 CompressedImagePatch(UpdatePatchWriterPtr writer, const std::vector<uint8_t> &bonusData) in CompressedImagePatch() argument
68 : ImagePatch(writer), bonusData_(bonusData) {} in CompressedImagePatch()
84 ZipImagePatch(UpdatePatchWriterPtr writer, const std::vector<uint8_t> &bonusData) in ZipImagePatch() argument
85 : CompressedImagePatch(writer, bonusData) {} in ZipImagePatch()
101 Lz4ImagePatch(UpdatePatchWriterPtr writer, const std::vector<uint8_t> &bonusData) in Lz4ImagePatch() argument
102 : CompressedImagePatch(writer, bonusData) {} in Lz4ImagePatch()
119 CompressedFileRestore(Hpackage::PkgManager::FileInfoPtr fileInfo, UpdatePatchWriterPtr writer) in CompressedFileRestore() argument
[all …]
Dupdate_patch.cpp28 ImageProcessor writer, const std::string& expected) in ApplyImagePatch() argument
30 if (writer == nullptr) { in ApplyImagePatch()
34 …std::unique_ptr<ImagePatchWriter> patchWriter = std::make_unique<ImagePatchWriter>(writer, expecte… in ApplyImagePatch()
52 bool UpdateApplyPatch::PreCheck(const PatchParam &param, const UpdatePatchWriterPtr writer) in PreCheck() argument
54 if (writer == nullptr) { in PreCheck()
70 UpdatePatchWriterPtr writer, const std::vector<uint8_t> &bonusData) in ApplyImagePatch() argument
72 if (!PreCheck(param, writer)) { in ApplyImagePatch()
92 imagePatch = std::make_unique<NormalImagePatch>(writer); in ApplyImagePatch()
95 imagePatch = std::make_unique<RowImagePatch>(writer); in ApplyImagePatch()
98 … imagePatch = std::make_unique<ZipImagePatch>(writer, ((i == 1) ? bonusData : empty)); in ApplyImagePatch()
[all …]
Dblocks_patch.h69 Hpackage::PkgManager::StreamPtr stream, UpdatePatchWriterPtr writer) in BlocksStreamPatch() argument
70 : BlocksPatch(patchInfo), stream_(stream), writer_(writer) {} in BlocksStreamPatch()
/base/update/updater/services/include/patch/
Dupdate_patch.h56 ImageProcessor writer, const std::string& expected);
58 UpdatePatchWriterPtr writer, const std::vector<uint8_t> &bonusData);
59 static bool PreCheck(const PatchParam &param, const UpdatePatchWriterPtr writer);
61 const BlockBuffer &oldInfo, UpdatePatchWriterPtr writer);
63 const BlockBuffer &oldInfo, ImageProcessor writer, const std::string& expected);
67 Hpackage::PkgManager::StreamPtr stream, UpdatePatchWriterPtr writer);
87 ImagePatchWriter(UpdateApplyPatch::ImageProcessor writer, in ImagePatchWriter() argument
89 writer_(writer), expected_(expected), partitionName_(partitionName) {} in ImagePatchWriter()
/base/global/i18n_lite/tools/i18n-dat-tool/src/main/java/ohos/global/i18n/
DUtils.java246 … BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(dst), in generateTypesFile() argument
252 writer.write(line + System.lineSeparator()); in generateTypesFile()
256 writer.write(generateAvailableDateTimeFormatPattern(configItems)); in generateTypesFile()
260 writer.write(line + System.lineSeparator()); in generateTypesFile()
348 …BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(dst), "utf-… in generateI18nPatternFile() argument
356 writer.write(line + System.lineSeparator()); in generateI18nPatternFile()
360 writer.write(generateI18nPatternMacros(items)); in generateI18nPatternFile()
361 writer.write(System.lineSeparator()); in generateI18nPatternFile()
362 writer.write("namespace OHOS{" + System.lineSeparator()); in generateI18nPatternFile()
363 writer.write("namespace I18N{" + System.lineSeparator()); in generateI18nPatternFile()
[all …]
/base/update/updater/test/unittest/diffpatch/
Ddiffpatch_unittest.cpp80 const std::string &expected, UpdatePatch::UpdateApplyPatch::ImageProcessor writer) const in TestApplyPatch()
106 ret = UpdatePatch::UpdateApplyPatch::ApplyImagePatch(param, empty, writer, expected); in TestApplyPatch()
123 std::unique_ptr<UpdatePatch::FilePatchWriter> writer = in ImgageDiffPatchFileTest2() local
125 if (writer == nullptr) { in ImgageDiffPatchFileTest2()
129 writer->Init(); in ImgageDiffPatchFileTest2()
133 return writer->Write(start, data, size); in ImgageDiffPatchFileTest2()
136 writer->Finish(); in ImgageDiffPatchFileTest2()
177 std::unique_ptr<UpdatePatch::FilePatchWriter> writer = in TestApplyBlockPatch() local
179 if (writer == nullptr) { in TestApplyBlockPatch()
183 writer->Init(); in TestApplyBlockPatch()
[all …]
/base/update/updater/services/flashd/
Dpartition.h27 Partition(const std::string &devName, std::unique_ptr<FlashdWriter> writer) : devName_(devName), in Partition() argument
28 writer_(std::move(writer)) {} in Partition()
/base/update/updater/services/applypatch/
Dcommand_process.cpp49 writerThreadInfo->writer = std::make_unique<BlockWriter>(params.GetFileDescriptor(), bs); in Execute()
51 while (writerThreadInfo->writer != nullptr) { in Execute()
55 writerThreadInfo->writer->GetTotalWritten() << " bytes lost"; in Execute()
57 writerThreadInfo->writer.reset(); in Execute()
58 writerThreadInfo->writer = nullptr; in Execute()
61 …LOG(DEBUG) << "Writer already written " << writerThreadInfo->writer->GetTotalWritten() << " byte(s… in Execute()
66 writerThreadInfo->writer.reset(); in Execute()
Ddata_writer.cpp91 void DataWriter::ReleaseDataWriter(std::unique_ptr<DataWriter> &writer) in ReleaseDataWriter() argument
93 writer.reset(); in ReleaseDataWriter()
Dblock_set.cpp396 …std::unique_ptr<BlockWriter> writer = std::make_unique<BlockWriter>(cmd.GetFileDescriptor(), *this… in WriteDiffToBlock() local
397 if (writer.get() == nullptr) { in WriteDiffToBlock()
403 return (writer->Write(data.buffer, size, nullptr)) ? 0 : -1; in WriteDiffToBlock()
405 writer.reset(); in WriteDiffToBlock()
413 …std::unique_ptr<BlockWriter> writer = std::make_unique<BlockWriter>(cmd.GetFileDescriptor(), *this… in WriteDiffToBlock() local
414 if (writer.get() == nullptr) { in WriteDiffToBlock()
420 return (writer->Write(data.buffer, size, nullptr)) ? 0 : -1; in WriteDiffToBlock()
422 writer.reset(); in WriteDiffToBlock()
/base/update/updater/services/updater_binary/
Dupdate_processor.cpp111 DataWriter *writer = static_cast<DataWriter *>(p); in RawImageWriteProcessor() local
112 if (writer == nullptr) { in RawImageWriteProcessor()
122 bool ret = writer->Write(const_cast<uint8_t*>(buffer.buffer), size, nullptr); in RawImageWriteProcessor()
130writer->GetUpdaterEnv()->PostMessage("set_progress", std::to_string((float)readSize_ / totalSize_)… in RawImageWriteProcessor()
136 …geWrite::WriteRawImage(const std::string &partitionName, const std::unique_ptr<DataWriter> &writer, in WriteRawImage() argument
158 partitionName, RawImageWriteProcessor, writer.get()); in WriteRawImage()
211 std::unique_ptr<DataWriter> writer = DataWriter::CreateDataWriter(WRITE_RAW, writePath, in Execute() local
213 if (writer == nullptr) { in Execute()
218 if (!WriteRawImage(partitionName, writer, partitionSize, env)) { in Execute()
219 DataWriter::ReleaseDataWriter(writer); in Execute()
[all …]
Dupdate_image_patch.cpp99 std::unique_ptr<DataWriter> writer = DataWriter::CreateDataWriter(WRITE_RAW, para.devPath); in ApplyPatch() local
100 if (writer.get() == nullptr) { in ApplyPatch()
108 return (writer->Write(data.buffer, size, nullptr)) ? 0 : -1; in ApplyPatch()
110 writer.reset(); in ApplyPatch()
Dupdate_image_block.cpp46 while (info->writer == nullptr) { in ExtractNewData()
55 … size_t toWrite = std::min(size, info->writer->GetBlocksSize() - info->writer->GetTotalWritten()); in ExtractNewData()
60 bool ret = info->writer->Write(addr, toWrite, nullptr); in ExtractNewData()
70 if (info->writer->IsWriteDone()) { in ExtractNewData()
72 info->writer.reset(); in ExtractNewData()
84 if (info->writer != nullptr) { in CondBroadcast()
Dupdate_processor.h63 bool WriteRawImage(const std::string &partitionName, const std::unique_ptr<DataWriter> &writer,
/base/update/updater/services/flashd/daemon/
Dflash_commander.cpp85 std::unique_ptr<FlashdWriter> writer = FlashdImageWriter::GetInstance().GetWriter( in InitPartition() local
87 if (writer == nullptr) { in InitPartition()
91 partition_ = std::make_unique<Partition>(partName, std::move(writer)); in InitPartition()
/base/update/updater/test/unittest/flashd_test/
Dflashd_unittest.cpp223 …std::unique_ptr<FlashdWriter> writer = FlashdImageWriter::GetInstance().GetWriter(partName, buffer… variable
224 if (writer == nullptr) {
227 EXPECT_NE(nullptr, writer);
230 writer = FlashdImageWriter::GetInstance().GetWriter(partName, buffer, bufferSize);
231 EXPECT_NE(nullptr, writer);
255 std::unique_ptr<FlashdWriter> writer = nullptr; variable
260 … std::unique_ptr<Partition> partition_ = std::make_unique<Partition>(partName, std::move(writer));
264 writer = FlashdImageWriter::GetInstance().GetWriter(partName, buffer, bufferSize);
268 partition_ = std::make_unique<Partition>(partName, std::move(writer));
/base/update/updater/services/flow_update/update_bin/
Dcomponent_processor.cpp263 DataWriter *writer = static_cast<DataWriter *>(p); in RawImageWriteProcessor() local
264 if (writer == nullptr) { in RawImageWriteProcessor()
274 bool ret = writer->Write(const_cast<uint8_t*>(buffer.buffer), size, nullptr); in RawImageWriteProcessor()
282writer->GetUpdaterEnv()->PostMessage("set_progress", std::to_string((float)readOffset_ / pkgFileSi… in RawImageWriteProcessor()
349 DataWriter *writer = static_cast<DataWriter *>(p); in SkipImageWriteProcessor() local
350 if (writer == nullptr) { in SkipImageWriteProcessor()
362writer->GetUpdaterEnv()->PostMessage("set_progress", std::to_string((float)readOffset_ / pkgFileSi… in SkipImageWriteProcessor()
Dbin_flow_update.cpp162 updateInfo_.writer = GetDataWriter(updateInfo_.componentNames[procCompIndex_]); in BinUpdatePreWrite()
163 if (updateInfo_.writer == nullptr) { in BinUpdatePreWrite()
185 if (!updateInfo_.writer->Write(data, writeLen, nullptr)) { in BinUpdateDoWrite()
Dbin_flow_update.h43 std::unique_ptr<DataWriter> writer; member
/base/hiviewdfx/hiview/base/event_store/utility/
DBUILD.gn26 "writer/include",
36 "writer/sys_event_doc_writer.cpp",
/base/update/updater/services/include/applypatch/
Ddata_writer.h42 static void ReleaseDataWriter(std::unique_ptr<DataWriter> &writer);
Dtransfer_manager.h35 std::unique_ptr<BlockWriter> writer; member
/base/update/updater/services/ptable_parse/
Dptable.cpp476 std::unique_ptr<DataWriter> writer = DataWriter::CreateDataWriter(WRITE_RAW, path, offset); in WriteBufferToPath() local
477 if (writer == nullptr) { in WriteBufferToPath()
481 bool ret = writer->Write(buffer, size, nullptr); in WriteBufferToPath()
484 DataWriter::ReleaseDataWriter(writer); in WriteBufferToPath()
487 DataWriter::ReleaseDataWriter(writer); in WriteBufferToPath()

12