blob: 5bf3ccaf739032737b262b7d2eac40e556f9026a [file] [log] [blame]
// Code generated by fidlgen; DO NOT EDIT.
package protocolrequest
import (
_bindings "syscall/zx/fidl"
)
type parentWithCtxGetChildResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
C ChildWithCtxInterface `fidl_offset_v2:"0" fidl_handle_subtype:"4"`
}
var _mparentWithCtxGetChildResponse = _bindings.CreateLazyMarshaler(parentWithCtxGetChildResponse{})
func (msg *parentWithCtxGetChildResponse) Marshaler() _bindings.Marshaler {
return _mparentWithCtxGetChildResponse
}
type parentWithCtxGetChildRequestResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
R ChildWithCtxInterfaceRequest `fidl_offset_v2:"0" fidl_handle_subtype:"4" fidl_bounds:"0"`
}
var _mparentWithCtxGetChildRequestResponse = _bindings.CreateLazyMarshaler(parentWithCtxGetChildRequestResponse{})
func (msg *parentWithCtxGetChildRequestResponse) Marshaler() _bindings.Marshaler {
return _mparentWithCtxGetChildRequestResponse
}
type parentWithCtxTakeChildRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
C ChildWithCtxInterface `fidl_offset_v2:"0" fidl_handle_subtype:"4"`
}
var _mparentWithCtxTakeChildRequest = _bindings.CreateLazyMarshaler(parentWithCtxTakeChildRequest{})
func (msg *parentWithCtxTakeChildRequest) Marshaler() _bindings.Marshaler {
return _mparentWithCtxTakeChildRequest
}
type parentWithCtxTakeChildRequestRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
R ChildWithCtxInterfaceRequest `fidl_offset_v2:"0" fidl_handle_subtype:"4" fidl_bounds:"0"`
}
var _mparentWithCtxTakeChildRequestRequest = _bindings.CreateLazyMarshaler(parentWithCtxTakeChildRequestRequest{})
func (msg *parentWithCtxTakeChildRequestRequest) Marshaler() _bindings.Marshaler {
return _mparentWithCtxTakeChildRequestRequest
}
const ()
type ChildWithCtxInterface _bindings.ChannelProxy
type ChildWithCtx interface {
}
type ChildWithCtxTransitionalBase struct{}
type ChildWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewChildWithCtxInterfaceRequest() (ChildWithCtxInterfaceRequest, *ChildWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return ChildWithCtxInterfaceRequest(req), (*ChildWithCtxInterface)(cli), err
}
type ChildWithCtxStub struct {
Impl ChildWithCtx
}
func (s_ *ChildWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type ChildEventProxy _bindings.ChannelProxy
const (
ParentGetChildOrdinal uint64 = 0xc3cd963aafc873b
ParentGetChildRequestOrdinal uint64 = 0xf38d08d64f71c79
ParentTakeChildOrdinal uint64 = 0x3e08fd7ca04b2290
ParentTakeChildRequestOrdinal uint64 = 0x2063f76b1bb45f87
)
type ParentWithCtxInterface _bindings.ChannelProxy
func (p *ParentWithCtxInterface) GetChild(ctx_ _bindings.Context) (ChildWithCtxInterface, error) {
var req_ _bindings.Message
resp_ := &parentWithCtxGetChildResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ParentGetChildOrdinal, req_, resp_)
return (*resp_).C, err_
}
func (p *ParentWithCtxInterface) GetChildRequest(ctx_ _bindings.Context) (ChildWithCtxInterfaceRequest, error) {
var req_ _bindings.Message
resp_ := &parentWithCtxGetChildRequestResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ParentGetChildRequestOrdinal, req_, resp_)
return (*resp_).R, err_
}
func (p *ParentWithCtxInterface) TakeChild(ctx_ _bindings.Context, c ChildWithCtxInterface) error {
req_ := &parentWithCtxTakeChildRequest{C: c}
err_ := ((*_bindings.ChannelProxy)(p)).Send(ParentTakeChildOrdinal, req_)
return err_
}
func (p *ParentWithCtxInterface) TakeChildRequest(ctx_ _bindings.Context, r ChildWithCtxInterfaceRequest) error {
req_ := &parentWithCtxTakeChildRequestRequest{R: r}
err_ := ((*_bindings.ChannelProxy)(p)).Send(ParentTakeChildRequestOrdinal, req_)
return err_
}
type ParentWithCtx interface {
GetChild(ctx_ _bindings.Context) (ChildWithCtxInterface, error)
GetChildRequest(ctx_ _bindings.Context) (ChildWithCtxInterfaceRequest, error)
TakeChild(ctx_ _bindings.Context, c ChildWithCtxInterface) error
TakeChildRequest(ctx_ _bindings.Context, r ChildWithCtxInterfaceRequest) error
}
type ParentWithCtxTransitionalBase struct{}
type ParentWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewParentWithCtxInterfaceRequest() (ParentWithCtxInterfaceRequest, *ParentWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return ParentWithCtxInterfaceRequest(req), (*ParentWithCtxInterface)(cli), err
}
type ParentWithCtxStub struct {
Impl ParentWithCtx
}
func (s_ *ParentWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case ParentGetChildOrdinal:
c, err_ := s_.Impl.GetChild(args_.Ctx)
out_ := &parentWithCtxGetChildResponse{C: c}
return out_, true, err_
case ParentGetChildRequestOrdinal:
r, err_ := s_.Impl.GetChildRequest(args_.Ctx)
out_ := &parentWithCtxGetChildRequestResponse{R: r}
return out_, true, err_
case ParentTakeChildOrdinal:
in_ := &parentWithCtxTakeChildRequest{}
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.TakeChild(args_.Ctx, (*in_).C)
return nil, false, err_
case ParentTakeChildRequestOrdinal:
in_ := &parentWithCtxTakeChildRequestRequest{}
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.TakeChildRequest(args_.Ctx, (*in_).R)
return nil, false, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type ParentEventProxy _bindings.ChannelProxy