/system/tools/aidl/ |
D | aidl_to_java.cpp | 197 c.writer << c.parcel << ".writeInt(((" << c.var << ")?(1):(0)));\n"; in WriteToParcelFor() 201 c.writer << c.parcel << ".writeBooleanArray(" << c.var << ");\n"; in WriteToParcelFor() 205 c.writer << c.parcel << ".writeByte(" << c.var << ");\n"; in WriteToParcelFor() 209 c.writer << c.parcel << ".writeByteArray(" << c.var << ");\n"; in WriteToParcelFor() 213 c.writer << c.parcel << ".writeInt(((int)" << c.var << "));\n"; in WriteToParcelFor() 217 c.writer << c.parcel << ".writeCharArray(" << c.var << ");\n"; in WriteToParcelFor() 221 c.writer << c.parcel << ".writeInt(" << c.var << ");\n"; in WriteToParcelFor() 225 c.writer << c.parcel << ".writeIntArray(" << c.var << ");\n"; in WriteToParcelFor() 229 c.writer << c.parcel << ".writeLong(" << c.var << ");\n"; in WriteToParcelFor() 233 c.writer << c.parcel << ".writeLongArray(" << c.var << ");\n"; in WriteToParcelFor() [all …]
|
D | aidl_to_cpp_common.cpp | 190 void WriteLogFor(CodeWriter& writer, const AidlTypeSpecifier& type, const std::string& name, in WriteLogFor() argument 199 writer << log << " = Json::Value(Json::arrayValue);\n"; in WriteLogFor() 200 writer << "for (const auto& v: " << var_object_expr << ") " << log << ".append("; in WriteLogFor() 201 info.toJsonValueExpr(writer, "v", isNdk); in WriteLogFor() 202 writer << ");"; in WriteLogFor() 204 writer << log << " = "; in WriteLogFor() 205 info.toJsonValueExpr(writer, var_object_expr, isNdk); in WriteLogFor() 206 writer << ";"; in WriteLogFor() 208 writer << "\n"; in WriteLogFor() 211 void WriteLogForArguments(CodeWriterPtr& writer, const AidlArgument& a, bool isServer, in WriteLogForArguments() argument [all …]
|
D | code_writer_unittest.cpp | 32 CodeWriter& writer = *ptr; in TEST() local 33 writer << "Write this"; in TEST() 34 writer.Close(); in TEST() 41 CodeWriter& writer = *ptr; in TEST() local 42 writer << "Write this " << "and that"; in TEST() 43 writer.Close(); in TEST()
|
/system/tools/sysprop/ |
D | CppGen.cpp | 252 CodeWriter writer(kIndent); in GenerateHeader() local 254 writer.Write("%s", kGeneratedFileFooterComments); in GenerateHeader() 256 writer.Write("#pragma once\n\n"); in GenerateHeader() 257 writer.Write("%s", kCppHeaderIncludes); in GenerateHeader() 260 writer.Write("namespace %s {\n\n", cpp_namespace.c_str()); in GenerateHeader() 271 writer.Write("\n"); in GenerateHeader() 280 writer.Write("enum class %s {\n", GetCppEnumName(prop).c_str()); in GenerateHeader() 281 writer.Indent(); in GenerateHeader() 284 writer.Write("%s,\n", ToUpper(name).c_str()); in GenerateHeader() 286 writer.Dedent(); in GenerateHeader() [all …]
|
D | JavaGen.cpp | 296 CodeWriter writer(kIndent); in GenerateJavaClass() local 297 writer.Write("%s", kGeneratedFileFooterComments); in GenerateJavaClass() 298 writer.Write("package %s;\n\n", package_name.c_str()); in GenerateJavaClass() 299 writer.Write("%s", kJavaFileImports); in GenerateJavaClass() 300 writer.Write("public final class %s {\n", class_name.c_str()); in GenerateJavaClass() 301 writer.Indent(); in GenerateJavaClass() 302 writer.Write("private %s () {}\n\n", class_name.c_str()); in GenerateJavaClass() 303 writer.Write("%s", kJavaParsersAndFormatters); in GenerateJavaClass() 311 writer.Write("\n"); in GenerateJavaClass() 317 writer.Write("public static enum %s {\n", in GenerateJavaClass() [all …]
|
/system/core/libziparchive/ |
D | zip_writer_test.cc | 49 ZipWriter writer(file_); in TEST_F() local 53 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F() 54 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F() 55 ASSERT_EQ(0, writer.WriteBytes("llo", 3)); in TEST_F() 56 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F() 57 ASSERT_EQ(0, writer.Finish()); in TEST_F() 76 ZipWriter writer(file_); in TEST_F() local 78 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F() 79 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F() 80 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F() [all …]
|
D | zip_archive_benchmark.cpp | 34 ZipWriter writer(fp); in CreateZip() local 39 writer.StartEntry(lastName.c_str(), ZipWriter::kCompress); in CreateZip() 41 writer.WriteBytes("helo", 4); in CreateZip() 44 writer.FinishEntry(); in CreateZip() 46 writer.Finish(); in CreateZip() 93 ZipWriter writer(fp); in StartAlignedEntry() local 99 writer.StartAlignedEntry(name + std::to_string(counter++), 0, alignment); in StartAlignedEntry() 101 writer.WriteBytes("hola", 4); in StartAlignedEntry() 102 writer.FinishEntry(); in StartAlignedEntry() 106 writer.Finish(); in StartAlignedEntry()
|
/system/tools/sysprop/tests/ |
D | CodeWriterUnitTest.cpp | 39 CodeWriter writer(kIndent); in TEST() local 40 writer.Write("test1\ntest2\n"); in TEST() 41 writer.Indent(); in TEST() 42 writer.Write("test3\ntest4\n"); in TEST() 43 writer.Indent(); in TEST() 44 writer.Write("test5\ntest6\n"); in TEST() 45 writer.Dedent(); in TEST() 46 writer.Dedent(); in TEST() 47 writer.Write("test7\ntest8\n"); in TEST() 49 ASSERT_EQ(writer.Code(), in TEST() [all …]
|
/system/libufdt/utils/src/ |
D | mkdtimg_core.c | 243 struct dt_image_writer *writer = NULL; in dt_image_writer_start() local 246 writer = malloc(sizeof(struct dt_image_writer)); in dt_image_writer_start() 247 if (!writer) goto error; in dt_image_writer_start() 252 writer->img_fp = img_fp; in dt_image_writer_start() 253 init_dt_global_options(&writer->global_options); in dt_image_writer_start() 254 init_dt_options(&writer->entry_options); in dt_image_writer_start() 255 writer->entry_filename[0] = '\0'; in dt_image_writer_start() 256 writer->entry_count = entry_count; in dt_image_writer_start() 257 writer->entry_offset = sizeof(struct dt_table_header); in dt_image_writer_start() 258 writer->dt_offset = in dt_image_writer_start() [all …]
|
D | mkdtimg_create.c | 58 struct dt_image_writer *writer = dt_image_writer_start(img_fp, entry_count); in output_img_with_args() local 72 if (dt_image_writer_add_entry(writer, arg) != 0) { in output_img_with_args() 80 set_entry_options(writer, option, value) : in output_img_with_args() 81 set_global_options(writer, option, value); in output_img_with_args() 88 if (dt_image_writer_end(writer) != 0) { in output_img_with_args()
|
/system/linkerconfig/modules/tests/ |
D | namespace_test.cc | 89 ConfigWriter writer; in TEST() local 91 ns.WriteConfig(writer); in TEST() 92 auto config = writer.ToString(); in TEST() 98 ConfigWriter writer; in TEST() local 102 ns.WriteConfig(writer); in TEST() 103 auto config = writer.ToString(); in TEST() 109 ConfigWriter writer; in TEST() local 113 ns.WriteConfig(writer); in TEST() 115 auto config = writer.ToString(); in TEST() 128 ConfigWriter writer; in TEST() local [all …]
|
D | configwriter_test.cc | 25 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 27 writer.WriteLine(kSampleContent); in TEST() 29 ASSERT_EQ(writer.ToString(), "Lorem ipsum dolor sit amet\n"); in TEST() 33 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 35 writer.WriteVars("var1", {"value1", "value2"}); in TEST() 36 writer.WriteVars("var2", {"value1"}); in TEST() 37 writer.WriteVars("var3", {}); in TEST() 43 writer.ToString()); in TEST()
|
D | link_test.cc | 29 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 35 link->WriteConfig(writer); in TEST() 36 auto config_text = writer.ToString(); in TEST() 44 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 49 link->WriteConfig(writer); in TEST() 50 auto config_text = writer.ToString(); in TEST()
|
D | section_test.cc | 103 ConfigWriter writer; in TEST() local 115 section.WriteConfig(writer); in TEST() 116 auto config = writer.ToString(); in TEST() 121 android::linkerconfig::modules::ConfigWriter writer; in TEST() local 127 section.WriteConfig(writer); in TEST() 128 auto config = writer.ToString(); in TEST() 146 ConfigWriter writer; in TEST() local 147 section.WriteConfig(writer); in TEST() 159 writer.ToString()); in TEST() 204 ConfigWriter writer; in TEST() local [all …]
|
/system/timezone/input_tools/android/tzlookup_generator/src/main/java/com/android/libcore/timezone/tzlookup/ |
D | TzLookupFile.java | 91 StringWriter writer = new StringWriter(); in write() local 92 writeRaw(timeZones, writer); in write() 93 String rawXml = writer.getBuffer().toString(); in write() 134 static void writeXml(TimeZones timeZones, XMLStreamWriter writer) in writeXml() argument 136 writer.writeStartElement(TIMEZONES_ELEMENT); in writeXml() 137 writer.writeAttribute(IANA_VERSION_ATTRIBUTE, timeZones.ianaVersion); in writeXml() 138 CountryZones.writeXml(timeZones.countryZones, writer); in writeXml() 139 writer.writeEndElement(); in writeXml() 150 static void writeXml(CountryZones countryZones, XMLStreamWriter writer) in writeXml() argument 152 writer.writeStartElement(COUNTRY_ZONES_ELEMENT); in writeXml() [all …]
|
/system/extras/simpleperf/ |
D | record_file_test.cpp | 56 std::unique_ptr<RecordFileWriter> writer = RecordFileWriter::CreateInstance(tmpfile_.path); in TEST_F() local 57 ASSERT_TRUE(writer != nullptr); in TEST_F() 61 ASSERT_TRUE(writer->WriteAttrSection(attr_ids_)); in TEST_F() 66 ASSERT_TRUE(writer->WriteRecord(mmap_record)); in TEST_F() 69 ASSERT_TRUE(writer->BeginWriteFeatures(1)); in TEST_F() 77 ASSERT_TRUE(writer->WriteBuildIdFeature(build_id_records)); in TEST_F() 78 ASSERT_TRUE(writer->EndWriteFeatures()); in TEST_F() 79 ASSERT_TRUE(writer->Close()); in TEST_F() 104 std::unique_ptr<RecordFileWriter> writer = RecordFileWriter::CreateInstance(tmpfile_.path); in TEST_F() local 105 ASSERT_TRUE(writer != nullptr); in TEST_F() [all …]
|
/system/timezone/input_tools/android/telephonylookup_generator/src/main/java/com/android/libcore/timezone/telephonylookup/ |
D | TelephonyLookupXmlFile.java | 68 StringWriter writer = new StringWriter(); in write() local 69 writeRaw(telephonyLookup, writer); in write() 70 String rawXml = writer.getBuffer().toString(); in write() 105 static void writeXml(TelephonyLookup telephonyLookup, XMLStreamWriter writer) in writeXml() argument 107 writer.writeStartElement(TELEPHONY_LOOKUP_ELEMENT); in writeXml() 108 writer.writeStartElement(NETWORKS_ELEMENT); in writeXml() 110 network.writeXml(network, writer); in writeXml() 112 writer.writeEndElement(); // NETWORKS_ELEMENT in writeXml() 113 writer.writeEndElement(); // TELEPHONY_LOOKUP_ELEMENT in writeXml() 129 static void writeXml(Network network, XMLStreamWriter writer) in writeXml() argument [all …]
|
/system/nvram/messages/ |
D | message_codec.cpp | 30 ProtoWriter* writer, in Encode() argument 34 return encoder.Encode(writer); in Encode() 39 ProtoWriter writer(&counting_stream); in GetSize() local 40 return EncodeData(&writer) ? counting_stream.bytes_written() : 0; in GetSize() 43 bool MessageEncoderBase::Encode(ProtoWriter* writer) { in Encode() argument 67 return writer->WriteLengthHeader(GetSize()) && EncodeData(writer); in Encode() 70 bool MessageEncoderBase::EncodeData(ProtoWriter* writer) { in EncodeData() argument 73 writer->set_field_number(desc.field_number); in EncodeData() 74 if (!desc.encode_function(object_, writer)) { in EncodeData()
|
/system/nvram/messages/include/nvram/messages/ |
D | proto.hpp | 134 NVRAM_NOINLINE bool EncodeField(const Type& value, ProtoWriter* writer) { in EncodeField() argument 135 return Codec::Encode(value, writer); in EncodeField() 153 static bool Encode(const Blob& blob, ProtoWriter* writer) { in Encode() 154 return writer->WriteLengthDelimited(blob.data(), blob.size()); in Encode() 189 static bool Encode(const Type& value, ProtoWriter* writer) { in Encode() 190 return writer->WriteVarint(static_cast<uint64_t>(value)); in Encode() 209 static bool Encode(const Vector<ElementType>& vector, ProtoWriter* writer) { in Encode() 211 if (!EncodeField<ElementCodec>(elem, writer)) { in Encode() 230 static bool Encode(const Optional<ValueType>& value, ProtoWriter* writer) { in Encode() 231 return !value.valid() || EncodeField<ValueCodec>(value.value(), writer); in Encode() [all …]
|
D | message_codec.h | 38 using EncodeFunction = bool(const void* object, ProtoWriter* writer); 73 ProtoWriter* writer, 82 bool Encode(ProtoWriter* writer); 85 bool EncodeData(ProtoWriter* writer);
|
/system/linkerconfig/modules/ |
D | namespace.cc | 62 void Namespace::WriteConfig(ConfigWriter& writer) { in WriteConfig() argument 65 writer.WriteLine(prefix + "isolated = " + (is_isolated_ ? "true" : "false")); in WriteConfig() 68 writer.WriteLine(prefix + "visible = true"); in WriteConfig() 71 writer.WriteVars(prefix + "search.paths", search_paths_); in WriteConfig() 72 writer.WriteVars(prefix + "permitted.paths", permitted_paths_); in WriteConfig() 73 writer.WriteVars(prefix + "asan.search.paths", asan_search_paths_); in WriteConfig() 74 writer.WriteVars(prefix + "asan.permitted.paths", asan_permitted_paths_); in WriteConfig() 75 writer.WriteVars(prefix + "whitelisted", whitelisted_); in WriteConfig() 83 writer.WriteLine(prefix + "links = " + android::base::Join(link_list, ",")); in WriteConfig() 86 link.WriteConfig(writer); in WriteConfig()
|
D | link.cc | 38 void Link::WriteConfig(ConfigWriter& writer) const { in WriteConfig() 42 writer.WriteLine(prefix + "allow_all_shared_libs = true"); in WriteConfig() 44 writer.WriteVars(prefix + "shared_libs", shared_libs_); in WriteConfig()
|
D | configuration.cc | 27 void Configuration::WriteConfig(ConfigWriter& writer) { in WriteConfig() argument 38 writer.WriteLine("dir." + section + " = " + dir); in WriteConfig() 43 section.WriteConfig(writer); in WriteConfig()
|
/system/update_engine/payload_consumer/ |
D | file_descriptor_utils.cc | 40 DirectExtentWriter* writer, in CommonHashExtents() argument 61 if (writer) { in CommonHashExtents() 63 writer->Write(buf.data(), read_blocks * block_size)); in CommonHashExtents() 85 DirectExtentWriter writer; in CopyAndHashExtents() local 86 TEST_AND_RETURN_FALSE(writer.Init(target, tgt_extents, block_size)); in CopyAndHashExtents() 90 CommonHashExtents(source, src_extents, &writer, block_size, hash_out)); in CopyAndHashExtents()
|
/system/update_engine/payload_generator/ |
D | payload_file.cc | 55 bool WriteUint64AsBigEndian(FileWriter* writer, const uint64_t value) { in WriteUint64AsBigEndian() argument 57 TEST_AND_RETURN_FALSE(writer->Write(&value_be, sizeof(value_be))); in WriteUint64AsBigEndian() 216 DirectFileWriter writer; in WritePayload() local 217 TEST_AND_RETURN_FALSE_ERRNO(writer.Open(payload_file.c_str(), in WritePayload() 220 ScopedFileWriterCloser writer_closer(&writer); in WritePayload() 223 TEST_AND_RETURN_FALSE_ERRNO(writer.Write(kDeltaMagic, sizeof(kDeltaMagic))); in WritePayload() 226 TEST_AND_RETURN_FALSE(WriteUint64AsBigEndian(&writer, major_version_)); in WritePayload() 230 WriteUint64AsBigEndian(&writer, serialized_manifest.size())); in WritePayload() 238 TEST_AND_RETURN_FALSE_ERRNO(writer.Write(&metadata_signature_size, in WritePayload() 249 writer.Write(serialized_manifest.data(), serialized_manifest.size())); in WritePayload() [all …]
|