blob: 14e9c3b2f565bbdfc119bb7d9b7847d64cb8a3b5 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
package protocolrequest
import (
_bindings "syscall/zx/fidl"
)
type ParentGetChildRequestResponse 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 _mParentGetChildRequestResponse = _bindings.CreateLazyMarshaler(ParentGetChildRequestResponse{})
func (msg *ParentGetChildRequestResponse) Marshaler() _bindings.Marshaler {
return _mParentGetChildRequestResponse
}
type ParentGetChildResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
C ChildWithCtxInterface `fidl_offset_v2:"0" fidl_handle_subtype:"4"`
}
var _mParentGetChildResponse = _bindings.CreateLazyMarshaler(ParentGetChildResponse{})
func (msg *ParentGetChildResponse) Marshaler() _bindings.Marshaler {
return _mParentGetChildResponse
}
type ParentTakeChildRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"`
C ChildWithCtxInterface `fidl_offset_v2:"0" fidl_handle_subtype:"4"`
}
var _mParentTakeChildRequest = _bindings.CreateLazyMarshaler(ParentTakeChildRequest{})
func (msg *ParentTakeChildRequest) Marshaler() _bindings.Marshaler {
return _mParentTakeChildRequest
}
type ParentTakeChildRequestRequest 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 _mParentTakeChildRequestRequest = _bindings.CreateLazyMarshaler(ParentTakeChildRequestRequest{})
func (msg *ParentTakeChildRequestRequest) Marshaler() _bindings.Marshaler {
return _mParentTakeChildRequestRequest
}
const ()
type ChildWithCtxInterface _bindings.ChannelProxy
type ChildWithCtx interface {
}
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_ := &ParentGetChildResponse{}
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_ := &ParentGetChildRequestResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ParentGetChildRequestOrdinal, req_, resp_)
return (*resp_).R, err_
}
func (p *ParentWithCtxInterface) TakeChild(ctx_ _bindings.Context, c ChildWithCtxInterface) error {
req_ := &ParentTakeChildRequest{C: c}
err_ := ((*_bindings.ChannelProxy)(p)).Send(ParentTakeChildOrdinal, req_)
return err_
}
func (p *ParentWithCtxInterface) TakeChildRequest(ctx_ _bindings.Context, r ChildWithCtxInterfaceRequest) error {
req_ := &ParentTakeChildRequestRequest{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 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_ := &ParentGetChildResponse{C: c}
return out_, true, err_
case ParentGetChildRequestOrdinal:
r, err_ := s_.Impl.GetChildRequest(args_.Ctx)
out_ := &ParentGetChildRequestResponse{R: r}
return out_, true, err_
case ParentTakeChildOrdinal:
in_ := &ParentTakeChildRequest{}
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_ := &ParentTakeChildRequestRequest{}
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