| 285 | } |
| 286 | |
| 287 | MaaCtrlId RemoteController::post_shell(const std::string& cmd, int64_t timeout) |
| 288 | { |
| 289 | ControllerPostShellReverseRequest req { |
| 290 | .controller_id = controller_id_, |
| 291 | .cmd = cmd, |
| 292 | .timeout = timeout, |
| 293 | }; |
| 294 | auto resp_opt = server_.send_and_recv<ControllerPostShellReverseResponse>(req); |
| 295 | if (!resp_opt) { |
| 296 | return MaaInvalidId; |
| 297 | } |
| 298 | return resp_opt->ctrl_id; |
| 299 | } |
| 300 | |
| 301 | MaaCtrlId RemoteController::post_inactive() |
| 302 | { |
no outgoing calls
no test coverage detected