1// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_TEST_CHROMEDRIVER_CHROME_ADB_H_
6#define CHROME_TEST_CHROMEDRIVER_CHROME_ADB_H_
7
8#include <string>
9#include <vector>
10
11class Status;
12
13class Adb {
14 public:
15  virtual ~Adb() {}
16
17  virtual Status GetDevices(std::vector<std::string>* devices) = 0;
18  virtual Status ForwardPort(const std::string& device_serial,
19                             int local_port,
20                             const std::string& remote_abstract) = 0;
21  virtual Status SetCommandLineFile(const std::string& device_serial,
22                                    const std::string& command_line_file,
23                                    const std::string& exec_name,
24                                    const std::string& args) = 0;
25  virtual Status CheckAppInstalled(const std::string& device_serial,
26                                   const std::string& package) = 0;
27  virtual Status ClearAppData(const std::string& device_serial,
28                              const std::string& package) = 0;
29  virtual Status SetDebugApp(const std::string& device_serial,
30                             const std::string& package) = 0;
31  virtual Status Launch(const std::string& device_serial,
32                        const std::string& package,
33                        const std::string& activity) = 0;
34  virtual Status ForceStop(const std::string& device_serial,
35                           const std::string& package) = 0;
36  virtual Status GetPidByName(const std::string& device_serial,
37                              const std::string& process_name,
38                              int* pid) = 0;
39};
40
41#endif  // CHROME_TEST_CHROMEDRIVER_CHROME_ADB_H_
42