| // WARNING: This file is machine generated by fidlgen. |
| |
| package name |
| |
| |
| import ( |
| _zx "syscall/zx" |
| _bindings "syscall/zx/fidl" |
| ) |
| |
| |
| |
| |
| const ( |
| ) |
| |
| type ChildInterface _bindings.ChannelProxy |
| |
| |
| |
| type Child interface { |
| } |
| |
| type ChildTransitionalBase struct {} |
| |
| |
| type ChildInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewChildInterfaceRequest() (ChildInterfaceRequest, *ChildInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return ChildInterfaceRequest(req), (*ChildInterface)(cli), err |
| } |
| |
| type ChildStub struct { |
| Impl Child |
| } |
| |
| func (s *ChildStub) DispatchNew(ord uint32, b_ []byte, h_ []_zx.Handle) (_bindings.Message, error) { |
| switch ord { |
| } |
| return nil, _bindings.ErrUnknownOrdinal |
| } |
| type ChildService struct { |
| _bindings.BindingSet |
| } |
| |
| func (s *ChildService) Add(impl Child, c _zx.Channel, onError func(error)) (_bindings.BindingKey, error) { |
| return s.BindingSet.Add(&ChildStub{Impl: impl}, c, onError) |
| } |
| |
| func (s *ChildService) EventProxyFor(key _bindings.BindingKey) (*ChildEventProxy, bool) { |
| pxy, err := s.BindingSet.ProxyFor(key) |
| return (*ChildEventProxy)(pxy), err |
| } |
| |
| type ChildEventProxy _bindings.ChannelProxy |
| |
| |
| |
| const ( |
| ParentGetChildOrdinal uint32 = 915586153 |
| ParentGetChildGenOrdinal uint32 = 915586153 |
| ParentGetChildRequestOrdinal uint32 = 1068158078 |
| ParentGetChildRequestGenOrdinal uint32 = 1068158078 |
| ParentTakeChildOrdinal uint32 = 1275478777 |
| ParentTakeChildGenOrdinal uint32 = 1275478777 |
| ParentTakeChildRequestOrdinal uint32 = 1589872250 |
| ParentTakeChildRequestGenOrdinal uint32 = 1589872250 |
| ) |
| |
| type parentGetChildResponse struct { |
| _ struct{} `fidl2:"s,8,0"` |
| C ChildInterface |
| } |
| |
| var _mparentGetChildResponse = _bindings.CreateLazyMarshaler(parentGetChildResponse{}) |
| |
| func (msg *parentGetChildResponse) Marshaler() _bindings.Marshaler { |
| return _mparentGetChildResponse |
| } |
| |
| type parentGetChildRequestResponse struct { |
| _ struct{} `fidl2:"s,8,0"` |
| R ChildInterfaceRequest`fidl2:"0"` |
| } |
| |
| var _mparentGetChildRequestResponse = _bindings.CreateLazyMarshaler(parentGetChildRequestResponse{}) |
| |
| func (msg *parentGetChildRequestResponse) Marshaler() _bindings.Marshaler { |
| return _mparentGetChildRequestResponse |
| } |
| |
| type parentTakeChildRequest struct { |
| _ struct{} `fidl2:"s,8,0"` |
| C ChildInterface |
| } |
| |
| var _mparentTakeChildRequest = _bindings.CreateLazyMarshaler(parentTakeChildRequest{}) |
| |
| func (msg *parentTakeChildRequest) Marshaler() _bindings.Marshaler { |
| return _mparentTakeChildRequest |
| } |
| |
| type parentTakeChildRequestRequest struct { |
| _ struct{} `fidl2:"s,8,0"` |
| R ChildInterfaceRequest`fidl2:"0"` |
| } |
| |
| var _mparentTakeChildRequestRequest = _bindings.CreateLazyMarshaler(parentTakeChildRequestRequest{}) |
| |
| func (msg *parentTakeChildRequestRequest) Marshaler() _bindings.Marshaler { |
| return _mparentTakeChildRequestRequest |
| } |
| |
| type ParentInterface _bindings.ChannelProxy |
| |
| |
| func (p *ParentInterface) GetChild() (ChildInterface, error) { |
| var req_ _bindings.Message |
| resp_ := &parentGetChildResponse{} |
| err := ((*_bindings.ChannelProxy)(p)).CallNew(ParentGetChildOrdinal, req_, resp_) |
| return resp_.C, err |
| } |
| |
| func (p *ParentInterface) GetChildRequest() (ChildInterfaceRequest, error) { |
| var req_ _bindings.Message |
| resp_ := &parentGetChildRequestResponse{} |
| err := ((*_bindings.ChannelProxy)(p)).CallNew(ParentGetChildRequestOrdinal, req_, resp_) |
| return resp_.R, err |
| } |
| |
| func (p *ParentInterface) TakeChild(c ChildInterface) error { |
| req_ := &parentTakeChildRequest{ |
| C: c, |
| } |
| err := ((*_bindings.ChannelProxy)(p)).SendNew(ParentTakeChildOrdinal, req_) |
| return err |
| } |
| |
| func (p *ParentInterface) TakeChildRequest(r ChildInterfaceRequest) error { |
| req_ := &parentTakeChildRequestRequest{ |
| R: r, |
| } |
| err := ((*_bindings.ChannelProxy)(p)).SendNew(ParentTakeChildRequestOrdinal, req_) |
| return err |
| } |
| |
| |
| type Parent interface { |
| GetChild() (ChildInterface, error) |
| GetChildRequest() (ChildInterfaceRequest, error) |
| TakeChild(c ChildInterface) error |
| TakeChildRequest(r ChildInterfaceRequest) error |
| } |
| |
| type ParentTransitionalBase struct {} |
| |
| |
| type ParentInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewParentInterfaceRequest() (ParentInterfaceRequest, *ParentInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return ParentInterfaceRequest(req), (*ParentInterface)(cli), err |
| } |
| |
| type ParentStub struct { |
| Impl Parent |
| } |
| |
| func (s *ParentStub) DispatchNew(ord uint32, b_ []byte, h_ []_zx.Handle) (_bindings.Message, error) { |
| switch ord { |
| case ParentGetChildOrdinal: |
| c, err_ := s.Impl.GetChild() |
| out_ := parentGetChildResponse{} |
| out_.C = c |
| return &out_, err_ |
| case ParentGetChildRequestOrdinal: |
| r, err_ := s.Impl.GetChildRequest() |
| out_ := parentGetChildRequestResponse{} |
| out_.R = r |
| return &out_, err_ |
| case ParentTakeChildOrdinal: |
| in_ := parentTakeChildRequest{} |
| if _, _, err_ := _bindings.UnmarshalNew(b_, h_, &in_); err_ != nil { |
| return nil, err_ |
| } |
| err_ := s.Impl.TakeChild(in_.C) |
| return nil, err_ |
| case ParentTakeChildRequestOrdinal: |
| in_ := parentTakeChildRequestRequest{} |
| if _, _, err_ := _bindings.UnmarshalNew(b_, h_, &in_); err_ != nil { |
| return nil, err_ |
| } |
| err_ := s.Impl.TakeChildRequest(in_.R) |
| return nil, err_ |
| } |
| return nil, _bindings.ErrUnknownOrdinal |
| } |
| type ParentService struct { |
| _bindings.BindingSet |
| } |
| |
| func (s *ParentService) Add(impl Parent, c _zx.Channel, onError func(error)) (_bindings.BindingKey, error) { |
| return s.BindingSet.Add(&ParentStub{Impl: impl}, c, onError) |
| } |
| |
| func (s *ParentService) EventProxyFor(key _bindings.BindingKey) (*ParentEventProxy, bool) { |
| pxy, err := s.BindingSet.ProxyFor(key) |
| return (*ParentEventProxy)(pxy), err |
| } |
| |
| type ParentEventProxy _bindings.ChannelProxy |
| |
| |
| |