From dc2a99e1159c3951b91935490ec8d2da5fc8e1e7 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Mon, 27 Dec 2021 15:18:11 -0500 Subject: Make various database progress functions cancellable --- binaryninjaapi.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 62d5d839..b33f49f8 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -918,9 +918,9 @@ __attribute__ ((format (printf, 1, 2))) DataBuffer GetFileContents(); DataBuffer GetFileContentsHash(); std::vector GetUndoEntries(); - std::vector GetUndoEntries(const std::function& progress); + std::vector GetUndoEntries(const std::function& progress); Ref ReadData(); - Ref ReadData(const std::function& progress); + Ref ReadData(const std::function& progress); bool HasAncestor(Ref other); }; @@ -935,7 +935,7 @@ __attribute__ ((format (printf, 1, 2))) std::vector> GetSnapshots(); void SetCurrentSnapshot(int64_t id); Ref GetCurrentSnapshot(); - int64_t WriteSnapshotData(std::vector parents, Ref file, const std::string& name, const Ref& data, bool autoSave, const std::function& progress); + int64_t WriteSnapshotData(std::vector parents, Ref file, const std::string& name, const Ref& data, bool autoSave, const std::function& progress); void RemoveSnapshot(int64_t id); std::vector GetGlobalKeys() const; @@ -1016,24 +1016,24 @@ __attribute__ ((format (printf, 1, 2))) bool IsBackedByDatabase(const std::string& binaryViewType = "") const; bool CreateDatabase(const std::string& name, BinaryView* data, Ref settings); bool CreateDatabase(const std::string& name, BinaryView* data, - const std::function& progressCallback, Ref settings); + const std::function& progressCallback, Ref settings); Ref OpenExistingDatabase(const std::string& path); Ref OpenExistingDatabase(const std::string& path, - const std::function& progressCallback); + const std::function& progressCallback); Ref OpenDatabaseForConfiguration(const std::string& path); bool SaveAutoSnapshot(BinaryView* data, Ref settings); bool SaveAutoSnapshot(BinaryView* data, - const std::function& progressCallback, Ref settings); + const std::function& progressCallback, Ref settings); void GetSnapshotData(Ref data, Ref cache, - const std::function& progress); + const std::function& progress); void ApplySnapshotData(BinaryView* file, Ref data, Ref cache, - const std::function& progress, bool openForConfiguration = false, bool restoreRawView = true); + const std::function& progress, bool openForConfiguration = false, bool restoreRawView = true); Ref GetDatabase(); bool Rebase(BinaryView* data, uint64_t address); - bool Rebase(BinaryView* data, uint64_t address, const std::function& progressCallback); + bool Rebase(BinaryView* data, uint64_t address, const std::function& progressCallback); - MergeResult MergeUserAnalysis(const std::string& name, const std::function& progress, + MergeResult MergeUserAnalysis(const std::string& name, const std::function& progress, const std::vector excludedHashes = {} ); void BeginUndoActions(); @@ -1662,9 +1662,9 @@ __attribute__ ((format (printf, 1, 2))) bool IsAnalysisChanged() const; bool CreateDatabase(const std::string& path, Ref settings = new SaveSettings()); bool CreateDatabase(const std::string& path, - const std::function& progressCallback, Ref settings = new SaveSettings()); + const std::function& progressCallback, Ref settings = new SaveSettings()); bool SaveAutoSnapshot(Ref settings = new SaveSettings()); - bool SaveAutoSnapshot(const std::function& progressCallback, Ref settings = new SaveSettings()); + bool SaveAutoSnapshot(const std::function& progressCallback, Ref settings = new SaveSettings()); void BeginUndoActions(); void AddUndoAction(UndoAction* action); -- cgit v1.3.1