249 lines
8.3 KiB
Dart
249 lines
8.3 KiB
Dart
// This is a generated file - do not edit.
|
||
//
|
||
// Generated from control_message.proto.
|
||
|
||
// @dart = 3.3
|
||
|
||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||
// ignore_for_file: constant_identifier_names
|
||
// ignore_for_file: curly_braces_in_flow_control_structures
|
||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||
// ignore_for_file: non_constant_identifier_names, prefer_relative_imports
|
||
|
||
import 'dart:core' as $core;
|
||
|
||
import 'package:fixnum/fixnum.dart' as $fixnum;
|
||
import 'package:protobuf/protobuf.dart' as $pb;
|
||
|
||
import 'control_message.pbenum.dart';
|
||
|
||
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
|
||
|
||
export 'control_message.pbenum.dart';
|
||
|
||
/// 通过 RTCDataChannel 传输的控制指令(protobuf 二进制)。
|
||
/// 坐标 x/y/x1/y1/x2/y2 均为相对屏幕的百分比,取值范围 0.0 ~ 1.0。
|
||
class ControlMessage extends $pb.GeneratedMessage {
|
||
factory ControlMessage({
|
||
Action? action,
|
||
$core.double? x,
|
||
$core.double? y,
|
||
$core.double? x1,
|
||
$core.double? y1,
|
||
$core.double? x2,
|
||
$core.double? y2,
|
||
$fixnum.Int64? duration,
|
||
$core.int? keyCode,
|
||
$core.int? keyAction,
|
||
$core.int? motionAction,
|
||
$core.int? width,
|
||
$core.int? height,
|
||
$core.int? fps,
|
||
}) {
|
||
final result = create();
|
||
if (action != null) result.action = action;
|
||
if (x != null) result.x = x;
|
||
if (y != null) result.y = y;
|
||
if (x1 != null) result.x1 = x1;
|
||
if (y1 != null) result.y1 = y1;
|
||
if (x2 != null) result.x2 = x2;
|
||
if (y2 != null) result.y2 = y2;
|
||
if (duration != null) result.duration = duration;
|
||
if (keyCode != null) result.keyCode = keyCode;
|
||
if (keyAction != null) result.keyAction = keyAction;
|
||
if (motionAction != null) result.motionAction = motionAction;
|
||
if (width != null) result.width = width;
|
||
if (height != null) result.height = height;
|
||
if (fps != null) result.fps = fps;
|
||
return result;
|
||
}
|
||
|
||
ControlMessage._();
|
||
|
||
factory ControlMessage.fromBuffer($core.List<$core.int> data,
|
||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||
create()..mergeFromBuffer(data, registry);
|
||
factory ControlMessage.fromJson($core.String json,
|
||
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||
create()..mergeFromJson(json, registry);
|
||
|
||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||
_omitMessageNames ? '' : 'ControlMessage',
|
||
package:
|
||
const $pb.PackageName(_omitMessageNames ? '' : 'com.ttstd.control'),
|
||
createEmptyInstance: create)
|
||
..aE<Action>(1, _omitFieldNames ? '' : 'action', enumValues: Action.values)
|
||
..aD(2, _omitFieldNames ? '' : 'x')
|
||
..aD(3, _omitFieldNames ? '' : 'y')
|
||
..aD(4, _omitFieldNames ? '' : 'x1')
|
||
..aD(5, _omitFieldNames ? '' : 'y1')
|
||
..aD(6, _omitFieldNames ? '' : 'x2')
|
||
..aD(7, _omitFieldNames ? '' : 'y2')
|
||
..aInt64(8, _omitFieldNames ? '' : 'duration')
|
||
..aI(9, _omitFieldNames ? '' : 'keyCode')
|
||
..aI(10, _omitFieldNames ? '' : 'keyAction')
|
||
..aI(11, _omitFieldNames ? '' : 'motionAction')
|
||
..aI(12, _omitFieldNames ? '' : 'width')
|
||
..aI(13, _omitFieldNames ? '' : 'height')
|
||
..aI(14, _omitFieldNames ? '' : 'fps')
|
||
..hasRequiredFields = false;
|
||
|
||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||
ControlMessage clone() => deepCopy();
|
||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||
ControlMessage copyWith(void Function(ControlMessage) updates) =>
|
||
super.copyWith((message) => updates(message as ControlMessage))
|
||
as ControlMessage;
|
||
|
||
@$core.override
|
||
$pb.BuilderInfo get info_ => _i;
|
||
|
||
@$core.pragma('dart2js:noInline')
|
||
static ControlMessage create() => ControlMessage._();
|
||
@$core.override
|
||
ControlMessage createEmptyInstance() => create();
|
||
@$core.pragma('dart2js:noInline')
|
||
static ControlMessage getDefault() => _defaultInstance ??=
|
||
$pb.GeneratedMessage.$_defaultFor<ControlMessage>(create);
|
||
static ControlMessage? _defaultInstance;
|
||
|
||
/// 指令类型
|
||
@$pb.TagNumber(1)
|
||
Action get action => $_getN(0);
|
||
@$pb.TagNumber(1)
|
||
set action(Action value) => $_setField(1, value);
|
||
@$pb.TagNumber(1)
|
||
$core.bool hasAction() => $_has(0);
|
||
@$pb.TagNumber(1)
|
||
void clearAction() => $_clearField(1);
|
||
|
||
/// 单点坐标(TOUCH / LONG_PRESS / MOTION_EVENT)
|
||
@$pb.TagNumber(2)
|
||
$core.double get x => $_getN(1);
|
||
@$pb.TagNumber(2)
|
||
set x($core.double value) => $_setDouble(1, value);
|
||
@$pb.TagNumber(2)
|
||
$core.bool hasX() => $_has(1);
|
||
@$pb.TagNumber(2)
|
||
void clearX() => $_clearField(2);
|
||
|
||
@$pb.TagNumber(3)
|
||
$core.double get y => $_getN(2);
|
||
@$pb.TagNumber(3)
|
||
set y($core.double value) => $_setDouble(2, value);
|
||
@$pb.TagNumber(3)
|
||
$core.bool hasY() => $_has(2);
|
||
@$pb.TagNumber(3)
|
||
void clearY() => $_clearField(3);
|
||
|
||
/// 滑动起止坐标(SWIPE)
|
||
@$pb.TagNumber(4)
|
||
$core.double get x1 => $_getN(3);
|
||
@$pb.TagNumber(4)
|
||
set x1($core.double value) => $_setDouble(3, value);
|
||
@$pb.TagNumber(4)
|
||
$core.bool hasX1() => $_has(3);
|
||
@$pb.TagNumber(4)
|
||
void clearX1() => $_clearField(4);
|
||
|
||
@$pb.TagNumber(5)
|
||
$core.double get y1 => $_getN(4);
|
||
@$pb.TagNumber(5)
|
||
set y1($core.double value) => $_setDouble(4, value);
|
||
@$pb.TagNumber(5)
|
||
$core.bool hasY1() => $_has(4);
|
||
@$pb.TagNumber(5)
|
||
void clearY1() => $_clearField(5);
|
||
|
||
@$pb.TagNumber(6)
|
||
$core.double get x2 => $_getN(5);
|
||
@$pb.TagNumber(6)
|
||
set x2($core.double value) => $_setDouble(5, value);
|
||
@$pb.TagNumber(6)
|
||
$core.bool hasX2() => $_has(5);
|
||
@$pb.TagNumber(6)
|
||
void clearX2() => $_clearField(6);
|
||
|
||
@$pb.TagNumber(7)
|
||
$core.double get y2 => $_getN(6);
|
||
@$pb.TagNumber(7)
|
||
set y2($core.double value) => $_setDouble(6, value);
|
||
@$pb.TagNumber(7)
|
||
$core.bool hasY2() => $_has(6);
|
||
@$pb.TagNumber(7)
|
||
void clearY2() => $_clearField(7);
|
||
|
||
@$pb.TagNumber(8)
|
||
$fixnum.Int64 get duration => $_getI64(7);
|
||
@$pb.TagNumber(8)
|
||
set duration($fixnum.Int64 value) => $_setInt64(7, value);
|
||
@$pb.TagNumber(8)
|
||
$core.bool hasDuration() => $_has(7);
|
||
@$pb.TagNumber(8)
|
||
void clearDuration() => $_clearField(8);
|
||
|
||
/// 按键(KEY):key_action 0=按下 1=抬起(对应 Android KeyEvent ACTION_DOWN/UP)
|
||
@$pb.TagNumber(9)
|
||
$core.int get keyCode => $_getIZ(8);
|
||
@$pb.TagNumber(9)
|
||
set keyCode($core.int value) => $_setSignedInt32(8, value);
|
||
@$pb.TagNumber(9)
|
||
$core.bool hasKeyCode() => $_has(8);
|
||
@$pb.TagNumber(9)
|
||
void clearKeyCode() => $_clearField(9);
|
||
|
||
@$pb.TagNumber(10)
|
||
$core.int get keyAction => $_getIZ(9);
|
||
@$pb.TagNumber(10)
|
||
set keyAction($core.int value) => $_setSignedInt32(9, value);
|
||
@$pb.TagNumber(10)
|
||
$core.bool hasKeyAction() => $_has(9);
|
||
@$pb.TagNumber(10)
|
||
void clearKeyAction() => $_clearField(10);
|
||
|
||
/// 原始动作(MOTION_EVENT):对应 Android MotionEvent ACTION_*(0=DOWN 1=UP 2=MOVE)
|
||
@$pb.TagNumber(11)
|
||
$core.int get motionAction => $_getIZ(10);
|
||
@$pb.TagNumber(11)
|
||
set motionAction($core.int value) => $_setSignedInt32(10, value);
|
||
@$pb.TagNumber(11)
|
||
$core.bool hasMotionAction() => $_has(10);
|
||
@$pb.TagNumber(11)
|
||
void clearMotionAction() => $_clearField(11);
|
||
|
||
/// 分辨率切换(SET_RESOLUTION):目标宽度/长边(<=0 表示原生分辨率)
|
||
@$pb.TagNumber(12)
|
||
$core.int get width => $_getIZ(11);
|
||
@$pb.TagNumber(12)
|
||
set width($core.int value) => $_setSignedInt32(11, value);
|
||
@$pb.TagNumber(12)
|
||
$core.bool hasWidth() => $_has(11);
|
||
@$pb.TagNumber(12)
|
||
void clearWidth() => $_clearField(12);
|
||
|
||
/// 分辨率切换(SET_RESOLUTION):目标高度(<=0 时按屏幕宽高比基于 width 计算)
|
||
@$pb.TagNumber(13)
|
||
$core.int get height => $_getIZ(12);
|
||
@$pb.TagNumber(13)
|
||
set height($core.int value) => $_setSignedInt32(12, value);
|
||
@$pb.TagNumber(13)
|
||
$core.bool hasHeight() => $_has(12);
|
||
@$pb.TagNumber(13)
|
||
void clearHeight() => $_clearField(13);
|
||
|
||
/// 分辨率切换(SET_RESOLUTION):目标帧率(<=0 表示沿用当前帧率)
|
||
@$pb.TagNumber(14)
|
||
$core.int get fps => $_getIZ(13);
|
||
@$pb.TagNumber(14)
|
||
set fps($core.int value) => $_setSignedInt32(13, value);
|
||
@$pb.TagNumber(14)
|
||
$core.bool hasFps() => $_has(13);
|
||
@$pb.TagNumber(14)
|
||
void clearFps() => $_clearField(14);
|
||
}
|
||
|
||
const $core.bool _omitFieldNames =
|
||
$core.bool.fromEnvironment('protobuf.omit_field_names');
|
||
const $core.bool _omitMessageNames =
|
||
$core.bool.fromEnvironment('protobuf.omit_message_names');
|