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

Method handle_resource_valid

source/MaaAgentClient/Client/AgentClient.cpp:1604–1622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1602}
1603
1604bool AgentClient::handle_resource_valid(const json::value& j)
1605{
1606 if (!j.is<ResourceValidReverseRequest>()) {
1607 return false;
1608 }
1609 const ResourceValidReverseRequest& req = j.as<ResourceValidReverseRequest>();
1610 LogFunc << VAR(req) << VAR(ipc_addr_);
1611 MaaResource* resource = query_resource(req.resource_id);
1612 if (!resource) {
1613 LogError << "resource not found" << VAR(req.resource_id);
1614 return false;
1615 }
1616 bool valid = resource->valid();
1617 ResourceValidReverseResponse resp {
1618 .ret = valid,
1619 };
1620 send(resp);
1621 return true;
1622}
1623
1624bool AgentClient::handle_resource_running(const json::value& j)
1625{

Callers

nothing calls this directly

Calls 1

validMethod · 0.45

Tested by

no test coverage detected