| // Copyright 2020 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 io2 |
| |
| import ( |
| _zx "syscall/zx" |
| _bindings "syscall/zx/fidl" |
| fuchsiamem "syscall/zx/mem" |
| ) |
| |
| const ( |
| // The maximum number of directory entires or watcher events returned |
| // in a batch by a hanging-get pattern. |
| MaxDirectoryBatchSize uint64 = 8192 |
| // The maximum I/O size that is allowed for read/write operations using |
| // byte vectors. |
| MaxTransferSize uint64 = 8192 |
| CloseAll InotifyWatchMask = 24 |
| Move InotifyWatchMask = 192 |
| // The maximum length, in bytes, of a single filesystem component. |
| MaxNameLength uint64 = 255 |
| // The maximum length, in bytes, of a filesystem path. |
| MaxPathLength uint64 = 4095 |
| // Alias for directory permission alias r* |
| RStarDir Operations = 211 |
| // Alias for directory permission alias rw* |
| RwStarDir Operations = 503 |
| // Alias for directory permission alias rx* |
| RxStarDir Operations = 219 |
| // Alias for directory permission alias w* |
| WStarDir Operations = 485 |
| // Alias for directory permission alias x* |
| XStarDir Operations = 201 |
| ) |
| |
| var _ _bindings.Enum = RightsResolution(0) |
| |
| // When an `Open`/`Reopen` request reaches its final remote server, it should |
| // assign rights on the new connection based on one of these modes. |
| type RightsResolution uint32 |
| |
| const ( |
| |
| // The rights will be the intersection between [`RightsRequest.at_most`] |
| // and the connection where the `Open`/`Reopen` request was received, |
| // closing `object_request` with `ZX_ERR_ACCESS_DENIED` if it is empty. |
| RightsResolutionMaximize RightsResolution = 1 |
| |
| // The rights will be determined by the following rules: |
| // |
| // * If the negotiated protocol on the new connection is |
| // [`fuchsia.io2/Directory`], the rules from the `MAXIMIZE` case applies. |
| // * Otherwise, the rights will be [`RightsRequest.at_least`] if it |
| // does not exceed rights on the current connection. |
| // * Otherwise, `object_request` should be closed with |
| // `ZX_ERR_ACCESS_DENIED`. |
| // |
| // The motivation for this enum is to facilitate implementing POSIX |
| // compatibility layers. The POSIX file permission model relies on ambient |
| // authority: access control on files are resolved based on the `mode` of |
| // the file, and the current user. There is no concept of hierarchical |
| // permissions. Fuchsia, on the other hand, restricts rights on file |
| // connections to never exceed that of its containing directory connection. |
| RightsResolutionPosix RightsResolution = 2 |
| ) |
| |
| func (_ RightsResolution) I_EnumValues() []RightsResolution { |
| return []RightsResolution{ |
| RightsResolutionMaximize, |
| RightsResolutionPosix, |
| } |
| } |
| |
| func (_ RightsResolution) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x RightsResolution) IsUnknown() bool { |
| switch x { |
| case 1: |
| return false |
| case 2: |
| return false |
| default: |
| return true |
| } |
| } |
| |
| func (x RightsResolution) String() string { |
| switch x { |
| case 1: |
| return "Maximize" |
| case 2: |
| return "Posix" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Enum = OpenMode(0) |
| |
| // Options related to node creation during [`Directory.Open`]. |
| type OpenMode uint32 |
| |
| const ( |
| |
| // Only succeed if the object exists. |
| OpenModeOpenExisting OpenMode = 1 |
| |
| // Create the object if it does not exist, otherwise open existing. |
| // The check and the creation are performed in one atomic step. |
| OpenModeMaybeCreate OpenMode = 2 |
| |
| // Assert that the object does not exist, then create it. |
| // The assertion and creation are performed in one atomic step. |
| OpenModeAlwaysCreate OpenMode = 3 |
| |
| // If the object is a mount point, open the local directory |
| // instead of forwarding the request. The object must be a directory. |
| // |
| // This option implies the behavior of `OPEN_EXISTING`. |
| OpenModeOpenMountPoint OpenMode = 268435456 |
| ) |
| |
| func (_ OpenMode) I_EnumValues() []OpenMode { |
| return []OpenMode{ |
| OpenModeOpenExisting, |
| OpenModeMaybeCreate, |
| OpenModeAlwaysCreate, |
| OpenModeOpenMountPoint, |
| } |
| } |
| |
| func (_ OpenMode) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x OpenMode) IsUnknown() bool { |
| switch x { |
| case 1: |
| return false |
| case 2: |
| return false |
| case 3: |
| return false |
| case 268435456: |
| return false |
| default: |
| return true |
| } |
| } |
| |
| func (x OpenMode) String() string { |
| switch x { |
| case 1: |
| return "OpenExisting" |
| case 2: |
| return "MaybeCreate" |
| case 3: |
| return "AlwaysCreate" |
| case 268435456: |
| return "OpenMountPoint" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Enum = SeekOrigin(0) |
| |
| // The reference point for updating the seek offset. See [`File.Seek`]. |
| // |
| // This enum matches the `zx_stream_seek_origin_t` enum. |
| type SeekOrigin uint32 |
| |
| const ( |
| |
| // Seek from the start of the file. |
| // The seek offset will be set to `offset` bytes. |
| // The seek offset cannot be negative in this case. |
| SeekOriginStart SeekOrigin = 0 |
| |
| // Seek from the current position in the file. |
| // The seek offset will be the current seek offset plus `offset` bytes. |
| SeekOriginCurrent SeekOrigin = 1 |
| |
| // Seek from the end of the file. |
| // The seek offset will be the file size plus `offset` bytes. |
| SeekOriginEnd SeekOrigin = 2 |
| ) |
| |
| func (_ SeekOrigin) I_EnumValues() []SeekOrigin { |
| return []SeekOrigin{ |
| SeekOriginStart, |
| SeekOriginCurrent, |
| SeekOriginEnd, |
| } |
| } |
| |
| func (_ SeekOrigin) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x SeekOrigin) IsUnknown() bool { |
| switch x { |
| case 0: |
| return false |
| case 1: |
| return false |
| case 2: |
| return false |
| default: |
| return true |
| } |
| } |
| |
| func (x SeekOrigin) String() string { |
| switch x { |
| case 0: |
| return "Start" |
| case 1: |
| return "Current" |
| case 2: |
| return "End" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Enum = AdvisoryLockType(0) |
| |
| // A type of advisory lock. |
| // |
| // Used with [`AdvisoryLocking.AdvisoryLock`]. |
| type AdvisoryLockType uint32 |
| |
| const ( |
| |
| // Zero or more connections can hold read locks on a file simultaneously. |
| AdvisoryLockTypeRead AdvisoryLockType = 1 |
| |
| // At most one connection can hold a write lock on a file simultaneously. |
| // When a write lock is held on a file, no other types of locks can be held |
| // on that file. |
| AdvisoryLockTypeWrite AdvisoryLockType = 2 |
| |
| // The region specifies a region to be unlocked. |
| AdvisoryLockTypeUnlock AdvisoryLockType = 3 |
| ) |
| |
| func (_ AdvisoryLockType) I_EnumValues() []AdvisoryLockType { |
| return []AdvisoryLockType{ |
| AdvisoryLockTypeRead, |
| AdvisoryLockTypeWrite, |
| AdvisoryLockTypeUnlock, |
| } |
| } |
| |
| func (_ AdvisoryLockType) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x AdvisoryLockType) IsUnknown() bool { |
| switch x { |
| case 1: |
| return false |
| case 2: |
| return false |
| case 3: |
| return false |
| default: |
| return true |
| } |
| } |
| |
| func (x AdvisoryLockType) String() string { |
| switch x { |
| case 1: |
| return "Read" |
| case 2: |
| return "Write" |
| case 3: |
| return "Unlock" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = ConnectionInfoQuery(0) |
| |
| // Set the relevant bit to one to fetch the corresponding field |
| // during [`fuchsia.io2/Node.Describe`]. |
| type ConnectionInfoQuery uint64 |
| |
| const ( |
| ConnectionInfoQueryRepresentation ConnectionInfoQuery = 1 |
| ConnectionInfoQueryRights ConnectionInfoQuery = 2 |
| ConnectionInfoQueryAvailableOperations ConnectionInfoQuery = 4 |
| ConnectionInfoQuery_Mask ConnectionInfoQuery = 7 |
| ) |
| |
| func (_ ConnectionInfoQuery) I_BitsMask() ConnectionInfoQuery { |
| return ConnectionInfoQuery_Mask |
| } |
| |
| func (_ ConnectionInfoQuery) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x ConnectionInfoQuery) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x ConnectionInfoQuery) GetUnknownBits() uint64 { |
| return uint64(^ConnectionInfoQuery_Mask & x) |
| } |
| |
| func (x ConnectionInfoQuery) InvertBits() ConnectionInfoQuery { |
| return ConnectionInfoQuery_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x ConnectionInfoQuery) HasBits(mask ConnectionInfoQuery) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x ConnectionInfoQuery) ClearBits(mask ConnectionInfoQuery) ConnectionInfoQuery { |
| return ^mask & x |
| } |
| |
| func (x ConnectionInfoQuery) String() string { |
| switch x { |
| case 1: |
| return "Representation" |
| case 2: |
| return "Rights" |
| case 4: |
| return "AvailableOperations" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = NodeProtocols(0) |
| |
| // A node may have multiple supported representations when opening, even though |
| // it may have a fixed underlying identity. |
| // |
| // Today, a file is accessed via the [`fuchsia.io2/File`] protocol, and sends a |
| // [`Representation.FileInfo`] when opened with `GET_CONNECTION_INFO`. However, |
| // in the future we might introduce a more sophisticated `FileV2` protocol, or |
| // a more efficient `SuperFastFile` backed by a specialized kernel object. |
| // New clients can request the more advanced representations by specifying |
| // the corresponding bits in [`NodeProtocols`], whereas existing clients |
| // would continue to talk to the node via the old representation. |
| // |
| // [`NodeProtocols`] enables forward-compatibility through a form of protocol |
| // negotiation. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`Representation`]. |
| type NodeProtocols uint64 |
| |
| const ( |
| NodeProtocolsConnector NodeProtocols = 1 |
| NodeProtocolsDirectory NodeProtocols = 2 |
| NodeProtocolsFile NodeProtocols = 4 |
| NodeProtocolsMemory NodeProtocols = 8 |
| NodeProtocolsPosixSocket NodeProtocols = 16 |
| NodeProtocolsPipe NodeProtocols = 32 |
| NodeProtocolsDebuglog NodeProtocols = 64 |
| NodeProtocolsDevice NodeProtocols = 268435456 |
| NodeProtocolsTty NodeProtocols = 536870912 |
| NodeProtocols_Mask NodeProtocols = 805306495 |
| ) |
| |
| func (_ NodeProtocols) I_BitsMask() NodeProtocols { |
| return NodeProtocols_Mask |
| } |
| |
| func (_ NodeProtocols) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x NodeProtocols) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x NodeProtocols) GetUnknownBits() uint64 { |
| return uint64(^NodeProtocols_Mask & x) |
| } |
| |
| func (x NodeProtocols) InvertBits() NodeProtocols { |
| return NodeProtocols_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x NodeProtocols) HasBits(mask NodeProtocols) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x NodeProtocols) ClearBits(mask NodeProtocols) NodeProtocols { |
| return ^mask & x |
| } |
| |
| func (x NodeProtocols) String() string { |
| switch x { |
| case 1: |
| return "Connector" |
| case 2: |
| return "Directory" |
| case 4: |
| return "File" |
| case 8: |
| return "Memory" |
| case 16: |
| return "PosixSocket" |
| case 32: |
| return "Pipe" |
| case 64: |
| return "Debuglog" |
| case 268435456: |
| return "Device" |
| case 536870912: |
| return "Tty" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = ConnectionFlags(0) |
| |
| // Flags applicable to both [`Directory.Open`] and [`Node.Reopen`]. |
| type ConnectionFlags uint64 |
| |
| const ( |
| ConnectionFlagsGetConnectionInfo ConnectionFlags = 1 |
| ConnectionFlagsConnect ConnectionFlags = 2 |
| ConnectionFlagsAppend ConnectionFlags = 4 |
| ConnectionFlagsTruncate ConnectionFlags = 8 |
| ConnectionFlags_Mask ConnectionFlags = 15 |
| ) |
| |
| func (_ ConnectionFlags) I_BitsMask() ConnectionFlags { |
| return ConnectionFlags_Mask |
| } |
| |
| func (_ ConnectionFlags) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x ConnectionFlags) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x ConnectionFlags) GetUnknownBits() uint64 { |
| return uint64(^ConnectionFlags_Mask & x) |
| } |
| |
| func (x ConnectionFlags) InvertBits() ConnectionFlags { |
| return ConnectionFlags_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x ConnectionFlags) HasBits(mask ConnectionFlags) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x ConnectionFlags) ClearBits(mask ConnectionFlags) ConnectionFlags { |
| return ^mask & x |
| } |
| |
| func (x ConnectionFlags) String() string { |
| switch x { |
| case 1: |
| return "GetConnectionInfo" |
| case 2: |
| return "Connect" |
| case 4: |
| return "Append" |
| case 8: |
| return "Truncate" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = DeviceSignal(0) |
| |
| type DeviceSignal uint32 |
| |
| const ( |
| DeviceSignalReadable DeviceSignal = 16777216 |
| DeviceSignalWritable DeviceSignal = 33554432 |
| DeviceSignalError DeviceSignal = 67108864 |
| DeviceSignalHangup DeviceSignal = 134217728 |
| DeviceSignalOob DeviceSignal = 268435456 |
| DeviceSignal_Mask DeviceSignal = 520093696 |
| ) |
| |
| func (_ DeviceSignal) I_BitsMask() DeviceSignal { |
| return DeviceSignal_Mask |
| } |
| |
| func (_ DeviceSignal) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x DeviceSignal) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x DeviceSignal) GetUnknownBits() uint64 { |
| return uint64(^DeviceSignal_Mask & x) |
| } |
| |
| func (x DeviceSignal) InvertBits() DeviceSignal { |
| return DeviceSignal_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x DeviceSignal) HasBits(mask DeviceSignal) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x DeviceSignal) ClearBits(mask DeviceSignal) DeviceSignal { |
| return ^mask & x |
| } |
| |
| func (x DeviceSignal) String() string { |
| switch x { |
| case 16777216: |
| return "Readable" |
| case 33554432: |
| return "Writable" |
| case 67108864: |
| return "Error" |
| case 134217728: |
| return "Hangup" |
| case 268435456: |
| return "Oob" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = UnlinkFlags(0) |
| |
| // Flags for [`Directory.Unlink`]. |
| type UnlinkFlags uint64 |
| |
| const ( |
| UnlinkFlagsMustBeDirectory UnlinkFlags = 1 |
| UnlinkFlags_Mask UnlinkFlags = 1 |
| ) |
| |
| func (_ UnlinkFlags) I_BitsMask() UnlinkFlags { |
| return UnlinkFlags_Mask |
| } |
| |
| func (_ UnlinkFlags) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x UnlinkFlags) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x UnlinkFlags) GetUnknownBits() uint64 { |
| return uint64(^UnlinkFlags_Mask & x) |
| } |
| |
| func (x UnlinkFlags) InvertBits() UnlinkFlags { |
| return UnlinkFlags_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x UnlinkFlags) HasBits(mask UnlinkFlags) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x UnlinkFlags) ClearBits(mask UnlinkFlags) UnlinkFlags { |
| return ^mask & x |
| } |
| |
| func (x UnlinkFlags) String() string { |
| switch x { |
| case 1: |
| return "MustBeDirectory" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = DirectoryWatchMask(0) |
| |
| // Used by [`fuchsia.io2/Directory.Watch`] to indicate the types of events |
| // interested by a watcher. |
| type DirectoryWatchMask uint64 |
| |
| const ( |
| DirectoryWatchMaskExisting DirectoryWatchMask = 1 |
| DirectoryWatchMaskIdle DirectoryWatchMask = 2 |
| DirectoryWatchMaskAdded DirectoryWatchMask = 4 |
| DirectoryWatchMaskRemoved DirectoryWatchMask = 8 |
| DirectoryWatchMask_Mask DirectoryWatchMask = 15 |
| ) |
| |
| func (_ DirectoryWatchMask) I_BitsMask() DirectoryWatchMask { |
| return DirectoryWatchMask_Mask |
| } |
| |
| func (_ DirectoryWatchMask) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x DirectoryWatchMask) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x DirectoryWatchMask) GetUnknownBits() uint64 { |
| return uint64(^DirectoryWatchMask_Mask & x) |
| } |
| |
| func (x DirectoryWatchMask) InvertBits() DirectoryWatchMask { |
| return DirectoryWatchMask_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x DirectoryWatchMask) HasBits(mask DirectoryWatchMask) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x DirectoryWatchMask) ClearBits(mask DirectoryWatchMask) DirectoryWatchMask { |
| return ^mask & x |
| } |
| |
| func (x DirectoryWatchMask) String() string { |
| switch x { |
| case 1: |
| return "Existing" |
| case 2: |
| return "Idle" |
| case 4: |
| return "Added" |
| case 8: |
| return "Removed" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = VmoFlags(0) |
| |
| type VmoFlags uint64 |
| |
| const ( |
| VmoFlagsRead VmoFlags = 1 |
| VmoFlagsWrite VmoFlags = 2 |
| VmoFlagsExecute VmoFlags = 4 |
| VmoFlagsPrivateClone VmoFlags = 65536 |
| VmoFlagsSharedBuffer VmoFlags = 131072 |
| VmoFlags_Mask VmoFlags = 196615 |
| ) |
| |
| func (_ VmoFlags) I_BitsMask() VmoFlags { |
| return VmoFlags_Mask |
| } |
| |
| func (_ VmoFlags) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x VmoFlags) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x VmoFlags) GetUnknownBits() uint64 { |
| return uint64(^VmoFlags_Mask & x) |
| } |
| |
| func (x VmoFlags) InvertBits() VmoFlags { |
| return VmoFlags_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x VmoFlags) HasBits(mask VmoFlags) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x VmoFlags) ClearBits(mask VmoFlags) VmoFlags { |
| return ^mask & x |
| } |
| |
| func (x VmoFlags) String() string { |
| switch x { |
| case 1: |
| return "Read" |
| case 2: |
| return "Write" |
| case 4: |
| return "Execute" |
| case 65536: |
| return "PrivateClone" |
| case 131072: |
| return "SharedBuffer" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = FileSignal(0) |
| |
| type FileSignal uint32 |
| |
| const ( |
| FileSignalReadable FileSignal = 16777216 |
| FileSignalWritable FileSignal = 33554432 |
| FileSignal_Mask FileSignal = 50331648 |
| ) |
| |
| func (_ FileSignal) I_BitsMask() FileSignal { |
| return FileSignal_Mask |
| } |
| |
| func (_ FileSignal) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x FileSignal) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x FileSignal) GetUnknownBits() uint64 { |
| return uint64(^FileSignal_Mask & x) |
| } |
| |
| func (x FileSignal) InvertBits() FileSignal { |
| return FileSignal_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x FileSignal) HasBits(mask FileSignal) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x FileSignal) ClearBits(mask FileSignal) FileSignal { |
| return ^mask & x |
| } |
| |
| func (x FileSignal) String() string { |
| switch x { |
| case 16777216: |
| return "Readable" |
| case 33554432: |
| return "Writable" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = InotifyWatchMask(0) |
| |
| // Used by InotifyAddWatch to indicate the server the events to be watched on. |
| // Also used by [`fuchsia.io2/Node.Inotify`] to indicate the types of events |
| // that occured on server side, to be notified to clients. See InotifyEvent. |
| type InotifyWatchMask uint32 |
| |
| const ( |
| InotifyWatchMaskAccess InotifyWatchMask = 1 |
| InotifyWatchMaskModify InotifyWatchMask = 2 |
| InotifyWatchMaskAttrib InotifyWatchMask = 4 |
| InotifyWatchMaskCloseWrite InotifyWatchMask = 8 |
| InotifyWatchMaskCloseNowrite InotifyWatchMask = 16 |
| InotifyWatchMaskOpen InotifyWatchMask = 32 |
| InotifyWatchMaskMovedFrom InotifyWatchMask = 64 |
| InotifyWatchMaskMovedTo InotifyWatchMask = 128 |
| InotifyWatchMaskCreate InotifyWatchMask = 256 |
| InotifyWatchMaskDelete InotifyWatchMask = 512 |
| InotifyWatchMaskDeleteSelf InotifyWatchMask = 1024 |
| InotifyWatchMaskMoveSelf InotifyWatchMask = 2048 |
| InotifyWatchMaskUnmount InotifyWatchMask = 8192 |
| InotifyWatchMaskQOverflow InotifyWatchMask = 16384 |
| InotifyWatchMaskIgnored InotifyWatchMask = 32768 |
| InotifyWatchMaskOnlydir InotifyWatchMask = 16777216 |
| InotifyWatchMaskDontFollow InotifyWatchMask = 33554432 |
| InotifyWatchMaskExclUnlink InotifyWatchMask = 67108864 |
| InotifyWatchMaskMaskCreate InotifyWatchMask = 268435456 |
| InotifyWatchMaskMaskAdd InotifyWatchMask = 536870912 |
| InotifyWatchMaskIsdirectory InotifyWatchMask = 1073741824 |
| InotifyWatchMaskOneshot InotifyWatchMask = 2147483648 |
| InotifyWatchMask_Mask InotifyWatchMask = 4144033791 |
| ) |
| |
| func (_ InotifyWatchMask) I_BitsMask() InotifyWatchMask { |
| return InotifyWatchMask_Mask |
| } |
| |
| func (_ InotifyWatchMask) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x InotifyWatchMask) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x InotifyWatchMask) GetUnknownBits() uint64 { |
| return uint64(^InotifyWatchMask_Mask & x) |
| } |
| |
| func (x InotifyWatchMask) InvertBits() InotifyWatchMask { |
| return InotifyWatchMask_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x InotifyWatchMask) HasBits(mask InotifyWatchMask) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x InotifyWatchMask) ClearBits(mask InotifyWatchMask) InotifyWatchMask { |
| return ^mask & x |
| } |
| |
| func (x InotifyWatchMask) String() string { |
| switch x { |
| case 1: |
| return "Access" |
| case 2: |
| return "Modify" |
| case 4: |
| return "Attrib" |
| case 8: |
| return "CloseWrite" |
| case 16: |
| return "CloseNowrite" |
| case 32: |
| return "Open" |
| case 64: |
| return "MovedFrom" |
| case 128: |
| return "MovedTo" |
| case 256: |
| return "Create" |
| case 512: |
| return "Delete" |
| case 1024: |
| return "DeleteSelf" |
| case 2048: |
| return "MoveSelf" |
| case 8192: |
| return "Unmount" |
| case 16384: |
| return "QOverflow" |
| case 32768: |
| return "Ignored" |
| case 16777216: |
| return "Onlydir" |
| case 33554432: |
| return "DontFollow" |
| case 67108864: |
| return "ExclUnlink" |
| case 268435456: |
| return "MaskCreate" |
| case 536870912: |
| return "MaskAdd" |
| case 1073741824: |
| return "Isdirectory" |
| case 2147483648: |
| return "Oneshot" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = NodeAttributesQuery(0) |
| |
| // When calling [`Node.GetAttributes`], set the corresponding bit to one |
| // to query that particular attribute. |
| // The elements here correspond one-to-one with [`NodeAttributes`]. |
| type NodeAttributesQuery uint64 |
| |
| const ( |
| NodeAttributesQueryProtocols NodeAttributesQuery = 1 |
| NodeAttributesQueryAbilities NodeAttributesQuery = 2 |
| NodeAttributesQueryContentSize NodeAttributesQuery = 4 |
| NodeAttributesQueryStorageSize NodeAttributesQuery = 8 |
| NodeAttributesQueryLinkCount NodeAttributesQuery = 16 |
| NodeAttributesQueryCreationTime NodeAttributesQuery = 32 |
| NodeAttributesQueryModificationTime NodeAttributesQuery = 64 |
| NodeAttributesQueryId NodeAttributesQuery = 128 |
| NodeAttributesQuery_Mask NodeAttributesQuery = 255 |
| ) |
| |
| func (_ NodeAttributesQuery) I_BitsMask() NodeAttributesQuery { |
| return NodeAttributesQuery_Mask |
| } |
| |
| func (_ NodeAttributesQuery) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x NodeAttributesQuery) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x NodeAttributesQuery) GetUnknownBits() uint64 { |
| return uint64(^NodeAttributesQuery_Mask & x) |
| } |
| |
| func (x NodeAttributesQuery) InvertBits() NodeAttributesQuery { |
| return NodeAttributesQuery_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x NodeAttributesQuery) HasBits(mask NodeAttributesQuery) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x NodeAttributesQuery) ClearBits(mask NodeAttributesQuery) NodeAttributesQuery { |
| return ^mask & x |
| } |
| |
| func (x NodeAttributesQuery) String() string { |
| switch x { |
| case 1: |
| return "Protocols" |
| case 2: |
| return "Abilities" |
| case 4: |
| return "ContentSize" |
| case 8: |
| return "StorageSize" |
| case 16: |
| return "LinkCount" |
| case 32: |
| return "CreationTime" |
| case 64: |
| return "ModificationTime" |
| case 128: |
| return "Id" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = Operations(0) |
| |
| // The common members definition behind [`Rights`] and [`Abilities`]. |
| // Note that Directory operations are distinct from File operations, with the |
| // exception of some common operations (e.g. `GET_ATTRIBUTES`) defined on the |
| // underlying [`fuchsia.io2/Node`]. |
| type Operations uint64 |
| |
| const ( |
| OperationsConnect Operations = 1 |
| OperationsReadBytes Operations = 2 |
| OperationsWriteBytes Operations = 4 |
| OperationsExecute Operations = 8 |
| OperationsGetAttributes Operations = 16 |
| OperationsUpdateAttributes Operations = 32 |
| OperationsEnumerate Operations = 64 |
| OperationsTraverse Operations = 128 |
| OperationsModifyDirectory Operations = 256 |
| OperationsAdmin Operations = 72057594037927936 |
| Operations_Mask Operations = 72057594037928447 |
| ) |
| |
| func (_ Operations) I_BitsMask() Operations { |
| return Operations_Mask |
| } |
| |
| func (_ Operations) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x Operations) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x Operations) GetUnknownBits() uint64 { |
| return uint64(^Operations_Mask & x) |
| } |
| |
| func (x Operations) InvertBits() Operations { |
| return Operations_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x Operations) HasBits(mask Operations) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x Operations) ClearBits(mask Operations) Operations { |
| return ^mask & x |
| } |
| |
| func (x Operations) String() string { |
| switch x { |
| case 1: |
| return "Connect" |
| case 2: |
| return "ReadBytes" |
| case 4: |
| return "WriteBytes" |
| case 8: |
| return "Execute" |
| case 16: |
| return "GetAttributes" |
| case 32: |
| return "UpdateAttributes" |
| case 64: |
| return "Enumerate" |
| case 128: |
| return "Traverse" |
| case 256: |
| return "ModifyDirectory" |
| case 72057594037927936: |
| return "Admin" |
| } |
| return "Unknown" |
| } |
| |
| // Options for requesting rights on the new connection. Because opening a |
| // new connection may involve multiple hops through directory proxies, |
| // we require the client to set an upper bound and lower bound on the |
| // rights request, and intermediate proxies to refine these bounds. |
| // |
| // The rights manipulation should be implemented mechanically |
| // without knowledge of any specific rights, and servers should propagate |
| // unknown bits members, to gracefully handle future rights extensions. |
| // |
| // ## Implementation Notes |
| // |
| // It could be common for a client to request an exact set of rights. |
| // We recommend client libraries to define a helper function like follows: |
| // |
| // ``` |
| // fn Exact(exact_rights: Rights) -> RightsRequest { |
| // RightsRequest { |
| // at_most: exact_rights, |
| // at_least: exact_rights, |
| // resolution: RightsResolution.MAXIMIZE, |
| // } |
| // } |
| // ``` |
| type RightsRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| // Sets an upper bound on the resulting rights. The exact rights will |
| // depend on `resolution`. |
| // |
| // ## Implementation Notes |
| // |
| // When a directory proxy encounters this variant, it should compute the |
| // intersection between this and the rights on the connection where it |
| // received the request, to shrink the rights. |
| // |
| // * If the intersection is empty, or not a superset of `at_least`, |
| // the proxy should close `object_request` with the |
| // `ZX_ERR_ACCESS_DENIED` epitaph. |
| // * Otherwise, the proxy should forward the `Open` call as usual, |
| // but update `at_most` with the shrunk rights. |
| AtMost Operations `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| // Sets a lower bound on the resulting rights. The exact rights will |
| // depend on `resolution`. |
| // |
| // + During [`Directory.Open`], you may only specify the same rights as |
| // what the directory connection already has, or a subset of those. |
| // + During [`Node.Reopen`], similarly, you may only specify the same or |
| // a subset of rights possessed by the original connection. |
| // + Exceeding those rights causes `object_request` to be closed with a |
| // `ZX_ERR_ACCESS_DENIED` epitaph. |
| // |
| // Therefore there are these invariants which should be maintained: |
| // |
| // ``` |
| // at_most ⊋ {} |
| // at_most ⊃ at_least |
| // rights_on_connection_where_open_is_received ⊋ {} |
| // rights_on_connection_where_open_is_received ⊃ at_least |
| // ``` |
| // |
| // using the superset (`⊃`), proper superset (`⊋`), |
| // and empty set (`{}`) notations. |
| AtLeast Operations `fidl_offset_v1:"8" fidl_offset_v2:"8"` |
| // Controls how the rights on the new connection are computed from |
| // `at_most` and `at_least`. See [`fuchsia.io2/RightsResolution`]. |
| Resolution RightsResolution `fidl_offset_v1:"16" fidl_offset_v2:"16"` |
| } |
| |
| var _mRightsRequest = _bindings.CreateLazyMarshaler(RightsRequest{}) |
| |
| func (msg *RightsRequest) Marshaler() _bindings.Marshaler { |
| return _mRightsRequest |
| } |
| |
| type DirectoryUnlinkResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mDirectoryUnlinkResponse = _bindings.CreateLazyMarshaler(DirectoryUnlinkResponse{}) |
| |
| func (msg *DirectoryUnlinkResponse) Marshaler() _bindings.Marshaler { |
| return _mDirectoryUnlinkResponse |
| } |
| |
| type DirectoryUnlink2Response struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mDirectoryUnlink2Response = _bindings.CreateLazyMarshaler(DirectoryUnlink2Response{}) |
| |
| func (msg *DirectoryUnlink2Response) Marshaler() _bindings.Marshaler { |
| return _mDirectoryUnlink2Response |
| } |
| |
| type DirectoryRenameResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mDirectoryRenameResponse = _bindings.CreateLazyMarshaler(DirectoryRenameResponse{}) |
| |
| func (msg *DirectoryRenameResponse) Marshaler() _bindings.Marshaler { |
| return _mDirectoryRenameResponse |
| } |
| |
| type DirectoryLinkResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mDirectoryLinkResponse = _bindings.CreateLazyMarshaler(DirectoryLinkResponse{}) |
| |
| func (msg *DirectoryLinkResponse) Marshaler() _bindings.Marshaler { |
| return _mDirectoryLinkResponse |
| } |
| |
| type DirectoryIteratorGetNextResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Entries []DirectoryEntry `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"8192"` |
| } |
| |
| var _mDirectoryIteratorGetNextResponse = _bindings.CreateLazyMarshaler(DirectoryIteratorGetNextResponse{}) |
| |
| func (msg *DirectoryIteratorGetNextResponse) Marshaler() _bindings.Marshaler { |
| return _mDirectoryIteratorGetNextResponse |
| } |
| |
| type IdleEvent struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mIdleEvent = _bindings.CreateLazyMarshaler(IdleEvent{}) |
| |
| func (msg *IdleEvent) Marshaler() _bindings.Marshaler { |
| return _mIdleEvent |
| } |
| |
| type FileSeekResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| OffsetFromStart uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mFileSeekResponse = _bindings.CreateLazyMarshaler(FileSeekResponse{}) |
| |
| func (msg *FileSeekResponse) Marshaler() _bindings.Marshaler { |
| return _mFileSeekResponse |
| } |
| |
| type FileReadResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Data []uint8 `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"8192"` |
| } |
| |
| var _mFileReadResponse = _bindings.CreateLazyMarshaler(FileReadResponse{}) |
| |
| func (msg *FileReadResponse) Marshaler() _bindings.Marshaler { |
| return _mFileReadResponse |
| } |
| |
| type FileWriteResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| ActualCount uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mFileWriteResponse = _bindings.CreateLazyMarshaler(FileWriteResponse{}) |
| |
| func (msg *FileWriteResponse) Marshaler() _bindings.Marshaler { |
| return _mFileWriteResponse |
| } |
| |
| type FileReadAtResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Data []uint8 `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"8192"` |
| } |
| |
| var _mFileReadAtResponse = _bindings.CreateLazyMarshaler(FileReadAtResponse{}) |
| |
| func (msg *FileReadAtResponse) Marshaler() _bindings.Marshaler { |
| return _mFileReadAtResponse |
| } |
| |
| type FileWriteAtResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| ActualCount uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mFileWriteAtResponse = _bindings.CreateLazyMarshaler(FileWriteAtResponse{}) |
| |
| func (msg *FileWriteAtResponse) Marshaler() _bindings.Marshaler { |
| return _mFileWriteAtResponse |
| } |
| |
| type FileResizeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mFileResizeResponse = _bindings.CreateLazyMarshaler(FileResizeResponse{}) |
| |
| func (msg *FileResizeResponse) Marshaler() _bindings.Marshaler { |
| return _mFileResizeResponse |
| } |
| |
| type FileGetMemRangeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Buffer fuchsiamem.Range `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mFileGetMemRangeResponse = _bindings.CreateLazyMarshaler(FileGetMemRangeResponse{}) |
| |
| func (msg *FileGetMemRangeResponse) Marshaler() _bindings.Marshaler { |
| return _mFileGetMemRangeResponse |
| } |
| |
| type InotifyEvent struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| WatchDescriptor uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| Mask InotifyWatchMask `fidl_offset_v1:"4" fidl_offset_v2:"4"` |
| Cookie uint32 `fidl_offset_v1:"8" fidl_offset_v2:"8"` |
| Len uint32 `fidl_offset_v1:"12" fidl_offset_v2:"12"` |
| Filename string `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_bounds:"4095"` |
| } |
| |
| var _mInotifyEvent = _bindings.CreateLazyMarshaler(InotifyEvent{}) |
| |
| func (msg *InotifyEvent) Marshaler() _bindings.Marshaler { |
| return _mInotifyEvent |
| } |
| |
| type AdvisoryLockingAdvisoryLockResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mAdvisoryLockingAdvisoryLockResponse = _bindings.CreateLazyMarshaler(AdvisoryLockingAdvisoryLockResponse{}) |
| |
| func (msg *AdvisoryLockingAdvisoryLockResponse) Marshaler() _bindings.Marshaler { |
| return _mAdvisoryLockingAdvisoryLockResponse |
| } |
| |
| // A range within a file associated with an advisory lock. |
| // |
| // The range can extend beyond the end of the file but cannot extend beyond |
| // the beginning of the file. |
| type AdvisoryLockRange struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| // The location in the file from which [`offset`] is computed. |
| Origin SeekOrigin `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| // The start of the byte range, expressed as an offset from [`origin`]. |
| // Cannot be negative if [`origin`] is [`SeekOrigin.START`]. |
| Offset int64 `fidl_offset_v1:"8" fidl_offset_v2:"8"` |
| // The length of the byte range in bytes. |
| // |
| // If the length is zero, then the byte range exends until the end of the |
| // file, regardless of how large the file becomes. |
| // |
| // If the length is negative, the byte range includes the bytes `offset` + |
| // `length` up to, and including, `offset` - 1, provided this range does |
| // not extend beyond the beginning of the file. |
| Length int64 `fidl_offset_v1:"16" fidl_offset_v2:"16"` |
| } |
| |
| var _mAdvisoryLockRange = _bindings.CreateLazyMarshaler(AdvisoryLockRange{}) |
| |
| func (msg *AdvisoryLockRange) Marshaler() _bindings.Marshaler { |
| return _mAdvisoryLockRange |
| } |
| |
| type NodeGetTokenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| Token _zx.Event `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mNodeGetTokenResponse = _bindings.CreateLazyMarshaler(NodeGetTokenResponse{}) |
| |
| func (msg *NodeGetTokenResponse) Marshaler() _bindings.Marshaler { |
| return _mNodeGetTokenResponse |
| } |
| |
| type NodeGetAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Attributes NodeAttributes `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mNodeGetAttributesResponse = _bindings.CreateLazyMarshaler(NodeGetAttributesResponse{}) |
| |
| func (msg *NodeGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mNodeGetAttributesResponse |
| } |
| |
| type NodeUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mNodeUpdateAttributesResponse = _bindings.CreateLazyMarshaler(NodeUpdateAttributesResponse{}) |
| |
| func (msg *NodeUpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mNodeUpdateAttributesResponse |
| } |
| |
| type NodeSyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mNodeSyncResponse = _bindings.CreateLazyMarshaler(NodeSyncResponse{}) |
| |
| func (msg *NodeSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mNodeSyncResponse |
| } |
| |
| type debuglogWithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Options ConnectionOptions `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mdebuglogWithCtxReopenRequest = _bindings.CreateLazyMarshaler(debuglogWithCtxReopenRequest{}) |
| |
| func (msg *debuglogWithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxReopenRequest |
| } |
| |
| type debuglogWithCtxDescribeRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query ConnectionInfoQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdebuglogWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(debuglogWithCtxDescribeRequest{}) |
| |
| func (msg *debuglogWithCtxDescribeRequest) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxDescribeRequest |
| } |
| |
| type debuglogWithCtxDescribeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdebuglogWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxDescribeResponse{}) |
| |
| func (msg *debuglogWithCtxDescribeResponse) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxDescribeResponse |
| } |
| |
| type debuglogWithCtxOnConnectionInfoResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdebuglogWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxOnConnectionInfoResponse{}) |
| |
| func (msg *debuglogWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxOnConnectionInfoResponse |
| } |
| |
| type debuglogWithCtxGetTokenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetTokenResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdebuglogWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxGetTokenResponse{}) |
| |
| func (msg *debuglogWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxGetTokenResponse |
| } |
| |
| type debuglogWithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query NodeAttributesQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdebuglogWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(debuglogWithCtxGetAttributesRequest{}) |
| |
| func (msg *debuglogWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxGetAttributesRequest |
| } |
| |
| type debuglogWithCtxGetAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdebuglogWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxGetAttributesResponse{}) |
| |
| func (msg *debuglogWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxGetAttributesResponse |
| } |
| |
| type debuglogWithCtxUpdateAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Attributes NodeAttributes `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdebuglogWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(debuglogWithCtxUpdateAttributesRequest{}) |
| |
| func (msg *debuglogWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxUpdateAttributesRequest |
| } |
| |
| type debuglogWithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeUpdateAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdebuglogWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxUpdateAttributesResponse{}) |
| |
| func (msg *debuglogWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxUpdateAttributesResponse |
| } |
| |
| type debuglogWithCtxSyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeSyncResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdebuglogWithCtxSyncResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxSyncResponse{}) |
| |
| func (msg *debuglogWithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mdebuglogWithCtxSyncResponse |
| } |
| |
| type directoryWithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Options ConnectionOptions `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxReopenRequest = _bindings.CreateLazyMarshaler(directoryWithCtxReopenRequest{}) |
| |
| func (msg *directoryWithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxReopenRequest |
| } |
| |
| type directoryWithCtxDescribeRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query ConnectionInfoQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(directoryWithCtxDescribeRequest{}) |
| |
| func (msg *directoryWithCtxDescribeRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxDescribeRequest |
| } |
| |
| type directoryWithCtxDescribeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(directoryWithCtxDescribeResponse{}) |
| |
| func (msg *directoryWithCtxDescribeResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxDescribeResponse |
| } |
| |
| type directoryWithCtxOnConnectionInfoResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(directoryWithCtxOnConnectionInfoResponse{}) |
| |
| func (msg *directoryWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxOnConnectionInfoResponse |
| } |
| |
| type directoryWithCtxGetTokenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetTokenResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetTokenResponse{}) |
| |
| func (msg *directoryWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxGetTokenResponse |
| } |
| |
| type directoryWithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query NodeAttributesQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(directoryWithCtxGetAttributesRequest{}) |
| |
| func (msg *directoryWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxGetAttributesRequest |
| } |
| |
| type directoryWithCtxGetAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetAttributesResponse{}) |
| |
| func (msg *directoryWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxGetAttributesResponse |
| } |
| |
| type directoryWithCtxUpdateAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Attributes NodeAttributes `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(directoryWithCtxUpdateAttributesRequest{}) |
| |
| func (msg *directoryWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxUpdateAttributesRequest |
| } |
| |
| type directoryWithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeUpdateAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(directoryWithCtxUpdateAttributesResponse{}) |
| |
| func (msg *directoryWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxUpdateAttributesResponse |
| } |
| |
| type directoryWithCtxSyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeSyncResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxSyncResponse = _bindings.CreateLazyMarshaler(directoryWithCtxSyncResponse{}) |
| |
| func (msg *directoryWithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxSyncResponse |
| } |
| |
| type directoryWithCtxOpenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"48" fidl_alignment_v1:"8" fidl_size_v2:"48" fidl_alignment_v2:"8"` |
| Path string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"4095"` |
| Mode OpenMode `fidl_offset_v1:"16" fidl_offset_v2:"16"` |
| Options ConnectionOptions `fidl_offset_v1:"24" fidl_offset_v2:"24"` |
| ObjectRequest _zx.Channel `fidl_offset_v1:"40" fidl_offset_v2:"40" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxOpenRequest = _bindings.CreateLazyMarshaler(directoryWithCtxOpenRequest{}) |
| |
| func (msg *directoryWithCtxOpenRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxOpenRequest |
| } |
| |
| type directoryWithCtxAddInotifyFilterRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| Path string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"4095"` |
| Filter InotifyWatchMask `fidl_offset_v1:"16" fidl_offset_v2:"16"` |
| WatchDescriptor uint32 `fidl_offset_v1:"20" fidl_offset_v2:"20"` |
| Socket _zx.Socket `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxAddInotifyFilterRequest = _bindings.CreateLazyMarshaler(directoryWithCtxAddInotifyFilterRequest{}) |
| |
| func (msg *directoryWithCtxAddInotifyFilterRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxAddInotifyFilterRequest |
| } |
| |
| type directoryWithCtxUnlinkRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Path string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"4095"` |
| } |
| |
| var _mdirectoryWithCtxUnlinkRequest = _bindings.CreateLazyMarshaler(directoryWithCtxUnlinkRequest{}) |
| |
| func (msg *directoryWithCtxUnlinkRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxUnlinkRequest |
| } |
| |
| type directoryWithCtxUnlinkResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result DirectoryUnlinkResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxUnlinkResponse = _bindings.CreateLazyMarshaler(directoryWithCtxUnlinkResponse{}) |
| |
| func (msg *directoryWithCtxUnlinkResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxUnlinkResponse |
| } |
| |
| type directoryWithCtxUnlink2Request struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| Name string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"255"` |
| Options UnlinkOptions `fidl_offset_v1:"16" fidl_offset_v2:"16"` |
| } |
| |
| var _mdirectoryWithCtxUnlink2Request = _bindings.CreateLazyMarshaler(directoryWithCtxUnlink2Request{}) |
| |
| func (msg *directoryWithCtxUnlink2Request) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxUnlink2Request |
| } |
| |
| type directoryWithCtxUnlink2Response struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result DirectoryUnlink2Result `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxUnlink2Response = _bindings.CreateLazyMarshaler(directoryWithCtxUnlink2Response{}) |
| |
| func (msg *directoryWithCtxUnlink2Response) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxUnlink2Response |
| } |
| |
| type directoryWithCtxEnumerateRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Options DirectoryEnumerateOptions `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| Iterator DirectoryIteratorWithCtxInterfaceRequest `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxEnumerateRequest = _bindings.CreateLazyMarshaler(directoryWithCtxEnumerateRequest{}) |
| |
| func (msg *directoryWithCtxEnumerateRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxEnumerateRequest |
| } |
| |
| type directoryWithCtxRenameRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v2:"40" fidl_alignment_v2:"8"` |
| Src string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"255"` |
| DstParentToken _zx.Event `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| Dst string `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_bounds:"255"` |
| } |
| |
| var _mdirectoryWithCtxRenameRequest = _bindings.CreateLazyMarshaler(directoryWithCtxRenameRequest{}) |
| |
| func (msg *directoryWithCtxRenameRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxRenameRequest |
| } |
| |
| type directoryWithCtxRenameResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result DirectoryRenameResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxRenameResponse = _bindings.CreateLazyMarshaler(directoryWithCtxRenameResponse{}) |
| |
| func (msg *directoryWithCtxRenameResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxRenameResponse |
| } |
| |
| type directoryWithCtxLinkRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v2:"40" fidl_alignment_v2:"8"` |
| Src string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"255"` |
| DstParentToken _zx.Event `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| Dst string `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_bounds:"255"` |
| } |
| |
| var _mdirectoryWithCtxLinkRequest = _bindings.CreateLazyMarshaler(directoryWithCtxLinkRequest{}) |
| |
| func (msg *directoryWithCtxLinkRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxLinkRequest |
| } |
| |
| type directoryWithCtxLinkResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result DirectoryLinkResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxLinkResponse = _bindings.CreateLazyMarshaler(directoryWithCtxLinkResponse{}) |
| |
| func (msg *directoryWithCtxLinkResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxLinkResponse |
| } |
| |
| type directoryWithCtxWatchRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| Mask DirectoryWatchMask `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| Options DirectoryWatchOptions `fidl_offset_v1:"8" fidl_offset_v2:"8"` |
| Watcher DirectoryWatcherWithCtxInterfaceRequest `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxWatchRequest = _bindings.CreateLazyMarshaler(directoryWithCtxWatchRequest{}) |
| |
| func (msg *directoryWithCtxWatchRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxWatchRequest |
| } |
| |
| type directoryIteratorWithCtxGetNextResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result DirectoryIteratorGetNextResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryIteratorWithCtxGetNextResponse = _bindings.CreateLazyMarshaler(directoryIteratorWithCtxGetNextResponse{}) |
| |
| func (msg *directoryIteratorWithCtxGetNextResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryIteratorWithCtxGetNextResponse |
| } |
| |
| type directoryWatcherWithCtxGetNextResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Events []DirectoryWatchedEvent `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"8192"` |
| } |
| |
| var _mdirectoryWatcherWithCtxGetNextResponse = _bindings.CreateLazyMarshaler(directoryWatcherWithCtxGetNextResponse{}) |
| |
| func (msg *directoryWatcherWithCtxGetNextResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWatcherWithCtxGetNextResponse |
| } |
| |
| type fileWithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Options ConnectionOptions `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mfileWithCtxReopenRequest = _bindings.CreateLazyMarshaler(fileWithCtxReopenRequest{}) |
| |
| func (msg *fileWithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxReopenRequest |
| } |
| |
| type fileWithCtxDescribeRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query ConnectionInfoQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(fileWithCtxDescribeRequest{}) |
| |
| func (msg *fileWithCtxDescribeRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxDescribeRequest |
| } |
| |
| type fileWithCtxDescribeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(fileWithCtxDescribeResponse{}) |
| |
| func (msg *fileWithCtxDescribeResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxDescribeResponse |
| } |
| |
| type fileWithCtxOnConnectionInfoResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(fileWithCtxOnConnectionInfoResponse{}) |
| |
| func (msg *fileWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxOnConnectionInfoResponse |
| } |
| |
| type fileWithCtxGetTokenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetTokenResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetTokenResponse{}) |
| |
| func (msg *fileWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetTokenResponse |
| } |
| |
| type fileWithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query NodeAttributesQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(fileWithCtxGetAttributesRequest{}) |
| |
| func (msg *fileWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetAttributesRequest |
| } |
| |
| type fileWithCtxGetAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetAttributesResponse{}) |
| |
| func (msg *fileWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetAttributesResponse |
| } |
| |
| type fileWithCtxUpdateAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Attributes NodeAttributes `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(fileWithCtxUpdateAttributesRequest{}) |
| |
| func (msg *fileWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxUpdateAttributesRequest |
| } |
| |
| type fileWithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeUpdateAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(fileWithCtxUpdateAttributesResponse{}) |
| |
| func (msg *fileWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxUpdateAttributesResponse |
| } |
| |
| type fileWithCtxSyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeSyncResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxSyncResponse = _bindings.CreateLazyMarshaler(fileWithCtxSyncResponse{}) |
| |
| func (msg *fileWithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxSyncResponse |
| } |
| |
| type fileWithCtxAdvisoryLockRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Request AdvisoryLockRequest `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxAdvisoryLockRequest = _bindings.CreateLazyMarshaler(fileWithCtxAdvisoryLockRequest{}) |
| |
| func (msg *fileWithCtxAdvisoryLockRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxAdvisoryLockRequest |
| } |
| |
| type fileWithCtxAdvisoryLockResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result AdvisoryLockingAdvisoryLockResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(fileWithCtxAdvisoryLockResponse{}) |
| |
| func (msg *fileWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxAdvisoryLockResponse |
| } |
| |
| type fileWithCtxSeekRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Origin SeekOrigin `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| Offset int64 `fidl_offset_v1:"8" fidl_offset_v2:"8"` |
| } |
| |
| var _mfileWithCtxSeekRequest = _bindings.CreateLazyMarshaler(fileWithCtxSeekRequest{}) |
| |
| func (msg *fileWithCtxSeekRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxSeekRequest |
| } |
| |
| type fileWithCtxSeekResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result FileSeekResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxSeekResponse = _bindings.CreateLazyMarshaler(fileWithCtxSeekResponse{}) |
| |
| func (msg *fileWithCtxSeekResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxSeekResponse |
| } |
| |
| type fileWithCtxReadRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Count uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxReadRequest = _bindings.CreateLazyMarshaler(fileWithCtxReadRequest{}) |
| |
| func (msg *fileWithCtxReadRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxReadRequest |
| } |
| |
| type fileWithCtxReadResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result FileReadResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxReadResponse = _bindings.CreateLazyMarshaler(fileWithCtxReadResponse{}) |
| |
| func (msg *fileWithCtxReadResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxReadResponse |
| } |
| |
| type fileWithCtxWriteRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Data []uint8 `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"8192"` |
| } |
| |
| var _mfileWithCtxWriteRequest = _bindings.CreateLazyMarshaler(fileWithCtxWriteRequest{}) |
| |
| func (msg *fileWithCtxWriteRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxWriteRequest |
| } |
| |
| type fileWithCtxWriteResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result FileWriteResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxWriteResponse = _bindings.CreateLazyMarshaler(fileWithCtxWriteResponse{}) |
| |
| func (msg *fileWithCtxWriteResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxWriteResponse |
| } |
| |
| type fileWithCtxReadAtRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Count uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| Offset uint64 `fidl_offset_v1:"8" fidl_offset_v2:"8"` |
| } |
| |
| var _mfileWithCtxReadAtRequest = _bindings.CreateLazyMarshaler(fileWithCtxReadAtRequest{}) |
| |
| func (msg *fileWithCtxReadAtRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxReadAtRequest |
| } |
| |
| type fileWithCtxReadAtResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result FileReadAtResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxReadAtResponse = _bindings.CreateLazyMarshaler(fileWithCtxReadAtResponse{}) |
| |
| func (msg *fileWithCtxReadAtResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxReadAtResponse |
| } |
| |
| type fileWithCtxWriteAtRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Data []uint8 `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"8192"` |
| Offset uint64 `fidl_offset_v1:"16" fidl_offset_v2:"16"` |
| } |
| |
| var _mfileWithCtxWriteAtRequest = _bindings.CreateLazyMarshaler(fileWithCtxWriteAtRequest{}) |
| |
| func (msg *fileWithCtxWriteAtRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxWriteAtRequest |
| } |
| |
| type fileWithCtxWriteAtResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result FileWriteAtResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxWriteAtResponse = _bindings.CreateLazyMarshaler(fileWithCtxWriteAtResponse{}) |
| |
| func (msg *fileWithCtxWriteAtResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxWriteAtResponse |
| } |
| |
| type fileWithCtxResizeRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Length uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxResizeRequest = _bindings.CreateLazyMarshaler(fileWithCtxResizeRequest{}) |
| |
| func (msg *fileWithCtxResizeRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxResizeRequest |
| } |
| |
| type fileWithCtxResizeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result FileResizeResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxResizeResponse = _bindings.CreateLazyMarshaler(fileWithCtxResizeResponse{}) |
| |
| func (msg *fileWithCtxResizeResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxResizeResponse |
| } |
| |
| type fileWithCtxGetMemRangeRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Flags VmoFlags `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxGetMemRangeRequest = _bindings.CreateLazyMarshaler(fileWithCtxGetMemRangeRequest{}) |
| |
| func (msg *fileWithCtxGetMemRangeRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetMemRangeRequest |
| } |
| |
| type fileWithCtxGetMemRangeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result FileGetMemRangeResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxGetMemRangeResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetMemRangeResponse{}) |
| |
| func (msg *fileWithCtxGetMemRangeResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetMemRangeResponse |
| } |
| |
| type advisoryLockingWithCtxAdvisoryLockRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Request AdvisoryLockRequest `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _madvisoryLockingWithCtxAdvisoryLockRequest = _bindings.CreateLazyMarshaler(advisoryLockingWithCtxAdvisoryLockRequest{}) |
| |
| func (msg *advisoryLockingWithCtxAdvisoryLockRequest) Marshaler() _bindings.Marshaler { |
| return _madvisoryLockingWithCtxAdvisoryLockRequest |
| } |
| |
| type advisoryLockingWithCtxAdvisoryLockResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result AdvisoryLockingAdvisoryLockResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _madvisoryLockingWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(advisoryLockingWithCtxAdvisoryLockResponse{}) |
| |
| func (msg *advisoryLockingWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler { |
| return _madvisoryLockingWithCtxAdvisoryLockResponse |
| } |
| |
| type memoryWithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Options ConnectionOptions `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mmemoryWithCtxReopenRequest = _bindings.CreateLazyMarshaler(memoryWithCtxReopenRequest{}) |
| |
| func (msg *memoryWithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxReopenRequest |
| } |
| |
| type memoryWithCtxDescribeRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query ConnectionInfoQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mmemoryWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(memoryWithCtxDescribeRequest{}) |
| |
| func (msg *memoryWithCtxDescribeRequest) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxDescribeRequest |
| } |
| |
| type memoryWithCtxDescribeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mmemoryWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(memoryWithCtxDescribeResponse{}) |
| |
| func (msg *memoryWithCtxDescribeResponse) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxDescribeResponse |
| } |
| |
| type memoryWithCtxOnConnectionInfoResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mmemoryWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(memoryWithCtxOnConnectionInfoResponse{}) |
| |
| func (msg *memoryWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxOnConnectionInfoResponse |
| } |
| |
| type memoryWithCtxGetTokenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetTokenResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mmemoryWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(memoryWithCtxGetTokenResponse{}) |
| |
| func (msg *memoryWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxGetTokenResponse |
| } |
| |
| type memoryWithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query NodeAttributesQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mmemoryWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(memoryWithCtxGetAttributesRequest{}) |
| |
| func (msg *memoryWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxGetAttributesRequest |
| } |
| |
| type memoryWithCtxGetAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mmemoryWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(memoryWithCtxGetAttributesResponse{}) |
| |
| func (msg *memoryWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxGetAttributesResponse |
| } |
| |
| type memoryWithCtxUpdateAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Attributes NodeAttributes `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mmemoryWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(memoryWithCtxUpdateAttributesRequest{}) |
| |
| func (msg *memoryWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxUpdateAttributesRequest |
| } |
| |
| type memoryWithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeUpdateAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mmemoryWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(memoryWithCtxUpdateAttributesResponse{}) |
| |
| func (msg *memoryWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxUpdateAttributesResponse |
| } |
| |
| type memoryWithCtxSyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeSyncResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mmemoryWithCtxSyncResponse = _bindings.CreateLazyMarshaler(memoryWithCtxSyncResponse{}) |
| |
| func (msg *memoryWithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mmemoryWithCtxSyncResponse |
| } |
| |
| type nodeWithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Options ConnectionOptions `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mnodeWithCtxReopenRequest = _bindings.CreateLazyMarshaler(nodeWithCtxReopenRequest{}) |
| |
| func (msg *nodeWithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxReopenRequest |
| } |
| |
| type nodeWithCtxDescribeRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query ConnectionInfoQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(nodeWithCtxDescribeRequest{}) |
| |
| func (msg *nodeWithCtxDescribeRequest) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxDescribeRequest |
| } |
| |
| type nodeWithCtxDescribeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(nodeWithCtxDescribeResponse{}) |
| |
| func (msg *nodeWithCtxDescribeResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxDescribeResponse |
| } |
| |
| type nodeWithCtxOnConnectionInfoResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(nodeWithCtxOnConnectionInfoResponse{}) |
| |
| func (msg *nodeWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxOnConnectionInfoResponse |
| } |
| |
| type nodeWithCtxGetTokenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetTokenResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(nodeWithCtxGetTokenResponse{}) |
| |
| func (msg *nodeWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxGetTokenResponse |
| } |
| |
| type nodeWithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query NodeAttributesQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(nodeWithCtxGetAttributesRequest{}) |
| |
| func (msg *nodeWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxGetAttributesRequest |
| } |
| |
| type nodeWithCtxGetAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(nodeWithCtxGetAttributesResponse{}) |
| |
| func (msg *nodeWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxGetAttributesResponse |
| } |
| |
| type nodeWithCtxUpdateAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Attributes NodeAttributes `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(nodeWithCtxUpdateAttributesRequest{}) |
| |
| func (msg *nodeWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxUpdateAttributesRequest |
| } |
| |
| type nodeWithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeUpdateAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(nodeWithCtxUpdateAttributesResponse{}) |
| |
| func (msg *nodeWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxUpdateAttributesResponse |
| } |
| |
| type nodeWithCtxSyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeSyncResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxSyncResponse = _bindings.CreateLazyMarshaler(nodeWithCtxSyncResponse{}) |
| |
| func (msg *nodeWithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxSyncResponse |
| } |
| |
| type pipeWithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Options ConnectionOptions `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mpipeWithCtxReopenRequest = _bindings.CreateLazyMarshaler(pipeWithCtxReopenRequest{}) |
| |
| func (msg *pipeWithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxReopenRequest |
| } |
| |
| type pipeWithCtxDescribeRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query ConnectionInfoQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mpipeWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(pipeWithCtxDescribeRequest{}) |
| |
| func (msg *pipeWithCtxDescribeRequest) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxDescribeRequest |
| } |
| |
| type pipeWithCtxDescribeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mpipeWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(pipeWithCtxDescribeResponse{}) |
| |
| func (msg *pipeWithCtxDescribeResponse) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxDescribeResponse |
| } |
| |
| type pipeWithCtxOnConnectionInfoResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Info ConnectionInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mpipeWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(pipeWithCtxOnConnectionInfoResponse{}) |
| |
| func (msg *pipeWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxOnConnectionInfoResponse |
| } |
| |
| type pipeWithCtxGetTokenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetTokenResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mpipeWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(pipeWithCtxGetTokenResponse{}) |
| |
| func (msg *pipeWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxGetTokenResponse |
| } |
| |
| type pipeWithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Query NodeAttributesQuery `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mpipeWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(pipeWithCtxGetAttributesRequest{}) |
| |
| func (msg *pipeWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxGetAttributesRequest |
| } |
| |
| type pipeWithCtxGetAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeGetAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mpipeWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(pipeWithCtxGetAttributesResponse{}) |
| |
| func (msg *pipeWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxGetAttributesResponse |
| } |
| |
| type pipeWithCtxUpdateAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Attributes NodeAttributes `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mpipeWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(pipeWithCtxUpdateAttributesRequest{}) |
| |
| func (msg *pipeWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxUpdateAttributesRequest |
| } |
| |
| type pipeWithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeUpdateAttributesResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mpipeWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(pipeWithCtxUpdateAttributesResponse{}) |
| |
| func (msg *pipeWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxUpdateAttributesResponse |
| } |
| |
| type pipeWithCtxSyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result NodeSyncResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mpipeWithCtxSyncResponse = _bindings.CreateLazyMarshaler(pipeWithCtxSyncResponse{}) |
| |
| func (msg *pipeWithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mpipeWithCtxSyncResponse |
| } |
| |
| type I_representationTag uint64 |
| |
| const ( |
| Representation_unknownData = 0 // 0x00000000 |
| RepresentationConnector = 1 // 0x00000001 |
| RepresentationDirectory = 2 // 0x00000002 |
| RepresentationFile = 3 // 0x00000003 |
| RepresentationMemory = 4 // 0x00000004 |
| RepresentationPosixSocket = 5 // 0x00000005 |
| RepresentationPipe = 6 // 0x00000006 |
| RepresentationDebuglog = 7 // 0x00000007 |
| RepresentationDevice = 8 // 0x00000008 |
| RepresentationTty = 9 // 0x00000009 |
| ) |
| |
| // Describes how the connection should be handled, and provides auxiliary |
| // handles and information for the connection where applicable. |
| // Refer to [`Node.Describe`] and [`Node.OnConnectionInfo`]. |
| // |
| // If handles are returned which offer alternative ways of access to the node, |
| // the rights on the handles should correspond to the rights on the connection. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`] or [`Node.Reopen`], the [`Representation`] xunion carries |
| // additionally the result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocols`]. |
| type Representation struct { |
| I_representationTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // See [`NodeProtocols.CONNECTOR`]. |
| Connector ConnectorInfo `fidl_ordinal:"1"` |
| // See [`NodeProtocols.DIRECTORY`]. |
| Directory DirectoryInfo `fidl_ordinal:"2"` |
| // See [`NodeProtocols.FILE`]. |
| File FileInfo `fidl_ordinal:"3"` |
| // See [`NodeProtocols.MEMORY`]. |
| Memory MemoryInfo `fidl_ordinal:"4"` |
| // See [`NodeProtocols.POSIX_SOCKET`]. |
| PosixSocket PosixSocketInfo `fidl_ordinal:"5"` |
| // See [`NodeProtocols.PIPE`]. |
| Pipe PipeInfo `fidl_ordinal:"6"` |
| // See [`NodeProtocols.DEBUGLOG`]. |
| Debuglog DebuglogInfo `fidl_ordinal:"7"` |
| Device DeviceInfo `fidl_ordinal:"8"` |
| Tty TtyInfo `fidl_ordinal:"9"` |
| } |
| |
| func (_m *Representation) reset() { |
| switch _m.I_representationTag { |
| case 1: |
| var _zeroed ConnectorInfo |
| _m.Connector = _zeroed |
| case 2: |
| var _zeroed DirectoryInfo |
| _m.Directory = _zeroed |
| case 3: |
| var _zeroed FileInfo |
| _m.File = _zeroed |
| case 4: |
| var _zeroed MemoryInfo |
| _m.Memory = _zeroed |
| case 5: |
| var _zeroed PosixSocketInfo |
| _m.PosixSocket = _zeroed |
| case 6: |
| var _zeroed PipeInfo |
| _m.Pipe = _zeroed |
| case 7: |
| var _zeroed DebuglogInfo |
| _m.Debuglog = _zeroed |
| case 8: |
| var _zeroed DeviceInfo |
| _m.Device = _zeroed |
| case 9: |
| var _zeroed TtyInfo |
| _m.Tty = _zeroed |
| default: |
| var _zeroed interface{} |
| _m.I_unknownData = _zeroed |
| } |
| } |
| |
| func (_m *Representation) Which() I_representationTag { |
| switch _m.I_representationTag { |
| case 1: |
| return RepresentationConnector |
| case 2: |
| return RepresentationDirectory |
| case 3: |
| return RepresentationFile |
| case 4: |
| return RepresentationMemory |
| case 5: |
| return RepresentationPosixSocket |
| case 6: |
| return RepresentationPipe |
| case 7: |
| return RepresentationDebuglog |
| case 8: |
| return RepresentationDevice |
| case 9: |
| return RepresentationTty |
| default: |
| return Representation_unknownData |
| } |
| } |
| |
| func (_m *Representation) Ordinal() uint64 { |
| return uint64(_m.I_representationTag) |
| } |
| |
| func (_m *Representation) SetConnector(connector ConnectorInfo) { |
| _m.reset() |
| _m.I_representationTag = RepresentationConnector |
| _m.Connector = connector |
| } |
| |
| func RepresentationWithConnector(connector ConnectorInfo) Representation { |
| var _u Representation |
| _u.SetConnector(connector) |
| return _u |
| } |
| |
| func (_m *Representation) SetDirectory(directory DirectoryInfo) { |
| _m.reset() |
| _m.I_representationTag = RepresentationDirectory |
| _m.Directory = directory |
| } |
| |
| func RepresentationWithDirectory(directory DirectoryInfo) Representation { |
| var _u Representation |
| _u.SetDirectory(directory) |
| return _u |
| } |
| |
| func (_m *Representation) SetFile(file FileInfo) { |
| _m.reset() |
| _m.I_representationTag = RepresentationFile |
| _m.File = file |
| } |
| |
| func RepresentationWithFile(file FileInfo) Representation { |
| var _u Representation |
| _u.SetFile(file) |
| return _u |
| } |
| |
| func (_m *Representation) SetMemory(memory MemoryInfo) { |
| _m.reset() |
| _m.I_representationTag = RepresentationMemory |
| _m.Memory = memory |
| } |
| |
| func RepresentationWithMemory(memory MemoryInfo) Representation { |
| var _u Representation |
| _u.SetMemory(memory) |
| return _u |
| } |
| |
| func (_m *Representation) SetPosixSocket(posixSocket PosixSocketInfo) { |
| _m.reset() |
| _m.I_representationTag = RepresentationPosixSocket |
| _m.PosixSocket = posixSocket |
| } |
| |
| func RepresentationWithPosixSocket(posixSocket PosixSocketInfo) Representation { |
| var _u Representation |
| _u.SetPosixSocket(posixSocket) |
| return _u |
| } |
| |
| func (_m *Representation) SetPipe(pipe PipeInfo) { |
| _m.reset() |
| _m.I_representationTag = RepresentationPipe |
| _m.Pipe = pipe |
| } |
| |
| func RepresentationWithPipe(pipe PipeInfo) Representation { |
| var _u Representation |
| _u.SetPipe(pipe) |
| return _u |
| } |
| |
| func (_m *Representation) SetDebuglog(debuglog DebuglogInfo) { |
| _m.reset() |
| _m.I_representationTag = RepresentationDebuglog |
| _m.Debuglog = debuglog |
| } |
| |
| func RepresentationWithDebuglog(debuglog DebuglogInfo) Representation { |
| var _u Representation |
| _u.SetDebuglog(debuglog) |
| return _u |
| } |
| |
| func (_m *Representation) SetDevice(device DeviceInfo) { |
| _m.reset() |
| _m.I_representationTag = RepresentationDevice |
| _m.Device = device |
| } |
| |
| func RepresentationWithDevice(device DeviceInfo) Representation { |
| var _u Representation |
| _u.SetDevice(device) |
| return _u |
| } |
| |
| func (_m *Representation) SetTty(tty TtyInfo) { |
| _m.reset() |
| _m.I_representationTag = RepresentationTty |
| _m.Tty = tty |
| } |
| |
| func RepresentationWithTty(tty TtyInfo) Representation { |
| var _u Representation |
| _u.SetTty(tty) |
| return _u |
| } |
| func (_m *Representation) GetUnknownData() _bindings.UnknownData { |
| return _m.I_unknownData.(_bindings.UnknownData) |
| } |
| |
| type I_directoryUnlinkResultTag uint64 |
| |
| const ( |
| DirectoryUnlinkResultResponse = 1 // 0x00000001 |
| DirectoryUnlinkResultErr = 2 // 0x00000002 |
| ) |
| |
| type DirectoryUnlinkResult struct { |
| I_directoryUnlinkResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response DirectoryUnlinkResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *DirectoryUnlinkResult) reset() { |
| switch _m.I_directoryUnlinkResultTag { |
| case 1: |
| var _zeroed DirectoryUnlinkResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *DirectoryUnlinkResult) Which() I_directoryUnlinkResultTag { |
| return _m.I_directoryUnlinkResultTag |
| } |
| |
| func (_m *DirectoryUnlinkResult) Ordinal() uint64 { |
| return uint64(_m.I_directoryUnlinkResultTag) |
| } |
| |
| func (_m *DirectoryUnlinkResult) SetResponse(response DirectoryUnlinkResponse) { |
| _m.reset() |
| _m.I_directoryUnlinkResultTag = DirectoryUnlinkResultResponse |
| _m.Response = response |
| } |
| |
| func DirectoryUnlinkResultWithResponse(response DirectoryUnlinkResponse) DirectoryUnlinkResult { |
| var _u DirectoryUnlinkResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *DirectoryUnlinkResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_directoryUnlinkResultTag = DirectoryUnlinkResultErr |
| _m.Err = err |
| } |
| |
| func DirectoryUnlinkResultWithErr(err int32) DirectoryUnlinkResult { |
| var _u DirectoryUnlinkResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_directoryUnlink2ResultTag uint64 |
| |
| const ( |
| DirectoryUnlink2ResultResponse = 1 // 0x00000001 |
| DirectoryUnlink2ResultErr = 2 // 0x00000002 |
| ) |
| |
| type DirectoryUnlink2Result struct { |
| I_directoryUnlink2ResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response DirectoryUnlink2Response `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *DirectoryUnlink2Result) reset() { |
| switch _m.I_directoryUnlink2ResultTag { |
| case 1: |
| var _zeroed DirectoryUnlink2Response |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *DirectoryUnlink2Result) Which() I_directoryUnlink2ResultTag { |
| return _m.I_directoryUnlink2ResultTag |
| } |
| |
| func (_m *DirectoryUnlink2Result) Ordinal() uint64 { |
| return uint64(_m.I_directoryUnlink2ResultTag) |
| } |
| |
| func (_m *DirectoryUnlink2Result) SetResponse(response DirectoryUnlink2Response) { |
| _m.reset() |
| _m.I_directoryUnlink2ResultTag = DirectoryUnlink2ResultResponse |
| _m.Response = response |
| } |
| |
| func DirectoryUnlink2ResultWithResponse(response DirectoryUnlink2Response) DirectoryUnlink2Result { |
| var _u DirectoryUnlink2Result |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *DirectoryUnlink2Result) SetErr(err int32) { |
| _m.reset() |
| _m.I_directoryUnlink2ResultTag = DirectoryUnlink2ResultErr |
| _m.Err = err |
| } |
| |
| func DirectoryUnlink2ResultWithErr(err int32) DirectoryUnlink2Result { |
| var _u DirectoryUnlink2Result |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_directoryRenameResultTag uint64 |
| |
| const ( |
| DirectoryRenameResultResponse = 1 // 0x00000001 |
| DirectoryRenameResultErr = 2 // 0x00000002 |
| ) |
| |
| type DirectoryRenameResult struct { |
| I_directoryRenameResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response DirectoryRenameResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *DirectoryRenameResult) reset() { |
| switch _m.I_directoryRenameResultTag { |
| case 1: |
| var _zeroed DirectoryRenameResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *DirectoryRenameResult) Which() I_directoryRenameResultTag { |
| return _m.I_directoryRenameResultTag |
| } |
| |
| func (_m *DirectoryRenameResult) Ordinal() uint64 { |
| return uint64(_m.I_directoryRenameResultTag) |
| } |
| |
| func (_m *DirectoryRenameResult) SetResponse(response DirectoryRenameResponse) { |
| _m.reset() |
| _m.I_directoryRenameResultTag = DirectoryRenameResultResponse |
| _m.Response = response |
| } |
| |
| func DirectoryRenameResultWithResponse(response DirectoryRenameResponse) DirectoryRenameResult { |
| var _u DirectoryRenameResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *DirectoryRenameResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_directoryRenameResultTag = DirectoryRenameResultErr |
| _m.Err = err |
| } |
| |
| func DirectoryRenameResultWithErr(err int32) DirectoryRenameResult { |
| var _u DirectoryRenameResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_directoryLinkResultTag uint64 |
| |
| const ( |
| DirectoryLinkResultResponse = 1 // 0x00000001 |
| DirectoryLinkResultErr = 2 // 0x00000002 |
| ) |
| |
| type DirectoryLinkResult struct { |
| I_directoryLinkResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response DirectoryLinkResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *DirectoryLinkResult) reset() { |
| switch _m.I_directoryLinkResultTag { |
| case 1: |
| var _zeroed DirectoryLinkResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *DirectoryLinkResult) Which() I_directoryLinkResultTag { |
| return _m.I_directoryLinkResultTag |
| } |
| |
| func (_m *DirectoryLinkResult) Ordinal() uint64 { |
| return uint64(_m.I_directoryLinkResultTag) |
| } |
| |
| func (_m *DirectoryLinkResult) SetResponse(response DirectoryLinkResponse) { |
| _m.reset() |
| _m.I_directoryLinkResultTag = DirectoryLinkResultResponse |
| _m.Response = response |
| } |
| |
| func DirectoryLinkResultWithResponse(response DirectoryLinkResponse) DirectoryLinkResult { |
| var _u DirectoryLinkResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *DirectoryLinkResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_directoryLinkResultTag = DirectoryLinkResultErr |
| _m.Err = err |
| } |
| |
| func DirectoryLinkResultWithErr(err int32) DirectoryLinkResult { |
| var _u DirectoryLinkResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_directoryIteratorGetNextResultTag uint64 |
| |
| const ( |
| DirectoryIteratorGetNextResultResponse = 1 // 0x00000001 |
| DirectoryIteratorGetNextResultErr = 2 // 0x00000002 |
| ) |
| |
| type DirectoryIteratorGetNextResult struct { |
| I_directoryIteratorGetNextResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response DirectoryIteratorGetNextResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *DirectoryIteratorGetNextResult) reset() { |
| switch _m.I_directoryIteratorGetNextResultTag { |
| case 1: |
| var _zeroed DirectoryIteratorGetNextResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *DirectoryIteratorGetNextResult) Which() I_directoryIteratorGetNextResultTag { |
| return _m.I_directoryIteratorGetNextResultTag |
| } |
| |
| func (_m *DirectoryIteratorGetNextResult) Ordinal() uint64 { |
| return uint64(_m.I_directoryIteratorGetNextResultTag) |
| } |
| |
| func (_m *DirectoryIteratorGetNextResult) SetResponse(response DirectoryIteratorGetNextResponse) { |
| _m.reset() |
| _m.I_directoryIteratorGetNextResultTag = DirectoryIteratorGetNextResultResponse |
| _m.Response = response |
| } |
| |
| func DirectoryIteratorGetNextResultWithResponse(response DirectoryIteratorGetNextResponse) DirectoryIteratorGetNextResult { |
| var _u DirectoryIteratorGetNextResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *DirectoryIteratorGetNextResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_directoryIteratorGetNextResultTag = DirectoryIteratorGetNextResultErr |
| _m.Err = err |
| } |
| |
| func DirectoryIteratorGetNextResultWithErr(err int32) DirectoryIteratorGetNextResult { |
| var _u DirectoryIteratorGetNextResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_directoryWatchedEventTag uint64 |
| |
| const ( |
| DirectoryWatchedEvent_unknownData = 0 // 0x00000000 |
| DirectoryWatchedEventExisting = 1 // 0x00000001 |
| DirectoryWatchedEventIdle = 2 // 0x00000002 |
| DirectoryWatchedEventAdded = 3 // 0x00000003 |
| DirectoryWatchedEventRemoved = 4 // 0x00000004 |
| ) |
| |
| // Events returned from [`DirectoryWatcher.GetNext`]. |
| type DirectoryWatchedEvent struct { |
| I_directoryWatchedEventTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // Indicates a node already existed in the directory when watching started. |
| Existing DirectoryEntry `fidl_ordinal:"1"` |
| // Indicates that no more `existing` events will be sent. |
| Idle IdleEvent `fidl_ordinal:"2"` |
| // Indicates a node has been created (either new or moved) into a |
| // directory. |
| Added DirectoryEntry `fidl_ordinal:"3"` |
| // Indicates a node has been removed (either deleted or moved) from the |
| // directory. |
| Removed string `fidl_bounds:"255" fidl_ordinal:"4"` |
| } |
| |
| func (_m *DirectoryWatchedEvent) reset() { |
| switch _m.I_directoryWatchedEventTag { |
| case 1: |
| var _zeroed DirectoryEntry |
| _m.Existing = _zeroed |
| case 2: |
| var _zeroed IdleEvent |
| _m.Idle = _zeroed |
| case 3: |
| var _zeroed DirectoryEntry |
| _m.Added = _zeroed |
| case 4: |
| var _zeroed string |
| _m.Removed = _zeroed |
| default: |
| var _zeroed interface{} |
| _m.I_unknownData = _zeroed |
| } |
| } |
| |
| func (_m *DirectoryWatchedEvent) Which() I_directoryWatchedEventTag { |
| switch _m.I_directoryWatchedEventTag { |
| case 1: |
| return DirectoryWatchedEventExisting |
| case 2: |
| return DirectoryWatchedEventIdle |
| case 3: |
| return DirectoryWatchedEventAdded |
| case 4: |
| return DirectoryWatchedEventRemoved |
| default: |
| return DirectoryWatchedEvent_unknownData |
| } |
| } |
| |
| func (_m *DirectoryWatchedEvent) Ordinal() uint64 { |
| return uint64(_m.I_directoryWatchedEventTag) |
| } |
| |
| func (_m *DirectoryWatchedEvent) SetExisting(existing DirectoryEntry) { |
| _m.reset() |
| _m.I_directoryWatchedEventTag = DirectoryWatchedEventExisting |
| _m.Existing = existing |
| } |
| |
| func DirectoryWatchedEventWithExisting(existing DirectoryEntry) DirectoryWatchedEvent { |
| var _u DirectoryWatchedEvent |
| _u.SetExisting(existing) |
| return _u |
| } |
| |
| func (_m *DirectoryWatchedEvent) SetIdle(idle IdleEvent) { |
| _m.reset() |
| _m.I_directoryWatchedEventTag = DirectoryWatchedEventIdle |
| _m.Idle = idle |
| } |
| |
| func DirectoryWatchedEventWithIdle(idle IdleEvent) DirectoryWatchedEvent { |
| var _u DirectoryWatchedEvent |
| _u.SetIdle(idle) |
| return _u |
| } |
| |
| func (_m *DirectoryWatchedEvent) SetAdded(added DirectoryEntry) { |
| _m.reset() |
| _m.I_directoryWatchedEventTag = DirectoryWatchedEventAdded |
| _m.Added = added |
| } |
| |
| func DirectoryWatchedEventWithAdded(added DirectoryEntry) DirectoryWatchedEvent { |
| var _u DirectoryWatchedEvent |
| _u.SetAdded(added) |
| return _u |
| } |
| |
| func (_m *DirectoryWatchedEvent) SetRemoved(removed string) { |
| _m.reset() |
| _m.I_directoryWatchedEventTag = DirectoryWatchedEventRemoved |
| _m.Removed = removed |
| } |
| |
| func DirectoryWatchedEventWithRemoved(removed string) DirectoryWatchedEvent { |
| var _u DirectoryWatchedEvent |
| _u.SetRemoved(removed) |
| return _u |
| } |
| func (_m *DirectoryWatchedEvent) GetUnknownData() _bindings.UnknownData { |
| return _m.I_unknownData.(_bindings.UnknownData) |
| } |
| |
| type I_fileSeekResultTag uint64 |
| |
| const ( |
| FileSeekResultResponse = 1 // 0x00000001 |
| FileSeekResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileSeekResult struct { |
| I_fileSeekResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileSeekResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *FileSeekResult) reset() { |
| switch _m.I_fileSeekResultTag { |
| case 1: |
| var _zeroed FileSeekResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *FileSeekResult) Which() I_fileSeekResultTag { |
| return _m.I_fileSeekResultTag |
| } |
| |
| func (_m *FileSeekResult) Ordinal() uint64 { |
| return uint64(_m.I_fileSeekResultTag) |
| } |
| |
| func (_m *FileSeekResult) SetResponse(response FileSeekResponse) { |
| _m.reset() |
| _m.I_fileSeekResultTag = FileSeekResultResponse |
| _m.Response = response |
| } |
| |
| func FileSeekResultWithResponse(response FileSeekResponse) FileSeekResult { |
| var _u FileSeekResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *FileSeekResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_fileSeekResultTag = FileSeekResultErr |
| _m.Err = err |
| } |
| |
| func FileSeekResultWithErr(err int32) FileSeekResult { |
| var _u FileSeekResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_fileReadResultTag uint64 |
| |
| const ( |
| FileReadResultResponse = 1 // 0x00000001 |
| FileReadResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileReadResult struct { |
| I_fileReadResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileReadResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *FileReadResult) reset() { |
| switch _m.I_fileReadResultTag { |
| case 1: |
| var _zeroed FileReadResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *FileReadResult) Which() I_fileReadResultTag { |
| return _m.I_fileReadResultTag |
| } |
| |
| func (_m *FileReadResult) Ordinal() uint64 { |
| return uint64(_m.I_fileReadResultTag) |
| } |
| |
| func (_m *FileReadResult) SetResponse(response FileReadResponse) { |
| _m.reset() |
| _m.I_fileReadResultTag = FileReadResultResponse |
| _m.Response = response |
| } |
| |
| func FileReadResultWithResponse(response FileReadResponse) FileReadResult { |
| var _u FileReadResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *FileReadResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_fileReadResultTag = FileReadResultErr |
| _m.Err = err |
| } |
| |
| func FileReadResultWithErr(err int32) FileReadResult { |
| var _u FileReadResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_fileWriteResultTag uint64 |
| |
| const ( |
| FileWriteResultResponse = 1 // 0x00000001 |
| FileWriteResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileWriteResult struct { |
| I_fileWriteResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileWriteResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *FileWriteResult) reset() { |
| switch _m.I_fileWriteResultTag { |
| case 1: |
| var _zeroed FileWriteResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *FileWriteResult) Which() I_fileWriteResultTag { |
| return _m.I_fileWriteResultTag |
| } |
| |
| func (_m *FileWriteResult) Ordinal() uint64 { |
| return uint64(_m.I_fileWriteResultTag) |
| } |
| |
| func (_m *FileWriteResult) SetResponse(response FileWriteResponse) { |
| _m.reset() |
| _m.I_fileWriteResultTag = FileWriteResultResponse |
| _m.Response = response |
| } |
| |
| func FileWriteResultWithResponse(response FileWriteResponse) FileWriteResult { |
| var _u FileWriteResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *FileWriteResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_fileWriteResultTag = FileWriteResultErr |
| _m.Err = err |
| } |
| |
| func FileWriteResultWithErr(err int32) FileWriteResult { |
| var _u FileWriteResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_fileReadAtResultTag uint64 |
| |
| const ( |
| FileReadAtResultResponse = 1 // 0x00000001 |
| FileReadAtResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileReadAtResult struct { |
| I_fileReadAtResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileReadAtResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *FileReadAtResult) reset() { |
| switch _m.I_fileReadAtResultTag { |
| case 1: |
| var _zeroed FileReadAtResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *FileReadAtResult) Which() I_fileReadAtResultTag { |
| return _m.I_fileReadAtResultTag |
| } |
| |
| func (_m *FileReadAtResult) Ordinal() uint64 { |
| return uint64(_m.I_fileReadAtResultTag) |
| } |
| |
| func (_m *FileReadAtResult) SetResponse(response FileReadAtResponse) { |
| _m.reset() |
| _m.I_fileReadAtResultTag = FileReadAtResultResponse |
| _m.Response = response |
| } |
| |
| func FileReadAtResultWithResponse(response FileReadAtResponse) FileReadAtResult { |
| var _u FileReadAtResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *FileReadAtResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_fileReadAtResultTag = FileReadAtResultErr |
| _m.Err = err |
| } |
| |
| func FileReadAtResultWithErr(err int32) FileReadAtResult { |
| var _u FileReadAtResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_fileWriteAtResultTag uint64 |
| |
| const ( |
| FileWriteAtResultResponse = 1 // 0x00000001 |
| FileWriteAtResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileWriteAtResult struct { |
| I_fileWriteAtResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileWriteAtResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *FileWriteAtResult) reset() { |
| switch _m.I_fileWriteAtResultTag { |
| case 1: |
| var _zeroed FileWriteAtResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *FileWriteAtResult) Which() I_fileWriteAtResultTag { |
| return _m.I_fileWriteAtResultTag |
| } |
| |
| func (_m *FileWriteAtResult) Ordinal() uint64 { |
| return uint64(_m.I_fileWriteAtResultTag) |
| } |
| |
| func (_m *FileWriteAtResult) SetResponse(response FileWriteAtResponse) { |
| _m.reset() |
| _m.I_fileWriteAtResultTag = FileWriteAtResultResponse |
| _m.Response = response |
| } |
| |
| func FileWriteAtResultWithResponse(response FileWriteAtResponse) FileWriteAtResult { |
| var _u FileWriteAtResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *FileWriteAtResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_fileWriteAtResultTag = FileWriteAtResultErr |
| _m.Err = err |
| } |
| |
| func FileWriteAtResultWithErr(err int32) FileWriteAtResult { |
| var _u FileWriteAtResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_fileResizeResultTag uint64 |
| |
| const ( |
| FileResizeResultResponse = 1 // 0x00000001 |
| FileResizeResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileResizeResult struct { |
| I_fileResizeResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileResizeResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *FileResizeResult) reset() { |
| switch _m.I_fileResizeResultTag { |
| case 1: |
| var _zeroed FileResizeResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *FileResizeResult) Which() I_fileResizeResultTag { |
| return _m.I_fileResizeResultTag |
| } |
| |
| func (_m *FileResizeResult) Ordinal() uint64 { |
| return uint64(_m.I_fileResizeResultTag) |
| } |
| |
| func (_m *FileResizeResult) SetResponse(response FileResizeResponse) { |
| _m.reset() |
| _m.I_fileResizeResultTag = FileResizeResultResponse |
| _m.Response = response |
| } |
| |
| func FileResizeResultWithResponse(response FileResizeResponse) FileResizeResult { |
| var _u FileResizeResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *FileResizeResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_fileResizeResultTag = FileResizeResultErr |
| _m.Err = err |
| } |
| |
| func FileResizeResultWithErr(err int32) FileResizeResult { |
| var _u FileResizeResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_fileGetMemRangeResultTag uint64 |
| |
| const ( |
| FileGetMemRangeResultResponse = 1 // 0x00000001 |
| FileGetMemRangeResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileGetMemRangeResult struct { |
| I_fileGetMemRangeResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| Response FileGetMemRangeResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *FileGetMemRangeResult) reset() { |
| switch _m.I_fileGetMemRangeResultTag { |
| case 1: |
| var _zeroed FileGetMemRangeResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *FileGetMemRangeResult) Which() I_fileGetMemRangeResultTag { |
| return _m.I_fileGetMemRangeResultTag |
| } |
| |
| func (_m *FileGetMemRangeResult) Ordinal() uint64 { |
| return uint64(_m.I_fileGetMemRangeResultTag) |
| } |
| |
| func (_m *FileGetMemRangeResult) SetResponse(response FileGetMemRangeResponse) { |
| _m.reset() |
| _m.I_fileGetMemRangeResultTag = FileGetMemRangeResultResponse |
| _m.Response = response |
| } |
| |
| func FileGetMemRangeResultWithResponse(response FileGetMemRangeResponse) FileGetMemRangeResult { |
| var _u FileGetMemRangeResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *FileGetMemRangeResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_fileGetMemRangeResultTag = FileGetMemRangeResultErr |
| _m.Err = err |
| } |
| |
| func FileGetMemRangeResultWithErr(err int32) FileGetMemRangeResult { |
| var _u FileGetMemRangeResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_advisoryLockingAdvisoryLockResultTag uint64 |
| |
| const ( |
| AdvisoryLockingAdvisoryLockResultResponse = 1 // 0x00000001 |
| AdvisoryLockingAdvisoryLockResultErr = 2 // 0x00000002 |
| ) |
| |
| type AdvisoryLockingAdvisoryLockResult struct { |
| I_advisoryLockingAdvisoryLockResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response AdvisoryLockingAdvisoryLockResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *AdvisoryLockingAdvisoryLockResult) reset() { |
| switch _m.I_advisoryLockingAdvisoryLockResultTag { |
| case 1: |
| var _zeroed AdvisoryLockingAdvisoryLockResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *AdvisoryLockingAdvisoryLockResult) Which() I_advisoryLockingAdvisoryLockResultTag { |
| return _m.I_advisoryLockingAdvisoryLockResultTag |
| } |
| |
| func (_m *AdvisoryLockingAdvisoryLockResult) Ordinal() uint64 { |
| return uint64(_m.I_advisoryLockingAdvisoryLockResultTag) |
| } |
| |
| func (_m *AdvisoryLockingAdvisoryLockResult) SetResponse(response AdvisoryLockingAdvisoryLockResponse) { |
| _m.reset() |
| _m.I_advisoryLockingAdvisoryLockResultTag = AdvisoryLockingAdvisoryLockResultResponse |
| _m.Response = response |
| } |
| |
| func AdvisoryLockingAdvisoryLockResultWithResponse(response AdvisoryLockingAdvisoryLockResponse) AdvisoryLockingAdvisoryLockResult { |
| var _u AdvisoryLockingAdvisoryLockResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *AdvisoryLockingAdvisoryLockResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_advisoryLockingAdvisoryLockResultTag = AdvisoryLockingAdvisoryLockResultErr |
| _m.Err = err |
| } |
| |
| func AdvisoryLockingAdvisoryLockResultWithErr(err int32) AdvisoryLockingAdvisoryLockResult { |
| var _u AdvisoryLockingAdvisoryLockResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_nodeGetTokenResultTag uint64 |
| |
| const ( |
| NodeGetTokenResultResponse = 1 // 0x00000001 |
| NodeGetTokenResultErr = 2 // 0x00000002 |
| ) |
| |
| type NodeGetTokenResult struct { |
| I_nodeGetTokenResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| Response NodeGetTokenResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *NodeGetTokenResult) reset() { |
| switch _m.I_nodeGetTokenResultTag { |
| case 1: |
| var _zeroed NodeGetTokenResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *NodeGetTokenResult) Which() I_nodeGetTokenResultTag { |
| return _m.I_nodeGetTokenResultTag |
| } |
| |
| func (_m *NodeGetTokenResult) Ordinal() uint64 { |
| return uint64(_m.I_nodeGetTokenResultTag) |
| } |
| |
| func (_m *NodeGetTokenResult) SetResponse(response NodeGetTokenResponse) { |
| _m.reset() |
| _m.I_nodeGetTokenResultTag = NodeGetTokenResultResponse |
| _m.Response = response |
| } |
| |
| func NodeGetTokenResultWithResponse(response NodeGetTokenResponse) NodeGetTokenResult { |
| var _u NodeGetTokenResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *NodeGetTokenResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_nodeGetTokenResultTag = NodeGetTokenResultErr |
| _m.Err = err |
| } |
| |
| func NodeGetTokenResultWithErr(err int32) NodeGetTokenResult { |
| var _u NodeGetTokenResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_nodeGetAttributesResultTag uint64 |
| |
| const ( |
| NodeGetAttributesResultResponse = 1 // 0x00000001 |
| NodeGetAttributesResultErr = 2 // 0x00000002 |
| ) |
| |
| type NodeGetAttributesResult struct { |
| I_nodeGetAttributesResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response NodeGetAttributesResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *NodeGetAttributesResult) reset() { |
| switch _m.I_nodeGetAttributesResultTag { |
| case 1: |
| var _zeroed NodeGetAttributesResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *NodeGetAttributesResult) Which() I_nodeGetAttributesResultTag { |
| return _m.I_nodeGetAttributesResultTag |
| } |
| |
| func (_m *NodeGetAttributesResult) Ordinal() uint64 { |
| return uint64(_m.I_nodeGetAttributesResultTag) |
| } |
| |
| func (_m *NodeGetAttributesResult) SetResponse(response NodeGetAttributesResponse) { |
| _m.reset() |
| _m.I_nodeGetAttributesResultTag = NodeGetAttributesResultResponse |
| _m.Response = response |
| } |
| |
| func NodeGetAttributesResultWithResponse(response NodeGetAttributesResponse) NodeGetAttributesResult { |
| var _u NodeGetAttributesResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *NodeGetAttributesResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_nodeGetAttributesResultTag = NodeGetAttributesResultErr |
| _m.Err = err |
| } |
| |
| func NodeGetAttributesResultWithErr(err int32) NodeGetAttributesResult { |
| var _u NodeGetAttributesResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_nodeUpdateAttributesResultTag uint64 |
| |
| const ( |
| NodeUpdateAttributesResultResponse = 1 // 0x00000001 |
| NodeUpdateAttributesResultErr = 2 // 0x00000002 |
| ) |
| |
| type NodeUpdateAttributesResult struct { |
| I_nodeUpdateAttributesResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response NodeUpdateAttributesResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *NodeUpdateAttributesResult) reset() { |
| switch _m.I_nodeUpdateAttributesResultTag { |
| case 1: |
| var _zeroed NodeUpdateAttributesResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *NodeUpdateAttributesResult) Which() I_nodeUpdateAttributesResultTag { |
| return _m.I_nodeUpdateAttributesResultTag |
| } |
| |
| func (_m *NodeUpdateAttributesResult) Ordinal() uint64 { |
| return uint64(_m.I_nodeUpdateAttributesResultTag) |
| } |
| |
| func (_m *NodeUpdateAttributesResult) SetResponse(response NodeUpdateAttributesResponse) { |
| _m.reset() |
| _m.I_nodeUpdateAttributesResultTag = NodeUpdateAttributesResultResponse |
| _m.Response = response |
| } |
| |
| func NodeUpdateAttributesResultWithResponse(response NodeUpdateAttributesResponse) NodeUpdateAttributesResult { |
| var _u NodeUpdateAttributesResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *NodeUpdateAttributesResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_nodeUpdateAttributesResultTag = NodeUpdateAttributesResultErr |
| _m.Err = err |
| } |
| |
| func NodeUpdateAttributesResultWithErr(err int32) NodeUpdateAttributesResult { |
| var _u NodeUpdateAttributesResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_nodeSyncResultTag uint64 |
| |
| const ( |
| NodeSyncResultResponse = 1 // 0x00000001 |
| NodeSyncResultErr = 2 // 0x00000002 |
| ) |
| |
| type NodeSyncResult struct { |
| I_nodeSyncResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response NodeSyncResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| func (_m *NodeSyncResult) reset() { |
| switch _m.I_nodeSyncResultTag { |
| case 1: |
| var _zeroed NodeSyncResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *NodeSyncResult) Which() I_nodeSyncResultTag { |
| return _m.I_nodeSyncResultTag |
| } |
| |
| func (_m *NodeSyncResult) Ordinal() uint64 { |
| return uint64(_m.I_nodeSyncResultTag) |
| } |
| |
| func (_m *NodeSyncResult) SetResponse(response NodeSyncResponse) { |
| _m.reset() |
| _m.I_nodeSyncResultTag = NodeSyncResultResponse |
| _m.Response = response |
| } |
| |
| func NodeSyncResultWithResponse(response NodeSyncResponse) NodeSyncResult { |
| var _u NodeSyncResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *NodeSyncResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_nodeSyncResultTag = NodeSyncResultErr |
| _m.Err = err |
| } |
| |
| func NodeSyncResultWithErr(err int32) NodeSyncResult { |
| var _u NodeSyncResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| // Returns run-time information about a node that is specific to the |
| // current connection. |
| type ConnectionInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // The active variant corresponds to one of the supported protocols |
| // of the node, and represents the result of the connection-time |
| // negotiation. Provides auxiliary handles if applicable. |
| Representation Representation `fidl_ordinal:"1"` |
| RepresentationPresent bool |
| // Information about the rights possessed by the current connection. |
| // Note: `rights` limits the set of operations allowed on the connection, |
| // but does not guarantee their availability. For example, one may have |
| // the [`Rights.EXECUTE`] right on a file connection, but the file itself |
| // does not have the `EXECUTE` ability, and hence cannot be executed. |
| // See [`ConnectionOptions.rights`]. |
| Rights Operations `fidl_ordinal:"2"` |
| RightsPresent bool |
| // The set of available operations on this channel. It is always the |
| // intersection between the rights possessed by this connection, and the |
| // abilities of the node. The value may be zero in the case of an empty |
| // intersection. |
| // See [`ConnectionOptions.rights`]. |
| AvailableOperations Operations `fidl_ordinal:"3"` |
| AvailableOperationsPresent bool |
| } |
| |
| func (u *ConnectionInfo) SetRepresentation(representation Representation) { |
| u.Representation = representation |
| u.RepresentationPresent = true |
| } |
| |
| func (u *ConnectionInfo) GetRepresentation() Representation { |
| return u.Representation |
| } |
| |
| func (u *ConnectionInfo) GetRepresentationWithDefault(_default Representation) Representation { |
| if !u.HasRepresentation() { |
| return _default |
| } |
| return u.Representation |
| } |
| |
| func (u *ConnectionInfo) HasRepresentation() bool { |
| return u.RepresentationPresent |
| } |
| |
| func (u *ConnectionInfo) ClearRepresentation() { |
| u.RepresentationPresent = false |
| } |
| |
| func (u *ConnectionInfo) SetRights(rights Operations) { |
| u.Rights = rights |
| u.RightsPresent = true |
| } |
| |
| func (u *ConnectionInfo) GetRights() Operations { |
| return u.Rights |
| } |
| |
| func (u *ConnectionInfo) GetRightsWithDefault(_default Operations) Operations { |
| if !u.HasRights() { |
| return _default |
| } |
| return u.Rights |
| } |
| |
| func (u *ConnectionInfo) HasRights() bool { |
| return u.RightsPresent |
| } |
| |
| func (u *ConnectionInfo) ClearRights() { |
| u.RightsPresent = false |
| } |
| |
| func (u *ConnectionInfo) SetAvailableOperations(availableOperations Operations) { |
| u.AvailableOperations = availableOperations |
| u.AvailableOperationsPresent = true |
| } |
| |
| func (u *ConnectionInfo) GetAvailableOperations() Operations { |
| return u.AvailableOperations |
| } |
| |
| func (u *ConnectionInfo) GetAvailableOperationsWithDefault(_default Operations) Operations { |
| if !u.HasAvailableOperations() { |
| return _default |
| } |
| return u.AvailableOperations |
| } |
| |
| func (u *ConnectionInfo) HasAvailableOperations() bool { |
| return u.AvailableOperationsPresent |
| } |
| |
| func (u *ConnectionInfo) ClearAvailableOperations() { |
| u.AvailableOperationsPresent = false |
| } |
| |
| func (u *ConnectionInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *ConnectionInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Options for [`Directory.Open`] and [`Node.Reopen`]. |
| type ConnectionOptions struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // Flags which can affect the behavior when opening and reopening. |
| // If absent, assumes a default of zero. |
| Flags ConnectionFlags `fidl_ordinal:"1"` |
| FlagsPresent bool |
| // Specifies the set of representations accepted by the client, to support |
| // a form of protocol negotiation on the node being opened. |
| // Refer to the definition of [`NodeProtocols`] for more details. |
| // It cannot be zero. |
| // |
| // In addition, clients may assert the type of the object by setting |
| // the protocol corresponding to the expected type: |
| // |
| // * If the caller expected a directory but the node cannot be accessed |
| // as a directory, the error is `ZX_ERR_NOT_DIR`. |
| // * If the caller expected a file but the node cannot be accessed as a |
| // file, the error is `ZX_ERR_NOT_FILE`. |
| // * In other mismatched cases, the error is `ZX_ERR_WRONG_TYPE`. |
| // |
| // During [`Directory.Open`], if a new object is to be created, `protocols` |
| // determines the type of object to create; it must be present. |
| // If a valid object type cannot be unambiguously inferred e.g. |
| // both `DIRECTORY` and `FILE` were set, the request must fail. |
| // |
| // During [`Node.Reopen`], clients may specify a different but compatible |
| // `protocols` to do a "protocol upgrade". |
| // |
| // If more than one protocol is present in `protocols`, the resultant |
| // protocol may become any one of them. Clients should specify |
| // [`ConnectionFlags.GET_CONNECTION_INFO`] to receive a |
| // [`Node.OnConnectionInfo`] event, in order to ascertain the protocol. |
| // |
| // If absent, indicates that the caller accepts any type of node, and |
| // the resulting protocol is unspecified. |
| Protocols NodeProtocols `fidl_ordinal:"2"` |
| ProtocolsPresent bool |
| // Requests rights on the new connection according to the specified rules. |
| // See [`fuchsia.io2/RightsRequest`]. |
| // |
| // ## Rights Hierarchy |
| // |
| // Respecting principles of least privileges, rights in general must meet |
| // the following restrictions: |
| // |
| // * A connection must have nonzero rights. |
| // * From the perspective of a client, rights must never increase in a |
| // derived connection. |
| // * From the perspective of a directory proxy, it must ensure that |
| // new connections opened through it cannot have more rights than |
| // the connection where the proxy received the `Open`/`Reopen` call. |
| // |
| // The proper enforcement of the rights hierarchy is a powerful refinement |
| // over the existing access control facilities offered by directory |
| // sandboxing. |
| // |
| // ## Rights Inheritance |
| // |
| // If `rights_request` is absent, inherits at most the rights on the source |
| // connection: |
| // |
| // * During [`Node.Reopen`], the new connection would have the same rights |
| // as the connection where the `Reopen` call is made. |
| // * During [`Directory.Open`], the rights on the connection would inherit |
| // from the connection where the `Open` call is made. If the path crosses |
| // intermediate proxies, a proxy may strip elements from the resulting |
| // rights if the intermediate connection does not have the corresponding |
| // rights. |
| // |
| // ## Rights vs Abilities |
| // |
| // The rights on a connection limits the set of operations allowed on that |
| // connection, but does not guarantee their availability, because the |
| // object may not support it. For convenience, clients may query the |
| // [`ConnectionInfo.available_operations`] field on a new connection, |
| // which is the intersection of the rights and abilities and indicates the |
| // guaranteed set of available operations. |
| // |
| // See [`fuchsia.io2/Rights`] and [`fuchsia.io2/Abilities`]. |
| // |
| // ## Implementation Notes |
| // |
| // When a directory proxy encounters an absent `rights` field, let `r` be |
| // the rights on the connection where it received this request, the proxy |
| // should fill in this field with the following: |
| // |
| // ``` |
| // RightsRequest { |
| // at_most: r, |
| // at_least: 0, |
| // resolution: RightsResolution.MAXIMIZE, |
| // } |
| // ``` |
| // |
| // before forwarding the request to the remote party. |
| RightsRequest RightsRequest `fidl_ordinal:"3"` |
| RightsRequestPresent bool |
| } |
| |
| func (u *ConnectionOptions) SetFlags(flags ConnectionFlags) { |
| u.Flags = flags |
| u.FlagsPresent = true |
| } |
| |
| func (u *ConnectionOptions) GetFlags() ConnectionFlags { |
| return u.Flags |
| } |
| |
| func (u *ConnectionOptions) GetFlagsWithDefault(_default ConnectionFlags) ConnectionFlags { |
| if !u.HasFlags() { |
| return _default |
| } |
| return u.Flags |
| } |
| |
| func (u *ConnectionOptions) HasFlags() bool { |
| return u.FlagsPresent |
| } |
| |
| func (u *ConnectionOptions) ClearFlags() { |
| u.FlagsPresent = false |
| } |
| |
| func (u *ConnectionOptions) SetProtocols(protocols NodeProtocols) { |
| u.Protocols = protocols |
| u.ProtocolsPresent = true |
| } |
| |
| func (u *ConnectionOptions) GetProtocols() NodeProtocols { |
| return u.Protocols |
| } |
| |
| func (u *ConnectionOptions) GetProtocolsWithDefault(_default NodeProtocols) NodeProtocols { |
| if !u.HasProtocols() { |
| return _default |
| } |
| return u.Protocols |
| } |
| |
| func (u *ConnectionOptions) HasProtocols() bool { |
| return u.ProtocolsPresent |
| } |
| |
| func (u *ConnectionOptions) ClearProtocols() { |
| u.ProtocolsPresent = false |
| } |
| |
| func (u *ConnectionOptions) SetRightsRequest(rightsRequest RightsRequest) { |
| u.RightsRequest = rightsRequest |
| u.RightsRequestPresent = true |
| } |
| |
| func (u *ConnectionOptions) GetRightsRequest() RightsRequest { |
| return u.RightsRequest |
| } |
| |
| func (u *ConnectionOptions) GetRightsRequestWithDefault(_default RightsRequest) RightsRequest { |
| if !u.HasRightsRequest() { |
| return _default |
| } |
| return u.RightsRequest |
| } |
| |
| func (u *ConnectionOptions) HasRightsRequest() bool { |
| return u.RightsRequestPresent |
| } |
| |
| func (u *ConnectionOptions) ClearRightsRequest() { |
| u.RightsRequestPresent = false |
| } |
| |
| func (u *ConnectionOptions) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *ConnectionOptions) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Auxiliary data for the connector representation of a node, used for |
| // protocol discovery and connection. |
| // |
| // It supports connecting to arbitrary protocols exported by the filesystem |
| // server at a path, including ones that do not compose [`fuchsia.io2/Node`]. |
| type ConnectorInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| } |
| |
| func (u *ConnectorInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *ConnectorInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // The debuglog representation of a node. |
| // The selection of this variant in [`Representation`] implies that the |
| // connection speaks the [`fuchsia.io2/Debuglog`] protocol. |
| type DebuglogInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // The backing debuglog kernel object. |
| Debuglog _zx.Log `fidl_handle_subtype:"12" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"` |
| DebuglogPresent bool |
| } |
| |
| func (u *DebuglogInfo) SetDebuglog(debuglog _zx.Log) { |
| u.Debuglog = debuglog |
| u.DebuglogPresent = true |
| } |
| |
| func (u *DebuglogInfo) GetDebuglog() _zx.Log { |
| return u.Debuglog |
| } |
| |
| func (u *DebuglogInfo) GetDebuglogWithDefault(_default _zx.Log) _zx.Log { |
| if !u.HasDebuglog() { |
| return _default |
| } |
| return u.Debuglog |
| } |
| |
| func (u *DebuglogInfo) HasDebuglog() bool { |
| return u.DebuglogPresent |
| } |
| |
| func (u *DebuglogInfo) ClearDebuglog() { |
| u.DebuglogPresent = false |
| } |
| |
| func (u *DebuglogInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *DebuglogInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // The object may be cast to the shared interface of devices. |
| type DeviceInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // An optional event which transmits information about a device's state. |
| // |
| // The [`DeviceSignal`] values may be observed on this event. |
| Event _zx.Handle `fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"` |
| EventPresent bool |
| } |
| |
| func (u *DeviceInfo) SetEvent(event _zx.Handle) { |
| u.Event = event |
| u.EventPresent = true |
| } |
| |
| func (u *DeviceInfo) GetEvent() _zx.Handle { |
| return u.Event |
| } |
| |
| func (u *DeviceInfo) GetEventWithDefault(_default _zx.Handle) _zx.Handle { |
| if !u.HasEvent() { |
| return _default |
| } |
| return u.Event |
| } |
| |
| func (u *DeviceInfo) HasEvent() bool { |
| return u.EventPresent |
| } |
| |
| func (u *DeviceInfo) ClearEvent() { |
| u.EventPresent = false |
| } |
| |
| func (u *DeviceInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *DeviceInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // The object may be cast to a Tty interface. |
| type TtyInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // An optional event which transmits information about a device's state. |
| // |
| // The [`DeviceSignal`] values may be observed on this event. |
| Event _zx.Handle `fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"` |
| EventPresent bool |
| } |
| |
| func (u *TtyInfo) SetEvent(event _zx.Handle) { |
| u.Event = event |
| u.EventPresent = true |
| } |
| |
| func (u *TtyInfo) GetEvent() _zx.Handle { |
| return u.Event |
| } |
| |
| func (u *TtyInfo) GetEventWithDefault(_default _zx.Handle) _zx.Handle { |
| if !u.HasEvent() { |
| return _default |
| } |
| return u.Event |
| } |
| |
| func (u *TtyInfo) HasEvent() bool { |
| return u.EventPresent |
| } |
| |
| func (u *TtyInfo) ClearEvent() { |
| u.EventPresent = false |
| } |
| |
| func (u *TtyInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *TtyInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Information about an immediate child node of a directory. |
| // |
| // If a particular attribute is not applicable or not supported, |
| // implementations should leave the corresponding field absent. |
| type DirectoryEntry struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // Name of the node. This field must be present. |
| Name string `fidl_bounds:"255" fidl_ordinal:"1"` |
| NamePresent bool |
| // Describes the kinds of representations supported by the node. |
| Protocols NodeProtocols `fidl_ordinal:"2"` |
| ProtocolsPresent bool |
| // Describes the kinds of operations supported by the node. |
| Abilities Operations `fidl_ordinal:"3"` |
| AbilitiesPresent bool |
| // An ID for the node. See [`fuchsia.io2/Id`]. |
| // This `id` should be unique among all entries of a directory. |
| Id uint64 `fidl_ordinal:"4"` |
| IdPresent bool |
| } |
| |
| func (u *DirectoryEntry) SetName(name string) { |
| u.Name = name |
| u.NamePresent = true |
| } |
| |
| func (u *DirectoryEntry) GetName() string { |
| return u.Name |
| } |
| |
| func (u *DirectoryEntry) GetNameWithDefault(_default string) string { |
| if !u.HasName() { |
| return _default |
| } |
| return u.Name |
| } |
| |
| func (u *DirectoryEntry) HasName() bool { |
| return u.NamePresent |
| } |
| |
| func (u *DirectoryEntry) ClearName() { |
| u.NamePresent = false |
| } |
| |
| func (u *DirectoryEntry) SetProtocols(protocols NodeProtocols) { |
| u.Protocols = protocols |
| u.ProtocolsPresent = true |
| } |
| |
| func (u *DirectoryEntry) GetProtocols() NodeProtocols { |
| return u.Protocols |
| } |
| |
| func (u *DirectoryEntry) GetProtocolsWithDefault(_default NodeProtocols) NodeProtocols { |
| if !u.HasProtocols() { |
| return _default |
| } |
| return u.Protocols |
| } |
| |
| func (u *DirectoryEntry) HasProtocols() bool { |
| return u.ProtocolsPresent |
| } |
| |
| func (u *DirectoryEntry) ClearProtocols() { |
| u.ProtocolsPresent = false |
| } |
| |
| func (u *DirectoryEntry) SetAbilities(abilities Operations) { |
| u.Abilities = abilities |
| u.AbilitiesPresent = true |
| } |
| |
| func (u *DirectoryEntry) GetAbilities() Operations { |
| return u.Abilities |
| } |
| |
| func (u *DirectoryEntry) GetAbilitiesWithDefault(_default Operations) Operations { |
| if !u.HasAbilities() { |
| return _default |
| } |
| return u.Abilities |
| } |
| |
| func (u *DirectoryEntry) HasAbilities() bool { |
| return u.AbilitiesPresent |
| } |
| |
| func (u *DirectoryEntry) ClearAbilities() { |
| u.AbilitiesPresent = false |
| } |
| |
| func (u *DirectoryEntry) SetId(id uint64) { |
| u.Id = id |
| u.IdPresent = true |
| } |
| |
| func (u *DirectoryEntry) GetId() uint64 { |
| return u.Id |
| } |
| |
| func (u *DirectoryEntry) GetIdWithDefault(_default uint64) uint64 { |
| if !u.HasId() { |
| return _default |
| } |
| return u.Id |
| } |
| |
| func (u *DirectoryEntry) HasId() bool { |
| return u.IdPresent |
| } |
| |
| func (u *DirectoryEntry) ClearId() { |
| u.IdPresent = false |
| } |
| |
| func (u *DirectoryEntry) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *DirectoryEntry) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Auxiliary data for the directory representation of a node. |
| // The selection of this variant in [`Representation`] implies that the |
| // connection speaks the [`fuchsia.io2/Directory`] protocol. |
| type DirectoryInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| } |
| |
| func (u *DirectoryInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *DirectoryInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Options for [`Directory.Unlink`]. |
| type UnlinkOptions struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| Flags UnlinkFlags `fidl_ordinal:"1"` |
| FlagsPresent bool |
| } |
| |
| func (u *UnlinkOptions) SetFlags(flags UnlinkFlags) { |
| u.Flags = flags |
| u.FlagsPresent = true |
| } |
| |
| func (u *UnlinkOptions) GetFlags() UnlinkFlags { |
| return u.Flags |
| } |
| |
| func (u *UnlinkOptions) GetFlagsWithDefault(_default UnlinkFlags) UnlinkFlags { |
| if !u.HasFlags() { |
| return _default |
| } |
| return u.Flags |
| } |
| |
| func (u *UnlinkOptions) HasFlags() bool { |
| return u.FlagsPresent |
| } |
| |
| func (u *UnlinkOptions) ClearFlags() { |
| u.FlagsPresent = false |
| } |
| |
| func (u *UnlinkOptions) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *UnlinkOptions) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Options to pass to [`fuchsia.io2/Directory.Enumerate`]. |
| type DirectoryEnumerateOptions struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| } |
| |
| func (u *DirectoryEnumerateOptions) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *DirectoryEnumerateOptions) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| type DirectoryWatchOptions struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| } |
| |
| func (u *DirectoryWatchOptions) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *DirectoryWatchOptions) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Auxiliary data for the file representation of a node. |
| // The selection of this variant in [`Representation`] implies that the |
| // connection speaks the [`fuchsia.io2/File`] protocol. |
| type FileInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // An optional event which transmits information about an object's |
| // readability or writability. This event relays information about the |
| // underlying object, not the capability granted to client: this event |
| // may be signalled "readable" on a connection that does not have |
| // the capability to read. |
| // |
| // This event will be present if the following conditions are met: |
| // |
| // - The `available_operations` on the file connection is not empty. |
| // - The filesystem supports signalling readability/writability events. |
| // |
| // The [`FileSignal`] values may be observed on this event. |
| Observer _zx.Event `fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"` |
| ObserverPresent bool |
| // Returns if the file is opened in append mode. |
| // In append mode, the seek offset is moved to the end before every |
| // write, the two steps performed in an atomic manner. |
| IsAppend bool `fidl_ordinal:"2"` |
| IsAppendPresent bool |
| // An optional stream object, which can be used to read to and write from |
| // the file. |
| // |
| // Reading and writing the file using the stream object can be up to 20x |
| // faster than reading and writing the file using the Read and Write |
| // operations in the [`fuchsia.io2/File`] protocol. |
| Stream _zx.Handle `fidl_handle_subtype:"31" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"3"` |
| StreamPresent bool |
| } |
| |
| func (u *FileInfo) SetObserver(observer _zx.Event) { |
| u.Observer = observer |
| u.ObserverPresent = true |
| } |
| |
| func (u *FileInfo) GetObserver() _zx.Event { |
| return u.Observer |
| } |
| |
| func (u *FileInfo) GetObserverWithDefault(_default _zx.Event) _zx.Event { |
| if !u.HasObserver() { |
| return _default |
| } |
| return u.Observer |
| } |
| |
| func (u *FileInfo) HasObserver() bool { |
| return u.ObserverPresent |
| } |
| |
| func (u *FileInfo) ClearObserver() { |
| u.ObserverPresent = false |
| } |
| |
| func (u *FileInfo) SetIsAppend(isAppend bool) { |
| u.IsAppend = isAppend |
| u.IsAppendPresent = true |
| } |
| |
| func (u *FileInfo) GetIsAppend() bool { |
| return u.IsAppend |
| } |
| |
| func (u *FileInfo) GetIsAppendWithDefault(_default bool) bool { |
| if !u.HasIsAppend() { |
| return _default |
| } |
| return u.IsAppend |
| } |
| |
| func (u *FileInfo) HasIsAppend() bool { |
| return u.IsAppendPresent |
| } |
| |
| func (u *FileInfo) ClearIsAppend() { |
| u.IsAppendPresent = false |
| } |
| |
| func (u *FileInfo) SetStream(stream _zx.Handle) { |
| u.Stream = stream |
| u.StreamPresent = true |
| } |
| |
| func (u *FileInfo) GetStream() _zx.Handle { |
| return u.Stream |
| } |
| |
| func (u *FileInfo) GetStreamWithDefault(_default _zx.Handle) _zx.Handle { |
| if !u.HasStream() { |
| return _default |
| } |
| return u.Stream |
| } |
| |
| func (u *FileInfo) HasStream() bool { |
| return u.StreamPresent |
| } |
| |
| func (u *FileInfo) ClearStream() { |
| u.StreamPresent = false |
| } |
| |
| func (u *FileInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *FileInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| type AdvisoryLockRequest struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // The type of lock to be acquired. |
| // |
| // If this field is absent, the [`AdvisoryLock`] method will fail |
| // with ZX_ERR_INVALID_ARGS. |
| Type AdvisoryLockType `fidl_ordinal:"1"` |
| TypePresent bool |
| // The byte range within the file to be locked. See [`AdvisoryLockRange`] |
| // for semantics. |
| // |
| // If this field is absent, the range defaults to the entire file. |
| Range AdvisoryLockRange `fidl_ordinal:"2"` |
| RangePresent bool |
| // Whether the file should wait reply to the [`AdvisoryLock`] |
| // method until the requested lock can be acquired. |
| // |
| // If this field is absent, the file will not wait. |
| Wait bool `fidl_ordinal:"3"` |
| WaitPresent bool |
| } |
| |
| func (u *AdvisoryLockRequest) SetType(type_ AdvisoryLockType) { |
| u.Type = type_ |
| u.TypePresent = true |
| } |
| |
| func (u *AdvisoryLockRequest) GetType() AdvisoryLockType { |
| return u.Type |
| } |
| |
| func (u *AdvisoryLockRequest) GetTypeWithDefault(_default AdvisoryLockType) AdvisoryLockType { |
| if !u.HasType() { |
| return _default |
| } |
| return u.Type |
| } |
| |
| func (u *AdvisoryLockRequest) HasType() bool { |
| return u.TypePresent |
| } |
| |
| func (u *AdvisoryLockRequest) ClearType() { |
| u.TypePresent = false |
| } |
| |
| func (u *AdvisoryLockRequest) SetRange(range_ AdvisoryLockRange) { |
| u.Range = range_ |
| u.RangePresent = true |
| } |
| |
| func (u *AdvisoryLockRequest) GetRange() AdvisoryLockRange { |
| return u.Range |
| } |
| |
| func (u *AdvisoryLockRequest) GetRangeWithDefault(_default AdvisoryLockRange) AdvisoryLockRange { |
| if !u.HasRange() { |
| return _default |
| } |
| return u.Range |
| } |
| |
| func (u *AdvisoryLockRequest) HasRange() bool { |
| return u.RangePresent |
| } |
| |
| func (u *AdvisoryLockRequest) ClearRange() { |
| u.RangePresent = false |
| } |
| |
| func (u *AdvisoryLockRequest) SetWait(wait bool) { |
| u.Wait = wait |
| u.WaitPresent = true |
| } |
| |
| func (u *AdvisoryLockRequest) GetWait() bool { |
| return u.Wait |
| } |
| |
| func (u *AdvisoryLockRequest) GetWaitWithDefault(_default bool) bool { |
| if !u.HasWait() { |
| return _default |
| } |
| return u.Wait |
| } |
| |
| func (u *AdvisoryLockRequest) HasWait() bool { |
| return u.WaitPresent |
| } |
| |
| func (u *AdvisoryLockRequest) ClearWait() { |
| u.WaitPresent = false |
| } |
| |
| func (u *AdvisoryLockRequest) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *AdvisoryLockRequest) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Auxiliary data for the memory object representation of a node. |
| // The node is a file which is represented as a VMO. |
| // The selection of this variant in [`Representation`] implies that the |
| // connection speaks the [`fuchsia.io2/Memory`] protocol. |
| type MemoryInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // Although a VMO is returned as a part of this structure, that VMO may |
| // back multiple files. To identify the logical portion of the VMO that |
| // represents the single file, offset and size are also supplied. |
| // |
| // If the range covers the entire VMO (i.e. the offset is zero and the |
| // length matches the size of the VMO), then all clients must receive a |
| // VMO with the same koid. This can be a duplicate of the same underlying |
| // page-aligned VMO. |
| // |
| // The rights on this VMO should correspond to the rights on the |
| // node connection. |
| Buffer fuchsiamem.Range `fidl_ordinal:"1"` |
| BufferPresent bool |
| } |
| |
| func (u *MemoryInfo) SetBuffer(buffer fuchsiamem.Range) { |
| u.Buffer = buffer |
| u.BufferPresent = true |
| } |
| |
| func (u *MemoryInfo) GetBuffer() fuchsiamem.Range { |
| return u.Buffer |
| } |
| |
| func (u *MemoryInfo) GetBufferWithDefault(_default fuchsiamem.Range) fuchsiamem.Range { |
| if !u.HasBuffer() { |
| return _default |
| } |
| return u.Buffer |
| } |
| |
| func (u *MemoryInfo) HasBuffer() bool { |
| return u.BufferPresent |
| } |
| |
| func (u *MemoryInfo) ClearBuffer() { |
| u.BufferPresent = false |
| } |
| |
| func (u *MemoryInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *MemoryInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Objective information about a filesystem node. |
| // See [`Node.GetAttributes`] and [`Node.UpdateAttributes`]. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // If a particular attribute is not applicable or not supported, |
| // filesystems should leave the corresponding field absent. |
| type NodeAttributes struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // Describes the kinds of representations supported by the node. |
| // Note: This is not the result of the connection-time negotiation, |
| // which is conveyed via `representation`. |
| // |
| // This attribute is read-only. |
| Protocols NodeProtocols `fidl_ordinal:"1"` |
| ProtocolsPresent bool |
| // Describes the kinds of operations supported by the node. |
| // Note: This is distinct from the rights used at connection time. |
| // |
| // This attribute is read-only. |
| Abilities Operations `fidl_ordinal:"2"` |
| AbilitiesPresent bool |
| // Node size, in bytes. |
| // |
| // This attribute is read-only. |
| ContentSize uint64 `fidl_ordinal:"3"` |
| ContentSizePresent bool |
| // Space needed to store the node (possibly larger than size), in bytes. |
| // |
| // This attribute is read-only. |
| StorageSize uint64 `fidl_ordinal:"4"` |
| StorageSizePresent bool |
| // Number of hard links to the node. It must be at least one. |
| // |
| // This attribute is read-only. |
| LinkCount uint64 `fidl_ordinal:"5"` |
| LinkCountPresent bool |
| // Time of creation in nanoseconds since the Unix epoch, UTC. |
| // It may be updated manually after creation. |
| CreationTime uint64 `fidl_ordinal:"6"` |
| CreationTimePresent bool |
| // Time of last modification in nanoseconds since the Unix epoch, UTC. |
| ModificationTime uint64 `fidl_ordinal:"7"` |
| ModificationTimePresent bool |
| // An ID for the node. See [`fuchsia.io2/Id`]. |
| // This `id` should be unique among all entries of a directory. |
| // |
| // This attribute is read-only. |
| Id uint64 `fidl_ordinal:"8"` |
| IdPresent bool |
| } |
| |
| func (u *NodeAttributes) SetProtocols(protocols NodeProtocols) { |
| u.Protocols = protocols |
| u.ProtocolsPresent = true |
| } |
| |
| func (u *NodeAttributes) GetProtocols() NodeProtocols { |
| return u.Protocols |
| } |
| |
| func (u *NodeAttributes) GetProtocolsWithDefault(_default NodeProtocols) NodeProtocols { |
| if !u.HasProtocols() { |
| return _default |
| } |
| return u.Protocols |
| } |
| |
| func (u *NodeAttributes) HasProtocols() bool { |
| return u.ProtocolsPresent |
| } |
| |
| func (u *NodeAttributes) ClearProtocols() { |
| u.ProtocolsPresent = false |
| } |
| |
| func (u *NodeAttributes) SetAbilities(abilities Operations) { |
| u.Abilities = abilities |
| u.AbilitiesPresent = true |
| } |
| |
| func (u *NodeAttributes) GetAbilities() Operations { |
| return u.Abilities |
| } |
| |
| func (u *NodeAttributes) GetAbilitiesWithDefault(_default Operations) Operations { |
| if !u.HasAbilities() { |
| return _default |
| } |
| return u.Abilities |
| } |
| |
| func (u *NodeAttributes) HasAbilities() bool { |
| return u.AbilitiesPresent |
| } |
| |
| func (u *NodeAttributes) ClearAbilities() { |
| u.AbilitiesPresent = false |
| } |
| |
| func (u *NodeAttributes) SetContentSize(contentSize uint64) { |
| u.ContentSize = contentSize |
| u.ContentSizePresent = true |
| } |
| |
| func (u *NodeAttributes) GetContentSize() uint64 { |
| return u.ContentSize |
| } |
| |
| func (u *NodeAttributes) GetContentSizeWithDefault(_default uint64) uint64 { |
| if !u.HasContentSize() { |
| return _default |
| } |
| return u.ContentSize |
| } |
| |
| func (u *NodeAttributes) HasContentSize() bool { |
| return u.ContentSizePresent |
| } |
| |
| func (u *NodeAttributes) ClearContentSize() { |
| u.ContentSizePresent = false |
| } |
| |
| func (u *NodeAttributes) SetStorageSize(storageSize uint64) { |
| u.StorageSize = storageSize |
| u.StorageSizePresent = true |
| } |
| |
| func (u *NodeAttributes) GetStorageSize() uint64 { |
| return u.StorageSize |
| } |
| |
| func (u *NodeAttributes) GetStorageSizeWithDefault(_default uint64) uint64 { |
| if !u.HasStorageSize() { |
| return _default |
| } |
| return u.StorageSize |
| } |
| |
| func (u *NodeAttributes) HasStorageSize() bool { |
| return u.StorageSizePresent |
| } |
| |
| func (u *NodeAttributes) ClearStorageSize() { |
| u.StorageSizePresent = false |
| } |
| |
| func (u *NodeAttributes) SetLinkCount(linkCount uint64) { |
| u.LinkCount = linkCount |
| u.LinkCountPresent = true |
| } |
| |
| func (u *NodeAttributes) GetLinkCount() uint64 { |
| return u.LinkCount |
| } |
| |
| func (u *NodeAttributes) GetLinkCountWithDefault(_default uint64) uint64 { |
| if !u.HasLinkCount() { |
| return _default |
| } |
| return u.LinkCount |
| } |
| |
| func (u *NodeAttributes) HasLinkCount() bool { |
| return u.LinkCountPresent |
| } |
| |
| func (u *NodeAttributes) ClearLinkCount() { |
| u.LinkCountPresent = false |
| } |
| |
| func (u *NodeAttributes) SetCreationTime(creationTime uint64) { |
| u.CreationTime = creationTime |
| u.CreationTimePresent = true |
| } |
| |
| func (u *NodeAttributes) GetCreationTime() uint64 { |
| return u.CreationTime |
| } |
| |
| func (u *NodeAttributes) GetCreationTimeWithDefault(_default uint64) uint64 { |
| if !u.HasCreationTime() { |
| return _default |
| } |
| return u.CreationTime |
| } |
| |
| func (u *NodeAttributes) HasCreationTime() bool { |
| return u.CreationTimePresent |
| } |
| |
| func (u *NodeAttributes) ClearCreationTime() { |
| u.CreationTimePresent = false |
| } |
| |
| func (u *NodeAttributes) SetModificationTime(modificationTime uint64) { |
| u.ModificationTime = modificationTime |
| u.ModificationTimePresent = true |
| } |
| |
| func (u *NodeAttributes) GetModificationTime() uint64 { |
| return u.ModificationTime |
| } |
| |
| func (u *NodeAttributes) GetModificationTimeWithDefault(_default uint64) uint64 { |
| if !u.HasModificationTime() { |
| return _default |
| } |
| return u.ModificationTime |
| } |
| |
| func (u *NodeAttributes) HasModificationTime() bool { |
| return u.ModificationTimePresent |
| } |
| |
| func (u *NodeAttributes) ClearModificationTime() { |
| u.ModificationTimePresent = false |
| } |
| |
| func (u *NodeAttributes) SetId(id uint64) { |
| u.Id = id |
| u.IdPresent = true |
| } |
| |
| func (u *NodeAttributes) GetId() uint64 { |
| return u.Id |
| } |
| |
| func (u *NodeAttributes) GetIdWithDefault(_default uint64) uint64 { |
| if !u.HasId() { |
| return _default |
| } |
| return u.Id |
| } |
| |
| func (u *NodeAttributes) HasId() bool { |
| return u.IdPresent |
| } |
| |
| func (u *NodeAttributes) ClearId() { |
| u.IdPresent = false |
| } |
| |
| func (u *NodeAttributes) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *NodeAttributes) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // The pipe representation of a node. |
| // A pipe is a data streaming interface, commonly used for standard in/out. |
| // There is no universal requirement as to if it is uni- or bi-directional. |
| // The selection of this variant in [`Representation`] implies that the |
| // connection speaks the [`fuchsia.io2/Pipe`] protocol. |
| type PipeInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // The backing socket transport for the pipe. |
| // The rights on this socket should correspond to the rights on the |
| // node connection. |
| Socket _zx.Socket `fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"` |
| SocketPresent bool |
| } |
| |
| func (u *PipeInfo) SetSocket(socket _zx.Socket) { |
| u.Socket = socket |
| u.SocketPresent = true |
| } |
| |
| func (u *PipeInfo) GetSocket() _zx.Socket { |
| return u.Socket |
| } |
| |
| func (u *PipeInfo) GetSocketWithDefault(_default _zx.Socket) _zx.Socket { |
| if !u.HasSocket() { |
| return _default |
| } |
| return u.Socket |
| } |
| |
| func (u *PipeInfo) HasSocket() bool { |
| return u.SocketPresent |
| } |
| |
| func (u *PipeInfo) ClearSocket() { |
| u.SocketPresent = false |
| } |
| |
| func (u *PipeInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *PipeInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Auxiliary data for the POSIX socket representation of a node. |
| // The selection of this variant in [`Representation`] implies that the |
| // connection speaks the [`fuchsia.posix.socket/Control`] protocol. |
| type PosixSocketInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // The backing transport for the socket. |
| // The rights on this socket should correspond to the rights on the |
| // node connection. |
| Socket _zx.Socket `fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"` |
| SocketPresent bool |
| } |
| |
| func (u *PosixSocketInfo) SetSocket(socket _zx.Socket) { |
| u.Socket = socket |
| u.SocketPresent = true |
| } |
| |
| func (u *PosixSocketInfo) GetSocket() _zx.Socket { |
| return u.Socket |
| } |
| |
| func (u *PosixSocketInfo) GetSocketWithDefault(_default _zx.Socket) _zx.Socket { |
| if !u.HasSocket() { |
| return _default |
| } |
| return u.Socket |
| } |
| |
| func (u *PosixSocketInfo) HasSocket() bool { |
| return u.SocketPresent |
| } |
| |
| func (u *PosixSocketInfo) ClearSocket() { |
| u.SocketPresent = false |
| } |
| |
| func (u *PosixSocketInfo) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *PosixSocketInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| const ( |
| DebuglogReopenOrdinal uint64 = 0x74170eb73121c69f |
| DebuglogCloseOrdinal uint64 = 0x2dec2818386e5d68 |
| DebuglogDescribeOrdinal uint64 = 0x4aac591060c65c2f |
| DebuglogOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437 |
| DebuglogGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4 |
| DebuglogGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4 |
| DebuglogUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5 |
| DebuglogSyncOrdinal uint64 = 0xac3a8c1a2e063ad |
| ) |
| |
| type DebuglogWithCtxInterface _bindings.ChannelProxy |
| |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| func (p *DebuglogWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error { |
| req_ := &debuglogWithCtxReopenRequest{ |
| Options: options, |
| ObjectRequest: objectRequest, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DebuglogReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| func (p *DebuglogWithCtxInterface) Close(ctx_ _bindings.Context) error { |
| var req_ _bindings.Message |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DebuglogCloseOrdinal, req_) |
| return err_ |
| } |
| |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| func (p *DebuglogWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) { |
| req_ := &debuglogWithCtxDescribeRequest{ |
| Query: query, |
| } |
| resp_ := &debuglogWithCtxDescribeResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogDescribeOrdinal, req_, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| func (p *DebuglogWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| resp_ := &debuglogWithCtxOnConnectionInfoResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(DebuglogOnConnectionInfoOrdinal, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| func (p *DebuglogWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) { |
| var req_ _bindings.Message |
| resp_ := &debuglogWithCtxGetTokenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogGetTokenOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| func (p *DebuglogWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) { |
| req_ := &debuglogWithCtxGetAttributesRequest{ |
| Query: query, |
| } |
| resp_ := &debuglogWithCtxGetAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogGetAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| func (p *DebuglogWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) { |
| req_ := &debuglogWithCtxUpdateAttributesRequest{ |
| Attributes: attributes, |
| } |
| resp_ := &debuglogWithCtxUpdateAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogUpdateAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| func (p *DebuglogWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &debuglogWithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogSyncOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // A node for interacting with the kernel debug log. |
| // It may be manipulated via the debuglog object returned from |
| // the `DebuglogInfo` member in [`fuchsia.io2/Representation`]. |
| type DebuglogWithCtx interface { |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| Close(ctx_ _bindings.Context) error |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| Sync(ctx_ _bindings.Context) (NodeSyncResult, error) |
| } |
| |
| type DebuglogWithCtxTransitionalBase struct{} |
| |
| type DebuglogWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewDebuglogWithCtxInterfaceRequest() (DebuglogWithCtxInterfaceRequest, *DebuglogWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return DebuglogWithCtxInterfaceRequest(req), (*DebuglogWithCtxInterface)(cli), err |
| } |
| |
| type DebuglogWithCtxStub struct { |
| Impl DebuglogWithCtx |
| } |
| |
| func (s_ *DebuglogWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case DebuglogReopenOrdinal: |
| in_ := debuglogWithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest) |
| return nil, false, err_ |
| case DebuglogCloseOrdinal: |
| err_ := s_.Impl.Close(args_.Ctx) |
| return nil, false, err_ |
| case DebuglogDescribeOrdinal: |
| in_ := debuglogWithCtxDescribeRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query) |
| out_ := debuglogWithCtxDescribeResponse{} |
| out_.Info = info |
| return &out_, true, err_ |
| case DebuglogGetTokenOrdinal: |
| result, err_ := s_.Impl.GetToken(args_.Ctx) |
| out_ := debuglogWithCtxGetTokenResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DebuglogGetAttributesOrdinal: |
| in_ := debuglogWithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query) |
| out_ := debuglogWithCtxGetAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DebuglogUpdateAttributesOrdinal: |
| in_ := debuglogWithCtxUpdateAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes) |
| out_ := debuglogWithCtxUpdateAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DebuglogSyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := debuglogWithCtxSyncResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type DebuglogEventProxy _bindings.ChannelProxy |
| |
| func (p *DebuglogEventProxy) OnConnectionInfo(info ConnectionInfo) error { |
| event_ := &debuglogWithCtxOnConnectionInfoResponse{ |
| Info: info, |
| } |
| return ((*_bindings.ChannelProxy)(p)).Send(DebuglogOnConnectionInfoOrdinal, event_) |
| } |
| |
| const ( |
| DirectoryReopenOrdinal uint64 = 0x74170eb73121c69f |
| DirectoryCloseOrdinal uint64 = 0x2dec2818386e5d68 |
| DirectoryDescribeOrdinal uint64 = 0x4aac591060c65c2f |
| DirectoryOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437 |
| DirectoryGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4 |
| DirectoryGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4 |
| DirectoryUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5 |
| DirectorySyncOrdinal uint64 = 0xac3a8c1a2e063ad |
| DirectoryOpenOrdinal uint64 = 0x38473cc20ba23253 |
| DirectoryAddInotifyFilterOrdinal uint64 = 0x7c422dcf191384db |
| DirectoryUnlinkOrdinal uint64 = 0x6c6dd97d65572cdb |
| DirectoryUnlink2Ordinal uint64 = 0x570d476d3f1b82b |
| DirectoryEnumerateOrdinal uint64 = 0xbe14c8b05a90a63 |
| DirectoryRenameOrdinal uint64 = 0x1fe02df8f70742b7 |
| DirectoryLinkOrdinal uint64 = 0x42634f09df52fdcc |
| DirectoryWatchOrdinal uint64 = 0x7f88ab8c3f500618 |
| ) |
| |
| type DirectoryWithCtxInterface _bindings.ChannelProxy |
| |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| func (p *DirectoryWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error { |
| req_ := &directoryWithCtxReopenRequest{ |
| Options: options, |
| ObjectRequest: objectRequest, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| func (p *DirectoryWithCtxInterface) Close(ctx_ _bindings.Context) error { |
| var req_ _bindings.Message |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryCloseOrdinal, req_) |
| return err_ |
| } |
| |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| func (p *DirectoryWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) { |
| req_ := &directoryWithCtxDescribeRequest{ |
| Query: query, |
| } |
| resp_ := &directoryWithCtxDescribeResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryDescribeOrdinal, req_, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| func (p *DirectoryWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| resp_ := &directoryWithCtxOnConnectionInfoResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(DirectoryOnConnectionInfoOrdinal, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| func (p *DirectoryWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxGetTokenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetTokenOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| func (p *DirectoryWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) { |
| req_ := &directoryWithCtxGetAttributesRequest{ |
| Query: query, |
| } |
| resp_ := &directoryWithCtxGetAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| func (p *DirectoryWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) { |
| req_ := &directoryWithCtxUpdateAttributesRequest{ |
| Attributes: attributes, |
| } |
| resp_ := &directoryWithCtxUpdateAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryUpdateAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| func (p *DirectoryWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectorySyncOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Opens or creates a new node relative to this directory node. |
| // |
| // + `path` identifies the node to open. |
| // If `path` contains multiple segments, then the directory is traversed, |
| // one segment at a time, relative to the directory represented by this |
| // connection. |
| // See [`fuchsia.io2/Path`] for what constitutes a valid path. |
| // To open another connection to the current directory, use |
| // [`fuchsia.io2/Node.Reopen`] instead. |
| // + `mode` controls whether to open existing/create new etc. |
| // + `options` additional options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // This method requires the following rights on the current connection: |
| // |
| // * [`Rights.ENUMERATE`] |
| // * [`Rights.TRAVERSE`] |
| // |
| // Errors are presented as an epitaph on the `object_request` channel. |
| // |
| // * error `ZX_ERR_ACCESS_DENIED` if the requested rights exceeds |
| // what is allowed. |
| // * error `ZX_ERR_BAD_PATH` if `path` is invalid. |
| func (p *DirectoryWithCtxInterface) Open(ctx_ _bindings.Context, path string, mode OpenMode, options ConnectionOptions, objectRequest _zx.Channel) error { |
| req_ := &directoryWithCtxOpenRequest{ |
| Path: path, |
| Mode: mode, |
| Options: options, |
| ObjectRequest: objectRequest, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryOpenOrdinal, req_) |
| return err_ |
| } |
| |
| // Adds a new inotify filter for an object relative to this directory object. |
| // |
| // + 'filter` is a mask of different inotify events that need to be watched by the server |
| // for a specific file/directory. |
| // |
| // + `path` may contain multiple segments, separated by "/" characters, |
| // and should never be empty; i.e., "" is an invalid path. Paths should not contain |
| // a leading "/". |
| // |
| // +`watch_descriptor` is client assigned value to identify a filter. |
| // Server shouldn't trust the client-assigned watch_descriptor. They should just send it |
| // back to the client in the socket. |
| // This value is not used by server, but it is returned back as part of InotifyEvent, |
| // to help the client correlate filter with events on this filter. |
| // |
| // + `socket` is shared between different filter objects i.e every new filter will |
| // have a different server end of the socket and there will be a single client end per |
| // inotify instance on inotify init. |
| // |
| // + `controller` is the server end of a channel and is per filter in the vnode so that |
| // we can remove the specific inotify filter when the controller is closed by the server |
| // or the client. |
| // |
| // Errors are presented as an epitaph on the `controller` channel. |
| // * error `ZX_ERR_ACCESS_DENIED` if the requested rights exceeds |
| // what is allowed. |
| // * error `ZX_ERR_BAD_PATH` if `path` is invalid. |
| func (p *DirectoryWithCtxInterface) AddInotifyFilter(ctx_ _bindings.Context, path string, filter InotifyWatchMask, watchDescriptor uint32, socket _zx.Socket) error { |
| req_ := &directoryWithCtxAddInotifyFilterRequest{ |
| Path: path, |
| Filter: filter, |
| WatchDescriptor: watchDescriptor, |
| Socket: socket, |
| } |
| var resp_ _bindings.Message |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAddInotifyFilterOrdinal, req_, resp_) |
| return err_ |
| } |
| |
| // Removes a child node from the this directory's list of entries. |
| // |
| // Note: this does not guarantee that the underlying object is destroyed. |
| // Although the link will be removed from the containing directory, |
| // objects with multiple references (such as files which are still open) |
| // will not actually be destroyed until all references are closed. |
| // |
| // * error `ZX_ERR_ACCESS_DENIED` if the connection does not have |
| // [`Rights.WRITE_BYTES`]. |
| // * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not |
| // support writing. |
| // * error `ZX_ERR_BAD_PATH` if `name` is invalid. |
| // * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory. |
| // * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point, |
| // containing a remote channel. |
| // * error `ZX_ERR_NOT_DIR` if the options requested a directory but something other than a |
| // directory was found. |
| // |
| // Other errors may be returned for filesystem-specific reasons. |
| // |
| // This method requires the following rights: |
| // |
| // * [`Rights.ENUMERATE`] |
| // * [`Rights.MODIFY_DIRECTORY`] |
| func (p *DirectoryWithCtxInterface) Unlink(ctx_ _bindings.Context, path string) (DirectoryUnlinkResult, error) { |
| req_ := &directoryWithCtxUnlinkRequest{ |
| Path: path, |
| } |
| resp_ := &directoryWithCtxUnlinkResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryUnlinkOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| func (p *DirectoryWithCtxInterface) Unlink2(ctx_ _bindings.Context, name string, options UnlinkOptions) (DirectoryUnlink2Result, error) { |
| req_ := &directoryWithCtxUnlink2Request{ |
| Name: name, |
| Options: options, |
| } |
| resp_ := &directoryWithCtxUnlink2Response{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryUnlink2Ordinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Initiates a directory listing operation over the input channel, |
| // starting at seek offset 0. |
| // |
| // This method requires the [`Rights.ENUMERATE`] right. If this right is |
| // absent, `iterator` will be closed with a `ZX_ERR_ACCESS_DENIED` epitaph. |
| func (p *DirectoryWithCtxInterface) Enumerate(ctx_ _bindings.Context, options DirectoryEnumerateOptions, iterator DirectoryIteratorWithCtxInterfaceRequest) error { |
| req_ := &directoryWithCtxEnumerateRequest{ |
| Options: options, |
| Iterator: iterator, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryEnumerateOrdinal, req_) |
| return err_ |
| } |
| |
| // Renames a node named `src` to the name `dst`, in a directory represented |
| // by `dst_parent_token`. |
| // |
| // `src` and `dst` must be valid node names. |
| // See [`fuchsia.io2/Name`] for what constitutes a valid name. |
| // |
| // This method requires the following rights on both the current |
| // connection, and the connection identified by `dst_parent_token`: |
| // |
| // * [`Rights.ENUMERATE`] |
| // * [`Rights.MODIFY_DIRECTORY`] |
| // |
| // * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid. |
| func (p *DirectoryWithCtxInterface) Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryRenameResult, error) { |
| req_ := &directoryWithCtxRenameRequest{ |
| Src: src, |
| DstParentToken: dstParentToken, |
| Dst: dst, |
| } |
| resp_ := &directoryWithCtxRenameResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryRenameOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Creates a link to a node named `src` by the name `dst`, |
| // in a directory represented by `dst_parent_token`. |
| // |
| // Directories cannot be linked, to prevent reference cycles. |
| // |
| // `src` and `dst` must be valid node names. |
| // See [`fuchsia.io2/Name`] for what constitutes a valid name. |
| // |
| // This method requires the following rights on both the current |
| // connection, and the connection identified by `dst_parent_token`: |
| // |
| // * [`Rights.ENUMERATE`] |
| // * [`Rights.MODIFY_DIRECTORY`] |
| // |
| // * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid. |
| // * error `ZX_ERR_INVALID_ARGS` if `src` is a directory. |
| func (p *DirectoryWithCtxInterface) Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryLinkResult, error) { |
| req_ := &directoryWithCtxLinkRequest{ |
| Src: src, |
| DstParentToken: dstParentToken, |
| Dst: dst, |
| } |
| resp_ := &directoryWithCtxLinkResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryLinkOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Watches a directory, monitoring events for children being added or |
| // removed on the server end of the `watcher` channel. |
| // |
| // Mask specifies a bit mask of events to observe. |
| // |
| // This method requires the [`Rights.ENUMERATE`] right. If this right is |
| // absent, `watcher` will be closed with a `ZX_ERR_ACCESS_DENIED` epitaph. |
| func (p *DirectoryWithCtxInterface) Watch(ctx_ _bindings.Context, mask DirectoryWatchMask, options DirectoryWatchOptions, watcher DirectoryWatcherWithCtxInterfaceRequest) error { |
| req_ := &directoryWithCtxWatchRequest{ |
| Mask: mask, |
| Options: options, |
| Watcher: watcher, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryWatchOrdinal, req_) |
| return err_ |
| } |
| |
| // A [`fuchsia.io2/Node`] that is capable of containing other nodes. |
| type DirectoryWithCtx interface { |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| Close(ctx_ _bindings.Context) error |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| Sync(ctx_ _bindings.Context) (NodeSyncResult, error) |
| // Opens or creates a new node relative to this directory node. |
| // |
| // + `path` identifies the node to open. |
| // If `path` contains multiple segments, then the directory is traversed, |
| // one segment at a time, relative to the directory represented by this |
| // connection. |
| // See [`fuchsia.io2/Path`] for what constitutes a valid path. |
| // To open another connection to the current directory, use |
| // [`fuchsia.io2/Node.Reopen`] instead. |
| // + `mode` controls whether to open existing/create new etc. |
| // + `options` additional options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // This method requires the following rights on the current connection: |
| // |
| // * [`Rights.ENUMERATE`] |
| // * [`Rights.TRAVERSE`] |
| // |
| // Errors are presented as an epitaph on the `object_request` channel. |
| // |
| // * error `ZX_ERR_ACCESS_DENIED` if the requested rights exceeds |
| // what is allowed. |
| // * error `ZX_ERR_BAD_PATH` if `path` is invalid. |
| Open(ctx_ _bindings.Context, path string, mode OpenMode, options ConnectionOptions, objectRequest _zx.Channel) error |
| // Adds a new inotify filter for an object relative to this directory object. |
| // |
| // + 'filter` is a mask of different inotify events that need to be watched by the server |
| // for a specific file/directory. |
| // |
| // + `path` may contain multiple segments, separated by "/" characters, |
| // and should never be empty; i.e., "" is an invalid path. Paths should not contain |
| // a leading "/". |
| // |
| // +`watch_descriptor` is client assigned value to identify a filter. |
| // Server shouldn't trust the client-assigned watch_descriptor. They should just send it |
| // back to the client in the socket. |
| // This value is not used by server, but it is returned back as part of InotifyEvent, |
| // to help the client correlate filter with events on this filter. |
| // |
| // + `socket` is shared between different filter objects i.e every new filter will |
| // have a different server end of the socket and there will be a single client end per |
| // inotify instance on inotify init. |
| // |
| // + `controller` is the server end of a channel and is per filter in the vnode so that |
| // we can remove the specific inotify filter when the controller is closed by the server |
| // or the client. |
| // |
| // Errors are presented as an epitaph on the `controller` channel. |
| // * error `ZX_ERR_ACCESS_DENIED` if the requested rights exceeds |
| // what is allowed. |
| // * error `ZX_ERR_BAD_PATH` if `path` is invalid. |
| AddInotifyFilter(ctx_ _bindings.Context, path string, filter InotifyWatchMask, watchDescriptor uint32, socket _zx.Socket) error |
| // Removes a child node from the this directory's list of entries. |
| // |
| // Note: this does not guarantee that the underlying object is destroyed. |
| // Although the link will be removed from the containing directory, |
| // objects with multiple references (such as files which are still open) |
| // will not actually be destroyed until all references are closed. |
| // |
| // * error `ZX_ERR_ACCESS_DENIED` if the connection does not have |
| // [`Rights.WRITE_BYTES`]. |
| // * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not |
| // support writing. |
| // * error `ZX_ERR_BAD_PATH` if `name` is invalid. |
| // * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory. |
| // * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point, |
| // containing a remote channel. |
| // * error `ZX_ERR_NOT_DIR` if the options requested a directory but something other than a |
| // directory was found. |
| // |
| // Other errors may be returned for filesystem-specific reasons. |
| // |
| // This method requires the following rights: |
| // |
| // * [`Rights.ENUMERATE`] |
| // * [`Rights.MODIFY_DIRECTORY`] |
| Unlink(ctx_ _bindings.Context, path string) (DirectoryUnlinkResult, error) |
| Unlink2(ctx_ _bindings.Context, name string, options UnlinkOptions) (DirectoryUnlink2Result, error) |
| // Initiates a directory listing operation over the input channel, |
| // starting at seek offset 0. |
| // |
| // This method requires the [`Rights.ENUMERATE`] right. If this right is |
| // absent, `iterator` will be closed with a `ZX_ERR_ACCESS_DENIED` epitaph. |
| Enumerate(ctx_ _bindings.Context, options DirectoryEnumerateOptions, iterator DirectoryIteratorWithCtxInterfaceRequest) error |
| // Renames a node named `src` to the name `dst`, in a directory represented |
| // by `dst_parent_token`. |
| // |
| // `src` and `dst` must be valid node names. |
| // See [`fuchsia.io2/Name`] for what constitutes a valid name. |
| // |
| // This method requires the following rights on both the current |
| // connection, and the connection identified by `dst_parent_token`: |
| // |
| // * [`Rights.ENUMERATE`] |
| // * [`Rights.MODIFY_DIRECTORY`] |
| // |
| // * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid. |
| Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryRenameResult, error) |
| // Creates a link to a node named `src` by the name `dst`, |
| // in a directory represented by `dst_parent_token`. |
| // |
| // Directories cannot be linked, to prevent reference cycles. |
| // |
| // `src` and `dst` must be valid node names. |
| // See [`fuchsia.io2/Name`] for what constitutes a valid name. |
| // |
| // This method requires the following rights on both the current |
| // connection, and the connection identified by `dst_parent_token`: |
| // |
| // * [`Rights.ENUMERATE`] |
| // * [`Rights.MODIFY_DIRECTORY`] |
| // |
| // * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid. |
| // * error `ZX_ERR_INVALID_ARGS` if `src` is a directory. |
| Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryLinkResult, error) |
| // Watches a directory, monitoring events for children being added or |
| // removed on the server end of the `watcher` channel. |
| // |
| // Mask specifies a bit mask of events to observe. |
| // |
| // This method requires the [`Rights.ENUMERATE`] right. If this right is |
| // absent, `watcher` will be closed with a `ZX_ERR_ACCESS_DENIED` epitaph. |
| Watch(ctx_ _bindings.Context, mask DirectoryWatchMask, options DirectoryWatchOptions, watcher DirectoryWatcherWithCtxInterfaceRequest) error |
| } |
| |
| type DirectoryWithCtxTransitionalBase struct{} |
| |
| func (_ *DirectoryWithCtxTransitionalBase) Unlink2(ctx_ _bindings.Context, name string, options UnlinkOptions) (DirectoryUnlink2Result, error) { |
| panic("Not Implemented") |
| } |
| |
| type DirectoryWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewDirectoryWithCtxInterfaceRequest() (DirectoryWithCtxInterfaceRequest, *DirectoryWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return DirectoryWithCtxInterfaceRequest(req), (*DirectoryWithCtxInterface)(cli), err |
| } |
| |
| type DirectoryWithCtxStub struct { |
| Impl DirectoryWithCtx |
| } |
| |
| func (s_ *DirectoryWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case DirectoryReopenOrdinal: |
| in_ := directoryWithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest) |
| return nil, false, err_ |
| case DirectoryCloseOrdinal: |
| err_ := s_.Impl.Close(args_.Ctx) |
| return nil, false, err_ |
| case DirectoryDescribeOrdinal: |
| in_ := directoryWithCtxDescribeRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query) |
| out_ := directoryWithCtxDescribeResponse{} |
| out_.Info = info |
| return &out_, true, err_ |
| case DirectoryGetTokenOrdinal: |
| result, err_ := s_.Impl.GetToken(args_.Ctx) |
| out_ := directoryWithCtxGetTokenResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DirectoryGetAttributesOrdinal: |
| in_ := directoryWithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query) |
| out_ := directoryWithCtxGetAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DirectoryUpdateAttributesOrdinal: |
| in_ := directoryWithCtxUpdateAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes) |
| out_ := directoryWithCtxUpdateAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DirectorySyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := directoryWithCtxSyncResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DirectoryOpenOrdinal: |
| in_ := directoryWithCtxOpenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Open(args_.Ctx, in_.Path, in_.Mode, in_.Options, in_.ObjectRequest) |
| return nil, false, err_ |
| case DirectoryAddInotifyFilterOrdinal: |
| in_ := directoryWithCtxAddInotifyFilterRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.AddInotifyFilter(args_.Ctx, in_.Path, in_.Filter, in_.WatchDescriptor, in_.Socket) |
| return nil, true, err_ |
| case DirectoryUnlinkOrdinal: |
| in_ := directoryWithCtxUnlinkRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Unlink(args_.Ctx, in_.Path) |
| out_ := directoryWithCtxUnlinkResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DirectoryUnlink2Ordinal: |
| in_ := directoryWithCtxUnlink2Request{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Unlink2(args_.Ctx, in_.Name, in_.Options) |
| out_ := directoryWithCtxUnlink2Response{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DirectoryEnumerateOrdinal: |
| in_ := directoryWithCtxEnumerateRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Enumerate(args_.Ctx, in_.Options, in_.Iterator) |
| return nil, false, err_ |
| case DirectoryRenameOrdinal: |
| in_ := directoryWithCtxRenameRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Rename(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst) |
| out_ := directoryWithCtxRenameResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DirectoryLinkOrdinal: |
| in_ := directoryWithCtxLinkRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Link(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst) |
| out_ := directoryWithCtxLinkResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case DirectoryWatchOrdinal: |
| in_ := directoryWithCtxWatchRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Watch(args_.Ctx, in_.Mask, in_.Options, in_.Watcher) |
| return nil, false, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type DirectoryEventProxy _bindings.ChannelProxy |
| |
| func (p *DirectoryEventProxy) OnConnectionInfo(info ConnectionInfo) error { |
| event_ := &directoryWithCtxOnConnectionInfoResponse{ |
| Info: info, |
| } |
| return ((*_bindings.ChannelProxy)(p)).Send(DirectoryOnConnectionInfoOrdinal, event_) |
| } |
| |
| const ( |
| DirectoryIteratorGetNextOrdinal uint64 = 0x5d2068db7393845c |
| ) |
| |
| type DirectoryIteratorWithCtxInterface _bindings.ChannelProxy |
| |
| // Reads a collection of variably sized directory entries into a buffer. |
| // |
| // The number of entries in a directory may be very large: akin to |
| // calling read multiple times on a file, directories have a seek |
| // offset which is updated on subsequent calls to `Enumerate`. |
| // The caller should always use a receiving buffer size as large as the |
| // maximum channel limit. |
| // |
| // When the end of iteration is reached, the returned `entries` vector |
| // will be empty. |
| // |
| // This method does not require any rights, as the rights are checked |
| // in the [`Directory.Enumerate`] call. |
| func (p *DirectoryIteratorWithCtxInterface) GetNext(ctx_ _bindings.Context) (DirectoryIteratorGetNextResult, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryIteratorWithCtxGetNextResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryIteratorGetNextOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| type DirectoryIteratorWithCtx interface { |
| // Reads a collection of variably sized directory entries into a buffer. |
| // |
| // The number of entries in a directory may be very large: akin to |
| // calling read multiple times on a file, directories have a seek |
| // offset which is updated on subsequent calls to `Enumerate`. |
| // The caller should always use a receiving buffer size as large as the |
| // maximum channel limit. |
| // |
| // When the end of iteration is reached, the returned `entries` vector |
| // will be empty. |
| // |
| // This method does not require any rights, as the rights are checked |
| // in the [`Directory.Enumerate`] call. |
| GetNext(ctx_ _bindings.Context) (DirectoryIteratorGetNextResult, error) |
| } |
| |
| type DirectoryIteratorWithCtxTransitionalBase struct{} |
| |
| type DirectoryIteratorWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewDirectoryIteratorWithCtxInterfaceRequest() (DirectoryIteratorWithCtxInterfaceRequest, *DirectoryIteratorWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return DirectoryIteratorWithCtxInterfaceRequest(req), (*DirectoryIteratorWithCtxInterface)(cli), err |
| } |
| |
| type DirectoryIteratorWithCtxStub struct { |
| Impl DirectoryIteratorWithCtx |
| } |
| |
| func (s_ *DirectoryIteratorWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case DirectoryIteratorGetNextOrdinal: |
| result, err_ := s_.Impl.GetNext(args_.Ctx) |
| out_ := directoryIteratorWithCtxGetNextResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type DirectoryIteratorEventProxy _bindings.ChannelProxy |
| |
| const ( |
| DirectoryWatcherGetNextOrdinal uint64 = 0x74de3b9a6548cb77 |
| ) |
| |
| type DirectoryWatcherWithCtxInterface _bindings.ChannelProxy |
| |
| // A hanging get to obtain the next batch of events. |
| // |
| // The caller should always use a receiving buffer size as large as the |
| // maximum channel limit. |
| // |
| // Clients should attempt to maintain one in-flight `GetNext` call as much |
| // as possible. If `GetNext` is not constantly polled, the filesystem |
| // server might hit an upper limit on the number of buffered events, |
| // resulting in dropping. Should this happen, the connection will be closed |
| // with a `ZX_ERR_IO_OVERRUN` epitaph. |
| // |
| // When the watched directory is deleted, this connection will be closed |
| // with a `ZX_ERR_UNAVAILABLE` epitaph. |
| // When the filesystem server is dying, this connection will be closed |
| // with a `ZX_ERR_PEER_CLOSED` epitaph. |
| func (p *DirectoryWatcherWithCtxInterface) GetNext(ctx_ _bindings.Context) ([]DirectoryWatchedEvent, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWatcherWithCtxGetNextResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryWatcherGetNextOrdinal, req_, resp_) |
| return resp_.Events, err_ |
| } |
| |
| // DirectoryWatcher transmits messages from a filesystem server about |
| // events happening in the filesystem. Clients can register new watchers |
| // using the [`fuchsia.io2/Directory.Watch`] method, where they can |
| // filter which events they want to receive notifications for. |
| type DirectoryWatcherWithCtx interface { |
| // A hanging get to obtain the next batch of events. |
| // |
| // The caller should always use a receiving buffer size as large as the |
| // maximum channel limit. |
| // |
| // Clients should attempt to maintain one in-flight `GetNext` call as much |
| // as possible. If `GetNext` is not constantly polled, the filesystem |
| // server might hit an upper limit on the number of buffered events, |
| // resulting in dropping. Should this happen, the connection will be closed |
| // with a `ZX_ERR_IO_OVERRUN` epitaph. |
| // |
| // When the watched directory is deleted, this connection will be closed |
| // with a `ZX_ERR_UNAVAILABLE` epitaph. |
| // When the filesystem server is dying, this connection will be closed |
| // with a `ZX_ERR_PEER_CLOSED` epitaph. |
| GetNext(ctx_ _bindings.Context) ([]DirectoryWatchedEvent, error) |
| } |
| |
| type DirectoryWatcherWithCtxTransitionalBase struct{} |
| |
| type DirectoryWatcherWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewDirectoryWatcherWithCtxInterfaceRequest() (DirectoryWatcherWithCtxInterfaceRequest, *DirectoryWatcherWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return DirectoryWatcherWithCtxInterfaceRequest(req), (*DirectoryWatcherWithCtxInterface)(cli), err |
| } |
| |
| type DirectoryWatcherWithCtxStub struct { |
| Impl DirectoryWatcherWithCtx |
| } |
| |
| func (s_ *DirectoryWatcherWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case DirectoryWatcherGetNextOrdinal: |
| events, err_ := s_.Impl.GetNext(args_.Ctx) |
| out_ := directoryWatcherWithCtxGetNextResponse{} |
| out_.Events = events |
| return &out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type DirectoryWatcherEventProxy _bindings.ChannelProxy |
| |
| const ( |
| FileReopenOrdinal uint64 = 0x74170eb73121c69f |
| FileCloseOrdinal uint64 = 0x2dec2818386e5d68 |
| FileDescribeOrdinal uint64 = 0x4aac591060c65c2f |
| FileOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437 |
| FileGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4 |
| FileGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4 |
| FileUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5 |
| FileSyncOrdinal uint64 = 0xac3a8c1a2e063ad |
| FileAdvisoryLockOrdinal uint64 = 0x6358e94c468026fa |
| FileSeekOrdinal uint64 = 0x6cd7bdfcc294f64e |
| FileReadOrdinal uint64 = 0x6ab0b2e9f1e01f70 |
| FileWriteOrdinal uint64 = 0x17872fc3d6725e01 |
| FileReadAtOrdinal uint64 = 0x774898cce31c78aa |
| FileWriteAtOrdinal uint64 = 0x7b2af74fa0191292 |
| FileResizeOrdinal uint64 = 0x57e9585fedaeaa1c |
| FileGetMemRangeOrdinal uint64 = 0x53842973559bd6ab |
| ) |
| |
| type FileWithCtxInterface _bindings.ChannelProxy |
| |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| func (p *FileWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error { |
| req_ := &fileWithCtxReopenRequest{ |
| Options: options, |
| ObjectRequest: objectRequest, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(FileReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| func (p *FileWithCtxInterface) Close(ctx_ _bindings.Context) error { |
| var req_ _bindings.Message |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(FileCloseOrdinal, req_) |
| return err_ |
| } |
| |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| func (p *FileWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) { |
| req_ := &fileWithCtxDescribeRequest{ |
| Query: query, |
| } |
| resp_ := &fileWithCtxDescribeResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileDescribeOrdinal, req_, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| func (p *FileWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| resp_ := &fileWithCtxOnConnectionInfoResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(FileOnConnectionInfoOrdinal, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| func (p *FileWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) { |
| var req_ _bindings.Message |
| resp_ := &fileWithCtxGetTokenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetTokenOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| func (p *FileWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) { |
| req_ := &fileWithCtxGetAttributesRequest{ |
| Query: query, |
| } |
| resp_ := &fileWithCtxGetAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| func (p *FileWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) { |
| req_ := &fileWithCtxUpdateAttributesRequest{ |
| Attributes: attributes, |
| } |
| resp_ := &fileWithCtxUpdateAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileUpdateAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| func (p *FileWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &fileWithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSyncOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Acquires an advisory lock on the underlying file. |
| // |
| // The lock lasts until either this connection is closed or |
| // this method is called with |AdvisoryLockType.UNLOCK| to release the lock |
| // explicitly. |
| // |
| // Advisory locks are purely advisory. They do not prevent actual read or |
| // write operations from occurring on the file, either through this |
| // connection or through other connections. |
| // |
| // This method requires the following rights: |
| // |
| // * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`]. |
| // * [`Rights.WRITE_BYTES`] if `request.type` is |
| // [`AdvisoryLockType.WRITE`]. |
| // |
| // # Errors |
| // |
| // * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For |
| // example, another connection might hold a conflicting lock type. |
| // * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking. |
| // * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights |
| // to acquire the given type of lock. |
| func (p *FileWithCtxInterface) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) { |
| req_ := &fileWithCtxAdvisoryLockRequest{ |
| Request: request, |
| } |
| resp_ := &fileWithCtxAdvisoryLockResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileAdvisoryLockOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Moves the offset at which the next invocation of [`Read`] or [`Write`] |
| // will occur. The seek offset is specific to each file connection. |
| // |
| // + request `origin` the reference point where `offset` will be based on. |
| // + request `offset` the number of bytes to seek. |
| // - response `offset_from_start` the adjusted seek offset, from the start |
| // of the file. |
| // |
| // This method does not require any rights. |
| func (p *FileWithCtxInterface) Seek(ctx_ _bindings.Context, origin SeekOrigin, offset int64) (FileSeekResult, error) { |
| req_ := &fileWithCtxSeekRequest{ |
| Origin: origin, |
| Offset: offset, |
| } |
| resp_ := &fileWithCtxSeekResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSeekOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Reads up to 'count' bytes at the seek offset. |
| // The seek offset is moved forward by the number of bytes read. |
| // |
| // ## Invariants |
| // |
| // * The returned `data.length` will never be greater than `count`. |
| // * If `data.length` is less than `count`, it means that the seek offset |
| // has reached the end of file as part of this operation. |
| // * If `data.length` is zero while `count` is not, it means that the |
| // seek offset is already at or beyond the end of file, and no data could |
| // be read. |
| // * If `count` is zero, the server should perform all the checks ensuring |
| // read access without actually read anything, and return an empty |
| // `data` vector. |
| // |
| // This method requires the [`Rights.READ_BYTES`] right. |
| func (p *FileWithCtxInterface) Read(ctx_ _bindings.Context, count uint64) (FileReadResult, error) { |
| req_ := &fileWithCtxReadRequest{ |
| Count: count, |
| } |
| resp_ := &fileWithCtxReadResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileReadOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Writes data at the seek offset. |
| // The seek offset is moved forward by the number of bytes written. |
| // If the file is in append mode, the seek offset is first set to the end |
| // of the file, followed by the write, in one atomic step. |
| // |
| // The file size may grow if the seek offset plus `data.length` is beyond |
| // the current end of file. |
| // |
| // + request `data` the byte buffer to write to the file. |
| // - response `actual_count` the number of bytes written. |
| // |
| // ## Invariants |
| // |
| // * The returned `actual_count` will never be greater than `data.length`. |
| // * If the server is unable to write all the data due to e.g. not enough |
| // space, `actual_count` may be less than `data.length`. |
| // * If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file. The seek offset |
| // is still updated if in append mode. |
| // |
| // This method requires the [`Rights.WRITE_BYTES`] right. |
| func (p *FileWithCtxInterface) Write(ctx_ _bindings.Context, data []uint8) (FileWriteResult, error) { |
| req_ := &fileWithCtxWriteRequest{ |
| Data: data, |
| } |
| resp_ := &fileWithCtxWriteResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileWriteOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Reads up to 'count' bytes at the provided offset. |
| // Does not affect the seek offset. |
| // |
| // ## Invariants |
| // |
| // * The returned `data.length` will never be greater than `count`. |
| // * If `data.length` is less than `count`, it means that `ReadAt` has hit |
| // the end of file as part of this operation. |
| // * If `data.length` is zero while `count` is not, it means that `offset` |
| // is at or past the end of file, and no data can be read. |
| // * If `count` is zero, the server should perform all the checks ensuring |
| // read access without actually reading anything, and return an empty |
| // `data` vector. |
| // |
| // This method requires the [`Rights.READ_BYTES`] right. |
| func (p *FileWithCtxInterface) ReadAt(ctx_ _bindings.Context, count uint64, offset uint64) (FileReadAtResult, error) { |
| req_ := &fileWithCtxReadAtRequest{ |
| Count: count, |
| Offset: offset, |
| } |
| resp_ := &fileWithCtxReadAtResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileReadAtOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Writes data at the provided offset. |
| // Does not affect the seek offset. |
| // |
| // The file size may grow if `offset` plus `data.length` is past the |
| // current end of file. |
| // |
| // + request `data` the byte buffer to write to the file. |
| // + request `offset` the offset from start of the file to begin writing. |
| // - response `actual_count` the number of bytes written. |
| // |
| // ## Invariants |
| // |
| // * The returned `actual_count` will never be greater than `data.length`. |
| // * If the server is unable to write all the data due to e.g. not enough |
| // space, `actual_count` may be less than `data.length`. |
| // * If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file. |
| // |
| // This method requires the [`Rights.WRITE_BYTES`] right. |
| func (p *FileWithCtxInterface) WriteAt(ctx_ _bindings.Context, data []uint8, offset uint64) (FileWriteAtResult, error) { |
| req_ := &fileWithCtxWriteAtRequest{ |
| Data: data, |
| Offset: offset, |
| } |
| resp_ := &fileWithCtxWriteAtResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileWriteAtOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Shrinks or grows the file size to 'length' bytes. |
| // |
| // If file size is reduced by this operation, the extra trailing data' |
| // is discarded. |
| // If file size is increased by this operation, the extended area appears |
| // as if it was zeroed. |
| // |
| // This method requires the [`Rights.WRITE_BYTES`] right. |
| func (p *FileWithCtxInterface) Resize(ctx_ _bindings.Context, length uint64) (FileResizeResult, error) { |
| req_ := &fileWithCtxResizeRequest{ |
| Length: length, |
| } |
| resp_ := &fileWithCtxResizeResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileResizeOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Acquires a [`fuchsia.mem/Range`] representing this file, if |
| // there is one, with the requested access rights. |
| // |
| // + request `flags` a [`VmoFlags`] indicating the desired mode of access. |
| // - response `buffer` the requested [`fuchsia.mem/Range`]. |
| // * error a [`zx.status`] value indicating the failure. |
| // |
| // This method requires the following rights: |
| // |
| // * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`]. |
| // * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`]. |
| // * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`]. |
| func (p *FileWithCtxInterface) GetMemRange(ctx_ _bindings.Context, flags VmoFlags) (FileGetMemRangeResult, error) { |
| req_ := &fileWithCtxGetMemRangeRequest{ |
| Flags: flags, |
| } |
| resp_ := &fileWithCtxGetMemRangeResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetMemRangeOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // A [`fuchsia.io2/Node`] which contains a sequence of bytes of definite |
| // length. |
| type FileWithCtx interface { |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| Close(ctx_ _bindings.Context) error |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| Sync(ctx_ _bindings.Context) (NodeSyncResult, error) |
| // Acquires an advisory lock on the underlying file. |
| // |
| // The lock lasts until either this connection is closed or |
| // this method is called with |AdvisoryLockType.UNLOCK| to release the lock |
| // explicitly. |
| // |
| // Advisory locks are purely advisory. They do not prevent actual read or |
| // write operations from occurring on the file, either through this |
| // connection or through other connections. |
| // |
| // This method requires the following rights: |
| // |
| // * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`]. |
| // * [`Rights.WRITE_BYTES`] if `request.type` is |
| // [`AdvisoryLockType.WRITE`]. |
| // |
| // # Errors |
| // |
| // * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For |
| // example, another connection might hold a conflicting lock type. |
| // * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking. |
| // * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights |
| // to acquire the given type of lock. |
| AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) |
| // Moves the offset at which the next invocation of [`Read`] or [`Write`] |
| // will occur. The seek offset is specific to each file connection. |
| // |
| // + request `origin` the reference point where `offset` will be based on. |
| // + request `offset` the number of bytes to seek. |
| // - response `offset_from_start` the adjusted seek offset, from the start |
| // of the file. |
| // |
| // This method does not require any rights. |
| Seek(ctx_ _bindings.Context, origin SeekOrigin, offset int64) (FileSeekResult, error) |
| // Reads up to 'count' bytes at the seek offset. |
| // The seek offset is moved forward by the number of bytes read. |
| // |
| // ## Invariants |
| // |
| // * The returned `data.length` will never be greater than `count`. |
| // * If `data.length` is less than `count`, it means that the seek offset |
| // has reached the end of file as part of this operation. |
| // * If `data.length` is zero while `count` is not, it means that the |
| // seek offset is already at or beyond the end of file, and no data could |
| // be read. |
| // * If `count` is zero, the server should perform all the checks ensuring |
| // read access without actually read anything, and return an empty |
| // `data` vector. |
| // |
| // This method requires the [`Rights.READ_BYTES`] right. |
| Read(ctx_ _bindings.Context, count uint64) (FileReadResult, error) |
| // Writes data at the seek offset. |
| // The seek offset is moved forward by the number of bytes written. |
| // If the file is in append mode, the seek offset is first set to the end |
| // of the file, followed by the write, in one atomic step. |
| // |
| // The file size may grow if the seek offset plus `data.length` is beyond |
| // the current end of file. |
| // |
| // + request `data` the byte buffer to write to the file. |
| // - response `actual_count` the number of bytes written. |
| // |
| // ## Invariants |
| // |
| // * The returned `actual_count` will never be greater than `data.length`. |
| // * If the server is unable to write all the data due to e.g. not enough |
| // space, `actual_count` may be less than `data.length`. |
| // * If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file. The seek offset |
| // is still updated if in append mode. |
| // |
| // This method requires the [`Rights.WRITE_BYTES`] right. |
| Write(ctx_ _bindings.Context, data []uint8) (FileWriteResult, error) |
| // Reads up to 'count' bytes at the provided offset. |
| // Does not affect the seek offset. |
| // |
| // ## Invariants |
| // |
| // * The returned `data.length` will never be greater than `count`. |
| // * If `data.length` is less than `count`, it means that `ReadAt` has hit |
| // the end of file as part of this operation. |
| // * If `data.length` is zero while `count` is not, it means that `offset` |
| // is at or past the end of file, and no data can be read. |
| // * If `count` is zero, the server should perform all the checks ensuring |
| // read access without actually reading anything, and return an empty |
| // `data` vector. |
| // |
| // This method requires the [`Rights.READ_BYTES`] right. |
| ReadAt(ctx_ _bindings.Context, count uint64, offset uint64) (FileReadAtResult, error) |
| // Writes data at the provided offset. |
| // Does not affect the seek offset. |
| // |
| // The file size may grow if `offset` plus `data.length` is past the |
| // current end of file. |
| // |
| // + request `data` the byte buffer to write to the file. |
| // + request `offset` the offset from start of the file to begin writing. |
| // - response `actual_count` the number of bytes written. |
| // |
| // ## Invariants |
| // |
| // * The returned `actual_count` will never be greater than `data.length`. |
| // * If the server is unable to write all the data due to e.g. not enough |
| // space, `actual_count` may be less than `data.length`. |
| // * If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file. |
| // |
| // This method requires the [`Rights.WRITE_BYTES`] right. |
| WriteAt(ctx_ _bindings.Context, data []uint8, offset uint64) (FileWriteAtResult, error) |
| // Shrinks or grows the file size to 'length' bytes. |
| // |
| // If file size is reduced by this operation, the extra trailing data' |
| // is discarded. |
| // If file size is increased by this operation, the extended area appears |
| // as if it was zeroed. |
| // |
| // This method requires the [`Rights.WRITE_BYTES`] right. |
| Resize(ctx_ _bindings.Context, length uint64) (FileResizeResult, error) |
| // Acquires a [`fuchsia.mem/Range`] representing this file, if |
| // there is one, with the requested access rights. |
| // |
| // + request `flags` a [`VmoFlags`] indicating the desired mode of access. |
| // - response `buffer` the requested [`fuchsia.mem/Range`]. |
| // * error a [`zx.status`] value indicating the failure. |
| // |
| // This method requires the following rights: |
| // |
| // * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`]. |
| // * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`]. |
| // * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`]. |
| GetMemRange(ctx_ _bindings.Context, flags VmoFlags) (FileGetMemRangeResult, error) |
| } |
| |
| type FileWithCtxTransitionalBase struct{} |
| |
| func (_ *FileWithCtxTransitionalBase) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) { |
| panic("Not Implemented") |
| } |
| |
| type FileWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewFileWithCtxInterfaceRequest() (FileWithCtxInterfaceRequest, *FileWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return FileWithCtxInterfaceRequest(req), (*FileWithCtxInterface)(cli), err |
| } |
| |
| type FileWithCtxStub struct { |
| Impl FileWithCtx |
| } |
| |
| func (s_ *FileWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case FileReopenOrdinal: |
| in_ := fileWithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest) |
| return nil, false, err_ |
| case FileCloseOrdinal: |
| err_ := s_.Impl.Close(args_.Ctx) |
| return nil, false, err_ |
| case FileDescribeOrdinal: |
| in_ := fileWithCtxDescribeRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query) |
| out_ := fileWithCtxDescribeResponse{} |
| out_.Info = info |
| return &out_, true, err_ |
| case FileGetTokenOrdinal: |
| result, err_ := s_.Impl.GetToken(args_.Ctx) |
| out_ := fileWithCtxGetTokenResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileGetAttributesOrdinal: |
| in_ := fileWithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query) |
| out_ := fileWithCtxGetAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileUpdateAttributesOrdinal: |
| in_ := fileWithCtxUpdateAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes) |
| out_ := fileWithCtxUpdateAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileSyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := fileWithCtxSyncResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileAdvisoryLockOrdinal: |
| in_ := fileWithCtxAdvisoryLockRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, in_.Request) |
| out_ := fileWithCtxAdvisoryLockResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileSeekOrdinal: |
| in_ := fileWithCtxSeekRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Seek(args_.Ctx, in_.Origin, in_.Offset) |
| out_ := fileWithCtxSeekResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileReadOrdinal: |
| in_ := fileWithCtxReadRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Read(args_.Ctx, in_.Count) |
| out_ := fileWithCtxReadResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileWriteOrdinal: |
| in_ := fileWithCtxWriteRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Write(args_.Ctx, in_.Data) |
| out_ := fileWithCtxWriteResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileReadAtOrdinal: |
| in_ := fileWithCtxReadAtRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.ReadAt(args_.Ctx, in_.Count, in_.Offset) |
| out_ := fileWithCtxReadAtResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileWriteAtOrdinal: |
| in_ := fileWithCtxWriteAtRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.WriteAt(args_.Ctx, in_.Data, in_.Offset) |
| out_ := fileWithCtxWriteAtResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileResizeOrdinal: |
| in_ := fileWithCtxResizeRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Resize(args_.Ctx, in_.Length) |
| out_ := fileWithCtxResizeResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case FileGetMemRangeOrdinal: |
| in_ := fileWithCtxGetMemRangeRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetMemRange(args_.Ctx, in_.Flags) |
| out_ := fileWithCtxGetMemRangeResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type FileEventProxy _bindings.ChannelProxy |
| |
| func (p *FileEventProxy) OnConnectionInfo(info ConnectionInfo) error { |
| event_ := &fileWithCtxOnConnectionInfoResponse{ |
| Info: info, |
| } |
| return ((*_bindings.ChannelProxy)(p)).Send(FileOnConnectionInfoOrdinal, event_) |
| } |
| |
| type InotifierWithCtxInterface _bindings.ChannelProxy |
| |
| // Inotifier implements the linux Inotify functionality. |
| // It provides a mechanism for monitoring filesystem |
| // events. Inotify can be used to monitor individual files, or to |
| // monitor directories. When a directory is monitored, inotify will |
| // return events for the directory itself, and for files inside the |
| // directory. |
| type InotifierWithCtx interface { |
| } |
| |
| type InotifierWithCtxTransitionalBase struct{} |
| |
| type InotifierWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewInotifierWithCtxInterfaceRequest() (InotifierWithCtxInterfaceRequest, *InotifierWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return InotifierWithCtxInterfaceRequest(req), (*InotifierWithCtxInterface)(cli), err |
| } |
| |
| type InotifierWithCtxStub struct { |
| Impl InotifierWithCtx |
| } |
| |
| func (s_ *InotifierWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type InotifierEventProxy _bindings.ChannelProxy |
| |
| const ( |
| AdvisoryLockingAdvisoryLockOrdinal uint64 = 0x6358e94c468026fa |
| ) |
| |
| type AdvisoryLockingWithCtxInterface _bindings.ChannelProxy |
| |
| // Acquires an advisory lock on the underlying file. |
| // |
| // The lock lasts until either this connection is closed or |
| // this method is called with |AdvisoryLockType.UNLOCK| to release the lock |
| // explicitly. |
| // |
| // Advisory locks are purely advisory. They do not prevent actual read or |
| // write operations from occurring on the file, either through this |
| // connection or through other connections. |
| // |
| // This method requires the following rights: |
| // |
| // * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`]. |
| // * [`Rights.WRITE_BYTES`] if `request.type` is |
| // [`AdvisoryLockType.WRITE`]. |
| // |
| // # Errors |
| // |
| // * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For |
| // example, another connection might hold a conflicting lock type. |
| // * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking. |
| // * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights |
| // to acquire the given type of lock. |
| func (p *AdvisoryLockingWithCtxInterface) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) { |
| req_ := &advisoryLockingWithCtxAdvisoryLockRequest{ |
| Request: request, |
| } |
| resp_ := &advisoryLockingWithCtxAdvisoryLockResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(AdvisoryLockingAdvisoryLockOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Advisory locking protocol. |
| // |
| // This protocol is intended to be composed into the |File| protocol to |
| // provide support for advisory locking. |
| // |
| // Advisory locks are purely advisory. They do not prevent actual read or |
| // write operations from occurring on the file, either through this |
| // connection or through other connections. |
| // |
| // These primitives are designed to support the flock() and fcntl(), |
| // specifically F_SETLK, F_SETLKW, and F_GETLK, functionality that code |
| // running on Fuchsia expects from other operating systems. |
| type AdvisoryLockingWithCtx interface { |
| // Acquires an advisory lock on the underlying file. |
| // |
| // The lock lasts until either this connection is closed or |
| // this method is called with |AdvisoryLockType.UNLOCK| to release the lock |
| // explicitly. |
| // |
| // Advisory locks are purely advisory. They do not prevent actual read or |
| // write operations from occurring on the file, either through this |
| // connection or through other connections. |
| // |
| // This method requires the following rights: |
| // |
| // * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`]. |
| // * [`Rights.WRITE_BYTES`] if `request.type` is |
| // [`AdvisoryLockType.WRITE`]. |
| // |
| // # Errors |
| // |
| // * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For |
| // example, another connection might hold a conflicting lock type. |
| // * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking. |
| // * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights |
| // to acquire the given type of lock. |
| AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) |
| } |
| |
| type AdvisoryLockingWithCtxTransitionalBase struct{} |
| |
| func (_ *AdvisoryLockingWithCtxTransitionalBase) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) { |
| panic("Not Implemented") |
| } |
| |
| type AdvisoryLockingWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewAdvisoryLockingWithCtxInterfaceRequest() (AdvisoryLockingWithCtxInterfaceRequest, *AdvisoryLockingWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return AdvisoryLockingWithCtxInterfaceRequest(req), (*AdvisoryLockingWithCtxInterface)(cli), err |
| } |
| |
| type AdvisoryLockingWithCtxStub struct { |
| Impl AdvisoryLockingWithCtx |
| } |
| |
| func (s_ *AdvisoryLockingWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case AdvisoryLockingAdvisoryLockOrdinal: |
| in_ := advisoryLockingWithCtxAdvisoryLockRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, in_.Request) |
| out_ := advisoryLockingWithCtxAdvisoryLockResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type AdvisoryLockingEventProxy _bindings.ChannelProxy |
| |
| const ( |
| MemoryReopenOrdinal uint64 = 0x74170eb73121c69f |
| MemoryCloseOrdinal uint64 = 0x2dec2818386e5d68 |
| MemoryDescribeOrdinal uint64 = 0x4aac591060c65c2f |
| MemoryOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437 |
| MemoryGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4 |
| MemoryGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4 |
| MemoryUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5 |
| MemorySyncOrdinal uint64 = 0xac3a8c1a2e063ad |
| ) |
| |
| type MemoryWithCtxInterface _bindings.ChannelProxy |
| |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| func (p *MemoryWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error { |
| req_ := &memoryWithCtxReopenRequest{ |
| Options: options, |
| ObjectRequest: objectRequest, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(MemoryReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| func (p *MemoryWithCtxInterface) Close(ctx_ _bindings.Context) error { |
| var req_ _bindings.Message |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(MemoryCloseOrdinal, req_) |
| return err_ |
| } |
| |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| func (p *MemoryWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) { |
| req_ := &memoryWithCtxDescribeRequest{ |
| Query: query, |
| } |
| resp_ := &memoryWithCtxDescribeResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(MemoryDescribeOrdinal, req_, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| func (p *MemoryWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| resp_ := &memoryWithCtxOnConnectionInfoResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(MemoryOnConnectionInfoOrdinal, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| func (p *MemoryWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) { |
| var req_ _bindings.Message |
| resp_ := &memoryWithCtxGetTokenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(MemoryGetTokenOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| func (p *MemoryWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) { |
| req_ := &memoryWithCtxGetAttributesRequest{ |
| Query: query, |
| } |
| resp_ := &memoryWithCtxGetAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(MemoryGetAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| func (p *MemoryWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) { |
| req_ := &memoryWithCtxUpdateAttributesRequest{ |
| Attributes: attributes, |
| } |
| resp_ := &memoryWithCtxUpdateAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(MemoryUpdateAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| func (p *MemoryWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &memoryWithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(MemorySyncOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // A file-like node backed by a VMO. |
| // No memory-specific methods are provided by this protocol. |
| // The client should access it via the the [`MemoryInfo.buffer`] object in |
| // [`fuchsia.io2/Representation`]. |
| type MemoryWithCtx interface { |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| Close(ctx_ _bindings.Context) error |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| Sync(ctx_ _bindings.Context) (NodeSyncResult, error) |
| } |
| |
| type MemoryWithCtxTransitionalBase struct{} |
| |
| type MemoryWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewMemoryWithCtxInterfaceRequest() (MemoryWithCtxInterfaceRequest, *MemoryWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return MemoryWithCtxInterfaceRequest(req), (*MemoryWithCtxInterface)(cli), err |
| } |
| |
| type MemoryWithCtxStub struct { |
| Impl MemoryWithCtx |
| } |
| |
| func (s_ *MemoryWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case MemoryReopenOrdinal: |
| in_ := memoryWithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest) |
| return nil, false, err_ |
| case MemoryCloseOrdinal: |
| err_ := s_.Impl.Close(args_.Ctx) |
| return nil, false, err_ |
| case MemoryDescribeOrdinal: |
| in_ := memoryWithCtxDescribeRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query) |
| out_ := memoryWithCtxDescribeResponse{} |
| out_.Info = info |
| return &out_, true, err_ |
| case MemoryGetTokenOrdinal: |
| result, err_ := s_.Impl.GetToken(args_.Ctx) |
| out_ := memoryWithCtxGetTokenResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case MemoryGetAttributesOrdinal: |
| in_ := memoryWithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query) |
| out_ := memoryWithCtxGetAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case MemoryUpdateAttributesOrdinal: |
| in_ := memoryWithCtxUpdateAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes) |
| out_ := memoryWithCtxUpdateAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case MemorySyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := memoryWithCtxSyncResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type MemoryEventProxy _bindings.ChannelProxy |
| |
| func (p *MemoryEventProxy) OnConnectionInfo(info ConnectionInfo) error { |
| event_ := &memoryWithCtxOnConnectionInfoResponse{ |
| Info: info, |
| } |
| return ((*_bindings.ChannelProxy)(p)).Send(MemoryOnConnectionInfoOrdinal, event_) |
| } |
| |
| const ( |
| NodeReopenOrdinal uint64 = 0x74170eb73121c69f |
| NodeCloseOrdinal uint64 = 0x2dec2818386e5d68 |
| NodeDescribeOrdinal uint64 = 0x4aac591060c65c2f |
| NodeOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437 |
| NodeGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4 |
| NodeGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4 |
| NodeUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5 |
| NodeSyncOrdinal uint64 = 0xac3a8c1a2e063ad |
| ) |
| |
| type NodeWithCtxInterface _bindings.ChannelProxy |
| |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| func (p *NodeWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error { |
| req_ := &nodeWithCtxReopenRequest{ |
| Options: options, |
| ObjectRequest: objectRequest, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(NodeReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| func (p *NodeWithCtxInterface) Close(ctx_ _bindings.Context) error { |
| var req_ _bindings.Message |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(NodeCloseOrdinal, req_) |
| return err_ |
| } |
| |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| func (p *NodeWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) { |
| req_ := &nodeWithCtxDescribeRequest{ |
| Query: query, |
| } |
| resp_ := &nodeWithCtxDescribeResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeDescribeOrdinal, req_, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| func (p *NodeWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| resp_ := &nodeWithCtxOnConnectionInfoResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(NodeOnConnectionInfoOrdinal, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| func (p *NodeWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) { |
| var req_ _bindings.Message |
| resp_ := &nodeWithCtxGetTokenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeGetTokenOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| func (p *NodeWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) { |
| req_ := &nodeWithCtxGetAttributesRequest{ |
| Query: query, |
| } |
| resp_ := &nodeWithCtxGetAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeGetAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| func (p *NodeWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) { |
| req_ := &nodeWithCtxUpdateAttributesRequest{ |
| Attributes: attributes, |
| } |
| resp_ := &nodeWithCtxUpdateAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeUpdateAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| func (p *NodeWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &nodeWithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeSyncOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Node defines the minimal protocol for entities which can be accessed |
| // in a filesystem. |
| type NodeWithCtx interface { |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| Close(ctx_ _bindings.Context) error |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| Sync(ctx_ _bindings.Context) (NodeSyncResult, error) |
| } |
| |
| type NodeWithCtxTransitionalBase struct{} |
| |
| type NodeWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewNodeWithCtxInterfaceRequest() (NodeWithCtxInterfaceRequest, *NodeWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return NodeWithCtxInterfaceRequest(req), (*NodeWithCtxInterface)(cli), err |
| } |
| |
| type NodeWithCtxStub struct { |
| Impl NodeWithCtx |
| } |
| |
| func (s_ *NodeWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case NodeReopenOrdinal: |
| in_ := nodeWithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest) |
| return nil, false, err_ |
| case NodeCloseOrdinal: |
| err_ := s_.Impl.Close(args_.Ctx) |
| return nil, false, err_ |
| case NodeDescribeOrdinal: |
| in_ := nodeWithCtxDescribeRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query) |
| out_ := nodeWithCtxDescribeResponse{} |
| out_.Info = info |
| return &out_, true, err_ |
| case NodeGetTokenOrdinal: |
| result, err_ := s_.Impl.GetToken(args_.Ctx) |
| out_ := nodeWithCtxGetTokenResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case NodeGetAttributesOrdinal: |
| in_ := nodeWithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query) |
| out_ := nodeWithCtxGetAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case NodeUpdateAttributesOrdinal: |
| in_ := nodeWithCtxUpdateAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes) |
| out_ := nodeWithCtxUpdateAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case NodeSyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := nodeWithCtxSyncResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type NodeEventProxy _bindings.ChannelProxy |
| |
| func (p *NodeEventProxy) OnConnectionInfo(info ConnectionInfo) error { |
| event_ := &nodeWithCtxOnConnectionInfoResponse{ |
| Info: info, |
| } |
| return ((*_bindings.ChannelProxy)(p)).Send(NodeOnConnectionInfoOrdinal, event_) |
| } |
| |
| const ( |
| PipeReopenOrdinal uint64 = 0x74170eb73121c69f |
| PipeCloseOrdinal uint64 = 0x2dec2818386e5d68 |
| PipeDescribeOrdinal uint64 = 0x4aac591060c65c2f |
| PipeOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437 |
| PipeGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4 |
| PipeGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4 |
| PipeUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5 |
| PipeSyncOrdinal uint64 = 0xac3a8c1a2e063ad |
| ) |
| |
| type PipeWithCtxInterface _bindings.ChannelProxy |
| |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| func (p *PipeWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error { |
| req_ := &pipeWithCtxReopenRequest{ |
| Options: options, |
| ObjectRequest: objectRequest, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(PipeReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| func (p *PipeWithCtxInterface) Close(ctx_ _bindings.Context) error { |
| var req_ _bindings.Message |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(PipeCloseOrdinal, req_) |
| return err_ |
| } |
| |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| func (p *PipeWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) { |
| req_ := &pipeWithCtxDescribeRequest{ |
| Query: query, |
| } |
| resp_ := &pipeWithCtxDescribeResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeDescribeOrdinal, req_, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| func (p *PipeWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| resp_ := &pipeWithCtxOnConnectionInfoResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(PipeOnConnectionInfoOrdinal, resp_) |
| return resp_.Info, err_ |
| } |
| |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| func (p *PipeWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) { |
| var req_ _bindings.Message |
| resp_ := &pipeWithCtxGetTokenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeGetTokenOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| func (p *PipeWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) { |
| req_ := &pipeWithCtxGetAttributesRequest{ |
| Query: query, |
| } |
| resp_ := &pipeWithCtxGetAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeGetAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| func (p *PipeWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) { |
| req_ := &pipeWithCtxUpdateAttributesRequest{ |
| Attributes: attributes, |
| } |
| resp_ := &pipeWithCtxUpdateAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeUpdateAttributesOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| func (p *PipeWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &pipeWithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeSyncOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // A node for streaming unstructured data. |
| // No pipe-specific methods are provided by this protocol. The client should |
| // access the pipe via the socket object returned from the `PipeInfo` member |
| // in [`fuchsia.io2/Representation`]. |
| type PipeWithCtx interface { |
| // Creates another connection to the same node. |
| // |
| // + `options` options applicable to both `Open` and `Reopen`, |
| // including negotiating protocol and restricting rights. |
| // See [`fuchsia.io2/ConnectionOptions`]. |
| // + `object_request` is the server end of a channel created for the new |
| // connection. The caller may proceed to send messages on the |
| // corresponding client end right away. |
| // |
| // For files, the cloned connection and the original connection have |
| // independent seek offsets. |
| Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error |
| // Terminates the connection to the node. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // The result of `Close` arrives as an epitaph, where the channel is closed |
| // by the server upon processing this operation. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without monitoring the status epitaph. |
| // |
| // This method does not require any rights. |
| Close(ctx_ _bindings.Context) error |
| // Returns extra connection information and auxiliary handles. |
| // |
| // + `query` specifies the fields in `ConnectionInfo` that the caller is |
| // interested in. |
| // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // |
| // When all known bits in `query` are set, the return value matches |
| // the one from [`OnConnectionInfo`], as if the caller requested that event |
| // using [`ConnectionFlags.GET_CONNECTION_INFO`]. |
| // |
| // If the `Describe` operation fails, the connection is closed with the |
| // associated error. |
| // |
| // This method does not require any rights. |
| Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) |
| // An event produced eagerly by the server if requested by |
| // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the |
| // first message from the server, and is sent exactly once. |
| // |
| // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields. |
| // All members should be present. |
| // |
| // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is |
| // always manifested as an epitaph. |
| // Acquires a token which can be used to identify this connection at |
| // a later point in time. |
| // |
| // This method does not require any rights. Note that the token identifies |
| // the connection, hence carries the rights information on this connection. |
| GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) |
| // Acquires information about the node. |
| // |
| // The attributes of a node should be stable, independent of the |
| // specific protocol used to access it. |
| // |
| // + `query` a bit-mask specifying which attributes to fetch. The server |
| // should not return more than necessary. |
| // - `attributes` the returned attributes. |
| // |
| // This method requires the [`Rights.GET_ATTRIBUTES`] right. |
| GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) |
| // Updates information about the node. |
| // |
| // + `attributes` the presence of a table field in `attributes` indicates |
| // the intent to update the corresponding attribute. |
| // |
| // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right. |
| UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) |
| // Synchronizes updates to the node to the underlying media, if it exists. |
| // |
| // This method will return when the filesystem server has flushed the |
| // relevant updates to the underlying media, but does not guarantee the |
| // underlying media has persisted the information, nor that any information |
| // is committed to hardware. Clients may use `Sync` to ensure ordering |
| // between operations. |
| // |
| // This method does not require any rights. |
| Sync(ctx_ _bindings.Context) (NodeSyncResult, error) |
| } |
| |
| type PipeWithCtxTransitionalBase struct{} |
| |
| type PipeWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewPipeWithCtxInterfaceRequest() (PipeWithCtxInterfaceRequest, *PipeWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return PipeWithCtxInterfaceRequest(req), (*PipeWithCtxInterface)(cli), err |
| } |
| |
| type PipeWithCtxStub struct { |
| Impl PipeWithCtx |
| } |
| |
| func (s_ *PipeWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case PipeReopenOrdinal: |
| in_ := pipeWithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest) |
| return nil, false, err_ |
| case PipeCloseOrdinal: |
| err_ := s_.Impl.Close(args_.Ctx) |
| return nil, false, err_ |
| case PipeDescribeOrdinal: |
| in_ := pipeWithCtxDescribeRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query) |
| out_ := pipeWithCtxDescribeResponse{} |
| out_.Info = info |
| return &out_, true, err_ |
| case PipeGetTokenOrdinal: |
| result, err_ := s_.Impl.GetToken(args_.Ctx) |
| out_ := pipeWithCtxGetTokenResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case PipeGetAttributesOrdinal: |
| in_ := pipeWithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query) |
| out_ := pipeWithCtxGetAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case PipeUpdateAttributesOrdinal: |
| in_ := pipeWithCtxUpdateAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes) |
| out_ := pipeWithCtxUpdateAttributesResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| case PipeSyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := pipeWithCtxSyncResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type PipeEventProxy _bindings.ChannelProxy |
| |
| func (p *PipeEventProxy) OnConnectionInfo(info ConnectionInfo) error { |
| event_ := &pipeWithCtxOnConnectionInfoResponse{ |
| Info: info, |
| } |
| return ((*_bindings.ChannelProxy)(p)).Send(PipeOnConnectionInfoOrdinal, event_) |
| } |