summaryrefslogtreecommitdiff
path: root/python/settings.py
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2020-06-20 13:03:25 -0400
committerBrian Potchik <brian@vector35.com>2020-06-20 13:03:25 -0400
commit3d9e96f84d781d1de57af895864d3183d2729a7a (patch)
tree36cfb27213abce56ac75cd286c0eb534b70b1ab4 /python/settings.py
parent18b85d4d33e61f002605f213623f96ac0fe7f321 (diff)
Add serialization support to the Settings Python API.
Diffstat (limited to 'python/settings.py')
-rw-r--r--python/settings.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/settings.py b/python/settings.py
index a83898af..d09a001a 100644
--- a/python/settings.py
+++ b/python/settings.py
@@ -200,6 +200,16 @@ class Settings(object):
def serialize_schema(self):
return core.BNSettingsSerializeSchema(self.handle)
+ def deserialize_settings(self, contents, view = None, scope = SettingsScope.SettingsAutoScope):
+ if view is not None:
+ view = view.handle
+ return core.BNDeserializeSettings(self.handle, contents, view, scope)
+
+ def serialize_settings(self, view = None, scope = SettingsScope.SettingsAutoScope):
+ if view is not None:
+ view = view.handle
+ return core.BNSerializeSettings(self.handle, view, scope)
+
def copy_values_from(self, source, scope = SettingsScope.SettingsAutoScope):
return core.BNSettingsCopyValuesFrom(self.handle, source.handle, scope)