| 160 | } |
| 161 | |
| 162 | MaaContext* RemoteContext::clone() const |
| 163 | { |
| 164 | ContextCloneReverseRequest req { |
| 165 | .context_id = context_id_, |
| 166 | }; |
| 167 | |
| 168 | auto resp_opt = server_.send_and_recv<ContextCloneReverseResponse>(req); |
| 169 | if (!resp_opt) { |
| 170 | return nullptr; |
| 171 | } |
| 172 | |
| 173 | auto clone = std::make_unique<RemoteContext>(server_, resp_opt->clone_id); |
| 174 | auto& ptr = clone_holder_.emplace_back(std::move(clone)); |
| 175 | |
| 176 | return ptr.get(); |
| 177 | } |
| 178 | |
| 179 | MaaTaskId RemoteContext::task_id() const |
| 180 | { |
no test coverage detected