| Index: mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/sample/Bar.java
|
| diff --git a/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/sample/Bar.java b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/sample/Bar.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a5c3b61b6e1176720b98c9f8ae3c547a13bdbc66
|
| --- /dev/null
|
| +++ b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/sample/Bar.java
|
| @@ -0,0 +1,74 @@
|
| +// 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/sample_service.mojom
|
| +//
|
| +
|
| +package org.chromium.mojo.bindings.test.mojom.sample;
|
| +
|
| +public final class Bar extends org.chromium.mojo.bindings.Struct {
|
| +
|
| + private static final int STRUCT_SIZE = 16;
|
| + private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 4);
|
| +
|
| + public static final class Type {
|
| +
|
| + public static final int VERTICAL = (int) (1L);
|
| + public static final int HORIZONTAL = VERTICAL + 1;
|
| + public static final int BOTH = HORIZONTAL + 1;
|
| + public static final int INVALID = BOTH + 1;
|
| +
|
| + private Type() {}
|
| +
|
| + }
|
| +
|
| + public byte alpha;
|
| + public byte beta;
|
| + public byte gamma;
|
| + public int type;
|
| +
|
| + public Bar() {
|
| + super(STRUCT_SIZE);
|
| + alpha = (byte) 255L;
|
| + type = (int) Bar.Type.VERTICAL;
|
| + }
|
| +
|
| + public static Bar deserialize(org.chromium.mojo.bindings.Message message) {
|
| + return decode(new org.chromium.mojo.bindings.Decoder(message));
|
| + }
|
| +
|
| + public static Bar decode(org.chromium.mojo.bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + Bar result = new Bar();
|
| + DataHeader mainDataHeader = decoder0.readDataHeader();
|
| + if (mainDataHeader.numFields > 0) {
|
| + result.alpha = decoder0.readByte(8);
|
| + }
|
| + if (mainDataHeader.numFields > 1) {
|
| + result.beta = decoder0.readByte(9);
|
| + }
|
| + if (mainDataHeader.numFields > 2) {
|
| + result.gamma = decoder0.readByte(10);
|
| + }
|
| + if (mainDataHeader.numFields > 3) {
|
| + result.type = decoder0.readInt(12);
|
| + }
|
| + 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(alpha, 8);
|
| + encoder0.encode(beta, 9);
|
| + encoder0.encode(gamma, 10);
|
| + encoder0.encode(type, 12);
|
| + }
|
| +}
|
| +
|
|
|