File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,6 +293,12 @@ vector<LicenseAddon> BinaryNinja::GetLicenseAddons()
293293}
294294
295295
296+ bool BinaryNinja::HasCollaborationEntitlement ()
297+ {
298+ return BNHasCollaborationEntitlement ();
299+ }
300+
301+
296302int BinaryNinja::GetLicenseCount ()
297303{
298304 return BNGetLicenseCount ();
Original file line number Diff line number Diff line change @@ -2060,6 +2060,7 @@ namespace BinaryNinja {
20602060 std::string GetProductType();
20612061 std::string GetSerialNumber();
20622062 std::vector<LicenseAddon> GetLicenseAddons();
2063+ bool HasCollaborationEntitlement();
20632064 int GetLicenseCount();
20642065 bool IsUIEnabled();
20652066 uint32_t GetBuildId();
Original file line number Diff line number Diff line change @@ -4347,6 +4347,7 @@ extern "C"
43474347 BINARYNINJACOREAPI char* BNGetProductType(void);
43484348 BINARYNINJACOREAPI BNLicenseAddon* BNGetLicenseAddons(size_t* count);
43494349 BINARYNINJACOREAPI void BNFreeLicenseAddons(BNLicenseAddon* addons, size_t count);
4350+ BINARYNINJACOREAPI bool BNHasCollaborationEntitlement(void);
43504351 BINARYNINJACOREAPI int BNGetLicenseCount(void);
43514352 BINARYNINJACOREAPI bool BNIsUIEnabled(void);
43524353 BINARYNINJACOREAPI void BNSetLicense(const char* licenseData);
Original file line number Diff line number Diff line change @@ -414,6 +414,15 @@ def core_license_addons() -> List[LicenseAddon]:
414414 core .BNFreeLicenseAddons (addons , count .value )
415415
416416
417+ def core_has_collaboration_entitlement () -> bool :
418+ '''Whether the active license permits access to collaboration services.'''
419+ try :
420+ _init_plugins ()
421+ except RuntimeError :
422+ return core .BNHasCollaborationEntitlement ()
423+ return core .BNHasCollaborationEntitlement ()
424+
425+
417426def core_ui_enabled () -> bool :
418427 '''Indicates that a UI exists and the UI has invoked BNInitUI'''
419428 return core .BNIsUIEnabled ()
Original file line number Diff line number Diff line change @@ -584,6 +584,11 @@ pub fn license_addons() -> Vec<LicenseAddon> {
584584 result
585585}
586586
587+ /// Returns whether the active license permits access to collaboration services.
588+ pub fn has_collaboration_entitlement ( ) -> bool {
589+ unsafe { BNHasCollaborationEntitlement ( ) }
590+ }
591+
587592/// Set the license that will be used once the core initializes. You can reset the license by passing `None`.
588593///
589594/// If not set, the normal license retrieval will occur:
You can’t perform that action at this time.
0 commit comments