| 2683 | } |
| 2684 | |
| 2685 | MaaResource* AgentClient::query_resource(const std::string& resource_id) |
| 2686 | { |
| 2687 | auto it = resource_map_.find(resource_id); |
| 2688 | if (it == resource_map_.end()) { |
| 2689 | LogError << "resource not found" << VAR(resource_id); |
| 2690 | return nullptr; |
| 2691 | } |
| 2692 | return it->second; |
| 2693 | } |
| 2694 | |
| 2695 | void AgentClient::res_event_sink(void* handle, const char* message, const char* details_json, void* trans_arg) |
| 2696 | { |