blob: 4b0be408c0e883e4ebbb16d8763895f8b540cbb4 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
package emptystruct
import (
_bindings "syscall/zx/fidl"
)
type Empty struct {
_ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"`
}
var _mEmpty = _bindings.CreateLazyMarshaler(Empty{})
func (msg *Empty) Marshaler() _bindings.Marshaler {
return _mEmpty
}
type EmptyProtocolReceiveRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"`
E Empty `fidl_offset_v2:"0"`
}
var _mEmptyProtocolReceiveRequest = _bindings.CreateLazyMarshaler(EmptyProtocolReceiveRequest{})
func (msg *EmptyProtocolReceiveRequest) Marshaler() _bindings.Marshaler {
return _mEmptyProtocolReceiveRequest
}
type EmptyProtocolSendAndReceiveRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"`
E Empty `fidl_offset_v2:"0"`
}
var _mEmptyProtocolSendAndReceiveRequest = _bindings.CreateLazyMarshaler(EmptyProtocolSendAndReceiveRequest{})
func (msg *EmptyProtocolSendAndReceiveRequest) Marshaler() _bindings.Marshaler {
return _mEmptyProtocolSendAndReceiveRequest
}
type EmptyProtocolSendAndReceiveResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"`
E Empty `fidl_offset_v2:"0"`
}
var _mEmptyProtocolSendAndReceiveResponse = _bindings.CreateLazyMarshaler(EmptyProtocolSendAndReceiveResponse{})
func (msg *EmptyProtocolSendAndReceiveResponse) Marshaler() _bindings.Marshaler {
return _mEmptyProtocolSendAndReceiveResponse
}
type EmptyProtocolSendRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"`
E Empty `fidl_offset_v2:"0"`
}
var _mEmptyProtocolSendRequest = _bindings.CreateLazyMarshaler(EmptyProtocolSendRequest{})
func (msg *EmptyProtocolSendRequest) Marshaler() _bindings.Marshaler {
return _mEmptyProtocolSendRequest
}
const (
EmptyProtocolSendOrdinal uint64 = 0x132262fd8b200708
EmptyProtocolReceiveOrdinal uint64 = 0x1ff0ccf9b710e23f
EmptyProtocolSendAndReceiveOrdinal uint64 = 0x76a931254962cea
)
type EmptyProtocolWithCtxInterface _bindings.ChannelProxy
func (p *EmptyProtocolWithCtxInterface) Send(ctx_ _bindings.Context, e Empty) error {
req_ := &EmptyProtocolSendRequest{E: e}
err_ := ((*_bindings.ChannelProxy)(p)).Send(EmptyProtocolSendOrdinal, req_)
return err_
}
func (p *EmptyProtocolWithCtxInterface) ExpectReceive(ctx_ _bindings.Context) (Empty, error) {
resp_ := &EmptyProtocolReceiveRequest{}
err_ := ((*_bindings.ChannelProxy)(p)).Recv(EmptyProtocolReceiveOrdinal, resp_)
return (*resp_).E, err_
}
func (p *EmptyProtocolWithCtxInterface) SendAndReceive(ctx_ _bindings.Context, e Empty) (Empty, error) {
req_ := &EmptyProtocolSendAndReceiveRequest{E: e}
resp_ := &EmptyProtocolSendAndReceiveResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(EmptyProtocolSendAndReceiveOrdinal, req_, resp_)
return (*resp_).E, err_
}
type EmptyProtocolWithCtx interface {
Send(ctx_ _bindings.Context, e Empty) error
SendAndReceive(ctx_ _bindings.Context, e Empty) (Empty, error)
}
type EmptyProtocolWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewEmptyProtocolWithCtxInterfaceRequest() (EmptyProtocolWithCtxInterfaceRequest, *EmptyProtocolWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return EmptyProtocolWithCtxInterfaceRequest(req), (*EmptyProtocolWithCtxInterface)(cli), err
}
type EmptyProtocolWithCtxStub struct {
Impl EmptyProtocolWithCtx
}
func (s_ *EmptyProtocolWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case EmptyProtocolSendOrdinal:
in_ := &EmptyProtocolSendRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Send(args_.Ctx, (*in_).E)
return nil, false, err_
case EmptyProtocolSendAndReceiveOrdinal:
in_ := &EmptyProtocolSendAndReceiveRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil {
return nil, false, err_
}
e, err_ := s_.Impl.SendAndReceive(args_.Ctx, (*in_).E)
out_ := &EmptyProtocolSendAndReceiveResponse{E: e}
return out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type EmptyProtocolEventProxy _bindings.ChannelProxy
func (p *EmptyProtocolEventProxy) Receive(e Empty) error {
event_ := &EmptyProtocolReceiveRequest{E: e}
return ((*_bindings.ChannelProxy)(p)).Send(EmptyProtocolReceiveOrdinal, event_)
}