diff options
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index d69fec0d..62ebbd04 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -560,6 +560,7 @@ namespace BinaryNinja std::string GetProduct(); std::string GetProductType(); int GetLicenseCount(); + bool IsUIEnabled(); uint32_t GetBuildId(); bool AreAutoUpdatesEnabled(); @@ -1047,7 +1048,7 @@ namespace BinaryNinja \param dest the address to write len number of bytes. \param offset the virtual offset to find and read len bytes from - ....\param len the number of bytes to read from offset and write to dest + \param len the number of bytes to read from offset and write to dest */ virtual size_t PerformRead(void* dest, uint64_t offset, size_t len) { (void)dest; (void)offset; (void)len; return 0; } virtual size_t PerformWrite(uint64_t offset, const void* data, size_t len) { (void)offset; (void)data; (void)len; return 0; } @@ -1172,6 +1173,7 @@ namespace BinaryNinja void RemoveAnalysisFunction(Function* func); void CreateUserFunction(Platform* platform, uint64_t start); void RemoveUserFunction(Function* func); + void UpdateAnalysisAndWait(); void UpdateAnalysis(); void AbortAnalysis(); @@ -1299,8 +1301,9 @@ namespace BinaryNinja std::vector<BNAddressRange> GetAllocatedRanges(); - void StoreMetadata(const std::string& key, Metadata* inValue); - std::unique_ptr<Metadata> QueryMetadata(const std::string& key); + void StoreMetadata(const std::string& key, Ref<Metadata> value); + Ref<Metadata> QueryMetadata(const std::string& key); + void RemoveMetadata(const std::string& key); std::string GetStringMetadata(const std::string& key); std::vector<uint8_t> GetRawMetadata(const std::string& key); uint64_t GetUIntMetadata(const std::string& key); @@ -3114,8 +3117,15 @@ namespace BinaryNinja Metadata(const std::vector<int64_t>& data); Metadata(const std::vector<double>& data); Metadata(const std::vector<uint8_t>& data); + Metadata(const std::vector<Ref<Metadata>>& data); + Metadata(const std::map<std::string, Ref<Metadata>>& data); + Metadata(MetadataType type); virtual ~Metadata() {} + bool operator==(const Metadata& rhs); + Ref<Metadata> operator[](const std::string& key); + Ref<Metadata> operator[](size_t idx); + MetadataType GetType() const; bool GetBoolean() const; std::string GetString() const; @@ -3128,6 +3138,19 @@ namespace BinaryNinja std::vector<int64_t> GetSignedIntegerList() const; std::vector<double> GetDoubleList() const; std::vector<uint8_t> GetRaw() const; + std::vector<Ref<Metadata>> GetArray(); + std::map<std::string, Ref<Metadata>> GetKeyValueStore(); + + //For key-value data only + Ref<Metadata> Get(const std::string& key); + bool SetValueForKey(const std::string& key, Ref<Metadata> data); + void RemoveKey(const std::string& key); + + //For array data only + Ref<Metadata> Get(size_t index); + bool Append(Ref<Metadata> data); + void RemoveIndex(size_t index); + size_t Size() const; bool IsBoolean() const; bool IsString() const; @@ -3140,5 +3163,7 @@ namespace BinaryNinja bool IsSignedIntegerList() const; bool IsDoubleList() const; bool IsRaw() const; + bool IsArray() const; + bool IsKeyValueStore() const; }; } |
