| 103 | } |
| 104 | |
| 105 | MaaCtrlId RemoteController::post_swipe(int x1, int y1, int x2, int y2, int duration, int contact, int pressure) |
| 106 | { |
| 107 | ControllerPostSwipeReverseRequest req { |
| 108 | .controller_id = controller_id_, |
| 109 | .x1 = x1, |
| 110 | .y1 = y1, |
| 111 | .x2 = x2, |
| 112 | .y2 = y2, |
| 113 | .duration = duration, |
| 114 | .contact = contact, |
| 115 | .pressure = pressure, |
| 116 | }; |
| 117 | auto resp_opt = server_.send_and_recv<ControllerPostSwipeReverseResponse>(req); |
| 118 | if (!resp_opt) { |
| 119 | return MaaInvalidId; |
| 120 | } |
| 121 | return resp_opt->ctrl_id; |
| 122 | } |
| 123 | |
| 124 | MaaCtrlId RemoteController::post_click_key(int keycode) |
| 125 | { |
no outgoing calls
no test coverage detected