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
Int16Type
Int32Type
Int64Type
Int8Type
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
None<T>

None can be assigned to an OptionalNullable to convey that null should be used instead of a default.

NullableHandleType<W>
NullableInterfaceHandleType<T>
NullableInterfaceRequestType<T>
NullableStringType
NullableUnionType<T extends Union>
NullableVectorType<T, I extends Iterable<T>>
OptionalNullable<T>

A wrapper type for optional values that may also be null. This generic class can be used in argument lists for optional arguments. When called, the argument state will be one of:

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
Some<T>

A value wrapped in Some can be assigned to an OptionalNullable to convey the value should be used instead of a default.

StatusType
StringType
Struct
StructType<T extends Struct>
Table
TableType<T extends Table>
TransportErrType
Uint16Type
Uint32Type
Uint64Type
Uint8Type
Union
UnionType<T extends Union>
UnknownEvent

Event used when an unknown, flexible event is received.

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

Constants

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

Functions

align(int size) int
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
handleException(String name, dynamic exception, void close()) void

Calls close and prints the exception.

performCtrlWithExceptionHandling(String name, dynamic ctrl, String type, void additionalErrorListener(Object error, StackTrace stackTrace), void work()) 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.

strictnessFromFlags(int dynamicFlags) CallStrictness

Extract the CallStrictness from the dynamic flags byte of the message header.

strictnessToFlags(CallStrictness strictness) int

Convert CallStrictness to a byte that can be inserted into the dynamic flags portion of a message.

Enums

CallStrictness
EnvelopeContentLocation
EnvelopePresence
FidlErrorCode
InterfaceState

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

TransportErr

FIDL internal transport error type, used for unknown interactions.

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])



  





##### [UnionFactory](../package-fidl_fidl/UnionFactory.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>

If a FIDL method defines an application-level error, this exception will be thrown with the error as its value.

UnknownMethodException