MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / handle_controller_running

Method handle_controller_running

source/MaaAgentClient/Client/AgentClient.cpp:2308–2326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2306}
2307
2308bool AgentClient::handle_controller_running(const json::value& j)
2309{
2310 if (!j.is<ControllerRunningReverseRequest>()) {
2311 return false;
2312 }
2313 const ControllerRunningReverseRequest& req = j.as<ControllerRunningReverseRequest>();
2314 LogFunc << VAR(req) << VAR(ipc_addr_);
2315 MaaController* controller = query_controller(req.controller_id);
2316 if (!controller) {
2317 LogError << "controller not found" << VAR(req.controller_id);
2318 return false;
2319 }
2320 bool running = controller->running();
2321 ControllerRunningReverseResponse resp {
2322 .ret = running,
2323 };
2324 send(resp);
2325 return true;
2326}
2327
2328bool AgentClient::handle_controller_cached_image(const json::value& j)
2329{

Callers

nothing calls this directly

Calls 1

runningMethod · 0.45

Tested by

no test coverage detected