summaryrefslogtreecommitdiff
path: root/binaryview.cpp
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2021-05-31 15:46:57 +0800
committerXusheng <xusheng@vector35.com>2021-06-11 10:37:10 +0800
commit93f91f8d2f1fef1866b3ee87042ec62f99a8d087 (patch)
tree55a6439dcf66d005eaa3493fe6eb190c6338b47e /binaryview.cpp
parent7954a49df95eba2ec7efeca3b4493a6c51070236 (diff)
Add TypeReferenceChanged notification
Diffstat (limited to 'binaryview.cpp')
-rw-r--r--binaryview.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp
index e57b6bf4..476b897b 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -216,6 +216,15 @@ void BinaryDataNotification::TypeUndefinedCallback(void* ctxt, BNBinaryView* dat
}
+void BinaryDataNotification::TypeReferenceChangedCallback(void* ctxt, BNBinaryView* data, BNQualifiedName* name, BNType* type)
+{
+ BinaryDataNotification* notify = (BinaryDataNotification*)ctxt;
+ Ref<BinaryView> view = new BinaryView(BNNewViewReference(data));
+ Ref<Type> typeObj = new Type(BNNewTypeReference(type));
+ notify->OnTypeReferenceChanged(view, QualifiedName::FromAPIObject(name), typeObj);
+}
+
+
BinaryDataNotification::BinaryDataNotification()
{
m_callbacks.context = this;
@@ -241,6 +250,7 @@ BinaryDataNotification::BinaryDataNotification()
m_callbacks.stringRemoved = StringRemovedCallback;
m_callbacks.typeDefined = TypeDefinedCallback;
m_callbacks.typeUndefined = TypeUndefinedCallback;
+ m_callbacks.typeReferenceChanged = TypeReferenceChangedCallback;
}