blob: 95455efa247be94b92b4e7e6613b0b83f2e8ff57 [file] [log] [blame]
Cody Schuffelen5bc697c2019-01-28 21:05:29 -08001#pragma once
2
Cody Schuffelen17b34722019-01-28 22:57:14 -08003#include <functional>
Cody Schuffelenb13869b2019-11-26 18:46:34 -08004#include <set>
5#include <string>
Cody Schuffelen17b34722019-01-28 22:57:14 -08006
Cody Schuffelenb13869b2019-11-26 18:46:34 -08007#include "common/libs/fs/shared_fd.h"
Cody Schuffelen5bc697c2019-01-28 21:05:29 -08008#include "common/libs/utils/subprocess.h"
Cody Schuffelen147b88e2019-09-09 16:00:11 -07009#include "host/commands/run_cvd/process_monitor.h"
Cody Schuffelen5bc697c2019-01-28 21:05:29 -080010#include "host/libs/config/cuttlefish_config.h"
11
Jorge E. Moreira277e1c42019-05-06 17:24:27 -070012std::vector <cvd::SharedFD> LaunchKernelLogMonitor(
13 const vsoc::CuttlefishConfig& config,
14 cvd::ProcessMonitor* process_monitor,
15 unsigned int number_of_event_pipes);
Cody Schuffelen660d9e82019-01-29 16:33:33 -080016void LaunchAdbConnectorIfEnabled(cvd::ProcessMonitor* process_monitor,
Jorge E. Moreira9ec15852019-05-02 17:52:58 -070017 const vsoc::CuttlefishConfig& config,
18 cvd::SharedFD adbd_events_pipe);
Cody Schuffelen660d9e82019-01-29 16:33:33 -080019void LaunchSocketVsockProxyIfEnabled(cvd::ProcessMonitor* process_monitor,
20 const vsoc::CuttlefishConfig& config);
Cody Schuffelenb13869b2019-11-26 18:46:34 -080021
22struct VncServerPorts {
23 std::optional<int> frames_server_vsock_port;
24 std::optional<int> touch_server_vsock_port;
25 std::optional<int> keyboard_server_vsock_port;
26};
27VncServerPorts LaunchVNCServerIfEnabled(
28 const vsoc::CuttlefishConfig& config,
29 cvd::ProcessMonitor* process_monitor,
30 std::function<bool(cvd::MonitorEntry*)> callback);
Cody Schuffelend3f27b92019-11-26 19:04:43 -080031
32struct TombstoneReceiverPorts {
33 std::optional<int> server_vsock_port;
34};
35TombstoneReceiverPorts LaunchTombstoneReceiverIfEnabled(
36 const vsoc::CuttlefishConfig& config, cvd::ProcessMonitor* process_monitor);
Cody Schuffelenc9183ba2019-12-05 15:23:46 -080037
38struct ConfigServerPorts {
39 std::optional<int> server_vsock_port;
40};
41ConfigServerPorts LaunchConfigServer(const vsoc::CuttlefishConfig& config,
42 cvd::ProcessMonitor* process_monitor);
Cody Schuffeleneb5c2152019-12-05 15:44:49 -080043
44struct LogcatServerPorts {
45 std::optional<int> server_vsock_port;
46};
47LogcatServerPorts LaunchLogcatReceiverIfEnabled(const vsoc::CuttlefishConfig& config,
48 cvd::ProcessMonitor* process_monitor);