-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add user metadata #19
Conversation
src/extern_functions.rs
Outdated
@@ -35,16 +36,19 @@ pub type CallbackType = extern "C" fn(LexActivatorCode); | |||
extern "C" { | |||
// --------------- Setter Functions --------------- | |||
pub fn SetProductData(productData: cstrtype!()) -> c_int; | |||
pub fn SetProductFile(filePath: cstrtype!()) -> c_int; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@muneebkq Remove this function, as we have deprecated SetProductFile(), so we will not include it in our rust wrapper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
src/lib.rs
Outdated
/// | ||
/// Returns `Ok(())` if mode is set successfully. | ||
|
||
pub fn set_cache_mode(mode: bool) -> c_uint { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@muneebkq Please follow the Result return pattern for set_cache_mode().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jsdoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result pattern followed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the comments
@muneebkq To fix the windows build error, update the version of LexActivator to 3.30.0 in download.sh. It should fix the issue. |
src/lib.rs
Outdated
/// | ||
/// Returns `Ok(())` if the release version is set successfully, If an error occurs, an `Err` containing the `LexActivatorError`is returned. | ||
|
||
pub fn set_app_version(app_version: String) -> Result<(), LexActivatorError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@muneebkq There is no need for adding set_app_version(). This function has been deprecated as we already have the set_release_version().
src/extern_functions.rs
Outdated
@@ -37,12 +38,13 @@ extern "C" { | |||
pub fn SetProductData(productData: cstrtype!()) -> c_int; | |||
pub fn SetProductId(productId: cstrtype!() , flags: c_uint) -> c_int; | |||
pub fn SetDataDirectory(dataDir: cstrtype!()) -> c_int; | |||
pub fn SetDebugMode(enable: c_uint) -> c_uint; | |||
pub fn SetDebugMode(enable: c_uint) -> c_int; | |||
pub fn SetCacheMode(mode: c_int) -> c_int; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@muneebkq SetCacheMode() take uint as an arg, please refer to https://github.com/cryptlex/lexactivator-c/blob/master/examples/LexActivator.h#L460
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the comments
add metadata to user license payload