MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / GetLogStatus

Method GetLogStatus

workflow.cpp:227–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225
226
227std::pair<bool, bool> WorkflowMachine::GetLogStatus()
228{
229 rapidjson::Document request(rapidjson::kObjectType);
230 rapidjson::Document::AllocatorType& allocator = request.GetAllocator();
231 request.AddMember("command", "status", allocator);
232 rapidjson::StringBuffer buffer;
233 rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
234 request.Accept(writer);
235
236 string jsonResult;
237 if (m_function)
238 jsonResult = BNPostWorkflowRequestForFunction(m_function->GetObject(), buffer.GetString());
239 else
240 jsonResult = BNPostWorkflowRequestForBinaryView(m_view->GetObject(), buffer.GetString());
241
242 rapidjson::Document response(rapidjson::kObjectType);
243 response.Parse(jsonResult.c_str());
244 if (response.HasMember("logStatus") && response["logStatus"].HasMember("local") && response["logStatus"].HasMember("global"))
245 return {response["logStatus"]["local"].GetBool(), response["logStatus"]["global"].GetBool()};
246
247 return {false, false};
248}
249
250
251bool WorkflowMachine::SetLogEnabled(bool enable, bool global)

Callers

nothing calls this directly

Calls 6

AddMemberMethod · 0.80
c_strMethod · 0.80
HasMemberMethod · 0.80
GetObjectMethod · 0.45
GetStringMethod · 0.45
ParseMethod · 0.45

Tested by

no test coverage detected