diff options
| author | Glenn Smith <glenn@vector35.com> | 2023-01-05 18:07:39 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2023-01-10 14:59:04 -0500 |
| commit | 80e927bd0b200904626cabf9bf6fa65a1bd4a6a8 (patch) | |
| tree | 139aa426a190f46a665a51abbe1223c397d2fa9e | |
| parent | d905254d75618736f4ac237f59f74d44520fdf8c (diff) | |
[Enterprise] Add api for IsFloatingLicense
| -rw-r--r-- | binaryninjacore.h | 1 | ||||
| -rw-r--r-- | enterprise.cpp | 6 | ||||
| -rw-r--r-- | enterprise.h | 6 | ||||
| -rw-r--r-- | python/enterprise.py | 8 |
4 files changed, 21 insertions, 0 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h index 621ca0b0..c3c1546f 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -2985,6 +2985,7 @@ extern "C" BINARYNINJACOREAPI char* BNGetEnterpriseServerBuildId(void); BINARYNINJACOREAPI uint64_t BNGetEnterpriseServerLicenseExpirationTime(void); BINARYNINJACOREAPI uint64_t BNGetEnterpriseServerLicenseDuration(void); + BINARYNINJACOREAPI bool BNIsEnterpriseServerFloatingLicense(void); BINARYNINJACOREAPI uint64_t BNGetEnterpriseServerReservationTimeLimit(void); BINARYNINJACOREAPI bool BNIsEnterpriseServerLicenseStillActivated(void); BINARYNINJACOREAPI char* BNGetEnterpriseServerLastError(void); diff --git a/enterprise.cpp b/enterprise.cpp index bcf2905f..e15a4691 100644 --- a/enterprise.cpp +++ b/enterprise.cpp @@ -158,6 +158,12 @@ uint64_t BinaryNinja::EnterpriseServer::GetLicenseDuration() } +bool BinaryNinja::EnterpriseServer::IsFloatingLicense() +{ + return BNIsEnterpriseServerFloatingLicense(); +} + + uint64_t BinaryNinja::EnterpriseServer::GetReservationTimeLimit() { return BNGetEnterpriseServerReservationTimeLimit(); diff --git a/enterprise.h b/enterprise.h index 854047a2..abf010e9 100644 --- a/enterprise.h +++ b/enterprise.h @@ -154,6 +154,12 @@ namespace BinaryNinja uint64_t GetLicenseDuration(); /*! + Determine if a floating license is currently active + \return True if a floating license is active + */ + bool IsFloatingLicense(); + + /*! Get the maximum time limit for reservations \return Maximum reservation time, in seconds */ diff --git a/python/enterprise.py b/python/enterprise.py index fdd0bb74..23e7df71 100644 --- a/python/enterprise.py +++ b/python/enterprise.py @@ -250,6 +250,14 @@ def license_duration() -> int: return core.BNGetEnterpriseServerLicenseDuration() +def is_floating_license() -> bool: + """ + Determine if a floating license is currently active + :return: True if a floating license is active + """ + return core.BNIsEnterpriseServerFloatingLicense() + + def is_license_still_activated() -> bool: """ Determine if your current license checkout is still valid. |
