fidl library

Classes

ArrayType<T, I extends Iterable<T>>
AsyncBinding<T>

Listens for messages and dispatches them to an implementation of T.

AsyncProxy<T>

Sends messages to a remote implementation of T

AsyncProxyController<T>

A controller for Future based proxies.

Binding<T>

Listens for messages and dispatches them to an implementation of T.

Bits
BitsType<T extends Bits>
BoolType
ChannelType
Decoder
Encoder
Enum
EnumType<T extends Enum>
EnvelopeHeader
EventPairType
FidlType<T, I extends Iterable<T>>
Float32Type
Float64Type
HandleType
IncomingMessage
Int8Type
Int16Type
Int32Type
Int64Type
InterfaceHandle<T>

A channel over which messages from interface T can be sent. ...

InterfaceHandleType<T>
InterfacePair<T>
InterfaceRequest<T>

A channel over which messages from interface T can be received. ...

InterfaceRequestType<T>
MemberType<T>
MethodType
NullableHandleType<W>
NullableInterfaceHandleType<T>
NullableInterfaceRequestType<T>
NullableStringType
NullableUnionType<T extends XUnion>
NullableVectorType<T, I extends Iterable<T>>
OutgoingMessage
PointerType<T>
Proxy<T>

Sends messages to a remote implementation of T

ProxyController<T>

The control plane for an interface proxy. ...

ProxyError

The object that ProxyController<T>.error completes with when there is an error.

Service

Representation of a service that all T implementations should extend from.

ServiceData<T>

Exposes the ability to get a hold of the service runtime name and bindings.

SimpleFidlType<T>
SocketType
StatusType
StringType
Struct
StructType<T extends Struct>
Table
TableType<T extends Table>
Uint8Type
Uint16Type
Uint32Type
Uint64Type
UnionType<T extends XUnion>
UnknownRawData

UnknownRawData is a container for the raw bytes and handles of an unknown envelope. It has an associate UnknownRawDataType that allows encoding/ decoding instances of this class.

UnknownRawDataType

This encodes/decodes the UnknowRawData assuming it is in an envelope, i.e. payload bytes followed directly by handles.

VectorType<T, I extends Iterable<T>>
VmoType
XUnion

Constants

epitaphOrdinal const int
kAllocAbsent const int
kAllocPresent const int
kEnvelopeInlineMarker const int
kEnvelopeOutOfLineMarker const int
kHandleAbsent const int
kHandlePresent const int
kMagicNumberInitial const int
kMessageFlagOffset const int
kMessageHeaderSize const int
kMessageMagicOffset const int
kMessageOrdinalOffset const int
kMessageTxidOffset const int
kWireFormatDefault const WireFormat
kWireFormatV2FlagMask const int

Functions

decodeMessage<T>(IncomingMessage message, int inlineSize, MemberType typ) T

Decodes a FIDL message that contains a single parameter.

decodeMessageWithCallback<A>(IncomingMessage message, int inlineSize, A f(Decoder decoder)) A

Decodes a FIDL message with multiple parameters. The callback parameter provides a decoder that is initialized on the provided Message, which callers can use to decode specific types. The return result of the callback (e.g. the decoded parameters, wrapped in a containing class/struct) is returned as the result of the function. This functionality (decoding multiple parameters) is implemented using a callback because returning a list would be insufficient: the list would be of type List, whereas we want to retain concrete types of each decoded parameter. The only way to accomplish this in Dart is to pass in a function that collects these multiple values into a bespoke, properly typed class.

encodeMessage<T>(Encoder encoder, int inlineSize, MemberType typ, T value) void

Encodes a FIDL message that contains a single parameter.

encodeMessageWithCallback(Encoder encoder, int inlineSize, dynamic f()) void

Encodes a FIDL message with multiple parameters. The callback parameter provides a decoder that is initialized on the provided Message, which callers can use to decode specific types. This functionality (encoding multiple parameters) is implemented using a callback because each call to MemberType.encode() must pass in a concrete type, rather than an element popped from a List.

envelopeSize(WireFormat wireFormat) int
handleCtrlError(dynamic ctrl, String message) void

Calls close and signals the error on the ctrl.

handleException(String name, dynamic exception, void close()) void

Calls close and prints the exception.

performCtrlWithExceptionHandling(String name, dynamic ctrl, void work(), String type) void

Wraps work with common try/catch behaviour and timeline events.

performWithExceptionHandling(String name, void work(), void close()) void

Wraps work with common try/catch behaviour and timeline events.

Enums

EnvelopeContentLocation
EnvelopePresence
FidlErrorCode
InterfaceState

The different states that an AsyncBinding or AsyncProxy can be in.

WireFormat

Typedefs

##### [BitsFactory](../package-fidl_fidl/BitsFactory.md)&lt;{T}> = T Function(int value)



   





##### [EnumFactory](../package-fidl_fidl/EnumFactory.md)&lt;{T}> = T Function(int value)



   





##### [EpitaphHandler](../package-fidl_fidl/EpitaphHandler.md) = void Function(int statusCode)



   





##### [IncomingMessageSink](../package-fidl_fidl/IncomingMessageSink.md) = void Function([IncomingMessage](../package-fidl_fidl/IncomingMessage-class.md) message)



   





##### [OutgoingMessageSink](../package-fidl_fidl/OutgoingMessageSink.md) = void Function([OutgoingMessage](../package-fidl_fidl/OutgoingMessage-class.md) message)



   





##### [StructDecode](../package-fidl_fidl/StructDecode.md)&lt;{T}> = T Function([Decoder](../package-fidl_fidl/Decoder-class.md) decoder, int offset, int depth)



   





##### [TableFactory](../package-fidl_fidl/TableFactory.md)&lt;{T}> = T Function(Map&lt;int, dynamic> argv, [Map&lt;int, [UnknownRawData](../package-fidl_fidl/UnknownRawData-class.md)> unknownData])



   





##### [XUnionFactory](../package-fidl_fidl/XUnionFactory.md)&lt;{T}> = T Function(int index, Object data)

Exceptions / Errors

FidlError
FidlRangeCheckError
FidlStateException

An exception that‘s thrown if an AsyncBinding or AsyncProxy isn’t in the required state for the requested operation.

MethodException<T>