summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/containerbrowser.h5
-rw-r--r--ui/containeropenrequest.h47
2 files changed, 0 insertions, 52 deletions
diff --git a/ui/containerbrowser.h b/ui/containerbrowser.h
index b9ba278f..363e5446 100644
--- a/ui/containerbrowser.h
+++ b/ui/containerbrowser.h
@@ -15,7 +15,6 @@
#include <vector>
-class ContainerOpenRequest;
class ContainerTreeModel : public QAbstractItemModel
{
@@ -122,8 +121,4 @@ public:
bool openWithOptionsRequested() const { return m_openWithOptionsRequested; }
static std::vector<TransformContextRef> openContainerFile(const QString& path, bool forceShowDialog = false, bool* outOpenWithOptions = nullptr);
-
- // Show the container browser dialog for the given open request.
- // Returns the selected contexts, or empty if the user cancelled.
- static std::vector<TransformContextRef> showBrowser(ContainerOpenRequest& request, bool* outOpenWithOptions = nullptr);
};
diff --git a/ui/containeropenrequest.h b/ui/containeropenrequest.h
deleted file mode 100644
index 5067534d..00000000
--- a/ui/containeropenrequest.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#pragma once
-
-#include "uitypes.h"
-
-#include <optional>
-#include <string>
-#include <vector>
-
-
-// Captures user settings and intent for opening a container file, and provides
-// policy decisions (e.g. whether to show the container browser) after processing.
-class BINARYNINJAUIAPI ContainerOpenRequest
-{
-public:
- enum Action {
- Cancel,
- AutoOpen,
- BrowseContainer,
- SelectArchitecture,
- };
-
- explicit ContainerOpenRequest(const std::string& path, bool forceContainerBrowser = false);
-
- TransformSessionRef session() const { return m_session; }
-
- // Create the session, process it, and determine what action the caller
- // should take. Returns Cancel if the session could not be created.
- Action resolve();
-
- // Get the default selection from a processed session. If no selection has
- // been made (e.g. because the session auto-opened), selects the current leaf.
- std::vector<TransformContextRef> selectedContexts();
-
- // When the container is a universal binary, the available architectures and the
- // index of the preferred one (if any).
- const std::vector<TransformContextRef>& architectureContexts() const { return m_archContexts; }
- std::optional<size_t> preferredArchitectureIndex() const { return m_preferredArch; }
-
-private:
- Action resolveUniversal(TransformContextRef universalCtx);
-
- TransformSessionRef m_session;
- std::vector<TransformContextRef> m_archContexts;
- std::optional<size_t> m_preferredArch;
- bool m_forceContainerBrowser = false;
- bool m_autoOpen = false;
-};