diff options
| author | Brian Potchik <brian@vector35.com> | 2020-06-17 17:25:55 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2020-06-17 17:25:55 -0400 |
| commit | a21af1a6d10074774315c6510d98920fb83338a2 (patch) | |
| tree | 4b129b4816d04bc59e1fd11f6112a1ac7924661c | |
| parent | 676488bb396f41c4855af97fbe0d996238688399 (diff) | |
ResetAll settings API resets settings in the active schema by default.
| -rw-r--r-- | binaryninjaapi.h | 2 | ||||
| -rw-r--r-- | binaryninjacore.h | 2 | ||||
| -rw-r--r-- | python/settings.py | 4 | ||||
| -rw-r--r-- | settings.cpp | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 95575d41..3d48b6b4 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -5072,7 +5072,7 @@ __attribute__ ((format (printf, 1, 2))) bool CopyValuesFrom(Ref<Settings> source, BNSettingsScope scope = SettingsAutoScope); bool Reset(const std::string& key, Ref<BinaryView> view = nullptr, BNSettingsScope scope = SettingsAutoScope); - bool ResetAll(Ref<BinaryView> view = nullptr, BNSettingsScope scope = SettingsAutoScope); + bool ResetAll(Ref<BinaryView> view = nullptr, BNSettingsScope scope = SettingsAutoScope, bool schemaOnly = true); template<typename T> T Get(const std::string& key, Ref<BinaryView> view = nullptr, BNSettingsScope* scope = nullptr); std::string GetJson(const std::string& key, Ref<BinaryView> view = nullptr, BNSettingsScope* scope = nullptr); diff --git a/binaryninjacore.h b/binaryninjacore.h index 54f3ffbb..384e30f3 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -4528,7 +4528,7 @@ __attribute__ ((format (printf, 1, 2))) BINARYNINJACOREAPI bool BNSettingsCopyValuesFrom(BNSettings* settings, BNSettings* source, BNSettingsScope scope); BINARYNINJACOREAPI bool BNSettingsReset(BNSettings* settings, const char* key, BNBinaryView* view, BNSettingsScope scope); - BINARYNINJACOREAPI bool BNSettingsResetAll(BNSettings* settings, BNBinaryView* view, BNSettingsScope scope); + BINARYNINJACOREAPI bool BNSettingsResetAll(BNSettings* settings, BNBinaryView* view, BNSettingsScope scope, bool schemaOnly); BINARYNINJACOREAPI bool BNSettingsGetBool(BNSettings* settings, const char* key, BNBinaryView* view, BNSettingsScope* scope); BINARYNINJACOREAPI double BNSettingsGetDouble(BNSettings* settings, const char* key, BNBinaryView* view, BNSettingsScope* scope); diff --git a/python/settings.py b/python/settings.py index 3b92ec5d..a83898af 100644 --- a/python/settings.py +++ b/python/settings.py @@ -208,10 +208,10 @@ class Settings(object): view = view.handle return core.BNSettingsReset(self.handle, key, view, scope) - def reset_all(self, view = None, scope = SettingsScope.SettingsAutoScope): + def reset_all(self, view = None, scope = SettingsScope.SettingsAutoScope, schema_only = True): if view is not None: view = view.handle - return core.BNSettingsResetAll(self.handle, view, scope) + return core.BNSettingsResetAll(self.handle, view, scope, schema_only) def get_bool(self, key, view = None): if view is not None: diff --git a/settings.cpp b/settings.cpp index 62d928e1..26448937 100644 --- a/settings.cpp +++ b/settings.cpp @@ -193,9 +193,9 @@ bool Settings::Reset(const string& key, Ref<BinaryView> view, BNSettingsScope sc } -bool Settings::ResetAll(Ref<BinaryView> view, BNSettingsScope scope) +bool Settings::ResetAll(Ref<BinaryView> view, BNSettingsScope scope, bool schemaOnly) { - return BNSettingsResetAll(m_object, view ? view->GetObject() : nullptr, scope); + return BNSettingsResetAll(m_object, view ? view->GetObject() : nullptr, scope, schemaOnly); } |
