-
Notifications
You must be signed in to change notification settings - Fork 2
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
Muneeb/add new functions #8
Conversation
/review |
*) | ||
|
||
function GetLicenseAllowedDeactivations: LongWord; | ||
|
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 LongWord
in Delphi does not support -ve values as it represents unsigned int
. Please make the changes to the GetLicenseAllowedActivations()
as well. This is because we now support to -1 as a sentinal value.
*) | ||
|
||
procedure SetDebugMode(Enable: Boolean); | ||
|
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 SetDebugMode() takes a numeric argument. Different values could correspond to different log levels.
(* | ||
FUNCTION: GetLicenseExpiryDate() | ||
|
||
PURPOSE: Gets the license expiry date timestamp. | ||
|
||
RESULT: License expiry date timestamp | ||
|
||
EXCEPTIONS: ELAFailException, ELAProductIdException, | ||
EXCEPTIONS: ELAFailException, ELAProductIdException, ELALicenseKeyException |
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 A value of 0 indicates it has no expiry i.e a lifetime license. Add this to the result of GetLicenseExpiryDate(). Also to the maintenance getter.
*) | ||
|
||
LA_E_TWO_FACTOR_AUTHENTICATION_CODE_INVALID = TLAStatusCode(89); | ||
|
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 confirm if all error codes have been added. I can see LA_E_TWO_FACTOR_AUTHENTICATION_CODE_MISSING 88 is missing. Please check others too.
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. Make sure to incorporate the changes for -1 as a sentinal value.
*) | ||
|
||
procedure SetReleasePublishedDate(ReleasePublishedDate: LongWord); | ||
|
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 We have used TDateTime
wherever the timestamp is returned. Please make sure it remains consistent.
@@ -458,7 +562,7 @@ function GetLicenseMetadata(const Key: UnicodeString): UnicodeString; | |||
*) | |||
|
|||
procedure GetLicenseMeterAttribute | |||
(const Name: UnicodeString; out AllowedUses, TotalUses, GrossUses: LongWord); | |||
(const Name: UnicodeString; out AllowedUses: Int64; TotalUses, GrossUses: LongWord); | |||
|
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 use UInt64
for totalUses, grossUses.
*) | ||
|
||
ELATwoFactorAuthenticationCodeMissing = class(ELAException) | ||
public |
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 add Exception
to the error codes as followed in other error codes
examples/LexActivator.pas
Outdated
@@ -3317,6 +3918,22 @@ function ActivateLicenseOffline(const FilePath: UnicodeString): TLAKeyStatus; | |||
Result := ELAError.CheckKeyStatus(Thin_ActivateLicenseOffline(PWideChar(FilePath))); | |||
end; | |||
|
|||
function Thin_AuthenticateUser(const email , password : unicodestring): TLAStatusCode; cdecl; |
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 unicodestring -> PWideChar
examples/LexActivator.pas
Outdated
Result := ELAError.CheckKeyStatus(Thin_AuthenticateUser(PWideChar(Email),PWideChar(Password))); | ||
end; | ||
|
||
function Thin_AuthenticateUserWithIdToken(const token : unicodestring): TLAStatusCode; cdecl; |
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 unicodestring -> PWideChar
examples/LexActivator.pas
Outdated
RESULT: Organization name. | ||
|
||
EXCEPTIONS: ELAFailException, ELAProductIdException, ELATimeException, | ||
ELATimeModifiedException, ELAProductVersionNotLinkedException, |
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 Why this ELAProductVersionNotLinkedException in Org name function?
examples/LexActivator.pas
Outdated
if not ELAError.CheckOKFail(ErrorCode) then | ||
raise ELAFailException.Create('Failed to get activation mode'); | ||
|
||
Result := 'Initial Mode: ' + InitialMode + ', Current Mode: ' + CurrentMode; |
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 Why inititalMode and currentMode are concatenated?
examples/LexActivator.pas
Outdated
EXCEPTIONS: ELAProductIdException, ELAReleaseVersionFormatException, ELAReleasePlatformLengthException | ||
*) | ||
|
||
procedure SetReleasePlatform(const ReleasePlatform: UnicodeString); |
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 remove the platform and channel setter for now. We will add them once we include CheckReleaseUpdate().
update delphi wrapper with new functions