summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 3034ac52..d81c6320 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -2149,12 +2149,22 @@ namespace BinaryNinja {
const std::function<bool(size_t progress, size_t total)>& progressCallback);
/*! Start recording actions taken so they can be undone at some point
+
+ \return Id of UndoEntry created, for passing to either CommitUndoActions or RevertUndoActions
*/
- void BeginUndoActions();
+ [[nodiscard]] std::string BeginUndoActions();
+
+ /*! Commit the actions taken since a call to BeginUndoActions.
+
+ \param id Id of UndoEntry created by BeginUndoActions
+ */
+ void CommitUndoActions(const std::string& id);
+
+ /*! Revert the actions taken since a call to BeginUndoActions.
- /*! Commit the actions taken since the last commit to the undo database.
+ \param id Id of UndoEntry created by BeginUndoActions
*/
- void CommitUndoActions();
+ void RevertUndoActions(const std::string& id);
/*! \return Whether it is possible to perform an Undo
*/
@@ -3549,13 +3559,22 @@ namespace BinaryNinja {
Ref<SaveSettings> settings = new SaveSettings());
/*! Start recording actions taken so they can be undone at some point
+
+ \return Id of UndoEntry created, for passing to either CommitUndoActions or RevertUndoActions
*/
- void BeginUndoActions();
- void AddUndoAction(UndoAction* action);
+ [[nodiscard]] std::string BeginUndoActions();
+
+ /*! Commit the actions taken since a call to BeginUndoActions.
+
+ \param id Id of UndoEntry created by BeginUndoActions
+ */
+ void CommitUndoActions(const std::string& id);
+
+ /*! Revert the actions taken since a call to BeginUndoActions.
- /*! Commit the actions taken since the last commit to the undo database.
+ \param id Id of UndoEntry created by BeginUndoActions
*/
- void CommitUndoActions();
+ void RevertUndoActions(const std::string& id);
/*!
\return Whether it is possible to perform an Undo