diff options
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 5b435cf8..bab743d3 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -14757,6 +14757,7 @@ namespace BinaryNinja { Ref<LowLevelILFunction> lowLevelILFunction; Ref<MediumLevelILFunction> mediumLevelILFunction; Ref<HighLevelILFunction> highLevelILFunction; + Ref<Project> project; PluginCommandContext(); }; @@ -14833,6 +14834,12 @@ namespace BinaryNinja { std::function<bool(BinaryView*, const HighLevelILInstruction&)> isValid; }; + struct RegisteredProjectCommand + { + std::function<void(Project*)> action; + std::function<bool(Project*)> isValid; + }; + static void DefaultPluginCommandActionCallback(void* ctxt, BNBinaryView* view); static void AddressPluginCommandActionCallback(void* ctxt, BNBinaryView* view, uint64_t addr); static void RangePluginCommandActionCallback(void* ctxt, BNBinaryView* view, uint64_t addr, uint64_t len); @@ -14849,6 +14856,7 @@ namespace BinaryNinja { void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func); static void HighLevelILInstructionPluginCommandActionCallback( void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func, size_t instr); + static void ProjectPluginCommandActionCallback(void* ctxt, BNProject* project); static bool DefaultPluginCommandIsValidCallback(void* ctxt, BNBinaryView* view); static bool AddressPluginCommandIsValidCallback(void* ctxt, BNBinaryView* view, uint64_t addr); @@ -14866,6 +14874,7 @@ namespace BinaryNinja { void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func); static bool HighLevelILInstructionPluginCommandIsValidCallback( void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func, size_t instr); + static bool ProjectPluginCommandIsValidCallback(void* ctxt, BNProject* project); public: PluginCommand(const BNPluginCommand& cmd); @@ -15692,6 +15701,13 @@ namespace BinaryNinja { const std::function<void(BinaryView* view, const HighLevelILInstruction& instr)>& action, const std::function<bool(BinaryView* view, const HighLevelILInstruction& instr)>& isValid); + static void RegisterForProject(const std::string& name, const std::string& description, + const std::function<void(Project* project)>& action); + + static void RegisterForProject(const std::string& name, const std::string& description, + const std::function<void(Project* project)>& action, + const std::function<bool(Project* project)>& isValid); + /*! Get the list of registered PluginCommands \return The list of registered PluginCommands |
