diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-10-14 16:00:22 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2024-10-14 16:03:03 -0400 |
| commit | a10ba14f3528577432f51a940fcadc69a535af4b (patch) | |
| tree | 649ccd405da1ae3822a384af9aa014e6afee569a /binaryninjaapi.h | |
| parent | a9d3753b9e6dcdb463a85a9d613ae37b00e94157 (diff) | |
Add BinaryNinja::Load(Ref<ProjectFile>) to c++ api
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 4acb7b7e..bc13d67c 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -1456,6 +1456,7 @@ namespace BinaryNinja { }; class BinaryView; + class ProjectFile; /*! OpenView opens a file on disk and returns a BinaryView, attempting to use the most relevant BinaryViewType and generating default load options (which are overridable). @@ -1527,6 +1528,23 @@ namespace BinaryNinja { */ Ref<BinaryView> Load(Ref<BinaryView> rawData, bool updateAnalysis = true, const std::string& options = "{}", std::function<bool(size_t, size_t)> progress = {}); + /*! Open a BinaryView from a ProjectFile, initializing data views and loading settings. + + @threadmainonly + + \see BinaryNinja::Load(const std::string&, bool, std::function<bool(size_t, size_t)>, Json::Value) + for discussion of this function. + + \param rawData BinaryView with raw binary data to load + \param updateAnalysis If true, UpdateAnalysisAndWait() will be called after opening + a BinaryView. + \param options A Json string whose keys are setting identifiers and whose values are the desired settings. + \param progress Optional function to be called with progress updates as the view is + being loaded. If the function returns false, it will cancel Load. + \return Constructed view, or a nullptr Ref<BinaryView> + */ + Ref<BinaryView> Load(Ref<ProjectFile> rawData, bool updateAnalysis = true, const std::string& options = "{}", std::function<bool(size_t, size_t)> progress = {}); + /*! Deprecated. Use non-metadata version. */ |
