summaryrefslogtreecommitdiff
path: root/database.cpp
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2023-05-31 20:55:14 -0400
committerGlenn Smith <glenn@vector35.com>2023-06-08 17:18:30 -0400
commit8804952612609239040025330591356571302187 (patch)
tree5cb3e3eaf6216758b825c3581d6702ef62a24bdb /database.cpp
parent1509435163893916647427200437885127141494 (diff)
API to read raw undo buffer (for DHView)
Diffstat (limited to 'database.cpp')
-rw-r--r--database.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/database.cpp b/database.cpp
index 887cdea7..dd258967 100644
--- a/database.cpp
+++ b/database.cpp
@@ -276,6 +276,17 @@ DataBuffer Snapshot::GetFileContentsHash()
}
+DataBuffer Snapshot::GetUndoData()
+{
+ BNDataBuffer* buffer = BNGetSnapshotUndoData(m_object);
+ if (buffer == nullptr)
+ {
+ throw DatabaseException("BNGetSnapshotUndoData");
+ }
+ return DataBuffer(buffer);
+}
+
+
vector<UndoEntry> Snapshot::GetUndoEntries()
{
return GetUndoEntries([](size_t, size_t) { return true; });