summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2019-09-19 17:31:44 -0400
committerPeter LaFosse <peter@vector35.com>2019-09-27 21:07:22 -0400
commit052b1ea7871c3bfd780a73bcac942db54c95422e (patch)
tree23b72e1461868c096580ae3f6ebe02d4add06d26 /binaryninjaapi.h
parentbafb7665495735a758caf1d6334577bc0860c5d8 (diff)
Tag notifications & tag type list optimized
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 0a775ac8..1728774d 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -908,6 +908,8 @@ namespace BinaryNinja
struct DataVariable;
class Symbol;
class Tag;
+ class TagType;
+ struct TagReference;
class BinaryDataNotification
{
@@ -928,6 +930,10 @@ namespace BinaryNinja
static void SymbolUpdatedCallback(void* ctxt, BNBinaryView* view, BNSymbol* sym);
static void SymbolRemovedCallback(void* ctxt, BNBinaryView* view, BNSymbol* sym);
static void DataMetadataUpdatedCallback(void* ctxt, BNBinaryView* object, uint64_t offset);
+ static void TagTypeUpdatedCallback(void* ctxt, BNBinaryView* object, BNTagType* tagType);
+ static void TagAddedCallback(void* ctxt, BNBinaryView* object, BNTagReference* tagRef);
+ static void TagUpdatedCallback(void* ctxt, BNBinaryView* object, BNTagReference* tagRef);
+ static void TagRemovedCallback(void* ctxt, BNBinaryView* object, BNTagReference* tagRef);
static void StringFoundCallback(void* ctxt, BNBinaryView* data, BNStringType type, uint64_t offset, size_t len);
static void StringRemovedCallback(void* ctxt, BNBinaryView* data, BNStringType type, uint64_t offset, size_t len);
static void TypeDefinedCallback(void* ctxt, BNBinaryView* data, BNQualifiedName* name, BNType* type);
@@ -950,6 +956,10 @@ namespace BinaryNinja
virtual void OnDataVariableRemoved(BinaryView* view, const DataVariable& var) { (void)view; (void)var; }
virtual void OnDataVariableUpdated(BinaryView* view, const DataVariable& var) { (void)view; (void)var; }
virtual void OnDataMetadataUpdated(BinaryView* view, uint64_t offset) { (void)view; (void)offset; }
+ virtual void OnTagTypeUpdated(BinaryView* view, Ref<TagType> tagTypeRef) { (void)view; (void)tagTypeRef; }
+ virtual void OnTagAdded(BinaryView* view, const TagReference& tagRef) { (void)view; (void)tagRef; }
+ virtual void OnTagUpdated(BinaryView* view, const TagReference& tagRef) { (void)view; (void)tagRef; }
+ virtual void OnTagRemoved(BinaryView* view, const TagReference& tagRef) { (void)view; (void)tagRef; }
virtual void OnSymbolAdded(BinaryView* view, Symbol* sym) { (void)view; (void)sym; }
virtual void OnSymbolUpdated(BinaryView* view, Symbol* sym) { (void)view; (void)sym; }
virtual void OnSymbolRemoved(BinaryView* view, Symbol* sym) { (void)view; (void)sym; }
@@ -1559,8 +1569,8 @@ namespace BinaryNinja
Ref<TagType> GetTagType(const std::string& name, TagType::Type type);
std::vector<Ref<TagType>> GetTagTypes();
- void AddTag(Ref<Tag> tag);
- void RemoveTag(Ref<Tag> tag);
+ void AddTag(Ref<Tag> tag, bool user = false);
+ void RemoveTag(Ref<Tag> tag, bool user = false);
Ref<Tag> GetTag(uint64_t tagId);
std::vector<TagReference> GetAllTagReferences();
@@ -1569,6 +1579,9 @@ namespace BinaryNinja
std::vector<TagReference> GetAllTagReferencesOfType(Ref<TagType> tagType);
std::vector<TagReference> GetTagReferencesOfType(Ref<TagType> tagType);
+ size_t GetTagReferencesOfTypeCount(Ref<TagType> tagType);
+ size_t GetAllTagReferencesOfTypeCount(Ref<TagType> tagType);
+
std::vector<TagReference> GetDataTagReferences();
std::vector<Ref<Tag>> GetDataTags(uint64_t addr);
std::vector<Ref<Tag>> GetDataTagsOfType(uint64_t addr, Ref<TagType> tagType);
@@ -2880,6 +2893,7 @@ namespace BinaryNinja
std::vector<TagReference> GetAllTagReferences();
std::vector<TagReference> GetTagReferencesOfType(Ref<TagType> tagType);
+ size_t GetTagReferencesOfTypeCount(Ref<TagType> tagType);
std::vector<TagReference> GetAddressTagReferences();
std::vector<Ref<Tag>> GetAddressTags(Architecture* arch, uint64_t addr);