• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2022, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16import {ProxyClient} from 'trace_collection/proxy_client';
17import {ConfigMap} from './trace_collection_utils';
18
19export interface Device {
20  [key: string]: DeviceProperties;
21}
22
23export interface DeviceProperties {
24  authorised: boolean;
25  model: string;
26}
27
28export interface Connection {
29  adbSuccess: () => boolean;
30  setProxyKey?(key: string): any;
31  devices(): Device;
32  selectedDevice(): DeviceProperties;
33  selectedDeviceId(): string;
34  restart(): any;
35  selectDevice(id: string): any;
36  state(): any;
37  onConnectChange(newState: any): any;
38  resetLastDevice(): any;
39  isDevicesState(): boolean;
40  isStartTraceState(): boolean;
41  isErrorState(): boolean;
42  isEndTraceState(): boolean;
43  isLoadDataState(): boolean;
44  isConnectingState(): boolean;
45  throwNoTargetsError(): any;
46  startTrace(
47    reqEnableConfig?: string[],
48    reqSelectedSfConfig?: ConfigMap,
49    reqSelectedWmConfig?: ConfigMap
50  ): any;
51  endTrace(): any;
52  adbData(): File[];
53  dumpState(): any;
54  proxy?: ProxyClient;
55}
56