summaryrefslogtreecommitdiff
path: root/binaryninjacore.h
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-06-18 00:14:48 -0400
committerMason Reed <mason@vector35.com>2025-07-02 01:56:54 -0400
commitba6d08199b0067adf3222559363a819f4b11c502 (patch)
tree7cf917dfbc757d757a9bc4b48c0a5aa6d80b6d3e /binaryninjacore.h
parent00686dfc68ee40b9b7378febadf3c27eb657dff9 (diff)
Add PluginCommand for projects and hide non-contextual commands in linear/graph view
Diffstat (limited to 'binaryninjacore.h')
-rw-r--r--binaryninjacore.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 48b767f8..deca98e5 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -2593,7 +2593,8 @@ extern "C"
MediumLevelILFunctionPluginCommand,
MediumLevelILInstructionPluginCommand,
HighLevelILFunctionPluginCommand,
- HighLevelILInstructionPluginCommand
+ HighLevelILInstructionPluginCommand,
+ ProjectPluginCommand
} BNPluginCommandType;
typedef struct BNPluginCommand
@@ -2615,6 +2616,7 @@ extern "C"
void (*highLevelILFunctionCommand)(void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func);
void (*highLevelILInstructionCommand)(
void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func, size_t instr);
+ void (*projectCommand)(void* ctxt, BNProject* view);
bool (*defaultIsValid)(void* ctxt, BNBinaryView* view);
bool (*addressIsValid)(void* ctxt, BNBinaryView* view, uint64_t addr);
@@ -2628,6 +2630,7 @@ extern "C"
bool (*highLevelILFunctionIsValid)(void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func);
bool (*highLevelILInstructionIsValid)(
void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func, size_t instr);
+ bool (*projectIsValid)(void* ctxt, BNProject* view);
} BNPluginCommand;
typedef struct BNCustomCallingConvention
@@ -6987,6 +6990,8 @@ extern "C"
BINARYNINJACOREAPI void BNRegisterPluginCommandForHighLevelILInstruction(const char* name, const char* description,
void (*action)(void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func, size_t instr),
bool (*isValid)(void* ctxt, BNBinaryView* view, BNHighLevelILFunction* func, size_t instr), void* context);
+ BINARYNINJACOREAPI void BNRegisterPluginCommandForProject(const char* name, const char* description,
+ void (*action)(void* ctxt, BNProject* project), bool (*isValid)(void* ctxt, BNProject* project), void* context);
BINARYNINJACOREAPI BNPluginCommand* BNGetAllPluginCommands(size_t* count);
BINARYNINJACOREAPI BNPluginCommand* BNGetValidPluginCommands(BNBinaryView* view, size_t* count);
@@ -7008,6 +7013,7 @@ extern "C"
BNBinaryView* view, BNHighLevelILFunction* func, size_t* count);
BINARYNINJACOREAPI BNPluginCommand* BNGetValidPluginCommandsForHighLevelILInstruction(
BNBinaryView* view, BNHighLevelILFunction* func, size_t instr, size_t* count);
+ BINARYNINJACOREAPI BNPluginCommand* BNGetValidPluginCommandsForProject(BNProject* project, size_t* count);
BINARYNINJACOREAPI void BNFreePluginCommandList(BNPluginCommand* commands);
// Calling conventions