summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2016-09-15 01:55:28 -0400
committerRusty Wagner <rusty@vector35.com>2016-09-15 01:55:28 -0400
commit124cf1bc4f465a915621b7ac81af94b9a69a937a (patch)
tree2e9319c6ac28141a26a83197a210923ef161e58c /binaryninjaapi.h
parentfb0d896cd5cc3197a8dd259a9ca53f2788ef5fdb (diff)
Add APIs to display busy indicator for long running plugin tasks
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h19
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();
+ };
}