@aiot-toolkit/emulator 2.0.6-beta.1 → 2.0.6-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/lib/emulatorutil/constants.d.ts +12 -6
  2. package/lib/emulatorutil/constants.js +44 -12
  3. package/lib/emulatorutil/running.js +1 -1
  4. package/lib/index.d.ts +4 -1
  5. package/lib/index.js +47 -7
  6. package/lib/instance/common.d.ts +3 -2
  7. package/lib/instance/common.js +16 -3
  8. package/lib/instance/index.js +1 -1
  9. package/lib/instance/minisound.d.ts +1 -1
  10. package/lib/instance/minisound.js +15 -7
  11. package/lib/instance/miwear.d.ts +1 -1
  12. package/lib/instance/miwear.js +12 -4
  13. package/lib/instance/pre.d.ts +1 -1
  14. package/lib/instance/pre.js +3 -1
  15. package/lib/instance/vela5.d.ts +1 -1
  16. package/lib/instance/vela5.js +12 -10
  17. package/lib/static/avdConfigIni.json +1 -1
  18. package/lib/static/proto/emulator_controller.proto +181 -26
  19. package/lib/static/proto/ui_controller_service.proto +147 -0
  20. package/lib/typing/Vvd.d.ts +4 -2
  21. package/lib/typing/Vvd.js +1 -0
  22. package/lib/vvd/grpc/index.d.ts +16 -8
  23. package/lib/vvd/grpc/index.js +125 -29
  24. package/lib/vvd/grpc/types/GrpcClient.d.ts +43 -2
  25. package/lib/vvd/grpc/types/UiControllerClient.d.ts +23 -0
  26. package/lib/vvd/grpc/types/index.d.ts +3 -0
  27. package/lib/vvd/grpc/types/index.js +38 -0
  28. package/lib/vvd/grpc/types/proto-types.d.ts +178 -0
  29. package/lib/vvd/grpc/types/proto-types.js +50 -0
  30. package/lib/vvd/index.d.ts +14 -8
  31. package/lib/vvd/index.js +157 -83
  32. package/package.json +4 -8
  33. package/lib/vvd/grpc/types/KeyEvent.d.ts +0 -19
  34. package/lib/vvd/grpc/types/KeyEvent.js +0 -20
  35. package/lib/vvd/grpc/types/MouseEvent.d.ts +0 -30
  36. /package/lib/vvd/grpc/types/{MouseEvent.js → UiControllerClient.js} +0 -0
@@ -57,6 +57,9 @@ service EmulatorController {
57
57
  returns (stream PhysicalModelValue) {}
58
58
 
59
59
  // Atomically set/get the current primary clipboard data.
60
+ // Note that a call to setClipboard will result in an immediate
61
+ // event for those who made a call to streamClipboard and are
62
+ // on a different channel than the one used to set the clipboard.
60
63
  rpc setClipboard(ClipData) returns (google.protobuf.Empty) {}
61
64
  rpc getClipboard(google.protobuf.Empty) returns (ClipData) {}
62
65
 
@@ -176,15 +179,13 @@ service EmulatorController {
176
179
  // already.
177
180
  rpc injectAudio(stream AudioPacket) returns (google.protobuf.Empty) {}
178
181
 
179
- // Returns the last 128Kb of logcat output from the emulator
180
- // Note that parsed logcat messages are only available after L (Api >23).
181
- // it is possible that the logcat buffer gets overwritten, or falls behind.
182
- rpc getLogcat(LogMessage) returns (LogMessage) {}
182
+ // Deprecated, please use the streamLogcat method instead.
183
+ rpc getLogcat(LogMessage) returns (LogMessage) {
184
+ option deprecated = true;
185
+ }
183
186
 
184
- // Streams the logcat output from the emulator. The first call
185
- // can retrieve up to 128Kb. This call will not return.
187
+ // Streams the logcat output from the emulator.
186
188
  // Note that parsed logcat messages are only available after L (Api >23)
187
- // it is possible that the logcat buffer gets overwritten, or falls behind.
188
189
  rpc streamLogcat(LogMessage) returns (stream LogMessage) {}
189
190
 
190
191
  // Transition the virtual machine to the desired state. Note that
@@ -233,10 +234,19 @@ service EmulatorController {
233
234
  rpc streamNotification(google.protobuf.Empty)
234
235
  returns (stream Notification) {}
235
236
 
236
- // RotationRadian is relative to the camera's current orientation.
237
+ // Rotation angles are relative to the camera's current orientation.
238
+ // The coordinate system is right-handed and is defined as follows:
239
+ // x axis is pointing right
240
+ // y axis is pointing up
241
+ // z axis is pointing towards the viewer
242
+ // The z component of rotation is not used when calling this method.
237
243
  rpc rotateVirtualSceneCamera(RotationRadian)
238
244
  returns (google.protobuf.Empty) {}
239
- // Velocity is absolute
245
+ // Velocity is absolute and is measured in meters per second.
246
+ // The coordinate system is right-handed and is defined as follows:
247
+ // x axis is pointing right
248
+ // y axis is pointing up
249
+ // z axis is pointing towards the viewer
240
250
  rpc setVirtualSceneCameraVelocity(Velocity)
241
251
  returns (google.protobuf.Empty) {}
242
252
  // Set foldable posture
@@ -262,6 +272,16 @@ service EmulatorController {
262
272
  // is not resizable. The following gRPC error codes can be returned:
263
273
  // - FAILED_PRECONDITION (code 9) if the AVD is not resizable.
264
274
  rpc setDisplayMode(DisplayMode) returns (google.protobuf.Empty) {}
275
+
276
+ // Changes the XR-related settings. Fails if the AVD is not XR. The
277
+ // following gRPC error codes can be returned:
278
+ // - FAILED_PRECONDITION (code 9) if the AVD is not XR.
279
+ rpc setXrOptions(XrOptions) returns (google.protobuf.Empty) {}
280
+
281
+ // Gets the current state of XR-related settings. Fails if the AVD is not
282
+ // XR. The following gRPC error codes can be returned:
283
+ // - FAILED_PRECONDITION (code 9) if the AVD is not XR.
284
+ rpc getXrOptions(google.protobuf.Empty) returns (XrOptions) {}
265
285
  }
266
286
 
267
287
  // A Run State that describes the state of the Virtual Machine.
@@ -297,6 +317,12 @@ message VmRunState {
297
317
  // Guest experienced some error state, you cannot transition to this
298
318
  // state.
299
319
  INTERNAL_ERROR = 10;
320
+ // Completely restart the emulator.
321
+ RESTART = 11;
322
+ // Resume a stopped emulator
323
+ START = 12;
324
+ // Stop (pause) a running emulator
325
+ STOP = 13;
300
326
  }
301
327
 
302
328
  RunState state = 1;
@@ -470,6 +496,26 @@ message DisplayMode {
470
496
  DisplayModeValue value = 1;
471
497
  }
472
498
 
499
+ message XrOptions {
500
+ enum Environment {
501
+ LIVING_ROOM_DAY = 0;
502
+ LIVING_ROOM_NIGHT = 1;
503
+ // More environments may be added later.
504
+ }
505
+
506
+ // The currently active artificial surrounding environment (a.k.a.
507
+ // passthrough environment).
508
+ Environment environment = 1;
509
+
510
+ // A value of 0.0 means that the real or artificial surrounding environment
511
+ // (a.k.a. passthrough environment) is not visible. A value of 1.0 means
512
+ // that the passthrough environment is fully visible. Any value outside of
513
+ // the range [0.0-1.0] is ignored and leaves the state of passthrough
514
+ // unchanged. For simplicity of the implementation, this number may be
515
+ // rounded to an integer before applying.
516
+ float passthrough_coefficient = 2;
517
+ }
518
+
473
519
  message LogMessage {
474
520
  // [Output Only] The contents of the log output.
475
521
  string contents = 1;
@@ -477,11 +523,11 @@ message LogMessage {
477
523
  // should match the start parameter sent with the request. If the serial
478
524
  // console output exceeds the size of the buffer, older output will be
479
525
  // overwritten by newer content and the start values will be mismatched.
480
- int64 start = 2;
526
+ int64 start = 2 [deprecated = true];
481
527
  //[Output Only] The position of the next byte of content from the serial
482
528
  // console output. Use this value in the next request as the start
483
529
  // parameter.
484
- int64 next = 3;
530
+ int64 next = 3 [deprecated = true];
485
531
 
486
532
  // Set the sort of response you are interested it in.
487
533
  // It the type is "Parsed" the entries field will contain the parsed
@@ -628,6 +674,21 @@ message Touch {
628
674
  }
629
675
 
630
676
  EventExpiration expiration = 7;
677
+
678
+ // The orientation of the contact, if any.
679
+ int32 orientation = 8;
680
+ }
681
+
682
+ // A Pen is similar to a touch, with the addition
683
+ // of button and rubber information.
684
+ message Pen {
685
+ Touch location = 1;
686
+
687
+ // True if the button is pressed or not
688
+ bool button_pressed = 2;
689
+
690
+ // True if it is a rubber pointer.
691
+ bool rubber_pointer = 3;
631
692
  }
632
693
 
633
694
  // A TouchEvent contains a list of Touch objects that are in contact with
@@ -643,9 +704,15 @@ message TouchEvent {
643
704
 
644
705
  // The display device where the touch event occurred.
645
706
  // Omitting or using the value 0 indicates the main display.
646
- //
647
- // Touch events cannot be send to displays other than 0, due to
648
- // https://issuetracker.google.com/issues/150699691
707
+ int32 display = 2;
708
+ }
709
+
710
+ message PenEvent {
711
+ // The list of Pen objects, note that these do not need to be unique
712
+ repeated Pen events = 1;
713
+
714
+ // The display device where the pen event occurred.
715
+ // Omitting or using the value 0 indicates the main display.
649
716
  int32 display = 2;
650
717
  }
651
718
 
@@ -653,11 +720,11 @@ message TouchEvent {
653
720
  // interacting with a pointing device (such as a mouse).
654
721
  message MouseEvent {
655
722
  // The horizontal coordinate. This is the physical location on the
656
- // screen For example 0 indicates the leftmost coordinate.
723
+ // screen, where 0 indicates the leftmost coordinate.
657
724
  int32 x = 1;
658
725
 
659
- // The vertical coordinate. This is the physical location on the screen
660
- // For example 0 indicates the top left coordinate.
726
+ // The vertical coordinate. This is the physical location on the screen,
727
+ // where 0 indicates the topmost coordinate.
661
728
  int32 y = 2;
662
729
 
663
730
  // Indicates which buttons are pressed.
@@ -783,15 +850,57 @@ message KeyboardEvent {
783
850
  string text = 5;
784
851
  }
785
852
 
853
+ message XrCommand {
854
+ enum Action {
855
+ // Recenter the viewport position and rotation.
856
+ RECENTER = 0;
857
+ }
858
+
859
+ Action action = 1;
860
+ }
861
+
786
862
  // An input event that can be delivered to the emulator.
787
863
  message InputEvent {
788
864
  oneof type {
789
865
  KeyboardEvent key_event = 1;
790
866
  TouchEvent touch_event = 2;
791
867
  MouseEvent mouse_event = 3;
868
+ AndroidEvent android_event = 4;
869
+ PenEvent pen_event = 5;
870
+ WheelEvent wheel_event = 6;
871
+ MouseEvent xr_hand_event = 7;
872
+ MouseEvent xr_eye_event = 8;
873
+ XrCommand xr_command = 9;
874
+ RotationRadian xr_head_rotation_event = 10;
875
+ Translation xr_head_movement_event = 11;
876
+ AngularVelocity xr_head_angular_velocity_event = 12;
877
+ Velocity xr_head_velocity_event = 13;
792
878
  }
793
879
  };
794
880
 
881
+ // The android input event system is a framework for handling input from a
882
+ // variety of devices by generating events that describe changes in the
883
+ // state of the devices and forwarding them to user space applications.
884
+ //
885
+ // An AndroidEvents will be delivered directly to the kernel as is.
886
+ message AndroidEvent {
887
+ // The type of the event. The types of the event are specified
888
+ // by the android kernel. Some examples are:
889
+ // EV_SYN, EV_KEY, EV_SW, etc..
890
+ // The exact definitions can be found in the input.h header file.
891
+ int32 type = 1;
892
+
893
+ // The actual code to be send to the kernel. The actual meaning
894
+ // of the code depends on the type definition.
895
+ int32 code = 2;
896
+
897
+ // The actual value of the event.
898
+ int32 value = 3;
899
+
900
+ // The display id associated with this input event.
901
+ int32 display = 4;
902
+ };
903
+
795
904
  message Fingerprint {
796
905
  // True when the fingprint is touched.
797
906
  bool isTouching = 1;
@@ -1054,6 +1163,17 @@ message EmulatorStatus {
1054
1163
  // The hardware configuration of the running emulator as
1055
1164
  // key valure pairs.
1056
1165
  EntryList hardwareConfig = 5;
1166
+
1167
+ // Some guests will produce a heart beat, that can be used to
1168
+ // detect if the guest is active.
1169
+ // This is a monotonically increasing number that gets incremented
1170
+ // around once a second.
1171
+ uint64 heartbeat = 6;
1172
+
1173
+ // The configuration of services in the guest, this map
1174
+ // contains key value pairs that are specific to the image
1175
+ // used by the guest.
1176
+ map<string, string> guestConfig = 7;
1057
1177
  }
1058
1178
 
1059
1179
  message AudioFormat {
@@ -1258,11 +1378,17 @@ message Notification {
1258
1378
  DisplayConfigurationsChangedNotification
1259
1379
  displayConfigurationsChangedNotification = 3;
1260
1380
  Posture posture = 4;
1261
- BootCompletedNotication booted = 5;
1381
+ BootCompletedNotification booted = 5;
1382
+ BrightnessValue brightness = 6;
1383
+
1384
+ // This notification is sent when a TextView receives or loses focus.
1385
+ // It is also sent immediately in response to the streamNotification
1386
+ // call.
1387
+ TextViewFocus textViewFocus = 7;
1262
1388
  }
1263
1389
  }
1264
1390
 
1265
- message BootCompletedNotication {
1391
+ message BootCompletedNotification {
1266
1392
  // The time in milliseconds it took for the boot to complete.
1267
1393
  // Note that this value can be 0 when you are loading from a snapshot.
1268
1394
  int32 time = 1;
@@ -1277,6 +1403,15 @@ message CameraNotification {
1277
1403
  int32 display = 2;
1278
1404
  }
1279
1405
 
1406
+ message TextViewFocus {
1407
+ // Indicates whether a text view currently has focus.
1408
+ bool textViewHasFocus = 1;
1409
+
1410
+ // If a text view has focus, the display where the text view is located.
1411
+ // Otherwise, unset.
1412
+ int32 display = 2;
1413
+ }
1414
+
1280
1415
  // Fired when an update to a display event has been fired through the extended
1281
1416
  // ui. This does not fire events when the display is changed through the console
1282
1417
  // or the gRPC endpoint.
@@ -1285,16 +1420,36 @@ message DisplayConfigurationsChangedNotification {
1285
1420
  }
1286
1421
 
1287
1422
  message RotationRadian {
1288
- float x = 1; // x axis is horizontal and orthogonal to the view direction.
1289
- float y = 2; // y axis points up and is perpendicular to the floor.
1290
- float z = 3; // z axis is the view direction and is set to 0.0 in
1291
- // rotateVirtualSceneCamera call.
1423
+ // Components of the rotation vector in radians.
1424
+ // Rotation angles are relative to the current orientation.
1425
+ float x = 1; // Angle of rotation around the x axis in right-handed direction.
1426
+ float y = 2; // Angle of rotation around the y axis in right-handed direction.
1427
+ float z = 3; // Angle of rotation around the z axis in right-handed direction.
1428
+ }
1429
+
1430
+ message Translation {
1431
+ // Components of the translation vector in meters.
1432
+ float delta_x = 1;
1433
+ float delta_y = 2;
1434
+ float delta_z = 3;
1435
+ }
1436
+
1437
+ message AngularVelocity {
1438
+ // Components of the target angular velocity vector in radians per second.
1439
+ // Transition to these values is implementation dependent, and may be
1440
+ // smoothed over time.
1441
+ float omega_x = 1;
1442
+ float omega_y = 2;
1443
+ float omega_z = 3;
1292
1444
  }
1293
1445
 
1294
1446
  message Velocity {
1295
- float x = 1; // x axis is horizontal and orthogonal to the view direction.
1296
- float y = 2; // y axis points up and is perpendicular to the floor.
1297
- float z = 3; // z axis is the view direction
1447
+ // Components of the target velocity vector in meters per second.
1448
+ // Transition to these values is implementation dependent, and may be
1449
+ // smoothed over time.
1450
+ float x = 1;
1451
+ float y = 2;
1452
+ float z = 3;
1298
1453
  }
1299
1454
 
1300
1455
  // Must follow the definition in "external/qemu/android/hw-sensors.h"
@@ -0,0 +1,147 @@
1
+ // Copyright 2020 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ option java_multiple_files = true;
18
+ option java_package = "com.android.emulator.control";
19
+ option objc_class_prefix = "AEC";
20
+
21
+ package android.emulation.control;
22
+ import "google/protobuf/empty.proto";
23
+
24
+ service UiController {
25
+ // PaneEntry specifies which pane will be selected when
26
+ // the extended control is shown. If the extended is visible already,
27
+ // this method will set visibilityChangedto to false.
28
+ rpc showExtendedControls(PaneEntry) returns (ExtendedControlsStatus) {}
29
+ // this method has no effect if the extended controls are hidden.
30
+ // In that case, visibilityChanged will be set to false;
31
+ rpc closeExtendedControls(google.protobuf.Empty)
32
+ returns (ExtendedControlsStatus) {}
33
+ rpc setUiTheme(ThemingStyle) returns (google.protobuf.Empty) {}
34
+
35
+ // Returns the user configuration of the running emulator. The user
36
+ // configuration contains information about the user interface.
37
+ rpc getUserConfig(google.protobuf.Empty) returns (UserConfig) {}
38
+ }
39
+
40
+ message UserConfigEntry {
41
+ string key = 1;
42
+ string value = 2;
43
+ }
44
+
45
+ // The user configuration of the running emulator as
46
+ // key value pairs. This contains the data you normally find
47
+ // in emulator-user.ini
48
+ message UserConfig {
49
+ repeated UserConfigEntry entries = 1;
50
+ }
51
+
52
+ message ThemingStyle {
53
+ enum Style {
54
+ LIGHT = 0;
55
+ DARK = 1;
56
+ CONTRAST = 2;
57
+ }
58
+ Style style = 1;
59
+ }
60
+
61
+ message ExtendedControlsStatus {
62
+ bool visibilityChanged = 1;
63
+ }
64
+
65
+ // The pixel coordinates are resolution independent, meaning the coordinates
66
+ // are independent from the pixel grid, resulting in a graphical user
67
+ // interface that is displayed at a consistent location, regardless of the
68
+ // resolution of the screen.
69
+ //
70
+ // For technical details: https://doc.qt.io/qt-5/highdpi.html
71
+ //
72
+ // Some things to note:
73
+ //
74
+ // - You cannot move a window offscreen.
75
+ // - There is a padding of around 10px around the frame.
76
+ //
77
+ // This means that moving to (0, 0) or (10, 10) will have the same result.
78
+ // This means that anchoring might not exactly behave as requested.
79
+ message WindowPosition {
80
+ // Anchor that is used to determine horizontal window placement.
81
+ enum HorizontalAnchor {
82
+ LEFT = 0; // The x coordinate will be treated as the left edge of the
83
+ // window.
84
+ HCENTER = 1; // The x coordinate will be treated as the middle between
85
+ // the left and right edges of the window.
86
+ RIGHT = 2; // The x coordinate will be treated as the right edge of
87
+ // the window.
88
+ }
89
+
90
+ // Anchor that is used to determine vertical window placement.
91
+ enum VerticalAnchor {
92
+ TOP = 0; // The y coordinate will be treated as the top edge of the
93
+ // window.
94
+ VCENTER = 1; // The y coordinate will be treated as the middle between
95
+ // the top and bottom edges of the window.
96
+ BOTTOM = 3; // The y coordinate will be treated as the bottom edge of
97
+ // the window.
98
+ }
99
+
100
+ // Corresponds to the x and y coordinate of the window geometry. The window
101
+ // geometry includes the window frame.
102
+ // See: https://doc.qt.io/qt-5/application-windows.html#window-geometry for
103
+ // details and pecularities on linux.
104
+ uint32 x = 1;
105
+ uint32 y = 2;
106
+
107
+ HorizontalAnchor horizontalAnchor = 3;
108
+ VerticalAnchor verticalAnchor = 4;
109
+ }
110
+
111
+ message PaneEntry {
112
+ enum PaneIndex {
113
+ // When specified as KEEP_CURRENT, extended controls will display the
114
+ // current pane.
115
+ // If it is the first time for extended controls to be shown, LOCATION
116
+ // will be used.
117
+ KEEP_CURRENT = 0;
118
+ // Referenced from
119
+ // external/qemu/android/android-emu/android/skin/qt/extended-window-styles.h
120
+ LOCATION = 1;
121
+ MULTIDISPLAY = 2;
122
+ CELLULAR = 3;
123
+ BATTERY = 4;
124
+ CAMERA = 5;
125
+ TELEPHONE = 6;
126
+ DPAD = 7;
127
+ TV_REMOTE = 8;
128
+ ROTARY = 9;
129
+ MICROPHONE = 10;
130
+ FINGER = 11;
131
+ VIRT_SENSORS = 12;
132
+ SNAPSHOT = 13;
133
+ BUGREPORT = 14;
134
+ RECORD = 15;
135
+ GOOGLE_PLAY = 16;
136
+ SETTINGS = 17;
137
+ HELP = 18;
138
+ CAR = 19;
139
+ CAR_ROTARY = 20;
140
+ SENSOR_REPLAY = 21;
141
+ };
142
+ PaneIndex index = 1;
143
+
144
+ // Set the window position to the specified coordinates if no coordinates are
145
+ // present in the AVD, otherwise this value will be igonred.
146
+ WindowPosition position = 2;
147
+ }
@@ -27,8 +27,9 @@ export interface IVvdParams {
27
27
  flavor?: string;
28
28
  density?: string;
29
29
  customLcdRadius?: string;
30
- imageType: VelaImageType;
30
+ imageType?: VelaImageType;
31
31
  skinInfo?: EmulatorSkin;
32
+ marketName?: string;
32
33
  }
33
34
  export interface EmulatorPart {
34
35
  display: {
@@ -100,7 +101,8 @@ export declare enum SDKParts {
100
101
  QA = "qa",
101
102
  SKINS = "skins",
102
103
  SYSTEM_IMAGES = "system-images",
103
- MODEM_SIMULATOR = "modem_simulator"
104
+ MODEM_SIMULATOR = "modem_simulator",
105
+ TOOLS = "tools"
104
106
  }
105
107
  export declare enum VELAHOME {
106
108
  SDK = ".vela/sdk",
package/lib/typing/Vvd.js CHANGED
@@ -23,6 +23,7 @@ let SDKParts = exports.SDKParts = /*#__PURE__*/function (SDKParts) {
23
23
  SDKParts["SKINS"] = "skins";
24
24
  SDKParts["SYSTEM_IMAGES"] = "system-images";
25
25
  SDKParts["MODEM_SIMULATOR"] = "modem_simulator";
26
+ SDKParts["TOOLS"] = "tools";
26
27
  return SDKParts;
27
28
  }({});
28
29
  let VELAHOME = exports.VELAHOME = /*#__PURE__*/function (VELAHOME) {
@@ -1,27 +1,35 @@
1
1
  import { Readable } from 'stream';
2
- import { MouseEvent } from './types/MouseEvent';
3
- import { GrpcKeyboardEvent } from './types/KeyEvent';
4
2
  import { GrpcClient } from './types/GrpcClient';
5
3
  import { EmulatorConfig } from '../../emulatorutil/running';
6
4
  import { Metadata } from '@grpc/grpc-js';
7
- export default class GrpcEmulator {
5
+ import { ImageFormat, KeyboardEvent, LogMessage, MouseEvent, SensorValue } from './types/proto-types';
6
+ import { UiControllerClient } from './types/UiControllerClient';
7
+ export declare const AuthorizationKey = "Authorization";
8
+ export declare class GrpcEmulator {
8
9
  eConf: EmulatorConfig;
9
- protoPath: string;
10
+ protoPath: string[];
11
+ ip: string;
10
12
  client: GrpcClient;
13
+ uiClient: UiControllerClient;
11
14
  connected: boolean;
12
15
  token: string;
13
16
  authMate: Metadata;
14
- deadline: Date;
15
17
  controller: any;
16
18
  screenshotStream?: Readable;
17
- constructor(eConf: EmulatorConfig, protoPath: string);
19
+ logcatStream?: Readable;
20
+ constructor(eConf: EmulatorConfig, protoPath: string[], ip?: string);
18
21
  close(): void;
19
22
  getAuthMeta(): Metadata;
20
23
  waitForReady(): Promise<boolean>;
21
- startStream(onStreamScreenshot: (buffer: Buffer) => void): Promise<void>;
24
+ streamScreenshot(imageFormat?: ImageFormat): Promise<Readable>;
22
25
  getScreenshot(): Promise<Buffer>;
23
26
  getStatus(): Promise<unknown>;
24
27
  sendMouse(message: MouseEvent): void;
25
- sendKey(data: GrpcKeyboardEvent): void;
28
+ sendKey(data: KeyboardEvent): void;
29
+ showExtendedControls(paneIndex?: number): Promise<unknown>;
30
+ closeExtendedControls(): Promise<unknown>;
31
+ setSensor(sensorValue: SensorValue): Promise<unknown>;
32
+ getSensor(sensorValue: SensorValue): Promise<unknown>;
33
+ streamLogcat(params?: LogMessage): Promise<Readable>;
26
34
  }
27
35
  export declare function createGrpcClient(eConf: EmulatorConfig): GrpcEmulator;