diff options
| author | Mason Reed <mason@vector35.com> | 2024-05-22 20:06:24 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2024-05-22 20:22:44 -0400 |
| commit | dff192e3bd6d5737633a740988c31e4ecba92998 (patch) | |
| tree | 39dfd844e8c35c0af37e917f97abeabf568c8d72 /binaryninjaapi.h | |
| parent | 331d226464fb043a12eada4f4c752d8ef20c5efb (diff) | |
Add background task example plugin
Clarify BackgroundTask functionality (skip-note, skip-ci)
Providing clear documentation so it is understood that background tasks do not manage the execution of said the task.
Add background_task plugin to examples section
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 364eb564..d2cf74d2 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -15513,8 +15513,20 @@ namespace BinaryNinja { public CoreRefCountObject<BNBackgroundTask, BNNewBackgroundTaskReference, BNFreeBackgroundTask> { public: - BackgroundTask(BNBackgroundTask* task); - BackgroundTask(const std::string& initialText, bool canCancel); + BackgroundTask(BNBackgroundTask *task); + + /*! + Provides a mechanism for reporting progress of + an optionally cancelable task to the user via the status bar in the UI. + If canCancel is is `True`, then the task can be cancelled either + programmatically or by the user via the UI. + + \note This API does not provide a means to execute a task. The caller is responsible to execute (and possibly cancel) the task. + + \param initialText Text description of the progress of the background task (displayed in status bar of the UI) + \param canCancel Whether the task can be cancelled + */ + BackgroundTask(const std::string &initialText, bool canCancel); bool CanCancel() const; bool IsCancelled() const; |
