blob: 814f58099a0ea7ce9124cf4e3dd2ecf70e87bf68 [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{} `fidl:"s,8,8" fidl2:"s,8,8"`
X int64 `fidl:"0"`
}
var _mTestSimple = _bindings.CreateLazyMarshaler(TestSimple{})
func (msg *TestSimple) Marshaler() _bindings.Marshaler {
return _mTestSimple
}
type TestSimpleBool struct {
_ struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
X bool `fidl:"0"`
}
var _mTestSimpleBool = _bindings.CreateLazyMarshaler(TestSimpleBool{})
func (msg *TestSimpleBool) Marshaler() _bindings.Marshaler {
return _mTestSimpleBool
}
type TestAlignment1 struct {
_ struct{} `fidl:"s,8,4" fidl2:"s,8,4"`
X int8 `fidl:"0"`
Y int8 `fidl:"1"`
Z uint32 `fidl:"4"`
}
var _mTestAlignment1 = _bindings.CreateLazyMarshaler(TestAlignment1{})
func (msg *TestAlignment1) Marshaler() _bindings.Marshaler {
return _mTestAlignment1
}
type TestAlignment2 struct {
_ struct{} `fidl:"s,20,4" fidl2:"s,20,4"`
A uint32 `fidl:"0"`
B uint32 `fidl:"4"`
C int8 `fidl:"8"`
D int8 `fidl:"9"`
E int8 `fidl:"10"`
F uint8 `fidl:"11"`
G uint32 `fidl:"12"`
H uint16 `fidl:"16"`
I uint16 `fidl:"18"`
}
var _mTestAlignment2 = _bindings.CreateLazyMarshaler(TestAlignment2{})
func (msg *TestAlignment2) Marshaler() _bindings.Marshaler {
return _mTestAlignment2
}
type TestFloat1 struct {
_ struct{} `fidl:"s,4,4" fidl2:"s,4,4"`
A float32 `fidl:"0"`
}
var _mTestFloat1 = _bindings.CreateLazyMarshaler(TestFloat1{})
func (msg *TestFloat1) Marshaler() _bindings.Marshaler {
return _mTestFloat1
}
type TestFloat2 struct {
_ struct{} `fidl:"s,8,8" fidl2:"s,8,8"`
A float64 `fidl:"0"`
}
var _mTestFloat2 = _bindings.CreateLazyMarshaler(TestFloat2{})
func (msg *TestFloat2) Marshaler() _bindings.Marshaler {
return _mTestFloat2
}
type TestFloat3 struct {
_ struct{} `fidl:"s,32,8" fidl2:"s,32,8"`
A float32 `fidl:"0"`
B float64 `fidl:"8"`
C uint64 `fidl:"16"`
D float32 `fidl:"24"`
}
var _mTestFloat3 = _bindings.CreateLazyMarshaler(TestFloat3{})
func (msg *TestFloat3) Marshaler() _bindings.Marshaler {
return _mTestFloat3
}
type TestArray1 struct {
_ struct{} `fidl:"s,5,1" fidl2:"s,5,1"`
A [5]int8 `fidl:"0"`
}
var _mTestArray1 = _bindings.CreateLazyMarshaler(TestArray1{})
func (msg *TestArray1) Marshaler() _bindings.Marshaler {
return _mTestArray1
}
type TestArray2 struct {
_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
A float64 `fidl:"0"`
B [1]float32 `fidl:"8"`
}
var _mTestArray2 = _bindings.CreateLazyMarshaler(TestArray2{})
func (msg *TestArray2) Marshaler() _bindings.Marshaler {
return _mTestArray2
}
type TestArray3 struct {
_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
A int32 `fidl:"0"`
B [3]uint16 `fidl:"4"`
C uint64 `fidl:"16"`
}
var _mTestArray3 = _bindings.CreateLazyMarshaler(TestArray3{})
func (msg *TestArray3) Marshaler() _bindings.Marshaler {
return _mTestArray3
}
type TestArray4 struct {
_ struct{} `fidl:"s,9,1" fidl2:"s,9,1"`
A [9]bool `fidl:"0"`
}
var _mTestArray4 = _bindings.CreateLazyMarshaler(TestArray4{})
func (msg *TestArray4) Marshaler() _bindings.Marshaler {
return _mTestArray4
}
type TestString1 struct {
_ struct{} `fidl:"s,32,8" fidl2:"s,32,8"`
A string `fidl:"0,"`
B *string `fidl:"16,"`
}
var _mTestString1 = _bindings.CreateLazyMarshaler(TestString1{})
func (msg *TestString1) Marshaler() _bindings.Marshaler {
return _mTestString1
}
type TestString2 struct {
_ struct{} `fidl:"s,32,8" fidl2:"s,32,8"`
A [2]string `fidl:"0,"`
}
var _mTestString2 = _bindings.CreateLazyMarshaler(TestString2{})
func (msg *TestString2) Marshaler() _bindings.Marshaler {
return _mTestString2
}
type TestString3 struct {
_ struct{} `fidl:"s,64,8" fidl2:"s,64,8"`
A [2]string `fidl:"0,4" fidl2:"4"`
B [2]*string `fidl:"32,4" fidl2:"4"`
}
var _mTestString3 = _bindings.CreateLazyMarshaler(TestString3{})
func (msg *TestString3) Marshaler() _bindings.Marshaler {
return _mTestString3
}
type TestStringWithBound struct {
_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
A string `fidl:"0,8" fidl2:"8"`
}
var _mTestStringWithBound = _bindings.CreateLazyMarshaler(TestStringWithBound{})
func (msg *TestStringWithBound) Marshaler() _bindings.Marshaler {
return _mTestStringWithBound
}
type TestOptStringWithBound struct {
_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
A *string `fidl:"0,8" fidl2:"8"`
}
var _mTestOptStringWithBound = _bindings.CreateLazyMarshaler(TestOptStringWithBound{})
func (msg *TestOptStringWithBound) Marshaler() _bindings.Marshaler {
return _mTestOptStringWithBound
}
type TestVector1 struct {
_ struct{} `fidl:"s,64,8" fidl2:"s,64,8"`
A []int8 `fidl:"0,"`
B *[]int16 `fidl:"16,"`
C []int32 `fidl:"32,2" fidl2:"2"`
D *[]int64 `fidl:"48,2" fidl2:"2"`
}
var _mTestVector1 = _bindings.CreateLazyMarshaler(TestVector1{})
func (msg *TestVector1) Marshaler() _bindings.Marshaler {
return _mTestVector1
}
type TestVector2 struct {
_ struct{} `fidl:"s,64,8" fidl2:"s,64,8"`
A [2][]int8 `fidl:"0,"`
B [][]int8 `fidl:"32,2," fidl2:"2,"`
C []*[]string `fidl:"48,2,2,5" fidl2:"2,2,5"`
}
var _mTestVector2 = _bindings.CreateLazyMarshaler(TestVector2{})
func (msg *TestVector2) Marshaler() _bindings.Marshaler {
return _mTestVector2
}
type TestStruct1 struct {
_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
A TestSimple `fidl:"0"`
B *TestSimple `fidl:"8"`
}
var _mTestStruct1 = _bindings.CreateLazyMarshaler(TestStruct1{})
func (msg *TestStruct1) Marshaler() _bindings.Marshaler {
return _mTestStruct1
}
type TestStruct2 struct {
_ struct{} `fidl:"s,88,8" fidl2:"s,88,8"`
A TestArray1 `fidl:"0"`
B TestFloat1 `fidl:"8"`
C TestVector1 `fidl:"16"`
D *TestString1 `fidl:"80"`
}
var _mTestStruct2 = _bindings.CreateLazyMarshaler(TestStruct2{})
func (msg *TestStruct2) Marshaler() _bindings.Marshaler {
return _mTestStruct2
}
type EmptyStruct struct {
_ struct{} `fidl:"s,1,1" fidl2:"s,1,1"`
}
var _mEmptyStruct = _bindings.CreateLazyMarshaler(EmptyStruct{})
func (msg *EmptyStruct) Marshaler() _bindings.Marshaler {
return _mEmptyStruct
}
type TestUnion1 struct {
_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
A Union1 `fidl:"0"`
B *Union1 `fidl:"16"`
}
var _mTestUnion1 = _bindings.CreateLazyMarshaler(TestUnion1{})
func (msg *TestUnion1) Marshaler() _bindings.Marshaler {
return _mTestUnion1
}
type TestUnion2 struct {
_ struct{} `fidl:"s,32,8" fidl2:"s,32,8"`
A []Union1 `fidl:"0,"`
B []*Union1 `fidl:"16,"`
}
var _mTestUnion2 = _bindings.CreateLazyMarshaler(TestUnion2{})
func (msg *TestUnion2) Marshaler() _bindings.Marshaler {
return _mTestUnion2
}
type XUnion1Struct struct {
_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
Xu XUnion1 `fidl:"0"`
}
var _mXUnion1Struct = _bindings.CreateLazyMarshaler(XUnion1Struct{})
func (msg *XUnion1Struct) Marshaler() _bindings.Marshaler {
return _mXUnion1Struct
}
type XUnion1AsUnionStruct struct {
_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
Xuau XUnion1AsUnion `fidl:"0"`
}
var _mXUnion1AsUnionStruct = _bindings.CreateLazyMarshaler(XUnion1AsUnionStruct{})
func (msg *XUnion1AsUnionStruct) Marshaler() _bindings.Marshaler {
return _mXUnion1AsUnionStruct
}
type TestXUnion1 struct {
_ struct{} `fidl:"s,48,8" fidl2:"s,48,8"`
A XUnion1 `fidl:"0"`
B *XUnion1 `fidl:"24"`
}
var _mTestXUnion1 = _bindings.CreateLazyMarshaler(TestXUnion1{})
func (msg *TestXUnion1) Marshaler() _bindings.Marshaler {
return _mTestXUnion1
}
type TestXUnion2 struct {
_ struct{} `fidl:"s,32,8" fidl2:"s,32,8"`
A []XUnion1 `fidl:"0,"`
B []*XUnion1 `fidl:"16,"`
}
var _mTestXUnion2 = _bindings.CreateLazyMarshaler(TestXUnion2{})
func (msg *TestXUnion2) Marshaler() _bindings.Marshaler {
return _mTestXUnion2
}
type StrictXUnion1Struct struct {
_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
Xu StrictXUnion1 `fidl:"0"`
}
var _mStrictXUnion1Struct = _bindings.CreateLazyMarshaler(StrictXUnion1Struct{})
func (msg *StrictXUnion1Struct) Marshaler() _bindings.Marshaler {
return _mStrictXUnion1Struct
}
type TestStrictXUnion1 struct {
_ struct{} `fidl:"s,48,8" fidl2:"s,48,8"`
A StrictXUnion1 `fidl:"0"`
B *StrictXUnion1 `fidl:"24"`
}
var _mTestStrictXUnion1 = _bindings.CreateLazyMarshaler(TestStrictXUnion1{})
func (msg *TestStrictXUnion1) Marshaler() _bindings.Marshaler {
return _mTestStrictXUnion1
}
type TestStrictXUnion2 struct {
_ struct{} `fidl:"s,32,8" fidl2:"s,32,8"`
A []StrictXUnion1 `fidl:"0,"`
B []*StrictXUnion1 `fidl:"16,"`
}
var _mTestStrictXUnion2 = _bindings.CreateLazyMarshaler(TestStrictXUnion2{})
func (msg *TestStrictXUnion2) Marshaler() _bindings.Marshaler {
return _mTestStrictXUnion2
}
type TestHandle1 struct {
_ struct{} `fidl:"s,16,4" fidl2:"s,16,4"`
A _zx.Handle `fidl:"0,0" fidl2:"0"`
B _zx.Handle `fidl:"4,1" fidl2:"1"`
C _zx.VMO `fidl:"8,0" fidl2:"0"`
D _zx.VMO `fidl:"12,1" fidl2:"1"`
}
var _mTestHandle1 = _bindings.CreateLazyMarshaler(TestHandle1{})
func (msg *TestHandle1) Marshaler() _bindings.Marshaler {
return _mTestHandle1
}
type TestHandle2 struct {
_ struct{} `fidl:"s,32,8" fidl2:"s,32,8"`
A []_zx.Handle `fidl:"0,1,0" fidl2:"1,0"`
B []_zx.VMO `fidl:"16,1,1" fidl2:"1,1"`
}
var _mTestHandle2 = _bindings.CreateLazyMarshaler(TestHandle2{})
func (msg *TestHandle2) Marshaler() _bindings.Marshaler {
return _mTestHandle2
}
type TestInterface1 struct {
_ struct{} `fidl:"s,16,4" fidl2:"s,16,4"`
A Test1Interface `fidl:"0"`
B Test1Interface `fidl:"4"`
C Test1InterfaceRequest `fidl:"8,0" fidl2:"0"`
D Test1InterfaceRequest `fidl:"12,1" fidl2:"1"`
}
var _mTestInterface1 = _bindings.CreateLazyMarshaler(TestInterface1{})
func (msg *TestInterface1) Marshaler() _bindings.Marshaler {
return _mTestInterface1
}
type TestSimpleTable struct {
_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
Table SimpleTable `fidl:"0"`
}
var _mTestSimpleTable = _bindings.CreateLazyMarshaler(TestSimpleTable{})
func (msg *TestSimpleTable) Marshaler() _bindings.Marshaler {
return _mTestSimpleTable
}
type TestOlderSimpleTable struct {
_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
Table OlderSimpleTable `fidl:"0"`
}
var _mTestOlderSimpleTable = _bindings.CreateLazyMarshaler(TestOlderSimpleTable{})
func (msg *TestOlderSimpleTable) Marshaler() _bindings.Marshaler {
return _mTestOlderSimpleTable
}
type TestNewerSimpleTable struct {
_ struct{} `fidl:"s,16,8" fidl2:"s,16,8"`
Table NewerSimpleTable `fidl:"0"`
}
var _mTestNewerSimpleTable = _bindings.CreateLazyMarshaler(TestNewerSimpleTable{})
func (msg *TestNewerSimpleTable) Marshaler() _bindings.Marshaler {
return _mTestNewerSimpleTable
}
type TestWithTableAndInt struct {
_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
Table SimpleTable `fidl:"0"`
Foo uint64 `fidl:"16"`
}
var _mTestWithTableAndInt = _bindings.CreateLazyMarshaler(TestWithTableAndInt{})
func (msg *TestWithTableAndInt) Marshaler() _bindings.Marshaler {
return _mTestWithTableAndInt
}
type Int64Struct struct {
_ struct{} `fidl:"s,8,8" fidl2:"s,8,8"`
X int64 `fidl:"0"`
}
var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{})
func (msg *Int64Struct) Marshaler() _bindings.Marshaler {
return _mInt64Struct
}
type TestFuchsiaIoReadAtResponse struct {
_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
S int32 `fidl:"0"`
Data []uint8 `fidl:"8,8192" fidl2:"8192"`
}
var _mTestFuchsiaIoReadAtResponse = _bindings.CreateLazyMarshaler(TestFuchsiaIoReadAtResponse{})
func (msg *TestFuchsiaIoReadAtResponse) Marshaler() _bindings.Marshaler {
return _mTestFuchsiaIoReadAtResponse
}
type TestFuchsiaIoWriteAtRequest struct {
_ struct{} `fidl:"s,24,8" fidl2:"s,24,8"`
Data []uint8 `fidl:"0,8192" fidl2:"8192"`
Offset uint64 `fidl:"16"`
}
var _mTestFuchsiaIoWriteAtRequest = _bindings.CreateLazyMarshaler(TestFuchsiaIoWriteAtRequest{})
func (msg *TestFuchsiaIoWriteAtRequest) Marshaler() _bindings.Marshaler {
return _mTestFuchsiaIoWriteAtRequest
}
type InterfaceConfig struct {
_ struct{} `fidl:"s,48,8" fidl2:"s,48,8"`
Name string `fidl:"0,"`
IpAddressConfig IpAddressConfig `fidl:"16"`
}
var _mInterfaceConfig = _bindings.CreateLazyMarshaler(InterfaceConfig{})
func (msg *InterfaceConfig) Marshaler() _bindings.Marshaler {
return _mInterfaceConfig
}
type TestAddEthernetDeviceRequest struct {
_ struct{} `fidl:"s,72,8" fidl2:"s,72,8"`
TopologicalPath string `fidl:"0,"`
Config InterfaceConfig `fidl:"16"`
Device EthernetDeviceInterface `fidl:"64"`
}
var _mTestAddEthernetDeviceRequest = _bindings.CreateLazyMarshaler(TestAddEthernetDeviceRequest{})
func (msg *TestAddEthernetDeviceRequest) Marshaler() _bindings.Marshaler {
return _mTestAddEthernetDeviceRequest
}
type I_union1Tag uint32
const (
_ I_union1Tag = iota
Union1A
Union1B
Union1C
Union1D
)
type Union1 struct {
I_union1Tag `fidl:"u,16,8" fidl2:"u,16,8"`
A [3]int8 `fidl:"1140208200" fidl2:"1140208200"`
B TestSimple `fidl:"1101191659" fidl2:"1101191659"`
C *TestSimple `fidl:"310804024" fidl2:"310804024"`
D float32 `fidl:"1193101976" fidl2:"1193101976"`
}
func (u *Union1) Which() I_union1Tag {
return u.I_union1Tag
}
func (u *Union1) SetA(a [3]int8) {
u.I_union1Tag = Union1A
u.A = a
}
func Union1WithA(a [3]int8) Union1 {
var _u Union1
_u.SetA(a)
return _u
}
func (u *Union1) SetB(b TestSimple) {
u.I_union1Tag = Union1B
u.B = b
}
func Union1WithB(b TestSimple) Union1 {
var _u Union1
_u.SetB(b)
return _u
}
func (u *Union1) SetC(c *TestSimple) {
u.I_union1Tag = Union1C
u.C = c
}
func Union1WithC(c *TestSimple) Union1 {
var _u Union1
_u.SetC(c)
return _u
}
func (u *Union1) SetD(d float32) {
u.I_union1Tag = Union1D
u.D = d
}
func Union1WithD(d float32) Union1 {
var _u Union1
_u.SetD(d)
return _u
}
type I_xUnion1AsUnionTag uint32
const (
_ I_xUnion1AsUnionTag = iota
XUnion1AsUnionA
XUnion1AsUnionB
XUnion1AsUnionD
)
type XUnion1AsUnion struct {
I_xUnion1AsUnionTag `fidl:"u,16,8" fidl2:"u,16,8"`
A [3]int8 `fidl:"1815116267" fidl2:"1815116267"`
B TestSimple `fidl:"219568201" fidl2:"219568201"`
D float32 `fidl:"1047172132" fidl2:"1047172132"`
}
func (u *XUnion1AsUnion) Which() I_xUnion1AsUnionTag {
return u.I_xUnion1AsUnionTag
}
func (u *XUnion1AsUnion) SetA(a [3]int8) {
u.I_xUnion1AsUnionTag = XUnion1AsUnionA
u.A = a
}
func XUnion1AsUnionWithA(a [3]int8) XUnion1AsUnion {
var _u XUnion1AsUnion
_u.SetA(a)
return _u
}
func (u *XUnion1AsUnion) SetB(b TestSimple) {
u.I_xUnion1AsUnionTag = XUnion1AsUnionB
u.B = b
}
func XUnion1AsUnionWithB(b TestSimple) XUnion1AsUnion {
var _u XUnion1AsUnion
_u.SetB(b)
return _u
}
func (u *XUnion1AsUnion) SetD(d float32) {
u.I_xUnion1AsUnionTag = XUnion1AsUnionD
u.D = d
}
func XUnion1AsUnionWithD(d float32) XUnion1AsUnion {
var _u XUnion1AsUnion
_u.SetD(d)
return _u
}
type I_simpleUnionTag uint32
const (
_ I_simpleUnionTag = iota
SimpleUnionI32
SimpleUnionI64
SimpleUnionS
SimpleUnionOs
SimpleUnionStr
)
type SimpleUnion struct {
I_simpleUnionTag `fidl:"u,24,8" fidl2:"u,24,8"`
I32 int32 `fidl:"2133387115" fidl2:"2133387115"`
I64 int64 `fidl:"809723265" fidl2:"809723265"`
S Int64Struct `fidl:"1133668882" fidl2:"1133668882"`
Os *Int64Struct `fidl:"1823223580" fidl2:"1823223580"`
Str string `fidl:"1886911784," fidl2:"1886911784,"`
}
func (u *SimpleUnion) Which() I_simpleUnionTag {
return u.I_simpleUnionTag
}
func (u *SimpleUnion) SetI32(i32 int32) {
u.I_simpleUnionTag = SimpleUnionI32
u.I32 = i32
}
func SimpleUnionWithI32(i32 int32) SimpleUnion {
var _u SimpleUnion
_u.SetI32(i32)
return _u
}
func (u *SimpleUnion) SetI64(i64 int64) {
u.I_simpleUnionTag = SimpleUnionI64
u.I64 = i64
}
func SimpleUnionWithI64(i64 int64) SimpleUnion {
var _u SimpleUnion
_u.SetI64(i64)
return _u
}
func (u *SimpleUnion) SetS(s Int64Struct) {
u.I_simpleUnionTag = SimpleUnionS
u.S = s
}
func SimpleUnionWithS(s Int64Struct) SimpleUnion {
var _u SimpleUnion
_u.SetS(s)
return _u
}
func (u *SimpleUnion) SetOs(os *Int64Struct) {
u.I_simpleUnionTag = SimpleUnionOs
u.Os = os
}
func SimpleUnionWithOs(os *Int64Struct) SimpleUnion {
var _u SimpleUnion
_u.SetOs(os)
return _u
}
func (u *SimpleUnion) SetStr(str string) {
u.I_simpleUnionTag = SimpleUnionStr
u.Str = str
}
func SimpleUnionWithStr(str string) SimpleUnion {
var _u SimpleUnion
_u.SetStr(str)
return _u
}
type I_ipAddressConfigTag uint32
const (
_ I_ipAddressConfigTag = iota
IpAddressConfigPaddingSize24Align4
IpAddressConfigDhcp
)
type IpAddressConfig struct {
I_ipAddressConfigTag `fidl:"u,28,4" fidl2:"u,28,4"`
PaddingSize24Align4 [6]uint32 `fidl:"1850696643" fidl2:"1850696643"`
Dhcp bool `fidl:"500027731" fidl2:"500027731"`
}
func (u *IpAddressConfig) Which() I_ipAddressConfigTag {
return u.I_ipAddressConfigTag
}
func (u *IpAddressConfig) SetPaddingSize24Align4(paddingSize24Align4 [6]uint32) {
u.I_ipAddressConfigTag = IpAddressConfigPaddingSize24Align4
u.PaddingSize24Align4 = paddingSize24Align4
}
func IpAddressConfigWithPaddingSize24Align4(paddingSize24Align4 [6]uint32) IpAddressConfig {
var _u IpAddressConfig
_u.SetPaddingSize24Align4(paddingSize24Align4)
return _u
}
func (u *IpAddressConfig) SetDhcp(dhcp bool) {
u.I_ipAddressConfigTag = IpAddressConfigDhcp
u.Dhcp = dhcp
}
func IpAddressConfigWithDhcp(dhcp bool) IpAddressConfig {
var _u IpAddressConfig
_u.SetDhcp(dhcp)
return _u
}
type I_xUnion1Tag uint32
const (
XUnion1_unknownData = 0 // 0x00000000
XUnion1A = 416714395 // 0x18d68e9b
XUnion1B = 863456686 // 0x33774dae
XUnion1D = 1912225229 // 0x71fa3dcd
)
type XUnion1 struct {
I_xUnion1Tag `fidl:"x,24,8" fidl2:"x,24,8"`
I_unknownData []byte
A [3]int8 `fidl:"416714395" fidl2:"416714395"`
B TestSimple `fidl:"863456686" fidl2:"863456686"`
D float32 `fidl:"1912225229" fidl2:"1912225229"`
}
func (_m *XUnion1) Which() I_xUnion1Tag {
switch _m.I_xUnion1Tag {
case 416714395:
return XUnion1A
case 863456686:
return XUnion1B
case 1912225229:
return XUnion1D
default:
return XUnion1_unknownData
}
}
func (_m *XUnion1) Ordinal() uint32 {
return uint32(_m.I_xUnion1Tag)
}
func (_m *XUnion1) SetA(a [3]int8) {
_m.I_xUnion1Tag = XUnion1A
_m.A = a
}
func XUnion1WithA(a [3]int8) XUnion1 {
var _u XUnion1
_u.SetA(a)
return _u
}
func (_m *XUnion1) SetB(b TestSimple) {
_m.I_xUnion1Tag = XUnion1B
_m.B = b
}
func XUnion1WithB(b TestSimple) XUnion1 {
var _u XUnion1
_u.SetB(b)
return _u
}
func (_m *XUnion1) SetD(d float32) {
_m.I_xUnion1Tag = XUnion1D
_m.D = d
}
func XUnion1WithD(d float32) XUnion1 {
var _u XUnion1
_u.SetD(d)
return _u
}
type I_strictXUnion1Tag uint32
const (
StrictXUnion1A = 1988029217 // 0x767eeb21
StrictXUnion1B = 1259078458 // 0x4b0c033a
StrictXUnion1D = 881204552 // 0x34861d48
)
type StrictXUnion1 struct {
I_strictXUnion1Tag `fidl:"x!,24,8" fidl2:"x!,24,8"`
I_unknownData []byte
A [3]int8 `fidl:"1988029217" fidl2:"1988029217"`
B TestSimple `fidl:"1259078458" fidl2:"1259078458"`
D float32 `fidl:"881204552" fidl2:"881204552"`
}
func (_m *StrictXUnion1) Which() I_strictXUnion1Tag {
return _m.I_strictXUnion1Tag
}
func (_m *StrictXUnion1) Ordinal() uint32 {
return uint32(_m.I_strictXUnion1Tag)
}
func (_m *StrictXUnion1) SetA(a [3]int8) {
_m.I_strictXUnion1Tag = StrictXUnion1A
_m.A = a
}
func StrictXUnion1WithA(a [3]int8) StrictXUnion1 {
var _u StrictXUnion1
_u.SetA(a)
return _u
}
func (_m *StrictXUnion1) SetB(b TestSimple) {
_m.I_strictXUnion1Tag = StrictXUnion1B
_m.B = b
}
func StrictXUnion1WithB(b TestSimple) StrictXUnion1 {
var _u StrictXUnion1
_u.SetB(b)
return _u
}
func (_m *StrictXUnion1) SetD(d float32) {
_m.I_strictXUnion1Tag = StrictXUnion1D
_m.D = d
}
func StrictXUnion1WithD(d float32) StrictXUnion1 {
var _u StrictXUnion1
_u.SetD(d)
return _u
}
type SimpleTable struct {
_ struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
X int64 `fidl:"1" fidl2:"1"`
XPresent bool
Y int64 `fidl:"5" fidl2:"5"`
YPresent bool
}
func (u *SimpleTable) SetX(x int64) {
u.X = x
u.XPresent = true
}
func (u *SimpleTable) GetX() int64 {
return u.X
}
func (u *SimpleTable) GetXWithDefault(_default int64) int64 {
if !u.HasX() {
return _default
}
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) GetYWithDefault(_default int64) int64 {
if !u.HasY() {
return _default
}
return u.Y
}
func (u *SimpleTable) HasY() bool {
return u.YPresent
}
func (u *SimpleTable) ClearY() {
u.YPresent = false
}
type OlderSimpleTable struct {
_ struct{} `fidl:"t,16,8" fidl2:"t,16,8"`
X int64 `fidl:"1" fidl2:"1"`
XPresent bool
}
func (u *OlderSimpleTable) SetX(x int64) {
u.X = x
u.XPresent = true
}
func (u *OlderSimpleTable) GetX() int64 {
return u.X
}
func (u *OlderSimpleTable) GetXWithDefault(_default int64) int64 {
if !u.HasX() {
return _default
}
return u.X
}
func (u *OlderSimpleTable) HasX() bool {
return u.XPresent
}
func (u *OlderSimpleTable) ClearX() {
u.XPresent = false
}
type NewerSimpleTable struct {
_ struct{} `fidl:"t,16,8" 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
}
func (u *NewerSimpleTable) SetX(x int64) {
u.X = x
u.XPresent = true
}
func (u *NewerSimpleTable) GetX() int64 {
return u.X
}
func (u *NewerSimpleTable) GetXWithDefault(_default int64) int64 {
if !u.HasX() {
return _default
}
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) GetYWithDefault(_default int64) int64 {
if !u.HasY() {
return _default
}
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) GetZWithDefault(_default int64) int64 {
if !u.HasZ() {
return _default
}
return u.Z
}
func (u *NewerSimpleTable) HasZ() bool {
return u.ZPresent
}
func (u *NewerSimpleTable) ClearZ() {
u.ZPresent = false
}
const (
Test1EchoOrdinal uint64 = 0x4a4939ff00000000
Test1EchoGenOrdinal uint64 = 0x4adc92c9e871ae62
Test1NoResponseOrdinal uint64 = 0x7e0c050500000000
Test1NoResponseGenOrdinal uint64 = 0x584f4d438578f337
Test1EmptyResponseOrdinal uint64 = 0x648de0d00000000
Test1EmptyResponseGenOrdinal uint64 = 0x12ee80a1f8a85427
Test1SurpriseOrdinal uint64 = 0x4bd66e7200000000
Test1SurpriseGenOrdinal uint64 = 0xf93fd4731796fd9
)
type test1EchoRequest struct {
_ struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
In *string
}
var _mtest1EchoRequest = _bindings.CreateLazyMarshaler(test1EchoRequest{})
func (msg *test1EchoRequest) Marshaler() _bindings.Marshaler {
return _mtest1EchoRequest
}
type test1EchoResponse struct {
_ struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
Out *string
}
var _mtest1EchoResponse = _bindings.CreateLazyMarshaler(test1EchoResponse{})
func (msg *test1EchoResponse) Marshaler() _bindings.Marshaler {
return _mtest1EchoResponse
}
type test1SurpriseResponse struct {
_ struct{} `fidl:"s,16,0" fidl2:"s,16,0"`
Foo string
}
var _mtest1SurpriseResponse = _bindings.CreateLazyMarshaler(test1SurpriseResponse{})
func (msg *test1SurpriseResponse) Marshaler() _bindings.Marshaler {
return _mtest1SurpriseResponse
}
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_, Test1EchoOrdinal, Test1EchoGenOrdinal)
return resp_.Out, err
}
func (p *Test1Interface) NoResponse() error {
var req_ _bindings.Message
err := ((*_bindings.ChannelProxy)(p)).Send(Test1NoResponseOrdinal, req_)
return err
}
func (p *Test1Interface) EmptyResponse() error {
var req_ _bindings.Message
var resp_ _bindings.Message
err := ((*_bindings.ChannelProxy)(p)).Call(Test1EmptyResponseOrdinal, req_, resp_, Test1EmptyResponseOrdinal, Test1EmptyResponseGenOrdinal)
return err
}
func (p *Test1Interface) ExpectSurprise() (string, error) {
resp_ := &test1SurpriseResponse{}
err := ((*_bindings.ChannelProxy)(p)).Recv(Test1SurpriseOrdinal, resp_, Test1SurpriseGenOrdinal)
return resp_.Foo, err
}
type Test1 interface {
Echo(in *string) (*string, error)
NoResponse() error
EmptyResponse() 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) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
case Test1EchoOrdinal:
fallthrough
case Test1EchoGenOrdinal:
in_ := test1EchoRequest{}
if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
out, err_ := s_.Impl.Echo(in_.In)
out_ := test1EchoResponse{}
out_.Out = out
return &out_, true, err_
case Test1NoResponseOrdinal:
fallthrough
case Test1NoResponseGenOrdinal:
err_ := s_.Impl.NoResponse()
return nil, false, err_
case Test1EmptyResponseOrdinal:
fallthrough
case Test1EmptyResponseGenOrdinal:
err_ := s_.Impl.EmptyResponse()
return nil, true, err_
}
return nil, false, _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_)
}
type EthernetDeviceInterface _bindings.ChannelProxy
type EthernetDevice interface {
}
type EthernetDeviceTransitionalBase struct{}
type EthernetDeviceInterfaceRequest _bindings.InterfaceRequest
func NewEthernetDeviceInterfaceRequest() (EthernetDeviceInterfaceRequest, *EthernetDeviceInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return EthernetDeviceInterfaceRequest(req), (*EthernetDeviceInterface)(cli), err
}
type EthernetDeviceStub struct {
Impl EthernetDevice
}
func (s_ *EthernetDeviceStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type EthernetDeviceService struct {
_bindings.BindingSet
}
func (s *EthernetDeviceService) Add(impl EthernetDevice, c _zx.Channel, onError func(error)) (_bindings.BindingKey, error) {
return s.BindingSet.Add(&EthernetDeviceStub{Impl: impl}, c, onError)
}
func (s *EthernetDeviceService) EventProxyFor(key _bindings.BindingKey) (*EthernetDeviceEventProxy, bool) {
pxy, err := s.BindingSet.ProxyFor(key)
return (*EthernetDeviceEventProxy)(pxy), err
}
type EthernetDeviceEventProxy _bindings.ChannelProxy