Skip to content

Commit b4e75ef

Browse files
committed
Add API to get remote server build version
1 parent a4f00fb commit b4e75ef

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

binaryninjaapi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19650,6 +19650,7 @@ namespace BinaryNinja::Collaboration
1965019650
std::string GetUsername();
1965119651
std::string GetToken();
1965219652
int GetServerVersion();
19653+
std::string GetServerBuildVersion();
1965319654
std::string GetServerBuildId();
1965419655
std::vector<std::pair<std::string, std::string>> GetAuthBackends();
1965519656
bool HasPulledProjects();

binaryninjacore.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7756,6 +7756,7 @@ extern "C"
77567756
BINARYNINJACOREAPI char* BNRemoteGetUsername(BNRemote* remote);
77577757
BINARYNINJACOREAPI char* BNRemoteGetToken(BNRemote* remote);
77587758
BINARYNINJACOREAPI int BNRemoteGetServerVersion(BNRemote* remote);
7759+
BINARYNINJACOREAPI char* BNRemoteGetServerBuildVersion(BNRemote* remote);
77597760
BINARYNINJACOREAPI char* BNRemoteGetServerBuildId(BNRemote* remote);
77607761
BINARYNINJACOREAPI bool BNRemoteGetAuthBackends(BNRemote* remote, char*** backendIds, char*** backendNames, size_t* count);
77617762
BINARYNINJACOREAPI bool BNRemoteHasPulledProjects(BNRemote* remote);

collaboration.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,15 @@ int Remote::GetServerVersion()
631631
}
632632

633633

634+
std::string Remote::GetServerBuildVersion()
635+
{
636+
char* buildVersion = BNRemoteGetServerBuildVersion(m_object);
637+
std::string result = buildVersion;
638+
BNFreeString(buildVersion);
639+
return result;
640+
}
641+
642+
634643
std::string Remote::GetServerBuildId()
635644
{
636645
char* buildId = BNRemoteGetServerBuildId(m_object);

0 commit comments

Comments
 (0)