blob: dd4f92b6f445f6d25551d3899e883c91b4fc7bb2 [file] [log] [blame]
// 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.
package interfaces
import (
_zx "syscall/zx"
_bindings "syscall/zx/fidl"
fuchsiahardwarenetwork "syscall/zx/hardware/network"
fuchsianet "syscall/zx/net"
)
const (
// The maximum length of an interface name.
InterfaceNameLength uint8 = 15
)
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 stateWithCtxGetWatcherRequest struct {
_ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"`
// Options for configuring the interface state watcher.
Options WatcherOptions `fidl_offset_v2:"0"`
Watcher WatcherWithCtxInterfaceRequest `fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_bounds:"0"`
}
var _mstateWithCtxGetWatcherRequest = _bindings.CreateLazyMarshaler(stateWithCtxGetWatcherRequest{})
func (msg *stateWithCtxGetWatcherRequest) Marshaler() _bindings.Marshaler {
return _mstateWithCtxGetWatcherRequest
}
type watcherWithCtxWatchResponse struct {
_ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Event Event `fidl_offset_v2:"0"`
}
var _mwatcherWithCtxWatchResponse = _bindings.CreateLazyMarshaler(watcherWithCtxWatchResponse{})
func (msg *watcherWithCtxWatchResponse) Marshaler() _bindings.Marshaler {
return _mwatcherWithCtxWatchResponse
}
type I_deviceClassTag uint64
const (
DeviceClassLoopback = 1 // 0x00000001
DeviceClassDevice = 2 // 0x00000002
)
type DeviceClass struct {
I_deviceClassTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
// The interface is loopback.
Loopback Empty `fidl_ordinal:"1"`
// The interface's network device class.
Device fuchsiahardwarenetwork.DeviceClass `fidl_ordinal:"2"`
}
var _mDeviceClass = _bindings.CreateLazyMarshaler(DeviceClass{})
func (msg *DeviceClass) Marshaler() _bindings.Marshaler {
return _mDeviceClass
}
func (_m *DeviceClass) reset() {
switch _m.I_deviceClassTag {
case 1:
var _zeroed Empty
_m.Loopback = _zeroed
case 2:
var _zeroed fuchsiahardwarenetwork.DeviceClass
_m.Device = _zeroed
}
}
func (_m *DeviceClass) Which() I_deviceClassTag {
return _m.I_deviceClassTag
}
func (_m *DeviceClass) Ordinal() uint64 {
return uint64(_m.I_deviceClassTag)
}
func (_m *DeviceClass) SetLoopback(loopback Empty) {
_m.reset()
_m.I_deviceClassTag = DeviceClassLoopback
_m.Loopback = loopback
}
func DeviceClassWithLoopback(loopback Empty) DeviceClass {
var _u DeviceClass
_u.SetLoopback(loopback)
return _u
}
func (_m *DeviceClass) SetDevice(device fuchsiahardwarenetwork.DeviceClass) {
_m.reset()
_m.I_deviceClassTag = DeviceClassDevice
_m.Device = device
}
func DeviceClassWithDevice(device fuchsiahardwarenetwork.DeviceClass) DeviceClass {
var _u DeviceClass
_u.SetDevice(device)
return _u
}
type I_eventTag uint64
const (
EventExisting = 1 // 0x00000001
EventAdded = 2 // 0x00000002
EventRemoved = 3 // 0x00000003
EventChanged = 4 // 0x00000004
EventIdle = 5 // 0x00000005
)
type Event struct {
I_eventTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
// Properties of an interface that existed when watching started.
//
// All fields are set.
Existing Properties `fidl_ordinal:"1"`
// Properties of an interface that was added while watching.
//
// All fields are set.
Added Properties `fidl_ordinal:"2"`
// ID of an interface that was removed while watching.
Removed uint64 `fidl_ordinal:"3"`
// Properties of an interface that changed while watching.
//
// Only [`Properties.id`] and changed fields are set.
Changed Properties `fidl_ordinal:"4"`
// Sentinel value indicating no more [`existing`] events will be
// sent.
Idle Empty `fidl_ordinal:"5"`
}
var _mEvent = _bindings.CreateLazyMarshaler(Event{})
func (msg *Event) Marshaler() _bindings.Marshaler {
return _mEvent
}
func (_m *Event) reset() {
switch _m.I_eventTag {
case 1:
var _zeroed Properties
_m.Existing = _zeroed
case 2:
var _zeroed Properties
_m.Added = _zeroed
case 3:
var _zeroed uint64
_m.Removed = _zeroed
case 4:
var _zeroed Properties
_m.Changed = _zeroed
case 5:
var _zeroed Empty
_m.Idle = _zeroed
}
}
func (_m *Event) Which() I_eventTag {
return _m.I_eventTag
}
func (_m *Event) Ordinal() uint64 {
return uint64(_m.I_eventTag)
}
func (_m *Event) SetExisting(existing Properties) {
_m.reset()
_m.I_eventTag = EventExisting
_m.Existing = existing
}
func EventWithExisting(existing Properties) Event {
var _u Event
_u.SetExisting(existing)
return _u
}
func (_m *Event) SetAdded(added Properties) {
_m.reset()
_m.I_eventTag = EventAdded
_m.Added = added
}
func EventWithAdded(added Properties) Event {
var _u Event
_u.SetAdded(added)
return _u
}
func (_m *Event) SetRemoved(removed uint64) {
_m.reset()
_m.I_eventTag = EventRemoved
_m.Removed = removed
}
func EventWithRemoved(removed uint64) Event {
var _u Event
_u.SetRemoved(removed)
return _u
}
func (_m *Event) SetChanged(changed Properties) {
_m.reset()
_m.I_eventTag = EventChanged
_m.Changed = changed
}
func EventWithChanged(changed Properties) Event {
var _u Event
_u.SetChanged(changed)
return _u
}
func (_m *Event) SetIdle(idle Empty) {
_m.reset()
_m.I_eventTag = EventIdle
_m.Idle = idle
}
func EventWithIdle(idle Empty) Event {
var _u Event
_u.SetIdle(idle)
return _u
}
type I_preferredLifetimeInfoTag uint64
const (
PreferredLifetimeInfoPreferredUntil = 1 // 0x00000001
PreferredLifetimeInfoDeprecated = 2 // 0x00000002
)
// Information about the preferred lifetime of an IP address or delegated
// prefix.
type PreferredLifetimeInfo struct {
I_preferredLifetimeInfoTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
// The end of the preferred lifetime.
//
// The address/prefix should *not* be considered deprecated if `zx.time`
// is in the past. `preferred_until` is exchanged as a means to inform
// the deadline where deprecation is expected to happen.
//
// The preferred lifetime of addresses is defined in
// [RFC 4862, section 2](https://tools.ietf.org/html/rfc4862#section-2).
//
// Addresses configured using a delegated prefix must have a preferred
// lifetime no longer than that of the prefix according to
// [RFC 8415, section 6.3](https://datatracker.ietf.org/doc/html/rfc8415#section-6.3).
//
// Must be greater than 0. If `zx.time.INFINITE`, the preferred lifetime
// does not expire.
PreferredUntil int64 `fidl_ordinal:"1"`
// The address/prefix is deprecated.
//
// Deprecated addresses should no longer be used for initiating
// new connections unless explicitly requested, or if no other
// non-deprecated addresses are assigned (as described in
// [RFC 4862, section 1](https://tools.ietf.org/html/rfc4862#section-1)).
//
// Addresses configured using a deprecated delegated prefix must also be
// deprecated according to
// [RFC 8415, section 6.3](https://datatracker.ietf.org/doc/html/rfc8415#section-6.3).
//
// An address/prefix can become undeprecated if its preferred lifetime is
// extended.
Deprecated Empty `fidl_ordinal:"2"`
}
var _mPreferredLifetimeInfo = _bindings.CreateLazyMarshaler(PreferredLifetimeInfo{})
func (msg *PreferredLifetimeInfo) Marshaler() _bindings.Marshaler {
return _mPreferredLifetimeInfo
}
func (_m *PreferredLifetimeInfo) reset() {
switch _m.I_preferredLifetimeInfoTag {
case 1:
var _zeroed int64
_m.PreferredUntil = _zeroed
case 2:
var _zeroed Empty
_m.Deprecated = _zeroed
}
}
func (_m *PreferredLifetimeInfo) Which() I_preferredLifetimeInfoTag {
return _m.I_preferredLifetimeInfoTag
}
func (_m *PreferredLifetimeInfo) Ordinal() uint64 {
return uint64(_m.I_preferredLifetimeInfoTag)
}
func (_m *PreferredLifetimeInfo) SetPreferredUntil(preferredUntil int64) {
_m.reset()
_m.I_preferredLifetimeInfoTag = PreferredLifetimeInfoPreferredUntil
_m.PreferredUntil = preferredUntil
}
func PreferredLifetimeInfoWithPreferredUntil(preferredUntil int64) PreferredLifetimeInfo {
var _u PreferredLifetimeInfo
_u.SetPreferredUntil(preferredUntil)
return _u
}
func (_m *PreferredLifetimeInfo) SetDeprecated(deprecated Empty) {
_m.reset()
_m.I_preferredLifetimeInfoTag = PreferredLifetimeInfoDeprecated
_m.Deprecated = deprecated
}
func PreferredLifetimeInfoWithDeprecated(deprecated Empty) PreferredLifetimeInfo {
var _u PreferredLifetimeInfo
_u.SetDeprecated(deprecated)
return _u
}
type Address struct {
_ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
I_unknownData interface{}
// The address and prefix length.
//
// Required.
Addr fuchsianet.Subnet `fidl_ordinal:"1"`
AddrPresent bool
// The time after which the address will no longer be valid.
//
// Its value must be greater than 0. A value of `ZX_TIME_INFINITE`
// indicates that the address will always be valid. The value is
// derived from the monotonic clock.
//
// As a `zx.time`, the value has
// [monotonic clock semantics](https://fuchsia.dev/fuchsia-src/concepts/time/monotonic),
// which implies that it has no meaning outside of the host on which it
// was generated and no meaning across host restarts.
//
// Required.
ValidUntil int64 `fidl_ordinal:"2"`
ValidUntilPresent bool
// Preferred lifetime information.
//
// Required.
PreferredLifetimeInfo PreferredLifetimeInfo `fidl_ordinal:"3"`
PreferredLifetimeInfoPresent bool
}
var _mAddress = _bindings.CreateLazyMarshaler(Address{})
func (msg *Address) Marshaler() _bindings.Marshaler {
return _mAddress
}
func (u *Address) SetAddr(addr fuchsianet.Subnet) {
u.Addr = addr
u.AddrPresent = true
}
func (u *Address) GetAddr() fuchsianet.Subnet {
return u.Addr
}
func (u *Address) GetAddrWithDefault(_default fuchsianet.Subnet) fuchsianet.Subnet {
if !u.HasAddr() {
return _default
}
return u.Addr
}
func (u *Address) HasAddr() bool {
return u.AddrPresent
}
func (u *Address) ClearAddr() {
u.AddrPresent = false
}
func (u *Address) SetValidUntil(validUntil int64) {
u.ValidUntil = validUntil
u.ValidUntilPresent = true
}
func (u *Address) GetValidUntil() int64 {
return u.ValidUntil
}
func (u *Address) GetValidUntilWithDefault(_default int64) int64 {
if !u.HasValidUntil() {
return _default
}
return u.ValidUntil
}
func (u *Address) HasValidUntil() bool {
return u.ValidUntilPresent
}
func (u *Address) ClearValidUntil() {
u.ValidUntilPresent = false
}
func (u *Address) SetPreferredLifetimeInfo(preferredLifetimeInfo PreferredLifetimeInfo) {
u.PreferredLifetimeInfo = preferredLifetimeInfo
u.PreferredLifetimeInfoPresent = true
}
func (u *Address) GetPreferredLifetimeInfo() PreferredLifetimeInfo {
return u.PreferredLifetimeInfo
}
func (u *Address) GetPreferredLifetimeInfoWithDefault(_default PreferredLifetimeInfo) PreferredLifetimeInfo {
if !u.HasPreferredLifetimeInfo() {
return _default
}
return u.PreferredLifetimeInfo
}
func (u *Address) HasPreferredLifetimeInfo() bool {
return u.PreferredLifetimeInfoPresent
}
func (u *Address) ClearPreferredLifetimeInfo() {
u.PreferredLifetimeInfoPresent = false
}
func (u *Address) HasUnknownData() bool {
return u.I_unknownData != nil
}
func (u *Address) GetUnknownData() map[uint64]_bindings.UnknownData {
return u.I_unknownData.(map[uint64]_bindings.UnknownData)
}
// Properties of a network interface.
type Properties struct {
_ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
I_unknownData interface{}
// An opaque identifier for the interface. Its value will not be reused
// even if the device is removed and subsequently re-added. Immutable.
Id uint64 `fidl_ordinal:"1"`
IdPresent bool
// The addresses currently assigned to the interface.
Addresses []Address `fidl_bounds:"" fidl_ordinal:"2"`
AddressesPresent bool
// The device is enabled and its physical state is online.
Online bool `fidl_ordinal:"3"`
OnlinePresent bool
// The device class of the interface. Immutable.
DeviceClass DeviceClass `fidl_ordinal:"4"`
DeviceClassPresent bool
// Whether there is a default IPv4 route through this interface.
HasDefaultIpv4Route bool `fidl_ordinal:"5"`
HasDefaultIpv4RoutePresent bool
// Whether there is a default IPv6 route through this interface.
HasDefaultIpv6Route bool `fidl_ordinal:"6"`
HasDefaultIpv6RoutePresent bool
// The name of the interface. Immutable.
Name string `fidl_bounds:"15" fidl_ordinal:"7"`
NamePresent bool
}
var _mProperties = _bindings.CreateLazyMarshaler(Properties{})
func (msg *Properties) Marshaler() _bindings.Marshaler {
return _mProperties
}
func (u *Properties) SetId(id uint64) {
u.Id = id
u.IdPresent = true
}
func (u *Properties) GetId() uint64 {
return u.Id
}
func (u *Properties) GetIdWithDefault(_default uint64) uint64 {
if !u.HasId() {
return _default
}
return u.Id
}
func (u *Properties) HasId() bool {
return u.IdPresent
}
func (u *Properties) ClearId() {
u.IdPresent = false
}
func (u *Properties) SetAddresses(addresses []Address) {
u.Addresses = addresses
u.AddressesPresent = true
}
func (u *Properties) GetAddresses() []Address {
return u.Addresses
}
func (u *Properties) GetAddressesWithDefault(_default []Address) []Address {
if !u.HasAddresses() {
return _default
}
return u.Addresses
}
func (u *Properties) HasAddresses() bool {
return u.AddressesPresent
}
func (u *Properties) ClearAddresses() {
u.AddressesPresent = false
}
func (u *Properties) SetOnline(online bool) {
u.Online = online
u.OnlinePresent = true
}
func (u *Properties) GetOnline() bool {
return u.Online
}
func (u *Properties) GetOnlineWithDefault(_default bool) bool {
if !u.HasOnline() {
return _default
}
return u.Online
}
func (u *Properties) HasOnline() bool {
return u.OnlinePresent
}
func (u *Properties) ClearOnline() {
u.OnlinePresent = false
}
func (u *Properties) SetDeviceClass(deviceClass DeviceClass) {
u.DeviceClass = deviceClass
u.DeviceClassPresent = true
}
func (u *Properties) GetDeviceClass() DeviceClass {
return u.DeviceClass
}
func (u *Properties) GetDeviceClassWithDefault(_default DeviceClass) DeviceClass {
if !u.HasDeviceClass() {
return _default
}
return u.DeviceClass
}
func (u *Properties) HasDeviceClass() bool {
return u.DeviceClassPresent
}
func (u *Properties) ClearDeviceClass() {
u.DeviceClassPresent = false
}
func (u *Properties) SetHasDefaultIpv4Route(hasDefaultIpv4Route bool) {
u.HasDefaultIpv4Route = hasDefaultIpv4Route
u.HasDefaultIpv4RoutePresent = true
}
func (u *Properties) GetHasDefaultIpv4Route() bool {
return u.HasDefaultIpv4Route
}
func (u *Properties) GetHasDefaultIpv4RouteWithDefault(_default bool) bool {
if !u.HasHasDefaultIpv4Route() {
return _default
}
return u.HasDefaultIpv4Route
}
func (u *Properties) HasHasDefaultIpv4Route() bool {
return u.HasDefaultIpv4RoutePresent
}
func (u *Properties) ClearHasDefaultIpv4Route() {
u.HasDefaultIpv4RoutePresent = false
}
func (u *Properties) SetHasDefaultIpv6Route(hasDefaultIpv6Route bool) {
u.HasDefaultIpv6Route = hasDefaultIpv6Route
u.HasDefaultIpv6RoutePresent = true
}
func (u *Properties) GetHasDefaultIpv6Route() bool {
return u.HasDefaultIpv6Route
}
func (u *Properties) GetHasDefaultIpv6RouteWithDefault(_default bool) bool {
if !u.HasHasDefaultIpv6Route() {
return _default
}
return u.HasDefaultIpv6Route
}
func (u *Properties) HasHasDefaultIpv6Route() bool {
return u.HasDefaultIpv6RoutePresent
}
func (u *Properties) ClearHasDefaultIpv6Route() {
u.HasDefaultIpv6RoutePresent = false
}
func (u *Properties) SetName(name string) {
u.Name = name
u.NamePresent = true
}
func (u *Properties) GetName() string {
return u.Name
}
func (u *Properties) GetNameWithDefault(_default string) string {
if !u.HasName() {
return _default
}
return u.Name
}
func (u *Properties) HasName() bool {
return u.NamePresent
}
func (u *Properties) ClearName() {
u.NamePresent = false
}
func (u *Properties) HasUnknownData() bool {
return u.I_unknownData != nil
}
func (u *Properties) GetUnknownData() map[uint64]_bindings.UnknownData {
return u.I_unknownData.(map[uint64]_bindings.UnknownData)
}
type WatcherOptions struct {
_ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
I_unknownData interface{}
}
var _mWatcherOptions = _bindings.CreateLazyMarshaler(WatcherOptions{})
func (msg *WatcherOptions) Marshaler() _bindings.Marshaler {
return _mWatcherOptions
}
func (u *WatcherOptions) HasUnknownData() bool {
return u.I_unknownData != nil
}
func (u *WatcherOptions) GetUnknownData() map[uint64]_bindings.UnknownData {
return u.I_unknownData.(map[uint64]_bindings.UnknownData)
}
const (
StateGetWatcherOrdinal uint64 = 0x4fe223c98b263ae3
)
type StateWithCtxInterface _bindings.ChannelProxy
// Initialize a watcher for interface state.
//
// The server enqueues interface addition, deletion and property changes as
// they occur, which can then be retrieved via the pipelined protocol.
//
// + request `options` specifies the behavior of the [`Watcher`].
// + request `watcher` grants access to a [`Watcher`]. Closed if the queue
// cannot be allocated or if the queue is full when the server attempts
// to enqueue an event.
func (p *StateWithCtxInterface) GetWatcher(ctx_ _bindings.Context, options WatcherOptions, watcher WatcherWithCtxInterfaceRequest) error {
req_ := &stateWithCtxGetWatcherRequest{Options: options, Watcher: watcher}
err_ := ((*_bindings.ChannelProxy)(p)).Send(StateGetWatcherOrdinal, req_)
return err_
}
// Network interface state inspection and observation.
type StateWithCtx interface {
// Initialize a watcher for interface state.
//
// The server enqueues interface addition, deletion and property changes as
// they occur, which can then be retrieved via the pipelined protocol.
//
// + request `options` specifies the behavior of the [`Watcher`].
// + request `watcher` grants access to a [`Watcher`]. Closed if the queue
// cannot be allocated or if the queue is full when the server attempts
// to enqueue an event.
GetWatcher(ctx_ _bindings.Context, options WatcherOptions, watcher WatcherWithCtxInterfaceRequest) error
}
type StateWithCtxTransitionalBase struct{}
type StateWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewStateWithCtxInterfaceRequest() (StateWithCtxInterfaceRequest, *StateWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return StateWithCtxInterfaceRequest(req), (*StateWithCtxInterface)(cli), err
}
// Implements ServiceRequest.
func (_ StateWithCtxInterfaceRequest) Name() string {
return "fuchsia.net.interfaces.State"
}
func (c StateWithCtxInterfaceRequest) ToChannel() _zx.Channel {
return c.Channel
}
const StateName = "fuchsia.net.interfaces.State"
type StateWithCtxStub struct {
Impl StateWithCtx
}
func (s_ *StateWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case StateGetWatcherOrdinal:
in_ := &stateWithCtxGetWatcherRequest{}
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.GetWatcher(args_.Ctx, (*in_).Options, (*in_).Watcher)
return nil, false, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type StateEventProxy _bindings.ChannelProxy
const (
WatcherWatchOrdinal uint64 = 0x550767aa9faeeef3
)
type WatcherWithCtxInterface _bindings.ChannelProxy
// Hanging get for an interface addition/deletion change.
//
// Clients should only have one call of this method at a time; a second
// call to this method while a call is already pending will cause the
// server end of the protocol to be closed.
//
// If there are N interfaces present at the time the server end of the
// protocol is initialized, then the first N invocations of this method
// will return [`Event.existing`] followed by a single [`Event.idle`]
// indicating that all existing interfaces have been sent. Subsequent calls
// will immediately return if there is a change to be reported, or block
// until a change occurs.
//
// The server may choose to coalesce property change events, e.g. when
// multiple independent property changes occur. As a result, clients cannot
// assume that the order in which they observe the interface changes is the
// order in which the changes occurred.
//
// - response `event` the interface change event. Properties of an added or
// existing interface will have all fields present. Property change
// events will always have the interface ID field present (the ID never
// changes); while other fields will only be present with the new value
// if the property has changed.
func (p *WatcherWithCtxInterface) Watch(ctx_ _bindings.Context) (Event, error) {
var req_ _bindings.Message
resp_ := &watcherWithCtxWatchResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(WatcherWatchOrdinal, req_, resp_)
return (*resp_).Event, err_
}
// Observer protocol for changes to network interfaces (addition, deletion, and
// interface property changes).
type WatcherWithCtx interface {
// Hanging get for an interface addition/deletion change.
//
// Clients should only have one call of this method at a time; a second
// call to this method while a call is already pending will cause the
// server end of the protocol to be closed.
//
// If there are N interfaces present at the time the server end of the
// protocol is initialized, then the first N invocations of this method
// will return [`Event.existing`] followed by a single [`Event.idle`]
// indicating that all existing interfaces have been sent. Subsequent calls
// will immediately return if there is a change to be reported, or block
// until a change occurs.
//
// The server may choose to coalesce property change events, e.g. when
// multiple independent property changes occur. As a result, clients cannot
// assume that the order in which they observe the interface changes is the
// order in which the changes occurred.
//
// - response `event` the interface change event. Properties of an added or
// existing interface will have all fields present. Property change
// events will always have the interface ID field present (the ID never
// changes); while other fields will only be present with the new value
// if the property has changed.
Watch(ctx_ _bindings.Context) (Event, error)
}
type WatcherWithCtxTransitionalBase struct{}
type WatcherWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewWatcherWithCtxInterfaceRequest() (WatcherWithCtxInterfaceRequest, *WatcherWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return WatcherWithCtxInterfaceRequest(req), (*WatcherWithCtxInterface)(cli), err
}
type WatcherWithCtxStub struct {
Impl WatcherWithCtx
}
func (s_ *WatcherWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case WatcherWatchOrdinal:
event, err_ := s_.Impl.Watch(args_.Ctx)
out_ := &watcherWithCtxWatchResponse{Event: event}
return out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type WatcherEventProxy _bindings.ChannelProxy