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

Method subactivities

python/workflow.py:447–465  ·  view source on GitHub ↗

``subactivities`` Retrieve the list of all activities, or optionally a filtered list. :param str activity: if specified, return the direct children and optionally the descendants of the ``activity`` (includes ``activity``) :param bool immediate: whether to include only direct children of ``a

(self, activity: ActivityType = "", immediate: bool = True)

Source from the content-addressed store, hash-verified

445 core.BNFreeStringList(result, length.value)
446
447 def subactivities(self, activity: ActivityType = "", immediate: bool = True) -> List[str]:
448 """
449 ``subactivities`` Retrieve the list of all activities, or optionally a filtered list.
450
451 :param str activity: if specified, return the direct children and optionally the descendants of the ``activity`` (includes ``activity``)
452 :param bool immediate: whether to include only direct children of ``activity`` or all descendants
453 :return: list of activity names
454 :rtype: list[str]
455 """
456 length = ctypes.c_ulonglong()
457 result = core.BNWorkflowGetSubactivities(self.handle, str(activity), immediate, ctypes.byref(length))
458 assert result is not None, "core.BNWorkflowGetSubactivities returned None"
459 out_list = []
460 try:
461 for i in range(length.value):
462 out_list.append(result[i].decode('utf-8'))
463 return out_list
464 finally:
465 core.BNFreeStringList(result, length.value)
466
467 def assign_subactivities(self, activity: Activity, activities: Union[List[str], str]) -> bool:
468 """

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected