Cody Schuffelen | 5bc697c | 2019-01-28 21:05:29 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Cody Schuffelen | 17b3472 | 2019-01-28 22:57:14 -0800 | [diff] [blame] | 3 | #include <functional> |
Cody Schuffelen | b13869b | 2019-11-26 18:46:34 -0800 | [diff] [blame] | 4 | #include <set> |
| 5 | #include <string> |
Cody Schuffelen | 17b3472 | 2019-01-28 22:57:14 -0800 | [diff] [blame] | 6 | |
Cody Schuffelen | b13869b | 2019-11-26 18:46:34 -0800 | [diff] [blame] | 7 | #include "common/libs/fs/shared_fd.h" |
Cody Schuffelen | 5bc697c | 2019-01-28 21:05:29 -0800 | [diff] [blame] | 8 | #include "common/libs/utils/subprocess.h" |
Cody Schuffelen | 147b88e | 2019-09-09 16:00:11 -0700 | [diff] [blame] | 9 | #include "host/commands/run_cvd/process_monitor.h" |
Cody Schuffelen | 5bc697c | 2019-01-28 21:05:29 -0800 | [diff] [blame] | 10 | #include "host/libs/config/cuttlefish_config.h" |
| 11 | |
Jorge E. Moreira | 277e1c4 | 2019-05-06 17:24:27 -0700 | [diff] [blame] | 12 | std::vector <cvd::SharedFD> LaunchKernelLogMonitor( |
| 13 | const vsoc::CuttlefishConfig& config, |
| 14 | cvd::ProcessMonitor* process_monitor, |
| 15 | unsigned int number_of_event_pipes); |
Cody Schuffelen | 660d9e8 | 2019-01-29 16:33:33 -0800 | [diff] [blame] | 16 | void LaunchAdbConnectorIfEnabled(cvd::ProcessMonitor* process_monitor, |
Jorge E. Moreira | 9ec1585 | 2019-05-02 17:52:58 -0700 | [diff] [blame] | 17 | const vsoc::CuttlefishConfig& config, |
| 18 | cvd::SharedFD adbd_events_pipe); |
Cody Schuffelen | 660d9e8 | 2019-01-29 16:33:33 -0800 | [diff] [blame] | 19 | void LaunchSocketVsockProxyIfEnabled(cvd::ProcessMonitor* process_monitor, |
| 20 | const vsoc::CuttlefishConfig& config); |
Cody Schuffelen | b13869b | 2019-11-26 18:46:34 -0800 | [diff] [blame] | 21 | |
| 22 | struct 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 | }; |
| 27 | VncServerPorts LaunchVNCServerIfEnabled( |
| 28 | const vsoc::CuttlefishConfig& config, |
| 29 | cvd::ProcessMonitor* process_monitor, |
| 30 | std::function<bool(cvd::MonitorEntry*)> callback); |
Cody Schuffelen | d3f27b9 | 2019-11-26 19:04:43 -0800 | [diff] [blame] | 31 | |
| 32 | struct TombstoneReceiverPorts { |
| 33 | std::optional<int> server_vsock_port; |
| 34 | }; |
| 35 | TombstoneReceiverPorts LaunchTombstoneReceiverIfEnabled( |
| 36 | const vsoc::CuttlefishConfig& config, cvd::ProcessMonitor* process_monitor); |
Cody Schuffelen | c9183ba | 2019-12-05 15:23:46 -0800 | [diff] [blame] | 37 | |
| 38 | struct ConfigServerPorts { |
| 39 | std::optional<int> server_vsock_port; |
| 40 | }; |
| 41 | ConfigServerPorts LaunchConfigServer(const vsoc::CuttlefishConfig& config, |
| 42 | cvd::ProcessMonitor* process_monitor); |
Cody Schuffelen | eb5c215 | 2019-12-05 15:44:49 -0800 | [diff] [blame] | 43 | |
| 44 | struct LogcatServerPorts { |
| 45 | std::optional<int> server_vsock_port; |
| 46 | }; |
| 47 | LogcatServerPorts LaunchLogcatReceiverIfEnabled(const vsoc::CuttlefishConfig& config, |
| 48 | cvd::ProcessMonitor* process_monitor); |