From b4e75ef9995500049f90a2569eee07c1b3505c21 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Mon, 10 Feb 2025 15:57:20 -0500 Subject: Add API to get remote server build version --- binaryninjaapi.h | 1 + binaryninjacore.h | 1 + collaboration.cpp | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 45f797ca..ac7cbea9 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -19650,6 +19650,7 @@ namespace BinaryNinja::Collaboration std::string GetUsername(); std::string GetToken(); int GetServerVersion(); + std::string GetServerBuildVersion(); std::string GetServerBuildId(); std::vector> GetAuthBackends(); bool HasPulledProjects(); diff --git a/binaryninjacore.h b/binaryninjacore.h index 50610112..12a871cd 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -7756,6 +7756,7 @@ extern "C" BINARYNINJACOREAPI char* BNRemoteGetUsername(BNRemote* remote); BINARYNINJACOREAPI char* BNRemoteGetToken(BNRemote* remote); BINARYNINJACOREAPI int BNRemoteGetServerVersion(BNRemote* remote); + BINARYNINJACOREAPI char* BNRemoteGetServerBuildVersion(BNRemote* remote); BINARYNINJACOREAPI char* BNRemoteGetServerBuildId(BNRemote* remote); BINARYNINJACOREAPI bool BNRemoteGetAuthBackends(BNRemote* remote, char*** backendIds, char*** backendNames, size_t* count); BINARYNINJACOREAPI bool BNRemoteHasPulledProjects(BNRemote* remote); diff --git a/collaboration.cpp b/collaboration.cpp index f154865a..db0f0c67 100644 --- a/collaboration.cpp +++ b/collaboration.cpp @@ -631,6 +631,15 @@ int Remote::GetServerVersion() } +std::string Remote::GetServerBuildVersion() +{ + char* buildVersion = BNRemoteGetServerBuildVersion(m_object); + std::string result = buildVersion; + BNFreeString(buildVersion); + return result; +} + + std::string Remote::GetServerBuildId() { char* buildId = BNRemoteGetServerBuildId(m_object); -- cgit v1.3.1