Index: mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/mojo/ConformanceTestInterfaceInternal.java |
diff --git a/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/mojo/ConformanceTestInterfaceInternal.java b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/mojo/ConformanceTestInterfaceInternal.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..faf50846abd539f071c231d7b19fb5da8bdef085 |
--- /dev/null |
+++ b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/mojo/ConformanceTestInterfaceInternal.java |
@@ -0,0 +1,701 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// This file is autogenerated by: |
+// mojo/public/tools/bindings/mojom_bindings_generator.py |
+// For: |
+// mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom |
+// |
+ |
+package org.chromium.mojo.bindings.test.mojom.mojo; |
+ |
+class ConformanceTestInterfaceInternal { |
+ |
+ public static final org.chromium.mojo.bindings.Interface.Builder<ConformanceTestInterface, ConformanceTestInterface.Proxy> BUILDER = |
+ new org.chromium.mojo.bindings.Interface.Builder<ConformanceTestInterface, ConformanceTestInterface.Proxy>() { |
+ |
+ public Proxy buildProxy(org.chromium.mojo.system.Core core, |
+ org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) { |
+ return new Proxy(core, messageReceiver); |
+ } |
+ |
+ public Stub buildStub(org.chromium.mojo.system.Core core, ConformanceTestInterface impl) { |
+ return new Stub(core, impl); |
+ } |
+ |
+ public ConformanceTestInterface[] newArray(int size) { |
+ return new ConformanceTestInterface[size]; |
+ } |
+ }; |
+ |
+ private static final int METHOD0_ORDINAL = 0; |
+ private static final int METHOD1_ORDINAL = 1; |
+ private static final int METHOD2_ORDINAL = 2; |
+ private static final int METHOD3_ORDINAL = 3; |
+ private static final int METHOD4_ORDINAL = 4; |
+ private static final int METHOD5_ORDINAL = 5; |
+ private static final int METHOD6_ORDINAL = 6; |
+ private static final int METHOD7_ORDINAL = 7; |
+ private static final int METHOD8_ORDINAL = 8; |
+ private static final int METHOD9_ORDINAL = 9; |
+ |
+ static final class Proxy extends org.chromium.mojo.bindings.Interface.BaseProxy implements ConformanceTestInterface.Proxy { |
+ |
+ Proxy(org.chromium.mojo.system.Core core, |
+ org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) { |
+ super(core, messageReceiver); |
+ } |
+ |
+ @Override |
+ public void method0(float param0) { |
+ ConformanceTestInterfaceMethod0Params message = new ConformanceTestInterfaceMethod0Params(); |
+ message.param0 = param0; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD0_ORDINAL))); |
+ } |
+ |
+ @Override |
+ public void method1(StructA param0) { |
+ ConformanceTestInterfaceMethod1Params message = new ConformanceTestInterfaceMethod1Params(); |
+ message.param0 = param0; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD1_ORDINAL))); |
+ } |
+ |
+ @Override |
+ public void method2(StructB param0, StructA param1) { |
+ ConformanceTestInterfaceMethod2Params message = new ConformanceTestInterfaceMethod2Params(); |
+ message.param0 = param0; |
+ message.param1 = param1; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD2_ORDINAL))); |
+ } |
+ |
+ @Override |
+ public void method3(boolean[] param0) { |
+ ConformanceTestInterfaceMethod3Params message = new ConformanceTestInterfaceMethod3Params(); |
+ message.param0 = param0; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD3_ORDINAL))); |
+ } |
+ |
+ @Override |
+ public void method4(StructC param0, byte[] param1) { |
+ ConformanceTestInterfaceMethod4Params message = new ConformanceTestInterfaceMethod4Params(); |
+ message.param0 = param0; |
+ message.param1 = param1; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD4_ORDINAL))); |
+ } |
+ |
+ @Override |
+ public void method5(StructE param0, org.chromium.mojo.system.DataPipe.ProducerHandle param1) { |
+ ConformanceTestInterfaceMethod5Params message = new ConformanceTestInterfaceMethod5Params(); |
+ message.param0 = param0; |
+ message.param1 = param1; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD5_ORDINAL))); |
+ } |
+ |
+ @Override |
+ public void method6(byte[][] param0) { |
+ ConformanceTestInterfaceMethod6Params message = new ConformanceTestInterfaceMethod6Params(); |
+ message.param0 = param0; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD6_ORDINAL))); |
+ } |
+ |
+ @Override |
+ public void method7(StructF param0, byte[] param1) { |
+ ConformanceTestInterfaceMethod7Params message = new ConformanceTestInterfaceMethod7Params(); |
+ message.param0 = param0; |
+ message.param1 = param1; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD7_ORDINAL))); |
+ } |
+ |
+ @Override |
+ public void method8(String[][] param0) { |
+ ConformanceTestInterfaceMethod8Params message = new ConformanceTestInterfaceMethod8Params(); |
+ message.param0 = param0; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD8_ORDINAL))); |
+ } |
+ |
+ @Override |
+ public void method9(org.chromium.mojo.system.UntypedHandle[][] param0) { |
+ ConformanceTestInterfaceMethod9Params message = new ConformanceTestInterfaceMethod9Params(); |
+ message.param0 = param0; |
+ getMessageReceiver().accept( |
+ message.serializeWithHeader( |
+ getCore(), |
+ new org.chromium.mojo.bindings.MessageHeader(METHOD9_ORDINAL))); |
+ } |
+ |
+ } |
+ |
+ static final class Stub extends org.chromium.mojo.bindings.Interface.Stub<ConformanceTestInterface> { |
+ |
+ Stub(org.chromium.mojo.system.Core core, ConformanceTestInterface impl) { |
+ super(core, impl); |
+ } |
+ |
+ @Override |
+ public boolean accept(org.chromium.mojo.bindings.MessageWithHeader message) { |
+ try { |
+ org.chromium.mojo.bindings.MessageHeader header = message.getHeader(); |
+ switch(header.getType()) { |
+ case METHOD0_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
rmcilroy
2014/08/21 14:43:52
Could we do the "if (!header.validateHeader(0))" c
qsr
2014/08/22 08:11:18
It was relatively easy. Done.
|
+ ConformanceTestInterfaceMethod0Params data = |
+ ConformanceTestInterfaceMethod0Params.deserialize(message.getPayload()); |
+ getImpl().method0(data.param0); |
+ return true; |
+ } |
+ case METHOD1_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
+ ConformanceTestInterfaceMethod1Params data = |
+ ConformanceTestInterfaceMethod1Params.deserialize(message.getPayload()); |
+ getImpl().method1(data.param0); |
+ return true; |
+ } |
+ case METHOD2_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
+ ConformanceTestInterfaceMethod2Params data = |
+ ConformanceTestInterfaceMethod2Params.deserialize(message.getPayload()); |
+ getImpl().method2(data.param0, data.param1); |
+ return true; |
+ } |
+ case METHOD3_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
+ ConformanceTestInterfaceMethod3Params data = |
+ ConformanceTestInterfaceMethod3Params.deserialize(message.getPayload()); |
+ getImpl().method3(data.param0); |
+ return true; |
+ } |
+ case METHOD4_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
+ ConformanceTestInterfaceMethod4Params data = |
+ ConformanceTestInterfaceMethod4Params.deserialize(message.getPayload()); |
+ getImpl().method4(data.param0, data.param1); |
+ return true; |
+ } |
+ case METHOD5_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
+ ConformanceTestInterfaceMethod5Params data = |
+ ConformanceTestInterfaceMethod5Params.deserialize(message.getPayload()); |
+ getImpl().method5(data.param0, data.param1); |
+ return true; |
+ } |
+ case METHOD6_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
+ ConformanceTestInterfaceMethod6Params data = |
+ ConformanceTestInterfaceMethod6Params.deserialize(message.getPayload()); |
+ getImpl().method6(data.param0); |
+ return true; |
+ } |
+ case METHOD7_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
+ ConformanceTestInterfaceMethod7Params data = |
+ ConformanceTestInterfaceMethod7Params.deserialize(message.getPayload()); |
+ getImpl().method7(data.param0, data.param1); |
+ return true; |
+ } |
+ case METHOD8_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
+ ConformanceTestInterfaceMethod8Params data = |
+ ConformanceTestInterfaceMethod8Params.deserialize(message.getPayload()); |
+ getImpl().method8(data.param0); |
+ return true; |
+ } |
+ case METHOD9_ORDINAL: { |
+ if (!header.validateHeader(0)) { |
+ return false; |
+ } |
+ ConformanceTestInterfaceMethod9Params data = |
+ ConformanceTestInterfaceMethod9Params.deserialize(message.getPayload()); |
+ getImpl().method9(data.param0); |
+ return true; |
+ } |
+ } |
+ } catch (org.chromium.mojo.bindings.DeserializationException e) { |
+ } |
+ return false; |
+ } |
+ |
+ @Override |
+ public boolean acceptWithResponder(org.chromium.mojo.bindings.MessageWithHeader message, org.chromium.mojo.bindings.MessageReceiver receiver) { |
+ return false; |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod0Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 16; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 1); |
+ |
+ public float param0; |
+ |
+ public ConformanceTestInterfaceMethod0Params() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod0Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod0Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod0Params result = new ConformanceTestInterfaceMethod0Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ result.param0 = decoder0.readFloat(8); |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ encoder0.encode(param0, 8); |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod1Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 16; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 1); |
+ |
+ public StructA param0; |
+ |
+ public ConformanceTestInterfaceMethod1Params() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod1Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod1Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod1Params result = new ConformanceTestInterfaceMethod1Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8); |
+ result.param0 = StructA.decode(decoder1); |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ encoder0.encode(param0, 8); |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod2Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 24; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 2); |
+ |
+ public StructB param0; |
+ public StructA param1; |
+ |
+ public ConformanceTestInterfaceMethod2Params() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod2Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod2Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod2Params result = new ConformanceTestInterfaceMethod2Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8); |
+ result.param0 = StructB.decode(decoder1); |
+ } |
+ if (mainDataHeader.numFields > 1) { |
+ org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(16); |
+ result.param1 = StructA.decode(decoder1); |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ encoder0.encode(param0, 8); |
+ encoder0.encode(param1, 16); |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod3Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 16; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 1); |
+ |
+ public boolean[] param0; |
+ |
+ public ConformanceTestInterfaceMethod3Params() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod3Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod3Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod3Params result = new ConformanceTestInterfaceMethod3Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ result.param0 = decoder0.readBooleans(8); |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ encoder0.encode(param0, 8); |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod4Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 24; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 2); |
+ |
+ public StructC param0; |
+ public byte[] param1; |
+ |
+ public ConformanceTestInterfaceMethod4Params() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod4Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod4Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod4Params result = new ConformanceTestInterfaceMethod4Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8); |
+ result.param0 = StructC.decode(decoder1); |
+ } |
+ if (mainDataHeader.numFields > 1) { |
+ result.param1 = decoder0.readBytes(16); |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ encoder0.encode(param0, 8); |
+ encoder0.encode(param1, 16); |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod5Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 24; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 2); |
+ |
+ public StructE param0; |
+ public org.chromium.mojo.system.DataPipe.ProducerHandle param1; |
+ |
+ public ConformanceTestInterfaceMethod5Params() { |
+ super(STRUCT_SIZE); |
+ param1 = org.chromium.mojo.system.InvalidHandle.INSTANCE; |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod5Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod5Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod5Params result = new ConformanceTestInterfaceMethod5Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8); |
+ result.param0 = StructE.decode(decoder1); |
+ } |
+ if (mainDataHeader.numFields > 1) { |
+ result.param1 = decoder0.readProducerHandle(16); |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ encoder0.encode(param0, 8); |
+ encoder0.encode(param1, 16); |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod6Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 16; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 1); |
+ |
+ public byte[][] param0; |
+ |
+ public ConformanceTestInterfaceMethod6Params() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod6Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod6Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod6Params result = new ConformanceTestInterfaceMethod6Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8); |
+ if (decoder1 == null) { |
+ result.param0 = null; |
+ } else { |
+ DataHeader si1 = decoder1.readDataHeader(); |
+ result.param0 = new byte[si1.numFields][]; |
+ for (int i1 = 0; i1 < si1.numFields; ++i1) { |
+ result.param0[i1] = decoder1.readBytes(DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i1); |
+ } |
+ } |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ if (param0 == null) { |
+ encoder0.encodeNullPointer(8); |
+ } else { |
+ org.chromium.mojo.bindings.Encoder encoder1 = encoder0.encodePointerArray(param0.length, 8); |
+ for (int i0 = 0; i0 < param0.length; ++i0) { |
+ encoder1.encode(param0[i0], DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i0); |
+ } |
+ } |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod7Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 24; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 2); |
+ |
+ public StructF param0; |
+ public byte[] param1; |
+ |
+ public ConformanceTestInterfaceMethod7Params() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod7Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod7Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod7Params result = new ConformanceTestInterfaceMethod7Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8); |
+ result.param0 = StructF.decode(decoder1); |
+ } |
+ if (mainDataHeader.numFields > 1) { |
+ result.param1 = decoder0.readBytes(16); |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ encoder0.encode(param0, 8); |
+ encoder0.encode(param1, 16); |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod8Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 16; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 1); |
+ |
+ public String[][] param0; |
+ |
+ public ConformanceTestInterfaceMethod8Params() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod8Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod8Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod8Params result = new ConformanceTestInterfaceMethod8Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8); |
+ if (decoder1 == null) { |
+ result.param0 = null; |
+ } else { |
+ DataHeader si1 = decoder1.readDataHeader(); |
+ result.param0 = new String[si1.numFields][]; |
+ for (int i1 = 0; i1 < si1.numFields; ++i1) { |
+ org.chromium.mojo.bindings.Decoder decoder2 = decoder1.readPointer(DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i1); |
+ if (decoder2 == null) { |
+ result.param0[i1] = null; |
+ } else { |
+ DataHeader si2 = decoder2.readDataHeader(); |
+ result.param0[i1] = new String[si2.numFields]; |
+ for (int i2 = 0; i2 < si2.numFields; ++i2) { |
+ result.param0[i1][i2] = decoder2.readString(DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i2); |
+ } |
+ } |
+ } |
+ } |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ if (param0 == null) { |
+ encoder0.encodeNullPointer(8); |
+ } else { |
+ org.chromium.mojo.bindings.Encoder encoder1 = encoder0.encodePointerArray(param0.length, 8); |
+ for (int i0 = 0; i0 < param0.length; ++i0) { |
+ if (param0[i0] == null) { |
+ encoder1.encodeNullPointer(DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i0); |
+ } else { |
+ org.chromium.mojo.bindings.Encoder encoder2 = encoder1.encodePointerArray(param0[i0].length, DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i0); |
+ for (int i1 = 0; i1 < param0[i0].length; ++i1) { |
+ encoder2.encode(param0[i0][i1], DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i1); |
+ } |
+ } |
+ } |
+ } |
+ } |
+ } |
+ |
+ static final class ConformanceTestInterfaceMethod9Params extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 16; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 1); |
+ |
+ public org.chromium.mojo.system.UntypedHandle[][] param0; |
+ |
+ public ConformanceTestInterfaceMethod9Params() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod9Params deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static ConformanceTestInterfaceMethod9Params decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ ConformanceTestInterfaceMethod9Params result = new ConformanceTestInterfaceMethod9Params(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8); |
+ if (decoder1 == null) { |
+ result.param0 = null; |
+ } else { |
+ DataHeader si1 = decoder1.readDataHeader(); |
+ result.param0 = new org.chromium.mojo.system.UntypedHandle[si1.numFields][]; |
+ for (int i1 = 0; i1 < si1.numFields; ++i1) { |
+ result.param0[i1] = decoder1.readUntypedHandles(DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i1); |
+ } |
+ } |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ if (param0 == null) { |
+ encoder0.encodeNullPointer(8); |
+ } else { |
+ org.chromium.mojo.bindings.Encoder encoder1 = encoder0.encodePointerArray(param0.length, 8); |
+ for (int i0 = 0; i0 < param0.length; ++i0) { |
+ encoder1.encode(param0[i0], DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i0); |
+ } |
+ } |
+ } |
+ } |
+ |
+} |
+ |