From ad42d73cd36d27757e57928f5c1db490fc37fb88 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Mon, 31 Oct 2022 15:20:31 -0400 Subject: Add LoadSettingsFile API to support ephemeral settings. --- binaryninjaapi.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index f6167129..55838df9 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -12558,6 +12558,19 @@ namespace BinaryNinja { static Ref Instance(const std::string& schemaId = ""); virtual ~Settings() {} + /*! Sets the file that this \c Settings instance uses when initially loading, and modifying \ + settings for the specified scope. + + \note At times it may be useful to make ephemeral changes to settings that are not saved to file. This can be accomplished \ + by calling \c LoadSettingsFile without specifying a filename. This action also resets settings to their default value. + + \param fileName the settings filename + \param scope the BNSettingsScope + \param view a BinaryView object + \return True if the load is successful, False otherwise + */ + bool LoadSettingsFile(const std::string& fileName, BNSettingsScope scope = SettingsAutoScope, Ref view = nullptr); + /*! Sets the resource identifier for this \c Settings instance. When accessing setting values at the \c SettingsResourceScope level, the resource identifier is passed along through the backing store interface. -- cgit v1.3.1