The global variable saves all of mirror sources for each download item. You can use the DwinsHs_AppendMirrorFile procedure to add a mirror source for a remote download item.
type
TReadMethod = (rmGet, rmPost, rmActive, rmPassive);
TMirrorItem = record
Filename: string;
URL: AnsiString;
Agent: AnsiString;
Method: TReadMethod;
Required: Boolean;
end;
var
DwinsHs_MirrorsList: array of TMirrorItem;
You can change value of the global variable before starting to download using the DwinsHs_ReadRemoteURL function, or the DwinsHs_CurPageChanged procedure (the Setup wizard moves to the pre-defined downloading wizard page).
The global variable DwinsHs_MirrorsList is a dynamic array, every array element is a TMirrorItem record, it contains the following fields:
Contains the path and name of the local file the remote file will be saved as.
Contains the full address of remote file, or contains the address of server script. the "http", "https" and "ftp" schemes are supported. Optional username, password and port number can be included. For "http" and "https" schemes, an optional parameters string can be included too.
Format:
[<scheme>://][<username>[:<password>]@]<host>[:<port>] [/<path>][?<parameters>]
For example:
http://username:[email protected]:8080/images/file.jpg
https://www.mywebsite.com/license/verify.php?license_key=xxx-xxx-xxx-xxx&license_type=2
ftp://username:[email protected]:2121/images/file.jpg
Contains the user agent string. Your server can use the string to determine whether the request is sent by your installation package, or determine which installation package sends the request, etc.
Contains the HTTP methods for an "http" or "https" request. Or the transfer mode for an "ftp" request. It can be one of the following values:
Its value is true after you add the mirror source using the DwinsHs_AppendMirrorFile procedure. It will be change to false if you use the DwinsHs_RemoveRemoteFile function or use the DwinsHs_RemoveAllRemoteFiles procedure to remove the remote file which corresponds to the mirror source, and the mirror source will not be used.
The variable is avaliable only when the DwinsHs_Use_Predefined_Downloading_WizardPage marco is defined.
Copyright © 2001-2022, Han-soft Corporation. All rights reserved.