blob: 89a849d3cc036f76bb5aa2d5013340ea4a79a64b [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// GENERATED FILE: Do not edit!
//
// To rebuild this file, invoke third_party/go/regen-fidl.
// +build fuchsia
package bindingstest
import (
_zx "syscall/zx"
_bindings "syscall/zx/fidl"
)
const (
KMaxBuf uint64 = 8192
)
type TestSimple struct {
_ struct{} `fidl2:"s,8,8"`
X int64
}
var _mTestSimple = _bindings.CreateLazyMarshaler(TestSimple{})
func (msg *TestSimple) Marshaler() _bindings.Marshaler {
return _mTestSimple
}
// Implements Payload.
func (_ *TestSimple) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestSimple) InlineSize() int {
return 8
}
type TestSimpleBool struct {
_ struct{} `fidl2:"s,1,1"`
X bool
}
var _mTestSimpleBool = _bindings.CreateLazyMarshaler(TestSimpleBool{})
func (msg *TestSimpleBool) Marshaler() _bindings.Marshaler {
return _mTestSimpleBool
}
// Implements Payload.
func (_ *TestSimpleBool) InlineAlignment() int {
return 1
}
// Implements Payload.
func (_ *TestSimpleBool) InlineSize() int {
return 1
}
type TestAlignment1 struct {
_ struct{} `fidl2:"s,8,4"`
X int8
Y int8
Z uint32
}
var _mTestAlignment1 = _bindings.CreateLazyMarshaler(TestAlignment1{})
func (msg *TestAlignment1) Marshaler() _bindings.Marshaler {
return _mTestAlignment1
}
// Implements Payload.
func (_ *TestAlignment1) InlineAlignment() int {
return 4
}
// Implements Payload.
func (_ *TestAlignment1) InlineSize() int {
return 8
}
type TestAlignment2 struct {
_ struct{} `fidl2:"s,20,4"`
A uint32
B uint32
C int8
D int8
E int8
F uint8
G uint32
H uint16
I uint16
}
var _mTestAlignment2 = _bindings.CreateLazyMarshaler(TestAlignment2{})
func (msg *TestAlignment2) Marshaler() _bindings.Marshaler {
return _mTestAlignment2
}
// Implements Payload.
func (_ *TestAlignment2) InlineAlignment() int {
return 4
}
// Implements Payload.
func (_ *TestAlignment2) InlineSize() int {
return 20
}
type TestFloat1 struct {
_ struct{} `fidl2:"s,4,4"`
A float32
}
var _mTestFloat1 = _bindings.CreateLazyMarshaler(TestFloat1{})
func (msg *TestFloat1) Marshaler() _bindings.Marshaler {
return _mTestFloat1
}
// Implements Payload.
func (_ *TestFloat1) InlineAlignment() int {
return 4
}
// Implements Payload.
func (_ *TestFloat1) InlineSize() int {
return 4
}
type TestFloat2 struct {
_ struct{} `fidl2:"s,8,8"`
A float64
}
var _mTestFloat2 = _bindings.CreateLazyMarshaler(TestFloat2{})
func (msg *TestFloat2) Marshaler() _bindings.Marshaler {
return _mTestFloat2
}
// Implements Payload.
func (_ *TestFloat2) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestFloat2) InlineSize() int {
return 8
}
type TestFloat3 struct {
_ struct{} `fidl2:"s,32,8"`
A float32
B float64
C uint64
D float32
}
var _mTestFloat3 = _bindings.CreateLazyMarshaler(TestFloat3{})
func (msg *TestFloat3) Marshaler() _bindings.Marshaler {
return _mTestFloat3
}
// Implements Payload.
func (_ *TestFloat3) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestFloat3) InlineSize() int {
return 32
}
type TestArray1 struct {
_ struct{} `fidl2:"s,5,1"`
A [5]int8
}
var _mTestArray1 = _bindings.CreateLazyMarshaler(TestArray1{})
func (msg *TestArray1) Marshaler() _bindings.Marshaler {
return _mTestArray1
}
// Implements Payload.
func (_ *TestArray1) InlineAlignment() int {
return 1
}
// Implements Payload.
func (_ *TestArray1) InlineSize() int {
return 5
}
type TestArray2 struct {
_ struct{} `fidl2:"s,16,8"`
A float64
B [1]float32
}
var _mTestArray2 = _bindings.CreateLazyMarshaler(TestArray2{})
func (msg *TestArray2) Marshaler() _bindings.Marshaler {
return _mTestArray2
}
// Implements Payload.
func (_ *TestArray2) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestArray2) InlineSize() int {
return 16
}
type TestArray3 struct {
_ struct{} `fidl2:"s,24,8"`
A int32
B [3]uint16
C uint64
}
var _mTestArray3 = _bindings.CreateLazyMarshaler(TestArray3{})
func (msg *TestArray3) Marshaler() _bindings.Marshaler {
return _mTestArray3
}
// Implements Payload.
func (_ *TestArray3) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestArray3) InlineSize() int {
return 24
}
type TestArray4 struct {
_ struct{} `fidl2:"s,9,1"`
A [9]bool
}
var _mTestArray4 = _bindings.CreateLazyMarshaler(TestArray4{})
func (msg *TestArray4) Marshaler() _bindings.Marshaler {
return _mTestArray4
}
// Implements Payload.
func (_ *TestArray4) InlineAlignment() int {
return 1
}
// Implements Payload.
func (_ *TestArray4) InlineSize() int {
return 9
}
type TestString1 struct {
_ struct{} `fidl2:"s,32,8"`
A string
B *string
}
var _mTestString1 = _bindings.CreateLazyMarshaler(TestString1{})
func (msg *TestString1) Marshaler() _bindings.Marshaler {
return _mTestString1
}
// Implements Payload.
func (_ *TestString1) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestString1) InlineSize() int {
return 32
}
type TestString2 struct {
_ struct{} `fidl2:"s,32,8"`
A [2]string
}
var _mTestString2 = _bindings.CreateLazyMarshaler(TestString2{})
func (msg *TestString2) Marshaler() _bindings.Marshaler {
return _mTestString2
}
// Implements Payload.
func (_ *TestString2) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestString2) InlineSize() int {
return 32
}
type TestString3 struct {
_ struct{} `fidl2:"s,64,8"`
A [2]string `fidl:"4" fidl2:"4"`
B [2]*string `fidl:"4" fidl2:"4"`
}
var _mTestString3 = _bindings.CreateLazyMarshaler(TestString3{})
func (msg *TestString3) Marshaler() _bindings.Marshaler {
return _mTestString3
}
// Implements Payload.
func (_ *TestString3) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestString3) InlineSize() int {
return 64
}
type TestStringWithBound struct {
_ struct{} `fidl2:"s,16,8"`
A string `fidl:"8" fidl2:"8"`
}
var _mTestStringWithBound = _bindings.CreateLazyMarshaler(TestStringWithBound{})
func (msg *TestStringWithBound) Marshaler() _bindings.Marshaler {
return _mTestStringWithBound
}
// Implements Payload.
func (_ *TestStringWithBound) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestStringWithBound) InlineSize() int {
return 16
}
type TestOptStringWithBound struct {
_ struct{} `fidl2:"s,16,8"`
A *string `fidl:"8" fidl2:"8"`
}
var _mTestOptStringWithBound = _bindings.CreateLazyMarshaler(TestOptStringWithBound{})
func (msg *TestOptStringWithBound) Marshaler() _bindings.Marshaler {
return _mTestOptStringWithBound
}
// Implements Payload.
func (_ *TestOptStringWithBound) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestOptStringWithBound) InlineSize() int {
return 16
}
type TestVector1 struct {
_ struct{} `fidl2:"s,64,8"`
A []int8
B *[]int16
C []int32 `fidl:"2" fidl2:"2"`
D *[]int64 `fidl:"2" fidl2:"2"`
}
var _mTestVector1 = _bindings.CreateLazyMarshaler(TestVector1{})
func (msg *TestVector1) Marshaler() _bindings.Marshaler {
return _mTestVector1
}
// Implements Payload.
func (_ *TestVector1) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestVector1) InlineSize() int {
return 64
}
type TestVector2 struct {
_ struct{} `fidl2:"s,64,8"`
A [2][]int8
B [][]int8 `fidl:",2" fidl2:"2,"`
C []*[]string `fidl:"5,2,2" fidl2:"2,2,5"`
}
var _mTestVector2 = _bindings.CreateLazyMarshaler(TestVector2{})
func (msg *TestVector2) Marshaler() _bindings.Marshaler {
return _mTestVector2
}
// Implements Payload.
func (_ *TestVector2) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestVector2) InlineSize() int {
return 64
}
type TestStruct1 struct {
_ struct{} `fidl2:"s,16,8"`
A TestSimple
B *TestSimple
}
var _mTestStruct1 = _bindings.CreateLazyMarshaler(TestStruct1{})
func (msg *TestStruct1) Marshaler() _bindings.Marshaler {
return _mTestStruct1
}
// Implements Payload.
func (_ *TestStruct1) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestStruct1) InlineSize() int {
return 16
}
type TestStruct2 struct {
_ struct{} `fidl2:"s,88,8"`
A TestArray1
B TestFloat1
C TestVector1
D *TestString1
}
var _mTestStruct2 = _bindings.CreateLazyMarshaler(TestStruct2{})
func (msg *TestStruct2) Marshaler() _bindings.Marshaler {
return _mTestStruct2
}
// Implements Payload.
func (_ *TestStruct2) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestStruct2) InlineSize() int {
return 88
}
type EmptyStruct struct {
_ struct{} `fidl2:"s,1,1"`
}
var _mEmptyStruct = _bindings.CreateLazyMarshaler(EmptyStruct{})
func (msg *EmptyStruct) Marshaler() _bindings.Marshaler {
return _mEmptyStruct
}
// Implements Payload.
func (_ *EmptyStruct) InlineAlignment() int {
return 1
}
// Implements Payload.
func (_ *EmptyStruct) InlineSize() int {
return 1
}
type TestEmptyStructSandwich struct {
_ struct{} `fidl2:"s,40,8"`
Before string
Es EmptyStruct
After string
}
var _mTestEmptyStructSandwich = _bindings.CreateLazyMarshaler(TestEmptyStructSandwich{})
func (msg *TestEmptyStructSandwich) Marshaler() _bindings.Marshaler {
return _mTestEmptyStructSandwich
}
// Implements Payload.
func (_ *TestEmptyStructSandwich) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestEmptyStructSandwich) InlineSize() int {
return 40
}
type TestUnion1 struct {
_ struct{} `fidl2:"s,24,8"`
A Union1
B *Union1
}
var _mTestUnion1 = _bindings.CreateLazyMarshaler(TestUnion1{})
func (msg *TestUnion1) Marshaler() _bindings.Marshaler {
return _mTestUnion1
}
// Implements Payload.
func (_ *TestUnion1) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestUnion1) InlineSize() int {
return 24
}
type TestUnion2 struct {
_ struct{} `fidl2:"s,32,8"`
A []Union1
B []*Union1
}
var _mTestUnion2 = _bindings.CreateLazyMarshaler(TestUnion2{})
func (msg *TestUnion2) Marshaler() _bindings.Marshaler {
return _mTestUnion2
}
// Implements Payload.
func (_ *TestUnion2) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestUnion2) InlineSize() int {
return 32
}
type TestHandle1 struct {
_ struct{} `fidl2:"s,16,4"`
A _zx.Handle `fidl2:"0"`
B _zx.Handle `fidl:"*" fidl2:"1"`
C _zx.VMO `fidl2:"0"`
D _zx.VMO `fidl:"*" fidl2:"1"`
}
var _mTestHandle1 = _bindings.CreateLazyMarshaler(TestHandle1{})
func (msg *TestHandle1) Marshaler() _bindings.Marshaler {
return _mTestHandle1
}
// Implements Payload.
func (_ *TestHandle1) InlineAlignment() int {
return 4
}
// Implements Payload.
func (_ *TestHandle1) InlineSize() int {
return 16
}
type TestHandle2 struct {
_ struct{} `fidl2:"s,32,8"`
A []_zx.Handle `fidl:"1" fidl2:"1,0"`
B []_zx.VMO `fidl:"*,1" fidl2:"1,1"`
}
var _mTestHandle2 = _bindings.CreateLazyMarshaler(TestHandle2{})
func (msg *TestHandle2) Marshaler() _bindings.Marshaler {
return _mTestHandle2
}
// Implements Payload.
func (_ *TestHandle2) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestHandle2) InlineSize() int {
return 32
}
type TestInterface1 struct {
_ struct{} `fidl2:"s,16,4"`
A Test1Interface
B Test1Interface `fidl:"*"`
C Test1InterfaceRequest `fidl2:"0"`
D Test1InterfaceRequest `fidl:"*" fidl2:"1"`
}
var _mTestInterface1 = _bindings.CreateLazyMarshaler(TestInterface1{})
func (msg *TestInterface1) Marshaler() _bindings.Marshaler {
return _mTestInterface1
}
// Implements Payload.
func (_ *TestInterface1) InlineAlignment() int {
return 4
}
// Implements Payload.
func (_ *TestInterface1) InlineSize() int {
return 16
}
type TestSimpleTable struct {
_ struct{} `fidl2:"s,16,8"`
Table SimpleTable
}
var _mTestSimpleTable = _bindings.CreateLazyMarshaler(TestSimpleTable{})
func (msg *TestSimpleTable) Marshaler() _bindings.Marshaler {
return _mTestSimpleTable
}
// Implements Payload.
func (_ *TestSimpleTable) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestSimpleTable) InlineSize() int {
return 16
}
type TestOlderSimpleTable struct {
_ struct{} `fidl2:"s,16,8"`
Table OlderSimpleTable
}
var _mTestOlderSimpleTable = _bindings.CreateLazyMarshaler(TestOlderSimpleTable{})
func (msg *TestOlderSimpleTable) Marshaler() _bindings.Marshaler {
return _mTestOlderSimpleTable
}
// Implements Payload.
func (_ *TestOlderSimpleTable) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestOlderSimpleTable) InlineSize() int {
return 16
}
type TestNewerSimpleTable struct {
_ struct{} `fidl2:"s,16,8"`
Table NewerSimpleTable
}
var _mTestNewerSimpleTable = _bindings.CreateLazyMarshaler(TestNewerSimpleTable{})
func (msg *TestNewerSimpleTable) Marshaler() _bindings.Marshaler {
return _mTestNewerSimpleTable
}
// Implements Payload.
func (_ *TestNewerSimpleTable) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestNewerSimpleTable) InlineSize() int {
return 16
}
type TestTableWithStringAndVector struct {
_ struct{} `fidl2:"s,16,8"`
Table TableWithStringAndVector
}
var _mTestTableWithStringAndVector = _bindings.CreateLazyMarshaler(TestTableWithStringAndVector{})
func (msg *TestTableWithStringAndVector) Marshaler() _bindings.Marshaler {
return _mTestTableWithStringAndVector
}
// Implements Payload.
func (_ *TestTableWithStringAndVector) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestTableWithStringAndVector) InlineSize() int {
return 16
}
type Int64Struct struct {
_ struct{} `fidl2:"s,8,8"`
X int64
}
var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{})
func (msg *Int64Struct) Marshaler() _bindings.Marshaler {
return _mInt64Struct
}
// Implements Payload.
func (_ *Int64Struct) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *Int64Struct) InlineSize() int {
return 8
}
type TestInlineXUnionInStruct struct {
_ struct{} `fidl2:"s,56,8"`
Before string
Xu SampleXUnion
After string
}
var _mTestInlineXUnionInStruct = _bindings.CreateLazyMarshaler(TestInlineXUnionInStruct{})
func (msg *TestInlineXUnionInStruct) Marshaler() _bindings.Marshaler {
return _mTestInlineXUnionInStruct
}
// Implements Payload.
func (_ *TestInlineXUnionInStruct) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestInlineXUnionInStruct) InlineSize() int {
return 56
}
type TestOptionalXUnionInStruct struct {
_ struct{} `fidl2:"s,56,8"`
Before string
Xu *SampleXUnion
After string
}
var _mTestOptionalXUnionInStruct = _bindings.CreateLazyMarshaler(TestOptionalXUnionInStruct{})
func (msg *TestOptionalXUnionInStruct) Marshaler() _bindings.Marshaler {
return _mTestOptionalXUnionInStruct
}
// Implements Payload.
func (_ *TestOptionalXUnionInStruct) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestOptionalXUnionInStruct) InlineSize() int {
return 56
}
type TestXUnionInTable struct {
_ struct{} `fidl2:"s,16,8"`
Value XUnionInTable
}
var _mTestXUnionInTable = _bindings.CreateLazyMarshaler(TestXUnionInTable{})
func (msg *TestXUnionInTable) Marshaler() _bindings.Marshaler {
return _mTestXUnionInTable
}
// Implements Payload.
func (_ *TestXUnionInTable) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestXUnionInTable) InlineSize() int {
return 16
}
type TestFuchsiaIoReadAtResponse struct {
_ struct{} `fidl2:"s,24,8"`
S int32
Data []uint8 `fidl:"8192" fidl2:"8192"`
}
var _mTestFuchsiaIoReadAtResponse = _bindings.CreateLazyMarshaler(TestFuchsiaIoReadAtResponse{})
func (msg *TestFuchsiaIoReadAtResponse) Marshaler() _bindings.Marshaler {
return _mTestFuchsiaIoReadAtResponse
}
// Implements Payload.
func (_ *TestFuchsiaIoReadAtResponse) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestFuchsiaIoReadAtResponse) InlineSize() int {
return 24
}
type TestFuchsiaIoWriteAtRequest struct {
_ struct{} `fidl2:"s,24,8"`
Data []uint8 `fidl:"8192" fidl2:"8192"`
Offset uint64
}
var _mTestFuchsiaIoWriteAtRequest = _bindings.CreateLazyMarshaler(TestFuchsiaIoWriteAtRequest{})
func (msg *TestFuchsiaIoWriteAtRequest) Marshaler() _bindings.Marshaler {
return _mTestFuchsiaIoWriteAtRequest
}
// Implements Payload.
func (_ *TestFuchsiaIoWriteAtRequest) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TestFuchsiaIoWriteAtRequest) InlineSize() int {
return 24
}
type Union1Tag uint32
const (
_ Union1Tag = iota
Union1A
Union1B
Union1C
Union1D
)
type Union1 struct {
Union1Tag `fidl:"tag" fidl2:"u,16,8"`
A [3]int8
B TestSimple
C *TestSimple
D float32
}
// Implements Payload.
func (_ *Union1) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *Union1) InlineSize() int {
return 16
}
func (u *Union1) Which() Union1Tag {
return u.Union1Tag
}
func (u *Union1) SetA(a [3]int8) {
u.Union1Tag = Union1A
u.A = a
}
func (u *Union1) SetB(b TestSimple) {
u.Union1Tag = Union1B
u.B = b
}
func (u *Union1) SetC(c *TestSimple) {
u.Union1Tag = Union1C
u.C = c
}
func (u *Union1) SetD(d float32) {
u.Union1Tag = Union1D
u.D = d
}
type SimpleUnionTag uint32
const (
_ SimpleUnionTag = iota
SimpleUnionI32
SimpleUnionI64
SimpleUnionS
SimpleUnionOs
SimpleUnionStr
)
type SimpleUnion struct {
SimpleUnionTag `fidl:"tag" fidl2:"u,24,8"`
I32 int32
I64 int64
S Int64Struct
Os *Int64Struct
Str string
}
// Implements Payload.
func (_ *SimpleUnion) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *SimpleUnion) InlineSize() int {
return 24
}
func (u *SimpleUnion) Which() SimpleUnionTag {
return u.SimpleUnionTag
}
func (u *SimpleUnion) SetI32(i32 int32) {
u.SimpleUnionTag = SimpleUnionI32
u.I32 = i32
}
func (u *SimpleUnion) SetI64(i64 int64) {
u.SimpleUnionTag = SimpleUnionI64
u.I64 = i64
}
func (u *SimpleUnion) SetS(s Int64Struct) {
u.SimpleUnionTag = SimpleUnionS
u.S = s
}
func (u *SimpleUnion) SetOs(os *Int64Struct) {
u.SimpleUnionTag = SimpleUnionOs
u.Os = os
}
func (u *SimpleUnion) SetStr(str string) {
u.SimpleUnionTag = SimpleUnionStr
u.Str = str
}
type SampleXUnionTag uint32
const (
SampleXUnionU = 2039012153 // 0x7988db39
SampleXUnionSu = 1050654350 // 0x3e9fb68e
SampleXUnionSt = 1086116147 // 0x40bcd133
)
type SampleXUnion struct {
SampleXUnionTag `fidl2:"x,24,8"`
U uint32 `fidl:"2039012153" fidl2:"2039012153"`
Su SimpleUnion `fidl:"1050654350" fidl2:"1050654350"`
St SimpleTable `fidl:"1086116147" fidl2:"1086116147"`
}
// Implements Payload.
func (_ *SampleXUnion) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *SampleXUnion) InlineSize() int {
return 24
}
func (_m *SampleXUnion) Which() SampleXUnionTag {
return _m.SampleXUnionTag
}
func (_m *SampleXUnion) SetU(u uint32) {
_m.SampleXUnionTag = SampleXUnionU
_m.U = u
}
func (_m *SampleXUnion) SetSu(su SimpleUnion) {
_m.SampleXUnionTag = SampleXUnionSu
_m.Su = su
}
func (_m *SampleXUnion) SetSt(st SimpleTable) {
_m.SampleXUnionTag = SampleXUnionSt
_m.St = st
}
type SimpleTable struct {
_ struct{} `fidl2:"t,16,8"`
X int64 `fidl:"1" fidl2:"1"`
XPresent bool
Y int64 `fidl:"5" fidl2:"5"`
YPresent bool
}
// Implements Payload.
func (_ *SimpleTable) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *SimpleTable) InlineSize() int {
return 16
}
func (u *SimpleTable) SetX(x int64) {
u.X = x
u.XPresent = true
}
func (u *SimpleTable) GetX() int64 {
return u.X
}
func (u *SimpleTable) HasX() bool {
return u.XPresent
}
func (u *SimpleTable) ClearX() {
u.XPresent = false
}
func (u *SimpleTable) SetY(y int64) {
u.Y = y
u.YPresent = true
}
func (u *SimpleTable) GetY() int64 {
return u.Y
}
func (u *SimpleTable) HasY() bool {
return u.YPresent
}
func (u *SimpleTable) ClearY() {
u.YPresent = false
}
type OlderSimpleTable struct {
_ struct{} `fidl2:"t,16,8"`
X int64 `fidl:"1" fidl2:"1"`
XPresent bool
}
// Implements Payload.
func (_ *OlderSimpleTable) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *OlderSimpleTable) InlineSize() int {
return 16
}
func (u *OlderSimpleTable) SetX(x int64) {
u.X = x
u.XPresent = true
}
func (u *OlderSimpleTable) GetX() int64 {
return u.X
}
func (u *OlderSimpleTable) HasX() bool {
return u.XPresent
}
func (u *OlderSimpleTable) ClearX() {
u.XPresent = false
}
type NewerSimpleTable struct {
_ struct{} `fidl2:"t,16,8"`
X int64 `fidl:"1" fidl2:"1"`
XPresent bool
Y int64 `fidl:"5" fidl2:"5"`
YPresent bool
Z int64 `fidl:"6" fidl2:"6"`
ZPresent bool
}
// Implements Payload.
func (_ *NewerSimpleTable) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *NewerSimpleTable) InlineSize() int {
return 16
}
func (u *NewerSimpleTable) SetX(x int64) {
u.X = x
u.XPresent = true
}
func (u *NewerSimpleTable) GetX() int64 {
return u.X
}
func (u *NewerSimpleTable) HasX() bool {
return u.XPresent
}
func (u *NewerSimpleTable) ClearX() {
u.XPresent = false
}
func (u *NewerSimpleTable) SetY(y int64) {
u.Y = y
u.YPresent = true
}
func (u *NewerSimpleTable) GetY() int64 {
return u.Y
}
func (u *NewerSimpleTable) HasY() bool {
return u.YPresent
}
func (u *NewerSimpleTable) ClearY() {
u.YPresent = false
}
func (u *NewerSimpleTable) SetZ(z int64) {
u.Z = z
u.ZPresent = true
}
func (u *NewerSimpleTable) GetZ() int64 {
return u.Z
}
func (u *NewerSimpleTable) HasZ() bool {
return u.ZPresent
}
func (u *NewerSimpleTable) ClearZ() {
u.ZPresent = false
}
type TableWithStringAndVector struct {
_ struct{} `fidl2:"t,16,8"`
Foo string `fidl:",1" fidl2:"1,"`
FooPresent bool
Bar int32 `fidl:"2" fidl2:"2"`
BarPresent bool
Baz []uint8 `fidl:",3" fidl2:"3,"`
BazPresent bool
}
// Implements Payload.
func (_ *TableWithStringAndVector) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *TableWithStringAndVector) InlineSize() int {
return 16
}
func (u *TableWithStringAndVector) SetFoo(foo string) {
u.Foo = foo
u.FooPresent = true
}
func (u *TableWithStringAndVector) GetFoo() string {
return u.Foo
}
func (u *TableWithStringAndVector) HasFoo() bool {
return u.FooPresent
}
func (u *TableWithStringAndVector) ClearFoo() {
u.FooPresent = false
}
func (u *TableWithStringAndVector) SetBar(bar int32) {
u.Bar = bar
u.BarPresent = true
}
func (u *TableWithStringAndVector) GetBar() int32 {
return u.Bar
}
func (u *TableWithStringAndVector) HasBar() bool {
return u.BarPresent
}
func (u *TableWithStringAndVector) ClearBar() {
u.BarPresent = false
}
func (u *TableWithStringAndVector) SetBaz(baz []uint8) {
u.Baz = baz
u.BazPresent = true
}
func (u *TableWithStringAndVector) GetBaz() []uint8 {
return u.Baz
}
func (u *TableWithStringAndVector) HasBaz() bool {
return u.BazPresent
}
func (u *TableWithStringAndVector) ClearBaz() {
u.BazPresent = false
}
type XUnionInTable struct {
_ struct{} `fidl2:"t,16,8"`
Before string `fidl:",1" fidl2:"1,"`
BeforePresent bool
Xu SampleXUnion `fidl:"2" fidl2:"2"`
XuPresent bool
After string `fidl:",3" fidl2:"3,"`
AfterPresent bool
}
// Implements Payload.
func (_ *XUnionInTable) InlineAlignment() int {
return 8
}
// Implements Payload.
func (_ *XUnionInTable) InlineSize() int {
return 16
}
func (u *XUnionInTable) SetBefore(before string) {
u.Before = before
u.BeforePresent = true
}
func (u *XUnionInTable) GetBefore() string {
return u.Before
}
func (u *XUnionInTable) HasBefore() bool {
return u.BeforePresent
}
func (u *XUnionInTable) ClearBefore() {
u.BeforePresent = false
}
func (u *XUnionInTable) SetXu(xu SampleXUnion) {
u.Xu = xu
u.XuPresent = true
}
func (u *XUnionInTable) GetXu() SampleXUnion {
return u.Xu
}
func (u *XUnionInTable) HasXu() bool {
return u.XuPresent
}
func (u *XUnionInTable) ClearXu() {
u.XuPresent = false
}
func (u *XUnionInTable) SetAfter(after string) {
u.After = after
u.AfterPresent = true
}
func (u *XUnionInTable) GetAfter() string {
return u.After
}
func (u *XUnionInTable) HasAfter() bool {
return u.AfterPresent
}
func (u *XUnionInTable) ClearAfter() {
u.AfterPresent = false
}
const (
Test1EchoOrdinal uint32 = 1246312959
Test1EchoGenOrdinal uint32 = 1246312959
Test1SurpriseOrdinal uint32 = 1272344178
Test1SurpriseGenOrdinal uint32 = 1272344178
)
type Test1EchoRequest struct {
_ struct{} `fidl2:"s,16,0"`
In *string
}
var _mTest1EchoRequest = _bindings.CreateLazyMarshaler(Test1EchoRequest{})
func (msg *Test1EchoRequest) Marshaler() _bindings.Marshaler {
return _mTest1EchoRequest
}
// Implements Payload.
func (_ *Test1EchoRequest) InlineAlignment() int {
return 0
}
// Implements Payload.
func (_ *Test1EchoRequest) InlineSize() int {
return 16
}
type Test1EchoResponse struct {
_ struct{} `fidl2:"s,16,0"`
Out *string
}
var _mTest1EchoResponse = _bindings.CreateLazyMarshaler(Test1EchoResponse{})
func (msg *Test1EchoResponse) Marshaler() _bindings.Marshaler {
return _mTest1EchoResponse
}
// Implements Payload.
func (_ *Test1EchoResponse) InlineAlignment() int {
return 0
}
// Implements Payload.
func (_ *Test1EchoResponse) InlineSize() int {
return 16
}
type Test1SurpriseResponse struct {
_ struct{} `fidl2:"s,16,0"`
Foo string
}
var _mTest1SurpriseResponse = _bindings.CreateLazyMarshaler(Test1SurpriseResponse{})
func (msg *Test1SurpriseResponse) Marshaler() _bindings.Marshaler {
return _mTest1SurpriseResponse
}
// Implements Payload.
func (_ *Test1SurpriseResponse) InlineAlignment() int {
return 0
}
// Implements Payload.
func (_ *Test1SurpriseResponse) InlineSize() int {
return 16
}
type Test1Interface _bindings.ChannelProxy
func (p *Test1Interface) Echo(in *string) (*string, error) {
req_ := &Test1EchoRequest{
In: in,
}
resp_ := &Test1EchoResponse{}
err := ((*_bindings.ChannelProxy)(p)).Call(Test1EchoOrdinal, req_, resp_)
return resp_.Out, err
}
func (p *Test1Interface) ExpectSurprise() (string, error) {
resp_ := &Test1SurpriseResponse{}
err := ((*_bindings.ChannelProxy)(p)).Recv(Test1SurpriseOrdinal, resp_)
return resp_.Foo, err
}
type Test1 interface {
Echo(in *string) (*string, error)
}
type Test1TransitionalBase struct{}
type Test1InterfaceRequest _bindings.InterfaceRequest
func NewTest1InterfaceRequest() (Test1InterfaceRequest, *Test1Interface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return Test1InterfaceRequest(req), (*Test1Interface)(cli), err
}
type Test1Stub struct {
Impl Test1
}
func (s *Test1Stub) Dispatch(ord uint32, b_ []byte, h_ []_zx.Handle) (_bindings.Payload, error) {
switch ord {
case Test1EchoOrdinal:
in_ := Test1EchoRequest{}
if err_ := _bindings.Unmarshal(b_, h_, &in_); err_ != nil {
return nil, err_
}
out, err_ := s.Impl.Echo(in_.In)
out_ := Test1EchoResponse{}
out_.Out = out
return &out_, err_
}
return nil, _bindings.ErrUnknownOrdinal
}
type Test1Service struct {
_bindings.BindingSet
}
func (s *Test1Service) Add(impl Test1, c _zx.Channel, onError func(error)) (_bindings.BindingKey, error) {
return s.BindingSet.Add(&Test1Stub{Impl: impl}, c, onError)
}
func (s *Test1Service) EventProxyFor(key _bindings.BindingKey) (*Test1EventProxy, bool) {
pxy, err := s.BindingSet.ProxyFor(key)
return (*Test1EventProxy)(pxy), err
}
type Test1EventProxy _bindings.ChannelProxy
func (p *Test1EventProxy) Surprise(foo string) error {
event_ := &Test1SurpriseResponse{
Foo: foo,
}
return ((*_bindings.ChannelProxy)(p)).Send(Test1SurpriseOrdinal, event_)
}