blob: 2588ede89ebbdd1a7ac0ea83bbf09e039bb3faa4 [file] [log] [blame]
// 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.
package io
import (
_zx "syscall/zx"
_bindings "syscall/zx/fidl"
fuchsiaio2 "syscall/zx/io2"
fuchsiamem "syscall/zx/mem"
)
const (
// Indicates the file is ready for reading.
FileSignalReadable uint32 = 16777216
// Indicates the file is ready for writing.
FileSignalWritable uint32 = 33554432
// Indicates the device is ready for reading.
DeviceSignalReadable uint32 = 16777216
// Indicates an out-of-band state transition has occurred.
DeviceSignalOob uint32 = 33554432
// Indicates the device is ready for writing.
DeviceSignalWritable uint32 = 67108864
// Indicates the device has encountered an error state.
DeviceSignalError uint32 = 134217728
// Indicates the device has hung up on the current connection.
DeviceSignalHangup uint32 = 268435456
// Can read from target object.
OpenRightReadable uint32 = 1
// Can write to target object.
OpenRightWritable uint32 = 2
// Connection can mount/umount filesystem.
OpenRightAdmin uint32 = 4
// Connection can map target object executable.
OpenRightExecutable uint32 = 8
// Create the object if it doesn't exist.
OpenFlagCreate uint32 = 65536
// (with Create) Fail if the object already exists.
OpenFlagCreateIfAbsent uint32 = 131072
// Truncate the object before usage.
OpenFlagTruncate uint32 = 262144
// Assert that the object to be opened is a directory.
// Return an error if the target object is not a directory.
OpenFlagDirectory uint32 = 524288
// Seek to the end of the object before all writes.
OpenFlagAppend uint32 = 1048576
// If the object is a mount point, open the local directory.
OpenFlagNoRemote uint32 = 2097152
// Open a reference to the object, not the object itself.
// It is ONLY valid to pass the following flags together with `OPEN_FLAG_NODE_REFERENCE`:
// - `OPEN_FLAG_DIRECTORY`
// - `OPEN_FLAG_NOT_DIRECTORY`
// - `OPEN_FLAG_DESCRIBE`
// otherwise an error is returned.
// If an object is opened or cloned using this method, the resulting connection does not carry
// any permission flags.
// The resulting node allows a limited set of operations: `GetAttr`, `Clone`, `Close`, `Describe`,
// and, if the node is a file, these extra operations: `GetFlags`, `SetFlags`.
OpenFlagNodeReference uint32 = 4194304
// Binary OR of `OPEN_FLAG_DIRECTORY`, OPEN_FLAG_NOT_DIRECTORY, OPEN_FLAG_DESCRIBE, and
// `OPEN_FLAG_NODE_REFERENCE`. Flags used when opening a node reference must fall within this mask.
OpenFlagsAllowedWithNodeReference uint32 = 46661632
// Requests that an "OnOpen" event is sent to the interface request.
// The event will contain a non-null NodeInfo if the open/clone is successful.
OpenFlagDescribe uint32 = 8388608
// Specify this flag to request POSIX-compatibility with respect to execute and write permissions.
// This flag implies OPEN_FLAG_POSIX_WRITABLE and OPEN_FLAG_POSIX_EXECUTABLE.
//
// Use of this flag is being deprecated, and should be replaced with a combination of
// OPEN_FLAG_POSIX_WRITABLE and/or OPEN_FLAG_POSIX_EXECUTABLE.
OpenFlagPosix uint32 = 16777216
// Specify this flag to request POSIX-compatibility with respect to write permission handling.
// Currently, it affects permission handling specifically during Open:
// - If the target path is a directory, the rights on the new connection expand to include
// `OPEN_RIGHT_WRITABLE` if and only if the current connection and all intermediate mount points
// are writable.
// - Otherwise, this flag is ignored. It is an access denied error to request more rights
// than those on the current connection, or any intermediate mount points.
//
// If this flag is omitted, opening always uses the requested rights, failing the operation with
// access denied error if requested rights exceeds the rights attached to the current connection.
//
// If the requesting connection is read-only and the requested rights are read-only, the flag
// may be ignored by the server, and is not forwarded downstream. This is an implementation detail,
// necessary to enforce hierarchical permissions across mount points, and should have no effect
// on the expected behavior for clients.
OpenFlagPosixWritable uint32 = 134217728
// Specify this flag to request POSIX-compatibility with respect to execute permission handling.
// Currently, it affects permission handling specifically during Open:
// - If the target path is a directory, the rights on the new connection expand to include
// `OPEN_RIGHT_EXECUTABLE` if and only if the current connection and all intermediate mount
// points are executable.
// - Otherwise, this flag is ignored. It is an access denied error to request more rights
// than those on the current connection, or any intermediate mount points.
//
// If this flag is omitted, opening always uses the requested rights, failing the operation with
// access denied error if requested rights exceeds the rights attached to the current connection.
//
// If the requesting connection is read-only and the requested rights are read-only, the flag
// may be ignored by the server, and is not forwarded downstream. This is an implementation detail,
// necessary to enforce hierarchical permissions across mount points, and should have no effect
// on the expected behavior for clients.
OpenFlagPosixExecutable uint32 = 268435456
// Assert that the object to be opened is not a directory.
// Return an error if the target object is a directory.
OpenFlagNotDirectory uint32 = 33554432
// When used during clone, the new connection inherits the rights on the source connection,
// regardless if it is a file or directory. Otherwise, clone attempts to use the requested rights.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with `CLONE_FLAG_SAME_RIGHTS`.
CloneFlagSameRights uint32 = 67108864
// 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
// 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
ModeTypeDirectory uint32 = 16384
ModeTypeBlockDevice uint32 = 24576
ModeTypeFile uint32 = 32768
ModeTypeSocket uint32 = 49152
ModeTypeService uint32 = 65536
// 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 filesystem string.
MaxPath uint64 = 4096
// The maximum length, in bytes, of a single filesystem component.
MaxFilename uint64 = 255
// The fields of 'attributes' which are used to update the Node are indicated
// by the 'flags' argument.
NodeAttributeFlagCreationTime uint32 = 1
NodeAttributeFlagModificationTime uint32 = 2
// Requests that the VMO be readable.
VmoFlagRead uint32 = 1
// Requests that the VMO be writable.
VmoFlagWrite uint32 = 2
// Requests that the VMO be executable.
VmoFlagExec uint32 = 4
// Require a copy-on-write clone of the underlying VMO.
// The request should fail if the VMO is not cloned.
// May not be supplied with fuchsia_io_`VMO_FLAG_EXACT`.
VmoFlagPrivate uint32 = 65536
// Require an exact (non-cloned) handle to the underlying VMO.
// The request should fail if a handle to the exact VMO is not returned.
// May not be supplied with `VMO_FLAG_PRIVATE`.
VmoFlagExact uint32 = 131072
// A dirent with an unknown type.
DirentTypeUnknown uint8 = 0
// A dirent representing a directory object.
DirentTypeDirectory uint8 = 4
// A dirent representing a block device object.
DirentTypeBlockDevice uint8 = 6
// A dirent representing a file object.
DirentTypeFile uint8 = 8
// A dirent representing a socket object.
DirentTypeSocket uint8 = 12
// A dirent representing a service object.
DirentTypeService uint8 = 16
// Nodes which do not have ino values should return this value
// from Readdir and GetAttr.
InoUnknown uint64 = 18446744073709551615
// Indicates the directory being watched has been deleted.
WatchEventDeleted uint8 = 0
// Indicates a node has been created (either new or moved) into a directory.
WatchEventAdded uint8 = 1
// Identifies a node has been removed (either deleted or moved) from the directory.
WatchEventRemoved uint8 = 2
// Identifies a node already existed in the directory when watching started.
WatchEventExisting uint8 = 3
// Identifies that no more `WATCH_EVENT_EXISTING` events will be sent.
WatchEventIdle uint8 = 4
// Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_DELETED`.
WatchMaskDeleted uint32 = 1
// Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_ADDED`.
WatchMaskAdded uint32 = 2
// Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_REMOVED`.
WatchMaskRemoved uint32 = 4
// Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_EXISTING`.
WatchMaskExisting uint32 = 8
// Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_IDLE`.
WatchMaskIdle uint32 = 16
// Used by `Directory.Watch`. Requests transmission of all watcher events.
WatchMaskAll uint32 = 31
MountCreateFlagReplace uint32 = 1
MaxFsNameBuffer uint64 = 32
)
var _ _bindings.Enum = SeekOrigin(0)
// Update the Seek offset.
type SeekOrigin uint32
const (
// Seek from the start of the file.
SeekOriginStart SeekOrigin = 0
// Seek from the current position in the file.
SeekOriginCurrent SeekOrigin = 1
// Seek from the end of the file.
SeekOriginEnd SeekOrigin = 2
)
func (_ SeekOrigin) I_EnumValues() []SeekOrigin {
return []SeekOrigin{
SeekOriginStart,
SeekOriginCurrent,
SeekOriginEnd,
}
}
func (_ SeekOrigin) I_EnumIsStrict() bool {
return true
}
func (x SeekOrigin) IsUnknown() bool {
switch x {
case 0:
return false
case 1:
return false
case 2:
return false
default:
return true
}
}
func (x SeekOrigin) String() string {
switch x {
case 0:
return "Start"
case 1:
return "Current"
case 2:
return "End"
}
return "Unknown"
}
type DirectoryUnlinkResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"`
}
var _mDirectoryUnlinkResponse = _bindings.CreateLazyMarshaler(DirectoryUnlinkResponse{})
func (msg *DirectoryUnlinkResponse) Marshaler() _bindings.Marshaler {
return _mDirectoryUnlinkResponse
}
type DirectoryRename2Response struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"`
}
var _mDirectoryRename2Response = _bindings.CreateLazyMarshaler(DirectoryRename2Response{})
func (msg *DirectoryRename2Response) Marshaler() _bindings.Marshaler {
return _mDirectoryRename2Response
}
// A [`NodeInfo`] variant.
type Service struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"`
}
var _mService = _bindings.CreateLazyMarshaler(Service{})
func (msg *Service) Marshaler() _bindings.Marshaler {
return _mService
}
// A [`NodeInfo`] variant.
type FileObject struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"4" 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_v1:"0" 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_v1:"4" 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
}
// A [`NodeInfo`] variant.
type DirectoryObject struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v2:"1" fidl_alignment_v2:"1"`
}
var _mDirectoryObject = _bindings.CreateLazyMarshaler(DirectoryObject{})
func (msg *DirectoryObject) Marshaler() _bindings.Marshaler {
return _mDirectoryObject
}
// A [`NodeInfo`] variant.
type Pipe struct {
_ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4" fidl_size_v2:"4" fidl_alignment_v2:"4"`
Socket _zx.Socket `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
}
var _mPipe = _bindings.CreateLazyMarshaler(Pipe{})
func (msg *Pipe) Marshaler() _bindings.Marshaler {
return _mPipe
}
// A [`NodeInfo`] variant.
type Vmofile struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
// The VMO which backs this file.
Vmo _zx.VMO `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
// The index into `vmo` which represents the first byte of the file.
Offset uint64 `fidl_offset_v1:"8" fidl_offset_v2:"8"`
// The number of bytes, starting at `offset`, which may be used to represent this file.
Length uint64 `fidl_offset_v1:"16" fidl_offset_v2:"16"`
}
var _mVmofile = _bindings.CreateLazyMarshaler(Vmofile{})
func (msg *Vmofile) Marshaler() _bindings.Marshaler {
return _mVmofile
}
// A [`NodeInfo`] variant.
type Device struct {
_ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4" fidl_size_v2:"4" fidl_alignment_v2:"4"`
// An optional event which transmits information about a device's state.
//
// The "`DEVICE_SIGNAL_`" values may be observed on this event.
Event _zx.Handle `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
}
var _mDevice = _bindings.CreateLazyMarshaler(Device{})
func (msg *Device) Marshaler() _bindings.Marshaler {
return _mDevice
}
// A [`NodeInfo`] variant.
type Tty struct {
_ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4" fidl_size_v2:"4" fidl_alignment_v2:"4"`
Event _zx.Handle `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
}
var _mTty = _bindings.CreateLazyMarshaler(Tty{})
func (msg *Tty) Marshaler() _bindings.Marshaler {
return _mTty
}
// A [`NodeInfo`] variant.
type DatagramSocket struct {
_ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4" fidl_size_v2:"4" fidl_alignment_v2:"4"`
// See [`fuchsia.posix.socket.DatagramSocket`] for details.
Event _zx.Handle `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
}
var _mDatagramSocket = _bindings.CreateLazyMarshaler(DatagramSocket{})
func (msg *DatagramSocket) Marshaler() _bindings.Marshaler {
return _mDatagramSocket
}
// A [`NodeInfo`] variant.
type StreamSocket struct {
_ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4" fidl_size_v2:"4" fidl_alignment_v2:"4"`
Socket _zx.Socket `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
}
var _mStreamSocket = _bindings.CreateLazyMarshaler(StreamSocket{})
func (msg *StreamSocket) Marshaler() _bindings.Marshaler {
return _mStreamSocket
}
// A [`NodeInfo`] variant.
type RawSocket struct {
_ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4" fidl_size_v2:"4" fidl_alignment_v2:"4"`
// See [`fuchsia.posix.socket.raw.Socket`] for details.
Event _zx.Handle `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
}
var _mRawSocket = _bindings.CreateLazyMarshaler(RawSocket{})
func (msg *RawSocket) Marshaler() _bindings.Marshaler {
return _mRawSocket
}
// NodeAttributes defines generic information about a filesystem node.
type NodeAttributes struct {
_ struct{} `fidl:"s" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v2:"56" fidl_alignment_v2:"8"`
// Protection bits and node type information describe in 'mode'.
Mode uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
// A filesystem-unique ID.
Id uint64 `fidl_offset_v1:"8" fidl_offset_v2:"8"`
// Node size, in bytes.
ContentSize uint64 `fidl_offset_v1:"16" fidl_offset_v2:"16"`
// Space needed to store node (possibly larger than size), in bytes.
StorageSize uint64 `fidl_offset_v1:"24" fidl_offset_v2:"24"`
// Hard link count.
LinkCount uint64 `fidl_offset_v1:"32" fidl_offset_v2:"32"`
// Time of creation (may be updated manually after creation) in ns since Unix epoch, UTC.
CreationTime uint64 `fidl_offset_v1:"40" fidl_offset_v2:"40"`
// Time of last modification in ns since Unix epoch, UTC.
ModificationTime uint64 `fidl_offset_v1:"48" fidl_offset_v2:"48"`
}
var _mNodeAttributes = _bindings.CreateLazyMarshaler(NodeAttributes{})
func (msg *NodeAttributes) Marshaler() _bindings.Marshaler {
return _mNodeAttributes
}
// WatchedEvent describes events returned from a DirectoryWatcher.
type WatchedEvent struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
Event uint8 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Len uint8 `fidl_offset_v1:"1" fidl_offset_v2:"1"`
Name []uint8 `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_bounds:"255"`
}
var _mWatchedEvent = _bindings.CreateLazyMarshaler(WatchedEvent{})
func (msg *WatchedEvent) Marshaler() _bindings.Marshaler {
return _mWatchedEvent
}
type FilesystemInfo struct {
_ struct{} `fidl:"s" fidl_size_v1:"96" fidl_alignment_v1:"8" fidl_size_v2:"96" fidl_alignment_v2:"8"`
// The number of data bytes which may be stored in a filesystem.
TotalBytes uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
// The number of data bytes which are in use by the filesystem.
UsedBytes uint64 `fidl_offset_v1:"8" fidl_offset_v2:"8"`
// The number of nodes which may be stored in the filesystem.
TotalNodes uint64 `fidl_offset_v1:"16" fidl_offset_v2:"16"`
// The number of nodes used by the filesystem.
UsedNodes uint64 `fidl_offset_v1:"24" fidl_offset_v2:"24"`
// The amount of space which may be allocated from the underlying
// volume manager. If unsupported, this will be zero.
FreeSharedPoolBytes uint64 `fidl_offset_v1:"32" fidl_offset_v2:"32"`
// A unique identifier for this filesystem instance. Will not be preserved
// across reboots.
FsId uint64 `fidl_offset_v1:"40" fidl_offset_v2:"40"`
// The size of a single filesystem block.
BlockSize uint32 `fidl_offset_v1:"48" fidl_offset_v2:"48"`
// The maximum length of a filesystem name.
MaxFilenameSize uint32 `fidl_offset_v1:"52" fidl_offset_v2:"52"`
// A unique identifier for the type of the underlying filesystem.
FsType uint32 `fidl_offset_v1:"56" fidl_offset_v2:"56"`
Padding uint32 `fidl_offset_v1:"60" fidl_offset_v2:"60"`
Name [32]int8 `fidl_offset_v1:"64" fidl_offset_v2:"64"`
}
var _mFilesystemInfo = _bindings.CreateLazyMarshaler(FilesystemInfo{})
func (msg *FilesystemInfo) Marshaler() _bindings.Marshaler {
return _mFilesystemInfo
}
type nodeWithCtxCloneRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" 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 nodeWithCtxCloseResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mnodeWithCtxCloseResponse = _bindings.CreateLazyMarshaler(nodeWithCtxCloseResponse{})
func (msg *nodeWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
return _mnodeWithCtxCloseResponse
}
type nodeWithCtxDescribeResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Info NodeInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mnodeWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(nodeWithCtxDescribeResponse{})
func (msg *nodeWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
return _mnodeWithCtxDescribeResponse
}
type nodeWithCtxOnOpenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Info *NodeInfo `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mnodeWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(nodeWithCtxOnOpenResponse{})
func (msg *nodeWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
return _mnodeWithCtxOnOpenResponse
}
type nodeWithCtxSyncResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mnodeWithCtxSyncResponse = _bindings.CreateLazyMarshaler(nodeWithCtxSyncResponse{})
func (msg *nodeWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
return _mnodeWithCtxSyncResponse
}
type nodeWithCtxGetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v2:"64" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Attributes NodeAttributes `fidl_offset_v1:"8" 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_v1:"64" fidl_alignment_v1:"8" fidl_size_v2:"64" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Attributes NodeAttributes `fidl_offset_v1:"8" 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_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mnodeWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(nodeWithCtxSetAttrResponse{})
func (msg *nodeWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
return _mnodeWithCtxSetAttrResponse
}
type nodeWithCtxNodeGetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Flags uint32 `fidl_offset_v1:"4" fidl_offset_v2:"4"`
}
var _mnodeWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(nodeWithCtxNodeGetFlagsResponse{})
func (msg *nodeWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mnodeWithCtxNodeGetFlagsResponse
}
type nodeWithCtxNodeSetFlagsRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mnodeWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(nodeWithCtxNodeSetFlagsRequest{})
func (msg *nodeWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
return _mnodeWithCtxNodeSetFlagsRequest
}
type nodeWithCtxNodeSetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mnodeWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(nodeWithCtxNodeSetFlagsResponse{})
func (msg *nodeWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mnodeWithCtxNodeSetFlagsResponse
}
type fileWithCtxCloneRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" 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 fileWithCtxCloseResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxCloseResponse = _bindings.CreateLazyMarshaler(fileWithCtxCloseResponse{})
func (msg *fileWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxCloseResponse
}
type fileWithCtxDescribeResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Info NodeInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(fileWithCtxDescribeResponse{})
func (msg *fileWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxDescribeResponse
}
type fileWithCtxOnOpenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Info *NodeInfo `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mfileWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(fileWithCtxOnOpenResponse{})
func (msg *fileWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxOnOpenResponse
}
type fileWithCtxSyncResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxSyncResponse = _bindings.CreateLazyMarshaler(fileWithCtxSyncResponse{})
func (msg *fileWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxSyncResponse
}
type fileWithCtxGetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v2:"64" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Attributes NodeAttributes `fidl_offset_v1:"8" 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_v1:"64" fidl_alignment_v1:"8" fidl_size_v2:"64" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Attributes NodeAttributes `fidl_offset_v1:"8" 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_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(fileWithCtxSetAttrResponse{})
func (msg *fileWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxSetAttrResponse
}
type fileWithCtxNodeGetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Flags uint32 `fidl_offset_v1:"4" fidl_offset_v2:"4"`
}
var _mfileWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(fileWithCtxNodeGetFlagsResponse{})
func (msg *fileWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxNodeGetFlagsResponse
}
type fileWithCtxNodeSetFlagsRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(fileWithCtxNodeSetFlagsRequest{})
func (msg *fileWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
return _mfileWithCtxNodeSetFlagsRequest
}
type fileWithCtxNodeSetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(fileWithCtxNodeSetFlagsResponse{})
func (msg *fileWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxNodeSetFlagsResponse
}
type fileWithCtxAdvisoryLockRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Request fuchsiaio2.AdvisoryLockRequest `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxAdvisoryLockRequest = _bindings.CreateLazyMarshaler(fileWithCtxAdvisoryLockRequest{})
func (msg *fileWithCtxAdvisoryLockRequest) Marshaler() _bindings.Marshaler {
return _mfileWithCtxAdvisoryLockRequest
}
type fileWithCtxAdvisoryLockResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Result fuchsiaio2.AdvisoryLockingAdvisoryLockResult `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(fileWithCtxAdvisoryLockResponse{})
func (msg *fileWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxAdvisoryLockResponse
}
type fileWithCtxReadRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Count uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxReadRequest = _bindings.CreateLazyMarshaler(fileWithCtxReadRequest{})
func (msg *fileWithCtxReadRequest) Marshaler() _bindings.Marshaler {
return _mfileWithCtxReadRequest
}
type fileWithCtxReadResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Data []uint8 `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_bounds:"8192"`
}
var _mfileWithCtxReadResponse = _bindings.CreateLazyMarshaler(fileWithCtxReadResponse{})
func (msg *fileWithCtxReadResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxReadResponse
}
type fileWithCtxReadAtRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Count uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Offset uint64 `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mfileWithCtxReadAtRequest = _bindings.CreateLazyMarshaler(fileWithCtxReadAtRequest{})
func (msg *fileWithCtxReadAtRequest) Marshaler() _bindings.Marshaler {
return _mfileWithCtxReadAtRequest
}
type fileWithCtxReadAtResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Data []uint8 `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_bounds:"8192"`
}
var _mfileWithCtxReadAtResponse = _bindings.CreateLazyMarshaler(fileWithCtxReadAtResponse{})
func (msg *fileWithCtxReadAtResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxReadAtResponse
}
type fileWithCtxWriteRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Data []uint8 `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"8192"`
}
var _mfileWithCtxWriteRequest = _bindings.CreateLazyMarshaler(fileWithCtxWriteRequest{})
func (msg *fileWithCtxWriteRequest) Marshaler() _bindings.Marshaler {
return _mfileWithCtxWriteRequest
}
type fileWithCtxWriteResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Actual uint64 `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mfileWithCtxWriteResponse = _bindings.CreateLazyMarshaler(fileWithCtxWriteResponse{})
func (msg *fileWithCtxWriteResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxWriteResponse
}
type fileWithCtxWriteAtRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
Data []uint8 `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"8192"`
Offset uint64 `fidl_offset_v1:"16" fidl_offset_v2:"16"`
}
var _mfileWithCtxWriteAtRequest = _bindings.CreateLazyMarshaler(fileWithCtxWriteAtRequest{})
func (msg *fileWithCtxWriteAtRequest) Marshaler() _bindings.Marshaler {
return _mfileWithCtxWriteAtRequest
}
type fileWithCtxWriteAtResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Actual uint64 `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mfileWithCtxWriteAtResponse = _bindings.CreateLazyMarshaler(fileWithCtxWriteAtResponse{})
func (msg *fileWithCtxWriteAtResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxWriteAtResponse
}
type fileWithCtxSeekRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Offset int64 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Start SeekOrigin `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mfileWithCtxSeekRequest = _bindings.CreateLazyMarshaler(fileWithCtxSeekRequest{})
func (msg *fileWithCtxSeekRequest) Marshaler() _bindings.Marshaler {
return _mfileWithCtxSeekRequest
}
type fileWithCtxSeekResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Offset uint64 `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mfileWithCtxSeekResponse = _bindings.CreateLazyMarshaler(fileWithCtxSeekResponse{})
func (msg *fileWithCtxSeekResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxSeekResponse
}
type fileWithCtxTruncateRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Length uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxTruncateRequest = _bindings.CreateLazyMarshaler(fileWithCtxTruncateRequest{})
func (msg *fileWithCtxTruncateRequest) Marshaler() _bindings.Marshaler {
return _mfileWithCtxTruncateRequest
}
type fileWithCtxTruncateResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxTruncateResponse = _bindings.CreateLazyMarshaler(fileWithCtxTruncateResponse{})
func (msg *fileWithCtxTruncateResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxTruncateResponse
}
type fileWithCtxGetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Flags uint32 `fidl_offset_v1:"4" 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_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" 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_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxSetFlagsResponse = _bindings.CreateLazyMarshaler(fileWithCtxSetFlagsResponse{})
func (msg *fileWithCtxSetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxSetFlagsResponse
}
type fileWithCtxGetBufferRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mfileWithCtxGetBufferRequest = _bindings.CreateLazyMarshaler(fileWithCtxGetBufferRequest{})
func (msg *fileWithCtxGetBufferRequest) Marshaler() _bindings.Marshaler {
return _mfileWithCtxGetBufferRequest
}
type fileWithCtxGetBufferResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Buffer *fuchsiamem.Buffer `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mfileWithCtxGetBufferResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetBufferResponse{})
func (msg *fileWithCtxGetBufferResponse) Marshaler() _bindings.Marshaler {
return _mfileWithCtxGetBufferResponse
}
type directoryWatcherWithCtxOnEventRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Events []uint8 `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"8192"`
}
var _mdirectoryWatcherWithCtxOnEventRequest = _bindings.CreateLazyMarshaler(directoryWatcherWithCtxOnEventRequest{})
func (msg *directoryWatcherWithCtxOnEventRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryWatcherWithCtxOnEventRequest
}
type directoryWithCtxCloneRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" 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 directoryWithCtxCloseResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxCloseResponse = _bindings.CreateLazyMarshaler(directoryWithCtxCloseResponse{})
func (msg *directoryWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxCloseResponse
}
type directoryWithCtxDescribeResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Info NodeInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(directoryWithCtxDescribeResponse{})
func (msg *directoryWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxDescribeResponse
}
type directoryWithCtxOnOpenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Info *NodeInfo `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mdirectoryWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(directoryWithCtxOnOpenResponse{})
func (msg *directoryWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxOnOpenResponse
}
type directoryWithCtxSyncResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxSyncResponse = _bindings.CreateLazyMarshaler(directoryWithCtxSyncResponse{})
func (msg *directoryWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxSyncResponse
}
type directoryWithCtxGetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v2:"64" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Attributes NodeAttributes `fidl_offset_v1:"8" 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_v1:"64" fidl_alignment_v1:"8" fidl_size_v2:"64" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Attributes NodeAttributes `fidl_offset_v1:"8" 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_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(directoryWithCtxSetAttrResponse{})
func (msg *directoryWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxSetAttrResponse
}
type directoryWithCtxNodeGetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Flags uint32 `fidl_offset_v1:"4" fidl_offset_v2:"4"`
}
var _mdirectoryWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(directoryWithCtxNodeGetFlagsResponse{})
func (msg *directoryWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxNodeGetFlagsResponse
}
type directoryWithCtxNodeSetFlagsRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(directoryWithCtxNodeSetFlagsRequest{})
func (msg *directoryWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxNodeSetFlagsRequest
}
type directoryWithCtxNodeSetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(directoryWithCtxNodeSetFlagsResponse{})
func (msg *directoryWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxNodeSetFlagsResponse
}
type directoryWithCtxAdvisoryLockRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Request fuchsiaio2.AdvisoryLockRequest `fidl_offset_v1:"0" 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_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Result fuchsiaio2.AdvisoryLockingAdvisoryLockResult `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(directoryWithCtxAdvisoryLockResponse{})
func (msg *directoryWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxAdvisoryLockResponse
}
type directoryWithCtxOpenRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Mode uint32 `fidl_offset_v1:"4" fidl_offset_v2:"4"`
Path string `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_bounds:"4096"`
Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"24" 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 directoryWithCtxAddInotifyFilterRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"`
Path string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"4095"`
Filter fuchsiaio2.InotifyWatchMask `fidl_offset_v1:"16" fidl_offset_v2:"16"`
WatchDescriptor uint32 `fidl_offset_v1:"20" fidl_offset_v2:"20"`
Socket _zx.Socket `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
}
var _mdirectoryWithCtxAddInotifyFilterRequest = _bindings.CreateLazyMarshaler(directoryWithCtxAddInotifyFilterRequest{})
func (msg *directoryWithCtxAddInotifyFilterRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxAddInotifyFilterRequest
}
type directoryWithCtxUnlinkRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"`
Name string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"255"`
Options fuchsiaio2.UnlinkOptions `fidl_offset_v1:"16" 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_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Result DirectoryUnlinkResult `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxUnlinkResponse = _bindings.CreateLazyMarshaler(directoryWithCtxUnlinkResponse{})
func (msg *directoryWithCtxUnlinkResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxUnlinkResponse
}
type directoryWithCtxReadDirentsRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
MaxBytes uint64 `fidl_offset_v1:"0" 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_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Dirents []uint8 `fidl_offset_v1:"8" 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_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" 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_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Token _zx.Handle `fidl_offset_v1:"4" 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 directoryWithCtxRenameRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v2:"40" fidl_alignment_v2:"8"`
Src string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"4096"`
DstParentToken _zx.Handle `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
Dst string `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_bounds:"4096"`
}
var _mdirectoryWithCtxRenameRequest = _bindings.CreateLazyMarshaler(directoryWithCtxRenameRequest{})
func (msg *directoryWithCtxRenameRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxRenameRequest
}
type directoryWithCtxRenameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxRenameResponse = _bindings.CreateLazyMarshaler(directoryWithCtxRenameResponse{})
func (msg *directoryWithCtxRenameResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxRenameResponse
}
type directoryWithCtxRename2Request struct {
_ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v2:"40" fidl_alignment_v2:"8"`
Src string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"255"`
DstParentToken _zx.Event `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
Dst string `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_bounds:"255"`
}
var _mdirectoryWithCtxRename2Request = _bindings.CreateLazyMarshaler(directoryWithCtxRename2Request{})
func (msg *directoryWithCtxRename2Request) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxRename2Request
}
type directoryWithCtxRename2Response struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Result DirectoryRename2Result `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxRename2Response = _bindings.CreateLazyMarshaler(directoryWithCtxRename2Response{})
func (msg *directoryWithCtxRename2Response) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxRename2Response
}
type directoryWithCtxLinkRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v2:"40" fidl_alignment_v2:"8"`
Src string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"4096"`
DstParentToken _zx.Handle `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
Dst string `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_bounds:"4096"`
}
var _mdirectoryWithCtxLinkRequest = _bindings.CreateLazyMarshaler(directoryWithCtxLinkRequest{})
func (msg *directoryWithCtxLinkRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxLinkRequest
}
type directoryWithCtxLinkResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxLinkResponse = _bindings.CreateLazyMarshaler(directoryWithCtxLinkResponse{})
func (msg *directoryWithCtxLinkResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxLinkResponse
}
type directoryWithCtxWatchRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Mask uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Options uint32 `fidl_offset_v1:"4" fidl_offset_v2:"4"`
Watcher _zx.Channel `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
}
var _mdirectoryWithCtxWatchRequest = _bindings.CreateLazyMarshaler(directoryWithCtxWatchRequest{})
func (msg *directoryWithCtxWatchRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxWatchRequest
}
type directoryWithCtxWatchResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryWithCtxWatchResponse = _bindings.CreateLazyMarshaler(directoryWithCtxWatchResponse{})
func (msg *directoryWithCtxWatchResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryWithCtxWatchResponse
}
type directoryAdminWithCtxCloneRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_offset_v2:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
}
var _mdirectoryAdminWithCtxCloneRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxCloneRequest{})
func (msg *directoryAdminWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxCloneRequest
}
type directoryAdminWithCtxCloseResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxCloseResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxCloseResponse{})
func (msg *directoryAdminWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxCloseResponse
}
type directoryAdminWithCtxDescribeResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Info NodeInfo `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxDescribeResponse{})
func (msg *directoryAdminWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxDescribeResponse
}
type directoryAdminWithCtxOnOpenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Info *NodeInfo `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mdirectoryAdminWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxOnOpenResponse{})
func (msg *directoryAdminWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxOnOpenResponse
}
type directoryAdminWithCtxSyncResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxSyncResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxSyncResponse{})
func (msg *directoryAdminWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxSyncResponse
}
type directoryAdminWithCtxGetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v2:"64" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Attributes NodeAttributes `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mdirectoryAdminWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxGetAttrResponse{})
func (msg *directoryAdminWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxGetAttrResponse
}
type directoryAdminWithCtxSetAttrRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v2:"64" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Attributes NodeAttributes `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mdirectoryAdminWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxSetAttrRequest{})
func (msg *directoryAdminWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxSetAttrRequest
}
type directoryAdminWithCtxSetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxSetAttrResponse{})
func (msg *directoryAdminWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxSetAttrResponse
}
type directoryAdminWithCtxNodeGetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Flags uint32 `fidl_offset_v1:"4" fidl_offset_v2:"4"`
}
var _mdirectoryAdminWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxNodeGetFlagsResponse{})
func (msg *directoryAdminWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxNodeGetFlagsResponse
}
type directoryAdminWithCtxNodeSetFlagsRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxNodeSetFlagsRequest{})
func (msg *directoryAdminWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxNodeSetFlagsRequest
}
type directoryAdminWithCtxNodeSetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxNodeSetFlagsResponse{})
func (msg *directoryAdminWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxNodeSetFlagsResponse
}
type directoryAdminWithCtxAdvisoryLockRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Request fuchsiaio2.AdvisoryLockRequest `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxAdvisoryLockRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxAdvisoryLockRequest{})
func (msg *directoryAdminWithCtxAdvisoryLockRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxAdvisoryLockRequest
}
type directoryAdminWithCtxAdvisoryLockResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Result fuchsiaio2.AdvisoryLockingAdvisoryLockResult `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxAdvisoryLockResponse{})
func (msg *directoryAdminWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxAdvisoryLockResponse
}
type directoryAdminWithCtxOpenRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"`
Flags uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Mode uint32 `fidl_offset_v1:"4" fidl_offset_v2:"4"`
Path string `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_bounds:"4096"`
Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_handle_subtype:"4" fidl_bounds:"0"`
}
var _mdirectoryAdminWithCtxOpenRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxOpenRequest{})
func (msg *directoryAdminWithCtxOpenRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxOpenRequest
}
type directoryAdminWithCtxAddInotifyFilterRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"`
Path string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"4095"`
Filter fuchsiaio2.InotifyWatchMask `fidl_offset_v1:"16" fidl_offset_v2:"16"`
WatchDescriptor uint32 `fidl_offset_v1:"20" fidl_offset_v2:"20"`
Socket _zx.Socket `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
}
var _mdirectoryAdminWithCtxAddInotifyFilterRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxAddInotifyFilterRequest{})
func (msg *directoryAdminWithCtxAddInotifyFilterRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxAddInotifyFilterRequest
}
type directoryAdminWithCtxUnlinkRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"`
Name string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"255"`
Options fuchsiaio2.UnlinkOptions `fidl_offset_v1:"16" fidl_offset_v2:"16"`
}
var _mdirectoryAdminWithCtxUnlinkRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxUnlinkRequest{})
func (msg *directoryAdminWithCtxUnlinkRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxUnlinkRequest
}
type directoryAdminWithCtxUnlinkResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Result DirectoryUnlinkResult `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxUnlinkResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxUnlinkResponse{})
func (msg *directoryAdminWithCtxUnlinkResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxUnlinkResponse
}
type directoryAdminWithCtxReadDirentsRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
MaxBytes uint64 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxReadDirentsRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxReadDirentsRequest{})
func (msg *directoryAdminWithCtxReadDirentsRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxReadDirentsRequest
}
type directoryAdminWithCtxReadDirentsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Dirents []uint8 `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_bounds:"8192"`
}
var _mdirectoryAdminWithCtxReadDirentsResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxReadDirentsResponse{})
func (msg *directoryAdminWithCtxReadDirentsResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxReadDirentsResponse
}
type directoryAdminWithCtxRewindResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxRewindResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxRewindResponse{})
func (msg *directoryAdminWithCtxRewindResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxRewindResponse
}
type directoryAdminWithCtxGetTokenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Token _zx.Handle `fidl_offset_v1:"4" fidl_offset_v2:"4" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
}
var _mdirectoryAdminWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxGetTokenResponse{})
func (msg *directoryAdminWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxGetTokenResponse
}
type directoryAdminWithCtxRenameRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v2:"40" fidl_alignment_v2:"8"`
Src string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"4096"`
DstParentToken _zx.Handle `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
Dst string `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_bounds:"4096"`
}
var _mdirectoryAdminWithCtxRenameRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxRenameRequest{})
func (msg *directoryAdminWithCtxRenameRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxRenameRequest
}
type directoryAdminWithCtxRenameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxRenameResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxRenameResponse{})
func (msg *directoryAdminWithCtxRenameResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxRenameResponse
}
type directoryAdminWithCtxRename2Request struct {
_ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v2:"40" fidl_alignment_v2:"8"`
Src string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"255"`
DstParentToken _zx.Event `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
Dst string `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_bounds:"255"`
}
var _mdirectoryAdminWithCtxRename2Request = _bindings.CreateLazyMarshaler(directoryAdminWithCtxRename2Request{})
func (msg *directoryAdminWithCtxRename2Request) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxRename2Request
}
type directoryAdminWithCtxRename2Response struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Result DirectoryRename2Result `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxRename2Response = _bindings.CreateLazyMarshaler(directoryAdminWithCtxRename2Response{})
func (msg *directoryAdminWithCtxRename2Response) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxRename2Response
}
type directoryAdminWithCtxLinkRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v2:"40" fidl_alignment_v2:"8"`
Src string `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"4096"`
DstParentToken _zx.Handle `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
Dst string `fidl_offset_v1:"24" fidl_offset_v2:"24" fidl_bounds:"4096"`
}
var _mdirectoryAdminWithCtxLinkRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxLinkRequest{})
func (msg *directoryAdminWithCtxLinkRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxLinkRequest
}
type directoryAdminWithCtxLinkResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxLinkResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxLinkResponse{})
func (msg *directoryAdminWithCtxLinkResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxLinkResponse
}
type directoryAdminWithCtxWatchRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
Mask uint32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Options uint32 `fidl_offset_v1:"4" fidl_offset_v2:"4"`
Watcher _zx.Channel `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
}
var _mdirectoryAdminWithCtxWatchRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxWatchRequest{})
func (msg *directoryAdminWithCtxWatchRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxWatchRequest
}
type directoryAdminWithCtxWatchResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxWatchResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxWatchResponse{})
func (msg *directoryAdminWithCtxWatchResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxWatchResponse
}
type directoryAdminWithCtxMountRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
Remote DirectoryWithCtxInterface `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"4"`
}
var _mdirectoryAdminWithCtxMountRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxMountRequest{})
func (msg *directoryAdminWithCtxMountRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxMountRequest
}
type directoryAdminWithCtxMountResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxMountResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxMountResponse{})
func (msg *directoryAdminWithCtxMountResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxMountResponse
}
type directoryAdminWithCtxMountAndCreateRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"`
Remote DirectoryWithCtxInterface `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_handle_subtype:"4"`
Name string `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_bounds:"255"`
Flags uint32 `fidl_offset_v1:"24" fidl_offset_v2:"24"`
}
var _mdirectoryAdminWithCtxMountAndCreateRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxMountAndCreateRequest{})
func (msg *directoryAdminWithCtxMountAndCreateRequest) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxMountAndCreateRequest
}
type directoryAdminWithCtxMountAndCreateResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxMountAndCreateResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxMountAndCreateResponse{})
func (msg *directoryAdminWithCtxMountAndCreateResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxMountAndCreateResponse
}
type directoryAdminWithCtxUnmountResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
}
var _mdirectoryAdminWithCtxUnmountResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxUnmountResponse{})
func (msg *directoryAdminWithCtxUnmountResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxUnmountResponse
}
type directoryAdminWithCtxUnmountNodeResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v2:"8" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Remote DirectoryWithCtxInterface `fidl_offset_v1:"4" fidl_offset_v2:"4" fidl_handle_subtype:"4"`
}
var _mdirectoryAdminWithCtxUnmountNodeResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxUnmountNodeResponse{})
func (msg *directoryAdminWithCtxUnmountNodeResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxUnmountNodeResponse
}
type directoryAdminWithCtxQueryFilesystemResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Info *FilesystemInfo `fidl_offset_v1:"8" fidl_offset_v2:"8"`
}
var _mdirectoryAdminWithCtxQueryFilesystemResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxQueryFilesystemResponse{})
func (msg *directoryAdminWithCtxQueryFilesystemResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxQueryFilesystemResponse
}
type directoryAdminWithCtxGetDevicePathResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"`
S int32 `fidl_offset_v1:"0" fidl_offset_v2:"0"`
Path *string `fidl_offset_v1:"8" fidl_offset_v2:"8" fidl_bounds:"4096"`
}
var _mdirectoryAdminWithCtxGetDevicePathResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxGetDevicePathResponse{})
func (msg *directoryAdminWithCtxGetDevicePathResponse) Marshaler() _bindings.Marshaler {
return _mdirectoryAdminWithCtxGetDevicePathResponse
}
type I_directoryUnlinkResultTag uint64
const (
DirectoryUnlinkResultResponse = 1 // 0x00000001
DirectoryUnlinkResultErr = 2 // 0x00000002
)
type DirectoryUnlinkResult struct {
I_directoryUnlinkResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
Response DirectoryUnlinkResponse `fidl_ordinal:"1"`
Err int32 `fidl_ordinal:"2"`
}
func (_m *DirectoryUnlinkResult) reset() {
switch _m.I_directoryUnlinkResultTag {
case 1:
var _zeroed DirectoryUnlinkResponse
_m.Response = _zeroed
case 2:
var _zeroed int32
_m.Err = _zeroed
}
}
func (_m *DirectoryUnlinkResult) Which() I_directoryUnlinkResultTag {
return _m.I_directoryUnlinkResultTag
}
func (_m *DirectoryUnlinkResult) Ordinal() uint64 {
return uint64(_m.I_directoryUnlinkResultTag)
}
func (_m *DirectoryUnlinkResult) SetResponse(response DirectoryUnlinkResponse) {
_m.reset()
_m.I_directoryUnlinkResultTag = DirectoryUnlinkResultResponse
_m.Response = response
}
func DirectoryUnlinkResultWithResponse(response DirectoryUnlinkResponse) DirectoryUnlinkResult {
var _u DirectoryUnlinkResult
_u.SetResponse(response)
return _u
}
func (_m *DirectoryUnlinkResult) SetErr(err int32) {
_m.reset()
_m.I_directoryUnlinkResultTag = DirectoryUnlinkResultErr
_m.Err = err
}
func DirectoryUnlinkResultWithErr(err int32) DirectoryUnlinkResult {
var _u DirectoryUnlinkResult
_u.SetErr(err)
return _u
}
type I_directoryRename2ResultTag uint64
const (
DirectoryRename2ResultResponse = 1 // 0x00000001
DirectoryRename2ResultErr = 2 // 0x00000002
)
type DirectoryRename2Result struct {
I_directoryRename2ResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"`
Response DirectoryRename2Response `fidl_ordinal:"1"`
Err int32 `fidl_ordinal:"2"`
}
func (_m *DirectoryRename2Result) reset() {
switch _m.I_directoryRename2ResultTag {
case 1:
var _zeroed DirectoryRename2Response
_m.Response = _zeroed
case 2:
var _zeroed int32
_m.Err = _zeroed
}
}
func (_m *DirectoryRename2Result) Which() I_directoryRename2ResultTag {
return _m.I_directoryRename2ResultTag
}
func (_m *DirectoryRename2Result) Ordinal() uint64 {
return uint64(_m.I_directoryRename2ResultTag)
}
func (_m *DirectoryRename2Result) SetResponse(response DirectoryRename2Response) {
_m.reset()
_m.I_directoryRename2ResultTag = DirectoryRename2ResultResponse
_m.Response = response
}
func DirectoryRename2ResultWithResponse(response DirectoryRename2Response) DirectoryRename2Result {
var _u DirectoryRename2Result
_u.SetResponse(response)
return _u
}
func (_m *DirectoryRename2Result) SetErr(err int32) {
_m.reset()
_m.I_directoryRename2ResultTag = DirectoryRename2ResultErr
_m.Err = err
}
func DirectoryRename2ResultWithErr(err int32) DirectoryRename2Result {
var _u DirectoryRename2Result
_u.SetErr(err)
return _u
}
type I_nodeInfoTag uint64
const (
NodeInfoService = 1 // 0x00000001
NodeInfoFile = 2 // 0x00000002
NodeInfoDirectory = 3 // 0x00000003
NodeInfoPipe = 4 // 0x00000004
NodeInfoVmofile = 5 // 0x00000005
NodeInfoDevice = 6 // 0x00000006
NodeInfoTty = 7 // 0x00000007
NodeInfoDatagramSocket = 9 // 0x00000009
NodeInfoStreamSocket = 10 // 0x0000000a
NodeInfoRawSocket = 11 // 0x0000000b
)
// Connection information.
//
// Refer to [`Node.Describe`] and [`Node.OnOpen`] for usage.
type NodeInfo struct {
I_nodeInfoTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" 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"`
Pipe Pipe `fidl_ordinal:"4"`
// The connection composes [`File`]. Its implementation is backed by a VMO.
Vmofile Vmofile `fidl_ordinal:"5"`
Device Device `fidl_ordinal:"6"`
Tty Tty `fidl_ordinal:"7"`
// The connection composes [`fuchsia.posix.socket/DatagramSocket`].
DatagramSocket DatagramSocket `fidl_ordinal:"9"`
// The connection composes [`fuchsia.posix.socket/StreamSocket`].
StreamSocket StreamSocket `fidl_ordinal:"10"`
// The connection composes [`fuchsia.posix.socket.raw/Socket`].
RawSocket RawSocket `fidl_ordinal:"11"`
}
func (_m *NodeInfo) reset() {
switch _m.I_nodeInfoTag {
case 1:
var _zeroed Service
_m.Service = _zeroed
case 2:
var _zeroed FileObject
_m.File = _zeroed
case 3:
var _zeroed DirectoryObject
_m.Directory = _zeroed
case 4:
var _zeroed Pipe
_m.Pipe = _zeroed
case 5:
var _zeroed Vmofile
_m.Vmofile = _zeroed
case 6:
var _zeroed Device
_m.Device = _zeroed
case 7:
var _zeroed Tty
_m.Tty = _zeroed
case 9:
var _zeroed DatagramSocket
_m.DatagramSocket = _zeroed
case 10:
var _zeroed StreamSocket
_m.StreamSocket = _zeroed
case 11:
var _zeroed RawSocket
_m.RawSocket = _zeroed
}
}
func (_m *NodeInfo) Which() I_nodeInfoTag {
return _m.I_nodeInfoTag
}
func (_m *NodeInfo) Ordinal() uint64 {
return uint64(_m.I_nodeInfoTag)
}
func (_m *NodeInfo) SetService(service Service) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoService
_m.Service = service
}
func NodeInfoWithService(service Service) NodeInfo {
var _u NodeInfo
_u.SetService(service)
return _u
}
func (_m *NodeInfo) SetFile(file FileObject) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoFile
_m.File = file
}
func NodeInfoWithFile(file FileObject) NodeInfo {
var _u NodeInfo
_u.SetFile(file)
return _u
}
func (_m *NodeInfo) SetDirectory(directory DirectoryObject) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoDirectory
_m.Directory = directory
}
func NodeInfoWithDirectory(directory DirectoryObject) NodeInfo {
var _u NodeInfo
_u.SetDirectory(directory)
return _u
}
func (_m *NodeInfo) SetPipe(pipe Pipe) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoPipe
_m.Pipe = pipe
}
func NodeInfoWithPipe(pipe Pipe) NodeInfo {
var _u NodeInfo
_u.SetPipe(pipe)
return _u
}
func (_m *NodeInfo) SetVmofile(vmofile Vmofile) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoVmofile
_m.Vmofile = vmofile
}
func NodeInfoWithVmofile(vmofile Vmofile) NodeInfo {
var _u NodeInfo
_u.SetVmofile(vmofile)
return _u
}
func (_m *NodeInfo) SetDevice(device Device) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoDevice
_m.Device = device
}
func NodeInfoWithDevice(device Device) NodeInfo {
var _u NodeInfo
_u.SetDevice(device)
return _u
}
func (_m *NodeInfo) SetTty(tty Tty) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoTty
_m.Tty = tty
}
func NodeInfoWithTty(tty Tty) NodeInfo {
var _u NodeInfo
_u.SetTty(tty)
return _u
}
func (_m *NodeInfo) SetDatagramSocket(datagramSocket DatagramSocket) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoDatagramSocket
_m.DatagramSocket = datagramSocket
}
func NodeInfoWithDatagramSocket(datagramSocket DatagramSocket) NodeInfo {
var _u NodeInfo
_u.SetDatagramSocket(datagramSocket)
return _u
}
func (_m *NodeInfo) SetStreamSocket(streamSocket StreamSocket) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoStreamSocket
_m.StreamSocket = streamSocket
}
func NodeInfoWithStreamSocket(streamSocket StreamSocket) NodeInfo {
var _u NodeInfo
_u.SetStreamSocket(streamSocket)
return _u
}
func (_m *NodeInfo) SetRawSocket(rawSocket RawSocket) {
_m.reset()
_m.I_nodeInfoTag = NodeInfoRawSocket
_m.RawSocket = rawSocket
}
func NodeInfoWithRawSocket(rawSocket RawSocket) NodeInfo {
var _u NodeInfo
_u.SetRawSocket(rawSocket)
return _u
}
const (
NodeCloneOrdinal uint64 = 0x5a61678f293ce16f
NodeCloseOrdinal uint64 = 0x5309c5bd1c33dc44
NodeDescribeOrdinal uint64 = 0xffcec215078dea0
NodeOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
NodeSyncOrdinal uint64 = 0x189d88326c18b519
NodeGetAttrOrdinal uint64 = 0x78985e216314dafd
NodeSetAttrOrdinal uint64 = 0x4186c0f40d938f46
NodeNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
NodeNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
)
type NodeWithCtxInterface _bindings.ChannelProxy
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_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 `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
func (p *NodeWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error {
req_ := &nodeWithCtxCloneRequest{
Flags: flags,
Object: object,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(NodeCloneOrdinal, req_)
return err_
}
// Terminates connection with object.
//
// This method does not require any rights.
func (p *NodeWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &nodeWithCtxCloseResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeCloseOrdinal, req_, resp_)
return resp_.S, err_
}
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
func (p *NodeWithCtxInterface) Describe(ctx_ _bindings.Context) (NodeInfo, error) {
var req_ _bindings.Message
resp_ := &nodeWithCtxDescribeResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeDescribeOrdinal, req_, resp_)
return resp_.Info, err_
}
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_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, *NodeInfo, error) {
resp_ := &nodeWithCtxOnOpenResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Recv(NodeOnOpenOrdinal, resp_)
return resp_.S, resp_.Info, err_
}
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
func (p *NodeWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &nodeWithCtxSyncResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeSyncOrdinal, req_, resp_)
return resp_.S, 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.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *NodeWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, 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.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
func (p *NodeWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
var req_ _bindings.Message
resp_ := &nodeWithCtxNodeGetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeNodeGetFlagsOrdinal, 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:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
func (p *NodeWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
req_ := &nodeWithCtxNodeSetFlagsRequest{
Flags: flags,
}
resp_ := &nodeWithCtxNodeSetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeNodeSetFlagsOrdinal, req_, resp_)
return resp_.S, err_
}
// Node defines the minimal interface for entities which can be accessed in a filesystem.
type NodeWithCtx interface {
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_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 `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error
// Terminates connection with object.
//
// This method does not require any rights.
Close(ctx_ _bindings.Context) (int32, error)
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
Describe(ctx_ _bindings.Context) (NodeInfo, error)
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_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`).
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
Sync(ctx_ _bindings.Context) (int32, error)
// Acquires information about the node.
//
// This method does not require any rights.
GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error)
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error)
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
}
type NodeWithCtxTransitionalBase struct{}
func (_ *NodeWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
panic("Not Implemented")
}
func (_ *NodeWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
panic("Not Implemented")
}
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.UnmarshalWithContext(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 NodeCloseOrdinal:
s, err_ := s_.Impl.Close(args_.Ctx)
out_ := nodeWithCtxCloseResponse{}
out_.S = s
return &out_, true, err_
case NodeDescribeOrdinal:
info, err_ := s_.Impl.Describe(args_.Ctx)
out_ := nodeWithCtxDescribeResponse{}
out_.Info = info
return &out_, true, err_
case NodeSyncOrdinal:
s, err_ := s_.Impl.Sync(args_.Ctx)
out_ := nodeWithCtxSyncResponse{}
out_.S = s
return &out_, true, err_
case NodeGetAttrOrdinal:
s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
out_ := nodeWithCtxGetAttrResponse{}
out_.S = s
out_.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.UnmarshalWithContext(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{}
out_.S = s
return &out_, true, err_
case NodeNodeGetFlagsOrdinal:
s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
out_ := nodeWithCtxNodeGetFlagsResponse{}
out_.S = s
out_.Flags = flags
return &out_, true, err_
case NodeNodeSetFlagsOrdinal:
in_ := nodeWithCtxNodeSetFlagsRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
out_ := nodeWithCtxNodeSetFlagsResponse{}
out_.S = s
return &out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type NodeEventProxy _bindings.ChannelProxy
func (p *NodeEventProxy) OnOpen(s int32, info *NodeInfo) error {
event_ := &nodeWithCtxOnOpenResponse{
S: s,
Info: info,
}
return ((*_bindings.ChannelProxy)(p)).Send(NodeOnOpenOrdinal, event_)
}
const (
FileCloneOrdinal uint64 = 0x5a61678f293ce16f
FileCloseOrdinal uint64 = 0x5309c5bd1c33dc44
FileDescribeOrdinal uint64 = 0xffcec215078dea0
FileOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
FileSyncOrdinal uint64 = 0x189d88326c18b519
FileGetAttrOrdinal uint64 = 0x78985e216314dafd
FileSetAttrOrdinal uint64 = 0x4186c0f40d938f46
FileNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
FileNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
FileAdvisoryLockOrdinal uint64 = 0x6358e94c468026fa
FileReadOrdinal uint64 = 0x29b2b7074c95208c
FileReadAtOrdinal uint64 = 0x6527ee3fbc9c5749
FileWriteOrdinal uint64 = 0x3b6432f57914225b
FileWriteAtOrdinal uint64 = 0x4b29e1582ab379e4
FileSeekOrdinal uint64 = 0x324968e9b8a0e394
FileTruncateOrdinal uint64 = 0x5ec8f337359a2ddb
FileGetFlagsOrdinal uint64 = 0x200be82ca523ab96
FileSetFlagsOrdinal uint64 = 0x713f375258671141
FileGetBufferOrdinal uint64 = 0x4b93b8486666d951
)
type FileWithCtxInterface _bindings.ChannelProxy
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_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 `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
func (p *FileWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error {
req_ := &fileWithCtxCloneRequest{
Flags: flags,
Object: object,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(FileCloneOrdinal, req_)
return err_
}
// Terminates connection with object.
//
// This method does not require any rights.
func (p *FileWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &fileWithCtxCloseResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileCloseOrdinal, req_, resp_)
return resp_.S, err_
}
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
func (p *FileWithCtxInterface) Describe(ctx_ _bindings.Context) (NodeInfo, error) {
var req_ _bindings.Message
resp_ := &fileWithCtxDescribeResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileDescribeOrdinal, req_, resp_)
return resp_.Info, err_
}
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_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, *NodeInfo, error) {
resp_ := &fileWithCtxOnOpenResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Recv(FileOnOpenOrdinal, resp_)
return resp_.S, resp_.Info, err_
}
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
func (p *FileWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &fileWithCtxSyncResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSyncOrdinal, req_, resp_)
return resp_.S, 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.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *FileWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, 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.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
func (p *FileWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
var req_ _bindings.Message
resp_ := &fileWithCtxNodeGetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileNodeGetFlagsOrdinal, 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:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
func (p *FileWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
req_ := &fileWithCtxNodeSetFlagsRequest{
Flags: flags,
}
resp_ := &fileWithCtxNodeSetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileNodeSetFlagsOrdinal, req_, resp_)
return resp_.S, err_
}
// Acquires an advisory lock on the underlying file.
//
// The lock lasts until either this connection is closed or
// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
// explicitly.
//
// Advisory locks are purely advisory. They do not prevent actual read or
// write operations from occurring on the file, either through this
// connection or through other connections.
//
// This method requires the following rights:
//
// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
// * [`Rights.WRITE_BYTES`] if `request.type` is
// [`AdvisoryLockType.WRITE`].
//
// # Errors
//
// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
// example, another connection might hold a conflicting lock type.
// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
// to acquire the given type of lock.
func (p *FileWithCtxInterface) AdvisoryLock(ctx_ _bindings.Context, request fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error) {
req_ := &fileWithCtxAdvisoryLockRequest{
Request: request,
}
resp_ := &fileWithCtxAdvisoryLockResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileAdvisoryLockOrdinal, 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.
//
// This method requires the following rights: `OPEN_RIGHT_READABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
//
// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_BUF`.
func (p *FileWithCtxInterface) Read(ctx_ _bindings.Context, count uint64) (int32, []uint8, error) {
req_ := &fileWithCtxReadRequest{
Count: count,
}
resp_ := &fileWithCtxReadResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileReadOrdinal, req_, resp_)
return resp_.S, resp_.Data, err_
}
// Reads up to `count` bytes at the provided offset.
// Does not affect the seek offset.
//
// This method requires the following rights: `OPEN_RIGHT_READABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
//
// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_BUF`.
func (p *FileWithCtxInterface) ReadAt(ctx_ _bindings.Context, count uint64, offset uint64) (int32, []uint8, error) {
req_ := &fileWithCtxReadAtRequest{
Count: count,
Offset: offset,
}
resp_ := &fileWithCtxReadAtResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileReadAtOrdinal, req_, resp_)
return resp_.S, resp_.Data, err_
}
// Writes data at the seek offset.
// The seek offset is moved forward by the number of bytes written.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *FileWithCtxInterface) Write(ctx_ _bindings.Context, data []uint8) (int32, uint64, error) {
req_ := &fileWithCtxWriteRequest{
Data: data,
}
resp_ := &fileWithCtxWriteResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileWriteOrdinal, req_, resp_)
return resp_.S, resp_.Actual, err_
}
// Writes data to the provided offset.
// Does not affect the seek offset.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *FileWithCtxInterface) WriteAt(ctx_ _bindings.Context, data []uint8, offset uint64) (int32, uint64, error) {
req_ := &fileWithCtxWriteAtRequest{
Data: data,
Offset: offset,
}
resp_ := &fileWithCtxWriteAtResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileWriteAtOrdinal, req_, resp_)
return resp_.S, resp_.Actual, err_
}
// Moves the offset at which the next invocation of `Read()` or `Write()` will
// occur.
//
// This method does not require any rights.
func (p *FileWithCtxInterface) Seek(ctx_ _bindings.Context, offset int64, start SeekOrigin) (int32, uint64, error) {
req_ := &fileWithCtxSeekRequest{
Offset: offset,
Start: start,
}
resp_ := &fileWithCtxSeekResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSeekOrdinal, req_, resp_)
return resp_.S, resp_.Offset, err_
}
// Shrinks the file size to 'length' bytes.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *FileWithCtxInterface) Truncate(ctx_ _bindings.Context, length uint64) (int32, error) {
req_ := &fileWithCtxTruncateRequest{
Length: length,
}
resp_ := &fileWithCtxTruncateResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileTruncateOrdinal, 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, uint32, 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:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
func (p *FileWithCtxInterface) SetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
req_ := &fileWithCtxSetFlagsRequest{
Flags: flags,
}
resp_ := &fileWithCtxSetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSetFlagsOrdinal, req_, resp_)
return resp_.S, err_
}
// Acquires a buffer representing this file, if there is one, with the
// requested access rights.
//
// `flags` may be any of `VMO_FLAG_*`.
//
// This method requires following rights:
//
// - `OPEN_RIGHT_WRITABLE` if `flags` includes `VMO_FLAG_WRITE`.
// - `OPEN_RIGHT_READABLE` if `flags` includes `VMO_FLAG_READ` or `VMO_FLAG_EXEC`.
// - `OPEN_RIGHT_EXECUTABLE` if `flags` includes `VMO_FLAG_EXEC`.
func (p *FileWithCtxInterface) GetBuffer(ctx_ _bindings.Context, flags uint32) (int32, *fuchsiamem.Buffer, error) {
req_ := &fileWithCtxGetBufferRequest{
Flags: flags,
}
resp_ := &fileWithCtxGetBufferResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetBufferOrdinal, req_, resp_)
return resp_.S, resp_.Buffer, err_
}
// File defines the interface of a node which contains a flat layout of data.
type FileWithCtx interface {
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_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 `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error
// Terminates connection with object.
//
// This method does not require any rights.
Close(ctx_ _bindings.Context) (int32, error)
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
Describe(ctx_ _bindings.Context) (NodeInfo, error)
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_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`).
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
Sync(ctx_ _bindings.Context) (int32, error)
// Acquires information about the node.
//
// This method does not require any rights.
GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error)
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error)
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, 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 fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error)
// Reads up to `count` bytes at the seek offset.
// The seek offset is moved forward by the number of bytes read.
//
// This method requires the following rights: `OPEN_RIGHT_READABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
//
// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_BUF`.
Read(ctx_ _bindings.Context, count uint64) (int32, []uint8, error)
// Reads up to `count` bytes at the provided offset.
// Does not affect the seek offset.
//
// This method requires the following rights: `OPEN_RIGHT_READABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
//
// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_BUF`.
ReadAt(ctx_ _bindings.Context, count uint64, offset uint64) (int32, []uint8, error)
// Writes data at the seek offset.
// The seek offset is moved forward by the number of bytes written.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
Write(ctx_ _bindings.Context, data []uint8) (int32, uint64, error)
// Writes data to the provided offset.
// Does not affect the seek offset.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
WriteAt(ctx_ _bindings.Context, data []uint8, offset uint64) (int32, uint64, error)
// Moves the offset at which the next invocation of `Read()` or `Write()` will
// occur.
//
// This method does not require any rights.
Seek(ctx_ _bindings.Context, offset int64, start SeekOrigin) (int32, uint64, error)
// Shrinks the file size to 'length' bytes.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
Truncate(ctx_ _bindings.Context, length uint64) (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, uint32, error)
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
SetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
// Acquires a buffer representing this file, if there is one, with the
// requested access rights.
//
// `flags` may be any of `VMO_FLAG_*`.
//
// This method requires following rights:
//
// - `OPEN_RIGHT_WRITABLE` if `flags` includes `VMO_FLAG_WRITE`.
// - `OPEN_RIGHT_READABLE` if `flags` includes `VMO_FLAG_READ` or `VMO_FLAG_EXEC`.
// - `OPEN_RIGHT_EXECUTABLE` if `flags` includes `VMO_FLAG_EXEC`.
GetBuffer(ctx_ _bindings.Context, flags uint32) (int32, *fuchsiamem.Buffer, error)
}
type FileWithCtxTransitionalBase struct{}
func (_ *FileWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
panic("Not Implemented")
}
func (_ *FileWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
panic("Not Implemented")
}
func (_ *FileWithCtxTransitionalBase) AdvisoryLock(ctx_ _bindings.Context, request fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error) {
panic("Not Implemented")
}
type FileWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewFileWithCtxInterfaceRequest() (FileWithCtxInterfaceRequest, *FileWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return FileWithCtxInterfaceRequest(req), (*FileWithCtxInterface)(cli), err
}
type FileWithCtxStub struct {
Impl FileWithCtx
}
func (s_ *FileWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case FileCloneOrdinal:
in_ := fileWithCtxCloneRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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 FileCloseOrdinal:
s, err_ := s_.Impl.Close(args_.Ctx)
out_ := fileWithCtxCloseResponse{}
out_.S = s
return &out_, true, err_
case FileDescribeOrdinal:
info, err_ := s_.Impl.Describe(args_.Ctx)
out_ := fileWithCtxDescribeResponse{}
out_.Info = info
return &out_, true, err_
case FileSyncOrdinal:
s, err_ := s_.Impl.Sync(args_.Ctx)
out_ := fileWithCtxSyncResponse{}
out_.S = s
return &out_, true, err_
case FileGetAttrOrdinal:
s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
out_ := fileWithCtxGetAttrResponse{}
out_.S = s
out_.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.UnmarshalWithContext(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{}
out_.S = s
return &out_, true, err_
case FileNodeGetFlagsOrdinal:
s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
out_ := fileWithCtxNodeGetFlagsResponse{}
out_.S = s
out_.Flags = flags
return &out_, true, err_
case FileNodeSetFlagsOrdinal:
in_ := fileWithCtxNodeSetFlagsRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
out_ := fileWithCtxNodeSetFlagsResponse{}
out_.S = s
return &out_, true, err_
case FileAdvisoryLockOrdinal:
in_ := fileWithCtxAdvisoryLockRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, in_.Request)
out_ := fileWithCtxAdvisoryLockResponse{}
out_.Result = result
return &out_, true, err_
case FileReadOrdinal:
in_ := fileWithCtxReadRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, data, err_ := s_.Impl.Read(args_.Ctx, in_.Count)
out_ := fileWithCtxReadResponse{}
out_.S = s
out_.Data = data
return &out_, true, err_
case FileReadAtOrdinal:
in_ := fileWithCtxReadAtRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, data, err_ := s_.Impl.ReadAt(args_.Ctx, in_.Count, in_.Offset)
out_ := fileWithCtxReadAtResponse{}
out_.S = s
out_.Data = data
return &out_, true, err_
case FileWriteOrdinal:
in_ := fileWithCtxWriteRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, actual, err_ := s_.Impl.Write(args_.Ctx, in_.Data)
out_ := fileWithCtxWriteResponse{}
out_.S = s
out_.Actual = actual
return &out_, true, err_
case FileWriteAtOrdinal:
in_ := fileWithCtxWriteAtRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, actual, err_ := s_.Impl.WriteAt(args_.Ctx, in_.Data, in_.Offset)
out_ := fileWithCtxWriteAtResponse{}
out_.S = s
out_.Actual = actual
return &out_, true, err_
case FileSeekOrdinal:
in_ := fileWithCtxSeekRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, offset, err_ := s_.Impl.Seek(args_.Ctx, in_.Offset, in_.Start)
out_ := fileWithCtxSeekResponse{}
out_.S = s
out_.Offset = offset
return &out_, true, err_
case FileTruncateOrdinal:
in_ := fileWithCtxTruncateRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Truncate(args_.Ctx, in_.Length)
out_ := fileWithCtxTruncateResponse{}
out_.S = s
return &out_, true, err_
case FileGetFlagsOrdinal:
s, flags, err_ := s_.Impl.GetFlags(args_.Ctx)
out_ := fileWithCtxGetFlagsResponse{}
out_.S = s
out_.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.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetFlags(args_.Ctx, in_.Flags)
out_ := fileWithCtxSetFlagsResponse{}
out_.S = s
return &out_, true, err_
case FileGetBufferOrdinal:
in_ := fileWithCtxGetBufferRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, buffer, err_ := s_.Impl.GetBuffer(args_.Ctx, in_.Flags)
out_ := fileWithCtxGetBufferResponse{}
out_.S = s
out_.Buffer = buffer
return &out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type FileEventProxy _bindings.ChannelProxy
func (p *FileEventProxy) OnOpen(s int32, info *NodeInfo) error {
event_ := &fileWithCtxOnOpenResponse{
S: s,
Info: info,
}
return ((*_bindings.ChannelProxy)(p)).Send(FileOnOpenOrdinal, event_)
}
const (
DirectoryWatcherOnEventOrdinal uint64 = 0x3937a088fe53412a
)
type DirectoryWatcherWithCtxInterface _bindings.ChannelProxy
func (p *DirectoryWatcherWithCtxInterface) OnEvent(ctx_ _bindings.Context, events []uint8) error {
req_ := &directoryWatcherWithCtxOnEventRequest{
Events: events,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryWatcherOnEventOrdinal, req_)
return err_
}
// 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.
type DirectoryWatcherWithCtx interface {
OnEvent(ctx_ _bindings.Context, events []uint8) error
}
type DirectoryWatcherWithCtxTransitionalBase struct{}
type DirectoryWatcherWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewDirectoryWatcherWithCtxInterfaceRequest() (DirectoryWatcherWithCtxInterfaceRequest, *DirectoryWatcherWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return DirectoryWatcherWithCtxInterfaceRequest(req), (*DirectoryWatcherWithCtxInterface)(cli), err
}
type DirectoryWatcherWithCtxStub struct {
Impl DirectoryWatcherWithCtx
}
func (s_ *DirectoryWatcherWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case DirectoryWatcherOnEventOrdinal:
in_ := directoryWatcherWithCtxOnEventRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.OnEvent(args_.Ctx, in_.Events)
return nil, false, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type DirectoryWatcherEventProxy _bindings.ChannelProxy
const (
DirectoryCloneOrdinal uint64 = 0x5a61678f293ce16f
DirectoryCloseOrdinal uint64 = 0x5309c5bd1c33dc44
DirectoryDescribeOrdinal uint64 = 0xffcec215078dea0
DirectoryOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
DirectorySyncOrdinal uint64 = 0x189d88326c18b519
DirectoryGetAttrOrdinal uint64 = 0x78985e216314dafd
DirectorySetAttrOrdinal uint64 = 0x4186c0f40d938f46
DirectoryNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
DirectoryNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
DirectoryAdvisoryLockOrdinal uint64 = 0x6358e94c468026fa
DirectoryOpenOrdinal uint64 = 0x2c5044561d685ec0
DirectoryAddInotifyFilterOrdinal uint64 = 0x5bf289cc866b68cb
DirectoryUnlinkOrdinal uint64 = 0x750a0326a78d7bed
DirectoryReadDirentsOrdinal uint64 = 0x3582806bf27faa0a
DirectoryRewindOrdinal uint64 = 0x16b1202af0f34c71
DirectoryGetTokenOrdinal uint64 = 0x26ae9d18763c8655
DirectoryRenameOrdinal uint64 = 0xa8e00a247f3c905
DirectoryRename2Ordinal uint64 = 0x7060e7723b9928de
DirectoryLinkOrdinal uint64 = 0x740604c0c7c930e7
DirectoryWatchOrdinal uint64 = 0x5717193a59d66d91
)
type DirectoryWithCtxInterface _bindings.ChannelProxy
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_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 `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
func (p *DirectoryWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error {
req_ := &directoryWithCtxCloneRequest{
Flags: flags,
Object: object,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryCloneOrdinal, req_)
return err_
}
// Terminates connection with object.
//
// This method does not require any rights.
func (p *DirectoryWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &directoryWithCtxCloseResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryCloseOrdinal, req_, resp_)
return resp_.S, err_
}
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
func (p *DirectoryWithCtxInterface) Describe(ctx_ _bindings.Context) (NodeInfo, error) {
var req_ _bindings.Message
resp_ := &directoryWithCtxDescribeResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryDescribeOrdinal, req_, resp_)
return resp_.Info, err_
}
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_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, *NodeInfo, error) {
resp_ := &directoryWithCtxOnOpenResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Recv(DirectoryOnOpenOrdinal, resp_)
return resp_.S, resp_.Info, err_
}
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
func (p *DirectoryWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &directoryWithCtxSyncResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectorySyncOrdinal, req_, resp_)
return resp_.S, 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.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *DirectoryWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, 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.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
func (p *DirectoryWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
var req_ _bindings.Message
resp_ := &directoryWithCtxNodeGetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryNodeGetFlagsOrdinal, 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:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
func (p *DirectoryWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
req_ := &directoryWithCtxNodeSetFlagsRequest{
Flags: flags,
}
resp_ := &directoryWithCtxNodeSetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryNodeSetFlagsOrdinal, req_, resp_)
return resp_.S, 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 fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error) {
req_ := &directoryWithCtxAdvisoryLockRequest{
Request: request,
}
resp_ := &directoryWithCtxAdvisoryLockResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdvisoryLockOrdinal, req_, resp_)
return resp_.Result, 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 OPEN_FLAG_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).
//
// `flags` may be any of the `OPEN_FLAG_*` and `OPEN_RIGHT_*` values, bitwise ORed together.
// The `OPEN_FLAG_DESCRIBE` flag may cause an `OnOpen` event to be transmitted
// on the `object` handle, indicating the type of object opened.
//
// If an unknown value is sent for flags the connection should be closed.
//
// `OPEN_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.
//
// The caller must specify either one or more of the `OPEN_RIGHT_*` flags, or
// the `OPEN_FLAG_NODE_REFERENCE` flag.
//
// `mode` is only used if an object is created and indicates the type of object to be
// created. An unsupported mode will cause the connection to be closed.
// The mode type, if set, must always be consistent with the OPEN_FLAG_DIRECTORY and
// OPEN_FLAG_NOT_DIRECTORY flags, even if an object is not being created. If an object is not
// being created, `mode` is otherwise ignored. If an object is being created and the mode
// type is not set, a directory will be created if OPEN_FLAG_DIRECTORY is set (explicitly or
// implicitly), or otherwise a server chosen object type.
func (p *DirectoryWithCtxInterface) Open(ctx_ _bindings.Context, flags uint32, mode uint32, path string, object NodeWithCtxInterfaceRequest) error {
req_ := &directoryWithCtxOpenRequest{
Flags: flags,
Mode: mode,
Path: path,
Object: object,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryOpenOrdinal, req_)
return err_
}
// Adds a new inotify filter for an object relative to this directory object.
//
// + 'filter` is a mask of different inotify events that need to be watched by the server
// for a specific file/directory.
//
// + `path` may contain multiple segments, separated by "/" characters,
// and should never be empty; i.e., "" is an invalid path. Paths should not contain
// a leading "/".
//
// +`watch_descriptor` is client assigned value to identify a filter.
// Server shouldn't trust the client-assigned watch_descriptor. They should just send it
// back to the client in the socket.
// This value is not used by server, but it is returned back as part of InotifyEvent,
// to help the client correlate filter with events on this filter.
//
// + `socket` is shared between different filter objects i.e every new filter will
// have a different server end of the socket and there will be a single client end per
// inotify instance on inotify init.
func (p *DirectoryWithCtxInterface) AddInotifyFilter(ctx_ _bindings.Context, path string, filter fuchsiaio2.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 fuchsiaio2.UnlinkOptions) (DirectoryUnlinkResult, error) {
req_ := &directoryWithCtxUnlinkRequest{
Name: name,
Options: options,
}
resp_ := &directoryWithCtxUnlinkResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryUnlinkOrdinal, req_, resp_)
return resp_.Result, 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.
//
// 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 `DIRENT_TYPE_*` 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.
//
// This method requires following rights: `OPEN_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_
}
// Renames an object named src to the name dst, in a directory represented by token.
//
// `src/dst` must be resolved object names. Including "/" in any position
// other than the end of the string will return `ZX_ERR_INVALID_ARGS`.
// Returning "/" at the end of either string implies that it must be a
// directory, or else `ZX_ERR_NOT_DIR` should be returned.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *DirectoryWithCtxInterface) Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) {
req_ := &directoryWithCtxRenameRequest{
Src: src,
DstParentToken: dstParentToken,
Dst: dst,
}
resp_ := &directoryWithCtxRenameResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryRenameOrdinal, req_, resp_)
return resp_.S, err_
}
// Renames a node named `src` to the name `dst`, in a directory represented
// by `dst_parent_token`.
//
// `src` and `dst` must be valid node names.
// See [`fuchsia.io2/Name`] for what constitutes a valid name.
//
// This method requires the following rights on both the current
// connection, and the connection identified by `dst_parent_token`:
//
// * [`Rights.ENUMERATE`]
// * [`Rights.MODIFY_DIRECTORY`]
//
// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
func (p *DirectoryWithCtxInterface) Rename2(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryRename2Result, error) {
req_ := &directoryWithCtxRename2Request{
Src: src,
DstParentToken: dstParentToken,
Dst: dst,
}
resp_ := &directoryWithCtxRename2Response{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryRename2Ordinal, req_, resp_)
return resp_.Result, 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: `OPEN_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.
//
// The `watcher` handle will send messages of the form:
// ```
// struct {
// uint8 event;
// uint8 len;
// char name[];
// };
// ```
// Where names are NOT null-terminated.
//
// This API is unstable; in the future, watcher will be a `DirectoryWatcher` client.
//
// Mask specifies a bitmask of events to observe.
// 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 uint32, options uint32, watcher _zx.Channel) (int32, error) {
req_ := &directoryWithCtxWatchRequest{
Mask: mask,
Options: options,
Watcher: watcher,
}
resp_ := &directoryWithCtxWatchResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryWatchOrdinal, req_, resp_)
return resp_.S, err_
}
// Directory defines a node which is capable of containing other Objects.
type DirectoryWithCtx interface {
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_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 `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error
// Terminates connection with object.
//
// This method does not require any rights.
Close(ctx_ _bindings.Context) (int32, error)
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
Describe(ctx_ _bindings.Context) (NodeInfo, error)
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_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`).
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
Sync(ctx_ _bindings.Context) (int32, error)
// Acquires information about the node.
//
// This method does not require any rights.
GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error)
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error)
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, 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 fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, 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 OPEN_FLAG_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).
//
// `flags` may be any of the `OPEN_FLAG_*` and `OPEN_RIGHT_*` values, bitwise ORed together.
// The `OPEN_FLAG_DESCRIBE` flag may cause an `OnOpen` event to be transmitted
// on the `object` handle, indicating the type of object opened.
//
// If an unknown value is sent for flags the connection should be closed.
//
// `OPEN_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.
//
// The caller must specify either one or more of the `OPEN_RIGHT_*` flags, or
// the `OPEN_FLAG_NODE_REFERENCE` flag.
//
// `mode` is only used if an object is created and indicates the type of object to be
// created. An unsupported mode will cause the connection to be closed.
// The mode type, if set, must always be consistent with the OPEN_FLAG_DIRECTORY and
// OPEN_FLAG_NOT_DIRECTORY flags, even if an object is not being created. If an object is not
// being created, `mode` is otherwise ignored. If an object is being created and the mode
// type is not set, a directory will be created if OPEN_FLAG_DIRECTORY is set (explicitly or
// implicitly), or otherwise a server chosen object type.
Open(ctx_ _bindings.Context, flags uint32, mode uint32, path string, object NodeWithCtxInterfaceRequest) 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 fuchsiaio2.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 fuchsiaio2.UnlinkOptions) (DirectoryUnlinkResult, 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.
//
// 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 `DIRENT_TYPE_*` 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.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error)
// Renames an object named src to the name dst, in a directory represented by token.
//
// `src/dst` must be resolved object names. Including "/" in any position
// other than the end of the string will return `ZX_ERR_INVALID_ARGS`.
// Returning "/" at the end of either string implies that it must be a
// directory, or else `ZX_ERR_NOT_DIR` should be returned.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error)
// Renames a node named `src` to the name `dst`, in a directory represented
// by `dst_parent_token`.
//
// `src` and `dst` must be valid node names.
// See [`fuchsia.io2/Name`] for what constitutes a valid name.
//
// This method requires the following rights on both the current
// connection, and the connection identified by `dst_parent_token`:
//
// * [`Rights.ENUMERATE`]
// * [`Rights.MODIFY_DIRECTORY`]
//
// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
Rename2(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryRename2Result, 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: `OPEN_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.
//
// The `watcher` handle will send messages of the form:
// ```
// struct {
// uint8 event;
// uint8 len;
// char name[];
// };
// ```
// Where names are NOT null-terminated.
//
// This API is unstable; in the future, watcher will be a `DirectoryWatcher` client.
//
// Mask specifies a bitmask of events to observe.
// Options must be zero; it is reserved.
//
// This method does not require any rights, similar to ReadDirents.
Watch(ctx_ _bindings.Context, mask uint32, options uint32, watcher _zx.Channel) (int32, error)
}
type DirectoryWithCtxTransitionalBase struct{}
func (_ *DirectoryWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
panic("Not Implemented")
}
func (_ *DirectoryWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
panic("Not Implemented")
}
func (_ *DirectoryWithCtxTransitionalBase) AdvisoryLock(ctx_ _bindings.Context, request fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error) {
panic("Not Implemented")
}
func (_ *DirectoryWithCtxTransitionalBase) Unlink(ctx_ _bindings.Context, name string, options fuchsiaio2.UnlinkOptions) (DirectoryUnlinkResult, error) {
panic("Not Implemented")
}
func (_ *DirectoryWithCtxTransitionalBase) Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) {
panic("Not Implemented")
}
type DirectoryWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewDirectoryWithCtxInterfaceRequest() (DirectoryWithCtxInterfaceRequest, *DirectoryWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return DirectoryWithCtxInterfaceRequest(req), (*DirectoryWithCtxInterface)(cli), err
}
type DirectoryWithCtxStub struct {
Impl DirectoryWithCtx
}
func (s_ *DirectoryWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case DirectoryCloneOrdinal:
in_ := directoryWithCtxCloneRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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 DirectoryCloseOrdinal:
s, err_ := s_.Impl.Close(args_.Ctx)
out_ := directoryWithCtxCloseResponse{}
out_.S = s
return &out_, true, err_
case DirectoryDescribeOrdinal:
info, err_ := s_.Impl.Describe(args_.Ctx)
out_ := directoryWithCtxDescribeResponse{}
out_.Info = info
return &out_, true, err_
case DirectorySyncOrdinal:
s, err_ := s_.Impl.Sync(args_.Ctx)
out_ := directoryWithCtxSyncResponse{}
out_.S = s
return &out_, true, err_
case DirectoryGetAttrOrdinal:
s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
out_ := directoryWithCtxGetAttrResponse{}
out_.S = s
out_.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.UnmarshalWithContext(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{}
out_.S = s
return &out_, true, err_
case DirectoryNodeGetFlagsOrdinal:
s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
out_ := directoryWithCtxNodeGetFlagsResponse{}
out_.S = s
out_.Flags = flags
return &out_, true, err_
case DirectoryNodeSetFlagsOrdinal:
in_ := directoryWithCtxNodeSetFlagsRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
out_ := directoryWithCtxNodeSetFlagsResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdvisoryLockOrdinal:
in_ := directoryWithCtxAdvisoryLockRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, in_.Request)
out_ := directoryWithCtxAdvisoryLockResponse{}
out_.Result = result
return &out_, true, err_
case DirectoryOpenOrdinal:
in_ := directoryWithCtxOpenRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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 DirectoryAddInotifyFilterOrdinal:
in_ := directoryWithCtxAddInotifyFilterRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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.UnmarshalWithContext(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{}
out_.Result = result
return &out_, true, err_
case DirectoryReadDirentsOrdinal:
in_ := directoryWithCtxReadDirentsRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, dirents, err_ := s_.Impl.ReadDirents(args_.Ctx, in_.MaxBytes)
out_ := directoryWithCtxReadDirentsResponse{}
out_.S = s
out_.Dirents = dirents
return &out_, true, err_
case DirectoryRewindOrdinal:
s, err_ := s_.Impl.Rewind(args_.Ctx)
out_ := directoryWithCtxRewindResponse{}
out_.S = s
return &out_, true, err_
case DirectoryGetTokenOrdinal:
s, token, err_ := s_.Impl.GetToken(args_.Ctx)
out_ := directoryWithCtxGetTokenResponse{}
out_.S = s
out_.Token = token
return &out_, true, err_
case DirectoryRenameOrdinal:
in_ := directoryWithCtxRenameRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Rename(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
out_ := directoryWithCtxRenameResponse{}
out_.S = s
return &out_, true, err_
case DirectoryRename2Ordinal:
in_ := directoryWithCtxRename2Request{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Rename2(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
out_ := directoryWithCtxRename2Response{}
out_.Result = result
return &out_, true, err_
case DirectoryLinkOrdinal:
in_ := directoryWithCtxLinkRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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{}
out_.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.UnmarshalWithContext(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{}
out_.S = s
return &out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type DirectoryEventProxy _bindings.ChannelProxy
func (p *DirectoryEventProxy) OnOpen(s int32, info *NodeInfo) error {
event_ := &directoryWithCtxOnOpenResponse{
S: s,
Info: info,
}
return ((*_bindings.ChannelProxy)(p)).Send(DirectoryOnOpenOrdinal, event_)
}
const (
DirectoryAdminCloneOrdinal uint64 = 0x5a61678f293ce16f
DirectoryAdminCloseOrdinal uint64 = 0x5309c5bd1c33dc44
DirectoryAdminDescribeOrdinal uint64 = 0xffcec215078dea0
DirectoryAdminOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
DirectoryAdminSyncOrdinal uint64 = 0x189d88326c18b519
DirectoryAdminGetAttrOrdinal uint64 = 0x78985e216314dafd
DirectoryAdminSetAttrOrdinal uint64 = 0x4186c0f40d938f46
DirectoryAdminNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
DirectoryAdminNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
DirectoryAdminAdvisoryLockOrdinal uint64 = 0x6358e94c468026fa
DirectoryAdminOpenOrdinal uint64 = 0x2c5044561d685ec0
DirectoryAdminAddInotifyFilterOrdinal uint64 = 0x5bf289cc866b68cb
DirectoryAdminUnlinkOrdinal uint64 = 0x750a0326a78d7bed
DirectoryAdminReadDirentsOrdinal uint64 = 0x3582806bf27faa0a
DirectoryAdminRewindOrdinal uint64 = 0x16b1202af0f34c71
DirectoryAdminGetTokenOrdinal uint64 = 0x26ae9d18763c8655
DirectoryAdminRenameOrdinal uint64 = 0xa8e00a247f3c905
DirectoryAdminRename2Ordinal uint64 = 0x7060e7723b9928de
DirectoryAdminLinkOrdinal uint64 = 0x740604c0c7c930e7
DirectoryAdminWatchOrdinal uint64 = 0x5717193a59d66d91
DirectoryAdminMountOrdinal uint64 = 0xfa166d1522c27d0
DirectoryAdminMountAndCreateOrdinal uint64 = 0x7bc782242022b3b3
DirectoryAdminUnmountOrdinal uint64 = 0x7da45d654c35c9a4
DirectoryAdminUnmountNodeOrdinal uint64 = 0x26b9d90ebe5f93db
DirectoryAdminQueryFilesystemOrdinal uint64 = 0x4a879480f1d7875d
DirectoryAdminGetDevicePathOrdinal uint64 = 0x76f2e3c7331f815b
)
type DirectoryAdminWithCtxInterface _bindings.ChannelProxy
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_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 `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
func (p *DirectoryAdminWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error {
req_ := &directoryAdminWithCtxCloneRequest{
Flags: flags,
Object: object,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryAdminCloneOrdinal, req_)
return err_
}
// Terminates connection with object.
//
// This method does not require any rights.
func (p *DirectoryAdminWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxCloseResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminCloseOrdinal, req_, resp_)
return resp_.S, err_
}
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
func (p *DirectoryAdminWithCtxInterface) Describe(ctx_ _bindings.Context) (NodeInfo, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxDescribeResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminDescribeOrdinal, req_, resp_)
return resp_.Info, err_
}
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_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 *DirectoryAdminWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfo, error) {
resp_ := &directoryAdminWithCtxOnOpenResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Recv(DirectoryAdminOnOpenOrdinal, resp_)
return resp_.S, resp_.Info, err_
}
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
func (p *DirectoryAdminWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxSyncResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminSyncOrdinal, req_, resp_)
return resp_.S, err_
}
// Acquires information about the node.
//
// This method does not require any rights.
func (p *DirectoryAdminWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxGetAttrResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminGetAttrOrdinal, req_, resp_)
return resp_.S, resp_.Attributes, err_
}
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *DirectoryAdminWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error) {
req_ := &directoryAdminWithCtxSetAttrRequest{
Flags: flags,
Attributes: attributes,
}
resp_ := &directoryAdminWithCtxSetAttrResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminSetAttrOrdinal, 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.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
func (p *DirectoryAdminWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxNodeGetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminNodeGetFlagsOrdinal, 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:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
func (p *DirectoryAdminWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
req_ := &directoryAdminWithCtxNodeSetFlagsRequest{
Flags: flags,
}
resp_ := &directoryAdminWithCtxNodeSetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminNodeSetFlagsOrdinal, req_, resp_)
return resp_.S, 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 *DirectoryAdminWithCtxInterface) AdvisoryLock(ctx_ _bindings.Context, request fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error) {
req_ := &directoryAdminWithCtxAdvisoryLockRequest{
Request: request,
}
resp_ := &directoryAdminWithCtxAdvisoryLockResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminAdvisoryLockOrdinal, req_, resp_)
return resp_.Result, 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 OPEN_FLAG_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).
//
// `flags` may be any of the `OPEN_FLAG_*` and `OPEN_RIGHT_*` values, bitwise ORed together.
// The `OPEN_FLAG_DESCRIBE` flag may cause an `OnOpen` event to be transmitted
// on the `object` handle, indicating the type of object opened.
//
// If an unknown value is sent for flags the connection should be closed.
//
// `OPEN_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.
//
// The caller must specify either one or more of the `OPEN_RIGHT_*` flags, or
// the `OPEN_FLAG_NODE_REFERENCE` flag.
//
// `mode` is only used if an object is created and indicates the type of object to be
// created. An unsupported mode will cause the connection to be closed.
// The mode type, if set, must always be consistent with the OPEN_FLAG_DIRECTORY and
// OPEN_FLAG_NOT_DIRECTORY flags, even if an object is not being created. If an object is not
// being created, `mode` is otherwise ignored. If an object is being created and the mode
// type is not set, a directory will be created if OPEN_FLAG_DIRECTORY is set (explicitly or
// implicitly), or otherwise a server chosen object type.
func (p *DirectoryAdminWithCtxInterface) Open(ctx_ _bindings.Context, flags uint32, mode uint32, path string, object NodeWithCtxInterfaceRequest) error {
req_ := &directoryAdminWithCtxOpenRequest{
Flags: flags,
Mode: mode,
Path: path,
Object: object,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryAdminOpenOrdinal, 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 *DirectoryAdminWithCtxInterface) AddInotifyFilter(ctx_ _bindings.Context, path string, filter fuchsiaio2.InotifyWatchMask, watchDescriptor uint32, socket _zx.Socket) error {
req_ := &directoryAdminWithCtxAddInotifyFilterRequest{
Path: path,
Filter: filter,
WatchDescriptor: watchDescriptor,
Socket: socket,
}
var resp_ _bindings.Message
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminAddInotifyFilterOrdinal, 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 *DirectoryAdminWithCtxInterface) Unlink(ctx_ _bindings.Context, name string, options fuchsiaio2.UnlinkOptions) (DirectoryUnlinkResult, error) {
req_ := &directoryAdminWithCtxUnlinkRequest{
Name: name,
Options: options,
}
resp_ := &directoryAdminWithCtxUnlinkResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminUnlinkOrdinal, req_, resp_)
return resp_.Result, 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.
//
// 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 `DIRENT_TYPE_*` 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 *DirectoryAdminWithCtxInterface) ReadDirents(ctx_ _bindings.Context, maxBytes uint64) (int32, []uint8, error) {
req_ := &directoryAdminWithCtxReadDirentsRequest{
MaxBytes: maxBytes,
}
resp_ := &directoryAdminWithCtxReadDirentsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminReadDirentsOrdinal, 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 *DirectoryAdminWithCtxInterface) Rewind(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxRewindResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminRewindOrdinal, 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.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *DirectoryAdminWithCtxInterface) GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxGetTokenResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminGetTokenOrdinal, req_, resp_)
return resp_.S, resp_.Token, err_
}
// Renames an object named src to the name dst, in a directory represented by token.
//
// `src/dst` must be resolved object names. Including "/" in any position
// other than the end of the string will return `ZX_ERR_INVALID_ARGS`.
// Returning "/" at the end of either string implies that it must be a
// directory, or else `ZX_ERR_NOT_DIR` should be returned.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *DirectoryAdminWithCtxInterface) Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) {
req_ := &directoryAdminWithCtxRenameRequest{
Src: src,
DstParentToken: dstParentToken,
Dst: dst,
}
resp_ := &directoryAdminWithCtxRenameResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminRenameOrdinal, req_, resp_)
return resp_.S, err_
}
// Renames a node named `src` to the name `dst`, in a directory represented
// by `dst_parent_token`.
//
// `src` and `dst` must be valid node names.
// See [`fuchsia.io2/Name`] for what constitutes a valid name.
//
// This method requires the following rights on both the current
// connection, and the connection identified by `dst_parent_token`:
//
// * [`Rights.ENUMERATE`]
// * [`Rights.MODIFY_DIRECTORY`]
//
// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
func (p *DirectoryAdminWithCtxInterface) Rename2(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryRename2Result, error) {
req_ := &directoryAdminWithCtxRename2Request{
Src: src,
DstParentToken: dstParentToken,
Dst: dst,
}
resp_ := &directoryAdminWithCtxRename2Response{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminRename2Ordinal, req_, resp_)
return resp_.Result, 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: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
func (p *DirectoryAdminWithCtxInterface) Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) {
req_ := &directoryAdminWithCtxLinkRequest{
Src: src,
DstParentToken: dstParentToken,
Dst: dst,
}
resp_ := &directoryAdminWithCtxLinkResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminLinkOrdinal, req_, resp_)
return resp_.S, err_
}
// Watches a directory, receiving events of added messages on the
// watcher request channel.
//
// The `watcher` handle will send messages of the form:
// ```
// struct {
// uint8 event;
// uint8 len;
// char name[];
// };
// ```
// Where names are NOT null-terminated.
//
// This API is unstable; in the future, watcher will be a `DirectoryWatcher` client.
//
// Mask specifies a bitmask of events to observe.
// Options must be zero; it is reserved.
//
// This method does not require any rights, similar to ReadDirents.
func (p *DirectoryAdminWithCtxInterface) Watch(ctx_ _bindings.Context, mask uint32, options uint32, watcher _zx.Channel) (int32, error) {
req_ := &directoryAdminWithCtxWatchRequest{
Mask: mask,
Options: options,
Watcher: watcher,
}
resp_ := &directoryAdminWithCtxWatchResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminWatchOrdinal, req_, resp_)
return resp_.S, err_
}
// Mount a channel representing a remote filesystem onto this directory.
// All future requests to this node will be forwarded to the remote filesystem.
// To re-open a node without forwarding to the remote target, the node
// should be opened with `OPEN_FLAG_NO_REMOTE`.
func (p *DirectoryAdminWithCtxInterface) Mount(ctx_ _bindings.Context, remote DirectoryWithCtxInterface) (int32, error) {
req_ := &directoryAdminWithCtxMountRequest{
Remote: remote,
}
resp_ := &directoryAdminWithCtxMountResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminMountOrdinal, req_, resp_)
return resp_.S, err_
}
// Atomically create a directory with a provided path, and mount the
// remote handle to the newly created directory.
func (p *DirectoryAdminWithCtxInterface) MountAndCreate(ctx_ _bindings.Context, remote DirectoryWithCtxInterface, name string, flags uint32) (int32, error) {
req_ := &directoryAdminWithCtxMountAndCreateRequest{
Remote: remote,
Name: name,
Flags: flags,
}
resp_ := &directoryAdminWithCtxMountAndCreateResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminMountAndCreateOrdinal, req_, resp_)
return resp_.S, err_
}
// Unmount this filesystem. After this function returns successfully,
// all connections to the filesystem will be terminated.
func (p *DirectoryAdminWithCtxInterface) Unmount(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxUnmountResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminUnmountOrdinal, req_, resp_)
return resp_.S, err_
}
// Detach a node which was previously attached to this directory
// with Mount.
func (p *DirectoryAdminWithCtxInterface) UnmountNode(ctx_ _bindings.Context) (int32, DirectoryWithCtxInterface, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxUnmountNodeResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminUnmountNodeOrdinal, req_, resp_)
return resp_.S, resp_.Remote, err_
}
// Query the filesystem for filesystem-specific information.
func (p *DirectoryAdminWithCtxInterface) QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxQueryFilesystemResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminQueryFilesystemOrdinal, req_, resp_)
return resp_.S, resp_.Info, err_
}
// Acquire the path to the device backing this filesystem, if there is one.
func (p *DirectoryAdminWithCtxInterface) GetDevicePath(ctx_ _bindings.Context) (int32, *string, error) {
var req_ _bindings.Message
resp_ := &directoryAdminWithCtxGetDevicePathResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminGetDevicePathOrdinal, req_, resp_)
return resp_.S, resp_.Path, err_
}
// DirectoryAdmin defines a directory which is capable of handling
// administrator tasks within the filesystem.
type DirectoryAdminWithCtx interface {
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_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 `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error
// Terminates connection with object.
//
// This method does not require any rights.
Close(ctx_ _bindings.Context) (int32, error)
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
Describe(ctx_ _bindings.Context) (NodeInfo, error)
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_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`).
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
Sync(ctx_ _bindings.Context) (int32, error)
// Acquires information about the node.
//
// This method does not require any rights.
GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error)
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error)
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, 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 fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, 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 OPEN_FLAG_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).
//
// `flags` may be any of the `OPEN_FLAG_*` and `OPEN_RIGHT_*` values, bitwise ORed together.
// The `OPEN_FLAG_DESCRIBE` flag may cause an `OnOpen` event to be transmitted
// on the `object` handle, indicating the type of object opened.
//
// If an unknown value is sent for flags the connection should be closed.
//
// `OPEN_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.
//
// The caller must specify either one or more of the `OPEN_RIGHT_*` flags, or
// the `OPEN_FLAG_NODE_REFERENCE` flag.
//
// `mode` is only used if an object is created and indicates the type of object to be
// created. An unsupported mode will cause the connection to be closed.
// The mode type, if set, must always be consistent with the OPEN_FLAG_DIRECTORY and
// OPEN_FLAG_NOT_DIRECTORY flags, even if an object is not being created. If an object is not
// being created, `mode` is otherwise ignored. If an object is being created and the mode
// type is not set, a directory will be created if OPEN_FLAG_DIRECTORY is set (explicitly or
// implicitly), or otherwise a server chosen object type.
Open(ctx_ _bindings.Context, flags uint32, mode uint32, path string, object NodeWithCtxInterfaceRequest) 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 fuchsiaio2.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 fuchsiaio2.UnlinkOptions) (DirectoryUnlinkResult, 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.
//
// 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 `DIRENT_TYPE_*` 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.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error)
// Renames an object named src to the name dst, in a directory represented by token.
//
// `src/dst` must be resolved object names. Including "/" in any position
// other than the end of the string will return `ZX_ERR_INVALID_ARGS`.
// Returning "/" at the end of either string implies that it must be a
// directory, or else `ZX_ERR_NOT_DIR` should be returned.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
// `ZX_ERR_BAD_HANDLE`.
Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error)
// Renames a node named `src` to the name `dst`, in a directory represented
// by `dst_parent_token`.
//
// `src` and `dst` must be valid node names.
// See [`fuchsia.io2/Name`] for what constitutes a valid name.
//
// This method requires the following rights on both the current
// connection, and the connection identified by `dst_parent_token`:
//
// * [`Rights.ENUMERATE`]
// * [`Rights.MODIFY_DIRECTORY`]
//
// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
Rename2(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryRename2Result, 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: `OPEN_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.
//
// The `watcher` handle will send messages of the form:
// ```
// struct {
// uint8 event;
// uint8 len;
// char name[];
// };
// ```
// Where names are NOT null-terminated.
//
// This API is unstable; in the future, watcher will be a `DirectoryWatcher` client.
//
// Mask specifies a bitmask of events to observe.
// Options must be zero; it is reserved.
//
// This method does not require any rights, similar to ReadDirents.
Watch(ctx_ _bindings.Context, mask uint32, options uint32, watcher _zx.Channel) (int32, error)
// Mount a channel representing a remote filesystem onto this directory.
// All future requests to this node will be forwarded to the remote filesystem.
// To re-open a node without forwarding to the remote target, the node
// should be opened with `OPEN_FLAG_NO_REMOTE`.
Mount(ctx_ _bindings.Context, remote DirectoryWithCtxInterface) (int32, error)
// Atomically create a directory with a provided path, and mount the
// remote handle to the newly created directory.
MountAndCreate(ctx_ _bindings.Context, remote DirectoryWithCtxInterface, name string, flags uint32) (int32, error)
// Unmount this filesystem. After this function returns successfully,
// all connections to the filesystem will be terminated.
Unmount(ctx_ _bindings.Context) (int32, error)
// Detach a node which was previously attached to this directory
// with Mount.
UnmountNode(ctx_ _bindings.Context) (int32, DirectoryWithCtxInterface, error)
// Query the filesystem for filesystem-specific information.
QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error)
// Acquire the path to the device backing this filesystem, if there is one.
GetDevicePath(ctx_ _bindings.Context) (int32, *string, error)
}
type DirectoryAdminWithCtxTransitionalBase struct{}
func (_ *DirectoryAdminWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
panic("Not Implemented")
}
func (_ *DirectoryAdminWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
panic("Not Implemented")
}
func (_ *DirectoryAdminWithCtxTransitionalBase) AdvisoryLock(ctx_ _bindings.Context, request fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error) {
panic("Not Implemented")
}
func (_ *DirectoryAdminWithCtxTransitionalBase) Unlink(ctx_ _bindings.Context, name string, options fuchsiaio2.UnlinkOptions) (DirectoryUnlinkResult, error) {
panic("Not Implemented")
}
func (_ *DirectoryAdminWithCtxTransitionalBase) Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) {
panic("Not Implemented")
}
type DirectoryAdminWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewDirectoryAdminWithCtxInterfaceRequest() (DirectoryAdminWithCtxInterfaceRequest, *DirectoryAdminWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return DirectoryAdminWithCtxInterfaceRequest(req), (*DirectoryAdminWithCtxInterface)(cli), err
}
type DirectoryAdminWithCtxStub struct {
Impl DirectoryAdminWithCtx
}
func (s_ *DirectoryAdminWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case DirectoryAdminCloneOrdinal:
in_ := directoryAdminWithCtxCloneRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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 DirectoryAdminCloseOrdinal:
s, err_ := s_.Impl.Close(args_.Ctx)
out_ := directoryAdminWithCtxCloseResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminDescribeOrdinal:
info, err_ := s_.Impl.Describe(args_.Ctx)
out_ := directoryAdminWithCtxDescribeResponse{}
out_.Info = info
return &out_, true, err_
case DirectoryAdminSyncOrdinal:
s, err_ := s_.Impl.Sync(args_.Ctx)
out_ := directoryAdminWithCtxSyncResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminGetAttrOrdinal:
s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
out_ := directoryAdminWithCtxGetAttrResponse{}
out_.S = s
out_.Attributes = attributes
return &out_, true, err_
case DirectoryAdminSetAttrOrdinal:
in_ := directoryAdminWithCtxSetAttrRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
out_ := directoryAdminWithCtxSetAttrResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminNodeGetFlagsOrdinal:
s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
out_ := directoryAdminWithCtxNodeGetFlagsResponse{}
out_.S = s
out_.Flags = flags
return &out_, true, err_
case DirectoryAdminNodeSetFlagsOrdinal:
in_ := directoryAdminWithCtxNodeSetFlagsRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
out_ := directoryAdminWithCtxNodeSetFlagsResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminAdvisoryLockOrdinal:
in_ := directoryAdminWithCtxAdvisoryLockRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, in_.Request)
out_ := directoryAdminWithCtxAdvisoryLockResponse{}
out_.Result = result
return &out_, true, err_
case DirectoryAdminOpenOrdinal:
in_ := directoryAdminWithCtxOpenRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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 DirectoryAdminAddInotifyFilterOrdinal:
in_ := directoryAdminWithCtxAddInotifyFilterRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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 DirectoryAdminUnlinkOrdinal:
in_ := directoryAdminWithCtxUnlinkRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Unlink(args_.Ctx, in_.Name, in_.Options)
out_ := directoryAdminWithCtxUnlinkResponse{}
out_.Result = result
return &out_, true, err_
case DirectoryAdminReadDirentsOrdinal:
in_ := directoryAdminWithCtxReadDirentsRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, dirents, err_ := s_.Impl.ReadDirents(args_.Ctx, in_.MaxBytes)
out_ := directoryAdminWithCtxReadDirentsResponse{}
out_.S = s
out_.Dirents = dirents
return &out_, true, err_
case DirectoryAdminRewindOrdinal:
s, err_ := s_.Impl.Rewind(args_.Ctx)
out_ := directoryAdminWithCtxRewindResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminGetTokenOrdinal:
s, token, err_ := s_.Impl.GetToken(args_.Ctx)
out_ := directoryAdminWithCtxGetTokenResponse{}
out_.S = s
out_.Token = token
return &out_, true, err_
case DirectoryAdminRenameOrdinal:
in_ := directoryAdminWithCtxRenameRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Rename(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
out_ := directoryAdminWithCtxRenameResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminRename2Ordinal:
in_ := directoryAdminWithCtxRename2Request{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Rename2(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
out_ := directoryAdminWithCtxRename2Response{}
out_.Result = result
return &out_, true, err_
case DirectoryAdminLinkOrdinal:
in_ := directoryAdminWithCtxLinkRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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_ := directoryAdminWithCtxLinkResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminWatchOrdinal:
in_ := directoryAdminWithCtxWatchRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(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_ := directoryAdminWithCtxWatchResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminMountOrdinal:
in_ := directoryAdminWithCtxMountRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Mount(args_.Ctx, in_.Remote)
out_ := directoryAdminWithCtxMountResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminMountAndCreateOrdinal:
in_ := directoryAdminWithCtxMountAndCreateRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.MountAndCreate(args_.Ctx, in_.Remote, in_.Name, in_.Flags)
out_ := directoryAdminWithCtxMountAndCreateResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminUnmountOrdinal:
s, err_ := s_.Impl.Unmount(args_.Ctx)
out_ := directoryAdminWithCtxUnmountResponse{}
out_.S = s
return &out_, true, err_
case DirectoryAdminUnmountNodeOrdinal:
s, remote, err_ := s_.Impl.UnmountNode(args_.Ctx)
out_ := directoryAdminWithCtxUnmountNodeResponse{}
out_.S = s
out_.Remote = remote
return &out_, true, err_
case DirectoryAdminQueryFilesystemOrdinal:
s, info, err_ := s_.Impl.QueryFilesystem(args_.Ctx)
out_ := directoryAdminWithCtxQueryFilesystemResponse{}
out_.S = s
out_.Info = info
return &out_, true, err_
case DirectoryAdminGetDevicePathOrdinal:
s, path, err_ := s_.Impl.GetDevicePath(args_.Ctx)
out_ := directoryAdminWithCtxGetDevicePathResponse{}
out_.S = s
out_.Path = path
return &out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type DirectoryAdminEventProxy _bindings.ChannelProxy
func (p *DirectoryAdminEventProxy) OnOpen(s int32, info *NodeInfo) error {
event_ := &directoryAdminWithCtxOnOpenResponse{
S: s,
Info: info,
}
return ((*_bindings.ChannelProxy)(p)).Send(DirectoryAdminOnOpenOrdinal, event_)
}