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

Method register_activity

python/workflow.py:367–384  ·  view source on GitHub ↗

``register_activity`` Register an Activity with this Workflow. :param Activity activity: the Activity to register :param list[str] subactivities: the list of Activities to assign :return: the registered Activity :rtype: Activity

(self, activity: Activity, subactivities: List[ActivityType] = [])

Source from the content-addressed store, hash-verified

365 return Workflow(handle=workflow)
366
367 def register_activity(self, activity: Activity, subactivities: List[ActivityType] = []) -> Optional[Activity]:
368 """
369 ``register_activity`` Register an Activity with this Workflow.
370
371 :param Activity activity: the Activity to register
372 :param list[str] subactivities: the list of Activities to assign
373 :return: the registered Activity
374 :rtype: Activity
375 """
376 if activity is None:
377 return None
378 input_list = (ctypes.c_char_p * len(subactivities))()
379 for i in range(0, len(subactivities)):
380 input_list[i] = str(subactivities[i]).encode('charmap')
381 handle = core.BNWorkflowRegisterActivity(self.handle, activity.handle, input_list, len(subactivities))
382 if handle is None:
383 return None
384 return activity
385
386 def contains(self, activity: ActivityType) -> bool:
387 """

Callers 3

plugin_initFunction · 0.45
insert_workflowFunction · 0.45

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected