Skip to content

Commit

Permalink
Variables optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
Pozitronik authored and Pozitronik committed May 20, 2019
1 parent 67a539a commit b1ed02b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
16 changes: 6 additions & 10 deletions CloudMailRu.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@ TCloudMailRu = class
ExternalRequestProc: TRequestHandler;

HTTP: TCloudMailRuHTTP; //HTTP transport class
FileCipher: TFileCipher; //Encryption class

public_download_token: WideString; //token for public urls, refreshes on request
public_shard: WideString; //public downloads shard url
Shard: WideString; //download shard url

OAuthToken: TCloudMailRuOAuthInfo;

upload_url: WideString;
login_method: integer;

Shard: WideString;

FileCipher: TFileCipher;
OAuthToken: TCloudMailRuOAuthInfo; {unused at this moment}

upload_url: WideString; //stored upload url, filled on getToken()
united_params: WideString; //Объединённый набор авторизационных параметров для подстановки в URL

{HTTP REQUESTS WRAPPERS}
Expand Down Expand Up @@ -842,9 +838,9 @@ function TCloudMailRu.loginRegular(method: integer): Boolean;
FormFields: TDictionary<WideString, WideString>;
begin
result := false;
self.login_method := method;

Log(LogLevelDetail, MSGTYPE_DETAILS, 'Login to ' + self.user + '@' + self.domain);
case self.login_method of
case method of
CLOUD_AUTH_METHOD_TWO_STEP:
begin
FormFields := TDictionary<WideString, WideString>.Create();
Expand Down
2 changes: 1 addition & 1 deletion Settings.pas
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ TCloudSettings = record
PrecalculateHash: boolean;
CheckCRC: boolean;
CloudMaxFileSize: integer;
OperationErrorMode: integer;
OperationErrorMode: integer;
RetryAttempts: integer;
AttemptWait: integer;

Expand Down

0 comments on commit b1ed02b

Please sign in to comment.