| // Copyright 2018 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // |
| // Code generated by third_party/go/regen-fidl; DO NOT EDIT. |
| |
| // WARNING: This file is machine generated by fidlgen. |
| |
| // fidl_experiment = unknown_interactions |
| |
| package io |
| |
| import ( |
| _strings "strings" |
| _zx "syscall/zx" |
| _bindings "syscall/zx/fidl" |
| fuchsiaunknown "syscall/zx/unknown" |
| ) |
| |
| const ( |
| CloseAll InotifyWatchMask = 24 |
| DirectoryProtocolName string = "fuchsia.io/Directory" |
| FileProtocolName string = "fuchsia.io/File" |
| // Nodes which do not have ino values should return this value |
| // from Readdir and GetAttr. |
| InoUnknown uint64 = 18446744073709551615 |
| // The maximal buffer size which can be transmitted for buffered operations. |
| // This capacity is currently set somewhat arbitrarily. |
| MaxBuf uint64 = 8192 |
| // The maximum length, in bytes, of a single filesystem component. |
| MaxFilename uint64 = 255 |
| MaxFsNameBuffer uint64 = 32 |
| // The maximum length, in bytes, of a single filesystem component. |
| MaxNameLength uint64 = 255 |
| // The maximum length, in bytes, of a filesystem string. |
| MaxPath uint64 = 4096 |
| // The maximum length, in bytes, of a filesystem path. |
| MaxPathLength uint64 = 4095 |
| // The maximum I/O size that is allowed for read/write operations using |
| // byte vectors. |
| MaxTransferSize uint64 = 8192 |
| // Bits reserved for posix protections. Native fuchsia filesystems |
| // are not required to set bits contained within `MODE_PROTECTION_MASK`, |
| // but filesystems that wish to do so may refer to sys/stat.h for their |
| // definitions. |
| ModeProtectionMask uint32 = 4095 |
| ModeTypeBlockDevice uint32 = 24576 |
| ModeTypeDirectory uint32 = 16384 |
| ModeTypeFile uint32 = 32768 |
| // Bits indicating node type. The canonical mechanism to check |
| // for a node type is to take 'mode', bitwise AND it with the |
| // `MODE_TYPE_MASK`, and check exact equality against a mode type. |
| ModeTypeMask uint32 = 1044480 |
| ModeTypeService uint32 = 65536 |
| Move InotifyWatchMask = 192 |
| NodeProtocolName string = "fuchsia.io/Node" |
| // Flags used when opening a node reference must fall within this mask. |
| OpenFlagsAllowedWithNodeReference OpenFlags = 46661632 |
| // All known rights. |
| OpenRights OpenFlags = 11 |
| // Alias for directory permission alias rw* |
| RwStarDir Operations = 503 |
| // Alias for directory permission alias rx* |
| RxStarDir Operations = 219 |
| // Alias for directory permission alias r* |
| RStarDir Operations = 211 |
| // Alias for directory permission alias w* |
| WStarDir Operations = 485 |
| // Alias for directory permission alias x* |
| XStarDir Operations = 201 |
| ) |
| |
| var _ _bindings.Enum = AdvisoryLockType(0) |
| |
| 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 |
| } |
| 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.Enum = DirentType(0) |
| |
| type DirentType uint8 |
| |
| const ( |
| |
| // A dirent with an unknown type. |
| DirentTypeUnknown DirentType = 0 |
| |
| // A dirent representing a directory object. |
| DirentTypeDirectory DirentType = 4 |
| |
| // A dirent representing a block device object. |
| DirentTypeBlockDevice DirentType = 6 |
| |
| // A dirent representing a file object. |
| DirentTypeFile DirentType = 8 |
| |
| // A dirent representing a service object. |
| DirentTypeService DirentType = 16 |
| ) |
| |
| func (_ DirentType) I_EnumValues() []DirentType { |
| return []DirentType{ |
| DirentTypeUnknown, |
| DirentTypeDirectory, |
| DirentTypeBlockDevice, |
| DirentTypeFile, |
| DirentTypeService, |
| } |
| } |
| |
| func (_ DirentType) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x DirentType) IsUnknown() bool { |
| switch x { |
| case 0: |
| return false |
| case 4: |
| return false |
| case 6: |
| return false |
| case 8: |
| return false |
| case 16: |
| return false |
| } |
| return true |
| } |
| |
| func (x DirentType) String() string { |
| switch x { |
| case 0: |
| return "Unknown" |
| case 4: |
| return "Directory" |
| case 6: |
| return "BlockDevice" |
| case 8: |
| return "File" |
| case 16: |
| return "Service" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Enum = OpenMode(0) |
| |
| 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 |
| ) |
| |
| func (_ OpenMode) I_EnumValues() []OpenMode { |
| return []OpenMode{ |
| OpenModeOpenExisting, |
| OpenModeMaybeCreate, |
| OpenModeAlwaysCreate, |
| } |
| } |
| |
| 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 |
| } |
| return true |
| } |
| |
| func (x OpenMode) String() string { |
| switch x { |
| case 1: |
| return "OpenExisting" |
| case 2: |
| return "MaybeCreate" |
| case 3: |
| return "AlwaysCreate" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Enum = RightsResolution(0) |
| |
| 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 |
| // [`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 |
| } |
| return true |
| } |
| |
| func (x RightsResolution) String() string { |
| switch x { |
| case 1: |
| return "Maximize" |
| case 2: |
| return "Posix" |
| } |
| 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 |
| } |
| 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 = WatchEvent(0) |
| |
| type WatchEvent uint8 |
| |
| const ( |
| |
| // Indicates the directory being watched has been deleted. The name returned for this event |
| // will be `.` (dot), as it is refering to the directory itself. |
| WatchEventDeleted WatchEvent = 0 |
| |
| // Indicates a node has been created (either new or moved) into a directory. |
| WatchEventAdded WatchEvent = 1 |
| |
| // Identifies a node has been removed (either deleted or moved) from the directory. |
| WatchEventRemoved WatchEvent = 2 |
| |
| // Identifies a node already existed in the directory when watching started. |
| WatchEventExisting WatchEvent = 3 |
| |
| // Identifies that no more `EXISTING` events will be sent. The name returned for this event |
| // will be empty, as it is not refering to a specific entry. |
| WatchEventIdle WatchEvent = 4 |
| ) |
| |
| func (_ WatchEvent) I_EnumValues() []WatchEvent { |
| return []WatchEvent{ |
| WatchEventDeleted, |
| WatchEventAdded, |
| WatchEventRemoved, |
| WatchEventExisting, |
| WatchEventIdle, |
| } |
| } |
| |
| func (_ WatchEvent) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x WatchEvent) IsUnknown() bool { |
| switch x { |
| case 0: |
| return false |
| case 1: |
| return false |
| case 2: |
| return false |
| case 3: |
| return false |
| case 4: |
| return false |
| } |
| return true |
| } |
| |
| func (x WatchEvent) String() string { |
| switch x { |
| case 0: |
| return "Deleted" |
| case 1: |
| return "Added" |
| case 2: |
| return "Removed" |
| case 3: |
| return "Existing" |
| case 4: |
| return "Idle" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Bits = ConnectorFlags(0) |
| |
| type ConnectorFlags uint64 |
| |
| const ( |
| ConnectorFlags_Mask ConnectorFlags = 0 |
| ) |
| |
| func (_ ConnectorFlags) I_BitsMask() ConnectorFlags { |
| return ConnectorFlags_Mask |
| } |
| |
| func (_ ConnectorFlags) I_BitsIsStrict() bool { |
| return false |
| } |
| |
| func (x ConnectorFlags) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x ConnectorFlags) GetUnknownBits() uint64 { |
| return uint64(^ConnectorFlags_Mask & x) |
| } |
| |
| func (x ConnectorFlags) InvertBits() ConnectorFlags { |
| return ConnectorFlags_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x ConnectorFlags) HasBits(mask ConnectorFlags) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x ConnectorFlags) ClearBits(mask ConnectorFlags) ConnectorFlags { |
| return ^mask & x |
| } |
| |
| func (x ConnectorFlags) String() string { |
| var buf _strings.Builder |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = DirectoryProtocolFlags(0) |
| |
| type DirectoryProtocolFlags uint64 |
| |
| const ( |
| DirectoryProtocolFlags_Mask DirectoryProtocolFlags = 0 |
| ) |
| |
| func (_ DirectoryProtocolFlags) I_BitsMask() DirectoryProtocolFlags { |
| return DirectoryProtocolFlags_Mask |
| } |
| |
| func (_ DirectoryProtocolFlags) I_BitsIsStrict() bool { |
| return false |
| } |
| |
| func (x DirectoryProtocolFlags) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x DirectoryProtocolFlags) GetUnknownBits() uint64 { |
| return uint64(^DirectoryProtocolFlags_Mask & x) |
| } |
| |
| func (x DirectoryProtocolFlags) InvertBits() DirectoryProtocolFlags { |
| return DirectoryProtocolFlags_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x DirectoryProtocolFlags) HasBits(mask DirectoryProtocolFlags) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x DirectoryProtocolFlags) ClearBits(mask DirectoryProtocolFlags) DirectoryProtocolFlags { |
| return ^mask & x |
| } |
| |
| func (x DirectoryProtocolFlags) String() string { |
| var buf _strings.Builder |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = FileProtocolFlags(0) |
| |
| type FileProtocolFlags uint64 |
| |
| const ( |
| FileProtocolFlagsAppend FileProtocolFlags = 1 |
| FileProtocolFlagsTruncate FileProtocolFlags = 2 |
| FileProtocolFlags_Mask FileProtocolFlags = 3 |
| ) |
| |
| func (_ FileProtocolFlags) I_BitsMask() FileProtocolFlags { |
| return FileProtocolFlags_Mask |
| } |
| |
| func (_ FileProtocolFlags) I_BitsIsStrict() bool { |
| return false |
| } |
| |
| func (x FileProtocolFlags) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x FileProtocolFlags) GetUnknownBits() uint64 { |
| return uint64(^FileProtocolFlags_Mask & x) |
| } |
| |
| func (x FileProtocolFlags) InvertBits() FileProtocolFlags { |
| return FileProtocolFlags_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x FileProtocolFlags) HasBits(mask FileProtocolFlags) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x FileProtocolFlags) ClearBits(mask FileProtocolFlags) FileProtocolFlags { |
| return ^mask & x |
| } |
| |
| func (x FileProtocolFlags) String() string { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Append") |
| } |
| if 2&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Truncate") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| 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 { |
| var buf _strings.Builder |
| if 16777216&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Readable") |
| } |
| if 33554432&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Writable") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = InotifyWatchMask(0) |
| |
| // Used by InotifyAddWatch to indicate the server the events to be watched on. |
| // Also used by [`Node.Inotify`] to indicate the types of events |
| // that occurred 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 { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Access") |
| } |
| if 2&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Modify") |
| } |
| if 4&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Attrib") |
| } |
| if 8&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("CloseWrite") |
| } |
| if 16&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("CloseNowrite") |
| } |
| if 32&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Open") |
| } |
| if 64&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("MovedFrom") |
| } |
| if 128&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("MovedTo") |
| } |
| if 256&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Create") |
| } |
| if 512&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Delete") |
| } |
| if 1024&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("DeleteSelf") |
| } |
| if 2048&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("MoveSelf") |
| } |
| if 8192&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Unmount") |
| } |
| if 16384&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("QOverflow") |
| } |
| if 32768&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Ignored") |
| } |
| if 16777216&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Onlydir") |
| } |
| if 33554432&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("DontFollow") |
| } |
| if 67108864&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("ExclUnlink") |
| } |
| if 268435456&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("MaskCreate") |
| } |
| if 536870912&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("MaskAdd") |
| } |
| if 1073741824&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Isdirectory") |
| } |
| if 2147483648&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Oneshot") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = ModeType(0) |
| |
| type ModeType uint32 |
| |
| const ( |
| ModeType_Mask ModeType = 0 |
| ) |
| |
| func (_ ModeType) I_BitsMask() ModeType { |
| return ModeType_Mask |
| } |
| |
| func (_ ModeType) I_BitsIsStrict() bool { |
| return false |
| } |
| |
| func (x ModeType) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x ModeType) GetUnknownBits() uint64 { |
| return uint64(^ModeType_Mask & x) |
| } |
| |
| func (x ModeType) InvertBits() ModeType { |
| return ModeType_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x ModeType) HasBits(mask ModeType) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x ModeType) ClearBits(mask ModeType) ModeType { |
| return ^mask & x |
| } |
| |
| func (x ModeType) String() string { |
| var buf _strings.Builder |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = NodeAttributeFlags(0) |
| |
| // The fields of 'attributes' which are used to update the Node are indicated |
| // by the 'flags' argument. |
| type NodeAttributeFlags uint32 |
| |
| const ( |
| NodeAttributeFlagsCreationTime NodeAttributeFlags = 1 |
| NodeAttributeFlagsModificationTime NodeAttributeFlags = 2 |
| NodeAttributeFlags_Mask NodeAttributeFlags = 3 |
| ) |
| |
| func (_ NodeAttributeFlags) I_BitsMask() NodeAttributeFlags { |
| return NodeAttributeFlags_Mask |
| } |
| |
| func (_ NodeAttributeFlags) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x NodeAttributeFlags) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x NodeAttributeFlags) GetUnknownBits() uint64 { |
| return uint64(^NodeAttributeFlags_Mask & x) |
| } |
| |
| func (x NodeAttributeFlags) InvertBits() NodeAttributeFlags { |
| return NodeAttributeFlags_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x NodeAttributeFlags) HasBits(mask NodeAttributeFlags) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x NodeAttributeFlags) ClearBits(mask NodeAttributeFlags) NodeAttributeFlags { |
| return ^mask & x |
| } |
| |
| func (x NodeAttributeFlags) String() string { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("CreationTime") |
| } |
| if 2&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("ModificationTime") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = NodeAttributesQuery(0) |
| |
| type NodeAttributesQuery uint64 |
| |
| const ( |
| NodeAttributesQueryProtocols NodeAttributesQuery = 1 |
| NodeAttributesQueryAbilities NodeAttributesQuery = 2 |
| NodeAttributesQueryContentSize NodeAttributesQuery = 4 |
| NodeAttributesQueryStorageSize NodeAttributesQuery = 8 |
| NodeAttributesQueryLinkCount NodeAttributesQuery = 16 |
| NodeAttributesQueryId NodeAttributesQuery = 32 |
| NodeAttributesQueryCreationTime NodeAttributesQuery = 64 |
| NodeAttributesQueryModificationTime 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 { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Protocols") |
| } |
| if 2&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Abilities") |
| } |
| if 4&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("ContentSize") |
| } |
| if 8&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("StorageSize") |
| } |
| if 16&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("LinkCount") |
| } |
| if 32&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Id") |
| } |
| if 64&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("CreationTime") |
| } |
| if 128&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("ModificationTime") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = NodeFlags(0) |
| |
| type NodeFlags uint64 |
| |
| const ( |
| NodeFlagsGetRepresentation NodeFlags = 1 |
| NodeFlags_Mask NodeFlags = 1 |
| ) |
| |
| func (_ NodeFlags) I_BitsMask() NodeFlags { |
| return NodeFlags_Mask |
| } |
| |
| func (_ NodeFlags) I_BitsIsStrict() bool { |
| return false |
| } |
| |
| func (x NodeFlags) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x NodeFlags) GetUnknownBits() uint64 { |
| return uint64(^NodeFlags_Mask & x) |
| } |
| |
| func (x NodeFlags) InvertBits() NodeFlags { |
| return NodeFlags_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x NodeFlags) HasBits(mask NodeFlags) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x NodeFlags) ClearBits(mask NodeFlags) NodeFlags { |
| return ^mask & x |
| } |
| |
| func (x NodeFlags) String() string { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("GetRepresentation") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = NodeProtocolKinds(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 [`File`] protocol, and sends a |
| // [`Representation.FileInfo`] when opened with `GET_REPRESENTATION`. 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 [`NodeProtocolKinds`], whereas existing clients would |
| // continue to talk to the node via the old representation. |
| // |
| // [`NodeProtocolKinds`] enables forward-compatibility through a form of protocol |
| // negotiation. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`Representation`]. |
| type NodeProtocolKinds uint64 |
| |
| const ( |
| NodeProtocolKindsConnector NodeProtocolKinds = 1 |
| NodeProtocolKindsDirectory NodeProtocolKinds = 2 |
| NodeProtocolKindsFile NodeProtocolKinds = 4 |
| NodeProtocolKinds_Mask NodeProtocolKinds = 7 |
| ) |
| |
| func (_ NodeProtocolKinds) I_BitsMask() NodeProtocolKinds { |
| return NodeProtocolKinds_Mask |
| } |
| |
| func (_ NodeProtocolKinds) I_BitsIsStrict() bool { |
| return false |
| } |
| |
| func (x NodeProtocolKinds) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x NodeProtocolKinds) GetUnknownBits() uint64 { |
| return uint64(^NodeProtocolKinds_Mask & x) |
| } |
| |
| func (x NodeProtocolKinds) InvertBits() NodeProtocolKinds { |
| return NodeProtocolKinds_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x NodeProtocolKinds) HasBits(mask NodeProtocolKinds) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x NodeProtocolKinds) ClearBits(mask NodeProtocolKinds) NodeProtocolKinds { |
| return ^mask & x |
| } |
| |
| func (x NodeProtocolKinds) String() string { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Connector") |
| } |
| if 2&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Directory") |
| } |
| if 4&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("File") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = OpenFlags(0) |
| |
| type OpenFlags uint32 |
| |
| const ( |
| OpenFlagsRightReadable OpenFlags = 1 |
| OpenFlagsRightWritable OpenFlags = 2 |
| OpenFlagsRightExecutable OpenFlags = 8 |
| OpenFlagsCreate OpenFlags = 65536 |
| OpenFlagsCreateIfAbsent OpenFlags = 131072 |
| OpenFlagsTruncate OpenFlags = 262144 |
| OpenFlagsDirectory OpenFlags = 524288 |
| OpenFlagsAppend OpenFlags = 1048576 |
| OpenFlagsNodeReference OpenFlags = 4194304 |
| OpenFlagsDescribe OpenFlags = 8388608 |
| OpenFlagsPosixWritable OpenFlags = 134217728 |
| OpenFlagsPosixExecutable OpenFlags = 268435456 |
| OpenFlagsNotDirectory OpenFlags = 33554432 |
| OpenFlagsCloneSameRights OpenFlags = 67108864 |
| OpenFlagsBlockDevice OpenFlags = 16777216 |
| OpenFlags_Mask OpenFlags = 534708235 |
| ) |
| |
| func (_ OpenFlags) I_BitsMask() OpenFlags { |
| return OpenFlags_Mask |
| } |
| |
| func (_ OpenFlags) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x OpenFlags) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x OpenFlags) GetUnknownBits() uint64 { |
| return uint64(^OpenFlags_Mask & x) |
| } |
| |
| func (x OpenFlags) InvertBits() OpenFlags { |
| return OpenFlags_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x OpenFlags) HasBits(mask OpenFlags) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x OpenFlags) ClearBits(mask OpenFlags) OpenFlags { |
| return ^mask & x |
| } |
| |
| func (x OpenFlags) String() string { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("RightReadable") |
| } |
| if 2&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("RightWritable") |
| } |
| if 8&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("RightExecutable") |
| } |
| if 65536&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Create") |
| } |
| if 131072&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("CreateIfAbsent") |
| } |
| if 262144&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Truncate") |
| } |
| if 524288&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Directory") |
| } |
| if 1048576&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Append") |
| } |
| if 4194304&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("NodeReference") |
| } |
| if 8388608&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Describe") |
| } |
| if 134217728&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("PosixWritable") |
| } |
| if 268435456&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("PosixExecutable") |
| } |
| if 33554432&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("NotDirectory") |
| } |
| if 67108864&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("CloneSameRights") |
| } |
| if 16777216&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("BlockDevice") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| 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 [`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 |
| Operations_Mask Operations = 511 |
| ) |
| |
| 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 { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Connect") |
| } |
| if 2&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("ReadBytes") |
| } |
| if 4&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("WriteBytes") |
| } |
| if 8&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Execute") |
| } |
| if 16&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("GetAttributes") |
| } |
| if 32&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("UpdateAttributes") |
| } |
| if 64&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Enumerate") |
| } |
| if 128&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Traverse") |
| } |
| if 256&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("ModifyDirectory") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = UnlinkFlags(0) |
| |
| 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 { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("MustBeDirectory") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = VmoFlags(0) |
| |
| type VmoFlags uint32 |
| |
| 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 { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Read") |
| } |
| if 2&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Write") |
| } |
| if 4&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Execute") |
| } |
| if 65536&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("PrivateClone") |
| } |
| if 131072&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("SharedBuffer") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| var _ _bindings.Bits = WatchMask(0) |
| |
| type WatchMask uint32 |
| |
| const ( |
| WatchMaskDeleted WatchMask = 1 |
| WatchMaskAdded WatchMask = 2 |
| WatchMaskRemoved WatchMask = 4 |
| WatchMaskExisting WatchMask = 8 |
| WatchMaskIdle WatchMask = 16 |
| WatchMask_Mask WatchMask = 31 |
| ) |
| |
| func (_ WatchMask) I_BitsMask() WatchMask { |
| return WatchMask_Mask |
| } |
| |
| func (_ WatchMask) I_BitsIsStrict() bool { |
| return true |
| } |
| |
| func (x WatchMask) HasUnknownBits() bool { |
| return x.GetUnknownBits() != 0 |
| } |
| |
| func (x WatchMask) GetUnknownBits() uint64 { |
| return uint64(^WatchMask_Mask & x) |
| } |
| |
| func (x WatchMask) InvertBits() WatchMask { |
| return WatchMask_Mask & ^x |
| } |
| |
| // HasBits validates that all flipped bits in the mask are set. |
| func (x WatchMask) HasBits(mask WatchMask) bool { |
| return mask|x == x |
| } |
| |
| // ClearBits ensures all flipped bits in the mask are unset. |
| func (x WatchMask) ClearBits(mask WatchMask) WatchMask { |
| return ^mask & x |
| } |
| |
| func (x WatchMask) String() string { |
| var buf _strings.Builder |
| if 1&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Deleted") |
| } |
| if 2&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Added") |
| } |
| if 4&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Removed") |
| } |
| if 8&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Existing") |
| } |
| if 16&x != 0 { |
| if buf.Len() != 0 { |
| buf.WriteRune('|') |
| } |
| buf.WriteString("Idle") |
| } |
| if buf.Len() == 0 { |
| buf.WriteString("<empty bits>") |
| } |
| return buf.String() |
| } |
| |
| type AdvisoryLockRange struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| // The location in the file from which [`offset`] is computed. |
| Origin SeekOrigin `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_v2:"8"` |
| // The length of the byte range in bytes. |
| // |
| // If the length is zero, then the byte range extends 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_v2:"16"` |
| } |
| |
| var _mAdvisoryLockRange = _bindings.CreateLazyMarshaler(AdvisoryLockRange{}) |
| |
| func (msg *AdvisoryLockRange) Marshaler() _bindings.Marshaler { |
| return _mAdvisoryLockRange |
| } |
| |
| type AdvisoryLockingAdvisoryLockResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mAdvisoryLockingAdvisoryLockResponse = _bindings.CreateLazyMarshaler(AdvisoryLockingAdvisoryLockResponse{}) |
| |
| func (msg *AdvisoryLockingAdvisoryLockResponse) Marshaler() _bindings.Marshaler { |
| return _mAdvisoryLockingAdvisoryLockResponse |
| } |
| |
| type Directory2RenameResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mDirectory2RenameResponse = _bindings.CreateLazyMarshaler(Directory2RenameResponse{}) |
| |
| func (msg *Directory2RenameResponse) Marshaler() _bindings.Marshaler { |
| return _mDirectory2RenameResponse |
| } |
| |
| type Directory2UnlinkResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mDirectory2UnlinkResponse = _bindings.CreateLazyMarshaler(Directory2UnlinkResponse{}) |
| |
| func (msg *Directory2UnlinkResponse) Marshaler() _bindings.Marshaler { |
| return _mDirectory2UnlinkResponse |
| } |
| |
| type DirectoryIteratorGetNextResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // 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. |
| Entries []DirectoryEntry `fidl_offset_v2:"0" fidl_bounds:"8192"` |
| } |
| |
| var _mDirectoryIteratorGetNextResponse = _bindings.CreateLazyMarshaler(DirectoryIteratorGetNextResponse{}) |
| |
| func (msg *DirectoryIteratorGetNextResponse) Marshaler() _bindings.Marshaler { |
| return _mDirectoryIteratorGetNextResponse |
| } |
| |
| type DirectoryObject struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mDirectoryObject = _bindings.CreateLazyMarshaler(DirectoryObject{}) |
| |
| func (msg *DirectoryObject) Marshaler() _bindings.Marshaler { |
| return _mDirectoryObject |
| } |
| |
| type FileObject struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| // 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. |
| // |
| // The "`FILE_SIGNAL_`" values may be observed on this event. |
| Event _zx.Event `fidl_offset_v2:"0" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"1"` |
| // A placeholder for future stream support. |
| // |
| // Currently, servers are required not to send a handle in this field. |
| Stream _zx.Handle `fidl_offset_v2:"4" fidl_handle_subtype:"31" fidl_handle_rights:"2147483648" fidl_bounds:"1"` |
| } |
| |
| var _mFileObject = _bindings.CreateLazyMarshaler(FileObject{}) |
| |
| func (msg *FileObject) Marshaler() _bindings.Marshaler { |
| return _mFileObject |
| } |
| |
| type FileGetBackingMemoryResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| Vmo _zx.VMO `fidl_offset_v2:"0" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mFileGetBackingMemoryResponse = _bindings.CreateLazyMarshaler(FileGetBackingMemoryResponse{}) |
| |
| func (msg *FileGetBackingMemoryResponse) Marshaler() _bindings.Marshaler { |
| return _mFileGetBackingMemoryResponse |
| } |
| |
| type FileReadAtResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Data []uint8 `fidl_offset_v2:"0" fidl_bounds:"8192"` |
| } |
| |
| var _mFileReadAtResponse = _bindings.CreateLazyMarshaler(FileReadAtResponse{}) |
| |
| func (msg *FileReadAtResponse) Marshaler() _bindings.Marshaler { |
| return _mFileReadAtResponse |
| } |
| |
| type FileResizeResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mFileResizeResponse = _bindings.CreateLazyMarshaler(FileResizeResponse{}) |
| |
| func (msg *FileResizeResponse) Marshaler() _bindings.Marshaler { |
| return _mFileResizeResponse |
| } |
| |
| type FileSeekResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| OffsetFromStart uint64 `fidl_offset_v2:"0"` |
| } |
| |
| var _mFileSeekResponse = _bindings.CreateLazyMarshaler(FileSeekResponse{}) |
| |
| func (msg *FileSeekResponse) Marshaler() _bindings.Marshaler { |
| return _mFileSeekResponse |
| } |
| |
| type FileWriteAtResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| ActualCount uint64 `fidl_offset_v2:"0"` |
| } |
| |
| var _mFileWriteAtResponse = _bindings.CreateLazyMarshaler(FileWriteAtResponse{}) |
| |
| func (msg *FileWriteAtResponse) Marshaler() _bindings.Marshaler { |
| return _mFileWriteAtResponse |
| } |
| |
| type FilesystemInfo struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"96" fidl_alignment_v2:"8"` |
| // The number of data bytes which may be stored in a filesystem. This does not count |
| // metadata or other filesystem overhead like block rounding. |
| TotalBytes uint64 `fidl_offset_v2:"0"` |
| // The number of data bytes which are in use by the filesystem. This does not count |
| // metadata or other filesystem overhead like block rounding. |
| UsedBytes uint64 `fidl_offset_v2:"8"` |
| // The number of nodes which may be stored in the filesystem. |
| TotalNodes uint64 `fidl_offset_v2:"16"` |
| // The number of nodes used by the filesystem. |
| UsedNodes uint64 `fidl_offset_v2:"24"` |
| // The amount of additional space which may be allocated from the underlying volume |
| // manager. If unsupported or there is no space for the filesystem to grow, this will |
| // be zero. |
| FreeSharedPoolBytes uint64 `fidl_offset_v2:"32"` |
| // A unique identifier for this filesystem instance. Will not be preserved across |
| // reboots. |
| // |
| // Implementors should create a kernel object (normally an event) and use its koid for |
| // the filesystem ID. This koid guarantees uniqueness in the system. |
| FsId uint64 `fidl_offset_v2:"40"` |
| // The size in bytes of a single filesystem block. |
| BlockSize uint32 `fidl_offset_v2:"48"` |
| // The maximum length of a filesystem name. |
| MaxFilenameSize uint32 `fidl_offset_v2:"52"` |
| // A unique identifier for the type of the underlying filesystem. |
| FsType uint32 `fidl_offset_v2:"56"` |
| Padding uint32 `fidl_offset_v2:"60"` |
| Name [32]int8 `fidl_offset_v2:"64"` |
| } |
| |
| var _mFilesystemInfo = _bindings.CreateLazyMarshaler(FilesystemInfo{}) |
| |
| func (msg *FilesystemInfo) Marshaler() _bindings.Marshaler { |
| return _mFilesystemInfo |
| } |
| |
| type InotifyEvent struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| WatchDescriptor uint32 `fidl_offset_v2:"0"` |
| Mask InotifyWatchMask `fidl_offset_v2:"4"` |
| Cookie uint32 `fidl_offset_v2:"8"` |
| Len uint32 `fidl_offset_v2:"12"` |
| Filename string `fidl_offset_v2:"16" fidl_bounds:"4095"` |
| } |
| |
| var _mInotifyEvent = _bindings.CreateLazyMarshaler(InotifyEvent{}) |
| |
| func (msg *InotifyEvent) Marshaler() _bindings.Marshaler { |
| return _mInotifyEvent |
| } |
| |
| type Node2SyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mNode2SyncResponse = _bindings.CreateLazyMarshaler(Node2SyncResponse{}) |
| |
| func (msg *Node2SyncResponse) Marshaler() _bindings.Marshaler { |
| return _mNode2SyncResponse |
| } |
| |
| type Node2UpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mNode2UpdateAttributesResponse = _bindings.CreateLazyMarshaler(Node2UpdateAttributesResponse{}) |
| |
| func (msg *Node2UpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mNode2UpdateAttributesResponse |
| } |
| |
| // NodeAttributes defines generic information about a filesystem node. |
| type NodeAttributes struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"56" fidl_alignment_v2:"8"` |
| // Protection bits and node type information describe in 'mode'. |
| Mode uint32 `fidl_offset_v2:"0"` |
| // A filesystem-unique ID. |
| Id uint64 `fidl_offset_v2:"8"` |
| // Node size, in bytes. |
| ContentSize uint64 `fidl_offset_v2:"16"` |
| // Space needed to store node (possibly larger than size), in bytes. |
| StorageSize uint64 `fidl_offset_v2:"24"` |
| // Hard link count. |
| LinkCount uint64 `fidl_offset_v2:"32"` |
| // Time of creation (may be updated manually after creation) in ns since Unix epoch, UTC. |
| CreationTime uint64 `fidl_offset_v2:"40"` |
| // Time of last modification in ns since Unix epoch, UTC. |
| ModificationTime uint64 `fidl_offset_v2:"48"` |
| } |
| |
| var _mNodeAttributes = _bindings.CreateLazyMarshaler(NodeAttributes{}) |
| |
| func (msg *NodeAttributes) Marshaler() _bindings.Marshaler { |
| return _mNodeAttributes |
| } |
| |
| type NodeAttributes2 struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| MutableAttributes MutableNodeAttributes `fidl_offset_v2:"0"` |
| ImmutableAttributes ImmutableNodeAttributes `fidl_offset_v2:"16"` |
| } |
| |
| var _mNodeAttributes2 = _bindings.CreateLazyMarshaler(NodeAttributes2{}) |
| |
| func (msg *NodeAttributes2) Marshaler() _bindings.Marshaler { |
| return _mNodeAttributes2 |
| } |
| |
| type ReadableReadResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Data []uint8 `fidl_offset_v2:"0" fidl_bounds:"8192"` |
| } |
| |
| var _mReadableReadResponse = _bindings.CreateLazyMarshaler(ReadableReadResponse{}) |
| |
| func (msg *ReadableReadResponse) Marshaler() _bindings.Marshaler { |
| return _mReadableReadResponse |
| } |
| |
| // Options for requesting rights on the new connection. |
| // |
| // ## 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 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. |
| // |
| // See [`Rights`] and [`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. |
| // |
| // 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_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_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_v2:"8"` |
| // When an `Open`/`Reopen` request reaches its final remote server, it should |
| // assign rights on the new connection based on one of these modes. |
| Resolution RightsResolution `fidl_offset_v2:"16"` |
| } |
| |
| var _mRightsRequest = _bindings.CreateLazyMarshaler(RightsRequest{}) |
| |
| func (msg *RightsRequest) Marshaler() _bindings.Marshaler { |
| return _mRightsRequest |
| } |
| |
| type Service struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"1" fidl_alignment_v2:"1"` |
| } |
| |
| var _mService = _bindings.CreateLazyMarshaler(Service{}) |
| |
| func (msg *Service) Marshaler() _bindings.Marshaler { |
| return _mService |
| } |
| |
| type WritableWriteResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| ActualCount uint64 `fidl_offset_v2:"0"` |
| } |
| |
| var _mWritableWriteResponse = _bindings.CreateLazyMarshaler(WritableWriteResponse{}) |
| |
| func (msg *WritableWriteResponse) Marshaler() _bindings.Marshaler { |
| return _mWritableWriteResponse |
| } |
| |
| type advisoryLockingWithCtxAdvisoryLockRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Request AdvisoryLockRequest `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_v2:"16" fidl_alignment_v2:"8"` |
| Result AdvisoryLockingAdvisoryLockResult `fidl_offset_v2:"0"` |
| } |
| |
| var _madvisoryLockingWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(advisoryLockingWithCtxAdvisoryLockResponse{}) |
| |
| func (msg *advisoryLockingWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler { |
| return _madvisoryLockingWithCtxAdvisoryLockResponse |
| } |
| |
| type directoryWithCtxCloneRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| Object NodeWithCtxInterfaceRequest `fidl_offset_v2:"4" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxCloneRequest = _bindings.CreateLazyMarshaler(directoryWithCtxCloneRequest{}) |
| |
| func (msg *directoryWithCtxCloneRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxCloneRequest |
| } |
| |
| type directoryWithCtxOnOpenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *NodeInfoDeprecated `fidl_offset_v2:"8"` |
| } |
| |
| var _mdirectoryWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(directoryWithCtxOnOpenResponse{}) |
| |
| func (msg *directoryWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxOnOpenResponse |
| } |
| |
| type directoryWithCtxGetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mdirectoryWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetAttrResponse{}) |
| |
| func (msg *directoryWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxGetAttrResponse |
| } |
| |
| type directoryWithCtxSetAttrRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| Flags NodeAttributeFlags `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mdirectoryWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(directoryWithCtxSetAttrRequest{}) |
| |
| func (msg *directoryWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxSetAttrRequest |
| } |
| |
| type directoryWithCtxSetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(directoryWithCtxSetAttrResponse{}) |
| |
| func (msg *directoryWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxSetAttrResponse |
| } |
| |
| type directoryWithCtxGetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| Flags OpenFlags `fidl_offset_v2:"4"` |
| } |
| |
| var _mdirectoryWithCtxGetFlagsResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetFlagsResponse{}) |
| |
| func (msg *directoryWithCtxGetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxGetFlagsResponse |
| } |
| |
| type directoryWithCtxSetFlagsRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxSetFlagsRequest = _bindings.CreateLazyMarshaler(directoryWithCtxSetFlagsRequest{}) |
| |
| func (msg *directoryWithCtxSetFlagsRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxSetFlagsRequest |
| } |
| |
| type directoryWithCtxSetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxSetFlagsResponse = _bindings.CreateLazyMarshaler(directoryWithCtxSetFlagsResponse{}) |
| |
| func (msg *directoryWithCtxSetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxSetFlagsResponse |
| } |
| |
| type directoryWithCtxQueryFilesystemResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *FilesystemInfo `fidl_offset_v2:"8"` |
| } |
| |
| var _mdirectoryWithCtxQueryFilesystemResponse = _bindings.CreateLazyMarshaler(directoryWithCtxQueryFilesystemResponse{}) |
| |
| func (msg *directoryWithCtxQueryFilesystemResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxQueryFilesystemResponse |
| } |
| |
| type directoryWithCtxOpenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| Mode ModeType `fidl_offset_v2:"4"` |
| Path string `fidl_offset_v2:"8" fidl_bounds:"4096"` |
| Object NodeWithCtxInterfaceRequest `fidl_offset_v2:"24" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxOpenRequest = _bindings.CreateLazyMarshaler(directoryWithCtxOpenRequest{}) |
| |
| func (msg *directoryWithCtxOpenRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxOpenRequest |
| } |
| |
| type directoryWithCtxReadDirentsRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| MaxBytes uint64 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxReadDirentsRequest = _bindings.CreateLazyMarshaler(directoryWithCtxReadDirentsRequest{}) |
| |
| func (msg *directoryWithCtxReadDirentsRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxReadDirentsRequest |
| } |
| |
| type directoryWithCtxReadDirentsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Dirents []uint8 `fidl_offset_v2:"8" fidl_bounds:"8192"` |
| } |
| |
| var _mdirectoryWithCtxReadDirentsResponse = _bindings.CreateLazyMarshaler(directoryWithCtxReadDirentsResponse{}) |
| |
| func (msg *directoryWithCtxReadDirentsResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxReadDirentsResponse |
| } |
| |
| type directoryWithCtxRewindResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxRewindResponse = _bindings.CreateLazyMarshaler(directoryWithCtxRewindResponse{}) |
| |
| func (msg *directoryWithCtxRewindResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxRewindResponse |
| } |
| |
| type directoryWithCtxGetTokenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| Token _zx.Handle `fidl_offset_v2:"4" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"1"` |
| } |
| |
| var _mdirectoryWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetTokenResponse{}) |
| |
| func (msg *directoryWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxGetTokenResponse |
| } |
| |
| type directoryWithCtxLinkRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"40" fidl_alignment_v2:"8"` |
| Src string `fidl_offset_v2:"0" fidl_bounds:"255"` |
| DstParentToken _zx.Handle `fidl_offset_v2:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| Dst string `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_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `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_v2:"12" fidl_alignment_v2:"4"` |
| Mask WatchMask `fidl_offset_v2:"0"` |
| Options uint32 `fidl_offset_v2:"4"` |
| Watcher DirectoryWatcherWithCtxInterfaceRequest `fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxWatchRequest = _bindings.CreateLazyMarshaler(directoryWithCtxWatchRequest{}) |
| |
| func (msg *directoryWithCtxWatchRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxWatchRequest |
| } |
| |
| type directoryWithCtxWatchResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxWatchResponse = _bindings.CreateLazyMarshaler(directoryWithCtxWatchResponse{}) |
| |
| func (msg *directoryWithCtxWatchResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxWatchResponse |
| } |
| |
| type directoryWithCtxCloseResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result fuchsiaunknown.CloseableCloseResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxCloseResponse = _bindings.CreateLazyMarshaler(directoryWithCtxCloseResponse{}) |
| |
| func (msg *directoryWithCtxCloseResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxCloseResponse |
| } |
| |
| type directoryWithCtxQueryResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Identifies the underlying protocol. |
| Protocol []uint8 `fidl_offset_v2:"0" fidl_bounds:""` |
| } |
| |
| var _mdirectoryWithCtxQueryResponse = _bindings.CreateLazyMarshaler(directoryWithCtxQueryResponse{}) |
| |
| func (msg *directoryWithCtxQueryResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxQueryResponse |
| } |
| |
| type directoryWithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Requests rights on the new connection according to the specified rules. |
| // |
| // If absent, inherits the rights from the connection where the call |
| // is made. |
| RightsRequest *RightsRequest `fidl_offset_v2:"0"` |
| ObjectRequest NodeWithCtxInterfaceRequest `fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxReopenRequest = _bindings.CreateLazyMarshaler(directoryWithCtxReopenRequest{}) |
| |
| func (msg *directoryWithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxReopenRequest |
| } |
| |
| type directoryWithCtxOnRepresentationResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Payload Representation `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxOnRepresentationResponse = _bindings.CreateLazyMarshaler(directoryWithCtxOnRepresentationResponse{}) |
| |
| func (msg *directoryWithCtxOnRepresentationResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxOnRepresentationResponse |
| } |
| |
| type directoryWithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| // Set the corresponding bit to one to query that particular attribute. |
| // |
| // The elements here correspond one-to-one with [`NodeAttributes`]. |
| Query NodeAttributesQuery `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_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2GetAttributesResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetAttributesResponse{}) |
| |
| func (msg *directoryWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxGetAttributesResponse |
| } |
| |
| type directoryWithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2UpdateAttributesResult `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_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2SyncResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxSyncResponse = _bindings.CreateLazyMarshaler(directoryWithCtxSyncResponse{}) |
| |
| func (msg *directoryWithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxSyncResponse |
| } |
| |
| type directoryWithCtxAdvisoryLockRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Request AdvisoryLockRequest `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxAdvisoryLockRequest = _bindings.CreateLazyMarshaler(directoryWithCtxAdvisoryLockRequest{}) |
| |
| func (msg *directoryWithCtxAdvisoryLockRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxAdvisoryLockRequest |
| } |
| |
| type directoryWithCtxAdvisoryLockResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result AdvisoryLockingAdvisoryLockResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(directoryWithCtxAdvisoryLockResponse{}) |
| |
| func (msg *directoryWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxAdvisoryLockResponse |
| } |
| |
| type directoryWithCtxOpen2Request struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"40" fidl_alignment_v2:"8"` |
| // Identifies the node to open. |
| // |
| // If it contains multiple segments, then the directory is traversed, |
| // one segment at a time, relative to the directory represented by this |
| // connection. |
| Path string `fidl_offset_v2:"0" fidl_bounds:"4095"` |
| // The representations accepted by the caller to support a form of |
| // protocol negotiation on the node being opened. |
| Protocols ConnectionProtocols `fidl_offset_v2:"16"` |
| // 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. |
| ObjectRequest _zx.Channel `fidl_offset_v2:"32" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mdirectoryWithCtxOpen2Request = _bindings.CreateLazyMarshaler(directoryWithCtxOpen2Request{}) |
| |
| func (msg *directoryWithCtxOpen2Request) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxOpen2Request |
| } |
| |
| type directoryWithCtxAddInotifyFilterRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| Path string `fidl_offset_v2:"0" fidl_bounds:"4095"` |
| Filter InotifyWatchMask `fidl_offset_v2:"16"` |
| WatchDescriptor uint32 `fidl_offset_v2:"20"` |
| Socket _zx.Socket `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_v2:"32" fidl_alignment_v2:"8"` |
| Name string `fidl_offset_v2:"0" fidl_bounds:"255"` |
| Options UnlinkOptions `fidl_offset_v2:"16"` |
| } |
| |
| var _mdirectoryWithCtxUnlinkRequest = _bindings.CreateLazyMarshaler(directoryWithCtxUnlinkRequest{}) |
| |
| func (msg *directoryWithCtxUnlinkRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxUnlinkRequest |
| } |
| |
| type directoryWithCtxUnlinkResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Directory2UnlinkResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxUnlinkResponse = _bindings.CreateLazyMarshaler(directoryWithCtxUnlinkResponse{}) |
| |
| func (msg *directoryWithCtxUnlinkResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxUnlinkResponse |
| } |
| |
| type directoryWithCtxEnumerateRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Options DirectoryEnumerateOptions `fidl_offset_v2:"0"` |
| Iterator DirectoryIteratorWithCtxInterfaceRequest `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_v2:"40" fidl_alignment_v2:"8"` |
| Src string `fidl_offset_v2:"0" fidl_bounds:"255"` |
| DstParentToken _zx.Event `fidl_offset_v2:"16" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| Dst string `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_v2:"16" fidl_alignment_v2:"8"` |
| Result Directory2RenameResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryWithCtxRenameResponse = _bindings.CreateLazyMarshaler(directoryWithCtxRenameResponse{}) |
| |
| func (msg *directoryWithCtxRenameResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryWithCtxRenameResponse |
| } |
| |
| type directory1WithCtxCloneRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| Object NodeWithCtxInterfaceRequest `fidl_offset_v2:"4" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectory1WithCtxCloneRequest = _bindings.CreateLazyMarshaler(directory1WithCtxCloneRequest{}) |
| |
| func (msg *directory1WithCtxCloneRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxCloneRequest |
| } |
| |
| type directory1WithCtxOnOpenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *NodeInfoDeprecated `fidl_offset_v2:"8"` |
| } |
| |
| var _mdirectory1WithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(directory1WithCtxOnOpenResponse{}) |
| |
| func (msg *directory1WithCtxOnOpenResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxOnOpenResponse |
| } |
| |
| type directory1WithCtxGetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mdirectory1WithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(directory1WithCtxGetAttrResponse{}) |
| |
| func (msg *directory1WithCtxGetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxGetAttrResponse |
| } |
| |
| type directory1WithCtxSetAttrRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| Flags NodeAttributeFlags `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mdirectory1WithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(directory1WithCtxSetAttrRequest{}) |
| |
| func (msg *directory1WithCtxSetAttrRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxSetAttrRequest |
| } |
| |
| type directory1WithCtxSetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory1WithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(directory1WithCtxSetAttrResponse{}) |
| |
| func (msg *directory1WithCtxSetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxSetAttrResponse |
| } |
| |
| type directory1WithCtxGetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| Flags OpenFlags `fidl_offset_v2:"4"` |
| } |
| |
| var _mdirectory1WithCtxGetFlagsResponse = _bindings.CreateLazyMarshaler(directory1WithCtxGetFlagsResponse{}) |
| |
| func (msg *directory1WithCtxGetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxGetFlagsResponse |
| } |
| |
| type directory1WithCtxSetFlagsRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory1WithCtxSetFlagsRequest = _bindings.CreateLazyMarshaler(directory1WithCtxSetFlagsRequest{}) |
| |
| func (msg *directory1WithCtxSetFlagsRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxSetFlagsRequest |
| } |
| |
| type directory1WithCtxSetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory1WithCtxSetFlagsResponse = _bindings.CreateLazyMarshaler(directory1WithCtxSetFlagsResponse{}) |
| |
| func (msg *directory1WithCtxSetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxSetFlagsResponse |
| } |
| |
| type directory1WithCtxQueryFilesystemResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *FilesystemInfo `fidl_offset_v2:"8"` |
| } |
| |
| var _mdirectory1WithCtxQueryFilesystemResponse = _bindings.CreateLazyMarshaler(directory1WithCtxQueryFilesystemResponse{}) |
| |
| func (msg *directory1WithCtxQueryFilesystemResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxQueryFilesystemResponse |
| } |
| |
| type directory1WithCtxOpenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| Mode ModeType `fidl_offset_v2:"4"` |
| Path string `fidl_offset_v2:"8" fidl_bounds:"4096"` |
| Object NodeWithCtxInterfaceRequest `fidl_offset_v2:"24" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectory1WithCtxOpenRequest = _bindings.CreateLazyMarshaler(directory1WithCtxOpenRequest{}) |
| |
| func (msg *directory1WithCtxOpenRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxOpenRequest |
| } |
| |
| type directory1WithCtxReadDirentsRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| MaxBytes uint64 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory1WithCtxReadDirentsRequest = _bindings.CreateLazyMarshaler(directory1WithCtxReadDirentsRequest{}) |
| |
| func (msg *directory1WithCtxReadDirentsRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxReadDirentsRequest |
| } |
| |
| type directory1WithCtxReadDirentsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Dirents []uint8 `fidl_offset_v2:"8" fidl_bounds:"8192"` |
| } |
| |
| var _mdirectory1WithCtxReadDirentsResponse = _bindings.CreateLazyMarshaler(directory1WithCtxReadDirentsResponse{}) |
| |
| func (msg *directory1WithCtxReadDirentsResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxReadDirentsResponse |
| } |
| |
| type directory1WithCtxRewindResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory1WithCtxRewindResponse = _bindings.CreateLazyMarshaler(directory1WithCtxRewindResponse{}) |
| |
| func (msg *directory1WithCtxRewindResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxRewindResponse |
| } |
| |
| type directory1WithCtxGetTokenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| Token _zx.Handle `fidl_offset_v2:"4" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"1"` |
| } |
| |
| var _mdirectory1WithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(directory1WithCtxGetTokenResponse{}) |
| |
| func (msg *directory1WithCtxGetTokenResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxGetTokenResponse |
| } |
| |
| type directory1WithCtxLinkRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"40" fidl_alignment_v2:"8"` |
| Src string `fidl_offset_v2:"0" fidl_bounds:"255"` |
| DstParentToken _zx.Handle `fidl_offset_v2:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| Dst string `fidl_offset_v2:"24" fidl_bounds:"255"` |
| } |
| |
| var _mdirectory1WithCtxLinkRequest = _bindings.CreateLazyMarshaler(directory1WithCtxLinkRequest{}) |
| |
| func (msg *directory1WithCtxLinkRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxLinkRequest |
| } |
| |
| type directory1WithCtxLinkResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory1WithCtxLinkResponse = _bindings.CreateLazyMarshaler(directory1WithCtxLinkResponse{}) |
| |
| func (msg *directory1WithCtxLinkResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxLinkResponse |
| } |
| |
| type directory1WithCtxWatchRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"12" fidl_alignment_v2:"4"` |
| Mask WatchMask `fidl_offset_v2:"0"` |
| Options uint32 `fidl_offset_v2:"4"` |
| Watcher DirectoryWatcherWithCtxInterfaceRequest `fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectory1WithCtxWatchRequest = _bindings.CreateLazyMarshaler(directory1WithCtxWatchRequest{}) |
| |
| func (msg *directory1WithCtxWatchRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxWatchRequest |
| } |
| |
| type directory1WithCtxWatchResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory1WithCtxWatchResponse = _bindings.CreateLazyMarshaler(directory1WithCtxWatchResponse{}) |
| |
| func (msg *directory1WithCtxWatchResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory1WithCtxWatchResponse |
| } |
| |
| type directory2WithCtxCloseResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result fuchsiaunknown.CloseableCloseResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxCloseResponse = _bindings.CreateLazyMarshaler(directory2WithCtxCloseResponse{}) |
| |
| func (msg *directory2WithCtxCloseResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxCloseResponse |
| } |
| |
| type directory2WithCtxQueryResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Identifies the underlying protocol. |
| Protocol []uint8 `fidl_offset_v2:"0" fidl_bounds:""` |
| } |
| |
| var _mdirectory2WithCtxQueryResponse = _bindings.CreateLazyMarshaler(directory2WithCtxQueryResponse{}) |
| |
| func (msg *directory2WithCtxQueryResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxQueryResponse |
| } |
| |
| type directory2WithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Requests rights on the new connection according to the specified rules. |
| // |
| // If absent, inherits the rights from the connection where the call |
| // is made. |
| RightsRequest *RightsRequest `fidl_offset_v2:"0"` |
| ObjectRequest NodeWithCtxInterfaceRequest `fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectory2WithCtxReopenRequest = _bindings.CreateLazyMarshaler(directory2WithCtxReopenRequest{}) |
| |
| func (msg *directory2WithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxReopenRequest |
| } |
| |
| type directory2WithCtxOnRepresentationResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Payload Representation `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxOnRepresentationResponse = _bindings.CreateLazyMarshaler(directory2WithCtxOnRepresentationResponse{}) |
| |
| func (msg *directory2WithCtxOnRepresentationResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxOnRepresentationResponse |
| } |
| |
| type directory2WithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| // Set the corresponding bit to one to query that particular attribute. |
| // |
| // The elements here correspond one-to-one with [`NodeAttributes`]. |
| Query NodeAttributesQuery `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(directory2WithCtxGetAttributesRequest{}) |
| |
| func (msg *directory2WithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxGetAttributesRequest |
| } |
| |
| type directory2WithCtxGetAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2GetAttributesResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(directory2WithCtxGetAttributesResponse{}) |
| |
| func (msg *directory2WithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxGetAttributesResponse |
| } |
| |
| type directory2WithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2UpdateAttributesResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(directory2WithCtxUpdateAttributesResponse{}) |
| |
| func (msg *directory2WithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxUpdateAttributesResponse |
| } |
| |
| type directory2WithCtxSyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2SyncResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxSyncResponse = _bindings.CreateLazyMarshaler(directory2WithCtxSyncResponse{}) |
| |
| func (msg *directory2WithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxSyncResponse |
| } |
| |
| type directory2WithCtxAdvisoryLockRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Request AdvisoryLockRequest `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxAdvisoryLockRequest = _bindings.CreateLazyMarshaler(directory2WithCtxAdvisoryLockRequest{}) |
| |
| func (msg *directory2WithCtxAdvisoryLockRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxAdvisoryLockRequest |
| } |
| |
| type directory2WithCtxAdvisoryLockResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result AdvisoryLockingAdvisoryLockResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(directory2WithCtxAdvisoryLockResponse{}) |
| |
| func (msg *directory2WithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxAdvisoryLockResponse |
| } |
| |
| type directory2WithCtxOpen2Request struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"40" fidl_alignment_v2:"8"` |
| // Identifies the node to open. |
| // |
| // If it contains multiple segments, then the directory is traversed, |
| // one segment at a time, relative to the directory represented by this |
| // connection. |
| Path string `fidl_offset_v2:"0" fidl_bounds:"4095"` |
| // The representations accepted by the caller to support a form of |
| // protocol negotiation on the node being opened. |
| Protocols ConnectionProtocols `fidl_offset_v2:"16"` |
| // 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. |
| ObjectRequest _zx.Channel `fidl_offset_v2:"32" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mdirectory2WithCtxOpen2Request = _bindings.CreateLazyMarshaler(directory2WithCtxOpen2Request{}) |
| |
| func (msg *directory2WithCtxOpen2Request) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxOpen2Request |
| } |
| |
| type directory2WithCtxAddInotifyFilterRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| Path string `fidl_offset_v2:"0" fidl_bounds:"4095"` |
| Filter InotifyWatchMask `fidl_offset_v2:"16"` |
| WatchDescriptor uint32 `fidl_offset_v2:"20"` |
| Socket _zx.Socket `fidl_offset_v2:"24" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| } |
| |
| var _mdirectory2WithCtxAddInotifyFilterRequest = _bindings.CreateLazyMarshaler(directory2WithCtxAddInotifyFilterRequest{}) |
| |
| func (msg *directory2WithCtxAddInotifyFilterRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxAddInotifyFilterRequest |
| } |
| |
| type directory2WithCtxUnlinkRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| Name string `fidl_offset_v2:"0" fidl_bounds:"255"` |
| Options UnlinkOptions `fidl_offset_v2:"16"` |
| } |
| |
| var _mdirectory2WithCtxUnlinkRequest = _bindings.CreateLazyMarshaler(directory2WithCtxUnlinkRequest{}) |
| |
| func (msg *directory2WithCtxUnlinkRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxUnlinkRequest |
| } |
| |
| type directory2WithCtxUnlinkResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Directory2UnlinkResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxUnlinkResponse = _bindings.CreateLazyMarshaler(directory2WithCtxUnlinkResponse{}) |
| |
| func (msg *directory2WithCtxUnlinkResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxUnlinkResponse |
| } |
| |
| type directory2WithCtxEnumerateRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| Options DirectoryEnumerateOptions `fidl_offset_v2:"0"` |
| Iterator DirectoryIteratorWithCtxInterfaceRequest `fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mdirectory2WithCtxEnumerateRequest = _bindings.CreateLazyMarshaler(directory2WithCtxEnumerateRequest{}) |
| |
| func (msg *directory2WithCtxEnumerateRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxEnumerateRequest |
| } |
| |
| type directory2WithCtxRenameRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"40" fidl_alignment_v2:"8"` |
| Src string `fidl_offset_v2:"0" fidl_bounds:"255"` |
| DstParentToken _zx.Event `fidl_offset_v2:"16" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"` |
| Dst string `fidl_offset_v2:"24" fidl_bounds:"255"` |
| } |
| |
| var _mdirectory2WithCtxRenameRequest = _bindings.CreateLazyMarshaler(directory2WithCtxRenameRequest{}) |
| |
| func (msg *directory2WithCtxRenameRequest) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxRenameRequest |
| } |
| |
| type directory2WithCtxRenameResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Directory2RenameResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectory2WithCtxRenameResponse = _bindings.CreateLazyMarshaler(directory2WithCtxRenameResponse{}) |
| |
| func (msg *directory2WithCtxRenameResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectory2WithCtxRenameResponse |
| } |
| |
| type directoryIteratorWithCtxGetNextResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result DirectoryIteratorGetNextResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mdirectoryIteratorWithCtxGetNextResponse = _bindings.CreateLazyMarshaler(directoryIteratorWithCtxGetNextResponse{}) |
| |
| func (msg *directoryIteratorWithCtxGetNextResponse) Marshaler() _bindings.Marshaler { |
| return _mdirectoryIteratorWithCtxGetNextResponse |
| } |
| |
| type fileWithCtxAdvisoryLockRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Request AdvisoryLockRequest `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_v2:"16" fidl_alignment_v2:"8"` |
| Result AdvisoryLockingAdvisoryLockResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(fileWithCtxAdvisoryLockResponse{}) |
| |
| func (msg *fileWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxAdvisoryLockResponse |
| } |
| |
| type fileWithCtxCloneRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| Object NodeWithCtxInterfaceRequest `fidl_offset_v2:"4" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mfileWithCtxCloneRequest = _bindings.CreateLazyMarshaler(fileWithCtxCloneRequest{}) |
| |
| func (msg *fileWithCtxCloneRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxCloneRequest |
| } |
| |
| type fileWithCtxOnOpenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *NodeInfoDeprecated `fidl_offset_v2:"8"` |
| } |
| |
| var _mfileWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(fileWithCtxOnOpenResponse{}) |
| |
| func (msg *fileWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxOnOpenResponse |
| } |
| |
| type fileWithCtxGetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mfileWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetAttrResponse{}) |
| |
| func (msg *fileWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetAttrResponse |
| } |
| |
| type fileWithCtxSetAttrRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| Flags NodeAttributeFlags `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mfileWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(fileWithCtxSetAttrRequest{}) |
| |
| func (msg *fileWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxSetAttrRequest |
| } |
| |
| type fileWithCtxSetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(fileWithCtxSetAttrResponse{}) |
| |
| func (msg *fileWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxSetAttrResponse |
| } |
| |
| type fileWithCtxGetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| Flags OpenFlags `fidl_offset_v2:"4"` |
| } |
| |
| var _mfileWithCtxGetFlagsResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetFlagsResponse{}) |
| |
| func (msg *fileWithCtxGetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetFlagsResponse |
| } |
| |
| type fileWithCtxSetFlagsRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxSetFlagsRequest = _bindings.CreateLazyMarshaler(fileWithCtxSetFlagsRequest{}) |
| |
| func (msg *fileWithCtxSetFlagsRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxSetFlagsRequest |
| } |
| |
| type fileWithCtxSetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxSetFlagsResponse = _bindings.CreateLazyMarshaler(fileWithCtxSetFlagsResponse{}) |
| |
| func (msg *fileWithCtxSetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxSetFlagsResponse |
| } |
| |
| type fileWithCtxQueryFilesystemResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *FilesystemInfo `fidl_offset_v2:"8"` |
| } |
| |
| var _mfileWithCtxQueryFilesystemResponse = _bindings.CreateLazyMarshaler(fileWithCtxQueryFilesystemResponse{}) |
| |
| func (msg *fileWithCtxQueryFilesystemResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxQueryFilesystemResponse |
| } |
| |
| type fileWithCtxCloseResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result fuchsiaunknown.CloseableCloseResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxCloseResponse = _bindings.CreateLazyMarshaler(fileWithCtxCloseResponse{}) |
| |
| func (msg *fileWithCtxCloseResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxCloseResponse |
| } |
| |
| type fileWithCtxQueryResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Identifies the underlying protocol. |
| Protocol []uint8 `fidl_offset_v2:"0" fidl_bounds:""` |
| } |
| |
| var _mfileWithCtxQueryResponse = _bindings.CreateLazyMarshaler(fileWithCtxQueryResponse{}) |
| |
| func (msg *fileWithCtxQueryResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxQueryResponse |
| } |
| |
| type fileWithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Requests rights on the new connection according to the specified rules. |
| // |
| // If absent, inherits the rights from the connection where the call |
| // is made. |
| RightsRequest *RightsRequest `fidl_offset_v2:"0"` |
| ObjectRequest NodeWithCtxInterfaceRequest `fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mfileWithCtxReopenRequest = _bindings.CreateLazyMarshaler(fileWithCtxReopenRequest{}) |
| |
| func (msg *fileWithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxReopenRequest |
| } |
| |
| type fileWithCtxOnRepresentationResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Payload Representation `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxOnRepresentationResponse = _bindings.CreateLazyMarshaler(fileWithCtxOnRepresentationResponse{}) |
| |
| func (msg *fileWithCtxOnRepresentationResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxOnRepresentationResponse |
| } |
| |
| type fileWithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| // Set the corresponding bit to one to query that particular attribute. |
| // |
| // The elements here correspond one-to-one with [`NodeAttributes`]. |
| Query NodeAttributesQuery `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_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2GetAttributesResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetAttributesResponse{}) |
| |
| func (msg *fileWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetAttributesResponse |
| } |
| |
| type fileWithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2UpdateAttributesResult `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_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2SyncResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxSyncResponse = _bindings.CreateLazyMarshaler(fileWithCtxSyncResponse{}) |
| |
| func (msg *fileWithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxSyncResponse |
| } |
| |
| type fileWithCtxReadRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Count uint64 `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_v2:"16" fidl_alignment_v2:"8"` |
| Result ReadableReadResult `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_v2:"16" fidl_alignment_v2:"8"` |
| Data []uint8 `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_v2:"16" fidl_alignment_v2:"8"` |
| Result WritableWriteResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxWriteResponse = _bindings.CreateLazyMarshaler(fileWithCtxWriteResponse{}) |
| |
| func (msg *fileWithCtxWriteResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxWriteResponse |
| } |
| |
| type fileWithCtxSeekRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Origin SeekOrigin `fidl_offset_v2:"0"` |
| Offset int64 `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_v2:"16" fidl_alignment_v2:"8"` |
| Result FileSeekResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxSeekResponse = _bindings.CreateLazyMarshaler(fileWithCtxSeekResponse{}) |
| |
| func (msg *fileWithCtxSeekResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxSeekResponse |
| } |
| |
| type fileWithCtxReadAtRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Count uint64 `fidl_offset_v2:"0"` |
| Offset uint64 `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_v2:"16" fidl_alignment_v2:"8"` |
| Result FileReadAtResult `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_v2:"24" fidl_alignment_v2:"8"` |
| Data []uint8 `fidl_offset_v2:"0" fidl_bounds:"8192"` |
| Offset uint64 `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_v2:"16" fidl_alignment_v2:"8"` |
| Result FileWriteAtResult `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_v2:"8" fidl_alignment_v2:"8"` |
| Length uint64 `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_v2:"16" fidl_alignment_v2:"8"` |
| Result FileResizeResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxResizeResponse = _bindings.CreateLazyMarshaler(fileWithCtxResizeResponse{}) |
| |
| func (msg *fileWithCtxResizeResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxResizeResponse |
| } |
| |
| type fileWithCtxGetBackingMemoryRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| Flags VmoFlags `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxGetBackingMemoryRequest = _bindings.CreateLazyMarshaler(fileWithCtxGetBackingMemoryRequest{}) |
| |
| func (msg *fileWithCtxGetBackingMemoryRequest) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetBackingMemoryRequest |
| } |
| |
| type fileWithCtxGetBackingMemoryResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result FileGetBackingMemoryResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mfileWithCtxGetBackingMemoryResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetBackingMemoryResponse{}) |
| |
| func (msg *fileWithCtxGetBackingMemoryResponse) Marshaler() _bindings.Marshaler { |
| return _mfileWithCtxGetBackingMemoryResponse |
| } |
| |
| type nodeWithCtxCloneRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| Object NodeWithCtxInterfaceRequest `fidl_offset_v2:"4" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mnodeWithCtxCloneRequest = _bindings.CreateLazyMarshaler(nodeWithCtxCloneRequest{}) |
| |
| func (msg *nodeWithCtxCloneRequest) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxCloneRequest |
| } |
| |
| type nodeWithCtxOnOpenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *NodeInfoDeprecated `fidl_offset_v2:"8"` |
| } |
| |
| var _mnodeWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(nodeWithCtxOnOpenResponse{}) |
| |
| func (msg *nodeWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxOnOpenResponse |
| } |
| |
| type nodeWithCtxGetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mnodeWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(nodeWithCtxGetAttrResponse{}) |
| |
| func (msg *nodeWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxGetAttrResponse |
| } |
| |
| type nodeWithCtxSetAttrRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| Flags NodeAttributeFlags `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mnodeWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(nodeWithCtxSetAttrRequest{}) |
| |
| func (msg *nodeWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxSetAttrRequest |
| } |
| |
| type nodeWithCtxSetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(nodeWithCtxSetAttrResponse{}) |
| |
| func (msg *nodeWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxSetAttrResponse |
| } |
| |
| type nodeWithCtxGetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| Flags OpenFlags `fidl_offset_v2:"4"` |
| } |
| |
| var _mnodeWithCtxGetFlagsResponse = _bindings.CreateLazyMarshaler(nodeWithCtxGetFlagsResponse{}) |
| |
| func (msg *nodeWithCtxGetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxGetFlagsResponse |
| } |
| |
| type nodeWithCtxSetFlagsRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxSetFlagsRequest = _bindings.CreateLazyMarshaler(nodeWithCtxSetFlagsRequest{}) |
| |
| func (msg *nodeWithCtxSetFlagsRequest) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxSetFlagsRequest |
| } |
| |
| type nodeWithCtxSetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxSetFlagsResponse = _bindings.CreateLazyMarshaler(nodeWithCtxSetFlagsResponse{}) |
| |
| func (msg *nodeWithCtxSetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxSetFlagsResponse |
| } |
| |
| type nodeWithCtxQueryFilesystemResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *FilesystemInfo `fidl_offset_v2:"8"` |
| } |
| |
| var _mnodeWithCtxQueryFilesystemResponse = _bindings.CreateLazyMarshaler(nodeWithCtxQueryFilesystemResponse{}) |
| |
| func (msg *nodeWithCtxQueryFilesystemResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxQueryFilesystemResponse |
| } |
| |
| type nodeWithCtxCloseResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result fuchsiaunknown.CloseableCloseResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxCloseResponse = _bindings.CreateLazyMarshaler(nodeWithCtxCloseResponse{}) |
| |
| func (msg *nodeWithCtxCloseResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxCloseResponse |
| } |
| |
| type nodeWithCtxQueryResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Identifies the underlying protocol. |
| Protocol []uint8 `fidl_offset_v2:"0" fidl_bounds:""` |
| } |
| |
| var _mnodeWithCtxQueryResponse = _bindings.CreateLazyMarshaler(nodeWithCtxQueryResponse{}) |
| |
| func (msg *nodeWithCtxQueryResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxQueryResponse |
| } |
| |
| type nodeWithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Requests rights on the new connection according to the specified rules. |
| // |
| // If absent, inherits the rights from the connection where the call |
| // is made. |
| RightsRequest *RightsRequest `fidl_offset_v2:"0"` |
| ObjectRequest NodeWithCtxInterfaceRequest `fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mnodeWithCtxReopenRequest = _bindings.CreateLazyMarshaler(nodeWithCtxReopenRequest{}) |
| |
| func (msg *nodeWithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxReopenRequest |
| } |
| |
| type nodeWithCtxOnRepresentationResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Payload Representation `fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxOnRepresentationResponse = _bindings.CreateLazyMarshaler(nodeWithCtxOnRepresentationResponse{}) |
| |
| func (msg *nodeWithCtxOnRepresentationResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxOnRepresentationResponse |
| } |
| |
| type nodeWithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| // Set the corresponding bit to one to query that particular attribute. |
| // |
| // The elements here correspond one-to-one with [`NodeAttributes`]. |
| Query NodeAttributesQuery `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_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2GetAttributesResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(nodeWithCtxGetAttributesResponse{}) |
| |
| func (msg *nodeWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxGetAttributesResponse |
| } |
| |
| type nodeWithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2UpdateAttributesResult `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_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2SyncResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mnodeWithCtxSyncResponse = _bindings.CreateLazyMarshaler(nodeWithCtxSyncResponse{}) |
| |
| func (msg *nodeWithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mnodeWithCtxSyncResponse |
| } |
| |
| type node1WithCtxCloneRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| Object NodeWithCtxInterfaceRequest `fidl_offset_v2:"4" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mnode1WithCtxCloneRequest = _bindings.CreateLazyMarshaler(node1WithCtxCloneRequest{}) |
| |
| func (msg *node1WithCtxCloneRequest) Marshaler() _bindings.Marshaler { |
| return _mnode1WithCtxCloneRequest |
| } |
| |
| type node1WithCtxOnOpenResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *NodeInfoDeprecated `fidl_offset_v2:"8"` |
| } |
| |
| var _mnode1WithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(node1WithCtxOnOpenResponse{}) |
| |
| func (msg *node1WithCtxOnOpenResponse) Marshaler() _bindings.Marshaler { |
| return _mnode1WithCtxOnOpenResponse |
| } |
| |
| type node1WithCtxGetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mnode1WithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(node1WithCtxGetAttrResponse{}) |
| |
| func (msg *node1WithCtxGetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mnode1WithCtxGetAttrResponse |
| } |
| |
| type node1WithCtxSetAttrRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"64" fidl_alignment_v2:"8"` |
| Flags NodeAttributeFlags `fidl_offset_v2:"0"` |
| Attributes NodeAttributes `fidl_offset_v2:"8"` |
| } |
| |
| var _mnode1WithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(node1WithCtxSetAttrRequest{}) |
| |
| func (msg *node1WithCtxSetAttrRequest) Marshaler() _bindings.Marshaler { |
| return _mnode1WithCtxSetAttrRequest |
| } |
| |
| type node1WithCtxSetAttrResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mnode1WithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(node1WithCtxSetAttrResponse{}) |
| |
| func (msg *node1WithCtxSetAttrResponse) Marshaler() _bindings.Marshaler { |
| return _mnode1WithCtxSetAttrResponse |
| } |
| |
| type node1WithCtxGetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| Flags OpenFlags `fidl_offset_v2:"4"` |
| } |
| |
| var _mnode1WithCtxGetFlagsResponse = _bindings.CreateLazyMarshaler(node1WithCtxGetFlagsResponse{}) |
| |
| func (msg *node1WithCtxGetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mnode1WithCtxGetFlagsResponse |
| } |
| |
| type node1WithCtxSetFlagsRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| } |
| |
| var _mnode1WithCtxSetFlagsRequest = _bindings.CreateLazyMarshaler(node1WithCtxSetFlagsRequest{}) |
| |
| func (msg *node1WithCtxSetFlagsRequest) Marshaler() _bindings.Marshaler { |
| return _mnode1WithCtxSetFlagsRequest |
| } |
| |
| type node1WithCtxSetFlagsResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"4" fidl_alignment_v2:"4"` |
| S int32 `fidl_offset_v2:"0"` |
| } |
| |
| var _mnode1WithCtxSetFlagsResponse = _bindings.CreateLazyMarshaler(node1WithCtxSetFlagsResponse{}) |
| |
| func (msg *node1WithCtxSetFlagsResponse) Marshaler() _bindings.Marshaler { |
| return _mnode1WithCtxSetFlagsResponse |
| } |
| |
| type node1WithCtxQueryFilesystemResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| S int32 `fidl_offset_v2:"0"` |
| Info *FilesystemInfo `fidl_offset_v2:"8"` |
| } |
| |
| var _mnode1WithCtxQueryFilesystemResponse = _bindings.CreateLazyMarshaler(node1WithCtxQueryFilesystemResponse{}) |
| |
| func (msg *node1WithCtxQueryFilesystemResponse) Marshaler() _bindings.Marshaler { |
| return _mnode1WithCtxQueryFilesystemResponse |
| } |
| |
| type node2WithCtxCloseResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result fuchsiaunknown.CloseableCloseResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mnode2WithCtxCloseResponse = _bindings.CreateLazyMarshaler(node2WithCtxCloseResponse{}) |
| |
| func (msg *node2WithCtxCloseResponse) Marshaler() _bindings.Marshaler { |
| return _mnode2WithCtxCloseResponse |
| } |
| |
| type node2WithCtxQueryResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Identifies the underlying protocol. |
| Protocol []uint8 `fidl_offset_v2:"0" fidl_bounds:""` |
| } |
| |
| var _mnode2WithCtxQueryResponse = _bindings.CreateLazyMarshaler(node2WithCtxQueryResponse{}) |
| |
| func (msg *node2WithCtxQueryResponse) Marshaler() _bindings.Marshaler { |
| return _mnode2WithCtxQueryResponse |
| } |
| |
| type node2WithCtxReopenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // Requests rights on the new connection according to the specified rules. |
| // |
| // If absent, inherits the rights from the connection where the call |
| // is made. |
| RightsRequest *RightsRequest `fidl_offset_v2:"0"` |
| ObjectRequest NodeWithCtxInterfaceRequest `fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mnode2WithCtxReopenRequest = _bindings.CreateLazyMarshaler(node2WithCtxReopenRequest{}) |
| |
| func (msg *node2WithCtxReopenRequest) Marshaler() _bindings.Marshaler { |
| return _mnode2WithCtxReopenRequest |
| } |
| |
| type node2WithCtxOnRepresentationResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Payload Representation `fidl_offset_v2:"0"` |
| } |
| |
| var _mnode2WithCtxOnRepresentationResponse = _bindings.CreateLazyMarshaler(node2WithCtxOnRepresentationResponse{}) |
| |
| func (msg *node2WithCtxOnRepresentationResponse) Marshaler() _bindings.Marshaler { |
| return _mnode2WithCtxOnRepresentationResponse |
| } |
| |
| type node2WithCtxGetAttributesRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| // Set the corresponding bit to one to query that particular attribute. |
| // |
| // The elements here correspond one-to-one with [`NodeAttributes`]. |
| Query NodeAttributesQuery `fidl_offset_v2:"0"` |
| } |
| |
| var _mnode2WithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(node2WithCtxGetAttributesRequest{}) |
| |
| func (msg *node2WithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler { |
| return _mnode2WithCtxGetAttributesRequest |
| } |
| |
| type node2WithCtxGetAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2GetAttributesResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mnode2WithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(node2WithCtxGetAttributesResponse{}) |
| |
| func (msg *node2WithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mnode2WithCtxGetAttributesResponse |
| } |
| |
| type node2WithCtxUpdateAttributesResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2UpdateAttributesResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mnode2WithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(node2WithCtxUpdateAttributesResponse{}) |
| |
| func (msg *node2WithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler { |
| return _mnode2WithCtxUpdateAttributesResponse |
| } |
| |
| type node2WithCtxSyncResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result Node2SyncResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mnode2WithCtxSyncResponse = _bindings.CreateLazyMarshaler(node2WithCtxSyncResponse{}) |
| |
| func (msg *node2WithCtxSyncResponse) Marshaler() _bindings.Marshaler { |
| return _mnode2WithCtxSyncResponse |
| } |
| |
| type openableWithCtxOpenRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| Flags OpenFlags `fidl_offset_v2:"0"` |
| Mode ModeType `fidl_offset_v2:"4"` |
| Path string `fidl_offset_v2:"8" fidl_bounds:"4096"` |
| Object NodeWithCtxInterfaceRequest `fidl_offset_v2:"24" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _mopenableWithCtxOpenRequest = _bindings.CreateLazyMarshaler(openableWithCtxOpenRequest{}) |
| |
| func (msg *openableWithCtxOpenRequest) Marshaler() _bindings.Marshaler { |
| return _mopenableWithCtxOpenRequest |
| } |
| |
| type readableWithCtxReadRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"8" fidl_alignment_v2:"8"` |
| Count uint64 `fidl_offset_v2:"0"` |
| } |
| |
| var _mreadableWithCtxReadRequest = _bindings.CreateLazyMarshaler(readableWithCtxReadRequest{}) |
| |
| func (msg *readableWithCtxReadRequest) Marshaler() _bindings.Marshaler { |
| return _mreadableWithCtxReadRequest |
| } |
| |
| type readableWithCtxReadResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result ReadableReadResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mreadableWithCtxReadResponse = _bindings.CreateLazyMarshaler(readableWithCtxReadResponse{}) |
| |
| func (msg *readableWithCtxReadResponse) Marshaler() _bindings.Marshaler { |
| return _mreadableWithCtxReadResponse |
| } |
| |
| type writableWithCtxWriteRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Data []uint8 `fidl_offset_v2:"0" fidl_bounds:"8192"` |
| } |
| |
| var _mwritableWithCtxWriteRequest = _bindings.CreateLazyMarshaler(writableWithCtxWriteRequest{}) |
| |
| func (msg *writableWithCtxWriteRequest) Marshaler() _bindings.Marshaler { |
| return _mwritableWithCtxWriteRequest |
| } |
| |
| type writableWithCtxWriteResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result WritableWriteResult `fidl_offset_v2:"0"` |
| } |
| |
| var _mwritableWithCtxWriteResponse = _bindings.CreateLazyMarshaler(writableWithCtxWriteResponse{}) |
| |
| func (msg *writableWithCtxWriteResponse) Marshaler() _bindings.Marshaler { |
| return _mwritableWithCtxWriteResponse |
| } |
| |
| type I_advisoryLockingAdvisoryLockResultTag uint64 |
| |
| const ( |
| AdvisoryLockingAdvisoryLockResultResponse = 1 // 0x00000001 |
| AdvisoryLockingAdvisoryLockResultErr = 2 // 0x00000002 |
| ) |
| |
| type AdvisoryLockingAdvisoryLockResult struct { |
| I_advisoryLockingAdvisoryLockResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response AdvisoryLockingAdvisoryLockResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mAdvisoryLockingAdvisoryLockResult = _bindings.CreateLazyMarshaler(AdvisoryLockingAdvisoryLockResult{}) |
| |
| func (msg *AdvisoryLockingAdvisoryLockResult) Marshaler() _bindings.Marshaler { |
| return _mAdvisoryLockingAdvisoryLockResult |
| } |
| |
| 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_connectionProtocolsTag uint64 |
| |
| const ( |
| ConnectionProtocols_unknownData = 0 // 0x00000000 |
| ConnectionProtocolsConnector = 1 // 0x00000001 |
| ConnectionProtocolsNode = 2 // 0x00000002 |
| ) |
| |
| type ConnectionProtocols struct { |
| I_connectionProtocolsTag `fidl:"x" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // Requests that the node's underlying protocol be served on the |
| // connection. |
| Connector ConnectorFlags `fidl_ordinal:"1"` |
| // Requests that the underlying [`Node`] protocol be served on the |
| // connection. |
| Node NodeOptions `fidl_ordinal:"2"` |
| } |
| |
| var _mConnectionProtocols = _bindings.CreateLazyMarshaler(ConnectionProtocols{}) |
| |
| func (msg *ConnectionProtocols) Marshaler() _bindings.Marshaler { |
| return _mConnectionProtocols |
| } |
| |
| func (_m *ConnectionProtocols) reset() { |
| switch _m.I_connectionProtocolsTag { |
| case 1: |
| var _zeroed ConnectorFlags |
| _m.Connector = _zeroed |
| case 2: |
| var _zeroed NodeOptions |
| _m.Node = _zeroed |
| default: |
| var _zeroed interface{} |
| _m.I_unknownData = _zeroed |
| } |
| } |
| |
| func (_m *ConnectionProtocols) Which() I_connectionProtocolsTag { |
| switch _m.I_connectionProtocolsTag { |
| case 1: |
| return ConnectionProtocolsConnector |
| case 2: |
| return ConnectionProtocolsNode |
| default: |
| return ConnectionProtocols_unknownData |
| } |
| } |
| |
| func (_m *ConnectionProtocols) Ordinal() uint64 { |
| return uint64(_m.I_connectionProtocolsTag) |
| } |
| |
| func (_m *ConnectionProtocols) SetConnector(connector ConnectorFlags) { |
| _m.reset() |
| _m.I_connectionProtocolsTag = ConnectionProtocolsConnector |
| _m.Connector = connector |
| } |
| |
| func ConnectionProtocolsWithConnector(connector ConnectorFlags) ConnectionProtocols { |
| var _u ConnectionProtocols |
| _u.SetConnector(connector) |
| return _u |
| } |
| |
| func (_m *ConnectionProtocols) SetNode(node NodeOptions) { |
| _m.reset() |
| _m.I_connectionProtocolsTag = ConnectionProtocolsNode |
| _m.Node = node |
| } |
| |
| func ConnectionProtocolsWithNode(node NodeOptions) ConnectionProtocols { |
| var _u ConnectionProtocols |
| _u.SetNode(node) |
| return _u |
| } |
| func (_m *ConnectionProtocols) GetUnknownData() _bindings.UnknownData { |
| return _m.I_unknownData.(_bindings.UnknownData) |
| } |
| |
| type I_directory2RenameResultTag uint64 |
| |
| const ( |
| Directory2RenameResultResponse = 1 // 0x00000001 |
| Directory2RenameResultErr = 2 // 0x00000002 |
| ) |
| |
| type Directory2RenameResult struct { |
| I_directory2RenameResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response Directory2RenameResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mDirectory2RenameResult = _bindings.CreateLazyMarshaler(Directory2RenameResult{}) |
| |
| func (msg *Directory2RenameResult) Marshaler() _bindings.Marshaler { |
| return _mDirectory2RenameResult |
| } |
| |
| func (_m *Directory2RenameResult) reset() { |
| switch _m.I_directory2RenameResultTag { |
| case 1: |
| var _zeroed Directory2RenameResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *Directory2RenameResult) Which() I_directory2RenameResultTag { |
| return _m.I_directory2RenameResultTag |
| } |
| |
| func (_m *Directory2RenameResult) Ordinal() uint64 { |
| return uint64(_m.I_directory2RenameResultTag) |
| } |
| |
| func (_m *Directory2RenameResult) SetResponse(response Directory2RenameResponse) { |
| _m.reset() |
| _m.I_directory2RenameResultTag = Directory2RenameResultResponse |
| _m.Response = response |
| } |
| |
| func Directory2RenameResultWithResponse(response Directory2RenameResponse) Directory2RenameResult { |
| var _u Directory2RenameResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *Directory2RenameResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_directory2RenameResultTag = Directory2RenameResultErr |
| _m.Err = err |
| } |
| |
| func Directory2RenameResultWithErr(err int32) Directory2RenameResult { |
| var _u Directory2RenameResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_directory2UnlinkResultTag uint64 |
| |
| const ( |
| Directory2UnlinkResultResponse = 1 // 0x00000001 |
| Directory2UnlinkResultErr = 2 // 0x00000002 |
| ) |
| |
| type Directory2UnlinkResult struct { |
| I_directory2UnlinkResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response Directory2UnlinkResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mDirectory2UnlinkResult = _bindings.CreateLazyMarshaler(Directory2UnlinkResult{}) |
| |
| func (msg *Directory2UnlinkResult) Marshaler() _bindings.Marshaler { |
| return _mDirectory2UnlinkResult |
| } |
| |
| func (_m *Directory2UnlinkResult) reset() { |
| switch _m.I_directory2UnlinkResultTag { |
| case 1: |
| var _zeroed Directory2UnlinkResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *Directory2UnlinkResult) Which() I_directory2UnlinkResultTag { |
| return _m.I_directory2UnlinkResultTag |
| } |
| |
| func (_m *Directory2UnlinkResult) Ordinal() uint64 { |
| return uint64(_m.I_directory2UnlinkResultTag) |
| } |
| |
| func (_m *Directory2UnlinkResult) SetResponse(response Directory2UnlinkResponse) { |
| _m.reset() |
| _m.I_directory2UnlinkResultTag = Directory2UnlinkResultResponse |
| _m.Response = response |
| } |
| |
| func Directory2UnlinkResultWithResponse(response Directory2UnlinkResponse) Directory2UnlinkResult { |
| var _u Directory2UnlinkResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *Directory2UnlinkResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_directory2UnlinkResultTag = Directory2UnlinkResultErr |
| _m.Err = err |
| } |
| |
| func Directory2UnlinkResultWithErr(err int32) Directory2UnlinkResult { |
| var _u Directory2UnlinkResult |
| _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_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response DirectoryIteratorGetNextResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mDirectoryIteratorGetNextResult = _bindings.CreateLazyMarshaler(DirectoryIteratorGetNextResult{}) |
| |
| func (msg *DirectoryIteratorGetNextResult) Marshaler() _bindings.Marshaler { |
| return _mDirectoryIteratorGetNextResult |
| } |
| |
| 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_fileGetBackingMemoryResultTag uint64 |
| |
| const ( |
| FileGetBackingMemoryResultResponse = 1 // 0x00000001 |
| FileGetBackingMemoryResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileGetBackingMemoryResult struct { |
| I_fileGetBackingMemoryResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| Response FileGetBackingMemoryResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mFileGetBackingMemoryResult = _bindings.CreateLazyMarshaler(FileGetBackingMemoryResult{}) |
| |
| func (msg *FileGetBackingMemoryResult) Marshaler() _bindings.Marshaler { |
| return _mFileGetBackingMemoryResult |
| } |
| |
| func (_m *FileGetBackingMemoryResult) reset() { |
| switch _m.I_fileGetBackingMemoryResultTag { |
| case 1: |
| var _zeroed FileGetBackingMemoryResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *FileGetBackingMemoryResult) Which() I_fileGetBackingMemoryResultTag { |
| return _m.I_fileGetBackingMemoryResultTag |
| } |
| |
| func (_m *FileGetBackingMemoryResult) Ordinal() uint64 { |
| return uint64(_m.I_fileGetBackingMemoryResultTag) |
| } |
| |
| func (_m *FileGetBackingMemoryResult) SetResponse(response FileGetBackingMemoryResponse) { |
| _m.reset() |
| _m.I_fileGetBackingMemoryResultTag = FileGetBackingMemoryResultResponse |
| _m.Response = response |
| } |
| |
| func FileGetBackingMemoryResultWithResponse(response FileGetBackingMemoryResponse) FileGetBackingMemoryResult { |
| var _u FileGetBackingMemoryResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *FileGetBackingMemoryResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_fileGetBackingMemoryResultTag = FileGetBackingMemoryResultErr |
| _m.Err = err |
| } |
| |
| func FileGetBackingMemoryResultWithErr(err int32) FileGetBackingMemoryResult { |
| var _u FileGetBackingMemoryResult |
| _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_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileReadAtResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mFileReadAtResult = _bindings.CreateLazyMarshaler(FileReadAtResult{}) |
| |
| func (msg *FileReadAtResult) Marshaler() _bindings.Marshaler { |
| return _mFileReadAtResult |
| } |
| |
| 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_fileResizeResultTag uint64 |
| |
| const ( |
| FileResizeResultResponse = 1 // 0x00000001 |
| FileResizeResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileResizeResult struct { |
| I_fileResizeResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileResizeResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mFileResizeResult = _bindings.CreateLazyMarshaler(FileResizeResult{}) |
| |
| func (msg *FileResizeResult) Marshaler() _bindings.Marshaler { |
| return _mFileResizeResult |
| } |
| |
| 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_fileSeekResultTag uint64 |
| |
| const ( |
| FileSeekResultResponse = 1 // 0x00000001 |
| FileSeekResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileSeekResult struct { |
| I_fileSeekResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileSeekResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mFileSeekResult = _bindings.CreateLazyMarshaler(FileSeekResult{}) |
| |
| func (msg *FileSeekResult) Marshaler() _bindings.Marshaler { |
| return _mFileSeekResult |
| } |
| |
| 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_fileWriteAtResultTag uint64 |
| |
| const ( |
| FileWriteAtResultResponse = 1 // 0x00000001 |
| FileWriteAtResultErr = 2 // 0x00000002 |
| ) |
| |
| type FileWriteAtResult struct { |
| I_fileWriteAtResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response FileWriteAtResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mFileWriteAtResult = _bindings.CreateLazyMarshaler(FileWriteAtResult{}) |
| |
| func (msg *FileWriteAtResult) Marshaler() _bindings.Marshaler { |
| return _mFileWriteAtResult |
| } |
| |
| 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_node2GetAttributesResultTag uint64 |
| |
| const ( |
| Node2GetAttributesResultResponse = 1 // 0x00000001 |
| Node2GetAttributesResultErr = 2 // 0x00000002 |
| ) |
| |
| type Node2GetAttributesResult struct { |
| I_node2GetAttributesResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response NodeAttributes2 `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mNode2GetAttributesResult = _bindings.CreateLazyMarshaler(Node2GetAttributesResult{}) |
| |
| func (msg *Node2GetAttributesResult) Marshaler() _bindings.Marshaler { |
| return _mNode2GetAttributesResult |
| } |
| |
| func (_m *Node2GetAttributesResult) reset() { |
| switch _m.I_node2GetAttributesResultTag { |
| case 1: |
| var _zeroed NodeAttributes2 |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *Node2GetAttributesResult) Which() I_node2GetAttributesResultTag { |
| return _m.I_node2GetAttributesResultTag |
| } |
| |
| func (_m *Node2GetAttributesResult) Ordinal() uint64 { |
| return uint64(_m.I_node2GetAttributesResultTag) |
| } |
| |
| func (_m *Node2GetAttributesResult) SetResponse(response NodeAttributes2) { |
| _m.reset() |
| _m.I_node2GetAttributesResultTag = Node2GetAttributesResultResponse |
| _m.Response = response |
| } |
| |
| func Node2GetAttributesResultWithResponse(response NodeAttributes2) Node2GetAttributesResult { |
| var _u Node2GetAttributesResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *Node2GetAttributesResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_node2GetAttributesResultTag = Node2GetAttributesResultErr |
| _m.Err = err |
| } |
| |
| func Node2GetAttributesResultWithErr(err int32) Node2GetAttributesResult { |
| var _u Node2GetAttributesResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_node2SyncResultTag uint64 |
| |
| const ( |
| Node2SyncResultResponse = 1 // 0x00000001 |
| Node2SyncResultErr = 2 // 0x00000002 |
| ) |
| |
| type Node2SyncResult struct { |
| I_node2SyncResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response Node2SyncResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mNode2SyncResult = _bindings.CreateLazyMarshaler(Node2SyncResult{}) |
| |
| func (msg *Node2SyncResult) Marshaler() _bindings.Marshaler { |
| return _mNode2SyncResult |
| } |
| |
| func (_m *Node2SyncResult) reset() { |
| switch _m.I_node2SyncResultTag { |
| case 1: |
| var _zeroed Node2SyncResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *Node2SyncResult) Which() I_node2SyncResultTag { |
| return _m.I_node2SyncResultTag |
| } |
| |
| func (_m *Node2SyncResult) Ordinal() uint64 { |
| return uint64(_m.I_node2SyncResultTag) |
| } |
| |
| func (_m *Node2SyncResult) SetResponse(response Node2SyncResponse) { |
| _m.reset() |
| _m.I_node2SyncResultTag = Node2SyncResultResponse |
| _m.Response = response |
| } |
| |
| func Node2SyncResultWithResponse(response Node2SyncResponse) Node2SyncResult { |
| var _u Node2SyncResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *Node2SyncResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_node2SyncResultTag = Node2SyncResultErr |
| _m.Err = err |
| } |
| |
| func Node2SyncResultWithErr(err int32) Node2SyncResult { |
| var _u Node2SyncResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_node2UpdateAttributesResultTag uint64 |
| |
| const ( |
| Node2UpdateAttributesResultResponse = 1 // 0x00000001 |
| Node2UpdateAttributesResultErr = 2 // 0x00000002 |
| ) |
| |
| type Node2UpdateAttributesResult struct { |
| I_node2UpdateAttributesResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response Node2UpdateAttributesResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mNode2UpdateAttributesResult = _bindings.CreateLazyMarshaler(Node2UpdateAttributesResult{}) |
| |
| func (msg *Node2UpdateAttributesResult) Marshaler() _bindings.Marshaler { |
| return _mNode2UpdateAttributesResult |
| } |
| |
| func (_m *Node2UpdateAttributesResult) reset() { |
| switch _m.I_node2UpdateAttributesResultTag { |
| case 1: |
| var _zeroed Node2UpdateAttributesResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *Node2UpdateAttributesResult) Which() I_node2UpdateAttributesResultTag { |
| return _m.I_node2UpdateAttributesResultTag |
| } |
| |
| func (_m *Node2UpdateAttributesResult) Ordinal() uint64 { |
| return uint64(_m.I_node2UpdateAttributesResultTag) |
| } |
| |
| func (_m *Node2UpdateAttributesResult) SetResponse(response Node2UpdateAttributesResponse) { |
| _m.reset() |
| _m.I_node2UpdateAttributesResultTag = Node2UpdateAttributesResultResponse |
| _m.Response = response |
| } |
| |
| func Node2UpdateAttributesResultWithResponse(response Node2UpdateAttributesResponse) Node2UpdateAttributesResult { |
| var _u Node2UpdateAttributesResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *Node2UpdateAttributesResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_node2UpdateAttributesResultTag = Node2UpdateAttributesResultErr |
| _m.Err = err |
| } |
| |
| func Node2UpdateAttributesResultWithErr(err int32) Node2UpdateAttributesResult { |
| var _u Node2UpdateAttributesResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_nodeInfoDeprecatedTag uint64 |
| |
| const ( |
| NodeInfoDeprecatedService = 1 // 0x00000001 |
| NodeInfoDeprecatedFile = 2 // 0x00000002 |
| NodeInfoDeprecatedDirectory = 3 // 0x00000003 |
| ) |
| |
| type NodeInfoDeprecated struct { |
| I_nodeInfoDeprecatedTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| // No protocol information was supplied by the connection. |
| Service Service `fidl_ordinal:"1"` |
| // The connection composes [`File`]. |
| File FileObject `fidl_ordinal:"2"` |
| // The connection composes [`Directory`]. |
| Directory DirectoryObject `fidl_ordinal:"3"` |
| } |
| |
| var _mNodeInfoDeprecated = _bindings.CreateLazyMarshaler(NodeInfoDeprecated{}) |
| |
| func (msg *NodeInfoDeprecated) Marshaler() _bindings.Marshaler { |
| return _mNodeInfoDeprecated |
| } |
| |
| func (_m *NodeInfoDeprecated) reset() { |
| switch _m.I_nodeInfoDeprecatedTag { |
| case 1: |
| var _zeroed Service |
| _m.Service = _zeroed |
| case 2: |
| var _zeroed FileObject |
| _m.File = _zeroed |
| case 3: |
| var _zeroed DirectoryObject |
| _m.Directory = _zeroed |
| } |
| } |
| |
| func (_m *NodeInfoDeprecated) Which() I_nodeInfoDeprecatedTag { |
| return _m.I_nodeInfoDeprecatedTag |
| } |
| |
| func (_m *NodeInfoDeprecated) Ordinal() uint64 { |
| return uint64(_m.I_nodeInfoDeprecatedTag) |
| } |
| |
| func (_m *NodeInfoDeprecated) SetService(service Service) { |
| _m.reset() |
| _m.I_nodeInfoDeprecatedTag = NodeInfoDeprecatedService |
| _m.Service = service |
| } |
| |
| func NodeInfoDeprecatedWithService(service Service) NodeInfoDeprecated { |
| var _u NodeInfoDeprecated |
| _u.SetService(service) |
| return _u |
| } |
| |
| func (_m *NodeInfoDeprecated) SetFile(file FileObject) { |
| _m.reset() |
| _m.I_nodeInfoDeprecatedTag = NodeInfoDeprecatedFile |
| _m.File = file |
| } |
| |
| func NodeInfoDeprecatedWithFile(file FileObject) NodeInfoDeprecated { |
| var _u NodeInfoDeprecated |
| _u.SetFile(file) |
| return _u |
| } |
| |
| func (_m *NodeInfoDeprecated) SetDirectory(directory DirectoryObject) { |
| _m.reset() |
| _m.I_nodeInfoDeprecatedTag = NodeInfoDeprecatedDirectory |
| _m.Directory = directory |
| } |
| |
| func NodeInfoDeprecatedWithDirectory(directory DirectoryObject) NodeInfoDeprecated { |
| var _u NodeInfoDeprecated |
| _u.SetDirectory(directory) |
| return _u |
| } |
| |
| type I_readableReadResultTag uint64 |
| |
| const ( |
| ReadableReadResultResponse = 1 // 0x00000001 |
| ReadableReadResultErr = 2 // 0x00000002 |
| ) |
| |
| type ReadableReadResult struct { |
| I_readableReadResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response ReadableReadResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mReadableReadResult = _bindings.CreateLazyMarshaler(ReadableReadResult{}) |
| |
| func (msg *ReadableReadResult) Marshaler() _bindings.Marshaler { |
| return _mReadableReadResult |
| } |
| |
| func (_m *ReadableReadResult) reset() { |
| switch _m.I_readableReadResultTag { |
| case 1: |
| var _zeroed ReadableReadResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *ReadableReadResult) Which() I_readableReadResultTag { |
| return _m.I_readableReadResultTag |
| } |
| |
| func (_m *ReadableReadResult) Ordinal() uint64 { |
| return uint64(_m.I_readableReadResultTag) |
| } |
| |
| func (_m *ReadableReadResult) SetResponse(response ReadableReadResponse) { |
| _m.reset() |
| _m.I_readableReadResultTag = ReadableReadResultResponse |
| _m.Response = response |
| } |
| |
| func ReadableReadResultWithResponse(response ReadableReadResponse) ReadableReadResult { |
| var _u ReadableReadResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *ReadableReadResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_readableReadResultTag = ReadableReadResultErr |
| _m.Err = err |
| } |
| |
| func ReadableReadResultWithErr(err int32) ReadableReadResult { |
| var _u ReadableReadResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_representationTag uint64 |
| |
| const ( |
| Representation_unknownData = 0 // 0x00000000 |
| RepresentationConnector = 1 // 0x00000001 |
| RepresentationDirectory = 2 // 0x00000002 |
| RepresentationFile = 3 // 0x00000003 |
| ) |
| |
| type Representation struct { |
| I_representationTag `fidl:"x" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // 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 |
| // [`Node2`]. |
| // |
| // See [`NodeProtocolKinds.CONNECTOR`]. |
| Connector ConnectorInfo `fidl_ordinal:"1"` |
| // Auxiliary data for the directory representation of a node. The |
| // selection of this variant in [`Representation`] implies that the |
| // connection speaks the [`Directory`] protocol. |
| // |
| // See [`NodeProtocolKinds.DIRECTORY`]. |
| Directory DirectoryInfo `fidl_ordinal:"2"` |
| // Auxiliary data for the file representation of a node. The |
| // selection of this variant in [`Representation`] implies that the |
| // connection speaks the [`File`] protocol. |
| // |
| // See [`NodeProtocolKinds.FILE`]. |
| File FileInfo `fidl_ordinal:"3"` |
| } |
| |
| var _mRepresentation = _bindings.CreateLazyMarshaler(Representation{}) |
| |
| func (msg *Representation) Marshaler() _bindings.Marshaler { |
| return _mRepresentation |
| } |
| |
| 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 |
| 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 |
| 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) GetUnknownData() _bindings.UnknownData { |
| return _m.I_unknownData.(_bindings.UnknownData) |
| } |
| |
| type I_writableWriteResultTag uint64 |
| |
| const ( |
| WritableWriteResultResponse = 1 // 0x00000001 |
| WritableWriteResultErr = 2 // 0x00000002 |
| ) |
| |
| type WritableWriteResult struct { |
| I_writableWriteResultTag `fidl:"x!" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| Response WritableWriteResponse `fidl_ordinal:"1"` |
| Err int32 `fidl_ordinal:"2"` |
| } |
| |
| var _mWritableWriteResult = _bindings.CreateLazyMarshaler(WritableWriteResult{}) |
| |
| func (msg *WritableWriteResult) Marshaler() _bindings.Marshaler { |
| return _mWritableWriteResult |
| } |
| |
| func (_m *WritableWriteResult) reset() { |
| switch _m.I_writableWriteResultTag { |
| case 1: |
| var _zeroed WritableWriteResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed int32 |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *WritableWriteResult) Which() I_writableWriteResultTag { |
| return _m.I_writableWriteResultTag |
| } |
| |
| func (_m *WritableWriteResult) Ordinal() uint64 { |
| return uint64(_m.I_writableWriteResultTag) |
| } |
| |
| func (_m *WritableWriteResult) SetResponse(response WritableWriteResponse) { |
| _m.reset() |
| _m.I_writableWriteResultTag = WritableWriteResultResponse |
| _m.Response = response |
| } |
| |
| func WritableWriteResultWithResponse(response WritableWriteResponse) WritableWriteResult { |
| var _u WritableWriteResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *WritableWriteResult) SetErr(err int32) { |
| _m.reset() |
| _m.I_writableWriteResultTag = WritableWriteResultErr |
| _m.Err = err |
| } |
| |
| func WritableWriteResultWithErr(err int32) WritableWriteResult { |
| var _u WritableWriteResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type AdvisoryLockRequest struct { |
| _ struct{} `fidl:"t" 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. |
| // |
| // The range can extend beyond the end of the file but cannot extend beyond |
| // the beginning of the file. |
| // |
| // 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 |
| } |
| |
| var _mAdvisoryLockRequest = _bindings.CreateLazyMarshaler(AdvisoryLockRequest{}) |
| |
| func (msg *AdvisoryLockRequest) Marshaler() _bindings.Marshaler { |
| return _mAdvisoryLockRequest |
| } |
| |
| 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) |
| } |
| |
| type ConnectionInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // 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:"1"` |
| RightsPresent bool |
| } |
| |
| var _mConnectionInfo = _bindings.CreateLazyMarshaler(ConnectionInfo{}) |
| |
| func (msg *ConnectionInfo) Marshaler() _bindings.Marshaler { |
| return _mConnectionInfo |
| } |
| |
| 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) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *ConnectionInfo) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| type ConnectorInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| } |
| |
| var _mConnectorInfo = _bindings.CreateLazyMarshaler(ConnectorInfo{}) |
| |
| func (msg *ConnectorInfo) Marshaler() _bindings.Marshaler { |
| return _mConnectorInfo |
| } |
| |
| 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) |
| } |
| |
| type DirectoryEntry struct { |
| _ struct{} `fidl:"t" 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 NodeProtocolKinds `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 [`Id`]. |
| // This `id` should be unique among all entries of a directory. |
| Id uint64 `fidl_ordinal:"4"` |
| IdPresent bool |
| } |
| |
| var _mDirectoryEntry = _bindings.CreateLazyMarshaler(DirectoryEntry{}) |
| |
| func (msg *DirectoryEntry) Marshaler() _bindings.Marshaler { |
| return _mDirectoryEntry |
| } |
| |
| 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 NodeProtocolKinds) { |
| u.Protocols = protocols |
| u.ProtocolsPresent = true |
| } |
| |
| func (u *DirectoryEntry) GetProtocols() NodeProtocolKinds { |
| return u.Protocols |
| } |
| |
| func (u *DirectoryEntry) GetProtocolsWithDefault(_default NodeProtocolKinds) NodeProtocolKinds { |
| 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) |
| } |
| |
| type DirectoryEnumerateOptions struct { |
| _ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| } |
| |
| var _mDirectoryEnumerateOptions = _bindings.CreateLazyMarshaler(DirectoryEnumerateOptions{}) |
| |
| func (msg *DirectoryEnumerateOptions) Marshaler() _bindings.Marshaler { |
| return _mDirectoryEnumerateOptions |
| } |
| |
| 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 DirectoryInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| } |
| |
| var _mDirectoryInfo = _bindings.CreateLazyMarshaler(DirectoryInfo{}) |
| |
| func (msg *DirectoryInfo) Marshaler() _bindings.Marshaler { |
| return _mDirectoryInfo |
| } |
| |
| 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) |
| } |
| |
| // Auxiliary data for the file representation of a node. |
| type FileInfo struct { |
| _ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // True 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:"1"` |
| IsAppendPresent bool |
| // 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:"2"` |
| ObserverPresent 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 [`File`] protocol. |
| Stream _zx.Handle `fidl_handle_subtype:"31" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"3"` |
| StreamPresent bool |
| } |
| |
| var _mFileInfo = _bindings.CreateLazyMarshaler(FileInfo{}) |
| |
| func (msg *FileInfo) Marshaler() _bindings.Marshaler { |
| return _mFileInfo |
| } |
| |
| 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) 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) 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 ImmutableNodeAttributes struct { |
| _ struct{} `fidl:"t" 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`. |
| Protocols NodeProtocolKinds `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. |
| Abilities Operations `fidl_ordinal:"2"` |
| AbilitiesPresent bool |
| // Node size, in bytes. |
| ContentSize uint64 `fidl_ordinal:"3"` |
| ContentSizePresent bool |
| // Space needed to store the node (possibly larger than size), in bytes. |
| StorageSize uint64 `fidl_ordinal:"4"` |
| StorageSizePresent bool |
| // Number of hard links to the node. It must be at least one. |
| LinkCount uint64 `fidl_ordinal:"5"` |
| LinkCountPresent bool |
| // An ID for the node. See [`Id`]. |
| // This `id` should be unique among all entries of a directory. |
| Id uint64 `fidl_ordinal:"6"` |
| IdPresent bool |
| } |
| |
| var _mImmutableNodeAttributes = _bindings.CreateLazyMarshaler(ImmutableNodeAttributes{}) |
| |
| func (msg *ImmutableNodeAttributes) Marshaler() _bindings.Marshaler { |
| return _mImmutableNodeAttributes |
| } |
| |
| func (u *ImmutableNodeAttributes) SetProtocols(protocols NodeProtocolKinds) { |
| u.Protocols = protocols |
| u.ProtocolsPresent = true |
| } |
| |
| func (u *ImmutableNodeAttributes) GetProtocols() NodeProtocolKinds { |
| return u.Protocols |
| } |
| |
| func (u *ImmutableNodeAttributes) GetProtocolsWithDefault(_default NodeProtocolKinds) NodeProtocolKinds { |
| if !u.HasProtocols() { |
| return _default |
| } |
| return u.Protocols |
| } |
| |
| func (u *ImmutableNodeAttributes) HasProtocols() bool { |
| return u.ProtocolsPresent |
| } |
| |
| func (u *ImmutableNodeAttributes) ClearProtocols() { |
| u.ProtocolsPresent = false |
| } |
| |
| func (u *ImmutableNodeAttributes) SetAbilities(abilities Operations) { |
| u.Abilities = abilities |
| u.AbilitiesPresent = true |
| } |
| |
| func (u *ImmutableNodeAttributes) GetAbilities() Operations { |
| return u.Abilities |
| } |
| |
| func (u *ImmutableNodeAttributes) GetAbilitiesWithDefault(_default Operations) Operations { |
| if !u.HasAbilities() { |
| return _default |
| } |
| return u.Abilities |
| } |
| |
| func (u *ImmutableNodeAttributes) HasAbilities() bool { |
| return u.AbilitiesPresent |
| } |
| |
| func (u *ImmutableNodeAttributes) ClearAbilities() { |
| u.AbilitiesPresent = false |
| } |
| |
| func (u *ImmutableNodeAttributes) SetContentSize(contentSize uint64) { |
| u.ContentSize = contentSize |
| u.ContentSizePresent = true |
| } |
| |
| func (u *ImmutableNodeAttributes) GetContentSize() uint64 { |
| return u.ContentSize |
| } |
| |
| func (u *ImmutableNodeAttributes) GetContentSizeWithDefault(_default uint64) uint64 { |
| if !u.HasContentSize() { |
| return _default |
| } |
| return u.ContentSize |
| } |
| |
| func (u *ImmutableNodeAttributes) HasContentSize() bool { |
| return u.ContentSizePresent |
| } |
| |
| func (u *ImmutableNodeAttributes) ClearContentSize() { |
| u.ContentSizePresent = false |
| } |
| |
| func (u *ImmutableNodeAttributes) SetStorageSize(storageSize uint64) { |
| u.StorageSize = storageSize |
| u.StorageSizePresent = true |
| } |
| |
| func (u *ImmutableNodeAttributes) GetStorageSize() uint64 { |
| return u.StorageSize |
| } |
| |
| func (u *ImmutableNodeAttributes) GetStorageSizeWithDefault(_default uint64) uint64 { |
| if !u.HasStorageSize() { |
| return _default |
| } |
| return u.StorageSize |
| } |
| |
| func (u *ImmutableNodeAttributes) HasStorageSize() bool { |
| return u.StorageSizePresent |
| } |
| |
| func (u *ImmutableNodeAttributes) ClearStorageSize() { |
| u.StorageSizePresent = false |
| } |
| |
| func (u *ImmutableNodeAttributes) SetLinkCount(linkCount uint64) { |
| u.LinkCount = linkCount |
| u.LinkCountPresent = true |
| } |
| |
| func (u *ImmutableNodeAttributes) GetLinkCount() uint64 { |
| return u.LinkCount |
| } |
| |
| func (u *ImmutableNodeAttributes) GetLinkCountWithDefault(_default uint64) uint64 { |
| if !u.HasLinkCount() { |
| return _default |
| } |
| return u.LinkCount |
| } |
| |
| func (u *ImmutableNodeAttributes) HasLinkCount() bool { |
| return u.LinkCountPresent |
| } |
| |
| func (u *ImmutableNodeAttributes) ClearLinkCount() { |
| u.LinkCountPresent = false |
| } |
| |
| func (u *ImmutableNodeAttributes) SetId(id uint64) { |
| u.Id = id |
| u.IdPresent = true |
| } |
| |
| func (u *ImmutableNodeAttributes) GetId() uint64 { |
| return u.Id |
| } |
| |
| func (u *ImmutableNodeAttributes) GetIdWithDefault(_default uint64) uint64 { |
| if !u.HasId() { |
| return _default |
| } |
| return u.Id |
| } |
| |
| func (u *ImmutableNodeAttributes) HasId() bool { |
| return u.IdPresent |
| } |
| |
| func (u *ImmutableNodeAttributes) ClearId() { |
| u.IdPresent = false |
| } |
| |
| func (u *ImmutableNodeAttributes) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *ImmutableNodeAttributes) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| type MutableNodeAttributes struct { |
| _ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // Time of creation in nanoseconds since the Unix epoch, UTC. |
| CreationTime uint64 `fidl_ordinal:"1"` |
| CreationTimePresent bool |
| // Time of last modification in nanoseconds since the Unix epoch, UTC. |
| ModificationTime uint64 `fidl_ordinal:"2"` |
| ModificationTimePresent bool |
| } |
| |
| var _mMutableNodeAttributes = _bindings.CreateLazyMarshaler(MutableNodeAttributes{}) |
| |
| func (msg *MutableNodeAttributes) Marshaler() _bindings.Marshaler { |
| return _mMutableNodeAttributes |
| } |
| |
| func (u *MutableNodeAttributes) SetCreationTime(creationTime uint64) { |
| u.CreationTime = creationTime |
| u.CreationTimePresent = true |
| } |
| |
| func (u *MutableNodeAttributes) GetCreationTime() uint64 { |
| return u.CreationTime |
| } |
| |
| func (u *MutableNodeAttributes) GetCreationTimeWithDefault(_default uint64) uint64 { |
| if !u.HasCreationTime() { |
| return _default |
| } |
| return u.CreationTime |
| } |
| |
| func (u *MutableNodeAttributes) HasCreationTime() bool { |
| return u.CreationTimePresent |
| } |
| |
| func (u *MutableNodeAttributes) ClearCreationTime() { |
| u.CreationTimePresent = false |
| } |
| |
| func (u *MutableNodeAttributes) SetModificationTime(modificationTime uint64) { |
| u.ModificationTime = modificationTime |
| u.ModificationTimePresent = true |
| } |
| |
| func (u *MutableNodeAttributes) GetModificationTime() uint64 { |
| return u.ModificationTime |
| } |
| |
| func (u *MutableNodeAttributes) GetModificationTimeWithDefault(_default uint64) uint64 { |
| if !u.HasModificationTime() { |
| return _default |
| } |
| return u.ModificationTime |
| } |
| |
| func (u *MutableNodeAttributes) HasModificationTime() bool { |
| return u.ModificationTimePresent |
| } |
| |
| func (u *MutableNodeAttributes) ClearModificationTime() { |
| u.ModificationTimePresent = false |
| } |
| |
| func (u *MutableNodeAttributes) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *MutableNodeAttributes) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| type NodeOptions struct { |
| _ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| Flags NodeFlags `fidl_ordinal:"1"` |
| FlagsPresent bool |
| // Callers 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`. |
| // |
| // If more than one protocol is present, the resultant protocol |
| // may become any one of them. Callers should specify |
| // [`NodeFlags.GET_REPRESENTATION`] to receive a |
| // [`Node.OnRepresentation`] event, in order to ascertain the |
| // protocol. |
| // |
| // If absent, indicates that the caller accepts any [`Node`] |
| // protocol (including [`Node`] itself for connector nodes, for |
| // instance). |
| Protocols NodeProtocols `fidl_ordinal:"2"` |
| ProtocolsPresent bool |
| // Specifies behavior with respect to existence. If an object |
| // is to be created, its type is specified by `protocols`; it |
| // must be present. If a valid object type cannot be |
| // unambiguously inferred e.g. both `directory` and `file` are |
| // set, the request must fail. |
| Mode OpenMode `fidl_ordinal:"3"` |
| ModePresent bool |
| // Requests rights on the new connection according to the |
| // specified rules. |
| // |
| // If absent, inherits at most the rights 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. |
| RightsRequest RightsRequest `fidl_ordinal:"4"` |
| RightsRequestPresent bool |
| } |
| |
| var _mNodeOptions = _bindings.CreateLazyMarshaler(NodeOptions{}) |
| |
| func (msg *NodeOptions) Marshaler() _bindings.Marshaler { |
| return _mNodeOptions |
| } |
| |
| func (u *NodeOptions) SetFlags(flags NodeFlags) { |
| u.Flags = flags |
| u.FlagsPresent = true |
| } |
| |
| func (u *NodeOptions) GetFlags() NodeFlags { |
| return u.Flags |
| } |
| |
| func (u *NodeOptions) GetFlagsWithDefault(_default NodeFlags) NodeFlags { |
| if !u.HasFlags() { |
| return _default |
| } |
| return u.Flags |
| } |
| |
| func (u *NodeOptions) HasFlags() bool { |
| return u.FlagsPresent |
| } |
| |
| func (u *NodeOptions) ClearFlags() { |
| u.FlagsPresent = false |
| } |
| |
| func (u *NodeOptions) SetProtocols(protocols NodeProtocols) { |
| u.Protocols = protocols |
| u.ProtocolsPresent = true |
| } |
| |
| func (u *NodeOptions) GetProtocols() NodeProtocols { |
| return u.Protocols |
| } |
| |
| func (u *NodeOptions) GetProtocolsWithDefault(_default NodeProtocols) NodeProtocols { |
| if !u.HasProtocols() { |
| return _default |
| } |
| return u.Protocols |
| } |
| |
| func (u *NodeOptions) HasProtocols() bool { |
| return u.ProtocolsPresent |
| } |
| |
| func (u *NodeOptions) ClearProtocols() { |
| u.ProtocolsPresent = false |
| } |
| |
| func (u *NodeOptions) SetMode(mode OpenMode) { |
| u.Mode = mode |
| u.ModePresent = true |
| } |
| |
| func (u *NodeOptions) GetMode() OpenMode { |
| return u.Mode |
| } |
| |
| func (u *NodeOptions) GetModeWithDefault(_default OpenMode) OpenMode { |
| if !u.HasMode() { |
| return _default |
| } |
| return u.Mode |
| } |
| |
| func (u *NodeOptions) HasMode() bool { |
| return u.ModePresent |
| } |
| |
| func (u *NodeOptions) ClearMode() { |
| u.ModePresent = false |
| } |
| |
| func (u *NodeOptions) SetRightsRequest(rightsRequest RightsRequest) { |
| u.RightsRequest = rightsRequest |
| u.RightsRequestPresent = true |
| } |
| |
| func (u *NodeOptions) GetRightsRequest() RightsRequest { |
| return u.RightsRequest |
| } |
| |
| func (u *NodeOptions) GetRightsRequestWithDefault(_default RightsRequest) RightsRequest { |
| if !u.HasRightsRequest() { |
| return _default |
| } |
| return u.RightsRequest |
| } |
| |
| func (u *NodeOptions) HasRightsRequest() bool { |
| return u.RightsRequestPresent |
| } |
| |
| func (u *NodeOptions) ClearRightsRequest() { |
| u.RightsRequestPresent = false |
| } |
| |
| func (u *NodeOptions) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *NodeOptions) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| type NodeProtocols struct { |
| _ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| Directory DirectoryProtocolFlags `fidl_ordinal:"1"` |
| DirectoryPresent bool |
| File FileProtocolFlags `fidl_ordinal:"2"` |
| FilePresent bool |
| } |
| |
| var _mNodeProtocols = _bindings.CreateLazyMarshaler(NodeProtocols{}) |
| |
| func (msg *NodeProtocols) Marshaler() _bindings.Marshaler { |
| return _mNodeProtocols |
| } |
| |
| func (u *NodeProtocols) SetDirectory(directory DirectoryProtocolFlags) { |
| u.Directory = directory |
| u.DirectoryPresent = true |
| } |
| |
| func (u *NodeProtocols) GetDirectory() DirectoryProtocolFlags { |
| return u.Directory |
| } |
| |
| func (u *NodeProtocols) GetDirectoryWithDefault(_default DirectoryProtocolFlags) DirectoryProtocolFlags { |
| if !u.HasDirectory() { |
| return _default |
| } |
| return u.Directory |
| } |
| |
| func (u *NodeProtocols) HasDirectory() bool { |
| return u.DirectoryPresent |
| } |
| |
| func (u *NodeProtocols) ClearDirectory() { |
| u.DirectoryPresent = false |
| } |
| |
| func (u *NodeProtocols) SetFile(file FileProtocolFlags) { |
| u.File = file |
| u.FilePresent = true |
| } |
| |
| func (u *NodeProtocols) GetFile() FileProtocolFlags { |
| return u.File |
| } |
| |
| func (u *NodeProtocols) GetFileWithDefault(_default FileProtocolFlags) FileProtocolFlags { |
| if !u.HasFile() { |
| return _default |
| } |
| return u.File |
| } |
| |
| func (u *NodeProtocols) HasFile() bool { |
| return u.FilePresent |
| } |
| |
| func (u *NodeProtocols) ClearFile() { |
| u.FilePresent = false |
| } |
| |
| func (u *NodeProtocols) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *NodeProtocols) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| type UnlinkOptions struct { |
| _ struct{} `fidl:"t" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| Flags UnlinkFlags `fidl_ordinal:"1"` |
| FlagsPresent bool |
| } |
| |
| var _mUnlinkOptions = _bindings.CreateLazyMarshaler(UnlinkOptions{}) |
| |
| func (msg *UnlinkOptions) Marshaler() _bindings.Marshaler { |
| return _mUnlinkOptions |
| } |
| |
| 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) |
| } |
| |
| const ( |
| AdvisoryLockingAdvisoryLockOrdinal uint64 = 0x6ee9c0ad53ec87aa |
| ) |
| |
| 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{} |
| |
| 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.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, (*in_).Request) |
| out_ := &advisoryLockingWithCtxAdvisoryLockResponse{Result: result} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type AdvisoryLockingEventProxy _bindings.ChannelProxy |
| |
| const ( |
| DirectoryCloneOrdinal uint64 = 0x5a61678f293ce16f |
| DirectoryOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972 |
| DirectoryGetAttrOrdinal uint64 = 0x78985e216314dafd |
| DirectorySetAttrOrdinal uint64 = 0x4186c0f40d938f46 |
| DirectoryGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1 |
| DirectorySetFlagsOrdinal uint64 = 0x5295b76c71fde733 |
| DirectoryQueryFilesystemOrdinal uint64 = 0x6f344a1c6b0a0610 |
| DirectoryOpenOrdinal uint64 = 0x2c5044561d685ec0 |
| DirectoryReadDirentsOrdinal uint64 = 0x3582806bf27faa0a |
| DirectoryRewindOrdinal uint64 = 0x16b1202af0f34c71 |
| DirectoryGetTokenOrdinal uint64 = 0x26ae9d18763c8655 |
| DirectoryLinkOrdinal uint64 = 0x740604c0c7c930e7 |
| DirectoryWatchOrdinal uint64 = 0x5717193a59d66d91 |
| DirectoryCloseOrdinal uint64 = 0x5ac5d459ad7f657e |
| DirectoryQueryOrdinal uint64 = 0x2658edee9decfc06 |
| DirectoryReopenOrdinal uint64 = 0x6a849ef281d2baa1 |
| DirectoryOnRepresentationOrdinal uint64 = 0x5cb40567d80a510c |
| DirectoryGetConnectionInfoOrdinal uint64 = 0x584c377c7c0a6d0b |
| DirectoryGetAttributesOrdinal uint64 = 0x3d4396a638ea053b |
| DirectoryUpdateAttributesOrdinal uint64 = 0x3308c1da5a89bf08 |
| DirectorySyncOrdinal uint64 = 0x2c5c27ca0ab5dc49 |
| DirectoryAdvisoryLockOrdinal uint64 = 0x6ee9c0ad53ec87aa |
| DirectoryOpen2Ordinal uint64 = 0x2fbc4fbbff7c54d6 |
| DirectoryAddInotifyFilterOrdinal uint64 = 0x1fcddfeabd4b932a |
| DirectoryUnlinkOrdinal uint64 = 0x750a0326a78d7bed |
| DirectoryEnumerateOrdinal uint64 = 0x36a4ca72c332c37d |
| DirectoryRenameOrdinal uint64 = 0x7060e7723b9928de |
| ) |
| |
| type DirectoryWithCtxInterface _bindings.ChannelProxy |
| |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| func (p *DirectoryWithCtxInterface) Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error { |
| req_ := &directoryWithCtxCloneRequest{Flags: flags, Object: object} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryCloneOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| func (p *DirectoryWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfoDeprecated, error) { |
| resp_ := &directoryWithCtxOnOpenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(DirectoryOnOpenOrdinal, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| func (p *DirectoryWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxGetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetAttrOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Attributes, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| func (p *DirectoryWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) { |
| req_ := &directoryWithCtxSetAttrRequest{Flags: flags, Attributes: attributes} |
| resp_ := &directoryWithCtxSetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectorySetAttrOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| func (p *DirectoryWithCtxInterface) GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxGetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Flags, err_ |
| } |
| |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| func (p *DirectoryWithCtxInterface) SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) { |
| req_ := &directoryWithCtxSetFlagsRequest{Flags: flags} |
| resp_ := &directoryWithCtxSetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectorySetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Query the filesystem for filesystem-specific information. |
| func (p *DirectoryWithCtxInterface) QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxQueryFilesystemResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryQueryFilesystemOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Opens a new object relative to this directory object. |
| // |
| // `path` may contain multiple segments, separated by "/" characters, and should never be |
| // empty; i.e. "" is an invalid path. A trailing slash implies OpenFlags.DIRECTORY. Components |
| // must not be empty (i.e. "foo//bar" is invalid). ".." is disallowed anywhere in the path. "." |
| // is only allowed if the path is exactly ".", but not otherwise. A leading '/' is allowed (and |
| // is treated the same way as if not present, i.e. "/foo/bar' and "foo/bar" are the same). |
| // |
| // If an unknown value is sent for flags the connection should be closed. |
| // |
| // `OpenFlags.RIGHT_*` flags provided in `flags` will restrict access rights on |
| // the `object` channel which will be connected to the opened entity. |
| // |
| // Rights are never increased. When you open a nested entity within a directory, you may only |
| // request the same rights as what the directory connection already has, or a subset of those. |
| // Exceeding those rights causes an access denied error to be transmitted in the |
| // `OnOpen` event if applicable, and the `object` connection closed. |
| // |
| // `mode` is ignored. |
| func (p *DirectoryWithCtxInterface) Open(ctx_ _bindings.Context, flags OpenFlags, mode ModeType, path string, object NodeWithCtxInterfaceRequest) error { |
| req_ := &directoryWithCtxOpenRequest{Flags: flags, Mode: mode, Path: path, Object: object} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryOpenOrdinal, req_) |
| return err_ |
| } |
| |
| // Reads a collection of variably sized dirents into a buffer. |
| // The number of dirents 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 ReadDirents. |
| // Each call to ReadDirents will only return whole dirent structures, |
| // they will not get split across ReadDirent calls. When the seek |
| // offset reaches the end, `dirents` will be empty. |
| // |
| // These dirents are of the form: |
| // ``` |
| // |
| // struct dirent { |
| // // Describes the inode of the entry. |
| // uint64 ino; |
| // // Describes the length of the dirent name in bytes. |
| // uint8 size; |
| // // Describes the type of the entry. Aligned with the |
| // // POSIX d_type values. Use `DirentType` constants. |
| // uint8 type; |
| // // Unterminated name of entry. |
| // char name[0]; |
| // } |
| // |
| // ``` |
| // |
| // This method does not require any rights, since one could always probe for |
| // directory contents by triggering name conflicts during file creation. |
| func (p *DirectoryWithCtxInterface) ReadDirents(ctx_ _bindings.Context, maxBytes uint64) (int32, []uint8, error) { |
| req_ := &directoryWithCtxReadDirentsRequest{MaxBytes: maxBytes} |
| resp_ := &directoryWithCtxReadDirentsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryReadDirentsOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Dirents, err_ |
| } |
| |
| // Resets the directory seek offset. |
| // |
| // This method does not require any rights, similar to ReadDirents. |
| func (p *DirectoryWithCtxInterface) Rewind(ctx_ _bindings.Context) (int32, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxRewindResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryRewindOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Acquires a token to a Directory which can be used to identify access to it at a later point |
| // in time. The token will remain valid for as long as the connection requesting the token |
| // remains open. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| func (p *DirectoryWithCtxInterface) GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxGetTokenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetTokenOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Token, err_ |
| } |
| |
| // Creates a link to an object named src by the name dst, within a directory represented by |
| // token. |
| // |
| // `src` must be a resolved object name. Including "/" in the string will |
| // return `ZX_ERR_INVALID_ARGS`. |
| // |
| // `dst` must be a resolved object name. Including "/" in the string will |
| // return `ZX_ERR_INVALID_ARGS`. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| func (p *DirectoryWithCtxInterface) Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) { |
| req_ := &directoryWithCtxLinkRequest{Src: src, DstParentToken: dstParentToken, Dst: dst} |
| resp_ := &directoryWithCtxLinkResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryLinkOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Watches a directory, receiving events of added messages on the |
| // watcher request channel. |
| // |
| // Options must be zero; it is reserved. |
| // |
| // This method does not require any rights, similar to ReadDirents. |
| func (p *DirectoryWithCtxInterface) Watch(ctx_ _bindings.Context, mask WatchMask, options uint32, watcher DirectoryWatcherWithCtxInterfaceRequest) (int32, error) { |
| req_ := &directoryWithCtxWatchRequest{Mask: mask, Options: options, Watcher: watcher} |
| resp_ := &directoryWithCtxWatchResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryWatchOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| func (p *DirectoryWithCtxInterface) Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxCloseResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryCloseOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| func (p *DirectoryWithCtxInterface) Query(ctx_ _bindings.Context) ([]uint8, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxQueryResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryQueryOrdinal, req_, resp_) |
| return (*resp_).Protocol, err_ |
| } |
| |
| // Creates another connection to the same node. |
| // |
| // - `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. |
| func (p *DirectoryWithCtxInterface) Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error { |
| req_ := &directoryWithCtxReopenRequest{RightsRequest: rightsRequest, ObjectRequest: objectRequest} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| func (p *DirectoryWithCtxInterface) ExpectOnRepresentation(ctx_ _bindings.Context) (Representation, error) { |
| resp_ := &directoryWithCtxOnRepresentationResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(DirectoryOnRepresentationOrdinal, resp_) |
| return (*resp_).Payload, err_ |
| } |
| |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| func (p *DirectoryWithCtxInterface) GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &ConnectionInfo{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetConnectionInfoOrdinal, req_, resp_) |
| return (*resp_), err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // - `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) (Node2GetAttributesResult, 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, payload MutableNodeAttributes) (Node2UpdateAttributesResult, error) { |
| req_ := &payload |
| 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) (Node2SyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &directoryWithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectorySyncOrdinal, 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 *DirectoryWithCtxInterface) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) { |
| req_ := &directoryWithCtxAdvisoryLockRequest{Request: request} |
| resp_ := &directoryWithCtxAdvisoryLockResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdvisoryLockOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| // Opens or creates a new node relative to this directory node. |
| // |
| // 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) Open2(ctx_ _bindings.Context, path string, protocols ConnectionProtocols, objectRequest _zx.Channel) error { |
| req_ := &directoryWithCtxOpen2Request{Path: path, Protocols: protocols, ObjectRequest: objectRequest} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryOpen2Ordinal, 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. |
| 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, name string, options UnlinkOptions) (Directory2UnlinkResult, error) { |
| req_ := &directoryWithCtxUnlinkRequest{Name: name, Options: options} |
| resp_ := &directoryWithCtxUnlinkResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryUnlinkOrdinal, 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 [`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) (Directory2RenameResult, error) { |
| req_ := &directoryWithCtxRenameRequest{Src: src, DstParentToken: dstParentToken, Dst: dst} |
| resp_ := &directoryWithCtxRenameResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryRenameOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| type DirectoryWithCtx interface { |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) |
| // Query the filesystem for filesystem-specific information. |
| QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) |
| // Opens a new object relative to this directory object. |
| // |
| // `path` may contain multiple segments, separated by "/" characters, and should never be |
| // empty; i.e. "" is an invalid path. A trailing slash implies OpenFlags.DIRECTORY. Components |
| // must not be empty (i.e. "foo//bar" is invalid). ".." is disallowed anywhere in the path. "." |
| // is only allowed if the path is exactly ".", but not otherwise. A leading '/' is allowed (and |
| // is treated the same way as if not present, i.e. "/foo/bar' and "foo/bar" are the same). |
| // |
| // If an unknown value is sent for flags the connection should be closed. |
| // |
| // `OpenFlags.RIGHT_*` flags provided in `flags` will restrict access rights on |
| // the `object` channel which will be connected to the opened entity. |
| // |
| // Rights are never increased. When you open a nested entity within a directory, you may only |
| // request the same rights as what the directory connection already has, or a subset of those. |
| // Exceeding those rights causes an access denied error to be transmitted in the |
| // `OnOpen` event if applicable, and the `object` connection closed. |
| // |
| // `mode` is ignored. |
| Open(ctx_ _bindings.Context, flags OpenFlags, mode ModeType, path string, object NodeWithCtxInterfaceRequest) error |
| // Reads a collection of variably sized dirents into a buffer. |
| // The number of dirents 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 ReadDirents. |
| // Each call to ReadDirents will only return whole dirent structures, |
| // they will not get split across ReadDirent calls. When the seek |
| // offset reaches the end, `dirents` will be empty. |
| // |
| // These dirents are of the form: |
| // ``` |
| // struct dirent { |
| // // Describes the inode of the entry. |
| // uint64 ino; |
| // // Describes the length of the dirent name in bytes. |
| // uint8 size; |
| // // Describes the type of the entry. Aligned with the |
| // // POSIX d_type values. Use `DirentType` constants. |
| // uint8 type; |
| // // Unterminated name of entry. |
| // char name[0]; |
| // } |
| // ``` |
| // |
| // This method does not require any rights, since one could always probe for |
| // directory contents by triggering name conflicts during file creation. |
| ReadDirents(ctx_ _bindings.Context, maxBytes uint64) (int32, []uint8, error) |
| // Resets the directory seek offset. |
| // |
| // This method does not require any rights, similar to ReadDirents. |
| Rewind(ctx_ _bindings.Context) (int32, error) |
| // Acquires a token to a Directory which can be used to identify access to it at a later point |
| // in time. The token will remain valid for as long as the connection requesting the token |
| // remains open. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error) |
| // Creates a link to an object named src by the name dst, within a directory represented by |
| // token. |
| // |
| // `src` must be a resolved object name. Including "/" in the string will |
| // return `ZX_ERR_INVALID_ARGS`. |
| // |
| // `dst` must be a resolved object name. Including "/" in the string will |
| // return `ZX_ERR_INVALID_ARGS`. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) |
| // Watches a directory, receiving events of added messages on the |
| // watcher request channel. |
| // |
| // Options must be zero; it is reserved. |
| // |
| // This method does not require any rights, similar to ReadDirents. |
| Watch(ctx_ _bindings.Context, mask WatchMask, options uint32, watcher DirectoryWatcherWithCtxInterfaceRequest) (int32, error) |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) |
| Query(ctx_ _bindings.Context) ([]uint8, error) |
| // Creates another connection to the same node. |
| // |
| // + `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. |
| Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // + `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) (Node2GetAttributesResult, 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, payload MutableNodeAttributes) (Node2UpdateAttributesResult, 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) (Node2SyncResult, 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) |
| // Opens or creates a new node relative to this directory node. |
| // |
| // 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. |
| Open2(ctx_ _bindings.Context, path string, protocols ConnectionProtocols, 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. |
| 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, name string, options UnlinkOptions) (Directory2UnlinkResult, 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 [`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) (Directory2RenameResult, error) |
| } |
| |
| type DirectoryWithCtxTransitionalBase struct{} |
| |
| 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 DirectoryCloneOrdinal: |
| in_ := &directoryWithCtxCloneRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Clone(args_.Ctx, (*in_).Flags, (*in_).Object) |
| return nil, false, err_ |
| case DirectoryGetAttrOrdinal: |
| s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx) |
| out_ := &directoryWithCtxGetAttrResponse{S: s, Attributes: attributes} |
| return out_, true, err_ |
| case DirectorySetAttrOrdinal: |
| in_ := &directoryWithCtxSetAttrRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetAttr(args_.Ctx, (*in_).Flags, (*in_).Attributes) |
| out_ := &directoryWithCtxSetAttrResponse{S: s} |
| return out_, true, err_ |
| case DirectoryGetFlagsOrdinal: |
| s, flags, err_ := s_.Impl.GetFlags(args_.Ctx) |
| out_ := &directoryWithCtxGetFlagsResponse{S: s, Flags: flags} |
| return out_, true, err_ |
| case DirectorySetFlagsOrdinal: |
| in_ := &directoryWithCtxSetFlagsRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetFlags(args_.Ctx, (*in_).Flags) |
| out_ := &directoryWithCtxSetFlagsResponse{S: s} |
| return out_, true, err_ |
| case DirectoryQueryFilesystemOrdinal: |
| s, info, err_ := s_.Impl.QueryFilesystem(args_.Ctx) |
| out_ := &directoryWithCtxQueryFilesystemResponse{S: s, Info: info} |
| return out_, true, err_ |
| case DirectoryOpenOrdinal: |
| in_ := &directoryWithCtxOpenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Open(args_.Ctx, (*in_).Flags, (*in_).Mode, (*in_).Path, (*in_).Object) |
| return nil, false, err_ |
| case DirectoryReadDirentsOrdinal: |
| in_ := &directoryWithCtxReadDirentsRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, dirents, err_ := s_.Impl.ReadDirents(args_.Ctx, (*in_).MaxBytes) |
| out_ := &directoryWithCtxReadDirentsResponse{S: s, Dirents: dirents} |
| return out_, true, err_ |
| case DirectoryRewindOrdinal: |
| s, err_ := s_.Impl.Rewind(args_.Ctx) |
| out_ := &directoryWithCtxRewindResponse{S: s} |
| return out_, true, err_ |
| case DirectoryGetTokenOrdinal: |
| s, token, err_ := s_.Impl.GetToken(args_.Ctx) |
| out_ := &directoryWithCtxGetTokenResponse{S: s, Token: token} |
| return out_, true, err_ |
| case DirectoryLinkOrdinal: |
| in_ := &directoryWithCtxLinkRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.Link(args_.Ctx, (*in_).Src, (*in_).DstParentToken, (*in_).Dst) |
| out_ := &directoryWithCtxLinkResponse{S: s} |
| return out_, true, err_ |
| case DirectoryWatchOrdinal: |
| in_ := &directoryWithCtxWatchRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.Watch(args_.Ctx, (*in_).Mask, (*in_).Options, (*in_).Watcher) |
| out_ := &directoryWithCtxWatchResponse{S: s} |
| return out_, true, err_ |
| case DirectoryCloseOrdinal: |
| result, err_ := s_.Impl.Close(args_.Ctx) |
| out_ := &directoryWithCtxCloseResponse{Result: result} |
| return out_, true, err_ |
| case DirectoryQueryOrdinal: |
| protocol, err_ := s_.Impl.Query(args_.Ctx) |
| out_ := &directoryWithCtxQueryResponse{Protocol: protocol} |
| return out_, true, err_ |
| case DirectoryReopenOrdinal: |
| in_ := &directoryWithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, (*in_).RightsRequest, (*in_).ObjectRequest) |
| return nil, false, err_ |
| case DirectoryGetConnectionInfoOrdinal: |
| payload, err_ := s_.Impl.GetConnectionInfo(args_.Ctx) |
| out_ := &payload |
| return out_, true, err_ |
| case DirectoryGetAttributesOrdinal: |
| in_ := &directoryWithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, (*in_).Query) |
| out_ := &directoryWithCtxGetAttributesResponse{Result: result} |
| return out_, true, err_ |
| case DirectoryUpdateAttributesOrdinal: |
| in_ := &MutableNodeAttributes{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, (*in_)) |
| out_ := &directoryWithCtxUpdateAttributesResponse{Result: result} |
| return out_, true, err_ |
| case DirectorySyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := &directoryWithCtxSyncResponse{Result: result} |
| return out_, true, err_ |
| case DirectoryAdvisoryLockOrdinal: |
| in_ := &directoryWithCtxAdvisoryLockRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, (*in_).Request) |
| out_ := &directoryWithCtxAdvisoryLockResponse{Result: result} |
| return out_, true, err_ |
| case DirectoryOpen2Ordinal: |
| in_ := &directoryWithCtxOpen2Request{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Open2(args_.Ctx, (*in_).Path, (*in_).Protocols, (*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.Unmarshal(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.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Unlink(args_.Ctx, (*in_).Name, (*in_).Options) |
| out_ := &directoryWithCtxUnlinkResponse{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.Unmarshal(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.Unmarshal(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{Result: result} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type DirectoryEventProxy _bindings.ChannelProxy |
| |
| func (p *DirectoryEventProxy) OnOpen(s int32, info *NodeInfoDeprecated) error { |
| event_ := &directoryWithCtxOnOpenResponse{S: s, Info: info} |
| return ((*_bindings.ChannelProxy)(p)).Send(DirectoryOnOpenOrdinal, event_) |
| } |
| func (p *DirectoryEventProxy) OnRepresentation(payload Representation) error { |
| event_ := &directoryWithCtxOnRepresentationResponse{Payload: payload} |
| return ((*_bindings.ChannelProxy)(p)).Send(DirectoryOnRepresentationOrdinal, event_) |
| } |
| |
| const ( |
| Directory1CloneOrdinal uint64 = 0x5a61678f293ce16f |
| Directory1OnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972 |
| Directory1GetAttrOrdinal uint64 = 0x78985e216314dafd |
| Directory1SetAttrOrdinal uint64 = 0x4186c0f40d938f46 |
| Directory1GetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1 |
| Directory1SetFlagsOrdinal uint64 = 0x5295b76c71fde733 |
| Directory1QueryFilesystemOrdinal uint64 = 0x6f344a1c6b0a0610 |
| Directory1OpenOrdinal uint64 = 0x2c5044561d685ec0 |
| Directory1ReadDirentsOrdinal uint64 = 0x3582806bf27faa0a |
| Directory1RewindOrdinal uint64 = 0x16b1202af0f34c71 |
| Directory1GetTokenOrdinal uint64 = 0x26ae9d18763c8655 |
| Directory1LinkOrdinal uint64 = 0x740604c0c7c930e7 |
| Directory1WatchOrdinal uint64 = 0x5717193a59d66d91 |
| ) |
| |
| type Directory1WithCtxInterface _bindings.ChannelProxy |
| |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| func (p *Directory1WithCtxInterface) Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error { |
| req_ := &directory1WithCtxCloneRequest{Flags: flags, Object: object} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(Directory1CloneOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| func (p *Directory1WithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfoDeprecated, error) { |
| resp_ := &directory1WithCtxOnOpenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(Directory1OnOpenOrdinal, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| func (p *Directory1WithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) { |
| var req_ _bindings.Message |
| resp_ := &directory1WithCtxGetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1GetAttrOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Attributes, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| func (p *Directory1WithCtxInterface) SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) { |
| req_ := &directory1WithCtxSetAttrRequest{Flags: flags, Attributes: attributes} |
| resp_ := &directory1WithCtxSetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1SetAttrOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| func (p *Directory1WithCtxInterface) GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) { |
| var req_ _bindings.Message |
| resp_ := &directory1WithCtxGetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1GetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Flags, err_ |
| } |
| |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| func (p *Directory1WithCtxInterface) SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) { |
| req_ := &directory1WithCtxSetFlagsRequest{Flags: flags} |
| resp_ := &directory1WithCtxSetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1SetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Query the filesystem for filesystem-specific information. |
| func (p *Directory1WithCtxInterface) QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &directory1WithCtxQueryFilesystemResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1QueryFilesystemOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Opens a new object relative to this directory object. |
| // |
| // `path` may contain multiple segments, separated by "/" characters, and should never be |
| // empty; i.e. "" is an invalid path. A trailing slash implies OpenFlags.DIRECTORY. Components |
| // must not be empty (i.e. "foo//bar" is invalid). ".." is disallowed anywhere in the path. "." |
| // is only allowed if the path is exactly ".", but not otherwise. A leading '/' is allowed (and |
| // is treated the same way as if not present, i.e. "/foo/bar' and "foo/bar" are the same). |
| // |
| // If an unknown value is sent for flags the connection should be closed. |
| // |
| // `OpenFlags.RIGHT_*` flags provided in `flags` will restrict access rights on |
| // the `object` channel which will be connected to the opened entity. |
| // |
| // Rights are never increased. When you open a nested entity within a directory, you may only |
| // request the same rights as what the directory connection already has, or a subset of those. |
| // Exceeding those rights causes an access denied error to be transmitted in the |
| // `OnOpen` event if applicable, and the `object` connection closed. |
| // |
| // `mode` is ignored. |
| func (p *Directory1WithCtxInterface) Open(ctx_ _bindings.Context, flags OpenFlags, mode ModeType, path string, object NodeWithCtxInterfaceRequest) error { |
| req_ := &directory1WithCtxOpenRequest{Flags: flags, Mode: mode, Path: path, Object: object} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(Directory1OpenOrdinal, req_) |
| return err_ |
| } |
| |
| // Reads a collection of variably sized dirents into a buffer. |
| // The number of dirents 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 ReadDirents. |
| // Each call to ReadDirents will only return whole dirent structures, |
| // they will not get split across ReadDirent calls. When the seek |
| // offset reaches the end, `dirents` will be empty. |
| // |
| // These dirents are of the form: |
| // ``` |
| // |
| // struct dirent { |
| // // Describes the inode of the entry. |
| // uint64 ino; |
| // // Describes the length of the dirent name in bytes. |
| // uint8 size; |
| // // Describes the type of the entry. Aligned with the |
| // // POSIX d_type values. Use `DirentType` constants. |
| // uint8 type; |
| // // Unterminated name of entry. |
| // char name[0]; |
| // } |
| // |
| // ``` |
| // |
| // This method does not require any rights, since one could always probe for |
| // directory contents by triggering name conflicts during file creation. |
| func (p *Directory1WithCtxInterface) ReadDirents(ctx_ _bindings.Context, maxBytes uint64) (int32, []uint8, error) { |
| req_ := &directory1WithCtxReadDirentsRequest{MaxBytes: maxBytes} |
| resp_ := &directory1WithCtxReadDirentsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1ReadDirentsOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Dirents, err_ |
| } |
| |
| // Resets the directory seek offset. |
| // |
| // This method does not require any rights, similar to ReadDirents. |
| func (p *Directory1WithCtxInterface) Rewind(ctx_ _bindings.Context) (int32, error) { |
| var req_ _bindings.Message |
| resp_ := &directory1WithCtxRewindResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1RewindOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Acquires a token to a Directory which can be used to identify access to it at a later point |
| // in time. The token will remain valid for as long as the connection requesting the token |
| // remains open. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| func (p *Directory1WithCtxInterface) GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error) { |
| var req_ _bindings.Message |
| resp_ := &directory1WithCtxGetTokenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1GetTokenOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Token, err_ |
| } |
| |
| // Creates a link to an object named src by the name dst, within a directory represented by |
| // token. |
| // |
| // `src` must be a resolved object name. Including "/" in the string will |
| // return `ZX_ERR_INVALID_ARGS`. |
| // |
| // `dst` must be a resolved object name. Including "/" in the string will |
| // return `ZX_ERR_INVALID_ARGS`. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| func (p *Directory1WithCtxInterface) Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) { |
| req_ := &directory1WithCtxLinkRequest{Src: src, DstParentToken: dstParentToken, Dst: dst} |
| resp_ := &directory1WithCtxLinkResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1LinkOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Watches a directory, receiving events of added messages on the |
| // watcher request channel. |
| // |
| // Options must be zero; it is reserved. |
| // |
| // This method does not require any rights, similar to ReadDirents. |
| func (p *Directory1WithCtxInterface) Watch(ctx_ _bindings.Context, mask WatchMask, options uint32, watcher DirectoryWatcherWithCtxInterfaceRequest) (int32, error) { |
| req_ := &directory1WithCtxWatchRequest{Mask: mask, Options: options, Watcher: watcher} |
| resp_ := &directory1WithCtxWatchResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory1WatchOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Directory defines a node which is capable of containing other Objects. |
| type Directory1WithCtx interface { |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) |
| // Query the filesystem for filesystem-specific information. |
| QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) |
| // Opens a new object relative to this directory object. |
| // |
| // `path` may contain multiple segments, separated by "/" characters, and should never be |
| // empty; i.e. "" is an invalid path. A trailing slash implies OpenFlags.DIRECTORY. Components |
| // must not be empty (i.e. "foo//bar" is invalid). ".." is disallowed anywhere in the path. "." |
| // is only allowed if the path is exactly ".", but not otherwise. A leading '/' is allowed (and |
| // is treated the same way as if not present, i.e. "/foo/bar' and "foo/bar" are the same). |
| // |
| // If an unknown value is sent for flags the connection should be closed. |
| // |
| // `OpenFlags.RIGHT_*` flags provided in `flags` will restrict access rights on |
| // the `object` channel which will be connected to the opened entity. |
| // |
| // Rights are never increased. When you open a nested entity within a directory, you may only |
| // request the same rights as what the directory connection already has, or a subset of those. |
| // Exceeding those rights causes an access denied error to be transmitted in the |
| // `OnOpen` event if applicable, and the `object` connection closed. |
| // |
| // `mode` is ignored. |
| Open(ctx_ _bindings.Context, flags OpenFlags, mode ModeType, path string, object NodeWithCtxInterfaceRequest) error |
| // Reads a collection of variably sized dirents into a buffer. |
| // The number of dirents 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 ReadDirents. |
| // Each call to ReadDirents will only return whole dirent structures, |
| // they will not get split across ReadDirent calls. When the seek |
| // offset reaches the end, `dirents` will be empty. |
| // |
| // These dirents are of the form: |
| // ``` |
| // struct dirent { |
| // // Describes the inode of the entry. |
| // uint64 ino; |
| // // Describes the length of the dirent name in bytes. |
| // uint8 size; |
| // // Describes the type of the entry. Aligned with the |
| // // POSIX d_type values. Use `DirentType` constants. |
| // uint8 type; |
| // // Unterminated name of entry. |
| // char name[0]; |
| // } |
| // ``` |
| // |
| // This method does not require any rights, since one could always probe for |
| // directory contents by triggering name conflicts during file creation. |
| ReadDirents(ctx_ _bindings.Context, maxBytes uint64) (int32, []uint8, error) |
| // Resets the directory seek offset. |
| // |
| // This method does not require any rights, similar to ReadDirents. |
| Rewind(ctx_ _bindings.Context) (int32, error) |
| // Acquires a token to a Directory which can be used to identify access to it at a later point |
| // in time. The token will remain valid for as long as the connection requesting the token |
| // remains open. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error) |
| // Creates a link to an object named src by the name dst, within a directory represented by |
| // token. |
| // |
| // `src` must be a resolved object name. Including "/" in the string will |
| // return `ZX_ERR_INVALID_ARGS`. |
| // |
| // `dst` must be a resolved object name. Including "/" in the string will |
| // return `ZX_ERR_INVALID_ARGS`. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) |
| // Watches a directory, receiving events of added messages on the |
| // watcher request channel. |
| // |
| // Options must be zero; it is reserved. |
| // |
| // This method does not require any rights, similar to ReadDirents. |
| Watch(ctx_ _bindings.Context, mask WatchMask, options uint32, watcher DirectoryWatcherWithCtxInterfaceRequest) (int32, error) |
| } |
| |
| type Directory1WithCtxTransitionalBase struct{} |
| |
| type Directory1WithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewDirectory1WithCtxInterfaceRequest() (Directory1WithCtxInterfaceRequest, *Directory1WithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return Directory1WithCtxInterfaceRequest(req), (*Directory1WithCtxInterface)(cli), err |
| } |
| |
| type Directory1WithCtxStub struct { |
| Impl Directory1WithCtx |
| } |
| |
| func (s_ *Directory1WithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case Directory1CloneOrdinal: |
| in_ := &directory1WithCtxCloneRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Clone(args_.Ctx, (*in_).Flags, (*in_).Object) |
| return nil, false, err_ |
| case Directory1GetAttrOrdinal: |
| s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx) |
| out_ := &directory1WithCtxGetAttrResponse{S: s, Attributes: attributes} |
| return out_, true, err_ |
| case Directory1SetAttrOrdinal: |
| in_ := &directory1WithCtxSetAttrRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetAttr(args_.Ctx, (*in_).Flags, (*in_).Attributes) |
| out_ := &directory1WithCtxSetAttrResponse{S: s} |
| return out_, true, err_ |
| case Directory1GetFlagsOrdinal: |
| s, flags, err_ := s_.Impl.GetFlags(args_.Ctx) |
| out_ := &directory1WithCtxGetFlagsResponse{S: s, Flags: flags} |
| return out_, true, err_ |
| case Directory1SetFlagsOrdinal: |
| in_ := &directory1WithCtxSetFlagsRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetFlags(args_.Ctx, (*in_).Flags) |
| out_ := &directory1WithCtxSetFlagsResponse{S: s} |
| return out_, true, err_ |
| case Directory1QueryFilesystemOrdinal: |
| s, info, err_ := s_.Impl.QueryFilesystem(args_.Ctx) |
| out_ := &directory1WithCtxQueryFilesystemResponse{S: s, Info: info} |
| return out_, true, err_ |
| case Directory1OpenOrdinal: |
| in_ := &directory1WithCtxOpenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Open(args_.Ctx, (*in_).Flags, (*in_).Mode, (*in_).Path, (*in_).Object) |
| return nil, false, err_ |
| case Directory1ReadDirentsOrdinal: |
| in_ := &directory1WithCtxReadDirentsRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, dirents, err_ := s_.Impl.ReadDirents(args_.Ctx, (*in_).MaxBytes) |
| out_ := &directory1WithCtxReadDirentsResponse{S: s, Dirents: dirents} |
| return out_, true, err_ |
| case Directory1RewindOrdinal: |
| s, err_ := s_.Impl.Rewind(args_.Ctx) |
| out_ := &directory1WithCtxRewindResponse{S: s} |
| return out_, true, err_ |
| case Directory1GetTokenOrdinal: |
| s, token, err_ := s_.Impl.GetToken(args_.Ctx) |
| out_ := &directory1WithCtxGetTokenResponse{S: s, Token: token} |
| return out_, true, err_ |
| case Directory1LinkOrdinal: |
| in_ := &directory1WithCtxLinkRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.Link(args_.Ctx, (*in_).Src, (*in_).DstParentToken, (*in_).Dst) |
| out_ := &directory1WithCtxLinkResponse{S: s} |
| return out_, true, err_ |
| case Directory1WatchOrdinal: |
| in_ := &directory1WithCtxWatchRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.Watch(args_.Ctx, (*in_).Mask, (*in_).Options, (*in_).Watcher) |
| out_ := &directory1WithCtxWatchResponse{S: s} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type Directory1EventProxy _bindings.ChannelProxy |
| |
| func (p *Directory1EventProxy) OnOpen(s int32, info *NodeInfoDeprecated) error { |
| event_ := &directory1WithCtxOnOpenResponse{S: s, Info: info} |
| return ((*_bindings.ChannelProxy)(p)).Send(Directory1OnOpenOrdinal, event_) |
| } |
| |
| const ( |
| Directory2CloseOrdinal uint64 = 0x5ac5d459ad7f657e |
| Directory2QueryOrdinal uint64 = 0x2658edee9decfc06 |
| Directory2ReopenOrdinal uint64 = 0x6a849ef281d2baa1 |
| Directory2OnRepresentationOrdinal uint64 = 0x5cb40567d80a510c |
| Directory2GetConnectionInfoOrdinal uint64 = 0x584c377c7c0a6d0b |
| Directory2GetAttributesOrdinal uint64 = 0x3d4396a638ea053b |
| Directory2UpdateAttributesOrdinal uint64 = 0x3308c1da5a89bf08 |
| Directory2SyncOrdinal uint64 = 0x2c5c27ca0ab5dc49 |
| Directory2AdvisoryLockOrdinal uint64 = 0x6ee9c0ad53ec87aa |
| Directory2Open2Ordinal uint64 = 0x2fbc4fbbff7c54d6 |
| Directory2AddInotifyFilterOrdinal uint64 = 0x1fcddfeabd4b932a |
| Directory2UnlinkOrdinal uint64 = 0x750a0326a78d7bed |
| Directory2EnumerateOrdinal uint64 = 0x36a4ca72c332c37d |
| Directory2RenameOrdinal uint64 = 0x7060e7723b9928de |
| ) |
| |
| type Directory2WithCtxInterface _bindings.ChannelProxy |
| |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| func (p *Directory2WithCtxInterface) Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) { |
| var req_ _bindings.Message |
| resp_ := &directory2WithCtxCloseResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2CloseOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| func (p *Directory2WithCtxInterface) Query(ctx_ _bindings.Context) ([]uint8, error) { |
| var req_ _bindings.Message |
| resp_ := &directory2WithCtxQueryResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2QueryOrdinal, req_, resp_) |
| return (*resp_).Protocol, err_ |
| } |
| |
| // Creates another connection to the same node. |
| // |
| // - `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. |
| func (p *Directory2WithCtxInterface) Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error { |
| req_ := &directory2WithCtxReopenRequest{RightsRequest: rightsRequest, ObjectRequest: objectRequest} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(Directory2ReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| func (p *Directory2WithCtxInterface) ExpectOnRepresentation(ctx_ _bindings.Context) (Representation, error) { |
| resp_ := &directory2WithCtxOnRepresentationResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(Directory2OnRepresentationOrdinal, resp_) |
| return (*resp_).Payload, err_ |
| } |
| |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| func (p *Directory2WithCtxInterface) GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &ConnectionInfo{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2GetConnectionInfoOrdinal, req_, resp_) |
| return (*resp_), err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // - `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 *Directory2WithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (Node2GetAttributesResult, error) { |
| req_ := &directory2WithCtxGetAttributesRequest{Query: query} |
| resp_ := &directory2WithCtxGetAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2GetAttributesOrdinal, 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 *Directory2WithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, payload MutableNodeAttributes) (Node2UpdateAttributesResult, error) { |
| req_ := &payload |
| resp_ := &directory2WithCtxUpdateAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2UpdateAttributesOrdinal, 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 *Directory2WithCtxInterface) Sync(ctx_ _bindings.Context) (Node2SyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &directory2WithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2SyncOrdinal, 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 *Directory2WithCtxInterface) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) { |
| req_ := &directory2WithCtxAdvisoryLockRequest{Request: request} |
| resp_ := &directory2WithCtxAdvisoryLockResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2AdvisoryLockOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| // Opens or creates a new node relative to this directory node. |
| // |
| // 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 *Directory2WithCtxInterface) Open2(ctx_ _bindings.Context, path string, protocols ConnectionProtocols, objectRequest _zx.Channel) error { |
| req_ := &directory2WithCtxOpen2Request{Path: path, Protocols: protocols, ObjectRequest: objectRequest} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(Directory2Open2Ordinal, 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. |
| func (p *Directory2WithCtxInterface) AddInotifyFilter(ctx_ _bindings.Context, path string, filter InotifyWatchMask, watchDescriptor uint32, socket _zx.Socket) error { |
| req_ := &directory2WithCtxAddInotifyFilterRequest{Path: path, Filter: filter, WatchDescriptor: watchDescriptor, Socket: socket} |
| var resp_ _bindings.Message |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2AddInotifyFilterOrdinal, 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 *Directory2WithCtxInterface) Unlink(ctx_ _bindings.Context, name string, options UnlinkOptions) (Directory2UnlinkResult, error) { |
| req_ := &directory2WithCtxUnlinkRequest{Name: name, Options: options} |
| resp_ := &directory2WithCtxUnlinkResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2UnlinkOrdinal, 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 *Directory2WithCtxInterface) Enumerate(ctx_ _bindings.Context, options DirectoryEnumerateOptions, iterator DirectoryIteratorWithCtxInterfaceRequest) error { |
| req_ := &directory2WithCtxEnumerateRequest{Options: options, Iterator: iterator} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(Directory2EnumerateOrdinal, 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 [`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 *Directory2WithCtxInterface) Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (Directory2RenameResult, error) { |
| req_ := &directory2WithCtxRenameRequest{Src: src, DstParentToken: dstParentToken, Dst: dst} |
| resp_ := &directory2WithCtxRenameResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Directory2RenameOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| // A [`Node2`] that is capable of containing other nodes. |
| type Directory2WithCtx interface { |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) |
| Query(ctx_ _bindings.Context) ([]uint8, error) |
| // Creates another connection to the same node. |
| // |
| // + `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. |
| Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // + `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) (Node2GetAttributesResult, 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, payload MutableNodeAttributes) (Node2UpdateAttributesResult, 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) (Node2SyncResult, 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) |
| // Opens or creates a new node relative to this directory node. |
| // |
| // 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. |
| Open2(ctx_ _bindings.Context, path string, protocols ConnectionProtocols, 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. |
| 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, name string, options UnlinkOptions) (Directory2UnlinkResult, 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 [`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) (Directory2RenameResult, error) |
| } |
| |
| type Directory2WithCtxTransitionalBase struct{} |
| |
| type Directory2WithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewDirectory2WithCtxInterfaceRequest() (Directory2WithCtxInterfaceRequest, *Directory2WithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return Directory2WithCtxInterfaceRequest(req), (*Directory2WithCtxInterface)(cli), err |
| } |
| |
| type Directory2WithCtxStub struct { |
| Impl Directory2WithCtx |
| } |
| |
| func (s_ *Directory2WithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case Directory2CloseOrdinal: |
| result, err_ := s_.Impl.Close(args_.Ctx) |
| out_ := &directory2WithCtxCloseResponse{Result: result} |
| return out_, true, err_ |
| case Directory2QueryOrdinal: |
| protocol, err_ := s_.Impl.Query(args_.Ctx) |
| out_ := &directory2WithCtxQueryResponse{Protocol: protocol} |
| return out_, true, err_ |
| case Directory2ReopenOrdinal: |
| in_ := &directory2WithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, (*in_).RightsRequest, (*in_).ObjectRequest) |
| return nil, false, err_ |
| case Directory2GetConnectionInfoOrdinal: |
| payload, err_ := s_.Impl.GetConnectionInfo(args_.Ctx) |
| out_ := &payload |
| return out_, true, err_ |
| case Directory2GetAttributesOrdinal: |
| in_ := &directory2WithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, (*in_).Query) |
| out_ := &directory2WithCtxGetAttributesResponse{Result: result} |
| return out_, true, err_ |
| case Directory2UpdateAttributesOrdinal: |
| in_ := &MutableNodeAttributes{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, (*in_)) |
| out_ := &directory2WithCtxUpdateAttributesResponse{Result: result} |
| return out_, true, err_ |
| case Directory2SyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := &directory2WithCtxSyncResponse{Result: result} |
| return out_, true, err_ |
| case Directory2AdvisoryLockOrdinal: |
| in_ := &directory2WithCtxAdvisoryLockRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, (*in_).Request) |
| out_ := &directory2WithCtxAdvisoryLockResponse{Result: result} |
| return out_, true, err_ |
| case Directory2Open2Ordinal: |
| in_ := &directory2WithCtxOpen2Request{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Open2(args_.Ctx, (*in_).Path, (*in_).Protocols, (*in_).ObjectRequest) |
| return nil, false, err_ |
| case Directory2AddInotifyFilterOrdinal: |
| in_ := &directory2WithCtxAddInotifyFilterRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.AddInotifyFilter(args_.Ctx, (*in_).Path, (*in_).Filter, (*in_).WatchDescriptor, (*in_).Socket) |
| return nil, true, err_ |
| case Directory2UnlinkOrdinal: |
| in_ := &directory2WithCtxUnlinkRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Unlink(args_.Ctx, (*in_).Name, (*in_).Options) |
| out_ := &directory2WithCtxUnlinkResponse{Result: result} |
| return out_, true, err_ |
| case Directory2EnumerateOrdinal: |
| in_ := &directory2WithCtxEnumerateRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Enumerate(args_.Ctx, (*in_).Options, (*in_).Iterator) |
| return nil, false, err_ |
| case Directory2RenameOrdinal: |
| in_ := &directory2WithCtxRenameRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Rename(args_.Ctx, (*in_).Src, (*in_).DstParentToken, (*in_).Dst) |
| out_ := &directory2WithCtxRenameResponse{Result: result} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type Directory2EventProxy _bindings.ChannelProxy |
| |
| func (p *Directory2EventProxy) OnRepresentation(payload Representation) error { |
| event_ := &directory2WithCtxOnRepresentationResponse{Payload: payload} |
| return ((*_bindings.ChannelProxy)(p)).Send(Directory2OnRepresentationOrdinal, event_) |
| } |
| |
| const ( |
| DirectoryIteratorGetNextOrdinal uint64 = 0x3c70af7d00d750eb |
| ) |
| |
| 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{Result: result} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type DirectoryIteratorEventProxy _bindings.ChannelProxy |
| |
| type DirectoryWatcherWithCtxInterface _bindings.ChannelProxy |
| |
| // DirectoryWatcher transmits messages from a filesystem server |
| // about events happening in the filesystem. Clients can register |
| // new watchers using the `Directory.Watch` method, where they can |
| // filter which events they want to receive notifications for. |
| // |
| // The DirectoryWatcher will send messages of the form: |
| // ``` |
| // |
| // struct { |
| // uint8 event; |
| // uint8 len; |
| // char name[]; |
| // }; |
| // |
| // ``` |
| // Where names are NOT null-terminated. The name is the relative |
| // path to the entry the event is refering to. It will be empty if |
| // the event isn't referencing a particular entry (e.g. for the |
| // `IDLE` event). |
| type DirectoryWatcherWithCtx interface { |
| } |
| |
| 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 { |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type DirectoryWatcherEventProxy _bindings.ChannelProxy |
| |
| const ( |
| FileAdvisoryLockOrdinal uint64 = 0x6ee9c0ad53ec87aa |
| FileCloneOrdinal uint64 = 0x5a61678f293ce16f |
| FileOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972 |
| FileGetAttrOrdinal uint64 = 0x78985e216314dafd |
| FileSetAttrOrdinal uint64 = 0x4186c0f40d938f46 |
| FileGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1 |
| FileSetFlagsOrdinal uint64 = 0x5295b76c71fde733 |
| FileQueryFilesystemOrdinal uint64 = 0x6f344a1c6b0a0610 |
| FileCloseOrdinal uint64 = 0x5ac5d459ad7f657e |
| FileQueryOrdinal uint64 = 0x2658edee9decfc06 |
| FileReopenOrdinal uint64 = 0x6a849ef281d2baa1 |
| FileOnRepresentationOrdinal uint64 = 0x5cb40567d80a510c |
| FileGetConnectionInfoOrdinal uint64 = 0x584c377c7c0a6d0b |
| FileGetAttributesOrdinal uint64 = 0x3d4396a638ea053b |
| FileUpdateAttributesOrdinal uint64 = 0x3308c1da5a89bf08 |
| FileSyncOrdinal uint64 = 0x2c5c27ca0ab5dc49 |
| FileReadOrdinal uint64 = 0x57e419a298c8ede |
| FileWriteOrdinal uint64 = 0x6a31437832469f82 |
| FileDescribeOrdinal uint64 = 0x68b5ac00c62906bc |
| FileSeekOrdinal uint64 = 0x78079168162c5207 |
| FileReadAtOrdinal uint64 = 0x1607a293a60d723e |
| FileWriteAtOrdinal uint64 = 0x793eefc0045e792b |
| FileResizeOrdinal uint64 = 0x2b80825f0535743a |
| FileGetBackingMemoryOrdinal uint64 = 0xa6a9e654cbf62b |
| ) |
| |
| type FileWithCtxInterface _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 *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_ |
| } |
| |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| func (p *FileWithCtxInterface) Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error { |
| req_ := &fileWithCtxCloneRequest{Flags: flags, Object: object} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(FileCloneOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| func (p *FileWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfoDeprecated, error) { |
| resp_ := &fileWithCtxOnOpenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(FileOnOpenOrdinal, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| func (p *FileWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) { |
| var req_ _bindings.Message |
| resp_ := &fileWithCtxGetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetAttrOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Attributes, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| func (p *FileWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) { |
| req_ := &fileWithCtxSetAttrRequest{Flags: flags, Attributes: attributes} |
| resp_ := &fileWithCtxSetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSetAttrOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| func (p *FileWithCtxInterface) GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) { |
| var req_ _bindings.Message |
| resp_ := &fileWithCtxGetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Flags, err_ |
| } |
| |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| func (p *FileWithCtxInterface) SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) { |
| req_ := &fileWithCtxSetFlagsRequest{Flags: flags} |
| resp_ := &fileWithCtxSetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Query the filesystem for filesystem-specific information. |
| func (p *FileWithCtxInterface) QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &fileWithCtxQueryFilesystemResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileQueryFilesystemOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| func (p *FileWithCtxInterface) Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) { |
| var req_ _bindings.Message |
| resp_ := &fileWithCtxCloseResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileCloseOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| func (p *FileWithCtxInterface) Query(ctx_ _bindings.Context) ([]uint8, error) { |
| var req_ _bindings.Message |
| resp_ := &fileWithCtxQueryResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileQueryOrdinal, req_, resp_) |
| return (*resp_).Protocol, err_ |
| } |
| |
| // Creates another connection to the same node. |
| // |
| // - `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. |
| func (p *FileWithCtxInterface) Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error { |
| req_ := &fileWithCtxReopenRequest{RightsRequest: rightsRequest, ObjectRequest: objectRequest} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(FileReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| func (p *FileWithCtxInterface) ExpectOnRepresentation(ctx_ _bindings.Context) (Representation, error) { |
| resp_ := &fileWithCtxOnRepresentationResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(FileOnRepresentationOrdinal, resp_) |
| return (*resp_).Payload, err_ |
| } |
| |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| func (p *FileWithCtxInterface) GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &ConnectionInfo{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetConnectionInfoOrdinal, req_, resp_) |
| return (*resp_), err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // - `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) (Node2GetAttributesResult, 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, payload MutableNodeAttributes) (Node2UpdateAttributesResult, error) { |
| req_ := &payload |
| 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) (Node2SyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &fileWithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSyncOrdinal, 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. |
| // |
| // Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`. |
| func (p *FileWithCtxInterface) Read(ctx_ _bindings.Context, count uint64) (ReadableReadResult, 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 no bytes |
| // could be written, an error is returned. |
| // - If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file and return a |
| // successful write of zero bytes. 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) (WritableWriteResult, error) { |
| req_ := &fileWithCtxWriteRequest{Data: data} |
| resp_ := &fileWithCtxWriteResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileWriteOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| func (p *FileWithCtxInterface) Describe(ctx_ _bindings.Context) (FileInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &FileInfo{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileDescribeOrdinal, req_, resp_) |
| return (*resp_), 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 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. |
| // |
| // Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`. |
| 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 no bytes |
| // could be written, an error is returned. |
| // - If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file, and will return a |
| // successful write of zero bytes. |
| // |
| // 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 [`zx.handle:VMO`] representing this file, if there is one, |
| // with the requested access rights. |
| // |
| // Implementations are not required to implement files backed by VMOs so |
| // this request may fail. Additionally, implementations may only support |
| // a certain subset of the flags. Clients should be prepared with fallback |
| // behavior if this request fails. |
| // |
| // If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the |
| // implementation is free to choose the semantics of the returned VMO. |
| // |
| // + request `flags` a [`VmoFlags`] indicating the desired mode of access. |
| // - response `vmo` the requested [`zx.handle:VMO`]. |
| // * 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) GetBackingMemory(ctx_ _bindings.Context, flags VmoFlags) (FileGetBackingMemoryResult, error) { |
| req_ := &fileWithCtxGetBackingMemoryRequest{Flags: flags} |
| resp_ := &fileWithCtxGetBackingMemoryResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetBackingMemoryOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| // A [`Node`] which contains a sequence of bytes of definite length. |
| // |
| // NOTE: cloned connections do not share their seek offset with their source |
| // connection. |
| type FileWithCtx 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) |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) |
| // Query the filesystem for filesystem-specific information. |
| QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) |
| Query(ctx_ _bindings.Context) ([]uint8, error) |
| // Creates another connection to the same node. |
| // |
| // + `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. |
| Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // + `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) (Node2GetAttributesResult, 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, payload MutableNodeAttributes) (Node2UpdateAttributesResult, 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) (Node2SyncResult, 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. |
| // |
| // Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`. |
| Read(ctx_ _bindings.Context, count uint64) (ReadableReadResult, 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 no bytes |
| // could be written, an error is returned. |
| // * If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file and return a |
| // successful write of zero bytes. The seek offset is still updated if |
| // in append mode. |
| // |
| // This method requires the [`Rights.WRITE_BYTES`] right. |
| Write(ctx_ _bindings.Context, data []uint8) (WritableWriteResult, error) |
| Describe(ctx_ _bindings.Context) (FileInfo, 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 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. |
| // |
| // Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`. |
| 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 no bytes |
| // could be written, an error is returned. |
| // * If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file, and will return a |
| // successful write of zero bytes. |
| // |
| // 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 [`zx.handle:VMO`] representing this file, if there is one, |
| // with the requested access rights. |
| // |
| // Implementations are not required to implement files backed by VMOs so |
| // this request may fail. Additionally, implementations may only support |
| // a certain subset of the flags. Clients should be prepared with fallback |
| // behavior if this request fails. |
| // |
| // If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the |
| // implementation is free to choose the semantics of the returned VMO. |
| // |
| // + request `flags` a [`VmoFlags`] indicating the desired mode of access. |
| // - response `vmo` the requested [`zx.handle:VMO`]. |
| // * 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`]. |
| GetBackingMemory(ctx_ _bindings.Context, flags VmoFlags) (FileGetBackingMemoryResult, error) |
| } |
| |
| type FileWithCtxTransitionalBase struct{} |
| |
| 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 FileAdvisoryLockOrdinal: |
| in_ := &fileWithCtxAdvisoryLockRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, (*in_).Request) |
| out_ := &fileWithCtxAdvisoryLockResponse{Result: result} |
| return out_, true, err_ |
| case FileCloneOrdinal: |
| in_ := &fileWithCtxCloneRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Clone(args_.Ctx, (*in_).Flags, (*in_).Object) |
| return nil, false, err_ |
| case FileGetAttrOrdinal: |
| s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx) |
| out_ := &fileWithCtxGetAttrResponse{S: s, Attributes: attributes} |
| return out_, true, err_ |
| case FileSetAttrOrdinal: |
| in_ := &fileWithCtxSetAttrRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetAttr(args_.Ctx, (*in_).Flags, (*in_).Attributes) |
| out_ := &fileWithCtxSetAttrResponse{S: s} |
| return out_, true, err_ |
| case FileGetFlagsOrdinal: |
| s, flags, err_ := s_.Impl.GetFlags(args_.Ctx) |
| out_ := &fileWithCtxGetFlagsResponse{S: s, Flags: flags} |
| return out_, true, err_ |
| case FileSetFlagsOrdinal: |
| in_ := &fileWithCtxSetFlagsRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetFlags(args_.Ctx, (*in_).Flags) |
| out_ := &fileWithCtxSetFlagsResponse{S: s} |
| return out_, true, err_ |
| case FileQueryFilesystemOrdinal: |
| s, info, err_ := s_.Impl.QueryFilesystem(args_.Ctx) |
| out_ := &fileWithCtxQueryFilesystemResponse{S: s, Info: info} |
| return out_, true, err_ |
| case FileCloseOrdinal: |
| result, err_ := s_.Impl.Close(args_.Ctx) |
| out_ := &fileWithCtxCloseResponse{Result: result} |
| return out_, true, err_ |
| case FileQueryOrdinal: |
| protocol, err_ := s_.Impl.Query(args_.Ctx) |
| out_ := &fileWithCtxQueryResponse{Protocol: protocol} |
| return out_, true, err_ |
| case FileReopenOrdinal: |
| in_ := &fileWithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, (*in_).RightsRequest, (*in_).ObjectRequest) |
| return nil, false, err_ |
| case FileGetConnectionInfoOrdinal: |
| payload, err_ := s_.Impl.GetConnectionInfo(args_.Ctx) |
| out_ := &payload |
| return out_, true, err_ |
| case FileGetAttributesOrdinal: |
| in_ := &fileWithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, (*in_).Query) |
| out_ := &fileWithCtxGetAttributesResponse{Result: result} |
| return out_, true, err_ |
| case FileUpdateAttributesOrdinal: |
| in_ := &MutableNodeAttributes{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, (*in_)) |
| out_ := &fileWithCtxUpdateAttributesResponse{Result: result} |
| return out_, true, err_ |
| case FileSyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := &fileWithCtxSyncResponse{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.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Read(args_.Ctx, (*in_).Count) |
| out_ := &fileWithCtxReadResponse{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.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Write(args_.Ctx, (*in_).Data) |
| out_ := &fileWithCtxWriteResponse{Result: result} |
| return out_, true, err_ |
| case FileDescribeOrdinal: |
| payload, err_ := s_.Impl.Describe(args_.Ctx) |
| out_ := &payload |
| return out_, true, err_ |
| case FileSeekOrdinal: |
| in_ := &fileWithCtxSeekRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Seek(args_.Ctx, (*in_).Origin, (*in_).Offset) |
| out_ := &fileWithCtxSeekResponse{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.Unmarshal(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{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.Unmarshal(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{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.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Resize(args_.Ctx, (*in_).Length) |
| out_ := &fileWithCtxResizeResponse{Result: result} |
| return out_, true, err_ |
| case FileGetBackingMemoryOrdinal: |
| in_ := &fileWithCtxGetBackingMemoryRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetBackingMemory(args_.Ctx, (*in_).Flags) |
| out_ := &fileWithCtxGetBackingMemoryResponse{Result: result} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type FileEventProxy _bindings.ChannelProxy |
| |
| func (p *FileEventProxy) OnOpen(s int32, info *NodeInfoDeprecated) error { |
| event_ := &fileWithCtxOnOpenResponse{S: s, Info: info} |
| return ((*_bindings.ChannelProxy)(p)).Send(FileOnOpenOrdinal, event_) |
| } |
| func (p *FileEventProxy) OnRepresentation(payload Representation) error { |
| event_ := &fileWithCtxOnRepresentationResponse{Payload: payload} |
| return ((*_bindings.ChannelProxy)(p)).Send(FileOnRepresentationOrdinal, 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 ( |
| NodeCloneOrdinal uint64 = 0x5a61678f293ce16f |
| NodeOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972 |
| NodeGetAttrOrdinal uint64 = 0x78985e216314dafd |
| NodeSetAttrOrdinal uint64 = 0x4186c0f40d938f46 |
| NodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1 |
| NodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733 |
| NodeQueryFilesystemOrdinal uint64 = 0x6f344a1c6b0a0610 |
| NodeCloseOrdinal uint64 = 0x5ac5d459ad7f657e |
| NodeQueryOrdinal uint64 = 0x2658edee9decfc06 |
| NodeReopenOrdinal uint64 = 0x6a849ef281d2baa1 |
| NodeOnRepresentationOrdinal uint64 = 0x5cb40567d80a510c |
| NodeGetConnectionInfoOrdinal uint64 = 0x584c377c7c0a6d0b |
| NodeGetAttributesOrdinal uint64 = 0x3d4396a638ea053b |
| NodeUpdateAttributesOrdinal uint64 = 0x3308c1da5a89bf08 |
| NodeSyncOrdinal uint64 = 0x2c5c27ca0ab5dc49 |
| ) |
| |
| type NodeWithCtxInterface _bindings.ChannelProxy |
| |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| func (p *NodeWithCtxInterface) Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error { |
| req_ := &nodeWithCtxCloneRequest{Flags: flags, Object: object} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(NodeCloneOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| func (p *NodeWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfoDeprecated, error) { |
| resp_ := &nodeWithCtxOnOpenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(NodeOnOpenOrdinal, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| func (p *NodeWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) { |
| var req_ _bindings.Message |
| resp_ := &nodeWithCtxGetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeGetAttrOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Attributes, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| func (p *NodeWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) { |
| req_ := &nodeWithCtxSetAttrRequest{Flags: flags, Attributes: attributes} |
| resp_ := &nodeWithCtxSetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeSetAttrOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| func (p *NodeWithCtxInterface) GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) { |
| var req_ _bindings.Message |
| resp_ := &nodeWithCtxGetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeGetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Flags, err_ |
| } |
| |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| func (p *NodeWithCtxInterface) SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) { |
| req_ := &nodeWithCtxSetFlagsRequest{Flags: flags} |
| resp_ := &nodeWithCtxSetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeSetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Query the filesystem for filesystem-specific information. |
| func (p *NodeWithCtxInterface) QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &nodeWithCtxQueryFilesystemResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeQueryFilesystemOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| func (p *NodeWithCtxInterface) Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) { |
| var req_ _bindings.Message |
| resp_ := &nodeWithCtxCloseResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeCloseOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| func (p *NodeWithCtxInterface) Query(ctx_ _bindings.Context) ([]uint8, error) { |
| var req_ _bindings.Message |
| resp_ := &nodeWithCtxQueryResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeQueryOrdinal, req_, resp_) |
| return (*resp_).Protocol, err_ |
| } |
| |
| // Creates another connection to the same node. |
| // |
| // - `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. |
| func (p *NodeWithCtxInterface) Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error { |
| req_ := &nodeWithCtxReopenRequest{RightsRequest: rightsRequest, ObjectRequest: objectRequest} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(NodeReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| func (p *NodeWithCtxInterface) ExpectOnRepresentation(ctx_ _bindings.Context) (Representation, error) { |
| resp_ := &nodeWithCtxOnRepresentationResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(NodeOnRepresentationOrdinal, resp_) |
| return (*resp_).Payload, err_ |
| } |
| |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| func (p *NodeWithCtxInterface) GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &ConnectionInfo{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeGetConnectionInfoOrdinal, req_, resp_) |
| return (*resp_), err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // - `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) (Node2GetAttributesResult, 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, payload MutableNodeAttributes) (Node2UpdateAttributesResult, error) { |
| req_ := &payload |
| 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) (Node2SyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &nodeWithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeSyncOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| type NodeWithCtx interface { |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) |
| // Query the filesystem for filesystem-specific information. |
| QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) |
| Query(ctx_ _bindings.Context) ([]uint8, error) |
| // Creates another connection to the same node. |
| // |
| // + `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. |
| Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // + `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) (Node2GetAttributesResult, 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, payload MutableNodeAttributes) (Node2UpdateAttributesResult, 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) (Node2SyncResult, 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 NodeCloneOrdinal: |
| in_ := &nodeWithCtxCloneRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Clone(args_.Ctx, (*in_).Flags, (*in_).Object) |
| return nil, false, err_ |
| case NodeGetAttrOrdinal: |
| s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx) |
| out_ := &nodeWithCtxGetAttrResponse{S: s, Attributes: attributes} |
| return out_, true, err_ |
| case NodeSetAttrOrdinal: |
| in_ := &nodeWithCtxSetAttrRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetAttr(args_.Ctx, (*in_).Flags, (*in_).Attributes) |
| out_ := &nodeWithCtxSetAttrResponse{S: s} |
| return out_, true, err_ |
| case NodeGetFlagsOrdinal: |
| s, flags, err_ := s_.Impl.GetFlags(args_.Ctx) |
| out_ := &nodeWithCtxGetFlagsResponse{S: s, Flags: flags} |
| return out_, true, err_ |
| case NodeSetFlagsOrdinal: |
| in_ := &nodeWithCtxSetFlagsRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetFlags(args_.Ctx, (*in_).Flags) |
| out_ := &nodeWithCtxSetFlagsResponse{S: s} |
| return out_, true, err_ |
| case NodeQueryFilesystemOrdinal: |
| s, info, err_ := s_.Impl.QueryFilesystem(args_.Ctx) |
| out_ := &nodeWithCtxQueryFilesystemResponse{S: s, Info: info} |
| return out_, true, err_ |
| case NodeCloseOrdinal: |
| result, err_ := s_.Impl.Close(args_.Ctx) |
| out_ := &nodeWithCtxCloseResponse{Result: result} |
| return out_, true, err_ |
| case NodeQueryOrdinal: |
| protocol, err_ := s_.Impl.Query(args_.Ctx) |
| out_ := &nodeWithCtxQueryResponse{Protocol: protocol} |
| return out_, true, err_ |
| case NodeReopenOrdinal: |
| in_ := &nodeWithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, (*in_).RightsRequest, (*in_).ObjectRequest) |
| return nil, false, err_ |
| case NodeGetConnectionInfoOrdinal: |
| payload, err_ := s_.Impl.GetConnectionInfo(args_.Ctx) |
| out_ := &payload |
| return out_, true, err_ |
| case NodeGetAttributesOrdinal: |
| in_ := &nodeWithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, (*in_).Query) |
| out_ := &nodeWithCtxGetAttributesResponse{Result: result} |
| return out_, true, err_ |
| case NodeUpdateAttributesOrdinal: |
| in_ := &MutableNodeAttributes{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, (*in_)) |
| out_ := &nodeWithCtxUpdateAttributesResponse{Result: result} |
| return out_, true, err_ |
| case NodeSyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := &nodeWithCtxSyncResponse{Result: result} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type NodeEventProxy _bindings.ChannelProxy |
| |
| func (p *NodeEventProxy) OnOpen(s int32, info *NodeInfoDeprecated) error { |
| event_ := &nodeWithCtxOnOpenResponse{S: s, Info: info} |
| return ((*_bindings.ChannelProxy)(p)).Send(NodeOnOpenOrdinal, event_) |
| } |
| func (p *NodeEventProxy) OnRepresentation(payload Representation) error { |
| event_ := &nodeWithCtxOnRepresentationResponse{Payload: payload} |
| return ((*_bindings.ChannelProxy)(p)).Send(NodeOnRepresentationOrdinal, event_) |
| } |
| |
| const ( |
| Node1CloneOrdinal uint64 = 0x5a61678f293ce16f |
| Node1OnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972 |
| Node1GetAttrOrdinal uint64 = 0x78985e216314dafd |
| Node1SetAttrOrdinal uint64 = 0x4186c0f40d938f46 |
| Node1GetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1 |
| Node1SetFlagsOrdinal uint64 = 0x5295b76c71fde733 |
| Node1QueryFilesystemOrdinal uint64 = 0x6f344a1c6b0a0610 |
| ) |
| |
| type Node1WithCtxInterface _bindings.ChannelProxy |
| |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| func (p *Node1WithCtxInterface) Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error { |
| req_ := &node1WithCtxCloneRequest{Flags: flags, Object: object} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(Node1CloneOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| func (p *Node1WithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfoDeprecated, error) { |
| resp_ := &node1WithCtxOnOpenResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(Node1OnOpenOrdinal, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| func (p *Node1WithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) { |
| var req_ _bindings.Message |
| resp_ := &node1WithCtxGetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node1GetAttrOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Attributes, err_ |
| } |
| |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| func (p *Node1WithCtxInterface) SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) { |
| req_ := &node1WithCtxSetAttrRequest{Flags: flags, Attributes: attributes} |
| resp_ := &node1WithCtxSetAttrResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node1SetAttrOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| func (p *Node1WithCtxInterface) GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) { |
| var req_ _bindings.Message |
| resp_ := &node1WithCtxGetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node1GetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Flags, err_ |
| } |
| |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| func (p *Node1WithCtxInterface) SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) { |
| req_ := &node1WithCtxSetFlagsRequest{Flags: flags} |
| resp_ := &node1WithCtxSetFlagsResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node1SetFlagsOrdinal, req_, resp_) |
| return (*resp_).S, err_ |
| } |
| |
| // Query the filesystem for filesystem-specific information. |
| func (p *Node1WithCtxInterface) QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &node1WithCtxQueryFilesystemResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node1QueryFilesystemOrdinal, req_, resp_) |
| return (*resp_).S, (*resp_).Info, err_ |
| } |
| |
| // Node defines the minimal interface for entities which can be accessed in a filesystem. |
| type Node1WithCtx interface { |
| // Create another connection to the same remote object. |
| // |
| // `flags` may be any of: |
| // |
| // - `OpenFlags.RIGHT_*` |
| // - `OpenFlags.APPEND` |
| // - `OpenFlags.DESCRIBE` |
| // - `OpenFlags.CLONE_SAME_RIGHTS` |
| // |
| // All other flags are ignored. |
| // |
| // The `OpenFlags.RIGHT_*` bits in `flags` request corresponding rights over the resulting |
| // cloned object. |
| // The cloned object must have rights less than or equal to the original object, otherwise |
| // returns `ZX_ERR_ACCESS_DENIED`. |
| // Alternatively, pass `OpenFlags.CLONE_SAME_RIGHTS` to inherit the rights on the source connection. |
| // It is invalid to pass any of the `OpenFlags.RIGHT_*` flags together with |
| // `OpenFlags.CLONE_SAME_RIGHTS`. |
| Clone(ctx_ _bindings.Context, flags OpenFlags, object NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`. |
| // |
| // Indicates the success or failure of the open operation, and optionally describes the |
| // object. If the status is `ZX_OK`, `info` contains descriptive information about the object |
| // (the same as would be returned by `Describe`). |
| // Acquires information about the node. |
| // |
| // This method does not require any rights. |
| GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) |
| // Updates information about the node. |
| // |
| // This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| // `ZX_ERR_BAD_HANDLE`. |
| SetAttr(ctx_ _bindings.Context, flags NodeAttributeFlags, attributes NodeAttributes) (int32, error) |
| // Acquires the `Directory.Open` rights and flags used to access this file. |
| // |
| // This method does not require any rights. |
| GetFlags(ctx_ _bindings.Context) (int32, OpenFlags, error) |
| // Changes the `Directory.Open` flags used to access the file. |
| // Supported flags which can be turned on / off: |
| // - `OpenFlags.APPEND` |
| // |
| // This method does not require any rights. |
| SetFlags(ctx_ _bindings.Context, flags OpenFlags) (int32, error) |
| // Query the filesystem for filesystem-specific information. |
| QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) |
| } |
| |
| type Node1WithCtxTransitionalBase struct{} |
| |
| type Node1WithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewNode1WithCtxInterfaceRequest() (Node1WithCtxInterfaceRequest, *Node1WithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return Node1WithCtxInterfaceRequest(req), (*Node1WithCtxInterface)(cli), err |
| } |
| |
| type Node1WithCtxStub struct { |
| Impl Node1WithCtx |
| } |
| |
| func (s_ *Node1WithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case Node1CloneOrdinal: |
| in_ := &node1WithCtxCloneRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Clone(args_.Ctx, (*in_).Flags, (*in_).Object) |
| return nil, false, err_ |
| case Node1GetAttrOrdinal: |
| s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx) |
| out_ := &node1WithCtxGetAttrResponse{S: s, Attributes: attributes} |
| return out_, true, err_ |
| case Node1SetAttrOrdinal: |
| in_ := &node1WithCtxSetAttrRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetAttr(args_.Ctx, (*in_).Flags, (*in_).Attributes) |
| out_ := &node1WithCtxSetAttrResponse{S: s} |
| return out_, true, err_ |
| case Node1GetFlagsOrdinal: |
| s, flags, err_ := s_.Impl.GetFlags(args_.Ctx) |
| out_ := &node1WithCtxGetFlagsResponse{S: s, Flags: flags} |
| return out_, true, err_ |
| case Node1SetFlagsOrdinal: |
| in_ := &node1WithCtxSetFlagsRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| s, err_ := s_.Impl.SetFlags(args_.Ctx, (*in_).Flags) |
| out_ := &node1WithCtxSetFlagsResponse{S: s} |
| return out_, true, err_ |
| case Node1QueryFilesystemOrdinal: |
| s, info, err_ := s_.Impl.QueryFilesystem(args_.Ctx) |
| out_ := &node1WithCtxQueryFilesystemResponse{S: s, Info: info} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type Node1EventProxy _bindings.ChannelProxy |
| |
| func (p *Node1EventProxy) OnOpen(s int32, info *NodeInfoDeprecated) error { |
| event_ := &node1WithCtxOnOpenResponse{S: s, Info: info} |
| return ((*_bindings.ChannelProxy)(p)).Send(Node1OnOpenOrdinal, event_) |
| } |
| |
| const ( |
| Node2CloseOrdinal uint64 = 0x5ac5d459ad7f657e |
| Node2QueryOrdinal uint64 = 0x2658edee9decfc06 |
| Node2ReopenOrdinal uint64 = 0x6a849ef281d2baa1 |
| Node2OnRepresentationOrdinal uint64 = 0x5cb40567d80a510c |
| Node2GetConnectionInfoOrdinal uint64 = 0x584c377c7c0a6d0b |
| Node2GetAttributesOrdinal uint64 = 0x3d4396a638ea053b |
| Node2UpdateAttributesOrdinal uint64 = 0x3308c1da5a89bf08 |
| Node2SyncOrdinal uint64 = 0x2c5c27ca0ab5dc49 |
| ) |
| |
| type Node2WithCtxInterface _bindings.ChannelProxy |
| |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| func (p *Node2WithCtxInterface) Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) { |
| var req_ _bindings.Message |
| resp_ := &node2WithCtxCloseResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node2CloseOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| func (p *Node2WithCtxInterface) Query(ctx_ _bindings.Context) ([]uint8, error) { |
| var req_ _bindings.Message |
| resp_ := &node2WithCtxQueryResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node2QueryOrdinal, req_, resp_) |
| return (*resp_).Protocol, err_ |
| } |
| |
| // Creates another connection to the same node. |
| // |
| // - `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. |
| func (p *Node2WithCtxInterface) Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error { |
| req_ := &node2WithCtxReopenRequest{RightsRequest: rightsRequest, ObjectRequest: objectRequest} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(Node2ReopenOrdinal, req_) |
| return err_ |
| } |
| |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| func (p *Node2WithCtxInterface) ExpectOnRepresentation(ctx_ _bindings.Context) (Representation, error) { |
| resp_ := &node2WithCtxOnRepresentationResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Recv(Node2OnRepresentationOrdinal, resp_) |
| return (*resp_).Payload, err_ |
| } |
| |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| func (p *Node2WithCtxInterface) GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) { |
| var req_ _bindings.Message |
| resp_ := &ConnectionInfo{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node2GetConnectionInfoOrdinal, req_, resp_) |
| return (*resp_), err_ |
| } |
| |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // - `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 *Node2WithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (Node2GetAttributesResult, error) { |
| req_ := &node2WithCtxGetAttributesRequest{Query: query} |
| resp_ := &node2WithCtxGetAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node2GetAttributesOrdinal, 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 *Node2WithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, payload MutableNodeAttributes) (Node2UpdateAttributesResult, error) { |
| req_ := &payload |
| resp_ := &node2WithCtxUpdateAttributesResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node2UpdateAttributesOrdinal, 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 *Node2WithCtxInterface) Sync(ctx_ _bindings.Context) (Node2SyncResult, error) { |
| var req_ _bindings.Message |
| resp_ := &node2WithCtxSyncResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(Node2SyncOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| // Node defines the minimal protocol for entities which can be accessed |
| // in a filesystem. |
| type Node2WithCtx interface { |
| // Terminates the connection. |
| // |
| // After calling `Close`, the client must not send any other requests. |
| // |
| // Servers, after sending the status response, should close the connection |
| // regardless of status and without sending an epitaph. |
| // |
| // Closing the client end of the channel should be semantically equivalent |
| // to calling `Close` without knowing when the close has completed or its |
| // status. |
| Close(ctx_ _bindings.Context) (fuchsiaunknown.CloseableCloseResult, error) |
| Query(ctx_ _bindings.Context) ([]uint8, error) |
| // Creates another connection to the same node. |
| // |
| // + `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. |
| Reopen(ctx_ _bindings.Context, rightsRequest *RightsRequest, objectRequest NodeWithCtxInterfaceRequest) error |
| // An event produced eagerly by the server if requested by |
| // [`NodeFlags.GET_REPRESENTATION`]. This event will be the first message |
| // from the server, and is sent exactly once. |
| // |
| // 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. |
| // |
| // If the client specified more than one protocol in `protocols` during |
| // [`Directory.Open`], the [`Representation`] carries additionally the |
| // result of the connection-time negotiation via its tag. |
| // |
| // The elements have one-to-one correspondence with the members of |
| // [`NodeProtocolKinds`]. |
| // |
| // This is a special case of [`fuchsia.unknown/Queryable.Query`] + |
| // inherent `Describe` methods on the specific protocols. It exists as |
| // an optimization to avoid an additional round trip. |
| // Acquires information about the connection. |
| // |
| // This method does not require any rights. |
| GetConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) |
| // Acquires information about the node. |
| // |
| // 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. |
| // |
| // + `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) (Node2GetAttributesResult, 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, payload MutableNodeAttributes) (Node2UpdateAttributesResult, 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) (Node2SyncResult, error) |
| } |
| |
| type Node2WithCtxTransitionalBase struct{} |
| |
| type Node2WithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewNode2WithCtxInterfaceRequest() (Node2WithCtxInterfaceRequest, *Node2WithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return Node2WithCtxInterfaceRequest(req), (*Node2WithCtxInterface)(cli), err |
| } |
| |
| type Node2WithCtxStub struct { |
| Impl Node2WithCtx |
| } |
| |
| func (s_ *Node2WithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case Node2CloseOrdinal: |
| result, err_ := s_.Impl.Close(args_.Ctx) |
| out_ := &node2WithCtxCloseResponse{Result: result} |
| return out_, true, err_ |
| case Node2QueryOrdinal: |
| protocol, err_ := s_.Impl.Query(args_.Ctx) |
| out_ := &node2WithCtxQueryResponse{Protocol: protocol} |
| return out_, true, err_ |
| case Node2ReopenOrdinal: |
| in_ := &node2WithCtxReopenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Reopen(args_.Ctx, (*in_).RightsRequest, (*in_).ObjectRequest) |
| return nil, false, err_ |
| case Node2GetConnectionInfoOrdinal: |
| payload, err_ := s_.Impl.GetConnectionInfo(args_.Ctx) |
| out_ := &payload |
| return out_, true, err_ |
| case Node2GetAttributesOrdinal: |
| in_ := &node2WithCtxGetAttributesRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.GetAttributes(args_.Ctx, (*in_).Query) |
| out_ := &node2WithCtxGetAttributesResponse{Result: result} |
| return out_, true, err_ |
| case Node2UpdateAttributesOrdinal: |
| in_ := &MutableNodeAttributes{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, (*in_)) |
| out_ := &node2WithCtxUpdateAttributesResponse{Result: result} |
| return out_, true, err_ |
| case Node2SyncOrdinal: |
| result, err_ := s_.Impl.Sync(args_.Ctx) |
| out_ := &node2WithCtxSyncResponse{Result: result} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type Node2EventProxy _bindings.ChannelProxy |
| |
| func (p *Node2EventProxy) OnRepresentation(payload Representation) error { |
| event_ := &node2WithCtxOnRepresentationResponse{Payload: payload} |
| return ((*_bindings.ChannelProxy)(p)).Send(Node2OnRepresentationOrdinal, event_) |
| } |
| |
| const ( |
| OpenableOpenOrdinal uint64 = 0x2c5044561d685ec0 |
| ) |
| |
| type OpenableWithCtxInterface _bindings.ChannelProxy |
| |
| // Opens a new object relative to this directory object. |
| // |
| // `path` may contain multiple segments, separated by "/" characters, and should never be |
| // empty; i.e. "" is an invalid path. A trailing slash implies OpenFlags.DIRECTORY. Components |
| // must not be empty (i.e. "foo//bar" is invalid). ".." is disallowed anywhere in the path. "." |
| // is only allowed if the path is exactly ".", but not otherwise. A leading '/' is allowed (and |
| // is treated the same way as if not present, i.e. "/foo/bar' and "foo/bar" are the same). |
| // |
| // If an unknown value is sent for flags the connection should be closed. |
| // |
| // `OpenFlags.RIGHT_*` flags provided in `flags` will restrict access rights on |
| // the `object` channel which will be connected to the opened entity. |
| // |
| // Rights are never increased. When you open a nested entity within a directory, you may only |
| // request the same rights as what the directory connection already has, or a subset of those. |
| // Exceeding those rights causes an access denied error to be transmitted in the |
| // `OnOpen` event if applicable, and the `object` connection closed. |
| // |
| // `mode` is ignored. |
| func (p *OpenableWithCtxInterface) Open(ctx_ _bindings.Context, flags OpenFlags, mode ModeType, path string, object NodeWithCtxInterfaceRequest) error { |
| req_ := &openableWithCtxOpenRequest{Flags: flags, Mode: mode, Path: path, Object: object} |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(OpenableOpenOrdinal, req_) |
| return err_ |
| } |
| |
| type OpenableWithCtx interface { |
| // Opens a new object relative to this directory object. |
| // |
| // `path` may contain multiple segments, separated by "/" characters, and should never be |
| // empty; i.e. "" is an invalid path. A trailing slash implies OpenFlags.DIRECTORY. Components |
| // must not be empty (i.e. "foo//bar" is invalid). ".." is disallowed anywhere in the path. "." |
| // is only allowed if the path is exactly ".", but not otherwise. A leading '/' is allowed (and |
| // is treated the same way as if not present, i.e. "/foo/bar' and "foo/bar" are the same). |
| // |
| // If an unknown value is sent for flags the connection should be closed. |
| // |
| // `OpenFlags.RIGHT_*` flags provided in `flags` will restrict access rights on |
| // the `object` channel which will be connected to the opened entity. |
| // |
| // Rights are never increased. When you open a nested entity within a directory, you may only |
| // request the same rights as what the directory connection already has, or a subset of those. |
| // Exceeding those rights causes an access denied error to be transmitted in the |
| // `OnOpen` event if applicable, and the `object` connection closed. |
| // |
| // `mode` is ignored. |
| Open(ctx_ _bindings.Context, flags OpenFlags, mode ModeType, path string, object NodeWithCtxInterfaceRequest) error |
| } |
| |
| type OpenableWithCtxTransitionalBase struct{} |
| |
| type OpenableWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewOpenableWithCtxInterfaceRequest() (OpenableWithCtxInterfaceRequest, *OpenableWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return OpenableWithCtxInterfaceRequest(req), (*OpenableWithCtxInterface)(cli), err |
| } |
| |
| type OpenableWithCtxStub struct { |
| Impl OpenableWithCtx |
| } |
| |
| func (s_ *OpenableWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case OpenableOpenOrdinal: |
| in_ := &openableWithCtxOpenRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.Open(args_.Ctx, (*in_).Flags, (*in_).Mode, (*in_).Path, (*in_).Object) |
| return nil, false, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type OpenableEventProxy _bindings.ChannelProxy |
| |
| const ( |
| ReadableReadOrdinal uint64 = 0x57e419a298c8ede |
| ) |
| |
| type ReadableWithCtxInterface _bindings.ChannelProxy |
| |
| // 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. |
| // |
| // Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`. |
| func (p *ReadableWithCtxInterface) Read(ctx_ _bindings.Context, count uint64) (ReadableReadResult, error) { |
| req_ := &readableWithCtxReadRequest{Count: count} |
| resp_ := &readableWithCtxReadResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(ReadableReadOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| type ReadableWithCtx interface { |
| // 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. |
| // |
| // Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`. |
| Read(ctx_ _bindings.Context, count uint64) (ReadableReadResult, error) |
| } |
| |
| type ReadableWithCtxTransitionalBase struct{} |
| |
| type ReadableWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewReadableWithCtxInterfaceRequest() (ReadableWithCtxInterfaceRequest, *ReadableWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return ReadableWithCtxInterfaceRequest(req), (*ReadableWithCtxInterface)(cli), err |
| } |
| |
| type ReadableWithCtxStub struct { |
| Impl ReadableWithCtx |
| } |
| |
| func (s_ *ReadableWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case ReadableReadOrdinal: |
| in_ := &readableWithCtxReadRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Read(args_.Ctx, (*in_).Count) |
| out_ := &readableWithCtxReadResponse{Result: result} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type ReadableEventProxy _bindings.ChannelProxy |
| |
| const ( |
| WritableWriteOrdinal uint64 = 0x6a31437832469f82 |
| ) |
| |
| type WritableWithCtxInterface _bindings.ChannelProxy |
| |
| // 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 no bytes |
| // could be written, an error is returned. |
| // - If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file and return a |
| // successful write of zero bytes. The seek offset is still updated if |
| // in append mode. |
| // |
| // This method requires the [`Rights.WRITE_BYTES`] right. |
| func (p *WritableWithCtxInterface) Write(ctx_ _bindings.Context, data []uint8) (WritableWriteResult, error) { |
| req_ := &writableWithCtxWriteRequest{Data: data} |
| resp_ := &writableWithCtxWriteResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(WritableWriteOrdinal, req_, resp_) |
| return (*resp_).Result, err_ |
| } |
| |
| type WritableWithCtx interface { |
| // 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 no bytes |
| // could be written, an error is returned. |
| // * If `data.length` is zero, the server should perform all the checks |
| // ensuring write access without mutating the file and return a |
| // successful write of zero bytes. The seek offset is still updated if |
| // in append mode. |
| // |
| // This method requires the [`Rights.WRITE_BYTES`] right. |
| Write(ctx_ _bindings.Context, data []uint8) (WritableWriteResult, error) |
| } |
| |
| type WritableWithCtxTransitionalBase struct{} |
| |
| type WritableWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewWritableWithCtxInterfaceRequest() (WritableWithCtxInterfaceRequest, *WritableWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return WritableWithCtxInterfaceRequest(req), (*WritableWithCtxInterface)(cli), err |
| } |
| |
| type WritableWithCtxStub struct { |
| Impl WritableWithCtx |
| } |
| |
| func (s_ *WritableWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case WritableWriteOrdinal: |
| in_ := &writableWithCtxWriteRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if err_ := _bindings.Unmarshal(marshalerCtx, args_.Bytes, args_.HandleInfos, in_); err_ != nil { |
| return nil, false, err_ |
| } |
| result, err_ := s_.Impl.Write(args_.Ctx, (*in_).Data) |
| out_ := &writableWithCtxWriteResponse{Result: result} |
| return out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type WritableEventProxy _bindings.ChannelProxy |