summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2025-02-10 15:57:20 -0500
committerJosh Ferrell <josh@vector35.com>2025-02-10 16:45:25 -0500
commitb4e75ef9995500049f90a2569eee07c1b3505c21 (patch)
tree1777804032d54d032701df1a3824ca78316d1a6a
parenta4f00fbf5efd205cc8831ce8b6e7394c47f99a2f (diff)
Add API to get remote server build version
-rw-r--r--binaryninjaapi.h1
-rw-r--r--binaryninjacore.h1
-rw-r--r--collaboration.cpp9
3 files changed, 11 insertions, 0 deletions
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<std::pair<std::string, std::string>> 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);