diff --git a/src/main/java/com/cryptlex/lexfloatclient/LexFloatClient.java b/src/main/java/com/cryptlex/lexfloatclient/LexFloatClient.java
index db09553..aa94e52 100644
--- a/src/main/java/com/cryptlex/lexfloatclient/LexFloatClient.java
+++ b/src/main/java/com/cryptlex/lexfloatclient/LexFloatClient.java
@@ -56,6 +56,28 @@ public static void SetHostUrl(String hostUrl) throws LexFloatClientException {
}
}
+ /**
+ * Sets the permission flag. This function must be called on every start of your program
+ * after SetHostProductId() function in case the application allows borrowing of licenses
+ * or system wide activation.
+ *
+ * @param flag depending on your application's requirements, choose one of
+ * the following values: LF_USER, LF_ALL_USERS.
+ *
+ * - LF_USER: This flag indicates that the application does not require admin or root permissions to run.
+ * - LF_ALL_USERS: This flag is specifically designed for Windows and should be used for system-wide activations.
+ *
+ * @throws LexFloatClientException
+ */
+ public static void SetPermissionFlag(int flag) throws LexFloatClientException {
+ int status;
+ status = LexFloatClientNative.SetPermissionFlag(flag)
+
+ if (LF_OK != status) {
+ throw new LexFloatClientException(status);
+ }
+ }
+
/**
* Sets the renew license callback function.
* Whenever the license lease is about to expire, a renew request is sent to
diff --git a/src/main/java/com/cryptlex/lexfloatclient/LexFloatClientNative.java b/src/main/java/com/cryptlex/lexfloatclient/LexFloatClientNative.java
index 90cd0e3..bc4d0ac 100644
--- a/src/main/java/com/cryptlex/lexfloatclient/LexFloatClientNative.java
+++ b/src/main/java/com/cryptlex/lexfloatclient/LexFloatClientNative.java
@@ -20,6 +20,9 @@ public class LexFloatClientNative implements Library {
public interface CallbackType extends Callback {
void invoke(int status);
}
+ /* Permission Flags */
+ public static final int LF_USER = 10;
+ public static final int LF_ALL_USERS = 11;
public static native int SetHostProductId(String productId);
@@ -29,6 +32,8 @@ public interface CallbackType extends Callback {
public static native int SetHostUrl(WString hostUrl);
+ public static native int SetPermissionFlag(int flags);
+
public static native int SetFloatingLicenseCallback(CallbackType callback);
public static native int SetFloatingClientMetadata(String key, String value);