1 #pragma once 2 3 #include <functional> 4 #include <set> 5 #include <string> 6 7 #include "common/libs/fs/shared_fd.h" 8 #include "common/libs/utils/subprocess.h" 9 #include "host/commands/run_cvd/process_monitor.h" 10 #include "host/libs/config/cuttlefish_config.h" 11 12 std::vector <cvd::SharedFD> LaunchKernelLogMonitor( 13 const vsoc::CuttlefishConfig& config, 14 cvd::ProcessMonitor* process_monitor, 15 unsigned int number_of_event_pipes); 16 void LaunchAdbConnectorIfEnabled(cvd::ProcessMonitor* process_monitor, 17 const vsoc::CuttlefishConfig& config, 18 cvd::SharedFD adbd_events_pipe); 19 void LaunchSocketVsockProxyIfEnabled(cvd::ProcessMonitor* process_monitor, 20 const vsoc::CuttlefishConfig& config); 21 22 struct StreamerLaunchResult { 23 bool launched = false; 24 std::optional<unsigned int> frames_server_vsock_port; 25 std::optional<unsigned int> touch_server_vsock_port; 26 std::optional<unsigned int> keyboard_server_vsock_port; 27 }; 28 StreamerLaunchResult LaunchVNCServer( 29 const vsoc::CuttlefishConfig& config, 30 cvd::ProcessMonitor* process_monitor, 31 std::function<bool(cvd::MonitorEntry*)> callback); 32 33 struct TombstoneReceiverPorts { 34 std::optional<unsigned int> server_vsock_port; 35 }; 36 TombstoneReceiverPorts LaunchTombstoneReceiverIfEnabled( 37 const vsoc::CuttlefishConfig& config, cvd::ProcessMonitor* process_monitor); 38 39 struct ConfigServerPorts { 40 std::optional<unsigned int> server_vsock_port; 41 }; 42 ConfigServerPorts LaunchConfigServer(const vsoc::CuttlefishConfig& config, 43 cvd::ProcessMonitor* process_monitor); 44 45 struct LogcatServerPorts { 46 std::optional<unsigned int> server_vsock_port; 47 }; 48 LogcatServerPorts LaunchLogcatReceiverIfEnabled(const vsoc::CuttlefishConfig& config, 49 cvd::ProcessMonitor* process_monitor); 50 51 StreamerLaunchResult LaunchWebRTC(cvd::ProcessMonitor* process_monitor, 52 const vsoc::CuttlefishConfig& config); 53 54 void LaunchVerhicleHalServerIfEnabled(const vsoc::CuttlefishConfig& config, 55 cvd::ProcessMonitor* process_monitor); 56