2022-01-20 22:32:22 -05:00
|
|
|
// AUTO GENERATED FILE, DO NOT EDIT.
|
|
|
|
// Generated by `flutter_rust_bridge`.
|
2022-01-31 10:11:18 -05:00
|
|
|
|
|
|
|
// ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
import 'dart:convert';
|
2022-01-31 10:11:18 -05:00
|
|
|
import 'dart:typed_data';
|
2022-01-20 22:32:22 -05:00
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
|
|
|
|
import 'dart:convert';
|
2022-01-31 10:11:18 -05:00
|
|
|
import 'dart:typed_data';
|
2022-01-20 22:32:22 -05:00
|
|
|
import 'package:flutter_rust_bridge/flutter_rust_bridge.dart';
|
|
|
|
import 'dart:ffi' as ffi;
|
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
part 'bridge_generated.freezed.dart';
|
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
abstract class VeilidFlutter {
|
2022-01-31 10:11:18 -05:00
|
|
|
Stream<VeilidUpdate> startupVeilidCore({ required VeilidConfig config,dynamic hint });
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
Future<VeilidState> getVeilidState({ dynamic hint });
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
Future<void> shutdownVeilidCore({ dynamic hint });
|
2022-01-27 22:02:16 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
Future<String> veilidVersionString({ dynamic hint });
|
2022-01-27 22:02:16 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
Future<VeilidVersion> veilidVersion({ dynamic hint });
|
|
|
|
}
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
enum AttachmentState {
|
|
|
|
Detached,
|
|
|
|
Attaching,
|
|
|
|
AttachedWeak,
|
|
|
|
AttachedGood,
|
|
|
|
AttachedStrong,
|
|
|
|
FullyAttached,
|
|
|
|
OverAttached,
|
|
|
|
Detaching,
|
|
|
|
}
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
class VeilidConfig {
|
2022-01-31 10:11:18 -05:00
|
|
|
final String programName;
|
|
|
|
final String veilidNamespace;
|
|
|
|
final bool capabilitiesProtocolUdp;
|
|
|
|
final bool capabilitiesProtocolConnectTcp;
|
|
|
|
final bool capabilitiesProtocolAcceptTcp;
|
|
|
|
final bool capabilitiesProtocolConnectWs;
|
|
|
|
final bool capabilitiesProtocolAcceptWs;
|
|
|
|
final bool capabilitiesProtocolConnectWss;
|
|
|
|
final bool capabilitiesProtocolAcceptWss;
|
|
|
|
final bool protectedStoreAllowInsecureFallback;
|
|
|
|
final bool protectedStoreAlwaysUseInsecureStorage;
|
|
|
|
final String protectedStoreInsecureFallbackDirectory;
|
|
|
|
final bool protectedStoreDelete;
|
|
|
|
final String tableStoreDirectory;
|
|
|
|
final bool tableStoreDelete;
|
|
|
|
final String blockStoreDirectory;
|
|
|
|
final bool blockStoreDelete;
|
|
|
|
final int networkMaxConnections;
|
|
|
|
final int networkConnectionInitialTimeoutMs;
|
|
|
|
final String networkNodeId;
|
|
|
|
final String networkNodeIdSecret;
|
|
|
|
final List<String> networkBootstrap;
|
|
|
|
final bool networkUpnp;
|
|
|
|
final bool networkNatpmp;
|
|
|
|
final bool networkEnableLocalPeerScope;
|
|
|
|
final int networkRestrictedNatRetries;
|
|
|
|
final int networkRpcConcurrency;
|
|
|
|
final int networkRpcQueueSize;
|
|
|
|
final int? networkRpcMaxTimestampBehindMs;
|
|
|
|
final int? networkRpcMaxTimestampAheadMs;
|
|
|
|
final int networkRpcTimeoutMs;
|
|
|
|
final int networkRpcMaxRouteHopCount;
|
|
|
|
final int? networkDhtResolveNodeTimeoutMs;
|
|
|
|
final int networkDhtResolveNodeCount;
|
|
|
|
final int networkDhtResolveNodeFanout;
|
|
|
|
final int networkDhtMaxFindNodeCount;
|
|
|
|
final int? networkDhtGetValueTimeoutMs;
|
|
|
|
final int networkDhtGetValueCount;
|
|
|
|
final int networkDhtGetValueFanout;
|
|
|
|
final int? networkDhtSetValueTimeoutMs;
|
|
|
|
final int networkDhtSetValueCount;
|
|
|
|
final int networkDhtSetValueFanout;
|
|
|
|
final int networkDhtMinPeerCount;
|
|
|
|
final int networkDhtMinPeerRefreshTimeMs;
|
|
|
|
final int networkDhtValidateDialInfoReceiptTimeMs;
|
|
|
|
final bool networkProtocolUdpEnabled;
|
|
|
|
final int networkProtocolUdpSocketPoolSize;
|
|
|
|
final String networkProtocolUdpListenAddress;
|
|
|
|
final String? networkProtocolUdpPublicAddress;
|
|
|
|
final bool networkProtocolTcpConnect;
|
|
|
|
final bool networkProtocolTcpListen;
|
|
|
|
final int networkProtocolTcpMaxConnections;
|
|
|
|
final String networkProtocolTcpListenAddress;
|
|
|
|
final String? networkProtocolTcpPublicAddress;
|
|
|
|
final bool networkProtocolWsConnect;
|
|
|
|
final bool networkProtocolWsListen;
|
|
|
|
final int networkProtocolWsMaxConnections;
|
|
|
|
final String networkProtocolWsListenAddress;
|
|
|
|
final String networkProtocolWsPath;
|
|
|
|
final String? networkProtocolWsUrl;
|
|
|
|
final bool networkProtocolWssConnect;
|
|
|
|
final int networkProtocolWssMaxConnections;
|
|
|
|
final int networkLeasesMaxServerSignalLeases;
|
|
|
|
final int networkLeasesMaxServerRelayLeases;
|
|
|
|
final int networkLeasesMaxClientSignalLeases;
|
|
|
|
final int networkLeasesMaxClientRelayLeases;
|
|
|
|
|
|
|
|
VeilidConfig({required this.programName,required this.veilidNamespace,required this.capabilitiesProtocolUdp,required this.capabilitiesProtocolConnectTcp,required this.capabilitiesProtocolAcceptTcp,required this.capabilitiesProtocolConnectWs,required this.capabilitiesProtocolAcceptWs,required this.capabilitiesProtocolConnectWss,required this.capabilitiesProtocolAcceptWss,required this.protectedStoreAllowInsecureFallback,required this.protectedStoreAlwaysUseInsecureStorage,required this.protectedStoreInsecureFallbackDirectory,required this.protectedStoreDelete,required this.tableStoreDirectory,required this.tableStoreDelete,required this.blockStoreDirectory,required this.blockStoreDelete,required this.networkMaxConnections,required this.networkConnectionInitialTimeoutMs,required this.networkNodeId,required this.networkNodeIdSecret,required this.networkBootstrap,required this.networkUpnp,required this.networkNatpmp,required this.networkEnableLocalPeerScope,required this.networkRestrictedNatRetries,required this.networkRpcConcurrency,required this.networkRpcQueueSize,this.networkRpcMaxTimestampBehindMs,this.networkRpcMaxTimestampAheadMs,required this.networkRpcTimeoutMs,required this.networkRpcMaxRouteHopCount,this.networkDhtResolveNodeTimeoutMs,required this.networkDhtResolveNodeCount,required this.networkDhtResolveNodeFanout,required this.networkDhtMaxFindNodeCount,this.networkDhtGetValueTimeoutMs,required this.networkDhtGetValueCount,required this.networkDhtGetValueFanout,this.networkDhtSetValueTimeoutMs,required this.networkDhtSetValueCount,required this.networkDhtSetValueFanout,required this.networkDhtMinPeerCount,required this.networkDhtMinPeerRefreshTimeMs,required this.networkDhtValidateDialInfoReceiptTimeMs,required this.networkProtocolUdpEnabled,required this.networkProtocolUdpSocketPoolSize,required this.networkProtocolUdpListenAddress,this.networkProtocolUdpPublicAddress,required this.networkProtocolTcpConnect,required this.networkProtocolTcpListen,required this.networkProtocolTcpMaxConnections,required this.networkProtocolTcpListenAddress,this.networkProtocolTcpPublicAddress,required this.networkProtocolWsConnect,required this.networkProtocolWsListen,required this.networkProtocolWsMaxConnections,required this.networkProtocolWsListenAddress,required this.networkProtocolWsPath,this.networkProtocolWsUrl,required this.networkProtocolWssConnect,required this.networkProtocolWssMaxConnections,required this.networkLeasesMaxServerSignalLeases,required this.networkLeasesMaxServerRelayLeases,required this.networkLeasesMaxClientSignalLeases,required this.networkLeasesMaxClientRelayLeases,});
|
|
|
|
}
|
|
|
|
|
|
|
|
enum VeilidLogLevel {
|
|
|
|
Error,
|
|
|
|
Warn,
|
|
|
|
Info,
|
|
|
|
Debug,
|
|
|
|
Trace,
|
|
|
|
}
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
class VeilidState {
|
2022-01-31 10:11:18 -05:00
|
|
|
final AttachmentState attachment;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
VeilidState({required this.attachment,});
|
|
|
|
}
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@freezed
|
2022-01-31 10:11:18 -05:00
|
|
|
class VeilidUpdate with _$VeilidUpdate {
|
|
|
|
const factory VeilidUpdate.log(VeilidLogLevel field0,,String field1,) = Log;
|
|
|
|
const factory VeilidUpdate.attachment(AttachmentState field0,) = Attachment;
|
|
|
|
}
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
class VeilidVersion {
|
2022-01-31 10:11:18 -05:00
|
|
|
final int major;
|
|
|
|
final int minor;
|
|
|
|
final int patch;
|
|
|
|
|
|
|
|
VeilidVersion({required this.major,required this.minor,required this.patch,});
|
|
|
|
}
|
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
class VeilidFlutterImpl extends FlutterRustBridgeBase<VeilidFlutterWire> implements VeilidFlutter {
|
|
|
|
factory VeilidFlutterImpl(ffi.DynamicLibrary dylib) => VeilidFlutterImpl.raw(VeilidFlutterWire(dylib));
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
VeilidFlutterImpl.raw(VeilidFlutterWire inner) : super(inner);
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
Stream<VeilidUpdate> startupVeilidCore({ required VeilidConfig config,dynamic hint }) => executeStream(FlutterRustBridgeTask(
|
|
|
|
callFfi: (port_) => inner.wire_startup_veilid_core(port_, _api2wire_box_autoadd_veilid_config(config)),
|
|
|
|
parseSuccessData: _wire2api_veilid_update,
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
constMeta: const FlutterRustBridgeTaskConstMeta(
|
2022-01-31 10:11:18 -05:00
|
|
|
debugName: "startup_veilid_core",
|
|
|
|
argNames: ["config"],
|
2022-01-20 22:32:22 -05:00
|
|
|
),
|
|
|
|
argValues: [config],
|
|
|
|
hint: hint,
|
2022-01-31 10:11:18 -05:00
|
|
|
|
|
|
|
));
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
Future<VeilidState> getVeilidState({ dynamic hint }) => executeNormal(FlutterRustBridgeTask(
|
|
|
|
callFfi: (port_) => inner.wire_get_veilid_state(port_),
|
|
|
|
parseSuccessData: _wire2api_veilid_state,
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
constMeta: const FlutterRustBridgeTaskConstMeta(
|
2022-01-31 10:11:18 -05:00
|
|
|
debugName: "get_veilid_state",
|
|
|
|
argNames: [],
|
2022-01-20 22:32:22 -05:00
|
|
|
),
|
|
|
|
argValues: [],
|
|
|
|
hint: hint,
|
2022-01-31 10:11:18 -05:00
|
|
|
|
|
|
|
));
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
Future<void> shutdownVeilidCore({ dynamic hint }) => executeNormal(FlutterRustBridgeTask(
|
|
|
|
callFfi: (port_) => inner.wire_shutdown_veilid_core(port_),
|
|
|
|
parseSuccessData: _wire2api_unit,
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
constMeta: const FlutterRustBridgeTaskConstMeta(
|
2022-01-31 10:11:18 -05:00
|
|
|
debugName: "shutdown_veilid_core",
|
|
|
|
argNames: [],
|
2022-01-20 22:32:22 -05:00
|
|
|
),
|
|
|
|
argValues: [],
|
|
|
|
hint: hint,
|
2022-01-31 10:11:18 -05:00
|
|
|
|
|
|
|
));
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
Future<String> veilidVersionString({ dynamic hint }) => executeNormal(FlutterRustBridgeTask(
|
|
|
|
callFfi: (port_) => inner.wire_veilid_version_string(port_),
|
|
|
|
parseSuccessData: _wire2api_String,
|
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
constMeta: const FlutterRustBridgeTaskConstMeta(
|
2022-01-31 10:11:18 -05:00
|
|
|
debugName: "veilid_version_string",
|
|
|
|
argNames: [],
|
2022-01-27 22:02:16 -05:00
|
|
|
),
|
|
|
|
argValues: [],
|
|
|
|
hint: hint,
|
2022-01-31 10:11:18 -05:00
|
|
|
|
|
|
|
));
|
2022-01-27 22:02:16 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
Future<VeilidVersion> veilidVersion({ dynamic hint }) => executeNormal(FlutterRustBridgeTask(
|
|
|
|
callFfi: (port_) => inner.wire_veilid_version(port_),
|
|
|
|
parseSuccessData: _wire2api_veilid_version,
|
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
constMeta: const FlutterRustBridgeTaskConstMeta(
|
2022-01-31 10:11:18 -05:00
|
|
|
debugName: "veilid_version",
|
|
|
|
argNames: [],
|
2022-01-27 22:02:16 -05:00
|
|
|
),
|
|
|
|
argValues: [],
|
|
|
|
hint: hint,
|
2022-01-31 10:11:18 -05:00
|
|
|
|
|
|
|
));
|
2022-01-27 22:02:16 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
// Section: api2wire
|
|
|
|
ffi.Pointer<wire_uint_8_list> _api2wire_String(String raw) {
|
|
|
|
return _api2wire_uint_8_list(utf8.encoder.convert(raw));
|
|
|
|
}
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
ffi.Pointer<wire_StringList> _api2wire_StringList(List<String> raw) {
|
|
|
|
final ans = inner.new_StringList(raw.length);
|
|
|
|
for (var i = 0; i < raw.length; i++) {
|
|
|
|
ans.ref.ptr[i] = _api2wire_String(raw[i]);
|
|
|
|
}
|
|
|
|
return ans;
|
|
|
|
}
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
int _api2wire_bool(bool raw) {
|
|
|
|
return raw ? 1 : 0;
|
|
|
|
}
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
ffi.Pointer<ffi.Uint32> _api2wire_box_autoadd_u32(int raw) {
|
|
|
|
return inner.new_box_autoadd_u32(raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ffi.Pointer<wire_VeilidConfig> _api2wire_box_autoadd_veilid_config(VeilidConfig raw) {
|
|
|
|
final ptr = inner.new_box_autoadd_veilid_config();
|
|
|
|
_api_fill_to_wire_veilid_config(raw, ptr.ref);
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ffi.Pointer<wire_uint_8_list> _api2wire_opt_String(String? raw) {
|
|
|
|
return raw == null ? ffi.nullptr : _api2wire_String(raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ffi.Pointer<ffi.Uint32> _api2wire_opt_box_autoadd_u32(int? raw) {
|
|
|
|
return raw == null ? ffi.nullptr : _api2wire_box_autoadd_u32(raw);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int _api2wire_u32(int raw) {
|
|
|
|
return raw;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int _api2wire_u8(int raw) {
|
|
|
|
return raw;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ffi.Pointer<wire_uint_8_list> _api2wire_uint_8_list(Uint8List raw) {
|
|
|
|
final ans = inner.new_uint_8_list(raw.length);
|
|
|
|
ans.ref.ptr.asTypedList(raw.length).setAll(0, raw);
|
|
|
|
return ans;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Section: api_fill_to_wire
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void _api_fill_to_wire_box_autoadd_veilid_config(VeilidConfig apiObj, ffi.Pointer<wire_VeilidConfig> wireObj) {
|
|
|
|
_api_fill_to_wire_veilid_config(apiObj, wireObj.ref);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void _api_fill_to_wire_veilid_config(VeilidConfig apiObj, wire_VeilidConfig wireObj) {
|
|
|
|
wireObj.program_name = _api2wire_String(apiObj.programName);
|
|
|
|
wireObj.veilid_namespace = _api2wire_String(apiObj.veilidNamespace);
|
|
|
|
wireObj.capabilities__protocol_udp = _api2wire_bool(apiObj.capabilitiesProtocolUdp);
|
|
|
|
wireObj.capabilities__protocol_connect_tcp = _api2wire_bool(apiObj.capabilitiesProtocolConnectTcp);
|
|
|
|
wireObj.capabilities__protocol_accept_tcp = _api2wire_bool(apiObj.capabilitiesProtocolAcceptTcp);
|
|
|
|
wireObj.capabilities__protocol_connect_ws = _api2wire_bool(apiObj.capabilitiesProtocolConnectWs);
|
|
|
|
wireObj.capabilities__protocol_accept_ws = _api2wire_bool(apiObj.capabilitiesProtocolAcceptWs);
|
|
|
|
wireObj.capabilities__protocol_connect_wss = _api2wire_bool(apiObj.capabilitiesProtocolConnectWss);
|
|
|
|
wireObj.capabilities__protocol_accept_wss = _api2wire_bool(apiObj.capabilitiesProtocolAcceptWss);
|
|
|
|
wireObj.protected_store__allow_insecure_fallback = _api2wire_bool(apiObj.protectedStoreAllowInsecureFallback);
|
|
|
|
wireObj.protected_store__always_use_insecure_storage = _api2wire_bool(apiObj.protectedStoreAlwaysUseInsecureStorage);
|
|
|
|
wireObj.protected_store__insecure_fallback_directory = _api2wire_String(apiObj.protectedStoreInsecureFallbackDirectory);
|
|
|
|
wireObj.protected_store__delete = _api2wire_bool(apiObj.protectedStoreDelete);
|
|
|
|
wireObj.table_store__directory = _api2wire_String(apiObj.tableStoreDirectory);
|
|
|
|
wireObj.table_store__delete = _api2wire_bool(apiObj.tableStoreDelete);
|
|
|
|
wireObj.block_store__directory = _api2wire_String(apiObj.blockStoreDirectory);
|
|
|
|
wireObj.block_store__delete = _api2wire_bool(apiObj.blockStoreDelete);
|
|
|
|
wireObj.network__max_connections = _api2wire_u32(apiObj.networkMaxConnections);
|
|
|
|
wireObj.network__connection_initial_timeout_ms = _api2wire_u32(apiObj.networkConnectionInitialTimeoutMs);
|
|
|
|
wireObj.network__node_id = _api2wire_String(apiObj.networkNodeId);
|
|
|
|
wireObj.network__node_id_secret = _api2wire_String(apiObj.networkNodeIdSecret);
|
|
|
|
wireObj.network__bootstrap = _api2wire_StringList(apiObj.networkBootstrap);
|
|
|
|
wireObj.network__upnp = _api2wire_bool(apiObj.networkUpnp);
|
|
|
|
wireObj.network__natpmp = _api2wire_bool(apiObj.networkNatpmp);
|
|
|
|
wireObj.network__enable_local_peer_scope = _api2wire_bool(apiObj.networkEnableLocalPeerScope);
|
|
|
|
wireObj.network__restricted_nat_retries = _api2wire_u32(apiObj.networkRestrictedNatRetries);
|
|
|
|
wireObj.network__rpc__concurrency = _api2wire_u32(apiObj.networkRpcConcurrency);
|
|
|
|
wireObj.network__rpc__queue_size = _api2wire_u32(apiObj.networkRpcQueueSize);
|
|
|
|
wireObj.network__rpc__max_timestamp_behind_ms = _api2wire_opt_box_autoadd_u32(apiObj.networkRpcMaxTimestampBehindMs);
|
|
|
|
wireObj.network__rpc__max_timestamp_ahead_ms = _api2wire_opt_box_autoadd_u32(apiObj.networkRpcMaxTimestampAheadMs);
|
|
|
|
wireObj.network__rpc__timeout_ms = _api2wire_u32(apiObj.networkRpcTimeoutMs);
|
|
|
|
wireObj.network__rpc__max_route_hop_count = _api2wire_u8(apiObj.networkRpcMaxRouteHopCount);
|
|
|
|
wireObj.network__dht__resolve_node_timeout_ms = _api2wire_opt_box_autoadd_u32(apiObj.networkDhtResolveNodeTimeoutMs);
|
|
|
|
wireObj.network__dht__resolve_node_count = _api2wire_u32(apiObj.networkDhtResolveNodeCount);
|
|
|
|
wireObj.network__dht__resolve_node_fanout = _api2wire_u32(apiObj.networkDhtResolveNodeFanout);
|
|
|
|
wireObj.network__dht__max_find_node_count = _api2wire_u32(apiObj.networkDhtMaxFindNodeCount);
|
|
|
|
wireObj.network__dht__get_value_timeout_ms = _api2wire_opt_box_autoadd_u32(apiObj.networkDhtGetValueTimeoutMs);
|
|
|
|
wireObj.network__dht__get_value_count = _api2wire_u32(apiObj.networkDhtGetValueCount);
|
|
|
|
wireObj.network__dht__get_value_fanout = _api2wire_u32(apiObj.networkDhtGetValueFanout);
|
|
|
|
wireObj.network__dht__set_value_timeout_ms = _api2wire_opt_box_autoadd_u32(apiObj.networkDhtSetValueTimeoutMs);
|
|
|
|
wireObj.network__dht__set_value_count = _api2wire_u32(apiObj.networkDhtSetValueCount);
|
|
|
|
wireObj.network__dht__set_value_fanout = _api2wire_u32(apiObj.networkDhtSetValueFanout);
|
|
|
|
wireObj.network__dht__min_peer_count = _api2wire_u32(apiObj.networkDhtMinPeerCount);
|
|
|
|
wireObj.network__dht__min_peer_refresh_time_ms = _api2wire_u32(apiObj.networkDhtMinPeerRefreshTimeMs);
|
|
|
|
wireObj.network__dht__validate_dial_info_receipt_time_ms = _api2wire_u32(apiObj.networkDhtValidateDialInfoReceiptTimeMs);
|
|
|
|
wireObj.network__protocol__udp__enabled = _api2wire_bool(apiObj.networkProtocolUdpEnabled);
|
|
|
|
wireObj.network__protocol__udp__socket_pool_size = _api2wire_u32(apiObj.networkProtocolUdpSocketPoolSize);
|
|
|
|
wireObj.network__protocol__udp__listen_address = _api2wire_String(apiObj.networkProtocolUdpListenAddress);
|
|
|
|
wireObj.network__protocol__udp__public_address = _api2wire_opt_String(apiObj.networkProtocolUdpPublicAddress);
|
|
|
|
wireObj.network__protocol__tcp__connect = _api2wire_bool(apiObj.networkProtocolTcpConnect);
|
|
|
|
wireObj.network__protocol__tcp__listen = _api2wire_bool(apiObj.networkProtocolTcpListen);
|
|
|
|
wireObj.network__protocol__tcp__max_connections = _api2wire_u32(apiObj.networkProtocolTcpMaxConnections);
|
|
|
|
wireObj.network__protocol__tcp__listen_address = _api2wire_String(apiObj.networkProtocolTcpListenAddress);
|
|
|
|
wireObj.network__protocol__tcp__public_address = _api2wire_opt_String(apiObj.networkProtocolTcpPublicAddress);
|
|
|
|
wireObj.network__protocol__ws__connect = _api2wire_bool(apiObj.networkProtocolWsConnect);
|
|
|
|
wireObj.network__protocol__ws__listen = _api2wire_bool(apiObj.networkProtocolWsListen);
|
|
|
|
wireObj.network__protocol__ws__max_connections = _api2wire_u32(apiObj.networkProtocolWsMaxConnections);
|
|
|
|
wireObj.network__protocol__ws__listen_address = _api2wire_String(apiObj.networkProtocolWsListenAddress);
|
|
|
|
wireObj.network__protocol__ws__path = _api2wire_String(apiObj.networkProtocolWsPath);
|
|
|
|
wireObj.network__protocol__ws__url = _api2wire_opt_String(apiObj.networkProtocolWsUrl);
|
|
|
|
wireObj.network__protocol__wss__connect = _api2wire_bool(apiObj.networkProtocolWssConnect);
|
|
|
|
wireObj.network__protocol__wss__max_connections = _api2wire_u32(apiObj.networkProtocolWssMaxConnections);
|
|
|
|
wireObj.network__leases__max_server_signal_leases = _api2wire_u32(apiObj.networkLeasesMaxServerSignalLeases);
|
|
|
|
wireObj.network__leases__max_server_relay_leases = _api2wire_u32(apiObj.networkLeasesMaxServerRelayLeases);
|
|
|
|
wireObj.network__leases__max_client_signal_leases = _api2wire_u32(apiObj.networkLeasesMaxClientSignalLeases);
|
|
|
|
wireObj.network__leases__max_client_relay_leases = _api2wire_u32(apiObj.networkLeasesMaxClientRelayLeases);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Section: wire2api
|
|
|
|
String _wire2api_String(dynamic raw) {
|
|
|
|
return raw as String;
|
|
|
|
}
|
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
AttachmentState _wire2api_attachment_state(dynamic raw) {
|
2022-01-31 10:11:18 -05:00
|
|
|
return AttachmentState.values[raw];
|
|
|
|
}
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
int _wire2api_u32(dynamic raw) {
|
2022-01-31 10:11:18 -05:00
|
|
|
return raw as int;
|
|
|
|
}
|
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
|
|
|
|
int _wire2api_u8(dynamic raw) {
|
2022-01-31 10:11:18 -05:00
|
|
|
return raw as int;
|
|
|
|
}
|
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
|
|
|
|
Uint8List _wire2api_uint_8_list(dynamic raw) {
|
2022-01-31 10:11:18 -05:00
|
|
|
return raw as Uint8List;
|
|
|
|
}
|
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
void _wire2api_unit(dynamic raw) {
|
2022-01-31 10:11:18 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
VeilidLogLevel _wire2api_veilid_log_level(dynamic raw) {
|
|
|
|
return VeilidLogLevel.values[raw];
|
|
|
|
}
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
VeilidState _wire2api_veilid_state(dynamic raw) {
|
2022-01-31 10:11:18 -05:00
|
|
|
final arr = raw as List<dynamic>;
|
|
|
|
if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}');
|
|
|
|
return VeilidState(attachment: _wire2api_attachment_state(arr[0]),);
|
|
|
|
}
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
VeilidUpdate _wire2api_veilid_update(dynamic raw) {
|
2022-01-31 10:11:18 -05:00
|
|
|
switch (raw[0]) {
|
|
|
|
case 0: return Log(_wire2api_veilid_log_level(raw[1]),_wire2api_String(raw[2]),);
|
|
|
|
case 1: return Attachment(_wire2api_attachment_state(raw[1]),);
|
|
|
|
default: throw Exception("unreachable");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
VeilidVersion _wire2api_veilid_version(dynamic raw) {
|
2022-01-31 10:11:18 -05:00
|
|
|
final arr = raw as List<dynamic>;
|
|
|
|
if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}');
|
|
|
|
return VeilidVersion(major: _wire2api_u32(arr[0]),
|
|
|
|
minor: _wire2api_u32(arr[1]),
|
|
|
|
patch: _wire2api_u32(arr[2]),);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names
|
|
|
|
|
|
|
|
// AUTO GENERATED FILE, DO NOT EDIT.
|
|
|
|
//
|
|
|
|
// Generated by `package:ffigen`.
|
|
|
|
|
|
|
|
/// generated by flutter_rust_bridge
|
|
|
|
class VeilidFlutterWire implements FlutterRustBridgeWireBase {
|
|
|
|
/// Holds the symbol lookup function.
|
|
|
|
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
|
|
|
_lookup;
|
|
|
|
|
|
|
|
/// The symbols are looked up in [dynamicLibrary].
|
|
|
|
VeilidFlutterWire(ffi.DynamicLibrary dynamicLibrary)
|
|
|
|
: _lookup = dynamicLibrary.lookup;
|
|
|
|
|
|
|
|
/// The symbols are looked up with [lookup].
|
|
|
|
VeilidFlutterWire.fromLookup(
|
|
|
|
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
|
|
|
lookup)
|
|
|
|
: _lookup = lookup;
|
|
|
|
|
|
|
|
void wire_startup_veilid_core(
|
|
|
|
int port_,
|
|
|
|
ffi.Pointer<wire_VeilidConfig> config,
|
|
|
|
) {
|
|
|
|
return _wire_startup_veilid_core(
|
|
|
|
port_,
|
|
|
|
config,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _wire_startup_veilid_corePtr = _lookup<
|
|
|
|
ffi.NativeFunction<
|
|
|
|
ffi.Void Function(ffi.Int64,
|
|
|
|
ffi.Pointer<wire_VeilidConfig>)>>('wire_startup_veilid_core');
|
|
|
|
late final _wire_startup_veilid_core = _wire_startup_veilid_corePtr
|
|
|
|
.asFunction<void Function(int, ffi.Pointer<wire_VeilidConfig>)>();
|
|
|
|
|
|
|
|
void wire_get_veilid_state(
|
|
|
|
int port_,
|
|
|
|
) {
|
|
|
|
return _wire_get_veilid_state(
|
|
|
|
port_,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _wire_get_veilid_statePtr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int64)>>(
|
|
|
|
'wire_get_veilid_state');
|
|
|
|
late final _wire_get_veilid_state =
|
|
|
|
_wire_get_veilid_statePtr.asFunction<void Function(int)>();
|
|
|
|
|
|
|
|
void wire_shutdown_veilid_core(
|
|
|
|
int port_,
|
|
|
|
) {
|
|
|
|
return _wire_shutdown_veilid_core(
|
|
|
|
port_,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _wire_shutdown_veilid_corePtr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int64)>>(
|
|
|
|
'wire_shutdown_veilid_core');
|
|
|
|
late final _wire_shutdown_veilid_core =
|
|
|
|
_wire_shutdown_veilid_corePtr.asFunction<void Function(int)>();
|
|
|
|
|
2022-01-27 22:02:16 -05:00
|
|
|
void wire_veilid_version_string(
|
|
|
|
int port_,
|
|
|
|
) {
|
|
|
|
return _wire_veilid_version_string(
|
|
|
|
port_,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _wire_veilid_version_stringPtr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int64)>>(
|
|
|
|
'wire_veilid_version_string');
|
|
|
|
late final _wire_veilid_version_string =
|
|
|
|
_wire_veilid_version_stringPtr.asFunction<void Function(int)>();
|
|
|
|
|
|
|
|
void wire_veilid_version(
|
|
|
|
int port_,
|
|
|
|
) {
|
|
|
|
return _wire_veilid_version(
|
|
|
|
port_,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _wire_veilid_versionPtr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int64)>>(
|
|
|
|
'wire_veilid_version');
|
|
|
|
late final _wire_veilid_version =
|
|
|
|
_wire_veilid_versionPtr.asFunction<void Function(int)>();
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
ffi.Pointer<wire_StringList> new_StringList(
|
|
|
|
int len,
|
|
|
|
) {
|
|
|
|
return _new_StringList(
|
|
|
|
len,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _new_StringListPtr = _lookup<
|
|
|
|
ffi.NativeFunction<ffi.Pointer<wire_StringList> Function(ffi.Int32)>>(
|
|
|
|
'new_StringList');
|
|
|
|
late final _new_StringList = _new_StringListPtr
|
|
|
|
.asFunction<ffi.Pointer<wire_StringList> Function(int)>();
|
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
ffi.Pointer<ffi.Uint32> new_box_autoadd_u32(
|
2022-01-20 22:32:22 -05:00
|
|
|
int value,
|
|
|
|
) {
|
2022-01-27 09:53:01 -05:00
|
|
|
return _new_box_autoadd_u32(
|
2022-01-20 22:32:22 -05:00
|
|
|
value,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
late final _new_box_autoadd_u32Ptr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Pointer<ffi.Uint32> Function(ffi.Uint32)>>(
|
|
|
|
'new_box_autoadd_u32');
|
|
|
|
late final _new_box_autoadd_u32 = _new_box_autoadd_u32Ptr
|
|
|
|
.asFunction<ffi.Pointer<ffi.Uint32> Function(int)>();
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
ffi.Pointer<wire_VeilidConfig> new_box_autoadd_veilid_config() {
|
|
|
|
return _new_box_autoadd_veilid_config();
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _new_box_autoadd_veilid_configPtr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Pointer<wire_VeilidConfig> Function()>>(
|
|
|
|
'new_box_autoadd_veilid_config');
|
|
|
|
late final _new_box_autoadd_veilid_config = _new_box_autoadd_veilid_configPtr
|
|
|
|
.asFunction<ffi.Pointer<wire_VeilidConfig> Function()>();
|
|
|
|
|
|
|
|
ffi.Pointer<wire_uint_8_list> new_uint_8_list(
|
|
|
|
int len,
|
|
|
|
) {
|
|
|
|
return _new_uint_8_list(
|
|
|
|
len,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _new_uint_8_listPtr = _lookup<
|
|
|
|
ffi.NativeFunction<
|
|
|
|
ffi.Pointer<wire_uint_8_list> Function(
|
|
|
|
ffi.Int32)>>('new_uint_8_list');
|
|
|
|
late final _new_uint_8_list = _new_uint_8_listPtr
|
|
|
|
.asFunction<ffi.Pointer<wire_uint_8_list> Function(int)>();
|
|
|
|
|
|
|
|
void free_WireSyncReturnStruct(
|
|
|
|
WireSyncReturnStruct val,
|
|
|
|
) {
|
|
|
|
return _free_WireSyncReturnStruct(
|
|
|
|
val,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _free_WireSyncReturnStructPtr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Void Function(WireSyncReturnStruct)>>(
|
|
|
|
'free_WireSyncReturnStruct');
|
|
|
|
late final _free_WireSyncReturnStruct = _free_WireSyncReturnStructPtr
|
|
|
|
.asFunction<void Function(WireSyncReturnStruct)>();
|
|
|
|
|
|
|
|
void store_dart_post_cobject(
|
|
|
|
DartPostCObjectFnType ptr,
|
|
|
|
) {
|
|
|
|
return _store_dart_post_cobject(
|
|
|
|
ptr,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
late final _store_dart_post_cobjectPtr =
|
|
|
|
_lookup<ffi.NativeFunction<ffi.Void Function(DartPostCObjectFnType)>>(
|
|
|
|
'store_dart_post_cobject');
|
|
|
|
late final _store_dart_post_cobject = _store_dart_post_cobjectPtr
|
|
|
|
.asFunction<void Function(DartPostCObjectFnType)>();
|
|
|
|
}
|
|
|
|
|
|
|
|
class wire_uint_8_list extends ffi.Struct {
|
|
|
|
external ffi.Pointer<ffi.Uint8> ptr;
|
|
|
|
|
|
|
|
@ffi.Int32()
|
|
|
|
external int len;
|
|
|
|
}
|
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
class wire_StringList extends ffi.Struct {
|
|
|
|
external ffi.Pointer<ffi.Pointer<wire_uint_8_list>> ptr;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Int32()
|
|
|
|
external int len;
|
|
|
|
}
|
|
|
|
|
|
|
|
class wire_VeilidConfig extends ffi.Struct {
|
|
|
|
external ffi.Pointer<wire_uint_8_list> program_name;
|
|
|
|
|
2022-01-29 13:23:10 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> veilid_namespace;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int capabilities__protocol_udp;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int capabilities__protocol_connect_tcp;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int capabilities__protocol_accept_tcp;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int capabilities__protocol_connect_ws;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int capabilities__protocol_accept_ws;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int capabilities__protocol_connect_wss;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int capabilities__protocol_accept_wss;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint8()
|
|
|
|
external int protected_store__allow_insecure_fallback;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int protected_store__always_use_insecure_storage;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list>
|
|
|
|
protected_store__insecure_fallback_directory;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int protected_store__delete;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> table_store__directory;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int table_store__delete;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> block_store__directory;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint8()
|
|
|
|
external int block_store__delete;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__max_connections;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__connection_initial_timeout_ms;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> network__node_id;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> network__node_id_secret;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_StringList> network__bootstrap;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__upnp;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint8()
|
|
|
|
external int network__natpmp;
|
|
|
|
|
|
|
|
@ffi.Uint8()
|
|
|
|
external int network__enable_local_peer_scope;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__restricted_nat_retries;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__rpc__concurrency;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__rpc__queue_size;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<ffi.Uint32> network__rpc__max_timestamp_behind_ms;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<ffi.Uint32> network__rpc__max_timestamp_ahead_ms;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__rpc__timeout_ms;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint8()
|
|
|
|
external int network__rpc__max_route_hop_count;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<ffi.Uint32> network__dht__resolve_node_timeout_ms;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__resolve_node_count;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__resolve_node_fanout;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__max_find_node_count;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<ffi.Uint32> network__dht__get_value_timeout_ms;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__get_value_count;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__get_value_fanout;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<ffi.Uint32> network__dht__set_value_timeout_ms;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__set_value_count;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__set_value_fanout;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__min_peer_count;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__min_peer_refresh_time_ms;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__dht__validate_dial_info_receipt_time_ms;
|
|
|
|
|
|
|
|
@ffi.Uint8()
|
|
|
|
external int network__protocol__udp__enabled;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__protocol__udp__socket_pool_size;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> network__protocol__udp__listen_address;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> network__protocol__udp__public_address;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint8()
|
|
|
|
external int network__protocol__tcp__connect;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint8()
|
|
|
|
external int network__protocol__tcp__listen;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint32()
|
|
|
|
external int network__protocol__tcp__max_connections;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> network__protocol__tcp__listen_address;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> network__protocol__tcp__public_address;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__protocol__ws__connect;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint8()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__protocol__ws__listen;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
|
|
|
@ffi.Uint32()
|
2022-01-27 09:53:01 -05:00
|
|
|
external int network__protocol__ws__max_connections;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> network__protocol__ws__listen_address;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> network__protocol__ws__path;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
external ffi.Pointer<wire_uint_8_list> network__protocol__ws__url;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint8()
|
|
|
|
external int network__protocol__wss__connect;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint32()
|
|
|
|
external int network__protocol__wss__max_connections;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint32()
|
|
|
|
external int network__leases__max_server_signal_leases;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint32()
|
|
|
|
external int network__leases__max_server_relay_leases;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint32()
|
|
|
|
external int network__leases__max_client_signal_leases;
|
2022-01-20 22:32:22 -05:00
|
|
|
|
2022-01-27 09:53:01 -05:00
|
|
|
@ffi.Uint32()
|
|
|
|
external int network__leases__max_client_relay_leases;
|
2022-01-20 22:32:22 -05:00
|
|
|
}
|
|
|
|
|
2022-01-31 10:11:18 -05:00
|
|
|
|
|
|
|
|
2022-01-20 22:32:22 -05:00
|
|
|
typedef DartPostCObjectFnType = ffi.Pointer<
|
|
|
|
ffi.NativeFunction<ffi.Uint8 Function(DartPort, ffi.Pointer<ffi.Void>)>>;
|
|
|
|
typedef DartPort = ffi.Int64;
|