From 3d9e96f84d781d1de57af895864d3183d2729a7a Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Sat, 20 Jun 2020 13:03:25 -0400 Subject: Add serialization support to the Settings Python API. --- python/settings.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'python/settings.py') 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) -- cgit v1.3.1