summaryrefslogtreecommitdiff
path: root/interaction.cpp
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2021-08-23 19:05:09 -0400
committerGlenn Smith <glenn@vector35.com>2021-11-18 21:37:52 -0500
commit994a42659dc500f602e83f91501ec4a959481fa5 (patch)
treeca783900c9a6d41dbdd98a1cd66a083d3e886578 /interaction.cpp
parent60f2ecd9d1961f7cd700e01f802bcf640c9d50e0 (diff)
Enterprise apis and support
Also secrets provider + openUrl
Diffstat (limited to 'interaction.cpp')
-rw-r--r--interaction.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/interaction.cpp b/interaction.cpp
index 05420f17..2f808067 100644
--- a/interaction.cpp
+++ b/interaction.cpp
@@ -415,6 +415,13 @@ static BNMessageBoxButtonResult ShowMessageBoxCallback(void* ctxt, const char* t
}
+static bool OpenUrlCallback(void* ctxt, const char* url)
+{
+ InteractionHandler* handler = (InteractionHandler*)ctxt;
+ return handler->OpenUrl(url);
+}
+
+
void BinaryNinja::RegisterInteractionHandler(InteractionHandler* handler)
{
BNInteractionHandlerCallbacks cb;
@@ -433,6 +440,7 @@ void BinaryNinja::RegisterInteractionHandler(InteractionHandler* handler)
cb.getDirectoryNameInput = GetDirectoryNameInputCallback;
cb.getFormInput = GetFormInputCallback;
cb.showMessageBox = ShowMessageBoxCallback;
+ cb.openUrl = OpenUrlCallback;
BNRegisterInteractionHandler(&cb);
}
@@ -660,6 +668,12 @@ BNMessageBoxButtonResult BinaryNinja::ShowMessageBox(const string& title, const
}
+bool BinaryNinja::OpenUrl(const std::string& url)
+{
+ return BNOpenUrl(url.c_str());
+}
+
+
ReportCollection::ReportCollection()
{
m_object = BNCreateReportCollection();