| // 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 |
| } |
| |
| type TestSimpleBool struct { |
| _ struct{} `fidl2:"s,1,1"` |
| X bool |
| } |
| |
| var _mTestSimpleBool = _bindings.CreateLazyMarshaler(TestSimpleBool{}) |
| |
| func (msg *TestSimpleBool) Marshaler() _bindings.Marshaler { |
| return _mTestSimpleBool |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| type TestFloat1 struct { |
| _ struct{} `fidl2:"s,4,4"` |
| A float32 |
| } |
| |
| var _mTestFloat1 = _bindings.CreateLazyMarshaler(TestFloat1{}) |
| |
| func (msg *TestFloat1) Marshaler() _bindings.Marshaler { |
| return _mTestFloat1 |
| } |
| |
| type TestFloat2 struct { |
| _ struct{} `fidl2:"s,8,8"` |
| A float64 |
| } |
| |
| var _mTestFloat2 = _bindings.CreateLazyMarshaler(TestFloat2{}) |
| |
| func (msg *TestFloat2) Marshaler() _bindings.Marshaler { |
| return _mTestFloat2 |
| } |
| |
| 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 |
| } |
| |
| type TestArray1 struct { |
| _ struct{} `fidl2:"s,5,1"` |
| A [5]int8 |
| } |
| |
| var _mTestArray1 = _bindings.CreateLazyMarshaler(TestArray1{}) |
| |
| func (msg *TestArray1) Marshaler() _bindings.Marshaler { |
| return _mTestArray1 |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| type TestArray4 struct { |
| _ struct{} `fidl2:"s,9,1"` |
| A [9]bool |
| } |
| |
| var _mTestArray4 = _bindings.CreateLazyMarshaler(TestArray4{}) |
| |
| func (msg *TestArray4) Marshaler() _bindings.Marshaler { |
| return _mTestArray4 |
| } |
| |
| 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 |
| } |
| |
| type TestString2 struct { |
| _ struct{} `fidl2:"s,32,8"` |
| A [2]string |
| } |
| |
| var _mTestString2 = _bindings.CreateLazyMarshaler(TestString2{}) |
| |
| func (msg *TestString2) Marshaler() _bindings.Marshaler { |
| return _mTestString2 |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| type EmptyStruct struct { |
| _ struct{} `fidl2:"s,1,1"` |
| } |
| |
| var _mEmptyStruct = _bindings.CreateLazyMarshaler(EmptyStruct{}) |
| |
| func (msg *EmptyStruct) Marshaler() _bindings.Marshaler { |
| return _mEmptyStruct |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| type XUnion1Struct struct { |
| _ struct{} `fidl2:"s,24,8"` |
| Xu XUnion1 |
| } |
| |
| var _mXUnion1Struct = _bindings.CreateLazyMarshaler(XUnion1Struct{}) |
| |
| func (msg *XUnion1Struct) Marshaler() _bindings.Marshaler { |
| return _mXUnion1Struct |
| } |
| |
| type TestXUnion1 struct { |
| _ struct{} `fidl2:"s,48,8"` |
| A XUnion1 |
| B *XUnion1 |
| } |
| |
| var _mTestXUnion1 = _bindings.CreateLazyMarshaler(TestXUnion1{}) |
| |
| func (msg *TestXUnion1) Marshaler() _bindings.Marshaler { |
| return _mTestXUnion1 |
| } |
| |
| type TestXUnion2 struct { |
| _ struct{} `fidl2:"s,32,8"` |
| A []XUnion1 |
| B []*XUnion1 |
| } |
| |
| var _mTestXUnion2 = _bindings.CreateLazyMarshaler(TestXUnion2{}) |
| |
| func (msg *TestXUnion2) Marshaler() _bindings.Marshaler { |
| return _mTestXUnion2 |
| } |
| |
| type StrictXUnion1Struct struct { |
| _ struct{} `fidl2:"s,24,8"` |
| Xu StrictXUnion1 |
| } |
| |
| var _mStrictXUnion1Struct = _bindings.CreateLazyMarshaler(StrictXUnion1Struct{}) |
| |
| func (msg *StrictXUnion1Struct) Marshaler() _bindings.Marshaler { |
| return _mStrictXUnion1Struct |
| } |
| |
| type TestStrictXUnion1 struct { |
| _ struct{} `fidl2:"s,48,8"` |
| A StrictXUnion1 |
| B *StrictXUnion1 |
| } |
| |
| var _mTestStrictXUnion1 = _bindings.CreateLazyMarshaler(TestStrictXUnion1{}) |
| |
| func (msg *TestStrictXUnion1) Marshaler() _bindings.Marshaler { |
| return _mTestStrictXUnion1 |
| } |
| |
| type TestStrictXUnion2 struct { |
| _ struct{} `fidl2:"s,32,8"` |
| A []StrictXUnion1 |
| B []*StrictXUnion1 |
| } |
| |
| var _mTestStrictXUnion2 = _bindings.CreateLazyMarshaler(TestStrictXUnion2{}) |
| |
| func (msg *TestStrictXUnion2) Marshaler() _bindings.Marshaler { |
| return _mTestStrictXUnion2 |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| type TestSimpleTable struct { |
| _ struct{} `fidl2:"s,16,8"` |
| Table SimpleTable |
| } |
| |
| var _mTestSimpleTable = _bindings.CreateLazyMarshaler(TestSimpleTable{}) |
| |
| func (msg *TestSimpleTable) Marshaler() _bindings.Marshaler { |
| return _mTestSimpleTable |
| } |
| |
| type TestOlderSimpleTable struct { |
| _ struct{} `fidl2:"s,16,8"` |
| Table OlderSimpleTable |
| } |
| |
| var _mTestOlderSimpleTable = _bindings.CreateLazyMarshaler(TestOlderSimpleTable{}) |
| |
| func (msg *TestOlderSimpleTable) Marshaler() _bindings.Marshaler { |
| return _mTestOlderSimpleTable |
| } |
| |
| type TestNewerSimpleTable struct { |
| _ struct{} `fidl2:"s,16,8"` |
| Table NewerSimpleTable |
| } |
| |
| var _mTestNewerSimpleTable = _bindings.CreateLazyMarshaler(TestNewerSimpleTable{}) |
| |
| func (msg *TestNewerSimpleTable) Marshaler() _bindings.Marshaler { |
| return _mTestNewerSimpleTable |
| } |
| |
| type TestWithTableAndInt struct { |
| _ struct{} `fidl2:"s,24,8"` |
| Table SimpleTable |
| Foo uint64 |
| } |
| |
| var _mTestWithTableAndInt = _bindings.CreateLazyMarshaler(TestWithTableAndInt{}) |
| |
| func (msg *TestWithTableAndInt) Marshaler() _bindings.Marshaler { |
| return _mTestWithTableAndInt |
| } |
| |
| type Int64Struct struct { |
| _ struct{} `fidl2:"s,8,8"` |
| X int64 |
| } |
| |
| var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{}) |
| |
| func (msg *Int64Struct) Marshaler() _bindings.Marshaler { |
| return _mInt64Struct |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| type InterfaceConfig struct { |
| _ struct{} `fidl2:"s,48,8"` |
| Name string |
| IpAddressConfig IpAddressConfig |
| } |
| |
| var _mInterfaceConfig = _bindings.CreateLazyMarshaler(InterfaceConfig{}) |
| |
| func (msg *InterfaceConfig) Marshaler() _bindings.Marshaler { |
| return _mInterfaceConfig |
| } |
| |
| type TestAddEthernetDeviceRequest struct { |
| _ struct{} `fidl2:"s,72,8"` |
| TopologicalPath string |
| Config InterfaceConfig |
| Device EthernetDeviceInterface |
| } |
| |
| var _mTestAddEthernetDeviceRequest = _bindings.CreateLazyMarshaler(TestAddEthernetDeviceRequest{}) |
| |
| func (msg *TestAddEthernetDeviceRequest) Marshaler() _bindings.Marshaler { |
| return _mTestAddEthernetDeviceRequest |
| } |
| |
| 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 |
| } |
| |
| 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 |
| } |
| |
| 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 IpAddressConfigTag uint32 |
| |
| const ( |
| _ IpAddressConfigTag = iota |
| IpAddressConfigPaddingSize24Align4 |
| IpAddressConfigDhcp |
| ) |
| |
| type IpAddressConfig struct { |
| IpAddressConfigTag `fidl:"tag" fidl2:"u,28,4"` |
| PaddingSize24Align4 [6]uint32 |
| Dhcp bool |
| } |
| |
| func (u *IpAddressConfig) Which() IpAddressConfigTag { |
| return u.IpAddressConfigTag |
| } |
| |
| func (u *IpAddressConfig) SetPaddingSize24Align4(paddingSize24Align4 [6]uint32) { |
| u.IpAddressConfigTag = IpAddressConfigPaddingSize24Align4 |
| u.PaddingSize24Align4 = paddingSize24Align4 |
| } |
| |
| func (u *IpAddressConfig) SetDhcp(dhcp bool) { |
| u.IpAddressConfigTag = IpAddressConfigDhcp |
| u.Dhcp = dhcp |
| } |
| |
| type XUnion1Tag uint32 |
| |
| const ( |
| XUnion1_unknownData = 0 // 0x00000000 |
| XUnion1A = 416714395 // 0x18d68e9b |
| XUnion1B = 863456686 // 0x33774dae |
| XUnion1D = 1912225229 // 0x71fa3dcd |
| ) |
| |
| type XUnion1 struct { |
| XUnion1Tag `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() XUnion1Tag { |
| switch _m.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.XUnion1Tag) |
| } |
| |
| func (_m *XUnion1) SetA(a [3]int8) { |
| _m.XUnion1Tag = XUnion1A |
| _m.A = a |
| } |
| |
| func (_m *XUnion1) SetB(b TestSimple) { |
| _m.XUnion1Tag = XUnion1B |
| _m.B = b |
| } |
| |
| func (_m *XUnion1) SetD(d float32) { |
| _m.XUnion1Tag = XUnion1D |
| _m.D = d |
| } |
| |
| type StrictXUnion1Tag uint32 |
| |
| const ( |
| StrictXUnion1A = 1988029217 // 0x767eeb21 |
| StrictXUnion1B = 1259078458 // 0x4b0c033a |
| StrictXUnion1D = 881204552 // 0x34861d48 |
| ) |
| |
| type StrictXUnion1 struct { |
| StrictXUnion1Tag `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() StrictXUnion1Tag { |
| return _m.StrictXUnion1Tag |
| } |
| |
| func (_m *StrictXUnion1) Ordinal() uint32 { |
| return uint32(_m.StrictXUnion1Tag) |
| } |
| |
| func (_m *StrictXUnion1) SetA(a [3]int8) { |
| _m.StrictXUnion1Tag = StrictXUnion1A |
| _m.A = a |
| } |
| |
| func (_m *StrictXUnion1) SetB(b TestSimple) { |
| _m.StrictXUnion1Tag = StrictXUnion1B |
| _m.B = b |
| } |
| |
| func (_m *StrictXUnion1) SetD(d float32) { |
| _m.StrictXUnion1Tag = StrictXUnion1D |
| _m.D = d |
| } |
| |
| type SimpleTable struct { |
| _ struct{} `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{} `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{} `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 ( |
| Test1EchoGenOrdinal uint64 = 0x4a4939ff00000000 |
| Test1SurpriseGenOrdinal uint64 = 0x4bd66e7200000000 |
| ) |
| |
| type test1EchoRequest struct { |
| _ struct{} `fidl2:"s,16,0"` |
| In *string |
| } |
| |
| var _mtest1EchoRequest = _bindings.CreateLazyMarshaler(test1EchoRequest{}) |
| |
| func (msg *test1EchoRequest) Marshaler() _bindings.Marshaler { |
| return _mtest1EchoRequest |
| } |
| |
| type test1EchoResponse struct { |
| _ struct{} `fidl2:"s,16,0"` |
| Out *string |
| } |
| |
| var _mtest1EchoResponse = _bindings.CreateLazyMarshaler(test1EchoResponse{}) |
| |
| func (msg *test1EchoResponse) Marshaler() _bindings.Marshaler { |
| return _mtest1EchoResponse |
| } |
| |
| type test1SurpriseResponse struct { |
| _ struct{} `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(Test1EchoGenOrdinal, req_, resp_) |
| return resp_.Out, err |
| } |
| |
| func (p *Test1Interface) ExpectSurprise() (string, error) { |
| resp_ := &test1SurpriseResponse{} |
| err := ((*_bindings.ChannelProxy)(p)).Recv(Test1SurpriseGenOrdinal, 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(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, error) { |
| switch ordinal_ { |
| case Test1EchoGenOrdinal: |
| in_ := test1EchoRequest{} |
| if _, _, err_ := _bindings.Unmarshal(data_, handles_, &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(Test1SurpriseGenOrdinal, 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) Dispatch(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, error) { |
| switch ordinal_ { |
| } |
| return nil, _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 |