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 {
17  Device,
18  DeviceProperties,
19  ProxyClient,
20} from 'trace_collection/proxy_client';
21import {ConfigMap} from './trace_collection_utils';
22
23export interface Connection {
24  adbSuccess: () => boolean;
25  setProxyKey?(key: string): any;
26  devices(): Device;
27  selectedDevice(): DeviceProperties;
28  selectedDeviceId(): string;
29  restart(): any;
30  selectDevice(id: string): any;
31  state(): any;
32  onConnectChange(newState: any): any;
33  resetLastDevice(): any;
34  isDevicesState(): boolean;
35  isStartTraceState(): boolean;
36  isErrorState(): boolean;
37  isStartingTraceState(): boolean;
38  isEndTraceState(): boolean;
39  isLoadDataState(): boolean;
40  isConnectingState(): boolean;
41  throwNoTargetsError(): any;
42  startTrace(
43    requestedTraces: string[],
44    reqEnableConfig?: string[],
45    reqSelectedSfConfig?: ConfigMap,
46    reqSelectedWmConfig?: ConfigMap,
47  ): any;
48  endTrace(): any;
49  adbData(): File[];
50  dumpState(requestedDumps: string[]): any;
51  proxy?: ProxyClient;
52}
53