From 695954efd12fd336224073ada03dede782495746 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Wed, 19 May 2021 11:50:20 +0800 Subject: Divide metadata into user and auto metadata --- python/binaryview.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index e19e0a8a..7fc37287 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -6078,7 +6078,7 @@ class BinaryView(object): raise KeyError(key) return metadata.Metadata(handle=md_handle).value - def store_metadata(self, key, md): + def store_metadata(self, key, md, isAuto = False): """ `store_metadata` stores an object for the given key in the current BinaryView. Objects stored using `store_metadata` can be retrieved when the database is reopened. Objects stored are not arbitrary python @@ -6088,6 +6088,10 @@ class BinaryView(object): :param str key: key value to associate the Metadata object with :param Varies md: object to store. + :param bool isAuto: whether the metadata is an auto metadata. Most metadata should + keep this as False. Only those automatically generated metadata should have this set + to True. Auto metadata is not saved into the database and is presumably re-genereated + when re-opening the database. :rtype: None :Example: @@ -6103,7 +6107,7 @@ class BinaryView(object): """ if not isinstance(md, metadata.Metadata): md = metadata.Metadata(md) - core.BNBinaryViewStoreMetadata(self.handle, key, md.handle) + core.BNBinaryViewStoreMetadata(self.handle, key, md.handle, isAuto) def remove_metadata(self, key): """ -- cgit v1.3.1