Skip to content

Commit bef4772

Browse files
committed
Associate a RemoteProject to a Project when applicable
1 parent bcdc0d9 commit bef4772

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

binaryninjaapi.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,6 +2776,10 @@ namespace BinaryNinja {
27762776
};
27772777

27782778

2779+
namespace Collaboration
2780+
{
2781+
class RemoteProject;
2782+
}
27792783
/*!
27802784

27812785
\ingroup project
@@ -2827,6 +2831,8 @@ namespace BinaryNinja {
28272831

28282832
void BeginBulkOperation();
28292833
void EndBulkOperation();
2834+
2835+
Ref<Collaboration::RemoteProject> GetRemoteProject();
28302836
};
28312837

28322838
/*!

binaryninjacore.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
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 94
40+
#define BN_CURRENT_CORE_ABI_VERSION 95
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
@@ -3891,6 +3891,8 @@ extern "C"
38913891
BINARYNINJACOREAPI void BNProjectBeginBulkOperation(BNProject* project);
38923892
BINARYNINJACOREAPI void BNProjectEndBulkOperation(BNProject* project);
38933893

3894+
BINARYNINJACOREAPI BNRemoteProject* BNProjectGetRemoteProject(BNProject* project);
3895+
38943896
// ProjectFile object
38953897
BINARYNINJACOREAPI BNProjectFile* BNNewProjectFileReference(BNProjectFile* file);
38963898
BINARYNINJACOREAPI void BNFreeProjectFile(BNProjectFile* file);

project.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,16 @@ void Project::EndBulkOperation()
522522
}
523523

524524

525+
Ref<Collaboration::RemoteProject> Project::GetRemoteProject()
526+
{
527+
528+
BNRemoteProject* project = BNProjectGetRemoteProject(m_object);
529+
if (project == nullptr)
530+
return nullptr;
531+
return new Collaboration::RemoteProject(project);
532+
}
533+
534+
525535
ProjectFile::ProjectFile(BNProjectFile* file)
526536
{
527537
m_object = file;

0 commit comments

Comments
 (0)