diff options
| author | Josh Ferrell <josh@vector35.com> | 2026-04-30 10:24:12 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2026-05-05 14:46:15 -0400 |
| commit | 4963e1da2c001b0eac147482884b9630f9963654 (patch) | |
| tree | 01b53c3030a893f3509f309a87bfab6d2564e84b | |
| parent | af50b06082044fcbbf730deda985d0133ca98b88 (diff) | |
Change enterprise server version from string to VersionInfo struct
| -rw-r--r-- | binaryninjaapi.h | 2 | ||||
| -rw-r--r-- | binaryninjacore.h | 2 | ||||
| -rw-r--r-- | collaboration.cpp | 12 |
3 files changed, 10 insertions, 6 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 1dd3bc0f..6cd7eaf2 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -22532,7 +22532,7 @@ namespace BinaryNinja::Collaboration std::string GetUsername(); std::string GetToken(); int GetServerVersion(); - std::string GetServerBuildVersion(); + VersionInfo GetServerBuildVersion(); std::string GetServerBuildId(); std::vector<std::pair<std::string, std::string>> GetAuthBackends(); bool HasPulledProjects(); diff --git a/binaryninjacore.h b/binaryninjacore.h index f28f3c42..b3c3e8e0 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -8582,7 +8582,7 @@ extern "C" BINARYNINJACOREAPI char* BNRemoteGetUsername(BNRemote* remote); BINARYNINJACOREAPI char* BNRemoteGetToken(BNRemote* remote); BINARYNINJACOREAPI int BNRemoteGetServerVersion(BNRemote* remote); - BINARYNINJACOREAPI char* BNRemoteGetServerBuildVersion(BNRemote* remote); + BINARYNINJACOREAPI BNVersionInfo 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 15000cda..19a7168b 100644 --- a/collaboration.cpp +++ b/collaboration.cpp @@ -632,11 +632,15 @@ int Remote::GetServerVersion() } -std::string Remote::GetServerBuildVersion() +VersionInfo Remote::GetServerBuildVersion() { - char* buildVersion = BNRemoteGetServerBuildVersion(m_object); - std::string result = buildVersion; - BNFreeString(buildVersion); + BNVersionInfo bnVersion = BNRemoteGetServerBuildVersion(m_object); + VersionInfo result; + result.major = bnVersion.major; + result.minor = bnVersion.minor; + result.build = bnVersion.build; + result.channel = bnVersion.channel; + BNFreeString(bnVersion.channel); return result; } |
