mirror of
https://github.com/StarCitizenToolBox/app.git
synced 2026-02-06 15:10:20 +00:00
feat: unp4k data forge support
This commit is contained in:
@@ -38,6 +38,80 @@ Future<void> p4KExtractToDisk({
|
||||
/// 关闭 P4K 读取器
|
||||
Future<void> p4KClose() => RustLib.instance.api.crateApiUnp4KApiP4KClose();
|
||||
|
||||
/// 检查数据是否为 DataForge/DCB 格式
|
||||
Future<bool> dcbIsDataforge({required List<int> data}) =>
|
||||
RustLib.instance.api.crateApiUnp4KApiDcbIsDataforge(data: data);
|
||||
|
||||
/// 从内存数据打开 DCB 文件
|
||||
Future<void> dcbOpen({required List<int> data}) =>
|
||||
RustLib.instance.api.crateApiUnp4KApiDcbOpen(data: data);
|
||||
|
||||
/// 获取 DCB 记录数量
|
||||
Future<BigInt> dcbGetRecordCount() =>
|
||||
RustLib.instance.api.crateApiUnp4KApiDcbGetRecordCount();
|
||||
|
||||
/// 获取所有 DCB 记录路径列表
|
||||
Future<List<DcbRecordItem>> dcbGetRecordList() =>
|
||||
RustLib.instance.api.crateApiUnp4KApiDcbGetRecordList();
|
||||
|
||||
/// 根据路径获取单条记录的 XML
|
||||
Future<String> dcbRecordToXml({required String path}) =>
|
||||
RustLib.instance.api.crateApiUnp4KApiDcbRecordToXml(path: path);
|
||||
|
||||
/// 根据索引获取单条记录的 XML
|
||||
Future<String> dcbRecordToXmlByIndex({required BigInt index}) =>
|
||||
RustLib.instance.api.crateApiUnp4KApiDcbRecordToXmlByIndex(index: index);
|
||||
|
||||
/// 全文搜索 DCB 记录
|
||||
Future<List<DcbSearchResult>> dcbSearchAll({
|
||||
required String query,
|
||||
required BigInt maxResults,
|
||||
}) => RustLib.instance.api.crateApiUnp4KApiDcbSearchAll(
|
||||
query: query,
|
||||
maxResults: maxResults,
|
||||
);
|
||||
|
||||
/// 导出 DCB 到磁盘
|
||||
/// merge: true = 合并为单个 XML,false = 分离为多个 XML 文件
|
||||
Future<void> dcbExportToDisk({
|
||||
required String outputPath,
|
||||
required String dcbPath,
|
||||
required bool merge,
|
||||
}) => RustLib.instance.api.crateApiUnp4KApiDcbExportToDisk(
|
||||
outputPath: outputPath,
|
||||
dcbPath: dcbPath,
|
||||
merge: merge,
|
||||
);
|
||||
|
||||
/// 关闭 DCB 读取器
|
||||
Future<void> dcbClose() => RustLib.instance.api.crateApiUnp4KApiDcbClose();
|
||||
|
||||
/// DCB 记录项信息
|
||||
@freezed
|
||||
sealed class DcbRecordItem with _$DcbRecordItem {
|
||||
const factory DcbRecordItem({required String path, required BigInt index}) =
|
||||
_DcbRecordItem;
|
||||
}
|
||||
|
||||
@freezed
|
||||
sealed class DcbSearchMatch with _$DcbSearchMatch {
|
||||
const factory DcbSearchMatch({
|
||||
required BigInt lineNumber,
|
||||
required String lineContent,
|
||||
}) = _DcbSearchMatch;
|
||||
}
|
||||
|
||||
/// 全文搜索 DCB 记录
|
||||
/// 返回匹配的记录路径和预览摘要
|
||||
@freezed
|
||||
sealed class DcbSearchResult with _$DcbSearchResult {
|
||||
const factory DcbSearchResult({
|
||||
required String path,
|
||||
required BigInt index,
|
||||
required List<DcbSearchMatch> matches,
|
||||
}) = _DcbSearchResult;
|
||||
}
|
||||
|
||||
/// P4K 文件项信息
|
||||
@freezed
|
||||
sealed class P4kFileItem with _$P4kFileItem {
|
||||
|
||||
@@ -11,6 +11,777 @@ part of 'unp4k_api.dart';
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$DcbRecordItem {
|
||||
|
||||
String get path; BigInt get index;
|
||||
/// Create a copy of DcbRecordItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$DcbRecordItemCopyWith<DcbRecordItem> get copyWith => _$DcbRecordItemCopyWithImpl<DcbRecordItem>(this as DcbRecordItem, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is DcbRecordItem&&(identical(other.path, path) || other.path == path)&&(identical(other.index, index) || other.index == index));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,path,index);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DcbRecordItem(path: $path, index: $index)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $DcbRecordItemCopyWith<$Res> {
|
||||
factory $DcbRecordItemCopyWith(DcbRecordItem value, $Res Function(DcbRecordItem) _then) = _$DcbRecordItemCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String path, BigInt index
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$DcbRecordItemCopyWithImpl<$Res>
|
||||
implements $DcbRecordItemCopyWith<$Res> {
|
||||
_$DcbRecordItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final DcbRecordItem _self;
|
||||
final $Res Function(DcbRecordItem) _then;
|
||||
|
||||
/// Create a copy of DcbRecordItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? path = null,Object? index = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||
as String,index: null == index ? _self.index : index // ignore: cast_nullable_to_non_nullable
|
||||
as BigInt,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [DcbRecordItem].
|
||||
extension DcbRecordItemPatterns on DcbRecordItem {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DcbRecordItem value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbRecordItem() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DcbRecordItem value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbRecordItem():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DcbRecordItem value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbRecordItem() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String path, BigInt index)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbRecordItem() when $default != null:
|
||||
return $default(_that.path,_that.index);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String path, BigInt index) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbRecordItem():
|
||||
return $default(_that.path,_that.index);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String path, BigInt index)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbRecordItem() when $default != null:
|
||||
return $default(_that.path,_that.index);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _DcbRecordItem implements DcbRecordItem {
|
||||
const _DcbRecordItem({required this.path, required this.index});
|
||||
|
||||
|
||||
@override final String path;
|
||||
@override final BigInt index;
|
||||
|
||||
/// Create a copy of DcbRecordItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$DcbRecordItemCopyWith<_DcbRecordItem> get copyWith => __$DcbRecordItemCopyWithImpl<_DcbRecordItem>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DcbRecordItem&&(identical(other.path, path) || other.path == path)&&(identical(other.index, index) || other.index == index));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,path,index);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DcbRecordItem(path: $path, index: $index)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$DcbRecordItemCopyWith<$Res> implements $DcbRecordItemCopyWith<$Res> {
|
||||
factory _$DcbRecordItemCopyWith(_DcbRecordItem value, $Res Function(_DcbRecordItem) _then) = __$DcbRecordItemCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String path, BigInt index
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$DcbRecordItemCopyWithImpl<$Res>
|
||||
implements _$DcbRecordItemCopyWith<$Res> {
|
||||
__$DcbRecordItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _DcbRecordItem _self;
|
||||
final $Res Function(_DcbRecordItem) _then;
|
||||
|
||||
/// Create a copy of DcbRecordItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? path = null,Object? index = null,}) {
|
||||
return _then(_DcbRecordItem(
|
||||
path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||
as String,index: null == index ? _self.index : index // ignore: cast_nullable_to_non_nullable
|
||||
as BigInt,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$DcbSearchMatch {
|
||||
|
||||
BigInt get lineNumber; String get lineContent;
|
||||
/// Create a copy of DcbSearchMatch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$DcbSearchMatchCopyWith<DcbSearchMatch> get copyWith => _$DcbSearchMatchCopyWithImpl<DcbSearchMatch>(this as DcbSearchMatch, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is DcbSearchMatch&&(identical(other.lineNumber, lineNumber) || other.lineNumber == lineNumber)&&(identical(other.lineContent, lineContent) || other.lineContent == lineContent));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,lineNumber,lineContent);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DcbSearchMatch(lineNumber: $lineNumber, lineContent: $lineContent)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $DcbSearchMatchCopyWith<$Res> {
|
||||
factory $DcbSearchMatchCopyWith(DcbSearchMatch value, $Res Function(DcbSearchMatch) _then) = _$DcbSearchMatchCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
BigInt lineNumber, String lineContent
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$DcbSearchMatchCopyWithImpl<$Res>
|
||||
implements $DcbSearchMatchCopyWith<$Res> {
|
||||
_$DcbSearchMatchCopyWithImpl(this._self, this._then);
|
||||
|
||||
final DcbSearchMatch _self;
|
||||
final $Res Function(DcbSearchMatch) _then;
|
||||
|
||||
/// Create a copy of DcbSearchMatch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? lineNumber = null,Object? lineContent = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
lineNumber: null == lineNumber ? _self.lineNumber : lineNumber // ignore: cast_nullable_to_non_nullable
|
||||
as BigInt,lineContent: null == lineContent ? _self.lineContent : lineContent // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [DcbSearchMatch].
|
||||
extension DcbSearchMatchPatterns on DcbSearchMatch {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DcbSearchMatch value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchMatch() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DcbSearchMatch value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchMatch():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DcbSearchMatch value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchMatch() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( BigInt lineNumber, String lineContent)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchMatch() when $default != null:
|
||||
return $default(_that.lineNumber,_that.lineContent);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( BigInt lineNumber, String lineContent) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchMatch():
|
||||
return $default(_that.lineNumber,_that.lineContent);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( BigInt lineNumber, String lineContent)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchMatch() when $default != null:
|
||||
return $default(_that.lineNumber,_that.lineContent);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _DcbSearchMatch implements DcbSearchMatch {
|
||||
const _DcbSearchMatch({required this.lineNumber, required this.lineContent});
|
||||
|
||||
|
||||
@override final BigInt lineNumber;
|
||||
@override final String lineContent;
|
||||
|
||||
/// Create a copy of DcbSearchMatch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$DcbSearchMatchCopyWith<_DcbSearchMatch> get copyWith => __$DcbSearchMatchCopyWithImpl<_DcbSearchMatch>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DcbSearchMatch&&(identical(other.lineNumber, lineNumber) || other.lineNumber == lineNumber)&&(identical(other.lineContent, lineContent) || other.lineContent == lineContent));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,lineNumber,lineContent);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DcbSearchMatch(lineNumber: $lineNumber, lineContent: $lineContent)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$DcbSearchMatchCopyWith<$Res> implements $DcbSearchMatchCopyWith<$Res> {
|
||||
factory _$DcbSearchMatchCopyWith(_DcbSearchMatch value, $Res Function(_DcbSearchMatch) _then) = __$DcbSearchMatchCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
BigInt lineNumber, String lineContent
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$DcbSearchMatchCopyWithImpl<$Res>
|
||||
implements _$DcbSearchMatchCopyWith<$Res> {
|
||||
__$DcbSearchMatchCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _DcbSearchMatch _self;
|
||||
final $Res Function(_DcbSearchMatch) _then;
|
||||
|
||||
/// Create a copy of DcbSearchMatch
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? lineNumber = null,Object? lineContent = null,}) {
|
||||
return _then(_DcbSearchMatch(
|
||||
lineNumber: null == lineNumber ? _self.lineNumber : lineNumber // ignore: cast_nullable_to_non_nullable
|
||||
as BigInt,lineContent: null == lineContent ? _self.lineContent : lineContent // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$DcbSearchResult {
|
||||
|
||||
String get path; BigInt get index; List<DcbSearchMatch> get matches;
|
||||
/// Create a copy of DcbSearchResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$DcbSearchResultCopyWith<DcbSearchResult> get copyWith => _$DcbSearchResultCopyWithImpl<DcbSearchResult>(this as DcbSearchResult, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is DcbSearchResult&&(identical(other.path, path) || other.path == path)&&(identical(other.index, index) || other.index == index)&&const DeepCollectionEquality().equals(other.matches, matches));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,path,index,const DeepCollectionEquality().hash(matches));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DcbSearchResult(path: $path, index: $index, matches: $matches)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $DcbSearchResultCopyWith<$Res> {
|
||||
factory $DcbSearchResultCopyWith(DcbSearchResult value, $Res Function(DcbSearchResult) _then) = _$DcbSearchResultCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String path, BigInt index, List<DcbSearchMatch> matches
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$DcbSearchResultCopyWithImpl<$Res>
|
||||
implements $DcbSearchResultCopyWith<$Res> {
|
||||
_$DcbSearchResultCopyWithImpl(this._self, this._then);
|
||||
|
||||
final DcbSearchResult _self;
|
||||
final $Res Function(DcbSearchResult) _then;
|
||||
|
||||
/// Create a copy of DcbSearchResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? path = null,Object? index = null,Object? matches = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||
as String,index: null == index ? _self.index : index // ignore: cast_nullable_to_non_nullable
|
||||
as BigInt,matches: null == matches ? _self.matches : matches // ignore: cast_nullable_to_non_nullable
|
||||
as List<DcbSearchMatch>,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [DcbSearchResult].
|
||||
extension DcbSearchResultPatterns on DcbSearchResult {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DcbSearchResult value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchResult() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DcbSearchResult value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchResult():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DcbSearchResult value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchResult() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String path, BigInt index, List<DcbSearchMatch> matches)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchResult() when $default != null:
|
||||
return $default(_that.path,_that.index,_that.matches);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String path, BigInt index, List<DcbSearchMatch> matches) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchResult():
|
||||
return $default(_that.path,_that.index,_that.matches);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String path, BigInt index, List<DcbSearchMatch> matches)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _DcbSearchResult() when $default != null:
|
||||
return $default(_that.path,_that.index,_that.matches);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
|
||||
class _DcbSearchResult implements DcbSearchResult {
|
||||
const _DcbSearchResult({required this.path, required this.index, required final List<DcbSearchMatch> matches}): _matches = matches;
|
||||
|
||||
|
||||
@override final String path;
|
||||
@override final BigInt index;
|
||||
final List<DcbSearchMatch> _matches;
|
||||
@override List<DcbSearchMatch> get matches {
|
||||
if (_matches is EqualUnmodifiableListView) return _matches;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_matches);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of DcbSearchResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$DcbSearchResultCopyWith<_DcbSearchResult> get copyWith => __$DcbSearchResultCopyWithImpl<_DcbSearchResult>(this, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DcbSearchResult&&(identical(other.path, path) || other.path == path)&&(identical(other.index, index) || other.index == index)&&const DeepCollectionEquality().equals(other._matches, _matches));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,path,index,const DeepCollectionEquality().hash(_matches));
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DcbSearchResult(path: $path, index: $index, matches: $matches)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$DcbSearchResultCopyWith<$Res> implements $DcbSearchResultCopyWith<$Res> {
|
||||
factory _$DcbSearchResultCopyWith(_DcbSearchResult value, $Res Function(_DcbSearchResult) _then) = __$DcbSearchResultCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String path, BigInt index, List<DcbSearchMatch> matches
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$DcbSearchResultCopyWithImpl<$Res>
|
||||
implements _$DcbSearchResultCopyWith<$Res> {
|
||||
__$DcbSearchResultCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _DcbSearchResult _self;
|
||||
final $Res Function(_DcbSearchResult) _then;
|
||||
|
||||
/// Create a copy of DcbSearchResult
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? path = null,Object? index = null,Object? matches = null,}) {
|
||||
return _then(_DcbSearchResult(
|
||||
path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable
|
||||
as String,index: null == index ? _self.index : index // ignore: cast_nullable_to_non_nullable
|
||||
as BigInt,matches: null == matches ? _self._matches : matches // ignore: cast_nullable_to_non_nullable
|
||||
as List<DcbSearchMatch>,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$P4kFileItem {
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
|
||||
String get codegenVersion => '2.11.1';
|
||||
|
||||
@override
|
||||
int get rustContentHash => -1482626931;
|
||||
int get rustContentHash => -1903117367;
|
||||
|
||||
static const kDefaultExternalLibraryLoaderConfig =
|
||||
ExternalLibraryLoaderConfig(
|
||||
@@ -94,6 +94,31 @@ abstract class RustLibApi extends BaseApi {
|
||||
required String shortcutName,
|
||||
});
|
||||
|
||||
Future<void> crateApiUnp4KApiDcbClose();
|
||||
|
||||
Future<void> crateApiUnp4KApiDcbExportToDisk({
|
||||
required String outputPath,
|
||||
required String dcbPath,
|
||||
required bool merge,
|
||||
});
|
||||
|
||||
Future<BigInt> crateApiUnp4KApiDcbGetRecordCount();
|
||||
|
||||
Future<List<DcbRecordItem>> crateApiUnp4KApiDcbGetRecordList();
|
||||
|
||||
Future<bool> crateApiUnp4KApiDcbIsDataforge({required List<int> data});
|
||||
|
||||
Future<void> crateApiUnp4KApiDcbOpen({required List<int> data});
|
||||
|
||||
Future<String> crateApiUnp4KApiDcbRecordToXml({required String path});
|
||||
|
||||
Future<String> crateApiUnp4KApiDcbRecordToXmlByIndex({required BigInt index});
|
||||
|
||||
Future<List<DcbSearchResult>> crateApiUnp4KApiDcbSearchAll({
|
||||
required String query,
|
||||
required BigInt maxResults,
|
||||
});
|
||||
|
||||
Future<List<String>> crateApiHttpApiDnsLookupIps({required String host});
|
||||
|
||||
Future<List<String>> crateApiHttpApiDnsLookupTxt({required String host});
|
||||
@@ -464,6 +489,240 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
argNames: ["targetPath", "shortcutName"],
|
||||
);
|
||||
|
||||
@override
|
||||
Future<void> crateApiUnp4KApiDcbClose() {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
return wire.wire__crate__api__unp4k_api__dcb_close(port_);
|
||||
},
|
||||
codec: DcoCodec(
|
||||
decodeSuccessData: dco_decode_unit,
|
||||
decodeErrorData: dco_decode_AnyhowException,
|
||||
),
|
||||
constMeta: kCrateApiUnp4KApiDcbCloseConstMeta,
|
||||
argValues: [],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiUnp4KApiDcbCloseConstMeta =>
|
||||
const TaskConstMeta(debugName: "dcb_close", argNames: []);
|
||||
|
||||
@override
|
||||
Future<void> crateApiUnp4KApiDcbExportToDisk({
|
||||
required String outputPath,
|
||||
required String dcbPath,
|
||||
required bool merge,
|
||||
}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
var arg0 = cst_encode_String(outputPath);
|
||||
var arg1 = cst_encode_String(dcbPath);
|
||||
var arg2 = cst_encode_bool(merge);
|
||||
return wire.wire__crate__api__unp4k_api__dcb_export_to_disk(
|
||||
port_,
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
);
|
||||
},
|
||||
codec: DcoCodec(
|
||||
decodeSuccessData: dco_decode_unit,
|
||||
decodeErrorData: dco_decode_AnyhowException,
|
||||
),
|
||||
constMeta: kCrateApiUnp4KApiDcbExportToDiskConstMeta,
|
||||
argValues: [outputPath, dcbPath, merge],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiUnp4KApiDcbExportToDiskConstMeta =>
|
||||
const TaskConstMeta(
|
||||
debugName: "dcb_export_to_disk",
|
||||
argNames: ["outputPath", "dcbPath", "merge"],
|
||||
);
|
||||
|
||||
@override
|
||||
Future<BigInt> crateApiUnp4KApiDcbGetRecordCount() {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
return wire.wire__crate__api__unp4k_api__dcb_get_record_count(port_);
|
||||
},
|
||||
codec: DcoCodec(
|
||||
decodeSuccessData: dco_decode_usize,
|
||||
decodeErrorData: dco_decode_AnyhowException,
|
||||
),
|
||||
constMeta: kCrateApiUnp4KApiDcbGetRecordCountConstMeta,
|
||||
argValues: [],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiUnp4KApiDcbGetRecordCountConstMeta =>
|
||||
const TaskConstMeta(debugName: "dcb_get_record_count", argNames: []);
|
||||
|
||||
@override
|
||||
Future<List<DcbRecordItem>> crateApiUnp4KApiDcbGetRecordList() {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
return wire.wire__crate__api__unp4k_api__dcb_get_record_list(port_);
|
||||
},
|
||||
codec: DcoCodec(
|
||||
decodeSuccessData: dco_decode_list_dcb_record_item,
|
||||
decodeErrorData: dco_decode_AnyhowException,
|
||||
),
|
||||
constMeta: kCrateApiUnp4KApiDcbGetRecordListConstMeta,
|
||||
argValues: [],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiUnp4KApiDcbGetRecordListConstMeta =>
|
||||
const TaskConstMeta(debugName: "dcb_get_record_list", argNames: []);
|
||||
|
||||
@override
|
||||
Future<bool> crateApiUnp4KApiDcbIsDataforge({required List<int> data}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
var arg0 = cst_encode_list_prim_u_8_loose(data);
|
||||
return wire.wire__crate__api__unp4k_api__dcb_is_dataforge(
|
||||
port_,
|
||||
arg0,
|
||||
);
|
||||
},
|
||||
codec: DcoCodec(
|
||||
decodeSuccessData: dco_decode_bool,
|
||||
decodeErrorData: null,
|
||||
),
|
||||
constMeta: kCrateApiUnp4KApiDcbIsDataforgeConstMeta,
|
||||
argValues: [data],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiUnp4KApiDcbIsDataforgeConstMeta =>
|
||||
const TaskConstMeta(debugName: "dcb_is_dataforge", argNames: ["data"]);
|
||||
|
||||
@override
|
||||
Future<void> crateApiUnp4KApiDcbOpen({required List<int> data}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
var arg0 = cst_encode_list_prim_u_8_loose(data);
|
||||
return wire.wire__crate__api__unp4k_api__dcb_open(port_, arg0);
|
||||
},
|
||||
codec: DcoCodec(
|
||||
decodeSuccessData: dco_decode_unit,
|
||||
decodeErrorData: dco_decode_AnyhowException,
|
||||
),
|
||||
constMeta: kCrateApiUnp4KApiDcbOpenConstMeta,
|
||||
argValues: [data],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiUnp4KApiDcbOpenConstMeta =>
|
||||
const TaskConstMeta(debugName: "dcb_open", argNames: ["data"]);
|
||||
|
||||
@override
|
||||
Future<String> crateApiUnp4KApiDcbRecordToXml({required String path}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
var arg0 = cst_encode_String(path);
|
||||
return wire.wire__crate__api__unp4k_api__dcb_record_to_xml(
|
||||
port_,
|
||||
arg0,
|
||||
);
|
||||
},
|
||||
codec: DcoCodec(
|
||||
decodeSuccessData: dco_decode_String,
|
||||
decodeErrorData: dco_decode_AnyhowException,
|
||||
),
|
||||
constMeta: kCrateApiUnp4KApiDcbRecordToXmlConstMeta,
|
||||
argValues: [path],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiUnp4KApiDcbRecordToXmlConstMeta =>
|
||||
const TaskConstMeta(debugName: "dcb_record_to_xml", argNames: ["path"]);
|
||||
|
||||
@override
|
||||
Future<String> crateApiUnp4KApiDcbRecordToXmlByIndex({
|
||||
required BigInt index,
|
||||
}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
var arg0 = cst_encode_usize(index);
|
||||
return wire.wire__crate__api__unp4k_api__dcb_record_to_xml_by_index(
|
||||
port_,
|
||||
arg0,
|
||||
);
|
||||
},
|
||||
codec: DcoCodec(
|
||||
decodeSuccessData: dco_decode_String,
|
||||
decodeErrorData: dco_decode_AnyhowException,
|
||||
),
|
||||
constMeta: kCrateApiUnp4KApiDcbRecordToXmlByIndexConstMeta,
|
||||
argValues: [index],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiUnp4KApiDcbRecordToXmlByIndexConstMeta =>
|
||||
const TaskConstMeta(
|
||||
debugName: "dcb_record_to_xml_by_index",
|
||||
argNames: ["index"],
|
||||
);
|
||||
|
||||
@override
|
||||
Future<List<DcbSearchResult>> crateApiUnp4KApiDcbSearchAll({
|
||||
required String query,
|
||||
required BigInt maxResults,
|
||||
}) {
|
||||
return handler.executeNormal(
|
||||
NormalTask(
|
||||
callFfi: (port_) {
|
||||
var arg0 = cst_encode_String(query);
|
||||
var arg1 = cst_encode_usize(maxResults);
|
||||
return wire.wire__crate__api__unp4k_api__dcb_search_all(
|
||||
port_,
|
||||
arg0,
|
||||
arg1,
|
||||
);
|
||||
},
|
||||
codec: DcoCodec(
|
||||
decodeSuccessData: dco_decode_list_dcb_search_result,
|
||||
decodeErrorData: dco_decode_AnyhowException,
|
||||
),
|
||||
constMeta: kCrateApiUnp4KApiDcbSearchAllConstMeta,
|
||||
argValues: [query, maxResults],
|
||||
apiImpl: this,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
TaskConstMeta get kCrateApiUnp4KApiDcbSearchAllConstMeta =>
|
||||
const TaskConstMeta(
|
||||
debugName: "dcb_search_all",
|
||||
argNames: ["query", "maxResults"],
|
||||
);
|
||||
|
||||
@override
|
||||
Future<List<String>> crateApiHttpApiDnsLookupIps({required String host}) {
|
||||
return handler.executeNormal(
|
||||
@@ -2660,6 +2919,43 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
return dco_decode_web_view_configuration(raw);
|
||||
}
|
||||
|
||||
@protected
|
||||
DcbRecordItem dco_decode_dcb_record_item(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
final arr = raw as List<dynamic>;
|
||||
if (arr.length != 2)
|
||||
throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
|
||||
return DcbRecordItem(
|
||||
path: dco_decode_String(arr[0]),
|
||||
index: dco_decode_usize(arr[1]),
|
||||
);
|
||||
}
|
||||
|
||||
@protected
|
||||
DcbSearchMatch dco_decode_dcb_search_match(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
final arr = raw as List<dynamic>;
|
||||
if (arr.length != 2)
|
||||
throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
|
||||
return DcbSearchMatch(
|
||||
lineNumber: dco_decode_usize(arr[0]),
|
||||
lineContent: dco_decode_String(arr[1]),
|
||||
);
|
||||
}
|
||||
|
||||
@protected
|
||||
DcbSearchResult dco_decode_dcb_search_result(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
final arr = raw as List<dynamic>;
|
||||
if (arr.length != 3)
|
||||
throw Exception('unexpected arr length: expect 3 but see ${arr.length}');
|
||||
return DcbSearchResult(
|
||||
path: dco_decode_String(arr[0]),
|
||||
index: dco_decode_usize(arr[1]),
|
||||
matches: dco_decode_list_dcb_search_match(arr[2]),
|
||||
);
|
||||
}
|
||||
|
||||
@protected
|
||||
DownloadGlobalStat dco_decode_download_global_stat(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
@@ -2725,6 +3021,24 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
return (raw as List<dynamic>).map(dco_decode_String).toList();
|
||||
}
|
||||
|
||||
@protected
|
||||
List<DcbRecordItem> dco_decode_list_dcb_record_item(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
return (raw as List<dynamic>).map(dco_decode_dcb_record_item).toList();
|
||||
}
|
||||
|
||||
@protected
|
||||
List<DcbSearchMatch> dco_decode_list_dcb_search_match(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
return (raw as List<dynamic>).map(dco_decode_dcb_search_match).toList();
|
||||
}
|
||||
|
||||
@protected
|
||||
List<DcbSearchResult> dco_decode_list_dcb_search_result(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
return (raw as List<dynamic>).map(dco_decode_dcb_search_result).toList();
|
||||
}
|
||||
|
||||
@protected
|
||||
List<DownloadTaskInfo> dco_decode_list_download_task_info(dynamic raw) {
|
||||
// Codec=Dco (DartCObject based), see doc to use other codecs
|
||||
@@ -3083,6 +3397,38 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
return (sse_decode_web_view_configuration(deserializer));
|
||||
}
|
||||
|
||||
@protected
|
||||
DcbRecordItem sse_decode_dcb_record_item(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
var var_path = sse_decode_String(deserializer);
|
||||
var var_index = sse_decode_usize(deserializer);
|
||||
return DcbRecordItem(path: var_path, index: var_index);
|
||||
}
|
||||
|
||||
@protected
|
||||
DcbSearchMatch sse_decode_dcb_search_match(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
var var_lineNumber = sse_decode_usize(deserializer);
|
||||
var var_lineContent = sse_decode_String(deserializer);
|
||||
return DcbSearchMatch(
|
||||
lineNumber: var_lineNumber,
|
||||
lineContent: var_lineContent,
|
||||
);
|
||||
}
|
||||
|
||||
@protected
|
||||
DcbSearchResult sse_decode_dcb_search_result(SseDeserializer deserializer) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
var var_path = sse_decode_String(deserializer);
|
||||
var var_index = sse_decode_usize(deserializer);
|
||||
var var_matches = sse_decode_list_dcb_search_match(deserializer);
|
||||
return DcbSearchResult(
|
||||
path: var_path,
|
||||
index: var_index,
|
||||
matches: var_matches,
|
||||
);
|
||||
}
|
||||
|
||||
@protected
|
||||
DownloadGlobalStat sse_decode_download_global_stat(
|
||||
SseDeserializer deserializer,
|
||||
@@ -3168,6 +3514,48 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
return ans_;
|
||||
}
|
||||
|
||||
@protected
|
||||
List<DcbRecordItem> sse_decode_list_dcb_record_item(
|
||||
SseDeserializer deserializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
|
||||
var len_ = sse_decode_i_32(deserializer);
|
||||
var ans_ = <DcbRecordItem>[];
|
||||
for (var idx_ = 0; idx_ < len_; ++idx_) {
|
||||
ans_.add(sse_decode_dcb_record_item(deserializer));
|
||||
}
|
||||
return ans_;
|
||||
}
|
||||
|
||||
@protected
|
||||
List<DcbSearchMatch> sse_decode_list_dcb_search_match(
|
||||
SseDeserializer deserializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
|
||||
var len_ = sse_decode_i_32(deserializer);
|
||||
var ans_ = <DcbSearchMatch>[];
|
||||
for (var idx_ = 0; idx_ < len_; ++idx_) {
|
||||
ans_.add(sse_decode_dcb_search_match(deserializer));
|
||||
}
|
||||
return ans_;
|
||||
}
|
||||
|
||||
@protected
|
||||
List<DcbSearchResult> sse_decode_list_dcb_search_result(
|
||||
SseDeserializer deserializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
|
||||
var len_ = sse_decode_i_32(deserializer);
|
||||
var ans_ = <DcbSearchResult>[];
|
||||
for (var idx_ = 0; idx_ < len_; ++idx_) {
|
||||
ans_.add(sse_decode_dcb_search_result(deserializer));
|
||||
}
|
||||
return ans_;
|
||||
}
|
||||
|
||||
@protected
|
||||
List<DownloadTaskInfo> sse_decode_list_download_task_info(
|
||||
SseDeserializer deserializer,
|
||||
@@ -3711,6 +4099,37 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
sse_encode_web_view_configuration(self, serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_dcb_record_item(
|
||||
DcbRecordItem self,
|
||||
SseSerializer serializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_String(self.path, serializer);
|
||||
sse_encode_usize(self.index, serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_dcb_search_match(
|
||||
DcbSearchMatch self,
|
||||
SseSerializer serializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_usize(self.lineNumber, serializer);
|
||||
sse_encode_String(self.lineContent, serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_dcb_search_result(
|
||||
DcbSearchResult self,
|
||||
SseSerializer serializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_String(self.path, serializer);
|
||||
sse_encode_usize(self.index, serializer);
|
||||
sse_encode_list_dcb_search_match(self.matches, serializer);
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_download_global_stat(
|
||||
DownloadGlobalStat self,
|
||||
@@ -3778,6 +4197,42 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
|
||||
}
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_list_dcb_record_item(
|
||||
List<DcbRecordItem> self,
|
||||
SseSerializer serializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_i_32(self.length, serializer);
|
||||
for (final item in self) {
|
||||
sse_encode_dcb_record_item(item, serializer);
|
||||
}
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_list_dcb_search_match(
|
||||
List<DcbSearchMatch> self,
|
||||
SseSerializer serializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_i_32(self.length, serializer);
|
||||
for (final item in self) {
|
||||
sse_encode_dcb_search_match(item, serializer);
|
||||
}
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_list_dcb_search_result(
|
||||
List<DcbSearchResult> self,
|
||||
SseSerializer serializer,
|
||||
) {
|
||||
// Codec=Sse (Serialization based), see doc to use other codecs
|
||||
sse_encode_i_32(self.length, serializer);
|
||||
for (final item in self) {
|
||||
sse_encode_dcb_search_result(item, serializer);
|
||||
}
|
||||
}
|
||||
|
||||
@protected
|
||||
void sse_encode_list_download_task_info(
|
||||
List<DownloadTaskInfo> self,
|
||||
|
||||
@@ -61,6 +61,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
dynamic raw,
|
||||
);
|
||||
|
||||
@protected
|
||||
DcbRecordItem dco_decode_dcb_record_item(dynamic raw);
|
||||
|
||||
@protected
|
||||
DcbSearchMatch dco_decode_dcb_search_match(dynamic raw);
|
||||
|
||||
@protected
|
||||
DcbSearchResult dco_decode_dcb_search_result(dynamic raw);
|
||||
|
||||
@protected
|
||||
DownloadGlobalStat dco_decode_download_global_stat(dynamic raw);
|
||||
|
||||
@@ -82,6 +91,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
List<String> dco_decode_list_String(dynamic raw);
|
||||
|
||||
@protected
|
||||
List<DcbRecordItem> dco_decode_list_dcb_record_item(dynamic raw);
|
||||
|
||||
@protected
|
||||
List<DcbSearchMatch> dco_decode_list_dcb_search_match(dynamic raw);
|
||||
|
||||
@protected
|
||||
List<DcbSearchResult> dco_decode_list_dcb_search_result(dynamic raw);
|
||||
|
||||
@protected
|
||||
List<DownloadTaskInfo> dco_decode_list_download_task_info(dynamic raw);
|
||||
|
||||
@@ -220,6 +238,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
DcbRecordItem sse_decode_dcb_record_item(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
DcbSearchMatch sse_decode_dcb_search_match(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
DcbSearchResult sse_decode_dcb_search_result(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
DownloadGlobalStat sse_decode_download_global_stat(
|
||||
SseDeserializer deserializer,
|
||||
@@ -245,6 +272,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
List<String> sse_decode_list_String(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
List<DcbRecordItem> sse_decode_list_dcb_record_item(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
List<DcbSearchMatch> sse_decode_list_dcb_search_match(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
List<DcbSearchResult> sse_decode_list_dcb_search_result(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
List<DownloadTaskInfo> sse_decode_list_download_task_info(
|
||||
SseDeserializer deserializer,
|
||||
@@ -457,6 +499,41 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
return ans;
|
||||
}
|
||||
|
||||
@protected
|
||||
ffi.Pointer<wire_cst_list_dcb_record_item> cst_encode_list_dcb_record_item(
|
||||
List<DcbRecordItem> raw,
|
||||
) {
|
||||
// Codec=Cst (C-struct based), see doc to use other codecs
|
||||
final ans = wire.cst_new_list_dcb_record_item(raw.length);
|
||||
for (var i = 0; i < raw.length; ++i) {
|
||||
cst_api_fill_to_wire_dcb_record_item(raw[i], ans.ref.ptr[i]);
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
@protected
|
||||
ffi.Pointer<wire_cst_list_dcb_search_match> cst_encode_list_dcb_search_match(
|
||||
List<DcbSearchMatch> raw,
|
||||
) {
|
||||
// Codec=Cst (C-struct based), see doc to use other codecs
|
||||
final ans = wire.cst_new_list_dcb_search_match(raw.length);
|
||||
for (var i = 0; i < raw.length; ++i) {
|
||||
cst_api_fill_to_wire_dcb_search_match(raw[i], ans.ref.ptr[i]);
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
@protected
|
||||
ffi.Pointer<wire_cst_list_dcb_search_result>
|
||||
cst_encode_list_dcb_search_result(List<DcbSearchResult> raw) {
|
||||
// Codec=Cst (C-struct based), see doc to use other codecs
|
||||
final ans = wire.cst_new_list_dcb_search_result(raw.length);
|
||||
for (var i = 0; i < raw.length; ++i) {
|
||||
cst_api_fill_to_wire_dcb_search_result(raw[i], ans.ref.ptr[i]);
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
@protected
|
||||
ffi.Pointer<wire_cst_list_download_task_info>
|
||||
cst_encode_list_download_task_info(List<DownloadTaskInfo> raw) {
|
||||
@@ -611,6 +688,34 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
cst_api_fill_to_wire_web_view_configuration(apiObj, wireObj.ref);
|
||||
}
|
||||
|
||||
@protected
|
||||
void cst_api_fill_to_wire_dcb_record_item(
|
||||
DcbRecordItem apiObj,
|
||||
wire_cst_dcb_record_item wireObj,
|
||||
) {
|
||||
wireObj.path = cst_encode_String(apiObj.path);
|
||||
wireObj.index = cst_encode_usize(apiObj.index);
|
||||
}
|
||||
|
||||
@protected
|
||||
void cst_api_fill_to_wire_dcb_search_match(
|
||||
DcbSearchMatch apiObj,
|
||||
wire_cst_dcb_search_match wireObj,
|
||||
) {
|
||||
wireObj.line_number = cst_encode_usize(apiObj.lineNumber);
|
||||
wireObj.line_content = cst_encode_String(apiObj.lineContent);
|
||||
}
|
||||
|
||||
@protected
|
||||
void cst_api_fill_to_wire_dcb_search_result(
|
||||
DcbSearchResult apiObj,
|
||||
wire_cst_dcb_search_result wireObj,
|
||||
) {
|
||||
wireObj.path = cst_encode_String(apiObj.path);
|
||||
wireObj.index = cst_encode_usize(apiObj.index);
|
||||
wireObj.matches = cst_encode_list_dcb_search_match(apiObj.matches);
|
||||
}
|
||||
|
||||
@protected
|
||||
void cst_api_fill_to_wire_download_global_stat(
|
||||
DownloadGlobalStat apiObj,
|
||||
@@ -865,6 +970,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_dcb_record_item(DcbRecordItem self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_dcb_search_match(
|
||||
DcbSearchMatch self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_dcb_search_result(
|
||||
DcbSearchResult self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_download_global_stat(
|
||||
DownloadGlobalStat self,
|
||||
@@ -895,6 +1015,24 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
@protected
|
||||
void sse_encode_list_String(List<String> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_dcb_record_item(
|
||||
List<DcbRecordItem> self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_dcb_search_match(
|
||||
List<DcbSearchMatch> self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_dcb_search_result(
|
||||
List<DcbSearchResult> self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_download_task_info(
|
||||
List<DownloadTaskInfo> self,
|
||||
@@ -1147,6 +1285,198 @@ class RustLibWire implements BaseWire {
|
||||
)
|
||||
>();
|
||||
|
||||
void wire__crate__api__unp4k_api__dcb_close(int port_) {
|
||||
return _wire__crate__api__unp4k_api__dcb_close(port_);
|
||||
}
|
||||
|
||||
late final _wire__crate__api__unp4k_api__dcb_closePtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int64)>>(
|
||||
'frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__dcb_close',
|
||||
);
|
||||
late final _wire__crate__api__unp4k_api__dcb_close =
|
||||
_wire__crate__api__unp4k_api__dcb_closePtr
|
||||
.asFunction<void Function(int)>();
|
||||
|
||||
void wire__crate__api__unp4k_api__dcb_export_to_disk(
|
||||
int port_,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict> output_path,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict> dcb_path,
|
||||
bool merge,
|
||||
) {
|
||||
return _wire__crate__api__unp4k_api__dcb_export_to_disk(
|
||||
port_,
|
||||
output_path,
|
||||
dcb_path,
|
||||
merge,
|
||||
);
|
||||
}
|
||||
|
||||
late final _wire__crate__api__unp4k_api__dcb_export_to_diskPtr =
|
||||
_lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(
|
||||
ffi.Int64,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict>,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict>,
|
||||
ffi.Bool,
|
||||
)
|
||||
>
|
||||
>(
|
||||
'frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__dcb_export_to_disk',
|
||||
);
|
||||
late final _wire__crate__api__unp4k_api__dcb_export_to_disk =
|
||||
_wire__crate__api__unp4k_api__dcb_export_to_diskPtr
|
||||
.asFunction<
|
||||
void Function(
|
||||
int,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict>,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict>,
|
||||
bool,
|
||||
)
|
||||
>();
|
||||
|
||||
void wire__crate__api__unp4k_api__dcb_get_record_count(int port_) {
|
||||
return _wire__crate__api__unp4k_api__dcb_get_record_count(port_);
|
||||
}
|
||||
|
||||
late final _wire__crate__api__unp4k_api__dcb_get_record_countPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int64)>>(
|
||||
'frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__dcb_get_record_count',
|
||||
);
|
||||
late final _wire__crate__api__unp4k_api__dcb_get_record_count =
|
||||
_wire__crate__api__unp4k_api__dcb_get_record_countPtr
|
||||
.asFunction<void Function(int)>();
|
||||
|
||||
void wire__crate__api__unp4k_api__dcb_get_record_list(int port_) {
|
||||
return _wire__crate__api__unp4k_api__dcb_get_record_list(port_);
|
||||
}
|
||||
|
||||
late final _wire__crate__api__unp4k_api__dcb_get_record_listPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int64)>>(
|
||||
'frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__dcb_get_record_list',
|
||||
);
|
||||
late final _wire__crate__api__unp4k_api__dcb_get_record_list =
|
||||
_wire__crate__api__unp4k_api__dcb_get_record_listPtr
|
||||
.asFunction<void Function(int)>();
|
||||
|
||||
void wire__crate__api__unp4k_api__dcb_is_dataforge(
|
||||
int port_,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_loose> data,
|
||||
) {
|
||||
return _wire__crate__api__unp4k_api__dcb_is_dataforge(port_, data);
|
||||
}
|
||||
|
||||
late final _wire__crate__api__unp4k_api__dcb_is_dataforgePtr =
|
||||
_lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(
|
||||
ffi.Int64,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_loose>,
|
||||
)
|
||||
>
|
||||
>(
|
||||
'frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__dcb_is_dataforge',
|
||||
);
|
||||
late final _wire__crate__api__unp4k_api__dcb_is_dataforge =
|
||||
_wire__crate__api__unp4k_api__dcb_is_dataforgePtr
|
||||
.asFunction<
|
||||
void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_loose>)
|
||||
>();
|
||||
|
||||
void wire__crate__api__unp4k_api__dcb_open(
|
||||
int port_,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_loose> data,
|
||||
) {
|
||||
return _wire__crate__api__unp4k_api__dcb_open(port_, data);
|
||||
}
|
||||
|
||||
late final _wire__crate__api__unp4k_api__dcb_openPtr =
|
||||
_lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(
|
||||
ffi.Int64,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_loose>,
|
||||
)
|
||||
>
|
||||
>('frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__dcb_open');
|
||||
late final _wire__crate__api__unp4k_api__dcb_open =
|
||||
_wire__crate__api__unp4k_api__dcb_openPtr
|
||||
.asFunction<
|
||||
void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_loose>)
|
||||
>();
|
||||
|
||||
void wire__crate__api__unp4k_api__dcb_record_to_xml(
|
||||
int port_,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict> path,
|
||||
) {
|
||||
return _wire__crate__api__unp4k_api__dcb_record_to_xml(port_, path);
|
||||
}
|
||||
|
||||
late final _wire__crate__api__unp4k_api__dcb_record_to_xmlPtr =
|
||||
_lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(
|
||||
ffi.Int64,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict>,
|
||||
)
|
||||
>
|
||||
>(
|
||||
'frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__dcb_record_to_xml',
|
||||
);
|
||||
late final _wire__crate__api__unp4k_api__dcb_record_to_xml =
|
||||
_wire__crate__api__unp4k_api__dcb_record_to_xmlPtr
|
||||
.asFunction<
|
||||
void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>)
|
||||
>();
|
||||
|
||||
void wire__crate__api__unp4k_api__dcb_record_to_xml_by_index(
|
||||
int port_,
|
||||
int index,
|
||||
) {
|
||||
return _wire__crate__api__unp4k_api__dcb_record_to_xml_by_index(
|
||||
port_,
|
||||
index,
|
||||
);
|
||||
}
|
||||
|
||||
late final _wire__crate__api__unp4k_api__dcb_record_to_xml_by_indexPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Int64, ffi.UintPtr)>>(
|
||||
'frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__dcb_record_to_xml_by_index',
|
||||
);
|
||||
late final _wire__crate__api__unp4k_api__dcb_record_to_xml_by_index =
|
||||
_wire__crate__api__unp4k_api__dcb_record_to_xml_by_indexPtr
|
||||
.asFunction<void Function(int, int)>();
|
||||
|
||||
void wire__crate__api__unp4k_api__dcb_search_all(
|
||||
int port_,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict> query,
|
||||
int max_results,
|
||||
) {
|
||||
return _wire__crate__api__unp4k_api__dcb_search_all(
|
||||
port_,
|
||||
query,
|
||||
max_results,
|
||||
);
|
||||
}
|
||||
|
||||
late final _wire__crate__api__unp4k_api__dcb_search_allPtr =
|
||||
_lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Void Function(
|
||||
ffi.Int64,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict>,
|
||||
ffi.UintPtr,
|
||||
)
|
||||
>
|
||||
>(
|
||||
'frbgen_starcitizen_doctor_wire__crate__api__unp4k_api__dcb_search_all',
|
||||
);
|
||||
late final _wire__crate__api__unp4k_api__dcb_search_all =
|
||||
_wire__crate__api__unp4k_api__dcb_search_allPtr
|
||||
.asFunction<
|
||||
void Function(int, ffi.Pointer<wire_cst_list_prim_u_8_strict>, int)
|
||||
>();
|
||||
|
||||
void wire__crate__api__http_api__dns_lookup_ips(
|
||||
int port_,
|
||||
ffi.Pointer<wire_cst_list_prim_u_8_strict> host,
|
||||
@@ -2989,6 +3319,54 @@ class RustLibWire implements BaseWire {
|
||||
late final _cst_new_list_String = _cst_new_list_StringPtr
|
||||
.asFunction<ffi.Pointer<wire_cst_list_String> Function(int)>();
|
||||
|
||||
ffi.Pointer<wire_cst_list_dcb_record_item> cst_new_list_dcb_record_item(
|
||||
int len,
|
||||
) {
|
||||
return _cst_new_list_dcb_record_item(len);
|
||||
}
|
||||
|
||||
late final _cst_new_list_dcb_record_itemPtr =
|
||||
_lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Pointer<wire_cst_list_dcb_record_item> Function(ffi.Int32)
|
||||
>
|
||||
>('frbgen_starcitizen_doctor_cst_new_list_dcb_record_item');
|
||||
late final _cst_new_list_dcb_record_item = _cst_new_list_dcb_record_itemPtr
|
||||
.asFunction<ffi.Pointer<wire_cst_list_dcb_record_item> Function(int)>();
|
||||
|
||||
ffi.Pointer<wire_cst_list_dcb_search_match> cst_new_list_dcb_search_match(
|
||||
int len,
|
||||
) {
|
||||
return _cst_new_list_dcb_search_match(len);
|
||||
}
|
||||
|
||||
late final _cst_new_list_dcb_search_matchPtr =
|
||||
_lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Pointer<wire_cst_list_dcb_search_match> Function(ffi.Int32)
|
||||
>
|
||||
>('frbgen_starcitizen_doctor_cst_new_list_dcb_search_match');
|
||||
late final _cst_new_list_dcb_search_match = _cst_new_list_dcb_search_matchPtr
|
||||
.asFunction<ffi.Pointer<wire_cst_list_dcb_search_match> Function(int)>();
|
||||
|
||||
ffi.Pointer<wire_cst_list_dcb_search_result> cst_new_list_dcb_search_result(
|
||||
int len,
|
||||
) {
|
||||
return _cst_new_list_dcb_search_result(len);
|
||||
}
|
||||
|
||||
late final _cst_new_list_dcb_search_resultPtr =
|
||||
_lookup<
|
||||
ffi.NativeFunction<
|
||||
ffi.Pointer<wire_cst_list_dcb_search_result> Function(ffi.Int32)
|
||||
>
|
||||
>('frbgen_starcitizen_doctor_cst_new_list_dcb_search_result');
|
||||
late final _cst_new_list_dcb_search_result =
|
||||
_cst_new_list_dcb_search_resultPtr
|
||||
.asFunction<
|
||||
ffi.Pointer<wire_cst_list_dcb_search_result> Function(int)
|
||||
>();
|
||||
|
||||
ffi.Pointer<wire_cst_list_download_task_info> cst_new_list_download_task_info(
|
||||
int len,
|
||||
) {
|
||||
@@ -3125,15 +3503,15 @@ final class wire_cst_list_prim_u_8_strict extends ffi.Struct {
|
||||
external int len;
|
||||
}
|
||||
|
||||
final class wire_cst_list_String extends ffi.Struct {
|
||||
external ffi.Pointer<ffi.Pointer<wire_cst_list_prim_u_8_strict>> ptr;
|
||||
final class wire_cst_list_prim_u_8_loose extends ffi.Struct {
|
||||
external ffi.Pointer<ffi.Uint8> ptr;
|
||||
|
||||
@ffi.Int32()
|
||||
external int len;
|
||||
}
|
||||
|
||||
final class wire_cst_list_prim_u_8_loose extends ffi.Struct {
|
||||
external ffi.Pointer<ffi.Uint8> ptr;
|
||||
final class wire_cst_list_String extends ffi.Struct {
|
||||
external ffi.Pointer<ffi.Pointer<wire_cst_list_prim_u_8_strict>> ptr;
|
||||
|
||||
@ffi.Int32()
|
||||
external int len;
|
||||
@@ -3180,6 +3558,50 @@ final class wire_cst_web_view_configuration extends ffi.Struct {
|
||||
external ffi.Pointer<wire_cst_list_prim_u_8_strict> user_agent;
|
||||
}
|
||||
|
||||
final class wire_cst_dcb_record_item extends ffi.Struct {
|
||||
external ffi.Pointer<wire_cst_list_prim_u_8_strict> path;
|
||||
|
||||
@ffi.UintPtr()
|
||||
external int index;
|
||||
}
|
||||
|
||||
final class wire_cst_list_dcb_record_item extends ffi.Struct {
|
||||
external ffi.Pointer<wire_cst_dcb_record_item> ptr;
|
||||
|
||||
@ffi.Int32()
|
||||
external int len;
|
||||
}
|
||||
|
||||
final class wire_cst_dcb_search_match extends ffi.Struct {
|
||||
@ffi.UintPtr()
|
||||
external int line_number;
|
||||
|
||||
external ffi.Pointer<wire_cst_list_prim_u_8_strict> line_content;
|
||||
}
|
||||
|
||||
final class wire_cst_list_dcb_search_match extends ffi.Struct {
|
||||
external ffi.Pointer<wire_cst_dcb_search_match> ptr;
|
||||
|
||||
@ffi.Int32()
|
||||
external int len;
|
||||
}
|
||||
|
||||
final class wire_cst_dcb_search_result extends ffi.Struct {
|
||||
external ffi.Pointer<wire_cst_list_prim_u_8_strict> path;
|
||||
|
||||
@ffi.UintPtr()
|
||||
external int index;
|
||||
|
||||
external ffi.Pointer<wire_cst_list_dcb_search_match> matches;
|
||||
}
|
||||
|
||||
final class wire_cst_list_dcb_search_result extends ffi.Struct {
|
||||
external ffi.Pointer<wire_cst_dcb_search_result> ptr;
|
||||
|
||||
@ffi.Int32()
|
||||
external int len;
|
||||
}
|
||||
|
||||
final class wire_cst_download_task_info extends ffi.Struct {
|
||||
@ffi.UintPtr()
|
||||
external int id;
|
||||
|
||||
Reference in New Issue
Block a user