Home
last modified time | relevance | path

Searched refs:writer (Results 1 - 25 of 31) sorted by relevance

12

/base/update/updater/test/unittest/applypatch_test/
H A Dapplypatch_unittest.cpp74 std::unique_ptr<DataWriter> writer = DataWriter::CreateDataWriter(mode, filePath); in HWTEST_F() local
75 EXPECT_NE(writer, nullptr); in HWTEST_F()
76 bool ret = writer->Write(addr, 0, nullptr); in HWTEST_F()
80 ret = writer->Write(addr, 0, nullptr); in HWTEST_F()
83 ret = writer->Write(buf, BUFFER_LEN, nullptr); in HWTEST_F()
92 ret = writer->Write(buf, BUFFER_LEN, nullptr); in HWTEST_F()
104 DataWriter::ReleaseDataWriter(writer); in HWTEST_F()
110 std::unique_ptr<DataWriter> writer = nullptr; in HWTEST_F() local
113 EXPECT_EQ(writer, nullptr); in HWTEST_F()
116 writer in HWTEST_F()
[all...]
H A 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/telephony/telephony_data/opkey_version/src/
H A Dopkey_version_result_set_bridge.cpp36 bool OpkeyVersionResultSetBridge::FillBlock(DataShare::ResultSetBridge::Writer &writer) in FillBlock() argument
38 int statusAlloc = writer.AllocRow(); in FillBlock()
42 int keyStatus = writer.Write(KEY_COLUMN, INFO_KEY.c_str(), INFO_KEY.size() + 1); in FillBlock()
46 int valueStatus = writer.Write(VALUE_COLUMN, opkeyInfo_.c_str(), opkeyInfo_.size() + 1); in FillBlock()
53 int OpkeyVersionResultSetBridge::OnGo(int32_t start, int32_t target, DataShare::ResultSetBridge::Writer &writer) in OnGo() argument
59 return FillBlock(writer); in OnGo()
/base/update/updater/services/diffpatch/patch/
H A 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, bonusDat in ZipImagePatch()
101 Lz4ImagePatch(UpdatePatchWriterPtr writer, const std::vector<uint8_t> &bonusData) Lz4ImagePatch() argument
119 CompressedFileRestore(Hpackage::PkgManager::FileInfoPtr fileInfo, UpdatePatchWriterPtr writer) CompressedFileRestore() argument
[all...]
H A Dupdate_patch.cpp28 ImageProcessor writer, const std::string& expected) in ApplyImagePatch()
30 if (writer == nullptr) { in ApplyImagePatch()
34 std::unique_ptr<ImagePatchWriter> patchWriter = std::make_unique<ImagePatchWriter>(writer, expected, ""); in ApplyImagePatch()
36 PATCH_LOGE("ApplyImagePatch : Failed to create patch writer"); in ApplyImagePatch()
41 PATCH_LOGE("ApplyImagePatch : Failed to init patch writer"); 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()
72 if (!PreCheck(param, writer)) { in ApplyImagePatch()
92 imagePatch = std::make_unique<NormalImagePatch>(writer); in ApplyImagePatch()
27 ApplyImagePatch(const PatchParam &param, const std::vector<uint8_t> &bonusData, ImageProcessor writer, const std::string& expected) ApplyImagePatch() argument
69 ApplyImagePatch(const PatchParam &param, UpdatePatchWriterPtr writer, const std::vector<uint8_t> &bonusData) ApplyImagePatch() argument
130 ApplyBlockPatch(const PatchBuffer &patchInfo, const BlockBuffer &oldInfo, UpdatePatchWriterPtr writer) ApplyBlockPatch() argument
161 ApplyBlockPatch(const PatchBuffer &patchInfo, const BlockBuffer &oldInfo, ImageProcessor writer, const std::string& expected) ApplyBlockPatch() argument
212 ApplyBlockPatch(const PatchBuffer &patchInfo, Hpackage::PkgManager::StreamPtr stream, UpdatePatchWriterPtr writer) ApplyBlockPatch() argument
239 std::unique_ptr<FilePatchWriter> writer = std::make_unique<FilePatchWriter>(newName); ApplyPatch() local
[all...]
H A Dblocks_patch.h69 Hpackage::PkgManager::StreamPtr stream, UpdatePatchWriterPtr writer) in BlocksStreamPatch()
70 : BlocksPatch(patchInfo), stream_(stream), writer_(writer) {} in BlocksStreamPatch()
68 BlocksStreamPatch(const PatchBuffer &patchInfo, Hpackage::PkgManager::StreamPtr stream, UpdatePatchWriterPtr writer) BlocksStreamPatch() argument
/base/hiviewdfx/hiview/plugins/event_store/event_export/task/export/
H A Devent_write_handler.cpp29 auto writer = GetEventWriter(sysEvent->version, writeReq); in HandleRequest() local
30 if (!writer->AppendEvent(sysEvent->domain, sysEvent->name, sysEvent->eventStr)) { in HandleRequest()
31 HIVIEW_LOGE("failed to append event to event writer"); in HandleRequest()
39 for (const auto& writer : allJsonFileWriters_) { in HandleRequest()
40 if (writer.second == nullptr) { in HandleRequest()
43 if (!writer.second->Write()) { in HandleRequest()
59 HIVIEW_LOGI("create json file writer with version %{public}s", sysVersion.c_str()); in GetEventWriter()
87 for (const auto& writer : allJsonFileWriters_) { in Rollback()
88 if (writer.second == nullptr) { in Rollback()
91 writer in Rollback()
[all...]
/base/update/updater/services/include/patch/
H A 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/update/updater/test/unittest/diffpatch/
H A Dimage_patch_unittest.cpp29 TestCompressedImagePatch(UpdatePatchWriterPtr writer, const std::vector<uint8_t> &bonusData) in TestCompressedImagePatch() argument
30 : CompressedImagePatch(writer, bonusData) {} in TestCompressedImagePatch()
76 UpdatePatchWriterPtr writer = nullptr; in HWTEST_F() local
78 TestCompressedImagePatch test(writer, bonusData); in HWTEST_F()
91 UpdatePatchWriterPtr writer = nullptr; in HWTEST_F() local
93 TestCompressedImagePatch test(writer, bonusData); in HWTEST_F()
117 UpdatePatchWriterPtr writer { nullptr }; in HWTEST_F()
118 std::unique_ptr<ImagePatch> imagePatch = std::make_unique<ZipImagePatch>(writer, bonusData); in HWTEST_F()
H A 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()
126 PATCH_LOGE("Failed to create writer"); 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 in TestApplyBlockPatch()
[all...]
/base/global/i18n_lite/tools/i18n-dat-tool/src/main/java/ohos/global/i18n/
H A DUtils.java249 BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(dst), in generateTypesFile()
255 writer.write(line + System.lineSeparator()); in generateTypesFile()
259 writer.write(generateAvailableDateTimeFormatPattern(configItems)); in generateTypesFile()
263 writer.write(line + System.lineSeparator()); in generateTypesFile()
351 BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(dst), "utf-8"))) { in generateI18nPatternFile()
359 writer.write(line + System.lineSeparator()); in generateI18nPatternFile()
363 writer.write(generateI18nPatternMacros(items)); in generateI18nPatternFile()
364 writer.write(System.lineSeparator()); in generateI18nPatternFile()
365 writer.write("namespace OHOS{" + System.lineSeparator()); in generateI18nPatternFile()
366 writer in generateI18nPatternFile()
[all...]
/base/update/updater/services/flashd/
H A Dpartition.h30 Partition(const std::string &devName, std::unique_ptr<FlashdWriter> writer) : devName_(devName), in Partition() argument
31 writer_(std::move(writer)) {} in Partition()
/base/update/updater/services/flashd/daemon/
H A 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/services/updater_binary/
H A Dupdate_processor.cpp122 DataWriter *writer = static_cast<DataWriter *>(p); in RawImageWriteProcessor() local
123 if (writer == nullptr) { in RawImageWriteProcessor()
124 LOG(ERROR) << "Data writer is null"; in RawImageWriteProcessor()
133 bool ret = writer->Write(const_cast<uint8_t*>(buffer.buffer), size, nullptr); in RawImageWriteProcessor()
141 writer->GetUpdaterEnv()->PostMessage("set_progress", std::to_string((float)readSize_ / totalSize_)); in RawImageWriteProcessor()
148 const std::unique_ptr<DataWriter> &writer, [[maybe_unused]] uint64_t partitionSize, Uscript::UScriptEnv &env) in WriteRawImage()
169 partitionName, RawImageWriteProcessor, writer.get()); in WriteRawImage()
222 std::unique_ptr<DataWriter> writer = DataWriter::CreateDataWriter(WRITE_RAW, writePath, in Execute() local
224 if (writer == nullptr) { in Execute()
225 LOG(ERROR) << "Error to create writer"; in Execute()
147 WriteRawImage(const std::string &partitionName, const std::unique_ptr<DataWriter> &writer, [[maybe_unused]] uint64_t partitionSize, Uscript::UScriptEnv &env) WriteRawImage() argument
[all...]
/base/update/updater/test/unittest/flashd_test/
H A Dflashd_unittest.cpp210 std::unique_ptr<FlashdWriter> writer = FlashdImageWriter::GetInstance().GetWriter(partName, buffer, bufferSize); in HWTEST_F() local
211 if (writer == nullptr) { in HWTEST_F()
212 std::cout << "writer is nullptr"; in HWTEST_F()
214 EXPECT_NE(nullptr, writer); in HWTEST_F()
217 writer = FlashdImageWriter::GetInstance().GetWriter(partName, buffer, bufferSize); in HWTEST_F()
218 EXPECT_NE(nullptr, writer); in HWTEST_F()
220 int ret = writer->Write(partName, reinterpret_cast<uint8_t*>(temp.data()), temp.size()); in HWTEST_F()
228 std::unique_ptr<FlashdWriterRaw> writer = std::make_unique<FlashdWriterRaw>(); in HWTEST_F() local
229 if (writer == nullptr) { in HWTEST_F()
230 std::cout << "writer i in HWTEST_F()
273 std::unique_ptr<FlashdWriter> writer = nullptr; HWTEST_F() local
[all...]
/base/update/updater/services/applypatch/
H A Dcommand_process.cpp50 writerThreadInfo->writer = std::make_unique<BlockWriter>(params.GetFileDescriptor(), bs); in Execute()
52 while (writerThreadInfo->writer != nullptr) { in Execute()
55 LOG(ERROR) << "writer thread could not write blocks. " << bs.TotalBlockSize() * H_BLOCK_SIZE - in Execute()
56 writerThreadInfo->writer->GetTotalWritten() << " bytes lost"; in Execute()
58 writerThreadInfo->writer.reset(); in Execute()
59 writerThreadInfo->writer = nullptr; in Execute()
62 LOG(DEBUG) << "Writer already written " << writerThreadInfo->writer->GetTotalWritten() << " byte(s)"; in Execute()
67 writerThreadInfo->writer.reset(); in Execute()
H A Dblock_set.cpp390 std::unique_ptr<BlockWriter> writer = std::make_unique<BlockWriter>(cmd.GetFileDescriptor(), *this); in WriteDiffToBlock() local
391 if (writer.get() == nullptr) { in WriteDiffToBlock()
392 LOG(ERROR) << "Cannot create block writer, pkgdiff patch abort!"; in WriteDiffToBlock()
397 return (writer->Write(data.buffer, size, nullptr)) ? 0 : -1; in WriteDiffToBlock()
399 writer.reset(); in WriteDiffToBlock()
407 std::unique_ptr<BlockWriter> writer = std::make_unique<BlockWriter>(cmd.GetFileDescriptor(), *this); in WriteDiffToBlock() local
408 if (writer.get() == nullptr) { in WriteDiffToBlock()
409 LOG(ERROR) << "Cannot create block writer, pkgdiff patch abort!"; in WriteDiffToBlock()
414 return (writer->Write(data.buffer, size, nullptr)) ? 0 : -1; in WriteDiffToBlock()
416 writer in WriteDiffToBlock()
[all...]
H A Ddata_writer.cpp66 LOG(WARNING) << "Unsupported writer mode."; in CreateDataWriter()
97 LOG(ERROR) << "create writer failed, can not find writer mode: " << mode; in CreateDataWriter()
101 void DataWriter::ReleaseDataWriter(std::unique_ptr<DataWriter> &writer) in ReleaseDataWriter() argument
103 writer.reset(); in ReleaseDataWriter()
113 LOG(ERROR) << "register writer failed, mode: " << mode; in RegisterDataWriter()
/base/update/updater/services/diffpatch/patch_shared/
H A Dpatch_shared.cpp172 LOG(WARNING) << "New data writer thread is still available..."; in ExecuteTransferCommand()
218 while (info->writer == nullptr) { in ExtractNewDataFunc()
220 LOG(WARNING) << "writer is not ready to write."; in ExtractNewDataFunc()
227 size_t toWrite = std::min(size, info->writer->GetBlocksSize() - info->writer->GetTotalWritten()); in ExtractNewDataFunc()
232 bool ret = info->writer->Write(addr, toWrite, nullptr); in ExtractNewDataFunc()
242 if (info->writer->IsWriteDone()) { in ExtractNewDataFunc()
244 info->writer.reset(); in ExtractNewDataFunc()
256 if (info->writer != nullptr) { in CondBroadcast()
290 LOG(DEBUG) << "new data writer endin in UnpackNewDataFunc()
[all...]
/base/telephony/telephony_data/opkey_version/include/
H A Dopkey_version_result_set_bridge.h29 int OnGo(int32_t startRowIndex, int32_t targetRowIndex, DataShare::ResultSetBridge::Writer &writer) override;
/base/update/updater/services/flow_update/update_bin/
H A Dbin_flow_update.cpp168 updateInfo_.writer = GetDataWriter(updateInfo_.componentNames[procCompIndex_]); in BinUpdatePreWrite()
169 if (updateInfo_.writer == nullptr) { in BinUpdatePreWrite()
191 if (!updateInfo_.writer->Write(data, writeLen, nullptr)) { in BinUpdateDoWrite()
H A Dcomponent_processor.cpp174 LOG(ERROR) << "Error to create writer"; in PreProcess()
267 DataWriter *writer = static_cast<DataWriter *>(p); in RawImageWriteProcessor() local
268 if (writer == nullptr) { in RawImageWriteProcessor()
269 LOG(ERROR) << "Data writer is null"; in RawImageWriteProcessor()
278 bool ret = writer->Write(const_cast<uint8_t*>(buffer.buffer), size, nullptr); in RawImageWriteProcessor()
282 writer->GetUpdaterEnv()->PostMessage(UPDATER_RETRY_TAG, IO_FAILED_REBOOT); in RawImageWriteProcessor()
304 LOG(ERROR) << "Error to create writer"; in PreProcess()
352 DataWriter *writer = static_cast<DataWriter *>(p); in SkipImageWriteProcessor() local
353 if (writer == nullptr) { in SkipImageWriteProcessor()
354 LOG(ERROR) << "Data writer i in SkipImageWriteProcessor()
[all...]
H A Dbin_flow_update.h43 std::unique_ptr<DataWriter> writer; member
/base/update/updater/services/include/applypatch/
H A Ddata_writer.h46 static void ReleaseDataWriter(std::unique_ptr<DataWriter> &writer);
H A Dtransfer_manager.h34 std::unique_ptr<BlockWriter> writer; member

Completed in 11 milliseconds

12