summaryrefslogtreecommitdiff
path: root/ui/getsymbolslistthread.h
diff options
context:
space:
mode:
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