diff options
| author | Rusty Wagner <rusty@vector35.com> | 2016-09-15 01:55:28 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2016-09-15 01:55:28 -0400 |
| commit | 124cf1bc4f465a915621b7ac81af94b9a69a937a (patch) | |
| tree | 2e9319c6ac28141a26a83197a210923ef161e58c /binaryninjaapi.h | |
| parent | fb0d896cd5cc3197a8dd259a9ca53f2788ef5fdb (diff) | |
Add APIs to display busy indicator for long running plugin tasks
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 30285380..3400cca7 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -2260,4 +2260,23 @@ namespace BinaryNinja public: virtual void AddMainThreadAction(MainThreadAction* action) = 0; }; + + class BackgroundTask: public CoreRefCountObject<BNBackgroundTask, + BNNewBackgroundTaskReference, BNFreeBackgroundTask> + { + public: + BackgroundTask(BNBackgroundTask* task); + BackgroundTask(const std::string& initialText, bool canCancel); + + bool CanCancel() const; + bool IsCancelled() const; + bool IsFinished() const; + std::string GetProgressText() const; + + void Cancel(); + void Finish(); + void SetProgressText(const std::string& text); + + static std::vector<Ref<BackgroundTask>> GetRunningTasks(); + }; } |
