From f35bb342cc6d7375f30a4bb3fe89585f4d5fde99 Mon Sep 17 00:00:00 2001 From: Huzaif Mushtaq Mir Date: Thu, 5 Mar 2026 12:34:35 +0530 Subject: [PATCH] feat: add entitlement set tier --- .../android/lexfloatclient/LexFloatClient.java | 16 ++++++++++++++++ .../lexfloatclient/LexFloatClientNative.java | 2 ++ 2 files changed, 18 insertions(+) diff --git a/lexfloatclient/src/main/java/com/cryptlex/android/lexfloatclient/LexFloatClient.java b/lexfloatclient/src/main/java/com/cryptlex/android/lexfloatclient/LexFloatClient.java index 9098043..de9cc7f 100644 --- a/lexfloatclient/src/main/java/com/cryptlex/android/lexfloatclient/LexFloatClient.java +++ b/lexfloatclient/src/main/java/com/cryptlex/android/lexfloatclient/LexFloatClient.java @@ -304,6 +304,22 @@ public static String GetHostLicenseEntitlementSetDisplayName() throws LexFloatCl throw new LexFloatClientException(status); } + /** + * Gets the tier of the entitlement set associated with the LexFloatServer license. + * + * @return Returns the host license entitlement set tier. + * @throws LexFloatClientException + */ + public static long GetHostLicenseEntitlementSetTier() throws LexFloatClientException { + int status; + LongByReference tier = new LongByReference(0); + status = LexFloatClientNative.GetHostLicenseEntitlementSetTier(tier); + if (LF_OK == status) { + return tier.getValue(); + } + throw new LexFloatClientException(status); + } + /** * Gets the feature entitlements associated with the LexFloatServer license. * diff --git a/lexfloatclient/src/main/java/com/cryptlex/android/lexfloatclient/LexFloatClientNative.java b/lexfloatclient/src/main/java/com/cryptlex/android/lexfloatclient/LexFloatClientNative.java index 14b895c..a5b672e 100644 --- a/lexfloatclient/src/main/java/com/cryptlex/android/lexfloatclient/LexFloatClientNative.java +++ b/lexfloatclient/src/main/java/com/cryptlex/android/lexfloatclient/LexFloatClientNative.java @@ -49,6 +49,8 @@ public interface CallbackType extends Callback { public static native int GetHostLicenseEntitlementSetDisplayName(ByteBuffer displayName, int length); + public static native int GetHostLicenseEntitlementSetTier(LongByReferece tier); + public static native int GetHostFeatureEntitlementsInternal(ByteBuffer featureEntitlementsJson, int length); public static native int GetHostFeatureEntitlementInternal(String featureName, ByteBuffer featureEntitlementJson, int length);