File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -9160,7 +9160,9 @@ namespace BinaryNinja {
91609160
91619161 Ref<BinaryView> GetInput() const;
91629162 std::string GetFileName() const;
9163+ std::vector<std::string> GetAvailableTransforms() const;
91639164 std::string GetTransformName() const;
9165+ void SetTransformName(const std::string& transformName);
91649166 void SetTransformParameters(const std::map<std::string, DataBuffer>& params);
91659167 void SetTransformParameter(const std::string& name, const DataBuffer& data);
91669168 bool HasTransformParameter(const std::string& name) const;
Original file line number Diff line number Diff line change 3737// Current ABI version for linking to the core. This is incremented any time
3838// there are changes to the API that affect linking, including new functions,
3939// new types, or modifications to existing functions or types.
40- #define BN_CURRENT_CORE_ABI_VERSION 142
40+ #define BN_CURRENT_CORE_ABI_VERSION 143
4141
4242// Minimum ABI version that is supported for loading of plugins. Plugins that
4343// are linked to an ABI version less than this will not be able to load and
@@ -4741,7 +4741,9 @@ extern "C"
47414741 BINARYNINJACOREAPI void BNFreeTransformContext (BNTransformContext* context);
47424742 BINARYNINJACOREAPI BNBinaryView* BNTransformContextGetInput (BNTransformContext* context);
47434743 BINARYNINJACOREAPI char * BNTransformContextGetFileName (BNTransformContext* context);
4744+ BINARYNINJACOREAPI char ** BNTransformContextGetAvailableTransforms (BNTransformContext* context, size_t * count);
47444745 BINARYNINJACOREAPI char * BNTransformContextGetTransformName (BNTransformContext* context);
4746+ BINARYNINJACOREAPI void BNTransformContextSetTransformName (BNTransformContext* context, const char * transformName);
47454747 BINARYNINJACOREAPI void BNTransformContextSetTransformParameters (BNTransformContext* context, BNTransformParameter* params, size_t paramCount);
47464748 BINARYNINJACOREAPI void BNTransformContextSetTransformParameter (BNTransformContext* context, const char * name, BNDataBuffer* data);
47474749 BINARYNINJACOREAPI bool BNTransformContextHasTransformParameter (BNTransformContext* context, const char * name);
Original file line number Diff line number Diff line change @@ -30,6 +30,21 @@ string TransformContext::GetFileName() const
3030}
3131
3232
33+ vector<string> TransformContext::GetAvailableTransforms () const
34+ {
35+ size_t count;
36+ char ** transforms = BNTransformContextGetAvailableTransforms (m_object, &count);
37+
38+ vector<string> result;
39+ result.reserve (count);
40+
41+ for (size_t i = 0 ; i < count; i++)
42+ result.push_back (transforms[i]);
43+ BNFreeStringList (transforms, count);
44+ return result;
45+ }
46+
47+
3348string TransformContext::GetTransformName () const
3449{
3550 char * name = BNTransformContextGetTransformName (m_object);
@@ -39,6 +54,12 @@ string TransformContext::GetTransformName() const
3954}
4055
4156
57+ void TransformContext::SetTransformName (const string& transformName)
58+ {
59+ BNTransformContextSetTransformName (m_object, transformName.c_str ());
60+ }
61+
62+
4263void TransformContext::SetTransformParameters (const map<string, DataBuffer>& params)
4364{
4465 BNTransformParameter* list = new BNTransformParameter[params.size ()];
You can’t perform that action at this time.
0 commit comments