From a46902ef8bbde08221ffd869054e206c0dfc2234 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Mon, 24 May 2021 22:37:09 -0400 Subject: Updated examples and docs --- examples/uinotification/uinotification.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'examples/uinotification/uinotification.cpp') diff --git a/examples/uinotification/uinotification.cpp b/examples/uinotification/uinotification.cpp index f498db4c..d9eada8e 100644 --- a/examples/uinotification/uinotification.cpp +++ b/examples/uinotification/uinotification.cpp @@ -2,7 +2,8 @@ #include "uinotification.h" #include "filecontext.h" #include "viewframe.h" -#include +#include +#include using namespace BinaryNinja; @@ -92,6 +93,23 @@ void NotificationListener::OnAddressChange(UIContext* context, ViewFrame* frame, } +bool NotificationListener::GetNameForFile(UIContext* context, FileContext* file, QString& name) +{ + LogInfo("GetNameForFile"); + name = file->getFilename() + " Foo"; + return true; +} + + +bool NotificationListener::GetNameForPath(UIContext* context, const QString& path, QString& name) +{ + QFileInfo info(path); + LogInfo("GetNameForPath"); + name = info.baseName() + " Foo"; + return true; +} + + extern "C" { BN_DECLARE_UI_ABI_VERSION -- cgit v1.3.1