diff options
| author | Brandon Miller <brandon@vector35.com> | 2024-10-02 08:17:25 -0400 |
|---|---|---|
| committer | Brandon Miller <bkmiller89@icloud.com> | 2024-10-03 08:39:54 -0400 |
| commit | e8488aaa64fb847ca2e639369176cf88c1bc4f8e (patch) | |
| tree | d08bade433501d3c76eae26d05245122b8081437 /binaryviewtype.cpp | |
| parent | 1b8b9d4ee4936faa8c9091720a312bb72964d8b1 (diff) | |
Added IsForceLoadable method to BinaryViewType
Diffstat (limited to 'binaryviewtype.cpp')
| -rw-r--r-- | binaryviewtype.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/binaryviewtype.cpp b/binaryviewtype.cpp index b1ef5226..2ee8e2ac 100644 --- a/binaryviewtype.cpp +++ b/binaryviewtype.cpp @@ -61,6 +61,13 @@ bool BinaryViewType::IsDeprecatedCallback(void* ctxt) } +bool BinaryViewType::IsForceLoadableCallback(void* ctxt) +{ + CallbackRef<BinaryViewType> type(ctxt); + return type->IsForceLoadable(); +} + + BNSettings* BinaryViewType::GetSettingsCallback(void* ctxt, BNBinaryView* data) { CallbackRef<BinaryViewType> type(ctxt); @@ -93,6 +100,7 @@ void BinaryViewType::Register(BinaryViewType* type) callbacks.parse = ParseCallback; callbacks.isValidForData = IsValidCallback; callbacks.isDeprecated = IsDeprecatedCallback; + callbacks.isForceLoadable = IsForceLoadableCallback; callbacks.getLoadSettingsForData = GetSettingsCallback; type->AddRefForRegistration(); @@ -247,6 +255,12 @@ bool BinaryViewType::IsDeprecated() } +bool BinaryViewType::IsForceLoadable() +{ + return false; +} + + void BinaryViewType::RegisterBinaryViewFinalizationEvent(const function<void(BinaryView* view)>& callback) { BinaryViewEvent* event = new BinaryViewEvent; @@ -347,6 +361,12 @@ bool CoreBinaryViewType::IsDeprecated() } +bool CoreBinaryViewType::IsForceLoadable() +{ + return BNIsBinaryViewTypeForceLoadable(m_object); +} + + Ref<Settings> CoreBinaryViewType::GetLoadSettingsForData(BinaryView* data) { BNSettings* settings = BNGetBinaryViewLoadSettingsForData(m_object, data->GetObject()); |
