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

Method clone

source/MaaAgentServer/RemoteInstance/RemoteContext.cpp:162–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162MaaContext* 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
179MaaTaskId RemoteContext::task_id() const
180{

Callers 4

handle_context_cloneMethod · 0.45
decode_rawMethod · 0.45
screencapMethod · 0.45
screencapMethod · 0.45

Calls 2

moveFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected