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

Function CustomGetInfo

source/binding/NodeJS/src/apis/callback.cpp:419–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419MaaBool CustomGetInfo(void* trans_arg, MaaStringBuffer* buffer)
420{
421 auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg);
422 auto ctx = customCtx->callbacks["get_info"];
423 auto result = ctx->Call<std::optional<std::string>>([&](maajs::FunctionType func) { return func.Call({ }); });
424 if (result) {
425 StringBuffer(buffer, false).set(*result);
426 return true;
427 }
428 else {
429 StringBuffer(buffer, false).set("{}");
430 return true;
431 }
432}

Callers

nothing calls this directly

Calls 3

StringBufferClass · 0.70
CallMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected