| // Copyright 2022 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 unknown |
| |
| import ( |
| _bindings "syscall/zx/fidl" |
| ) |
| |
| type CloneableClone2Request struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| Request CloneableWithCtxInterfaceRequest `fidl_offset_v2:"0" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mCloneableClone2Request = _bindings.CreateLazyMarshaler(CloneableClone2Request{}) |
| |
| func (msg *CloneableClone2Request) Marshaler() _bindings.Marshaler { |
| return _mCloneableClone2Request |
| } |
| |
| type CloseableCloseResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mCloseableCloseResponse = _bindings.CreateLazyMarshaler(CloseableCloseResponse{}) |
| |
| func (msg *CloseableCloseResponse) Marshaler() _bindings.Marshaler { |
| return _mCloseableCloseResponse |
| } |
| |
| type QueryableQueryResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Identifies the underlying protocol. |
| Protocol []uint8 `fidl_offset_v2:"0" fidl_bounds:""` |
| } |
| |
| var _mQueryableQueryResponse = _bindings.CreateLazyMarshaler(QueryableQueryResponse{}) |
| |
| func (msg *QueryableQueryResponse) Marshaler() _bindings.Marshaler { |
| return _mQueryableQueryResponse |
| } |
| |
| type I_closeableCloseResultTag uint64 |
| |
| const ( |
| CloseableCloseResultResponse = 1 // 0x00000001 |
| CloseableCloseResultErr = 2 // 0x00000002 |
| ) |
| |
| type CloseableCloseResult struct { |
| I_closeableCloseResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response CloseableCloseResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mCloseableCloseResult = _bindings.CreateLazyMarshaler(CloseableCloseResult{}) |
| |
| func (msg *CloseableCloseResult) Marshaler() _bindings.Marshaler { |
| return _mCloseableCloseResult |
| } |
| |
| func (_m *CloseableCloseResult) reset() { |
| switch _m.I_closeableCloseResultTag { |
| case 1: |
| var _zeroed CloseableCloseResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *CloseableCloseResult) Which() I_closeableCloseResultTag { |
| return _m.I_closeableCloseResultTag |
| } |
| |
| func (_m *CloseableCloseResult) Ordinal() uint64 { |
| return uint64(_m.I_closeableCloseResultTag) |
| } |
| |
| func (_m *CloseableCloseResult) SetResponse(response CloseableCloseResponse) { |
| _m.reset() |
| _m.I_closeableCloseResultTag = CloseableCloseResultResponse |
| _m.Response = response |
| } |
| |
| func CloseableCloseResultWithResponse(response CloseableCloseResponse) CloseableCloseResult { |
| var _u CloseableCloseResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *CloseableCloseResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_closeableCloseResultTag = CloseableCloseResultErr |
| _m.Err = err |
| } |
| |
| func CloseableCloseResultWithErr(err int32) CloseableCloseResult { |
| var _u CloseableCloseResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| const ( |
| CloneableClone2Ordinal uint64 = 0x20d8a7aba2168a79 |
| ) |
| |
| type CloneableWithCtxInterface _bindings.ChannelProxy |
| |
| func (p *CloneableWithCtxInterface) Clone2(ctx_ _bindings.Context, request CloneableWithCtxInterfaceRequest) error { |
| req_ := &CloneableClone2Request{Request: request} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(CloneableClone2Ordinal, req_) |
| return err_ |
| } |
| |
| // Provides a means of duplicating a connection. |
| // |
| // See the composing protocol's documentation for a description of |
| // connection-scoped state, if any. |
| type CloneableWithCtx interface { |
| Clone2(ctx_ _bindings.Context, request CloneableWithCtxInterfaceRequest) error |
| } |
| |
| type CloneableWithCtxTransitionalBase struct{} |
| |
| type CloneableWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewCloneableWithCtxInterfaceRequest() (CloneableWithCtxInterfaceRequest, *CloneableWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return CloneableWithCtxInterfaceRequest(req), (*CloneableWithCtxInterface)(cli), err |
| } |
| |
| type CloneableWithCtxStub struct { |
| Impl CloneableWithCtx |
| } |
| |
| func (s_ *CloneableWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case CloneableClone2Ordinal: |
| in_ := &CloneableClone2Request{} |
| 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.Clone2(args_.Ctx, (*in_).Request) |
| return nil, false, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type CloneableEventProxy _bindings.ChannelProxy |
| |
| const ( |
| CloseableCloseOrdinal uint64 = 0x5ac5d459ad7f657e |
| ) |
| |
| type CloseableWithCtxInterface _bindings.ChannelProxy |
| |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| func (p *CloseableWithCtxInterface) Close(ctx_ _bindings.Context) (CloseableCloseResult, error) { |
| var req_ _bindings.Message |
| resp_ := &CloseableCloseResult{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(CloseableCloseOrdinal, req_, resp_) |
| return (*resp_), err_ |
| } |
| |
| // Provides a means of synchronously closing a connection. |
| type CloseableWithCtx interface { |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| Close(ctx_ _bindings.Context) (CloseableCloseResult, error) |
| } |
| |
| type CloseableWithCtxTransitionalBase struct{} |
| |
| type CloseableWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewCloseableWithCtxInterfaceRequest() (CloseableWithCtxInterfaceRequest, *CloseableWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return CloseableWithCtxInterfaceRequest(req), (*CloseableWithCtxInterface)(cli), err |
| } |
| |
| type CloseableWithCtxStub struct { |
| Impl CloseableWithCtx |
| } |
| |
| func (s_ *CloseableWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case CloseableCloseOrdinal: |
| payload, err_ := s_.Impl.Close(args_.Ctx) |
| out_ := &payload |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type CloseableEventProxy _bindings.ChannelProxy |
| |
| const ( |
| QueryableQueryOrdinal uint64 = 0x2658edee9decfc06 |
| ) |
| |
| type QueryableWithCtxInterface _bindings.ChannelProxy |
| |
| func (p *QueryableWithCtxInterface) Query(ctx_ _bindings.Context) ([]uint8, error) { |
| var req_ _bindings.Message |
| resp_ := &QueryableQueryResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(QueryableQueryOrdinal, req_, resp_) |
| return (*resp_).Protocol, err_ |
| } |
| |
| // Provides a means of identifying a type-erased protocol. |
| type QueryableWithCtx interface { |
| Query(ctx_ _bindings.Context) ([]uint8, error) |
| } |
| |
| type QueryableWithCtxTransitionalBase struct{} |
| |
| type QueryableWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewQueryableWithCtxInterfaceRequest() (QueryableWithCtxInterfaceRequest, *QueryableWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return QueryableWithCtxInterfaceRequest(req), (*QueryableWithCtxInterface)(cli), err |
| } |
| |
| type QueryableWithCtxStub struct { |
| Impl QueryableWithCtx |
| } |
| |
| func (s_ *QueryableWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case QueryableQueryOrdinal: |
| protocol, err_ := s_.Impl.Query(args_.Ctx) |
| out_ := &QueryableQueryResponse{Protocol: protocol} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type QueryableEventProxy _bindings.ChannelProxy |