summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2022-10-31 15:20:31 -0400
committerPeter LaFosse <peter@vector35.com>2022-11-10 16:19:13 -0500
commitad42d73cd36d27757e57928f5c1db490fc37fb88 (patch)
tree433902b6bffbd2c0fcc4552d604d1bf15c011f1a /binaryninjaapi.h
parent51241bb7182524d2f7c6ed32459cf9329c847673 (diff)
Add LoadSettingsFile API to support ephemeral settings.
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h13
1 files changed, 13 insertions, 0 deletions
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<Settings> 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<BinaryView> 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.