blob: 053389631670dee5f578525a2959caac2f0631b4 [file] [log] [blame]
// Copyright 2020 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.
//
// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
// WARNING: This file is machine generated by fidlgen.
package bindingstest
import (
_zx "syscall/zx"
_bindings "syscall/zx/fidl"
)
type HasClientEnd struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
ClientEnd ExampleProtocolWithCtxInterface `fidl_offset_v2:"0" fidl_handle_subtype:"4"`
}
var _mHasClientEnd = _bindings.CreateLazyMarshaler(HasClientEnd{})
func (msg *HasClientEnd) Marshaler() _bindings.Marshaler {
return _mHasClientEnd
}
type HasServerEnd struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
ServerEnd ExampleProtocolWithCtxInterfaceRequest `fidl_offset_v2:"0" fidl_handle_subtype:"4" fidl_bounds:"0"`
}
var _mHasServerEnd = _bindings.CreateLazyMarshaler(HasServerEnd{})
func (msg *HasServerEnd) Marshaler() _bindings.Marshaler {
return _mHasServerEnd
}
type Test1EchoHandleRightsRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
H _zx.Port `fidl_offset_v2:"0" fidl_handle_subtype:"6" fidl_handle_rights:"7" fidl_bounds:"0"`
}
var _mTest1EchoHandleRightsRequest = _bindings.CreateLazyMarshaler(Test1EchoHandleRightsRequest{})
func (msg *Test1EchoHandleRightsRequest) Marshaler() _bindings.Marshaler {
return _mTest1EchoHandleRightsRequest
}
type Test1EchoRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"`
In *string `fidl_offset_v2:"0" fidl_bounds:""`
}
var _mTest1EchoRequest = _bindings.CreateLazyMarshaler(Test1EchoRequest{})
func (msg *Test1EchoRequest) Marshaler() _bindings.Marshaler {
return _mTest1EchoRequest
}
type Test1SurpriseRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Foo string `fidl_offset_v2:"0" fidl_bounds:""`
}
var _mTest1SurpriseRequest = _bindings.CreateLazyMarshaler(Test1SurpriseRequest{})
func (msg *Test1SurpriseRequest) Marshaler() _bindings.Marshaler {
return _mTest1SurpriseRequest
}
type Test1EchoHandleRightsResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
Rights uint32 `fidl_offset_v2:"0"`
}
var _mTest1EchoHandleRightsResponse = _bindings.CreateLazyMarshaler(Test1EchoHandleRightsResponse{})
func (msg *Test1EchoHandleRightsResponse) Marshaler() _bindings.Marshaler {
return _mTest1EchoHandleRightsResponse
}
type Test1EchoResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Out *string `fidl_offset_v2:"0" fidl_bounds:""`
}
var _mTest1EchoResponse = _bindings.CreateLazyMarshaler(Test1EchoResponse{})
func (msg *Test1EchoResponse) Marshaler() _bindings.Marshaler {
return _mTest1EchoResponse
}
type Test1EmptyResponseResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"`
}
var _mTest1EmptyResponseResponse = _bindings.CreateLazyMarshaler(Test1EmptyResponseResponse{})
func (msg *Test1EmptyResponseResponse) Marshaler() _bindings.Marshaler {
return _mTest1EmptyResponseResponse
}
type TestInterface1 struct {
_ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"4"`
A Test1WithCtxInterface `fidl_offset_v2:"0" fidl_handle_subtype:"4"`
B Test1WithCtxInterface `fidl_offset_v2:"4" fidl_handle_subtype:"4"`
C Test1WithCtxInterfaceRequest `fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_bounds:"0"`
D Test1WithCtxInterfaceRequest `fidl_offset_v2:"12" fidl_handle_subtype:"4" fidl_bounds:"1"`
}
var _mTestInterface1 = _bindings.CreateLazyMarshaler(TestInterface1{})
func (msg *TestInterface1) Marshaler() _bindings.Marshaler {
return _mTestInterface1
}
type I_test1EchoHandleRightsResultTag uint64
const (
Test1EchoHandleRightsResultResponse = 1 // 0x00000001
Test1EchoHandleRightsResultFrameworkErr = 3 // 0x00000003
)
type Test1EchoHandleRightsResult struct {
I_test1EchoHandleRightsResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
Response Test1EchoHandleRightsResponse `fidl_ordinal:"1"`
FrameworkErr int32 `fidl_ordinal:"3"`
}
var _mTest1EchoHandleRightsResult = _bindings.CreateLazyMarshaler(Test1EchoHandleRightsResult{})
func (msg *Test1EchoHandleRightsResult) Marshaler() _bindings.Marshaler {
return _mTest1EchoHandleRightsResult
}
func (_m *Test1EchoHandleRightsResult) reset() {
switch _m.I_test1EchoHandleRightsResultTag {
case 1:
var _zeroed Test1EchoHandleRightsResponse
_m.Response = _zeroed
case 3:
var _zeroed int32
_m.FrameworkErr = _zeroed
}
}
func (_m *Test1EchoHandleRightsResult) Which() I_test1EchoHandleRightsResultTag {
return _m.I_test1EchoHandleRightsResultTag
}
func (_m *Test1EchoHandleRightsResult) Ordinal() uint64 {
return uint64(_m.I_test1EchoHandleRightsResultTag)
}
func (_m *Test1EchoHandleRightsResult) SetResponse(response Test1EchoHandleRightsResponse) {
_m.reset()
_m.I_test1EchoHandleRightsResultTag = Test1EchoHandleRightsResultResponse
_m.Response = response
}
func Test1EchoHandleRightsResultWithResponse(response Test1EchoHandleRightsResponse) Test1EchoHandleRightsResult {
var _u Test1EchoHandleRightsResult
_u.SetResponse(response)
return _u
}
func (_m *Test1EchoHandleRightsResult) SetFrameworkErr(frameworkErr int32) {
_m.reset()
_m.I_test1EchoHandleRightsResultTag = Test1EchoHandleRightsResultFrameworkErr
_m.FrameworkErr = frameworkErr
}
func Test1EchoHandleRightsResultWithFrameworkErr(frameworkErr int32) Test1EchoHandleRightsResult {
var _u Test1EchoHandleRightsResult
_u.SetFrameworkErr(frameworkErr)
return _u
}
type I_test1EchoResultTag uint64
const (
Test1EchoResultResponse = 1 // 0x00000001
Test1EchoResultFrameworkErr = 3 // 0x00000003
)
type Test1EchoResult struct {
I_test1EchoResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
Response Test1EchoResponse `fidl_ordinal:"1"`
FrameworkErr int32 `fidl_ordinal:"3"`
}
var _mTest1EchoResult = _bindings.CreateLazyMarshaler(Test1EchoResult{})
func (msg *Test1EchoResult) Marshaler() _bindings.Marshaler {
return _mTest1EchoResult
}
func (_m *Test1EchoResult) reset() {
switch _m.I_test1EchoResultTag {
case 1:
var _zeroed Test1EchoResponse
_m.Response = _zeroed
case 3:
var _zeroed int32
_m.FrameworkErr = _zeroed
}
}
func (_m *Test1EchoResult) Which() I_test1EchoResultTag {
return _m.I_test1EchoResultTag
}
func (_m *Test1EchoResult) Ordinal() uint64 {
return uint64(_m.I_test1EchoResultTag)
}
func (_m *Test1EchoResult) SetResponse(response Test1EchoResponse) {
_m.reset()
_m.I_test1EchoResultTag = Test1EchoResultResponse
_m.Response = response
}
func Test1EchoResultWithResponse(response Test1EchoResponse) Test1EchoResult {
var _u Test1EchoResult
_u.SetResponse(response)
return _u
}
func (_m *Test1EchoResult) SetFrameworkErr(frameworkErr int32) {
_m.reset()
_m.I_test1EchoResultTag = Test1EchoResultFrameworkErr
_m.FrameworkErr = frameworkErr
}
func Test1EchoResultWithFrameworkErr(frameworkErr int32) Test1EchoResult {
var _u Test1EchoResult
_u.SetFrameworkErr(frameworkErr)
return _u
}
type I_test1EmptyResponseResultTag uint64
const (
Test1EmptyResponseResultResponse = 1 // 0x00000001
Test1EmptyResponseResultFrameworkErr = 3 // 0x00000003
)
type Test1EmptyResponseResult struct {
I_test1EmptyResponseResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
Response Test1EmptyResponseResponse `fidl_ordinal:"1"`
FrameworkErr int32 `fidl_ordinal:"3"`
}
var _mTest1EmptyResponseResult = _bindings.CreateLazyMarshaler(Test1EmptyResponseResult{})
func (msg *Test1EmptyResponseResult) Marshaler() _bindings.Marshaler {
return _mTest1EmptyResponseResult
}
func (_m *Test1EmptyResponseResult) reset() {
switch _m.I_test1EmptyResponseResultTag {
case 1:
var _zeroed Test1EmptyResponseResponse
_m.Response = _zeroed
case 3:
var _zeroed int32
_m.FrameworkErr = _zeroed
}
}
func (_m *Test1EmptyResponseResult) Which() I_test1EmptyResponseResultTag {
return _m.I_test1EmptyResponseResultTag
}
func (_m *Test1EmptyResponseResult) Ordinal() uint64 {
return uint64(_m.I_test1EmptyResponseResultTag)
}
func (_m *Test1EmptyResponseResult) SetResponse(response Test1EmptyResponseResponse) {
_m.reset()
_m.I_test1EmptyResponseResultTag = Test1EmptyResponseResultResponse
_m.Response = response
}
func Test1EmptyResponseResultWithResponse(response Test1EmptyResponseResponse) Test1EmptyResponseResult {
var _u Test1EmptyResponseResult
_u.SetResponse(response)
return _u
}
func (_m *Test1EmptyResponseResult) SetFrameworkErr(frameworkErr int32) {
_m.reset()
_m.I_test1EmptyResponseResultTag = Test1EmptyResponseResultFrameworkErr
_m.FrameworkErr = frameworkErr
}
func Test1EmptyResponseResultWithFrameworkErr(frameworkErr int32) Test1EmptyResponseResult {
var _u Test1EmptyResponseResult
_u.SetFrameworkErr(frameworkErr)
return _u
}
type SimpleTable struct {
_ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
I_unknownData interface{}
X int64 `fidl_ordinal:"1"`
XPresent bool
Y int64 `fidl_ordinal:"5"`
YPresent bool
}
var _mSimpleTable = _bindings.CreateLazyMarshaler(SimpleTable{})
func (msg *SimpleTable) Marshaler() _bindings.Marshaler {
return _mSimpleTable
}
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
}
func (u *SimpleTable) HasUnknownData() bool {
return u.I_unknownData != nil
}
func (u *SimpleTable) GetUnknownData() map[uint64]_bindings.UnknownData {
return u.I_unknownData.(map[uint64]_bindings.UnknownData)
}
// Bindings for this protocol have not been generated because it is an
// open protocol. If bindings for open protocols are
// needed in Go, please contact the FIDL team: fidl-dev@fuchsia.dev.
type ExampleProtocolWithCtxInterface _bindings.ChannelProxy
// Bindings for this protocol have not been generated because it is an
// open protocol. If bindings for open protocols are
// needed in Go, please contact the FIDL team: fidl-dev@fuchsia.dev.
type ExampleProtocolWithCtx interface{}
type ExampleProtocolWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewExampleProtocolWithCtxInterfaceRequest() (ExampleProtocolWithCtxInterfaceRequest, *ExampleProtocolWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return ExampleProtocolWithCtxInterfaceRequest(req), (*ExampleProtocolWithCtxInterface)(cli), err
}
// Bindings for this protocol have not been generated because it is an
// open protocol. If bindings for open protocols are
// needed in Go, please contact the FIDL team: fidl-dev@fuchsia.dev.
type ExampleProtocolWithCtxStub struct{}
// Bindings for this protocol have not been generated because it is an
// open protocol. If bindings for open protocols are
// needed in Go, please contact the FIDL team: fidl-dev@fuchsia.dev.
type ExampleProtocolEventProxy struct{}
const (
Test1EchoOrdinal uint64 = 0x4adc92c9e871ae62
Test1NoResponseOrdinal uint64 = 0x584f4d438578f337
Test1EmptyResponseOrdinal uint64 = 0x12ee80a1f8a85427
Test1SurpriseOrdinal uint64 = 0xf93fd4731796fd9
Test1EchoHandleRightsOrdinal uint64 = 0x53b1df24e93e434e
)
// Bindings for this protocol have not been generated because it is an
// open protocol. If bindings for open protocols are
// needed in Go, please contact the FIDL team: fidl-dev@fuchsia.dev.
type Test1WithCtxInterface _bindings.ChannelProxy
// Bindings for this protocol have not been generated because it is an
// open protocol. If bindings for open protocols are
// needed in Go, please contact the FIDL team: fidl-dev@fuchsia.dev.
type Test1WithCtx interface{}
type Test1WithCtxInterfaceRequest _bindings.InterfaceRequest
func NewTest1WithCtxInterfaceRequest() (Test1WithCtxInterfaceRequest, *Test1WithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return Test1WithCtxInterfaceRequest(req), (*Test1WithCtxInterface)(cli), err
}
// Bindings for this protocol have not been generated because it is an
// open protocol. If bindings for open protocols are
// needed in Go, please contact the FIDL team: fidl-dev@fuchsia.dev.
type Test1WithCtxStub struct{}
// Bindings for this protocol have not been generated because it is an
// open protocol. If bindings for open protocols are
// needed in Go, please contact the FIDL team: fidl-dev@fuchsia.dev.
type Test1EventProxy struct{}