summaryrefslogtreecommitdiff
path: root/ui/getsymbolslistthread.h
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2021-02-05 20:28:13 +0800
committerXusheng <xusheng@vector35.com>2021-04-22 10:52:39 +0800
commitc4b1dd712783e7474570705e6d95183a0c02a76e (patch)
tree0393986e0078cb20610c8ad091db061f8f41a08b /ui/getsymbolslistthread.h
parenta355d5c9aa1978d10f378931bfd5f06be60bae98 (diff)
add persistent search result
Diffstat (limited to 'ui/getsymbolslistthread.h')
-rw-r--r--ui/getsymbolslistthread.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/ui/getsymbolslistthread.h b/ui/getsymbolslistthread.h
new file mode 100644
index 00000000..b806448a
--- /dev/null
+++ b/ui/getsymbolslistthread.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#ifndef BINARYNINJAUI_BINDINGS
+#include <QtCore/QThread>
+#include <QtCore/QEvent>
+#endif
+#include "binaryninjaapi.h"
+#include "uitypes.h"
+
+
+#ifdef BINARYNINJAUI_BINDINGS
+// QThread has issues working in the bindings on some platforms
+class GetSymbolsListThread;
+#else
+class BINARYNINJAUIAPI GetSymbolsListThread: public QThread
+{
+ Q_OBJECT
+
+ QStringList m_allSymbols;
+ std::function<void()> m_completeFunc;
+ std::mutex m_mutex;
+ bool m_done;
+ BinaryViewRef m_view;
+
+protected:
+ virtual void run() override;
+
+public:
+ GetSymbolsListThread(BinaryViewRef view, const std::function<void()>& completeFunc);
+ void cancel();
+
+ static int m_eventType;
+ int GetEventType() { return GetSymbolsListThread::m_eventType; }
+
+ const QStringList& getSymbols() const { return m_allSymbols; }
+};
+#endif